Python 3 allows you to define function arguments which can only be assigned by keyword, even without default values. This is done by using star * to consume additional positional parameters without setting the keyword parameters. All arguments after the * are keyword-only (i.e. non-positional) arg...
Sometimes a column should show different content than just the toString value of the cell item. In this case the TableCells created by the cellFactory of the TableColumn is customized to change the layout based on the item.
Important Note: TableView only creates the TableCells that are shown in the...
Metaclass syntax
Python 2.x2.7
class MyClass(object):
__metaclass__ = SomeMetaclass
Python 3.x3.0
class MyClass(metaclass=SomeMetaclass):
pass
Python 2 and 3 compatibility with six
import six
class MyClass(six.with_metaclass(SomeMetaclass)):
pass
<!--- Define collection --->
<cfset attributes = {
"name": "Sales",
"type": "text",
"value": "Connection"
}>
<!---
cfloop tag with attribute collection can be used to
loop through the elements of a struc...
<cfscript>
/*define collection*/
attributes = {
"name": "Sales",
"type": "text",
"value": "Connection"
};
for(attribute in attributes){
/* attribute variable will contain the key name of each key value ...
Each of Laravel's queue drivers are configured from the config/queue.php file. A queue driver is the handler for managing how to run a queued job, identifying whether the jobs succeeded or failed, and trying the job again if configured to do so.
Out of the box, Laravel supports the following queue ...
Placeholders in the query string need to be set by using the set* methods:
String sql = "SELECT * FROM EMP WHERE JOB = ? AND SAL > ?";
//Create statement to make your operations
PreparedStatement statement = connection.prepareStatement(sql);
statement.setString(1, "MANAGER&...
Sometimes it's a good idea to further secure your publishes by requiring a user login. Here is how you achieve this via Meteor.
import { Recipes } from '../imports/api/recipes.js';
import { Meteor } from 'meteor/meteor';
Meteor.publish('recipes', function() {
if(this.userId) {
return Re...
string literals are defined by wrapping the value with double-quotes ":
string s = "hello, this is a string literal";
String literals may contain escape sequences. See String Escape Sequences
Additionally, C# supports verbatim string literals (See Verbatim Strings). These are def...
ulong literals are defined by using the suffix UL, ul, Ul, uL, LU, lu, Lu, or lU, or by using an integral values within the range of ulong:
ulong ul = 5UL;
let rec factorial n = match n with
| 0 | 1 -> 1
| n -> n * (factorial (n - 1))
This function matches on both the values 0 and 1 and maps them to the base case of our recursive definition. Then all other numbers map to the recursive call of this function.
Consider the following C# code
Expression<Func<int, int>> expression = a => a + 1;
Because the C# compiler sees that the lambda expression is assigned to an Expression type rather than a delegate type it generates an expression tree roughly equivalent to this code
ParameterExpres...
document.getElementsByTagName('b')
will retrieve
<b>All</b>
<b>of</b>
<b>the b elements.</b>
If no elements with the given tag name exist, an empty collection will be returned.
This will create a folder with the same name as the project, i.e. /My.Project.Name
$ git tfs clone http://tfs:8080/tfs/DefaultCollection/ $/My.Project.Name
Cloning from a git repository is ten times faster than cloning directly from TFVS and works well in a team environment. At least one team member will have to create the bare git repository by doing the regular git-tfs clone first. Then the new repository can be bootstrapped to work with TFVS.
$ git...
The following assumes you will use kdiff3 for file diffing and although not essential it is a good idea.
C:\> choco install kdiff3
Git can be installed first so you can state any parameters you wish. Here all the Unix tools are also installed and 'NoAutoCrlf' means checkout as is, commit as i...
Push all local commits to the TFVS remote.
$ git tfs rcheckin
Note: this will fail if Check-in Notes are required. These can be bypassed by adding git-tfs-force: rcheckin to the commit message.
Stashing takes the dirty state of your working directory – that is, your modified tracked files and staged changes – and saves it on a stack of unfinished changes that you can reapply at any time.
Stashing only modified files:
Suppose you don't want to stash the staged files and only stash the mod...