Posts

Showing posts from June, 2019

Chrome://inspect Displaying Device Though Not Displaying Any Opened Tabs

Answer : Using chrome://inspect/#devices, if the device is detected, but tabs open in chrome on the device are not listed, look for the "activate USB debugging" option in the chrome settings-->developer options tab on the device. This is in addition to the USB debugging option you've already checked in the Android developer settings. Ok you must use chrome mobile in order to debug any webviews or browser tabs. No other browser works. I was unaware of this. //Edit As of Android version 4.4 or later this is no longer the case. Android 4.4 has support for debugging internal Webviews. Please see https://developer.chrome.com/devtools/docs/remote-debugging#debugging-webviews After connecting your device, make sure you open Chrome browser on the device and after that refresh the Chrome window on your PC. This will display the entry of the opened Chrome browser on the device. It will not launch if you don't first open Chrome browser on your phone

BitBucket WebHook Jenkins

Answer : SPECIFIC solution for Jenkins CI server--Webhook to Jenkins for Bitbucket plugin has been commercialized in latest version of Bit-Bucket and the current price is around $4800 which was earlier a free offering, because of this, guys who want to save their bucks, can go to the alternative solution by using webhooks feature of bit-bucket:- Steps to create a webhook:- BitBucket Side 1) Go to your bitbucket repo, click on Repository Setting, under WORKFLOW got for WEBHOOKS option and create a webhook. a) creation of webhook:- URL https://JenkinsserverURL/git/notifyCommit?url=https://bitbucket.repository-link/repository.git b) In the name tab, give any name of your choice c) click on TEST CONNECTION before saving it. Make sure you get http status 200 d) View details your logs, check your request and response is correct. Things to take care of from Jenkins Side:- 1) Make sure repository mentioned in bitbucket webhook is used in Jenkins job. 2) In SCM option, act

Adding Days To $Date In PHP

Answer : All you have to do is use days instead of day like this: <?php $Date = "2010-09-17"; echo date('Y-m-d', strtotime($Date. ' + 1 days')); echo date('Y-m-d', strtotime($Date. ' + 2 days')); ?> And it outputs correctly: 2010-09-18 2010-09-19 If you're using PHP 5.3, you can use a DateTime object and its add method: $Date1 = '2010-09-17'; $date = new DateTime($Date1); $date->add(new DateInterval('P1D')); // P1D means a period of 1 day $Date2 = $date->format('Y-m-d'); Take a look at the DateInterval constructor manual page to see how to construct other periods to add to your date (2 days would be 'P2D' , 3 would be 'P3D' , and so on). Without PHP 5.3, you should be able to use strtotime the way you did it (I've tested it and it works in both 5.1.6 and 5.2.10): $Date1 = '2010-09-17'; $Date2 = date('Y-m-d', strtotime($Date1 . " + 1 day"

How To Print Std List Code Example

Example: how to print list in c++ # include <iostream> # include <list> std :: list < int > listOfNumbers = { 1 , 2 , 3 , 4 } ; for ( int item : listOfNumbers ) std :: cout << item << " " ;

Certutil Md5 Windows Code Example

Example: certutil md5 windows >certutil -hashfile filename MD5

Std Cin Example

Example 1: cin in c++ cin >> varName ; Example 2: c++ cin operator //Akbarali saqlagan C++ bo'yicha cin operatoriga ta'rif # include <iostream> using namespace std ; int main ( ) { int a ; cout << "Kattaroq sonni yozing: " ; cin >> a ; int b ; cout << "Tepadaginga nisbatan kichik bo`lgan son(qiymatni) yozing: " ; cin >> b ; cout << "Birinchi kiritgan soningizdan ikkinchi kiitgan soningiz " << a - b << " marta katta ekanligi ma'lum bo'ldi.\n" ; return 0 ; }

Youtube Convertidor Mp3 Code Example

Example: youtube mp3 converter You can use WebTools , it's an addon that gather the most useful and basic tools such as a synonym dictionary , a dictionary , a translator , a youtube convertor , a speedtest and many others ( there are ten of them ) . You can access them in two clics , without having to open a new tab and without having to search for them ! - Chrome Link : https : //chrome.google.com/webstore/detail/webtools/ejnboneedfadhjddmbckhflmpnlcomge/ Firefox link : https : //addons.mozilla.org/fr/firefox/addon/webtools/

Can I Convert Css To Scss And Scss To Css Parallelly?

Answer : It is possible , but not ideal. Your best bet is to crack open your terminal and run sass-convert --from css --to scss in the directory where your styles are located and then refactor from there . It's a pain, and not a true "conversion". It tries to nest properly, and usually gets it right, but if you're not refactoring the code and using things like mix-ins, extends, and variables, it kind of defeats the purpose of using SASS to begin with. To automate this, you may want to use something like Guard to watch the css files for changes. You'll want to make sure you're not also watching your main style (the one that sass is compiling to), as this will put you in a never-ending loop of conversion! Use a command for installing compass gem install compass Run this command. This will scan defined directory for css files and convert them to scss files. sass-convert -R my_css_dir --from css --to scss Then execute this command compass watch

Bootstrap Slider W3schools Code Example

Example 1: how to add carousel in javascript <!DOCTYPE html > <html > <head > <meta name="viewport" content="width=device-width , initial-scale=1" > <style > * { box-sizing : border-box } body { font-family : Verdana , sans-serif ; margin : 0 } .mySlides { display : none } img { vertical-align : middle ; } /* Slideshow container */ .slideshow-container { max-width : 1000 px ; position : relative ; margin : auto ; } /* Next & previous buttons */ .prev , .next { cursor : pointer ; position : absolute ; top : 50 % ; width : auto ; padding : 16 px ; margin-top : -22 px ; color : white ; font-weight : bold ; font-size : 18 px ; transition : 0.6 s ease ; border-radius : 0 3 px 3 px 0 ; user-select : none ; } /* Position the "next button" to the right */ .next { right : 0 ; border-radius : 3 px 0 0 3 px ; } /* On ho

At=error Code=H14 Desc="No Web Processes Running" Method=GET Path="/favicon.ico" Angualr Code Example

Example: heroku no web processes running spring boot Create Procfile with just web: java -Dspring.profiles.active=default -Dserver.port=$PORT -jar target/*.jar then on the heroku CLI : heroku ps:scale web=1

C Playground Online Code Example

Example 1: online c compiler I Personally Like https : //www.programiz.com/c-programming/online-compiler/ Example 2: online c compiler You can try https : //www.onlinegdb.com/ this as well, works really well for me. You can also save code there .

Can You Play A Japanese N64 Game On A European Console?

Answer : Out of the box, no. The Nintendo 64 has a region lockout chip which prevents NTSC (Japanese and US) games from running on a PAL (European) machine. However, through the use of third-party devices, most games should work. I personally own a N64 Passport Plus which I use to play Hey You, Pikachu! on my own N64. It basically works by using a second, local cartridge to authenticate with the lockout mechanism. I don't have first hand experience of this, but according to that Wikipedia article, some games won't work even with this - presumably, they perform additional hardware detection, so they might be hard to do anything about. It may be possible to somehow bypass these through Action Replay codes; I don't know exactly how these games perform those checks. You could also buy a Japanese N64 and bring that home. You'll need a power converter to make it run on 230V, and a TV which will accept the input, but you could run any Japanese game that way, and any U

AH01797: Client Denied By Server Configuration: /usr/share/doc

Answer : Solution 1: In 2.2, access control based on client hostname, IP address, and other characteristics of client requests was done using the directives Order, Allow, Deny, and Satisfy. In 2.4, such access control is done in the same way as other authorization checks, using the new module mod_authz_host. The old access control idioms should be replaced by the new authentication mechanisms, although for compatibility with old configurations, the new module mod_access_compat is provided. Looks like you've already set the new Require directive, so just remove the deprecated access directives and run sudo service apache2 reload Solution 2: Since some time has passed without any answer, I decided to (partially) answer my own question according to my research so far. Unfortunately, the question why Googlebot and Baiduspider are trying to access the Apache documentation through my server remains unanswered. The /manual/... URLs get mapped to /usr/sh

AnimatedShows.tk Code Example

Example: animatedshows Visit: https://animatedshows.tk

Backup AWS Dynamodb To S3

Answer : With introduction of AWS Data Pipeline, with a ready made template for dynamodb to S3 backup, the easiest way is to schedule a back up in the Data Pipeline [link], In case you have special needs (data transformation, very fine grain control ...) consider the answer by @greg There are some good guides for working with MapReduce and DynamoDB. I followed this one the other day and got data exporting to S3 going reasonably painlessly. I think your best bet would be to create a hive script that performs the backup task, save it in an S3 bucket, then use the AWS API for your language to pragmatically spin up a new EMR job flow, complete the backup. You could set this as a cron job. Example of a hive script exporting data from Dynamo to S3: CREATE EXTERNAL TABLE my_table_dynamodb ( company_id string ,id string ,name string ,city string ,state string ,postal_code string) STORED BY 'org.apache.hadoop.hive.dynamodb.DynamoDBStorageHandler' TB

Android Architecture Components: Gradle Sync Error For Dependency Version

Answer : As @RedBassett mentions Support libraries depends on this lightweight import (runtime library) as explained at android developers documentation. This is, android.arch.lifecycle:runtime:1.0.0 is spreading up in the dependency tree as a result of an internal api (transitive) import so in my case I only had to include extensions library as "api" instead of "implementation" so that it will override its version to the highest (1.1.1). In conclusion, change implementation "android.arch.lifecycle:extensions:1.1.1" to api "android.arch.lifecycle:extensions:1.1.1" In your main build.gradle file allprojects { ... configurations { all { resolutionStrategy { force "android.arch.lifecycle:runtime:1.1.1" } } } } This will enforce version 1.1.1 Apparently support-v4 was causing the conflict. In the case of this question, the Gradle dependency task wasn&

Arduino Switch Case Example

Example 1: swich case arduino // Arduino => c++ switch ( var ) { case 1 : //do something when var equals 1 break ; case 2 : //do something when var equals 2 break ; default : // if nothing else matches, do the default // default is optional break ; } Example 2: arduino switch case switch ( var ) { case label1 : // statements break ; case label2 : // statements break ; default : // statements break ; }

Change Date Format In Html Input Type Date Code Example

Example: change date format in html < input type = " date " name = " begin " placeholder = " dd-mm-yyyy " value = " " min = " 1997-01-01 " max = " 2030-12-31 " >

Autohotkey Send Code Example

Example: ahk send Send Sincerely,{enter}John Smith ; Types a two-line signature. Send !fs ; Select the File->Save menu (Alt+F followed by S). Send {End}+{Left 4} ; Jump to the end of the text then send four shift+left-arrow keystrokes. SendInput {Raw}A long series of raw characters sent via the fastest method.