Tutorial by Examples

//Check if a value exists in settings already if (IsolatedStorageSettings.ApplicationSettings.Contains("Key")) { //perform logic }
string setting = IsolatedStorageSettings.ApplicationSettings["Key"] as string;
IsolatedStorageSettings.ApplicationSettings.Save();
By default, Jsoup will display only block-level elements with a trailing line break. Inline elements are displayed without a line break. Given a body fragment, with inline elements: <select name="menu"> <option value="foo">foo</option> <option va...
The gridspec package allows more control over the placement of subplots. It makes it much easier to control the margins of the plots and the spacing between the individual subplots. In addition, it allows for different sized axes on the same figure by defining axes which take up multiple grid loca...
This is a simple implementation of Binary Search Tree Insertion using Python. An example is shown below: Following the code snippet each image shows the execution visualization which makes it easier to visualize how this code works. class Node: def __init__(self, val): self.l_chil...
Package TikZ lends itself very well to drawing graphs. This is a small example (requires TikZ 3.0+): \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning,arrows.meta} \begin{document} \begin{tikzpicture}[auto,vertex/.style={draw,circle}] \node[vertex] (a) {A}; ...
TikZ provides syntax similar to DOT which you can use to tighten up your graph drawing code considerably. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{graphs,quotes,arrows.meta} \begin{document} \begin{tikzpicture} \graph[nodes={draw,circle},edges={-{Stealth[]}}] { ...
TikZ implements several algorithms for automatic graph layouts (requires LuaLaTeX). \documentclass{article} \usepackage{tikz} \usetikzlibrary{graphs,graphdrawing,quotes} \usegdlibrary{force} \begin{document} \begin{tikzpicture} \graph[spring layout] { A -> ["1"...
Thorup's algorithm for single source shortest path for undirected graph has the time complexity O(m), lower than Dijkstra. Basic ideas are the following. (Sorry, I didn't try implementing it yet, so I might miss some minor details. And the original paper is paywalled so I tried to reconstruct it fr...
ls shows files and directories in present working directory. (if no arguments are passed.) (It doesn't show hidden files which starts with . by default.) user@ubuntu14:/usr$ ls bin games include lib lib32 local sbin share src To see all files (hidden files/folders also). Use ls -a OR l...
Step 1 :- Allow Google to Crawl to your content.Edit server’s robot.txt file.You can control google crawling for your content by editing this file,you can refer to this link for more details. Step 2 :- Associate your App with your website.Include assetlinks.json You upload it to your web server's ....
For Adding this to project you can find official doc easily but in this example I'm going to highlight some of the key areas to be taken care of. Step 1 :- Add google service dependencies { ... compile 'com.google.android.gms:play-services-appindexing:9.4.0' ... } Step...
The state of an object at a given time is represented by the information that it holds at that point. In an OO language, the state is implemented as member variables. In a properly designed object, the state can be changed only by means of calls to its methods and not by direct manipulation of its ...
Get last segment echo end($this->uri->segment_array()); //it will print others Get before last segment echo $this->uri->segment(count($this->uri->segment_array())-1); //it will print how-can-i-do-this More info: [http://stackoverflow.com/questions/9221164/code-igniter-get-b...
# Copy remote file to local dir scp [email protected]:/remote/path/to/foobar.md /local/dest # Copy local file to remote dir scp foobar.md [email protected]:/remote/dest # Key files can be used (just like ssh) scp -i my_key.pem foobar.md [email protected]:/remote/dest
SELECT MAX(Id) FROM Employees -- Display the value of Id in the last row in Employees table. GO INSERT INTO Employees (FName, LName, PhoneNumber) -- Insert a new row VALUES ('John', 'Smith', '25558696525') GO SELECT @@IDENTITY GO SELECT MAX(Id) FROM Employees -- Display the value of Id...
SKAction: let waitForOneSecond = SKAction.waitForDuration(1) let action = SKAction.runBlock(){action()} let sequence = SKAction.sequence([waitForOneSecond,action]) self.runAction(sequence) NSTimer: NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: #selector(action), userInfo: nil,...
For simple multi-threaded code, using synchronization is acceptable. However, using synchronization does have a liveness impact, and as a codebase becomes more complex, the likelihood goes up that you will end up with Deadlock, Starvation, or Livelock. In cases of more complex concurrency, using A...
After installing Tomcat with apt-get on Ubuntu xx.xx, Tomcat creates and uses these directories: $cd /etc/tomcat6/ ├── Catalina │   └── localhost │   ├── ROOT.xml │   └── solr.xml -> ../../../solr/solr-tomcat.xml ├── catalina.properties ├── context.xml ├── logging.properties ├── ...

Page 826 of 1336