Posts

Showing posts from September, 2014

Cookies Clicker Cheat Code Example

Example 1: cookie clicker #Hacks: # Type these in your console which you can open by # pressing STRG + SHIFT + J (Chrome) or STRG + SHIFT + K (Firefox) # changes the amount of cookies Game.cookies = amount in int # unlimted cookies Game.cookies = Infinity # If you want to get out of Infinity cookies Game.cookiesd = 0 # set up the CookiesPerSecond Rate by the number you want Game.cookiesPS= amount in int # clicks on cookie forever without moving your mouse in the highest speed var autoclicker = setInterval(function() { Game.ClickCookie(); }, 10); # stoping autoclicker clearInterval(autoClicker) # clicks on golden cookie without moving your mouse setInterval(Game.goldenCookie.click, 500) # Get the achievement you want by changing it to the achievement name you want # Game.Win(‚ACHIEVEMENT‘) Example 2: cookie clicker edit : getting out of infinity cookies doesnt work lol

Nether Fortress Bastion Spawn Code Example

Example 1: types of bastions minecraft lol no i'm a speedrunner Example 2: types of bastion minecraft hey , are you into modding or something ?

Add "Appendix" Before "A" For Appendix A In Thesis TOC

Answer : Add the following to your preamble: \usepackage[titletoc]{appendix} \makeatletter \renewcommand\backmatter{ \def\chaptermark##1{\markboth{% \ifnum \c@secnumdepth > \m@ne \@chapapp\ \thechapter: \fi ##1}{% \ifnum \c@secnumdepth > \m@ne \@chapapp\ \thechapter: \fi ##1}}% \def\sectionmark##1{\relax}} \makeatother The appendix package adds some extra functionality for dealing with appendices. This extra functionality (including the one you need) is accessed by using the \appendices environment instead of the \appendix command. So changing your thesis class \backmatter command to remove the \appendix command, along the with [titletoc] option of the package (which appends the appendix name to the letter in the TOC) should solve your problem. Now in your actual thesis tex file you should do the following: \backmatter \begin{appendices} \chapter{An appendix} ... \end{appendices} \bibliography{}

Html Code Element Code Example

Example 1: what is the code element in html The HTML < code > element displays its contents styled in a fashion intended to indicate that the text is a short fragment of computer code . By default , the content text is displayed using the user agent ' s default monospace font Example 2: html tag The < code > tag is used to define a piece of computer code . The content inside is displayed in the browser ' s default monospace font . Example 3: what is element in html HTML Elements are what make up HTML in general < p > is an element

Add Row To Numpy Array Code Example

Example 1: append row to array python import numpy as np newrow = [1,2,3] A = np.vstack([A, newrow]) Example 2: how append row in numpy import numpy as np arr = np.empty((0,3), int) print("Empty array:") print(arr) arr = np.append(arr, np.array([[10,20,30]]), axis=0) arr = np.append(arr, np.array([[40,50,60]]), axis=0) print("After adding two new arrays:") print(arr) Example 3: np append row A= [[1, 2, 3], [4, 5, 6]] np.append(A, [[7, 8, 9]], axis=0) >> array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) #or np.r_[A,[[7,8,9]]] Example 4: python append row to 2d array new_row.append([])

Fixed Navbar Bootstrap 4 Code Example

Example 1: navbar fixed top bootstrap 5 <!-- on Bootstrap v5.0 simply add fixed-top class to nav.navbar --> <nav class= "navbar fixed-top navbar-light bg-light" > <div class= "container-fluid" > <a class= "navbar-brand" href= "#" >Fixed top</a> </div> </nav> Example 2: bootstrap navbar fixed top <section id= "headnev" class= "navbar navbar-fixed-top" > Example 3: bootstrap fixed navbar <nav class= "navbar navbar-default" > <div class= "container-fluid" > <!-- Brand and toggle get grouped for better mobile display --> <div class= "navbar-header" > <button type= "button" class= "navbar-toggle collapsed" data-toggle= "collapse" data-target= "#bs-example-navbar-collapse-1" aria-expanded= "false" > <span class= "sr-only" &g

Android Button With Rounded Corners, Ripple Effect And No Shadow

Answer : I finally solved it with below code. This achieve rounded corners for button. Also, for Android Version >= V21, it uses ripple effect. For earlier Android version, button color changes when it is clicked, based on android:state_pressed, android:state_focused , etc. In layout xml file: <Button style="?android:attr/borderlessButtonStyle" android:id="@+id/buy_button" android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:gravity="center" android:background="@drawable/green_trading_button_effect" android:textColor="@android:color/white" android:text="BUY" /> For button onclick ripple effect (Android >= v21) : drawable-v21/green_trading_button_effect.xml <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android

Can I Use Conditional Statements With EJS Templates (in JMVC)?

Answer : For others that stumble on this, you can also use ejs params/props in conditional statements: recipes.js File: app.get("/recipes", function(req, res) { res.render("recipes.ejs", { recipes: recipes }); }); recipes.ejs File: <%if (recipes.length > 0) { %> // Do something with more than 1 recipe <% } %> Conditionals work if they're structured correctly, I ran into this issue and figured it out. For conditionals, the tag before else has to be paired with the end tag of the previous if otherwise the statements will evaluate separately and produce an error. ERROR! <% if(true){ %> <h1>foo</h1> <% } %> <% else{ %> <h1>bar</h1> <% } %> Correct <% if(true){ %> <h1>foo</h1> <% } else{ %> <h1>bar</h1> <% } %> hope this helped. Yes , You can use conditional statement with EJS like if else , ternary operat

Latex Noindent Code Example

Example 1: latex noindent \setlength\parindent { 0 pt } Example 2: latex noindent for whole document % In preamble : \setlength\parindent { 0 pt }

Convert Seconds To Milliseconds Javascript Code Example

Example 1: convert milliseconds to minutes and seconds javascript const millisToMinutesAndSeconds = ( millis ) => { var minutes = Math . floor ( millis / 60000 ) ; var seconds = ( ( millis % 60000 ) / 1000 ) . toFixed ( 0 ) ; //ES6 interpolated literals/template literals //If seconds is less than 10 put a zero in front. return `$ { minutes } : $ { ( seconds < 10 ? "0" : "" ) } $ { seconds } ` ; } Example 2: convert milliseconds to seconds JS function millisToMinutesAndSeconds ( millis ) { var minutes = Math . floor ( millis / 60000 ) ; var seconds = ( ( millis % 60000 ) / 1000 ) . toFixed ( 0 ) ; return minutes + ":" + ( seconds < 10 ? '0' : '' ) + seconds ; } millisToMinutesAndSeconds ( 298999 ) ; // "4:59" millisToMinutesAndSeconds ( 60999 ) ; // "1:01" Example 3: what 1hr in milliseconds in javascript /* ** Time in milliseconds 1 second = 10

Cryptographically Secure Number Generator For Node.js

Answer : You are correct that Math.random() is not secure. If you want a CSPRNG in Node.js, crypto.randomBytes() is what you're looking for. There are a few libs available, but I need to be certain whether they are really true random. Any one who considers arithmetical methods of producing random digits is, of course, in a state of sin. Basically, no library can generate any "really true random"s. Lately some processors include support for hardware RNGs, which allows (hopefully) "really true random"s to be generated. That being said, there are -very- few applications for which a CSPRNG will not suffice. In fact, CSPRNGs offer such good quality randomness that I can't think of any.

An Infinite Limit?

Answer : In your very first step, you cannot break a limit into the subtraction of two limits unless both of the other limits exist. The theorem: lim ⁡ x → a ( f ( x ) + g ( x ) ) = lim ⁡ x → a f ( x ) + lim ⁡ x → a g ( x ) \lim _{x\to a} (f(x)+g(x))=\lim _{x\to a}f(x) +\lim _{x\to a}g(x) lim x → a ​ ( f ( x ) + g ( x )) = lim x → a ​ f ( x ) + lim x → a ​ g ( x ) is ONLY valid if the two limits on the right hand side exist. In your case, the second limit clearly does not exist, because it goes to infinity. Edit for clarity, neither does the first limit. So in effect, what you tried to do was make this an ∞ − ∞ \infty - \infty ∞ − ∞ , which doesn't work as seperate limits, but does work together (sometimes)

Fa-fa Icon Cdn Code Example

Example 1: font awesome icons cdn To load all styles : <link rel= "stylesheet" href= "https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity= "sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin= "anonymous" /> Example 2: font awesome cdn latest //Latest version <script src= "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/js/all.min.js" integrity= "sha512-YSdqvJoZr83hj76AIVdOcvLWYMWzy6sJyIMic2aQz5kh2bPTd9dzY3NtdeEAzPp/PhgZqr4aJObB3ym/vsItMg==" crossorigin= "anonymous" ></script>

Emax Ide Code Example

Example: emacs $ brew cask install emacs

Convert A .dat File To Csv Code Example

Example: python convert dat file to csv import csv with open ( "infile.dat" ) as infile , open ( "outfile.csv" , "w" ) as outfile : csv_writer = csv . writer ( outfile ) prev = '' csv_writer . writerow ( [ 'ID' , 'PARENT_ID' ] ) for line in infile . read ( ) . splitlines ( ) : csv_writer . writerow ( [ line , prev ] ) prev = line

Css Table Styling Code Example

Example 1: table border css table, th, td { border: 1px solid black; } Example 2: table css tr , th , td { border: 1px solid black; padding: 5%; text-align: center; }

Font Weight Medium Css Code Example

Example 1: font-weight css /* Valeurs avec un mot-clé */ font-weight : normal ; font-weight : bold ; /* Valeurs relatives à l'élément parent */ font-weight : lighter ; font-weight : bolder ; /* Valeurs numériques */ font-weight : 1 ; font-weight : 100 ; font-weight : 100.6 ; font-weight : 123 ; font-weight : 200 ; font-weight : 300 ; font-weight : 321 ; font-weight : 400 ; font-weight : 500 ; font-weight : 600 ; font-weight : 700 ; font-weight : 800 ; font-weight : 900 ; font-weight : 1000 ; /* Valeurs globales */ font-weight : inherit ; font-weight : initial ; font-weight : unset ; Example 2: font weight css /* Keyword values */ font-weight : normal ; font-weight : bold ; /* Keyword values relative to the parent */ font-weight : lighter ; font-weight : bolder ; /* Numeric keyword values */ font-weight : 100 ; font-weight : 200 ; font-weight : 300 ; font-weight : 400 ; // normal font-weight : 500 ; font-weight : 600 ; font-weight : 700 ; // bold

Border After Each Row In CSS Grid

Answer : Instead of justify-content to center content you could add additional columns before and after your content, both with 1fr . Then position the first div and the div after .line to the start at the second column. Fiddle * { box-sizing: border-box; } .outer { width: 80%; margin: 0 auto; } .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: 1fr repeat(3, auto) 1fr; } .wrapper>div:not(.line) { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper > div:first-of-type, .line + div { grid-column: 2; } .line { grid-column: 1 / -1; height: 1px; background: black; } <div class="outer"> <div class="wrapper"> <div>1111111</div> <div>222</div> <div>3333333333</div> <div class="line"></div>

How To Change Length Of Border Css Code Example

Example 1: css border length .page-title :after { content : "" ; /* This is necessary for the pseudo element to work. */ display : block ; /* This will put the pseudo element on its own line. */ margin : 0 auto ; /* This will center the border. */ width : 50 % ; /* Change this to whatever width you want. */ padding-top : 20 px ; /* This creates some space between the element and the border. */ border-bottom : 1 px solid black ; /* This creates the border. Replace black with whatever color you want. */ } Example 2: how to set border length in css without div div { width : 200 px ; height : 50 px ; position : relative ; z-index : 1 ; background : #eee ; } div :before { content : "" ; position : absolute ; left : 0 ; bottom : 0 ; height : 1 px ; width : 50 % ; /* or 100px */ border-bottom : 1 px solid magenta ; }

Create Folder Linux Command Code Example

Example 1: linux create folder mkdir [folder_name] Example 2: create directory linux mkdir /tmp/newdir Example 3: linux create directory $sudo mkdir -m777 newFileName 777 is the permissions given to the file For more info:( https://www.pluralsight.com/blog/it-ops/linux-file-permissions ) Example 4: make directory in linux mkdir [option] dir_name Example 5: linux create directory mkdir ./folderName Example 6: linux terminal create folder mkdir mydirectory