Tutorial by Examples

I have the following list: 1. Alon Cohen 2. Elad Yaron 3. Yaron Amrani 4. Yogev Yaron I want to select the first name of the guys with the Yaron surname. Since I don't care about what number it is I'll just put it as whatever digit it is and a matching dot and space after it from the beginni...
HTML <div id="app"></div> JS document.getElementById('app').innerHTML = '<p>Some text</p>' and now HTML looks like this <div id="app"> <p>Some text</p> </div>
One could easily center a child element using table display property. HTML <div class="wrapper"> <div class="parent"> <div class="child"></div> </div> </div> CSS .wrapper { display: table; vertica...
Cache-Control: public, max-age=31536000 public means the response is the same for all users (it does not contain any personalized information). max-age is in seconds from now. 31536000 = 60 * 60 * 24 * 365. This is recommended for static assets that are never meant to change.
Cache-Control: private, max-age=60 private specifies that the response can be cached only for user who requested the resource, and can't be reused when other users request the same resource. This is appropriate for responses that depend on cookies.
Cache-Control: no-cache The client will behave as if the response was not cached. This is appropriate for resources that can unpredictably change at any time, and which users must always see in the latest version. Responses with no-cache will be slower (high latency) due to need to contact the s...
Cache-control: no-store Instructs clients no to cache the response in any way, and to forget it at soon as possible. This directive was originally designed for sensitive data (today HTTPS should be used instead), but can be used to avoid polluting caches with responses that can't be reused. It...
Expires — specifies date when the resource becomes stale. It relies on servers and clients having accurate clocks and supporting time zones correctly. Cache-control: max-age takes precedence over Expires, and is generally more reliable. post-check and pre-check directives are non-standard I...
DateTime date = new DateTime(2016, 07, 06, 18, 30, 14); // Format: year, month, day hours, minutes, seconds Console.Write(String.Format("{0:dd}",date)); //Format by Culture info String.Format(new System.Globalization.CultureInfo("mn-MN"),"{0:dddd}",date); 6....
Single Pointers Pointer to an int The pointer can point to different integers and the int's can be changed through the pointer. This sample of code assigns b to point to int b then changes b's value to 100. int b; int* p; p = &b; /* OK */ *p = 100; /* OK */ Pointer to a cons...
To send a remote command via SSH (the SSH server needs to be running on the remote host), you can simply write the command after user@machine. ssh [email protected] echo 'Hello World' Hello World It returns back the output to the sender, executed on the remote host.
Many commands and programs in the remote side are screen-based (e.g. mc) or they need to ask password (e.g. sudo), to be able to run these kind of programs you can use option -t. ssh -t [email protected] sudo ls / [sudo] password for alice: bin root dev etc home lib mnt opt proc root run usr ...
Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. It lets you execute arbitrary Python functions via the command line. Install fabric via pip install fabric Create fabfile.py in your root directory...
CREATE [OR REPLACE] PROCEDURE procedure_name [(parameter_name [IN | OUT | IN OUT] type [, ...])] {IS | AS} < declarations > BEGIN < procedure_body > EXCEPTION -- Exception-handling part begins <exception handling goes here > WHEN exception1 THE...
The following simple procedure displays the text "Hello World" in a client that supports dbms_output. CREATE OR REPLACE PROCEDURE helloworld AS BEGIN dbms_output.put_line('Hello World!'); END; / You need to execute this at the SQL prompt to create the procedure in the database,...
set serveroutput on DECLARE message constant varchar2(32767):= 'Hello, World!'; BEGIN dbms_output.put_line(message); END; / Command set serveroutput on is required in SQL*Plus and SQL Developer clients to enable the output of dbms_output. Without the command nothing is displayed. T...
Django handles a request by routing the incoming URL path to a view function. The view function is responsible for returning a response back to the client making the request. Different URLs are usually handled by different view functions. To route the request to a specific view function, Django look...
A simple hello world grammar can be found here: // define a grammar called Hello grammar Hello; r : 'hello' ID; ID : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; To build this .g4 sample you can run the following command from your operating systems terminal/command-line: Java -jar antlr-4.5.3-...
foldMap maps each element of the Foldable structure to a Monoid, and then combines them into a single value. foldMap and foldr can be defined in terms of one another, which means that instances of Foldable need only give a definition for one of them. class Foldable t where foldMap :: Monoid m...
// Twitter markup documentation: // https://dev.twitter.com/cards/markup String[] twitterTags = { "twitter:site", "twitter:site:id", "twitter:creator", "twitter:creator:id", &q...

Page 434 of 1336