Posts

Showing posts from July, 2009

Anaconda Vs. Miniconda

Answer : Per the original docs: Choose Anaconda if you: Are new to conda or Python Like the convenience of having Python and over 1500 scientific packages automatically installed at once Have the time and disk space (a few minutes and 3 GB), and/or Don’t want to install each of the packages you want to use individually. Choose Miniconda if you: Do not mind installing each of the packages you want to use individually. Do not have time or disk space to install over 1500 packages at once, and/or Just want fast access to Python and the conda commands, and wish to sort out the other programs later. I use Miniconda myself. Anaconda is bloated. Many of the packages are never used and could still be easily installed if and when needed. Note that Conda is the package manager (e.g. conda list displays all installed packages in the environment), whereas Anaconda and Miniconda are distributions. A software distribution is a collection of packages, pre-built and pre-configured,

Delete Folder Github Code Example

Example 1: delete .git folder rm -rf .git Example 2: git remove folder remotely git rm -r --cached <folder> git commit -m "Removed Folder" git push origin master Example 3: remove folders from remote git git rm -r --cached FolderName git commit -m "Removed folder from repository" git push origin master Example 4: delete folder from github repository git rm -r folder-name git commit -m "Remove unwanteed folder" git push Example 5: how to delete a folder in github git rm -r my-folder Example 6: git remove from folder rm -rf .git

Inline Style Background Image React Js Code Example

Example 1: Setting a background Image With React Inline Styles backgroundImage : ` url ( ${Background} ) ` Example 2: how to import background image in inline css in react style= { { backgroundImage : ` url ( ${pencil} ) ` } }

Control Freak: Commit Rejected. Foxtrot Merges Not Allowed In Bitbucket

Image
Answer : That is related to Foxtrot merges, specifcally prohibited on BitBucket: A foxtrot merge is a specific sequence of git commits. A particularly nefarious sequence. Out in the open, in lush open grasslands, the sequence looks like this: But foxtrots are rarely seen in the open. They hide up in the canopy, in-between the branches. I call them foxtrots because, when caught mid-pounce, they look like the foot sequence for the eponymous ballroom dance: Foxtrot merges are bad because they change origin/master’s first-parent history. The parents of a merge commit are ordered. The first parent is HEAD. The second parent is the commit you reference with the git merge command. You can think of it like this: git checkout 1st-parent git merge 2nd-parent If pushed: As explained in "GIT: How can I prevent foxtrot merges in my 'master' branch?", commit ' D ' is a foxtrot merge because ' origin/master ' is its 2nd parent. This is the result of a pull (fetch

Animator Play Unity Animation Backwards Code Example

Example: unity play animation backwards using UnityEngine ; using System . Collections ; public class NewBehaviourScript : MonoBehaviour { Animation anim ; // Use this for initialization void Start ( ) { anim = GetComponent < Animation > ( ) ; anim . Play ( "cubeanimation" ) ; } // Update is called once per frame void Update ( ) { if ( Input . GetKeyDown ( KeyCode . A ) ) { // Reverse animation play anim [ "cubeanimation" ] . speed = - 1 ; anim [ "cubeanimation" ] . time = anim [ "cubeanimation" ] . length ; anim . Play ( "cubeanimation" ) ; } } }

Sass Mixin W3schools Code Example

Example: Sass @mixin and @include @mixin important-text { color : red ; font-size : 25 px ; font-weight : bold ; border : 1 px solid blue ; }

Convert UNIX Timestamp To Date Time (javascript)

Answer : You have to multiply by 1000 as JavaScript counts in milliseconds since epoch (which is 01/01/1970), not seconds : var d = new Date(timestamp*1000); Reference function convertTimestamp(timestamp) { var d = new Date(timestamp * 1000), // Convert the passed timestamp to milliseconds yyyy = d.getFullYear(), mm = ('0' + (d.getMonth() + 1)).slice(-2), // Months are zero based. Add leading 0. dd = ('0' + d.getDate()).slice(-2), // Add leading 0. hh = d.getHours(), h = hh, min = ('0' + d.getMinutes()).slice(-2), // Add leading 0. ampm = 'AM', time; if (hh > 12) { h = hh - 12; ampm = 'PM'; } else if (hh === 12) { h = 12; ampm = 'PM'; } else if (hh == 0) { h = 12; } // ie: 2014-03-24, 3:00 PM time = yyyy + '-' + mm + '-' + dd + ', ' + h + ':' + min + ' &#

Bootstrap Icon Cdn Link Code Example

Example 1: bootstrap icons cdn < link rel = " stylesheet " href = " https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.4.1/bootstrap-icons.svg " > Example 2: bootstrap icons cdn Cannot GET /

Php Générer Date To String Code Example

Example 1: format('Y-m-d H:i:s'); ?> < ? php $date = new DateTime ( '2000-01-01' ) ; echo $date -> format ( 'Y-m-d H:i:s' ) ; ? > Example 2: phph date < ? php // Définit le fuseau horaire par défaut à utiliser. Disponible depuis PHP 5.1 date_default_timezone_set ( 'UTC' ) ; // Affichage de quelque chose comme : Monday echo date ( "l" ) ; // Affichage de quelque chose comme : Monday 8th of August 2005 03:12:46 PM echo date ( 'l jS \of F Y h:i:s A' ) ; // Affiche : July 1, 2000 is on a Saturday echo "July 1, 2000 is on a " . date ( "l" , mktime ( 0 , 0 , 0 , 7 , 1 , 2000 ) ) ; /* utilise les constantes dans le paramètre format */ // Affichage de quelque chose comme : Wed, 25 Sep 2013 15:28:57 -0700 echo date ( DATE_RFC2822 ) ; // Affichage de quelque chose comme : 2000-07-01T00:00:00+00:00 echo date ( DATE_ATOM , mktime ( 0 , 0 , 0 , 7 , 1 , 2000 ) ) ; ? >

Responsive Background Image Css Tricks Code Example

Example 1: CSS make image fill whole background html { background : url ( images/bg.jpg ) no-repeat center center fixed ; -webkit-background-size : cover ; -moz-background-size : cover ; -o-background-size : cover ; background-size : cover ; } Example 2: how to set background automatically with my screen height html { background : url ( image.jpg ) no-repeat center center fixed ; -webkit-background-size : cover ; -moz-background-size : cover ; -o-background-size : cover ; background-size : cover ; } Example 3: background: url("image/banner-image-1.jpg") no-repeat center top; background-size:cover; -moz-backface-visibility : hidden ;

Pow Function In Python Code Example

Example 1: power function python # There are two ways of computing x ^ y in python : >> > 3 * * 4 81 >> > pow ( 3 , 4 ) 81 Example 2: how to power in python 2 * * 3 == 8 Example 3: python pow pow ( x , y ) # == x ^ y Example 4: power in python # The ouptut will be x ^ y x * * y

Acer Swift 5 Amazon Code Example

Example: acer swift 5 /* As long as it's Ryzen 4000, I'll allow it... */

Android Studio SDK Location Not Found. Define Location With An ANDROID_SDK_ROOT Environment Variable Or By Setting The Sdk.dir Path In Your Project's Local Properties File At Code Example

Example: sdk location not found. define location with an android_sdk_root environment variable I know this answer is late, but I hope it helps others. The answer is simple. You have to just copy your local.properties file to the folder where project is stored and it will work like charm. But remember, it must be placed in the root folder where the project is stored.

Bootstrap Loading Spinner Overlay Code Example

Example 1: circlular waiting icon bootstrap < div class = " spinner-border " role = " status " > < span class = " sr-only " > Loading... </ span > </ div > Example 2: bootstrap loader < div class = " spinner-border text-primary " role = " status " > < span class = " sr-only " > Loading... </ span > </ div > < div class = " spinner-border text-secondary " role = " status " > < span class = " sr-only " > Loading... </ span > </ div > < div class = " spinner-border text-success " role = " status " > < span class = " sr-only " > Loading... </ span > </ div > < div class = " spinner-border text-danger " role = " status " > < span class = " sr-only " > Loading... </ span > </ div >

Vs Code Terminal Colors Code Example

Example 1: visual studio code change terminal color "workbench.colorCustomizations" : { "terminal.background" : "#1D2021" , "terminal.foreground" : "#A89984" , "terminalCursor.background" : "#A89984" , "terminalCursor.foreground" : "#A89984" , "terminal.ansiBlack" : "#1D2021" , "terminal.ansiBlue" : "#0D6678" , "terminal.ansiBrightBlack" : "#665C54" , "terminal.ansiBrightBlue" : "#0D6678" , "terminal.ansiBrightCyan" : "#8BA59B" , "terminal.ansiBrightGreen" : "#95C085" , "terminal.ansiBrightMagenta" : "#8F4673" , "terminal.ansiBrightRed" : "#FB543F" , "terminal.ansiBrightWhite" : "#FDF4C1" , "terminal.ansiBrightYell