Posts

Showing posts from September, 2006

ADB Android Device Unauthorized

Answer : It's likely that the device is no longer authorized on ADB for whatever reason. 1. Check if authorized: <ANDROID_SDK_HOME>\platform-tools>adb devices List of devices attached 4df798d76f98cf6d unauthorized 2. Revoke USB Debugging on phone If the device is shown as unauthorized , go to the developer options on the phone and click "Revoke USB debugging authorization" (tested with JellyBean & Samsung GalaxyIII). 3. Restart ADB Server: Then restarted adb server adb kill-server adb start-server 4. Reconnect the device The device will ask if you are agree to connect the computer id. You need to confirm it. 5. Now Check the device It is now authorized! adb devices <ANDROID_SDK_HOME>\platform-tools>adb devices List of devices attached 4df798d76f98cf6d device Ohhh finally I figured it out! After removing Eclipse directory I installed it into another directory. echo %ANDROID_SDK_HOME% has displayed wrong p

Bootstrap Navbar Toggle Button Not Working

Answer : Demo: http://jsfiddle.net/u1s62Lj8/1/ You need the jQuery and Boostrap Javascript files included in your HTML page for the toggle to work. (Make sure you include jQuery before Bootstrap.) <html> <head> // stylesheets here <link rel="stylesheet" href=""/> </head> <body> //your html code here // js scripts here // note jquery tag has to go before boostrap <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> </body> </html> Your code looks great, the only thing i see is that you did not include the collapsed class in your button selector. http://www.bootply.com/cpHugxg2f8 Note: Requires JavaScript plugin If JavaScript is disabled and the viewport is narrow enough that the navbar collapses, it will be impossi

Alternatives To Debian Live For Persistent Debian System On USB

Answer : Alternatives to Debian Live for persistent Debian system on USB You can create a debian Live USB with persistence using the mkusb tool : How to install mkusb in Debian These methods are tested in Debian Wheezy. It contains an instruction to install the ppa 'manually'. There is also an alternative to download the file(s) and check the download manually. The mkusb is tested and work fine on debian jessie and debian Stretch . There is no dependencies problem. To install mkusb , add the following line to your /etc/apt/sources.list deb http://ppa.launchpad.net/mkusb/ppa/ubuntu xenial main Import the gpg key : apt-key adv --keyserver keyserver.ubuntu.com --recv 54B8C8AC Update and install mkusb : apt-get update apt-get install mkusb The command line tool is mkusb-nox (txt mode) , the GUI is mkusb . The are a few steps to create a Debian Live Persistent USB using the mkusb GUI : Download the Debian Live ISO from the official website. Run mkusb

Bootstrap Change Button Text Color Code Example

Example 1: custom color bootstrap buttonm .btn-primary, .btn-primary:hover, .btn-primary:active, .btn-primary:visited { background-color: #8064A2 !important; } Example 2: button color bootstrap Active Radio Radio

Code Checker Online C++ Code Example

Example 1: c++ online compiler This two are good C ++ compilers : https : //www.onlinegdb.com/online_c++_compiler https : //www.programiz.com/cpp-programming/online-compiler/ Example 2: cpp online compiler Best Site With auto compile : https : //godbolt.org/z/nEo4j7
Note This module is part of ansible-base and included in all Ansible installations. In most cases, you can use the short module name unarchive even without specifying the collections: keyword. Despite that, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name. New in version 1.4: of ansible.builtin Synopsis Parameters Notes See Also Examples Return Values Synopsis The unarchive module unpacks an archive. It will not unpack a compressed file that does not contain an archive. By default, it will copy the source file from the local system to the target before unpacking. Set remote_src=yes to unpack an archive which already exists on the target. If checksum validation is desired, use ansible.builtin.get_url or ansible.builtin.uri instead to fetch the file and set remote_src=yes . For Windows targets, use the community.windows.win_unzip module instead.

Cdn Ajax Code Example

Example 1: ajax cdn < script src = " https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js " > </ script > Example 2: jqeury cdn //Note: This is for version 3.5.0. You can change it here \/ < script src = " https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js " integrity = " sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ= " crossorigin = " anonymous " > </ script > Example 3: jquery cdn < script src = " https://code.jquery.com/jquery-3.5.1.js " integrity = " sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc= " crossorigin = " anonymous " > </ script >

Can Shadow Pokémon Be Shiny In Pokémon Go?

Image
Answer : At the time of writing, shiny shadow Pokémon do not exist within Pokémon Go. This is confirmed by multiple threads and discussions on reddit. When shadow Pokémon first came out, there was a post going around about a shiny shadow Bulbasaur. However, the post ended up being a fake. With the introduction of Team GO Rocket Leaders, Shadow Pokemon have a chance to be Shiny. According to Niantic Support's article on Team GO Rocket Leaders: Defeating a Leader also allows you to encounter one of their rare Shadow Pokémon, which also has a chance to be a Shiny Pokémon. Shiny Shadow Pokemon are mentioned specifically from Leaders, not Grunts, which makes sense for the rarity of Shiny Pokemon This post is old, but I caught this from classic team rocket.

Bootstrap 5 Range Slider Code Example

Example 1: price range slider bootstrap 4 < input type = " range " name = " range " step = " 50000 " min = " 100000 " max = " 1000000 " value = " " onchange = " rangePrimary.value=value " > < input type = " text " id = " rangePrimary " /> Example 2: bootstrap range slider with 2 handles No, the HTML5 range input only accepts one input. I would recommend you to use something like the jQuery UI range slider for that task. Example 3: bootstrap range slider < label for = " customRange3 " class = " form-label " > Example range </ label > < input type = " range " class = " form-range " min = " 0 " max = " 5 " step = " 0.5 " id = " customRange3 " >

Atoi Implementation In C

Answer : << is bit shift, (k<<3)+(k<<1) is k*10 , written by someone who thought he was more clever than a compiler (well, he was wrong...) (*p) - '0' is subtracting the value of character 0 from the character pointed by p , effectively converting the character to a number. I hope you can figure out the rest... just remember how the decimal system works. Here is a specification for the standard function atoi . Sorry for not quoting the standard, but this will work just as fine (from: http://www.cplusplus.com/reference/clibrary/cstdlib/atoi/ ) The function first discards as many whitespace characters (as in isspace ) as necessary until the first non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many base-10 digits as possible, and interprets them as a numerical value. The string can contain additional characters after those that form the integral n

Cast Char To Int C Code Example

Example 1: char to int c++ int x = ( int ) character - 48 ; Example 2: turn a char into an int in c int x = character - '0' ; Example 3: c convert char to int int i = ( int ) ( c - '0' ) ; Example 4: converting char to integer c++ int x = '9' - 48 ; // x now equals 9 as an integer Example 5: c char to int int i ; char c = 'A' ; i = ( int ) c ;

Bootstrap Border Class Code Example

Example 1: bootstrap border color < span class = " border border-primary " > </ span > < span class = " border border-secondary " > </ span > < span class = " border border-success " > </ span > < span class = " border border-danger " > </ span > < span class = " border border-warning " > </ span > < span class = " border border-info " > </ span > < span class = " border border-light " > </ span > < span class = " border border-dark " > </ span > < span class = " border border-white " > </ span > Example 2: border radius bootstrap Border-radius Add classes to an element to easily round its corners. < img src = " ... " alt = " ... " class = " rounded " > < img src = " ... " alt = " ... " class = " r

Can I Defeat The Eater Of Worlds With Only Iron Armor And A Demonite Broadsword? If Not, What Do I Need?

Answer : You've got a number of options open to you (aren't sandbox games grand!): You could go mine out some better ores. For instance, you should be able to dig a shaft, find Silver and/or Gold, and mine enough to make better armor. You could go into the Jungle and try to make some gear - the Thorn Chakram is easy to recommend. Jungle Armor might be tricky, as the resources required are likely going to be difficult to collect in quantity at your current health/armor level. The Chakram is pretty straightforward and low resource cost, though. You could fight the Goblin Army, which has a chance to spawn after you start breaking Shadow Orbs. They drop Harpoons, which are recommended for use against the pre-hardmode bosses and apparently make pretty short work of them. The Army's not tough to fight if you have a pretty defensible area and a fast-firing weapon that does decent knockback. I'd also suggest constructing a boss arena (in the corruption, if tha

Check If Key Exists In Dictionary Of Type [Type:Type?]

Answer : Actually your test dictionary[key] == nil can be used to check if a key exists in a dictionary. It will not yield true if the value is set to nil : let dict : [String : Int?] = ["a" : 1, "b" : nil] dict["a"] == nil // false, dict["a"] is .Some(.Some(1)) dict["b"] == nil // false !!, dict["b"] is .Some(.None) dict["c"] == nil // true, dict["c"] is .None To distinguish between "key is not present in dict" and "value for key is nil" you can do a nested optional assignment: if let val = dict["key"] { if let x = val { println(x) } else { println("value is nil") } } else { println("key is not present in dict") } I believe the Dictionary type's indexForKey(key: Key) is what you're looking for. It returns the index for a given key, but more importantly for your proposes, it returns nil if it

"Allow All The Time" Location Prompt Not Coming In Android SDK 29

Answer : In order to access the location in background on device running Android 10 (API level 29) or higher, you also need to use below permission in the manifest file <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> please refer the below link for more information https://developer.android.com/training/location/permissions?hl=fr Add "ACCESS_BACKGROUND_LOCATION" in manifest and permissions array. If you only add permission in manifest then "Allow all the time" options will not be shown. You need to add in array to ask users to grant at runtime. In manifest: <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> In your activity: if (ContextCompat.checkSelfPermission( this.applicationC

Bootswatch Cdn Code Example

Example 1: bootstrap cdn < link rel = " stylesheet " href = " https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css " > Example 2: bootstrap cdn CSS < link rel = " stylesheet " href = " https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css " > JS < script src = " https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js " > </ script > JQuery < script src = " https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js " > </ script > Example 3: bootstrap cdn <!-- Latest compiled and minified CSS --> < link rel = " stylesheet " href = " https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css " integrity = " sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u " crossorigin = " anonymous " > <!-- Optional theme --> < link rel

Auto Indent Visual Studio Code Code Example

Example 1: visual studio code auto indent On Windows Shift + Alt + F On Mac Shift + Option + F On Ubuntu Ctrl + Shift + I Example 2: indent code in vs code The code formatting is available in Visual Studio Code through the following shortcuts: On Windows : Shift + Alt + F On Mac : Shift + Option + F On Linux : Ctrl + Shift + I Example 3: format code in vs code On Windows Shift + Alt + F. On Mac Shift + Option + F. Example 4: visual studio code windows auto indent Shift + Alt + F Example 5: visual studio code indent outdent shortcut Indent using tab key. Outdent using Shift + tab key. Example 6: viscode format automatico { // Controls if the editor should automatically format the line after typing "beautify.onSave": true, "editor.formatOnSave": true, // You can auto format any files based on the file extensions type. "beautify.JSfiles": [ "js", "json", "jsbeautifyrc"

Angular Service Worker SwUpdate.available Not Triggered

Answer : You will probably need to tell the service worker to check the server for updates, I usually use a service for this: export class UpdateService { constructor(public updates: SwUpdate) { if (updates.isEnabled) { interval(6 * 60 * 60).subscribe(() => updates.checkForUpdate() .then(() => console.log('checking for updates'))); } } public checkForUpdates(): void { this.updates.available.subscribe(event => this.promptUser()); } private promptUser(): void { console.log('updating to new version'); this.updates.activateUpdate().then(() => document.location.reload()); } In your app-component.ts : constructor(private sw: UpdateService) { // check the service worker for updates this.sw.checkForUpdates(); } For whatever reason, Angular sometimes does not register the service worker properly. So you can modify `main.ts` : Replace: platformBrowserDynamic().bootstrapModule(AppModule); With: p

Cmd Move Folder Code Example

Example 1: cmd move file to folder move filename directoryname Example 2: move into folder cmd The cd command can be used to change into a subdirectory , cd subdirectory_name - > To go one level into subdir cd subdirectory_name / subsubdirectory_name - > To go two levels into subdir move back into the parent directory , cd . . \ - > To go back one level cd . . \ . . \ - > To go back two levels move to previos directory , cd - move all the way back to the root directory or move to any given directory cd C : / Give_Path_to_directory Example 3: cmd move directory to another directory move directory newDirectoryPath Example 4: move to folder in command line windows # move to a directory : cd myFolder # move out of a directory cd . . # move to another hard disk # in this example i want to move to drive F , just type : f : # and hit enter

Bindingadapter Kotlin Code Example

Example: android binding adapter multiple parameters @BindingAdapter(value = ["url", "defaultImage", "placeholder", "circleCrop"], requireAll = false) fun ImageView.setImageUrl(url: String, default: Drawable? = null, placeholder: Drawable? = null, circleCrop: Boolean = false) { // code }

Bootstrap Form Align Button Right Code Example

Example: bootstrap align right button < div class = " float-sm-left " > Float left on viewports sized SM (small) or wider </ div > < br > < div class = " float-md-left " > Float left on viewports sized MD (medium) or wider </ div > < br > < div class = " float-lg-left " > Float left on viewports sized LG (large) or wider </ div > < br > < div class = " float-xl-left " > Float left on viewports sized XL (extra-large) or wider </ div > < br >