namespace HelloWorld;
interface
type
App = class
public
class method Main(args: array of String);
end;
implementation
class method App.Main(args: array of String);
begin
Console.WriteLine('Hello World');
end;
end.
Example showing how to create Guis using functions instead of labels.
Gui, Add, Button, gCtrlEvent vButton1, Button 1
Gui, Add, Button, gCtrlEvent vButton2, Button 2
Gui, Add, Button, gGoButton, Go Button
Gui, Add, Edit, vEditField, Example text
Gui, Show,, Functions instead of labels
CtrlEv...
Lambda expressions are similar to anonymous functions in other languages.
Lambda expressions are open formulas which also specify variables which are to be bound. Evaluation (finding the value of a function call) is then achieved by substituting the bound variables in the lambda expression's body, ...
You cam amend the time of a commit using
git commit --amend --date="Thu Jul 28 11:30 2016 -0400"
or even
git commit --amend --date="now"
If you make a commit as the wrong author, you can change it, and then amend
git config user.name "Full Name"
git config user.email "[email protected]"
git commit --amend --reset-author
Function scope is the special scope for labels. This is due to their unusual property. A label is visible through the entire function it is defined and one can jump (using instruction gotolabel) to it from any point in the same function. While not useful, the following example illustrate the point:
...
Android Studio's Live templates can offer quite a few shortcuts for quick logging.
To use Live templates, all you need to do is to start typing the template name, and hit TAB or enter to insert the statement.
Examples:
logi → turns into → android.util.Log.i(TAG, "$METHOD_NAME$: $content$&q...
What's between \Q and \E is treated as normal characters
#!/usr/bin/perl
my $str = "hello.it's.me";
my @test = (
"hello.it's.me",
"hello/it's!me",
);
sub ismatched($) { $_[0] ? "MATCHED!" : "DID NOT MATCH!" }
my @match = (
...
After adding PrimeFaces to your JSF project, you can start using it in your pages using the namespace:
xmlns:p="http://primefaces.org/ui"
or, for PrimeFaces Mobile:
xmlns:p="http://primefaces.org/mobile"
This example should render a spinner:
<html xmlns="http...
It is sometimes required for a process to concurrently write and read the same "data".
The ReadWriteLock interface, and its ReentrantReadWriteLock implementation allows for an access pattern that can be described as follow :
There can be any number of concurrent readers of the data. If...
using System;
using System.Runtime.InteropServices;
namespace ComLibrary
{
[ComVisible(true)]
public interface IMainType
{
int GetInt();
void StartTime();
int StopTime();
}
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.N...
It can be difficult to test functions with poor asymptotic complexity using quickcheck as the random inputs are not usually size bounded. By adding an upper bound on the size of the input we can still test these expensive functions.
import Data.List(permutations)
import Test.QuickCheck
longRunn...
For an instance, if the html source code of an html view or element is wrapped by an iframe like this:
<iframe src="../images/eightball.gif" name="imgboxName" id="imgboxId">
<p>iframes example</p>
<a href="../images/redball.gif" t...
el-get is an open source package management system for GNU Emacs. el-get works with melpa, as well as with many common version control systms. Its documentation includes a simple self-installer for your .emacs:
(unless (require 'el-get nil t)
(url-retrieve
"https://raw.github.com/dim...
Function-like macros are similar to inline functions, these are useful in some cases, such as temporary debug log:
#ifdef DEBUG
# define LOGFILENAME "/tmp/logfile.log"
# define LOG(str) do { \
FILE *fp = fopen(LOGFILENAME, "a"); \
...
This attribute is applied to the class property. You can use ConcurrencyCheck attribute when you want to use existing columns for concurrency check and not a separate timestamp column for concurrency.
using System.ComponentModel.DataAnnotations;
public class Author
{
public int AuthorId { ...