Tutorial by Examples: al

Generally, dialog relies on a div within the HTML. Sometimes you may want to create a dialog from scratch, programmatically. Here is an example of a complex modal dialog created dynamically with interactive functions. HTML <div id="users-contain" class="ui-widget"> &lt...
Each of the enum members may be initialized with a value. If a value is not specified for a member, by default it's initialized to 0 (if it's the first member in the member list) or to a value greater by 1 than the value of the preceding member. Module Module1 Enum Size Small ...
C++11 char *str = "hello world"; str[0] = 'H'; "hello world" is a string literal, so modifying it gives undefined behaviour. The initialisation of str in the above example was formally deprecated (scheduled for removal from a future version of the standard) in C++03. A num...
BigInteger is in an immutable object, so you need to assign the results of any mathematical operation, to a new BigInteger instance. Addition: 10 + 10 = 20 BigInteger value1 = new BigInteger("10"); BigInteger value2 = new BigInteger("10"); BigInteger sum = value1.add(value...
Model with ForeignKey We will work with these models : from django.db import models class Book(models.Model): name= models.CharField(max_length=50) author = models.ForeignKey(Author) class Author(models.Model): name = models.CharField(max_length=50) Suppose we often (always) access ...
pip may be used to install BeautifulSoup. To install Version 4 of BeautifulSoup, run the command: pip install beautifulsoup4 Be aware that the package name is beautifulsoup4 instead of beautifulsoup, the latter name stands for old release, see old beautifulsoup
For programmers coming from GCC or Clang to Visual Studio, or programmers more comfortable with the command line in general, you can use the Visual C++ compiler from the command line as well as the IDE. If you desire to compile your code from the command line in Visual Studio, you first need to set...
Alamofire.request("https://httpbin.org/get").validate().responseJSON { response in switch response.result { case .success: print("Validation Successful") case .failure(let error): print(error) } }
Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"]) .validate(statusCode: 200..<300) .validate(contentType: ["application/json"]) .response { response in print(response) }
public string Remove() { string input = "Hello./!"; return Regex.Replace(input, "[^a-zA-Z0-9]", ""); }
Often when programming it is necessary to make some distinction between a variable that has a value and one that does not. For reference types, such as C Pointers, a special value such as null can be used to indicate that the variable has no value. For intrinsic types, such as an integer, it is mo...
Installing OPAM OPAM is a package manager for OCaml. It builds and manages compiler versions and OCaml libraries for you easily. The easiest way to install OPAM on your operating system is to use a package manager for your system. e.g apt-get, yum or homebrew. Mac OSX Installation Instructions U...
Microsoft describes 3 ways of installing WinDbg: as part of the WDK (Windows Driver Kit) as part of the SDK (Software Development Kit) with the installer of the SDK and deselecting everything else but "Debugging Tools for Windows" To get the installer, visit Download the WDK, WinDb...
Sometimes, programmers who are new Java will use primitive types and wrappers interchangeably. This can lead to problems. Consider this example: public class MyRecord { public int a, b; public Integer c, d; } ... MyRecord record = new MyRecord(); record.a = 1; // OK ...
SELECT s.name + '.' + t.NAME AS TableName, SUM(a.used_pages)*8 AS 'TableSizeKB' --a page in SQL Server is 8kb FROM sys.tables t JOIN sys.schemas s on t.schema_id = s.schema_id LEFT JOIN sys.indexes i ON t.OBJECT_ID = i.object_id LEFT JOIN sys.partitions p ON i.object_id = ...
Since JUnit is a Java library, all you have to do to install it is to add a few JAR files into the classpath of your Java project and you're ready to go. You can download these two JAR files manually: junit.jar & hamcrest-core.jar. If you're using Maven, you can simply add in a dependency into...
Caller info attributes can be used to pass down information about the invoker to the invoked method. The declaration looks like this: using System.Runtime.CompilerServices; public void LogException(Exception ex, [CallerMemberName]string callerMemberName = "", ...
Optional Parameters In TypeScript, every parameter is assumed to be required by the function. You can add a ? at the end of a parameter name to set it as optional. For example, the lastName parameter of this function is optional: function buildName(firstName: string, lastName?: string) { // ...
In themes.xml: <style name="AppTheme" parent="Theme.AppCompat"> <!-- Theme attributes here --> </style> In AndroidManifest.xml: <application android:icon="@mipmap/ic_launcher" android:label="@string/app_name" andr...
Have required JavaScript and CSS files included in your index.html. You can do this by either using the CDN files availiable at the following paths: <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.12/css/jquery.dataTables.css"> <scr...

Page 45 of 269