Tutorial by Examples: c

Working Example: https://jsfiddle.net/Twisty/4f5yh3pa/7/ Cancelling and Reverting a sortable is not strongly documented. The helps show how moving an item from one list to another connected list can be conditionally cancelled. by default, this is not animated by sortable, this example includes an a...
iex(1)> String.contains? "elixir of life", "of" true iex(2)> String.contains? "elixir of life", ["life", "death"] true iex(3)> String.contains? "elixir of life", ["venus", "mercury"] false
To count the occurences of a value in a numpy array. This will work: >>> import numpy as np >>> a=np.array([0,3,4,3,5,4,7]) >>> print np.sum(a==3) 2 The logic is that the boolean statement produces a array where all occurences of the requested values are 1 and all o...
Example of usage scalacheck with scalatest. Below we have four tests: "show pass example" - it passes "show simple example without custom error message " - just failed message without details, && boolean operator is used "show example with error messages on arg...
These are some of useful mouse functions to control the mouse. size() #gave you the size of the screen position() #return current position of mouse moveTo(200,0,duration=1.5) #move the cursor to (200,0) position with 1.5 second delay moveRel() #move the cursor r...
These are some of useful keyboard functions to automate the key pressing. typewrite('') #this will type the string on the screen where current window has focused. typewrite(['a','b','left','left','X','Y']) pyautogui.KEYBOARD_KEYS #get the list of all the keyboard_keys. pyautogui.hotkey('ct...
These function will help you to take the screenshot and also match the image with the part of the screen. .screenshot('c:\\path') #get the screenshot. .locateOnScreen('c:\\path') #search that image on screen and get the coordinates for you. locateCenterOnScreen('c:\\path') #get th...
To use multi-threading in MATLAB one can use the batch command. Note that you must have the Parallel Computing toolbox installed. For a time-consuming script, for example, for ii=1:1e8 A(ii)=sin(ii*2*pi/1e8); end to run it in batch mode one would use the following: job=batch("da&quot...
Note: For brevity, the commands use here-strings (<<<) and ANSI C-quoted strings ($'...'). Both these shell features work in bash, ksh, and zsh. # GNU Sed $ sed ':a;$!{N;ba}; s/\n/\t/g' <<<$'line_1\nline_2\nline_3' line_1 line_2 line_3 # BSD Sed equivalent (multi-line form) ...
Jsoup can be used to manipulate or extract data from a file on local that contains HTML. filePath is path of a file on disk. ENCODING is desired Charset Name e.g. "Windows-31J". It is optional. // load file File inputFile = new File(filePath); // parse file as HTML document ...
Menus act like all standard control items. They have an action which is the function to be called and a target which is the object to send the function to. If the target is set to an object then when a user selects a menu item it the action method will be sent to the target object. If the menu item ...
first add the OkHttp to the gradle build file of the app module compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.squareup.okhttp:okhttp:2.4.0' compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2' Then make a class extending Application import android.app.Application; ...
The var() function allows CSS variables to be accessed. /* set a variable */ :root { --primary-color: blue; } /* access variable */ selector { color: var(--primary-color); } This feature is currently under development. Check caniuse.com for the latest browser support.
The caret-color CSS property specifies the color of the caret, the visible indicator of the insertion point in an element where text and other content is inserted by the user's typing or editing. HTML <input id="example" /> CSS #example { caret-color: red; } Resources: ...
Step 1: Create your GitHub account If you already have a GitHub account, please proceed to Step 2. Otherwise, please follow below: 1.a Go to Github page. 1.b Enter your desired username, your email address and then your desired password. Afterwards, click the Sign up for GitHub button. Step 2:...
Note: For brevity, the commands use here-strings (<<<) and ANSI C-quoted strings ($'...'). Both these shell features work in bash, ksh, and zsh. # GNU Sed $ sed '1 a appended text' <<<'line 1' line 1 appended text # BSD Sed (multi-line form) sed '1 a\ appended text'...
Simply add an attribute to the controller action [Route("product/{productId}/customer")] public IQueryable<Product> GetProductsByCustomer(int productId) { //action code goes here } this will be queried as /product/1/customer and productId=1 will be sent to the controll...
The yarn init command will walk you through the creation of a package.json file to configure some information about your package. This is similar to the npm init command in npm. Create and navigate to a new directory to hold your package, and then run yarn init mkdir my-package && cd my-pa...
Steps for Getting Started: Download Eclipse Create a Java Maven Project with following example package organization src/test/java com.example.pageobjects com.example.steps com.example.runner src/test/resources Add Cucumber Eclipse Plugin : https://github.com/cucumber/cucumber-eclipse/wik...
SELECT ... WHERE dt >= '2017-02-01' AND dt < '2017-02-01' + INTERVAL 1 MONTH Sure, this could be done with BETWEEN and inclusion of 23:59:59. But, the pattern has this benefits: You don't have pre-calculate the end date (which is often an exact length from the start) You...

Page 736 of 826