Tutorial by Examples: er

While writing jQuery plugins is simple, we want to enclose our plugins in a local scope. This will avoid namespace conflicts as well as polluting the global namespace, on top of ensuring that jQuery is loaded before our plugin extends it. // Encapsulate our plugins in a local scope (function($) { ...
You can convert tabs to spaces by doing the following: First check that expandtab is switched off :set noexpandtab Then :retab! which replaces spaces of a certain length with tabs If you enable expandtab again :set expandtab then and run the :retab! command then all the tabs becomes spaces...
import WatchConnectivity var watchSession : WCSession? override func awake(withContext context: Any?) { super.awake(withContext: context) // Configure interface objects here. startWatchSession() } func startWatchSession(){ if(WCSession....
Boolean literals are the simplest of the literals in the Java programming language. The two possible boolean values are represented by the literals true and false. These are case-sensitive. For example: boolean flag = true; // using the 'true' literal flag = false; // using the 'fa...
Let's say that you have the following class: public class PersonInfo { public int ID { get; set; } [Display(Name = "First Name")] [Required(ErrorMessage = "Please enter your first name!")] public string FirstName{ get; set; } [Display(Name = "L...
In the file myConfig.groovy is the following content. message = 'Hello World!' aNumber=42 aBoolean=false aList=["apples", "grapes", "oranges"] Then in your main script you create a ConfigSlurper for your myConfig.groovy file which is really just another groovy sc...
For iterating more than two lists simultaneously within list comprehension, one may use zip() as: >>> list_1 = [1, 2, 3 , 4] >>> list_2 = ['a', 'b', 'c', 'd'] >>> list_3 = ['6', '7', '8', '9'] # Two lists >>> [(i, j) for i, j in zip(list_1, list_2)] [(1, '...
Go to https://ftp.mozilla.org/pub/firefox/releases/ Find the list of older versions in the above link. Select the operating system you want to install in. Select the Language you want to install in. An executable will be downloaded. Run the .exe file to install the firef...
Slightly counterintuitively (but also the only sane way to make it work), this: val dyn: Dynamic = ??? dyn.x(y) = z is equivalent to: dyn.selectDynamic("x").update(y, z) while dyn.x(y) is still dyn.applyDynamic("x")(y) It is important to be aware of this, or else...
Result<T, E> is an enum type which has two variants: Ok(T) indicating successful execution with meaningful result of type T, and Err(E) indicating occurrence of an unexpected error during execution, described by a value of type E. enum DateError { InvalidDay, InvalidMonth, } str...
When it comes to dealing with timing issue, it is tempting and easy to put a "quick" browser.sleep(<timeout_in_milliseconds>) and move on. The problem is, it would some day fail. There is no golden/generic rule on what sleep timeout to set and, hence, at some point due to network or...
Using a regular expression, parse a record name that might be hierarchical. The expression looks for the final colon in the name. It returns what follows the colon, or the entire name if none: regexp_substr( {name} , '[^:]*$' )
'<div style="font-size:11pt">' || expression || '</div>'
JavaScript allows us to define getters and setters in the object literal syntax. Here's an example: var date = { year: '2017', month: '02', day: '27', get date() { // Get the date in YYYY-MM-DD format return `${this.year}-${this.month}-${this.day}` }, ...
String literals provide the most convenient way to represent string values in Java source code. A String literal consists of: An opening double-quote (") character. Zero or more other characters that are neither a double-quote or a line-break character. (A backslash (\) character alters t...
var setValue; var obj = {}; Object.defineProperty(obj, "objProperty", { get: function(){ return "a value"; }, set: function(value){ setValue = value; } });
To add user, use following command htpasswd /etc/subversion/passwd user_name Specify user_name with the username you wish to add in above command. It will prompt to provide password for the user. If you are creating very first user, you need to add –c switch in above command, which will create th...
Groups can be defined in /etc/subversion/svn_access_control file. Create/edit the file using following command nano /etc/subversion/svn_access_control Use syntax specified as below to define groups and assign members. [groups] groupname = <list of users, comma separated> e.g. [groups]...
Access specifications for subversion repositories is specified etc/subversion/svn_access_control file Create/edit the file using following command nano /etc/subversion/svn_access_control Use following syntax to configure access permissions for repositories to group/members [Repository:<Path&g...
Requirement for Local development 1) MySQL server(I am Using XAMPP for MySQL server) 2) For Test API You can use Postman(optional) 3) Before run application,make sure MySQL server is running, properly prepare your application.properties file(DB_Name, Username,Password). 1.Add following depen...

Page 336 of 417