Posts

Java Method Return Multiple Values Code Example

Example: how to return two values from a function in java int [ ] ans = new int [ 2 ] ; ans [ 0 ] = a + b ; ans [ 1 ] = a - b ; return ans ;

Android Developer Documentation: Download?

Answer : Yes you can. Open SDK Manager (located in android_sdk_dir/SDK Manager.exe ). In the latest API (4.2) select Documentation for Android SDK . Once downloaded, you can find the documentation in android_sdk_dir/docs . Can I download the entire Android Developer documents to my machine and browse it locally? In the SDK Manager simply select "Documentation for Android SDK" for a recent API.

C Tolower Example

Defined in header <ctype.h> int tolower ( int ch ) ; Converts the given character to lowercase according to the character conversion rules defined by the currently installed C locale. In the default "C" locale, the following uppercase letters ABCDEFGHIJKLMNOPQRSTUVWXYZ are replaced with respective lowercase letters abcdefghijklmnopqrstuvwxyz . Parameters ch - character to be converted. If the value of ch is not representable as unsigned char and does not equal EOF , the behavior is undefined. Return value Lowercase version of ch or unmodified ch if no lowercase version is listed in the current C locale. Example # include <stdio.h> # include <ctype.h> # include <locale.h> # include <limits.h> int main ( void ) { /* In the default locale: */ unsigned char l ; for ( unsigned char u = 0 ; u < UCHAR_MAX ; u ++ ) { l = tolower ( u ) ; if ( l != u...

Call Ghostscript In Windows By Its Invocation Name?

Answer : There are several possibilities. To list the two most frequent ones: c:\full\path\to\gswin32c.exe should always work. For 64bit systems, use c:\full\path\to\gswin64c.exe . After a fresh installation using a standard windows installer, you may need to reboot before the updated %path% environment variable is used. Open a cmd window and (assuming your Ghostscript installation ended up in c:\path\to\gs ...) then type set path=c:\path\to\gs\gs9.02\bin;%path% . From this same cmd window you can now simply use gswin32c to start Ghostscript (use gswin64c on 64 bit Windows)...

Flex-direction Column In Bootstrap 4 Code Example

Example 1: bootstrap flex direction column d-flex flex-column Example 2: ustify-content: flex-end; bootstrap <div class= "d-flex justify-content-end" >...</div> Example 3: flex direction column bootstrap 4 <div class= "d-flex justify-content-start" >...</div> <div class= "d-flex justify-content-end" >...</div> <div class= "d-flex justify-content-center" >...</div> <div class= "d-flex justify-content-between" >...</div> <div class= "d-flex justify-content-around" >...</div>

Convert Byte Array To String In Python Code Example

Example 1: bytes to string python # utf-8 is used here because it is a very common encoding, but you # need to use the encoding your data is actually in. bytes = b'abcde' bytes.decode("utf-8") 'abcde' Example 2: bytearray to string python bytesliteral ::= bytesprefix(shortbytes | longbytes) bytesprefix ::= "b" | "B" | "br" | "Br" | "bR" | "BR" shortbytes ::= "'" shortbytesitem* "'" | '"' shortbytesitem* '"' longbytes ::= "'''" longbytesitem* "'''" | '"""' longbytesitem* '"""' shortbytesitem ::= shortbyteschar | bytesescapeseq longbytesitem ::= longbyteschar | bytesescapeseq shortbyteschar ::= longbyteschar ::= bytesescapeseq ::= "\"

Border Shadow In React Native Code Example

Example 1: box shadow react native shadowColor : "#000" , shadowOffset : { width : 0 , height : 2 , } , shadowOpacity : 0.25 , shadowRadius : 4.84 , elevation : 5 , Example 2: react-native shadow generator shadowColor : "#000" , shadowOffset : { width : 0 , height : 2 , } , shadowOpacity : 0.25 , shadowRadius : 3.84 , elevation : 5 , Example 3: box shadow in react native shadowColor : "#000" , shadowOffset : { width : 0 , height : 4 , } , shadowOpacity : 0 , shadowRadius : 4.65 , elevation : 8 , Example 4: shadow border react native shadowColor : "#000" , shadowOffset : { width : 0 , height : 11 , } , shadowOpacity : 0.55 , shadowRadius : 14.78 , elevation : 22 , Example 5: box shadow in react native shadowColor : "#000" , shadowOffset : { width : 0 , height : 1 , } , shadowOpacity : 0.20 , shadowRadius : 1.41 , elevation : 2 , Example 6: b...

Bootstrap Small Text Highlight Code Example

Example 1: bootstrap text size h1. Bootstrap heading h2. Bootstrap heading h3. Bootstrap heading h4. Bootstrap heading h5. Bootstrap heading h6. Bootstrap heading Example 2: bootstrap blockquote Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. Someone famous in Source Title

Alert In Html W3 School Code Example

Example: javascript alert alert ( "string" ) ;

Make Width Dynamic Css Code Example

Example: css dynamic width <div style= "width:100%;" > <div style= "width:50px; float: left;" ><img src= "myleftimage" /></div> <div style= "width:50px; float: right;" ><img src= "myrightimage" /></div> <div style= "display:block; margin-left:auto; margin-right: auto;" >Content Goes Here</div> </div>

Convert OVA To VHD For Usage In Hyper-V

Answer : Quite easy actually, install VirtualBox that comes with the program VBoxManage.exe. It can be used with clonehd to specify the new format of the disk. You specify the original disk file, in this case the .vmdk, and then give a location and name to output the .vhd. Open a cmd prompt, CD to C:\Program Files\Oracle\VirtualBox or Virtualbox install directory and then run: VBoxManage.exe clonehd --format vhd "C:\temp\VM\disk1.vmdk" "C:\temp\VM\disk1.vhd" Documentation for VirtualBox: https://www.virtualbox.org/manual/ch08.html#vboxmanage-clonevdi Then I created a new virtual machine from Hyper-V Manager and selected "Use an existing virtual hard disk". Worked perfectly. Use this guide for internet access: https://superuser.com/a/472854/405096 I can't comment yet, but this is a followup to the comment of Ogglas If you get the message: 'VBoxManage.exe' is not recognized as an internal or external command, operable program or batch f...

Angry Ip Scanner Download Code Example

Example: Angry IP Scanner It's an IP Scanner to find open ports in the server and vulnerabelities

Can One Change A Group To A Subgroup In GitLab?

Answer : For more current information, this feature has now been added to gitlab and you can transfer an existing group to become a subgroup of a different existing group. The linked issue in @Zeta 's answer was closed and this issue (https://gitlab.com/gitlab-org/gitlab-ce/issues/31885) became the primary issue on this topic. At the time of writing this, the method to change a group to a subgroup is as follows: go to the group you want to turn into a subgroup. Go to the general settings of that group. Expand "Path, transfer, remove". Under this is a "Transfer group" box where you select your desired parent group that you manage. After specifying the desired parent group, hit transfer group and it should be moved to the appropriate path. Gitlab Notes (taken from gitlab web interface): Be careful. Changing a group's parent can have unintended side effects. You can only transfer the group to a group you manage. You will still need to upda...

Contactor Vs Relay

Image
Answer : Wikipedia's Contactor article explains it pretty well. Unlike general-purpose relays, contactors are designed to be directly connected to high-current load devices . Relays tend to be of lower capacity and are usually designed for both normally closed and normally open applications. Devices switching more than 15 amperes or in circuits rated more than a few kilowatts are usually called contactors. Apart from optional auxiliary low current contacts, contactors are almost exclusively fitted with normally open ("form A") contacts . Unlike relays, contactors are designed with features to control and suppress the arc produced when interrupting heavy motor currents . [Emphasis mine.] Further down the same article ... Differences between a relay and a contactor: Contactors generally are spring loaded to prevent contact welding. Arc-suppression relays usually have NC contacts; contactors usually do not (when de-energerzied, there is no connection). Ma...

Angular Read Text File From Local Path Code Example

Example 1: read file javascript // As with JSON, use the Fetch API & ES6 fetch('something.txt') .then(response => response.text()) .then(data => { // Do something with your data console.log(data); }); Example 2: html get text from file < embed src = " file.txt " > // This will show the text contained in file.txt in the page

Mp3 Yt Converter Code Example

Example 1: 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/ Example 2: yt to mp3 Youtube - DL works great . Download from https : //youtube-dl.org/. To use, type youtube-dl <url> --audio-format mp3