Posts

Showing posts from January, 2020

Light Grey Rgb Values Code Example

Example 1: light grey color code HTML / CSS Color Name Hex Code #RRGGBB Decimal Code ( R , G , B ) gainsboro #DCDCDC rgb ( 220 , 220 , 220 ) lightgray / lightgrey #D3D3D3 rgb ( 211 , 211 , 211 ) silver #C0C0C0 rgb ( 192 , 192 , 192 ) darkgray / darkgrey #A9A9A9 rgb ( 169 , 169 , 169 ) Example 2: grey rgb values #808080 rgb ( 128 , 128 , 128 )

Composer Global Update Php Code Example

Example: where do you install composer // Adding permissions after installing Composer on Mac OSX sudo chmod 755 /usr/local/bin/composer.phar

Outline Radius Css Code Example

Example 1: css rounded corners /* Set rounded corners with border-radius property */ .class { border-radius : 4 px ; } .circle { border-radius : 50 % ; } Example 2: border radius css /* Radius is set for all 4 sides */ border-radius : 10 px ; /* top-left-and-bottom-right | top-right-and-bottom-left */ border-radius : 10 px 5 % ; /* top-left | top-right-and-bottom-left | bottom-right */ border-radius : 2 px 4 px 2 px ; /* top-left | top-right | bottom-right | bottom-left */ border-radius : 1 px 0 3 px 4 px ; /* The syntax of the second radius allows one to four values */ /* first radius / radius */ border-radius : 10 px / 20 px ; /* first radius => corner point to left or right side*/ /* second radius => corner point to top or bottom side*/ /* radius => corner point to both sides*/ Example 3: how to round the corners of a div outline in css div { outline : auto ; outline-style : round ; } Example 4: css round outline /*A box-shadow can be used for

Anaconda - Graphviz - Can't Import After Installation

Answer : The graphviz conda package is no Python package. It simply puts the graphviz files into your virtual env's Library/ directory. Look e.g. for dot.exe in the Library/bin/ directory. To install the `graphviz` **Python package**, you can use `pip`: `conda install pip` and `pip install graphviz`. Always prefer conda packages if they are available over pip packages. Search for the package you need (`conda search pkgxy`) and then install it (`conda install pkgxy`). If it is not available, you can always build your own conda packages or you can try anaconda.org for user-built packages. Update : There exists now a python-graphviz package at Anaconda.org which contains the Python interface for the graphviz tool. Simply install it with conda install python-graphviz . (Thanks to wedran and g-kaklam for posting this solution and to endolith for notifying me). On conda: First install conda install graphviz Then the python-library for graphviz python-graphviz

Consider Using '--resolvejsonmodule' To Import Module With '.json' Extension Code Example

Example 1: Cannot find module './data.json'. Consider using '--resolveJsonModule' to import module with '.json' extension add to tsconfig . json { ... "resolveJsonModule" : true } } Example 2: Consider using '--resolveJsonModule add "resolveJsonModule" : true key in tsconfig . json { "compilerOptions" : { "target" : "es2015" , "module" : "commonjs" , "strict" : true , "moduleResolution" : "node" , "resolveJsonModule" : true } } Example 3: read json file in typescript // data.json: { "greeting" : "xin chao Vietnam" } // component: import * as data from 'data.json' ; let greeting = data . greeting ; //registering jsonModule in tsconfig.json "compilerOptions" : { ... . "resolveJsonModule" : true , ... . } , Example 4: how to import a jso

Table Thead Fixed Tbody Scroll Css Code Example

Example: scroll tbody fixed thead table { width : 100 % ; } table , td { border-collapse : collapse ; border : 1 px solid #000 ; } thead { display : table ; /* to take the same width as tr */ width : calc ( 100 % - 17 px ) ; /* - 17px because of the scrollbar width */ } tbody { display : block ; /* to enable vertical scrolling */ max-height : 200 px ; /* e.g. */ overflow-y : scroll ; /* keeps the scrollbar even if it doesn't need it; display purpose */ } th , td { width : 33.33 % ; /* to enable "word-break: break-all" */ padding : 5 px ; word-break : break-all ; /* 4. */ } tr { display : table ; /* display purpose; th's border */ width : 100 % ; box-sizing : border-box ; /* because of the border (Chrome needs this line, but not FF) */ } td { text-align : center ; border-bottom : none ; border-left : none ; }

Can We Use Keyboard & Mouse On PS3?

Answer : Yes. To add a Bluetooth keyboard, go to Settings > Accessories > Manage Bluetooth Devices. For a non-Bluetooth wireless keyboard to work, it would probably have to have its own wireless receiver that would plug into the console via USB. It also supports USB keyboards. From page 31 of my PS3 owner's manual: Using a USB keyboard You can enter characters using a USB keyboard (sold separately). While the text entry screen is displayed, if any key on the connected USB keyboard is pressed, the text entry screen will enable you to use the USB keyboard. Hint You cannot use the predictive mode when using a USB keyboard. Unfortunately, it looks like there aren't many games that natively support keyboard/mouse. I did find the Eagle Eye, a third-party adapter that allows you to use a USB keyboard/mouse in lieu of a controller regardless of whether or not the games supports it. Although you can use a mouse and keyboard, you can't play

Unsigned Long Long Int Range C++ Code Example

Example 1: range of long long in c++ Long Data Type Size ( in bytes ) Range long int 4 - 2 , 147 , 483 , 648 to 2 , 147 , 483 , 647 unsigned long int 4 0 to 4 , 294 , 967 , 295 long long int 8 - ( 2 ^ 63 ) to ( 2 ^ 63 ) - 1 unsigned long long int 8 0 to 18 , 446 , 744 , 073 , 709 , 551 , 615 Example 2: c++ get maximum value unsigned int // C # include <limits.h> unsigned int max_unsigned_int_size = UINT_MAX ; // C++ # include <limits> unsigned int max_unsigned_int_size = std :: numeric_limits < unsigned int > :: max ( ) ;

C++ Requesting MSVCP110D.dll Even Though Staticly Linked

Answer : weird , asking for the debug version Tells you what you did wrong, you accidentally copied the Debug build of the DLL instead of the Release build. Since you only changed the setting for the Release build, it still requires msvcp110d.dll. It is in general wise to change such a setting for all configurations and all platforms. Tedious, so it often gets skipped. I copied the requested library manually in the release path and still wont work Right, that cannot work since you injected the DLL. A different process. So when it is loaded, the install directory for the game is searched for the file, not the directory where your utility is installed. Your friend needs the Visual-C++ Redistributables in order to properly run your injector, and for the DLL to be loaded. However After Injection, the dll is trying to LoadLibrary (if GetModuleHandle fails) the CRT dlls. There are a lot of them! You have some options: Include the required DLLs inside your I

Add Apps To Startup Windows 10 Code Example

Example 1: win 10 add program to startup Adding app to startup manually: 1. Create app shortcut 2. Drag and drop in C:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup To test if the app is added successfully: 1. Open task manager 2. Go to Startup 3. The app will be visible Example 2: run app at startup in Windows 10 Add an app to run automatically at startup in Windows 10: 1. Find the app you want to run at startup, select the Start button and scroll to find the app, look on your desktop to find the app or use the search option. 2. Right-click the app, select More, and then select Open file location. This opens the location where the shortcut to the app is saved. If there isn't an option for Open file location, it means the app can't run at startup. 3. With the file location open, press the Windows logo key + R, type shell:startup, then select OK. This opens the Startup folder. 4. Copy and paste the shortcut to the ap

Row Max Height Css Grid Code Example

Example 1: css grid make all rows same height grid-auto-rows : 1 fr ; Example 2: css grid min height grid-template-rows : 3 ch auto minmax ( 10 px , 60 px ) ; /* Please Dislike if this doesnt Work I'll Remove */

Console.log Color Sentence Code Example

Example 1: js console log with color console. log ( '%c Oh my heavens! ' , 'background: #222; color: #bada55' ) ; Example 2: console.log with color font var colors = require ( 'colors' ) ; console. log ( 'This is bold' .bold ) ; console. log ( 'This is dim' .dim ) ; console. log ( 'This is italic' .italic ) ; console. log ( 'This is underline' .underline ) ; console. log ( 'This is inverse' .inverse ) ; console. log ( 'This is hidden' .hidden ) ;

Conor Mcgregor Wiki Code Example

Example 1: conor mcgregor He either apologizes to absolutely nobody or absolutely everybody. Example 2: conor mcgregor Going to drop jake paul if he takes the fight

Control Differences Between Ac Induction Motor And Brushless Dc Motor?

Image
Answer : From All About Circuits: Brushless DC motors are similar to AC synchronous motors. The major difference is that synchronous motors develop a sinusoidal back EMF, as compared to a rectangular, or trapezoidal, back EMF for brushless DC motors. Both have stator created rotating magnetic fields producing torque in a magnetic rotor. Construction wise, there is essentially* no difference. The motor in the above diagram could be called an "AC Induction Motor" or a "Brushless DC Motor" and it would be the same motor. The main difference is in the drive. An AC motor is controlled by a drive consisting of a sinusoidal alternating current waveform. It's speed is synchronous with the frequency of that waveform. And since it is driven by a sine wave, it's Back-EMF is a sine wave. A single phase AC Motor could be driven from the wall socket and it would turn at 3000 RPM or 3600 RPM (depending on your country of origin having 50/60Hz mains). Notice that I said

Sum Of Matrix In C Program Code Example

Example: matrix addition in c //This program is for matrix addition by programiz.com # include <stdio.h> int main ( ) { int r , c , a [ 100 ] [ 100 ] , b [ 100 ] [ 100 ] , sum [ 100 ] [ 100 ] , i , j ; printf ( "Enter the number of rows (between 1 and 100): " ) ; scanf ( "%d" , & r ) ; printf ( "Enter the number of columns (between 1 and 100): " ) ; scanf ( "%d" , & c ) ; printf ( "\nEnter elements of 1st matrix:\n" ) ; for ( i = 0 ; i < r ; ++ i ) for ( j = 0 ; j < c ; ++ j ) { printf ( "Enter element a%d%d: " , i + 1 , j + 1 ) ; scanf ( "%d" , & a [ i ] [ j ] ) ; } printf ( "Enter elements of 2nd matrix:\n" ) ; for ( i = 0 ; i < r ; ++ i ) for ( j = 0 ; j < c ; ++ j ) { printf ( "Enter element a%d%d: " , i +

Android-studio: Unable To Locate Adb

Image
Answer : A couple of days after posting the above solution, the problem returned on my Windows system. Finally after several hours of investigation I think I have another solution for everyone having issues with AVD Manager "Unable to locate adb". I know we have the setting for the SDK in File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK. This it seems is not enough! It appears that Android Studio (at least the new version 4) does not give projects a default SDK, despite the above setting. So, you also (for each project) need to go to File -> Project Structure -> Project Settings -> Project, and select the Project SDK, which is set to [No SDK] by default. If there's nothing in the drop-down box, then select New, select Android SDK, and navigate to your Android SDK location (normally C:\Users[username]\AppData\Local\Android\Sdk on Windows). You will then be able to select the Android API xx Platform. You now sho

Heap Geeksforgeeks C++ Code Example

Example 1: min heap in c++ priority_queue < int , vector < int > , greater < int >> minHeap ; Example 2: max heap c++ # include <iostream> using namespace std ; void max_heap ( int * a , int m , int n ) { int j , t ; t = a [ m ] ; j = 2 * m ; while ( j <= n ) { if ( j < n && a [ j + 1 ] > a [ j ] ) j = j + 1 ; if ( t > a [ j ] ) break ; else if ( t <= a [ j ] ) { a [ j / 2 ] = a [ j ] ; j = 2 * j ; } } a [ j / 2 ] = t ; return ; } void build_maxheap ( int * a , int n ) { int k ; for ( k = n / 2 ; k >= 1 ; k -- ) { max_heap ( a , k , n ) ; } } int main ( ) { int n , i ; cout << "enter no of elements of array\n" ; cin >> n ; int a [ 30 ] ; for ( i = 1 ; i <= n ; i ++ ) { cout << "enter ele

C# Country Code Code Example

Example: c# get country code var regions = CultureInfo . GetCultures ( CultureTypes . SpecificCultures ) . Select ( x => new RegionInfo ( x . LCID ) ) ; var englishRegion = regions . FirstOrDefault ( region => region . EnglishName . Contains ( "United Kingdom" ) ) ; var countryAbbrev = englishRegion . TwoLetterISORegionName ;

Generate Unique Id From String Javascript Code Example

Example 1: random id js var ID = function ( ) { // Math.random should be unique because of its seeding algorithm. // Convert it to base 36 (numbers + letters), and grab the first 9 characters // after the decimal. return '_' + Math . random ( ) . toString ( 36 ) . substr ( 2 , 9 ) ; } ; Example 2: javascript find unique values in array // usage example: var myArray = [ 'a' , 1 , 'a' , 2 , '1' ] ; var unique = myArray . filter ( ( v , i , a ) => a . indexOf ( v ) == = i ) ; // unique is ['a', 1, 2, '1'] Example 3: javascript generate unique id function uuidv4 ( ) { return 'xxxxxxxx - xxxx - 4xxx - yxxx - xxxxxxxxxxxx' . replace ( / [ xy ] / g , function ( c ) { var r = Math . random ( ) * 16 | 0 , v = c == 'x' ? r : ( r & 0x3 | 0x8 ) ; return v . toString ( 16 ) ; } ) ; } console . log ( uuidv4 ( ) ) ; Example 4: javascript generate unique id function

Css Styling Scroll Bar Code Example

Example: custom scrollbar body ::-webkit-scrollbar { width : 12 px ; /* width of the entire scrollbar */ } body ::-webkit-scrollbar-track { background : orange ; /* color of the tracking area */ } body ::-webkit-scrollbar-thumb { background-color : blue ; /* color of the scroll thumb */ border-radius : 20 px ; /* roundness of the scroll thumb */ border : 3 px solid orange ; /* creates padding around scroll thumb */ }

Can I Install Portage, Pacman Or Other Package Managers On Ubuntu?

Answer : You don't. A package manager is central to a specific distribution. Gentoo, Arch, Redhat -- they all use different packaging systems. Gentoo's portage packages usually compile from source, Arch uses its own binary package format, Redhat uses RPM as packaging system -- and Debian as well as Ubuntu and Linux Mint use Debian Packages (.deb). Managing your local installation takes place using graphical frontends like Synaptic and Adept, or command-line tools like apt-get, aptitude and dpkg. Though it is possible to install other package managers on Ubuntu (else they wouldn't be in the repositories), this is not to be recommended for the unexperienced user. One should be quite familiar with packages and package managers, how they work, etc. before even thinking about using them alongside. Otherwise it is very likely to end up with a very broken system -- as one package manager is not aware of the others, they would e.g. overwrite each others files/configurations,

Get First Element Css Selector Code Example

Example 1: css first element p :first-child { font-size : 1.5 em ; } Example 2: select first div css #content div :first-child { /*css*/ } Example 3: select first div css #content_id div .class_name :first-child { /*your style*/ }

Can't Find Or Run Spotify After `snap Install Spotify`

Answer : Check your $PATH variable by executing in a Terminal: echo $PATH The output should be very similar to this: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/share/rvm/bin You have to verify if /snap/bin is included in this $PATH , otherwise you have to add it manually, here is how to do it: How do I modify my PATH so that the changes are available in every Terminal session. If this doesn't work, try deleting and installing again the snap, the required commands are: Execute sudo snap list to verify if Spotify is installed. Use sudo snap remove spotify to delete it. Use sudo snap install spotify to re-install it again. After installing it you can run the command which spotify to see if it is recognized now. Hope it helps, good luck! The solution is simple. Log out and log back in again. Same thing happened to me. It was the first time I had installed a snap app, and I expect that the $PATH

Online Linux Compiler C++ Code Example

Example: cpp online compiler Best Site With auto compile : https : //godbolt.org/z/nEo4j7

Convert String Number To Number Javascript Code Example

Example 1: how to convert string to int js let string = "1" ; let num = parseInt ( string ) ; //num will equal 1 as a int Example 2: Javascript string to int var myInt = parseInt ( "10.256" ) ; //10 var myFloat = parseFloat ( "10.256" ) ; //10.256 Example 3: string to number javascript // Method - 1 ### parseInt() ### var text = "42px" ; var integer = parseInt ( text , 10 ) ; // returns 42 // Method - 2 ### parseFloat() ### var text = "3.14someRandomStuff" ; var pointNum = parseFloat ( text ) ; // returns 3.14 // Method - 3 ### Number() ### Number ( "123" ) ; // returns 123 Number ( "12.3" ) ; // returns 12.3 Number ( "3.14someRandomStuff" ) ; // returns NaN Number ( "42px" ) ; // returns NaN Example 4: converst strig in number in js const numberInString = "20" ; console . log ( typeof ( numberInString ) ) // typeof is string this is string in double quote &

Correct MIME Type For Favicon.ico?

Answer : When you're serving an .ico file to be used as a favicon, it doesn't matter. All major browsers recognize both mime types correctly. So you could put: <!-- IE --> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> <!-- other browsers --> <link rel="icon" type="image/x-icon" href="favicon.ico" /> or the same with image/vnd.microsoft.icon , and it will work with all browsers. Note: There is no IANA specification for the MIME-type image/x-icon , so it does appear that it is a little more unofficial than image/vnd.microsoft.icon . The only case in which there is a difference is if you were trying to use an .ico file in an <img> tag (which is pretty unusual). Based on previous testing, some browsers would only display .ico files as images when they were served with the MIME-type image/x-icon . More recent tests show: Chromium, Firefox and Edge are fine with both co