Tutorial by Examples: c

In VB.NET, every variable must be declared before it is used (If Option Explicit is set to On). There are two ways of declaring variables: Inside a Function or a Sub: Dim w 'Declares a variable named w of type Object (invalid if Option Strict is On) Dim x As String 'Declares a variable named ...
ArrayList is one of the inbuilt data structures in Java. It is a dynamic array (where the size of the data structure not needed to be declared first) for storing elements (Objects). It extends AbstractList class and implements List interface. An ArrayList can contain duplicate elements where it mai...
Test classes are created as local classes in a special unit test include. This is the basic structure of a test class: CLASS lcl_test DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. DATA: mo_cut TYPE REF TO zcl_...
To get more information about any git command – i.e. details about what the command does, available options and other documentation – use the --help option or the help command. For example, to get all available information about the git diff command, use: git diff --help git help diff Similarl...
This example assumes that your lookup column is named MultiLookupColumnName and that you want to set your multi-lookup field to lookup to the items with IDs 1 and 2. Using jQuery AJAX 2010 var listName = "YourListName"; var lookupList = "LookupListName"; var idOfItemToUpdate...
If you want to change the order of a character strings you can use parentheses in the pattern to group parts of the string together. These groups can in the replacement argument be addresed using consecutive numbers. The following example shows how you can reorder a vector of names of the form &quo...
Python 3.x3.2 accumulate yields a cumulative sum (or product) of numbers. >>> import itertools as it >>> import operator >>> list(it.accumulate([1,2,3,4,5])) [1, 3, 6, 10, 15] >>> list(it.accumulate([1,2,3,4,5], func=operator.mul)) [1, 2, 6, 24, 120] ...
Ionic 1.2 officially supports deployment as a website If you're not using any Cordova plugins then there is no problem (if you really wish to) to upload the contents of the www folder to your server, and woila - you'll have the same app. However, it is important to note that Ionic 1 never intended...
Creating a separate instance of the WP_Query object is easy: $query_args = array( 'post_type' => 'post', 'post_per_page' => 10 ); $my_query = new WP_Query($query_args); if( $my_query->have_posts() ): while( $my_query->have_posts...
The thing is; you can't connect Ionic to any database (MySQL, Postgres, MSSQL, ...) directly. The keyword here is directly. No, there's no workaround, no magic involved, it's just not the way this is supposed to work. Ionic works on top of Angular and Angular is a frontend framework. However, the ...
A Cordova application runs as a website on a WebView component within the native mobile platform. Debugging a cordova application can therefore be done by utilizing your favourite browsers development tools. The following steps are needed to hook the application, running on the device, to the Chrome...
This method behaves as a combination of TryParse and ParseExact: It allows custom format(s) to be specified, and returns a Boolean result indicating success or failure rather than throwing an exception if the parse fails. TryParseExact(string, string, IFormatProvider, DateTimeStyles, out DateTime) ...
The Replace function in SQL is used to update the content of a string. The function call is REPLACE( ) for MySQL, Oracle, and SQL Server. The syntax of the Replace function is: REPLACE (str, find, repl) The following example replaces occurrences of South with Southern in Employees table: FirstN...
To break loops, the command EXIT can be used. DO. READ TABLE itab INDEX sy-index INTO DATA(wa). IF sy-subrc <> 0. EXIT. "Stop this loop if no element was found ENDIF. " some code ENDDO. To skip to the next loop step, the command CONTINUE can be u...
You can use method chaining while working with JSONObject and JSONArray. JSONObject example JSONObject obj = new JSONObject();//Initialize an empty JSON object //Before: {} obj.put("name","Nikita").put("age","30").put("isMarried","true&quot...
HTML: <div id="title"> <h1 data-content="HOVER">HOVER</h1> </div> CSS: *{margin:0;padding:0;} html,body{height:100%;width:100%;overflow:hidden;background:#0099CC;} #title{ position:absolute; top:50%; left:50%; transform:translate(-50%,-...
cycle is an infinite iterator. >>> import itertools as it >>> it.cycle('ABCD') A B C D A B C D A B C D ... Therefore, take care to give boundaries when using this to avoid an infinite loop. Example: >>> # Iterate over each element in cycle for a fixed range >&g...
When to use abstract classes: To implement the same or different behaviour among multiple related objects When to use interfaces: to implement a contract by multiple unrelated objects Abstract classes create "is a" relations while interfaces provide "has a" capability. This c...
sudo apt-add-repository ppa:brightbox/ruby-ng Hit Enter to confirm sudo apt-get update Then you can install your ruby version of choice (the ppa supports ruby2.0 ruby2.1 ruby2.2 ruby2.3 and legacy versions ruby1.8 ruby1.9.1) Don't forget to include the respective -dev package for your version. Ot...
With implicit keys: key: value another key: - some - more - values [1, 2, 3]: last value, which has a flow style key With implicit and explicit keys: ? key : value another key: - some - more - values ? [1, 2, 3] : last value, which has a flow style key key, another ...

Page 334 of 826