Posts

Showing posts with the label Basic Example

Shortcut To Format Code In Visual Studio On Mac Code Example

Example: visual studio code formatting settings mac shift + option + f ( for macOS )

Microsoft Flight Simulator Wiki Code Example

Example 1: Microsoft Flight Simulator 2020 If you love your pc please don't play this Example 2: Microsoft Flight Simulator. open your pc and add some chicken you've successfully turned your pc into an oven

Tmux Switch Panes Code Example

Example: tmux basic commands Ctrl + b c Create a new window ( with shell ) Ctrl + b w Choose window from a list Ctrl + b 0 Switch to window 0 ( by number ) Ctrl + b , Rename the current window Ctrl + b % Split current pane horizontally into two panes Ctrl + b " Split current pane vertically into two panes Ctrl + b o Go to the next pane Ctrl + b ; Toggle between the current and previous pane Ctrl + b x Close the current pane

Main Function In Python Code Example

Example 1: python main def main ( ) : print ( "Hello World!" ) if __name__ = = "__main__" : main ( ) Example 2: how to define main in python # Defining main function def main ( ) : print ( "hello World" ) # Using the special variable # __name__ if __name__ = = "__main__" : main ( ) Example 3: __name__== __main__ in python # If the python interpreter is running that module ( the source file ) # as the main program , it sets the special __name__ variable to have # a value “__main__”. If this file is being imported from another # module , __name__ will be set to the module’s name . if __name__ = = '__main__' : # do something Example 4: main function python\ print ( "Hello" ) print ( "__name__ value: " , __name__ ) def main ( ) : print ( "python main function" ) if __name__ = = '__main__' : main ( ) Example 5: p...

Curl Basic Auth Header Code Example

Example 1: curl authorization header curl - H "Authorization: token_str" http : / / www.example. com Example 2: curl with basic auth curl - u username : password http : / / curl - u username http : / / Example 3: basic authentication bash $ echo - n user : password | base64

Fetch Api Request Basic Authentication Code Example

Example: how to send basic auth using fetch fetch ( url , { ...options , headers : { 'Authorization' : 'Basic ' + btoa ( `${username} : ${password}` ) } } ) . then ( response = > response.json ( ) ) . then ( json = > console. log ( json ) ) ;

Xenforo Themes Code Example

Example: xolo themeforest #header h1 a { display : block ; width : 300 px ; height : 80 px ; }

Microsoft Flight Simulator Nosteam Code Example

Example 1: Microsoft Flight Simulator. open your pc and add some chicken you've successfully turned your pc into an oven Example 2: microsoft flight simulator Your computer will perish at the hands of this game , I played 4 k I know.

Latex Documentclass Code Example

Example 1: basic latex document \documentclass{article} \ begin {document} Hello World! \ end {document} Example 2: basic latex document \documentclass{article} \title{My first document} \ date { 2013 - 09 - 01 } \author{John Doe} \ begin {document} \maketitle \newpage Hello World! \ end {document}

Microsoft Flight Simulator 2020 Free Download Mac Code Example

Example 1: microsoft flight simulator 2020 Turns your computer into a space heater. Example 2: Microsoft Flight Simulator 2020 If you love your pc please don't play this Example 3: microsoft flight simulator 2020 Good game if you live in Cold climates.

Microsoft Flight Simulator 2020 Startet Nicht Code Example

Example 1: microsoft flight simulator 2020 Turns your computer into a space heater. Example 2: microsoft flight simulator Your computer will perish at the hands of this game , I played 4 k I know.

Consume Rest Api With Basic Authentication Spring Boot Code Example

Example 1: set autorization basic with username and password + resttemplate try { / / request url String url = "https://jsonplaceholder.typicode.com/posts" ; / / create auth credentials String authStr = "username:password" ; String base64Creds = Base64.getEncoder ( ) .encodeToString ( authStr.getBytes ( ) ) ; / / create headers HttpHeaders headers = new HttpHeaders ( ) ; headers.add ( "Authorization" , "Basic " + base64Creds ) ; / / create request HttpEntity request = new HttpEntity ( headers ) ; / / make a request ResponseEntity < String > response = new RestTemplate ( ) .exchange ( url , HttpMethod. GET , request , String .class ) ; / / get JSON response String json = response.getBody ( ) ; } catch ( Exception ex ) { ex.printStackTrace ( ) ; } Example 2: resttemplate authorization basic HttpHeaders createHeaders ( String username , ...

Shortcut Key For Shutdown Lenovo Ideapad 330 Code Example

Example: shortcut to rename the file on lenovo s340 If the default meaning is Volume Up you have to press Fn and then the F2 / Volumne Up key .