Tutorial by Examples

Automatic routing for the DRF, can be achieved for the ViewSet classes. Assume that the ViewSet class goes by the name of MyViewSet for this example. To generate the routing of MyViewSet, the SimpleRouter will be utilized. On myapp/urls.py: from rest_framework import routers router = ...
Please note that some terms like JIT and GC are generic enough to apply to many programming language environments and runtimes. CLR: Common Language Runtime IL: Intermediate Language EE: Execution Engine JIT: Just-in-time compiler GC: Garbage Collector OOM: Out of memory STA: Single-threaded ...
--from * Email From: --[no-]to * Email To: --[no-]cc * Email Cc: --[no-]bcc * Email Bcc: --subject * Email "Subject:" --in-reply-to * Email "In-Reply-To:" --[no-]xmailer ...
Suppose you’ve got a lot of commit against a project (here ulogd2, official branch is git-svn) and that you wan to send your patchset to the Mailling list [email protected]. To do so, just open a shell at the root of the git directory and use: git format-patch --stat -p --raw --signoff --subject...
git diff-tree [--stdin] [-m] [-c] [--cc] [-s] [-v] [--pretty] [-t] [-r] [--root] [<common-diff-options>] <tree-ish> [<tree-ish>] [<path>...] OptionExplanation-rdiff recursively--rootinclude the initial commit as diff against /dev/null
OptionExplanation-zoutput diff-raw with lines terminated with NUL.-poutput patch format.-usynonym for -p.--patch-with-rawoutput both a patch and the diff-raw format.--statshow diffstat instead of patch.--numstatshow numeric diffstat instead of patch.--patch-with-statoutput a patch and prepend its di...
Creates a scheduled task that executes immediately, then on start up to run C:\myscript.ps1 as SYSTEM $ScheduledTaskPrincipal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount $ScheduledTaskTrigger1 = New-ScheduledTaskTrigger -AtStartup $ScheduledTaskTrigger2 = New...
Create an HTML file like below. In the script tag, either you can use CDN link or from your local like <script type="text/javascript" src="dojo/dojo/dojo.js" data-dojo-config="async:true"> <!DOCTYPE html> <html> <head> <met...
In the next example, let's use Dojo features and understand what AMD ( Asynchronous Module Definition) means. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Tutorial: Hello Dojo!</title> </head> <body> <h1 ...
Moving Average of last 30 Items sold SELECT value_column1, ( SELECT AVG(value_column1) AS moving_average FROM Table1 T2 WHERE ( SELECT COUNT(*) FROM Table1 T3 WHERE date_column1 BETWEEN T2.date_column1...
REM Truncate table (for testing) SQLCMD -Q "TRUNCATE TABLE TestDatabase.dbo.myNative;" REM Import data bcp TestDatabase.dbo.myNative IN D:\BCP\myNative.bcp -T -n REM Review results SQLCMD -Q "SELECT * FROM TestDatabase.dbo.myNative;"
To make the use of the adapter pattern and the kind of situation when it may be applied more imaginable, a small, simple and very concrete example is given here. There will be no code in here, just UML and a description of the example situation and its problem. Admittedly, the UML content is writte...
Detailed instructions on getting sdl-2 set up or installed.
There are two basic ways that the asset pipeline is used: When running a server in development mode, it automatically pre-processes and prepares your assets on-the-fly. In production mode, you’ll probably use it to pre-process, versionize, and compress and compile your assets. You can do s...
For very first step please make sure your java version is based on Oracle's JDK since the OpenJDP does not support JavaFX yet. So, go to the Oracle Java download page and download JDK suitable for your operating system and computer architecture. If you want to study Oracle's java examples, find th...
Detailed instructions on getting adfs set up or installed.
Note: examples written for PowerShell 5.1 You can create instances of Generic Classes #Nullable System.DateTime [Nullable[datetime]]$nullableDate = Get-Date -Year 2012 $nullableDate $nullableDate.GetType().FullName $nullableDate = $null $nullableDate #Normal System.DateTime [datetime]$aDa...
To develop applications for iOS, you need to have a Mac, an Apple developer account (to publish to the App Store; costs $100 annually), the free XCode application on your Mac, and ideally some iOS devices to test with. Experience with either of the programming languages Swift or Objective-C is necc...
Open PyCharm Select Create New Project Select the desired location to create the project Select the python interpreter Click Create Create a new python file e.g. with File->New...-> Python File Add the following code #!/usr/bin/env python print("Hello World&quo...
For connection, here is a snippet to help you understand: //Allows you to enumerate and communicate with connected USB devices. UsbManager mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE); //Explicitly asking for permission final String ACTION_USB_PERMISSION = "com.android.e...

Page 1334 of 1336