Tutorial by Examples: asp

1 - Create an empty folder, it will contain the files created in the next steps. 2 - Create a file named project.json with the following content (adjust the port number and rootDirectory as appropriate): { "dependencies": { "Microsoft.AspNet.Server.Kestrel": "1.0.0...
All Swing-related operations happen on a dedicated thread (the EDT - Event Dispatch Thread). If this thread gets blocked, the UI becomes non-responsive. Therefore, if you want to delay an operation you cannot use Thread.sleep. Use a javax.swing.Timer instead. For example the following Timer will re...
// autoload.php spl_autoload_register(function ($class) { require_once "$class.php"; }); // Animal.php class Animal { public function eats($food) { echo "Yum, $food!"; } } // Ruminant.php class Ruminant extends Animal { public function eat...
curl -X POST https://api.dropboxapi.com/2/sharing/list_shared_links \ --header "Authorization: Bearer <ACCESS_TOKEN>" \ --header "Content-Type: application/json" \ --data "{\"path\": \"/test.txt\", \"direct_only\": true}&quo...
PM> Install-Package EntityFramework -Version 6.1.2
When ASP.NET handles a request, a thread is assigned from the thread pool and a request context is created. The request context contains information about the current request which can be accessed through the static HttpContext.Current property. The request context for the request is then assigned t...
This returns information about a specific classifier ID you have trained. This includes information about its current status (i.e., if it is ready or not). 'use strict'; let watson = require('watson-developer-cloud'); var visualRecognition = watson.visual_recognition({ version: 'v3', ap...
docker ps --filter name=myapp_1
While the Java Date class has several constructors, you'll notice that most are deprecated. The only acceptable way of creating a Date instance directly is either by using the empty constructor or passing in a long (number of milliseconds since standard base time). Neither are handy unless you're lo...
@interface MyObject : MySuperclass @property (copy) void (^blockProperty)(NSString *string); @end When assigning, since self retains blockProperty, block should not contain a strong reference to self. Those mutual strong references are called a "retain cycle" and will prevent the...
General syntax git push <remotename> <object>:<remotebranchname> Example git push origin master:wip-yourname Will push your master branch to the wip-yourname branch of origin (most of the time, the repository you cloned from). Delete remote branch Deleting the remote br...
models.py : from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import ( AbstractBaseUser, BaseUserManager, PermissionsMixin) from django.utils import timezone from django.utils.translation import ugettext_lazy as _ class UserManage...
A query engine is required in order to execute SPARQL queries over a dataset. Query engines may be embedded in applications, or accessed remotely. Remote access may be through a vendor-specific API, or through the SPARQL protocol if an implementation supports it. This documentation will not cover ho...
git diff myfile.txt Shows the changes between the previous commit of the specified file (myfile.txt) and the locally-modified version that has not yet been staged. This also works for directories: git diff documentation The above shows the changes between the previous commit of all files in ...
The strchr and strrchr functions find a character in a string, that is in a NUL-terminated character array. strchr return a pointer to the first occurrence and strrchr to the last one. #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char toSe...
Delegates can be used as typed function pointers: class FuncAsParameters { public void Run() { DoSomething(ErrorHandler1); DoSomething(ErrorHandler2); } public bool ErrorHandler1(string message) { Console.WriteLine(message); var shouldWeContinue = ... re...
git commit -m 'Fix UI bug' --date 2016-07-01 The --date parameter sets the author date. This date will appear in the standard output of git log, for example. To force the commit date too: GIT_COMMITTER_DATE=2016-07-01 git commit -m 'Fix UI bug' --date 2016-07-01 The date parameter accepts t...
pd.read_excel('path_to_file.xls', sheetname='Sheet1') There are many parsing options for read_excel (similar to the options in read_csv. pd.read_excel('path_to_file.xls', sheetname='Sheet1', header=[0, 1, 2], skiprows=3, index_col=0) # etc.
Output some information about a known remote: origin git remote show origin Print just the remote's URL: git config --get remote.origin.url With 2.7+, it is also possible to do, which is arguably better than the above one that uses the config command. git remote get-url origin
In case your project needs to be based on a specific Symfony version, use the optional second argument of the new command: # use the most recent version in any Symfony branch $ symfony new my_project_name 2.8 $ symfony new my_project_name 3.1 # use a specific Symfony version $ symfony new my_...

Page 1 of 8