Tutorial by Examples

Returns the ‘site_url’ option with the appropriate protocol (https://) <?php echo site_url(); ?> Output http://www.example.com
Detailed instructions on getting elastic-beanstalk set up or installed.
Introduction The following procedure was tested on a test instance in AWS, with Redhat and Solr 6.1.0. You may need to adjust the process to your operating system and environment accordingly. Prerequisites Make sure you use RedHat or a similar (Fedora-based) OS. cat /etc/redhat-release disp...
Before the Julia 0.5, there is no way to use conditions inside the array comprehensions. But, it is no longer true. In Julia 0.5 we can use the conditions inside conditions like the following: julia> [x^2 for x in 0:9 if x > 5] 4-element Array{Int64,1}: 36 49 64 81 Source of the ...
To setup JVM options inside elastic beanstalk, your bundle file must be like this: -bundle.zip |--.ebextensions //do not forget the dot at the beginning of the name |--jvm.config |--java_app.jar And, the jvm.config file must be set like this: option_settings: ...
Maximum Path Sum is an algorithm to find out a path such that sum of element(node) of that path is greater than any other path. For example, let's we have a we a triangle as shown below. 3 7 4 2 4 6 8 5 9 3 In above triangle, find the maximum path which has ma...
public class Node { public int Value; public Node Left, Right; public Node(int item) { Value = item; Left = Right = null; } } class Res { public int Val; } public class MaximumPathSum { Node _root; int FindMaxUtil(Node node, Re...
Using ls() as a filter can sometimes provide produce odd results. If you accidentally forget to pass a filter argument and call ls() with no arguments, you will get a list of every node in the Maya scene: cmds.ls() # [u'time1', u'sequenceManager1', u'hardwareRenderingGlobals', u'renderPartition...
It is common to use a background Thread for doing network operations or long running tasks, and then update the UI with the results when needed. This poses a problem, as only the main thread can update the UI. The solution is to use the runOnUiThread() method, as it allows you to initiate code exe...
Team Foundation Server (commonly abbreviated to TFS) is a Microsoft product that provides source code management (either via Team Foundation Version Control or Git), reporting, requirements management, project management (for both agile software development and waterfall teams), automated builds and...
PS1 is the normal system prompt indicating that bash waits for commands being typed in. It understands some escape sequences and can execute functions or progams. As bash has to position the cursor after the displayes prompt, it needs to know how to calculate the effective length of the prompt strin...
On Mac OSX computers with MacPorts installed, open a terminal window and type: port list | grep scala This will list all the Scala-related packages available. To install one (in this example the 2.11 version of Scala): sudo port install scala2.11 (The 2.11 may change if you want to install a...
Once you have package control installed, it is super easy to install any plugin, theme, color scheme, syntax that you want! plugin: perform an action (compile your less code into css for example) theme: change the entire skin of sublime text (tabs, sidebar, command palette, etc) color scheme: c...
ORMLite is an Object Relational Mapping package that provides simple and lightweight functionality for persisting Java objects to SQL databases while avoiding the complexity and overhead of more standard ORM packages. Speaking for Android, OrmLite is implemented over the out-of-the-box supported da...
To get a shorter version of the Null or Empty check, use an "= Nothing" comparison. Iif(Fields!UserEmail.Value = Nothing, "Null or Empty", "Not Null or Empty") The "= Nothing" will check simultaneously against Null or Empty, giving a more compact expressio...
Public Function TableExists(value as String) as Boolean On Error Resume Next TableExists = Len(CurrentDb.Tabledefs(value).Name & "") > 0 End Function
To download Sublime Text, visit the download section on their website. There are various builds for different operating systems including: OXS Windows Ubuntu (64 & 32 bit) Once Sublime Text has been successfully downloaded, simply open the .dmg file to start the installation process. A...
To customize Sublime Text (including themes, syntax highlighting etc) you must have package control installed. To install package control visit www.packagecontrol.io/installation. Instead of following the above link, you can open the Sublime console to install it. The console is accessed via the c...
tkinter is a GUI toolkit that provides a wrapper around the Tk/Tcl GUI library and is included with Python. The following code creates a new window using tkinter and places some text in the window body. Note: In Python 2, the capitalization may be slightly different, see Remarks section below. ...
Often when using a callback you want access to a specific context. function SomeClass(msg, elem) { this.msg = msg; elem.addEventListener('click', function() { console.log(this.msg); // <= will fail because "this" is undefined }); } var s = new SomeClass("hello&q...

Page 1001 of 1336