reference : NetConnection , NetStream , Video
related topics : Working with Sound
Basic example of playing an external video file (FLV, MP4, F4V). Code will also play M4A audio files.
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
va...
[\+\-]?\d+(\.\d*)?
This will match any signed float, if you don't want signs or are parsing an equation remove [\+\-]? so you have \d+(\.\d+)?
Explanation:
\d+ matches any integer
()? means the contents of the parentheses are optional but always have to appear together
'\.' matches '.', we ...
Recursion is when a method calls itself. Preferably it will do so until a specific condition is met and then it will exit the method normally, returning to the point from which the method was called. If not, a stack overflow exception might occur due to too many recursive calls.
/// <summary>...
int a;
std::cout << a; // Undefined behavior!
This results in undefined behavior, because a is uninitialised.
It is often, incorrectly, claimed that this is because the value is "indeterminate", or "whatever value was in that memory location before". However, it is th...
Predicates that impede or prohibit a declarative reading of Prolog programs are extra-logical. Examples of such predicates are:
!/0
(->)/2 and if-then-else
(\+)/1
These predicates can only be understood procedurally, by taking into account the actual control flow of the interpreter, and a...
Download and extract the OSGi starter kit for your platform from Equinox download page for Neon release.
Start the framework from the rt/plugins folder with the following command (or your platform's rt executable from the rt folder):
rt/plugins$ java -jar org.eclipse.equinox.launcher_1.3.200.v2016...
BEGIN TRANSACTION
INSERT INTO DeletedEmployees(EmployeeID, DateDeleted, User)
(SELECT 123, GetDate(), CURRENT_USER);
DELETE FROM Employees WHERE EmployeeID = 123;
COMMIT TRANSACTION
One of the most elementary DCG nonterminals is ... //0, which can be read as "anything at all":
... --> [] | [_], ... .
It can be used to describe a list Ls that contains the element E via:
phrase(( ..., [E], ... ), Ls)
CREATE FUNCTION FirstWord (@input varchar(1000))
RETURNS varchar(1000)
AS
BEGIN
DECLARE @output varchar(1000)
SET @output = SUBSTRING(@input, 0, CASE CHARINDEX(' ', @input)
WHEN 0 THEN LEN(@input) + 1
ELSE CHARINDEX(' ', @input)
END)
RETURN @output
END
...
Sometimes a term is defined in multiple sections of the manual. By default, man will only display the first page it finds, which can be annoying for programmers because C functions are documented in a later section than commands and system calls. Use the following to display all pages that match a...
You can use the Substring method to get any number of characters from a string at any given location. However, if you only want a single character, you can use the string indexer to get a single character at any given index like you do with an array:
string s = "hello";
char c = s[1]; //...
When you need to pass a collection into a Java method:
import scala.collection.JavaConverters._
val scalaList = List(1, 2, 3)
JavaLibrary.process(scalaList.asJava)
If the Java code returns a Java collection, you can turn it into a Scala collection in a similar manner:
import scala.collectio...
To create minification-safe angular controllers, you will change the controller function parameters.
The second argument in the module.controller function should be passed an array, where the last parameter is the controller function, and every parameter before that is the name of each injected val...
In Elixir, a common practice is to use anonymous functions. Creating an anonymous function is simple:
iex(1)> my_func = fn x -> x * 2 end
#Function<6.52032458/1 in :erl_eval.expr/5>
The general syntax is:
fn args -> output end
For readability, you may put parenthesis around t...
A metatable defines a set of operations which alter the behaviour of a lua object. A metatable is just an ordinary table, which is used in a special way.
local meta = { } -- create a table for use as metatable
-- a metatable can change the behaviour of many things
-- here we modify the 'tostrin...
In C# 5.0 and earlier the developer could only suppress warnings by number. With the introduction of Roslyn Analyzers, C# needs a way to disable warnings issued from specific libraries. With C# 6.0 the pragma directive can suppress warnings by name.
Before:
#pragma warning disable 0501
C# 6.0:
...
Ionic Framework
A Cross-platform mobile application development framework using Angular JS and Front End web technologies.
Official website: http://ionicframework.com/
Documentation: http://ionicframework.com/docs/
Installation and Setup
Installation
Ionic required NPM(Node Package Manager) an...
You can create a new branch and switch to it using
git checkout -b AP-57
After you use git checkout to create a new branch, you will need to set that upstream origin to push to using
git push --set-upstream origin AP-57
After that, you can use git push while you are on that branch.