static and templates folder in the apps may should also contain a folder with the name of app ex. blog this is a convention used to prevent namespace pollution, so we reference the files like /blog/base.html rather than /base.html which provides more clarity about the file we are referencing and pre...
Use git revert to revert existing commits, especially when those commits have been pushed to a remote repository. It records some new commits to reverse the effect of some earlier commits, which you can push safely without rewriting history.
Don't use git push --force unless you wish to bring down ...
Consider using Extension Methods as Functions which wrap other code, here's a great example that uses both a static method and and extension method to wrap the Try Catch construct. Make your code Bullet Proof...
using System;
using System.Diagnostics;
namespace Samples
{
/// <summary&g...
You can set a timeout limit using the timeout attribute. This can be useful in preventing requests running far longer than they should and impacting on the whole application as a result.
The timeout attribute sets the maximum number of seconds that each action of a query is allowed to execute befor...
To declare methods on a struct (i.e., functions that can be called "on" the struct, or values of that struct type), create an impl block:
impl Foo {
fn fiddle(&self) {
// "self" refers to the value this method is being called on
println!("fiddling...
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
[TimeStamp] attribute can be applied to only one byte array property in a given Entity class. Entity Framework will create a non-nullable timestamp column in the database table for that property. Entity Framework will automatically use this TimeStamp column in concurrency check.
using System.Compon...
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...
This time we are going to declare a class decorator that will add some metadata to a class when we applied to it:
function addMetadata(target: any) {
// Add some metadata
target.__customMetadata = {
someKey: "someValue"
};
// Return target
ret...
We can wrap a class decorator with another function to allow customization:
function addMetadata(metadata: any) {
return function log(target: any) {
// Add metadata
target.__customMetadata = metadata;
// Return target
return target;
...
To determine the latest tested/supported version of Node that can be used with your installed version of Meteor, dump the node version directly from the build tool's bundled node instance.
meteor node -v
// A Visitor is a type that holds methods that a Deserializer can drive
// depending on what is contained in the input data.
//
// In the case of a map we need generic type parameters K and V to be
// able to set the output type correctly, but don't require any state.
// This is an example of a...