Posts

Showing posts from April, 2000

Center An Image In Latex Code Example

Example 1: figure centering latex \begin{figure} \centering ... (Code for pictures, captions) ... \end{figure} Example 2: center image latex \begin{center} \includegraphics{yourimage} \end{center}

Button Href In Html Code Example

Example 1: href on a button < button onclick = " window.location.href= ' /page2 ' " > Continue </ button > Example 2: html button link < button > < a href = ' https://google.com ' alt = ' Broken Link ' > This is a button </ a > </ button > Example 3: buton html href <!-- if you are on Window : --> < button onclick = " window.location.href= ' page2.html ' " > Button </ button > <!-- if you are on linux or macOS : --> < button onclick = " location.href= ' page2.html ' " > Button </ button > Example 4: add link behind a button in html <! DOCTYPE html > < html > < head > < title > Title of the document </ title > </ head > < body > < form > < input type = " button " onclick = " window.location.href = ' https://www.w3

Change Jenkins Port Number Code Example

Example: how to change the port number in command prompt for jenkins //To change the port in command line we use --httpPort command line option java - jar jenkins . war -- httpPort = 8081

AccessDenied For ListObjectsV2 Operation For S3 Bucket

Answer : I'm not sure the accepted answer is actually acceptable , as it simply allows all operations on the bucket. Also the Sid is misleading... ;-) This AWS article mentions the required permissions for aws s3 sync . This is how a corresponding policy looks like: { "Version": "version_id", "Statement": [ { "Sid": "AllowBucketSync", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::BUCKET-NAME", "arn:aws:s3:::BUCKET-NAME/*" ] } ] } Try to update your bucket policy to: { "Version": "version_id", "Statement": [ { "Sid": "AllowPublicRead", "Effect": "Allow", &qu

Example Cobol Hello World

Example: hello world in cobol $ vim helloworld IDENTIFICATION DIVISION. PROGRAM-ID. HELLO-WORLD. * simple hello world program PROCEDURE DIVISION. DISPLAY 'Hello world!' . STOP RUN.

Certificate Issue: SSL Page Brings Up "you Need To Set A Lock Screen Pin Or Password Before You Can Use Credential Storage" On Android

Answer : This same thing happened to me when I was installing my certificate on my Android Tablet. Yes, you need to set a lock or pin code (but this can be removed after installing the certificate) Just copy the .pfx file in your Android phone On your phone Settings look for Security Under credential storage (this option might vary depending on your Phone settings), there should be an option to install certificates Restart your phone Hope this helps. This isn't the most secure solution - but it got the job done for me. I had to edit the SSL properties through IIS to ignore client certificates. IIS Setting Change It's not an Android/Chrome issue. The problem was from the fact that the server was requesting a certificate from the client. For Apache add/change the following parameter in your conf or in your sites definition: SSLVerifyClient none

Antimalware Service Executable Desativar Code Example

Example: antimalware service executable disable HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindows Defender

Check Null,empty Or Undefined Angularjs

Answer : just use - if(!a) // if a is negative,undefined,null,empty value then... { // do whatever } else { // do whatever } this works because of the == difference from === in javascript, which converts some values to "equal" values in other types to check for equality, as opposed for === which simply checks if the values equal. so basically the == operator know to convert the "", null, undefined to a false value. which is exactly what you need. You can do if($scope.test == null || $scope.test === ""){ // null == undefined } if false , 0 and NaN can also be considered as false values you can just do if($scope.test){ //not any of the above } if($scope.test == null || $scope.test == undefined || $scope.test == "" || $scope.test.lenght == 0){ console.log("test is not defined"); } else{ console.log("test is defined ",$scope.test); }

Are The Legendary Birds Available In ORAS?

Answer : No, they are not available in OR/AS The Gen 3 remake games contain all the (non-mythical) legendaries of all the generations that were not present in X and Y. Since the Gen1 legendary birds (and Mewtwo) make appearances in X/Y, there is no need for them to make yet another appearance in OR/AS.

Std::thread Sleep Code Example

Example: cpp thread sleep // this_thread::sleep_for example # include <iostream> // std::cout, std::endl # include <thread> // std::this_thread::sleep_for # include <chrono> // std::chrono::seconds int main ( ) { std :: cout << "countdown:\n" ; for ( int i = 10 ; i > 0 ; -- i ) { std :: cout << i << std :: endl ; std :: this_thread :: sleep_for ( std :: chrono :: seconds ( 1 ) ) ; } std :: cout << "Lift off!\n" ; return 0 ; }

Wordpress - Changing Title Of A Page Dynamically From Within A Plugin

Answer : A post or page has only one title, the title tag <title> is the document title. The filter wp_title filters the output of wp_title() function, which was used before to output the title of the document. In WordPress 4.1, the title-tag support in themes was introduced and wp_get_document_title() is used instead of wp_title() . So, if your theme supports title-tag , wp_title filter has not effect, but you can use a other filters: pre_get_document_title to set a new title add_filter( 'pre_get_document_title', 'cyb_change_page_title' ); function cyb_change_page_title () { return "Custom title"; } document_title_separator to filter the title separator add_filter('document_title_separator', 'cyb_change_document_title_separator'); function cyb_change_document_title_separator ( $sep ) { return "|"; } documente_title_parts to filter different parts of the title: title, page number, tagline and s

Cascade Kingdom Floating Island Power Moon

Image
Answer : According to Polygon: To get this power moon, you need to travel to Seaside Kingdom. After you beat the boss there, swim and climb up to any of the water spouts. They’ll fling you to where the boss used to be. Swim down from where you land, and you’ll find a painting. That will warp you to an island overlooking Cascade Kingdom. There, you’ll find a flag and a power moon. I've definitely not made it to Seaside Kingdom yet myself, but their screenshots seem like that's definitely the one. I found the painting. The one in the snow kingdom leads to the cascade kingdom. I think the issue lies in the fork in the road when you finish the metro kingdom. You can go to the seaside or the snow kingdom. If you go to seaside first, the painting takes you to cascade and the snow one takes you to the lake kingdom. If you go to the snow kingdom first, it is the opposite. I went to snow first, so that's why it takes me to cascade and the seaside painting takes me to l

Android Studio How To Run Gradle Sync Manually?

Image
Answer : Android studio should have this button in the toolbar marked "Sync project with Gradle Files" EDIT: I don't know when it was changed but it now looks like this: EDIT: This is what it looks like on 3.3.1 OR by going to File -> Sync Project with Gradle Files from the menubar. WARNING : --recompile-scripts command has been deprecated since gradle 's version 5.0. To check your gradle version, run gradle -v . ./gradlew --recompile-scripts it will do a sync without building anything. Alternatively, with command line in your root project ./gradlew build It will sync and build your app, and take longer than just a Gradle sync To see all available gradle task, use ./gradlew tasks In Android Studio 3.3 it is here: According to the answer https://stackoverflow.com/a/49576954/2914140 in Android Studio 3.1 it is here: This command is moved to File > Sync Project with Gradle Files .

CKEditor Image Upload Send It To The Server Code Example

Example: ckeditor with image upload Inside the config.js of ckeditor add the following code CKEDITOR.editorConfig = function( config ) { .............. .............. .............. config.filebrowserUploadMethod = 'form', config.filebrowserUploadUrl = '/api/v1/ckeditor/upload-image', config.image_previewText = CKEDITOR.tools.repeat(' ', 1); .............. .............. .............. }; For more details : https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-filebrowserUploadMethod

Std Fill Code Example

Example: c++ vector fill # include <algorithm> # include <vector> std :: fill ( v . begin ( ) , v . end ( ) , value ) ;

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 +

Are There Alternate Methods To Activate Steam CD Keys?

Answer : I just looked it up. I ended up on this article. Important: Ensure that you are activating your game through the Steam application. The Steam website cannot be used to activate a game. If you have not yet done so, you can download and install the Steam application by clicking on the green "Install Steam Now" button here: http://store.steampowered.com/about/ So no, it's not possible to activate games without using the client. Aside from the client, you can also activate Steam keys through the Steam store website. https://store.steampowered.com/account/registerkey At the time of writing, there's no way to get to this page without the direct link, so I suggest bookmarking it. You can also pre-fill the key like this: https://store.steampowered.com/account/registerkey?key=AAAAA-BBBBB-CCCCC

Angular Sum Array Of Objects Property Code Example

Example 1: javascript sum array of objects arr = [ { x : 1 } , { x : 3 } ] arr . reduce ( ( accumulator , current ) => accumulator + current . x , 0 ) ; Example 2: javascript sum of number in object array run . addEventListener ( "click" , function ( ) { let sum = people . reduce ( function ( a , b ) { // function(previousValue, currentValue) return { age : a . age + b . age , //select age in object array } ; } ) ; console . log ( sum ) ; //output sum of ages } ) ;

Merge Sort Geeks For Geeks Code Example

Example 1: merge sort algo def mergeSort ( arr ) : if len ( arr ) > 1 : mid = len ( arr ) //2 # Finding the mid of the array L = arr [ : mid ] # Dividing the array elements R = arr [ mid : ] # into 2 halves mergeSort ( L ) # Sorting the first half mergeSort ( R ) # Sorting the second half i = j = k = 0 # Copy data to temp arrays L [ ] and R [ ] while i < len ( L ) and j < len ( R ) : if L [ i ] < R [ j ] : arr [ k ] = L [ i ] i += 1 else : arr [ k ] = R [ j ] j += 1 k += 1 # Checking if any element was left while i < len ( L ) : arr [ k ] = L [ i ] i += 1 k += 1 while j < len ( R ) : arr [ k ] = R [ j ]

Codeaccademy Code Example

Example: codecademy Console . WriteLine ( "Why tho main" ) ;

Fafa Facebook Code Example

Example: fa fa-facebook < i class = "fa fa-facebook-square" aria - hidden = "true" > < / i >

Bootstrap Text Size Code Example

Example 1: bootstrap 4 font bold font-weight-bold Example 2: bootstrap text size < p class = " h1 " > h1. Bootstrap heading </ p > < p class = " h2 " > h2. Bootstrap heading </ p > < p class = " h3 " > h3. Bootstrap heading </ p > < p class = " h4 " > h4. Bootstrap heading </ p > < p class = " h5 " > h5. Bootstrap heading </ p > < p class = " h6 " > h6. Bootstrap heading </ p > Example 3: bootstrap blockquote < blockquote class = " blockquote " > < p class = " mb-0 " > Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. </ p > < footer class = " blockquote-footer " > Someone famous in < cite title = " Source Title " > Source Title </ cite > </ footer > </ blockquote > Example 4: bootstrap 4 responsive para

Chrome (windows) Does Not Hide Scrollbar

Answer : maybe you can use something like that? body { margin:0; padding:0; overflow-y: hidden; } body:hover { overflow-y: scroll; } http://jsfiddle.net/4RSbp/165/ Scrollbar is hiding on your Mac because this is a system preference (System Preferences > General > Show scroll bars). And unfortunatelly there is no version of -ms-overflow-style for Firefox or Chrome. For anyone comming here, if you want to hide scrollbars in a cross-browser cross-system way and keeping the scrollability enabled without visual glitching of mouse over rendering; hiding them behind the limits of your container is a good approach. (Beware, this will be long) Let's say you have a scrollable container and you want to hide the vertical scrollbar (even the thin transparent one that moderns systems shows). its ID is #scrollable: <html> [...] <div id="scrollable">Some Y large content</div> [...] </html> To achieve what we want, #scrollable