Uses C standard format codes.
from datetime import datetime
datetime_for_string = datetime(2016,10,1,0,0)
datetime_string_format = '%b %d %Y, %H:%M:%S'
datetime.strftime(datetime_for_string,datetime_string_format)
# Oct 01 2016, 00:00:00
malloc() often calls underlying operating system functions to obtain pages of memory. But there is nothing special about the function and it can be implemented in straight C by declaring a large static array and allocating from it (there is a slight difficulty in ensuring correct alignment, in pract...
Sometimes we want to use a where query on a a collection of records returned which is not ActiveRecord::Relation.Hence we get the above error as Where clause is know to ActiveRecord and not to Array.
There is a precise solution for this by using Joins.
EXAMPLE:-
Suppose i need to find all user ...
Go through the steps:
Add 'NSAppleMusicUsageDescription' to your Info.plist for the privacy authority.
Make sure your music is available in your iPhone. It will not work in the simulator.
iOS 10.0.1
import UIKit
import AVFoundation
import MediaPlayer
class ViewController: UIViewControll...
There are several packages which can run Processing sketches in the Atom editor. These instructions use the Script package. There are also available packages for syntax highlighting and autocomplete, which are required for Script to identify Processing filetypes.
Install the Script plugin. Either b...
First of all, Merged Cells are there only to improve the look of your sheets.
So it is literally the last thing that you should do, once your sheet and workbook are totally functional!
Where is the data in a Merged Range?
When you merge a Range, you'll only display one block.
The data will be ...
DBCC commands enable user to validate state of database.
ALTER TABLE Table1 WITH NOCHECK ADD CONSTRAINT chkTab1 CHECK (Col1 > 100);
GO
DBCC CHECKCONSTRAINTS(Table1);
--OR
DBCC CHECKCONSTRAINTS ('Table1.chkTable1');
Check constraint is added with nocheck options, so it will not be ...
DBCC commands can show information about database objects.
DBCC PROCCACHE
Displays information in a table format about the procedure cache.
DBCC OUTPUTBUFFER ( session_id [ , request_id ])
Returns the current output buffer in hexadecimal and ASCII format for the specified session_id (and o...
DBCC statements act as Database Console Commands for SQL Server.
To get the syntax information for the specified DBCC command use DBCC HELP (...) statement.
The following example returns all DBCC statements for which Help is available:
DBCC HELP ('?');
The following example returns options f...
Method overloading is the way of using polymorphism inside a class. We can have two or more methods inside the same class, with different input parameters.
Difference of input parameters can be either:
Number of parameters
Type of parameters (Data type)
Order of the parameters
Let's take a ...
For Umbraco 7 the requirements are
IIS 7 or higher
Database, one of the following: SQL CE, SQL Server 2008 or higher or MySQL with support for case insensitive queries)
ASP.NET 4.5 or 4.5.1. Full-Trust
Ability to set file/folder permissions for the user that "owns" the Application P...
The Memory Model is difficult to understand, and difficult to apply. It is useful if you need to reason about the correctness of multi-threaded code, but you do not want to have to do this reasoning for every multi-threaded application that you write.
If you adopt the following principals when wri...
follow these step to creating Custom Framework in Swift-IOS:
Create a new project. In Xcode
Choose iOS/Framework & Library/Cocoa Touch Framework to create a new framework
click next and set the productName
click next and choose directory to create Project there
add code and resources to c...
There are three ways to quote something using a Julia function:
julia> QuoteNode(:x)
:(:x)
julia> Meta.quot(:x)
:(:x)
julia> Expr(:quote, :x)
:(:x)
What does "quoting" mean, and what is it good for? Quoting allows us to protect expressions from being interpreted as sp...
You may want to read a DataFrame from a CSV (Comma separated values) file or maybe even from a TSV or WSV (tabs and whitespace separated files). If your file has the right extension, you can use the readtable function to read in the dataframe:
readtable("dataset.CSV")
But what if your ...
Data sets often contain comments that explain the data format or contain the license and usage terms. You usually want to ignore these lines when you read in the DataFrame.
The readtable function assumes that comment lines begin with the '#' character. However, your file may use comment marks like ...
Method overriding is the way of using polymorphism between classes. if one class is inherited from another, the former (sub class) can override the latter's (super class's) methods, and change the implementation.
this is used where the super class defines the more general implementation of the meth...