Tutorial by Examples: e

This converter will chain multiple converters together. public class ValueConverterGroup : List<IValueConverter>, IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return this.Aggregate(value, (current, converte...
In the root of your project, make sure Bower is installed (npm install -g bower) and run bower init. This will create a bower.json file in your project's directory. Create a new file called .bowerrc to your root directory. It should contain the following: { "directory": "public/b...
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
The Range attribute can decorate any properties or public fields and specifies a range that a numerical field must fall between to be considered valid. [Range(minimumValue, maximumValue)] public int Property { get; set; } Additionally, it accepts an optional ErrorMessage property that can be us...
The [RegularExpression] attribute can decorate any properties or public fields and specifies a regular expression that must be matched for the property be considered valid. [RegularExpression(validationExpression)] public string Property { get; set; } Additionally, it accepts an optional ErrorM...
Meteor reads a mobile-config.js file in the root of your app directory during build, and uses the settings specified there to generate Cordova’s config.xml. Project_folder ├── /.meteor └── mobile-config.js Most configurations can be achieved with mobile-config.js (app metadata, preferences, ...
Meteor uses Cordova to package your application into a hybrid Mobile App. Once packaged, the App can be distributed like native Apps (through Apple App Store, Google Play Store, etc.) Add the target platform(s) to your Meteor project: meteor add-platform android meteor add-platform ios # Only...
The following technique allows you to add your content to an HTML element and center it both horizontally and vertically without worrying about its height or width. The outer container should have display: table; The inner container should have display: table-cell; should have vertical-al...
Read-only properties were always possible in VB.NET in this format: Public Class Foo Private _MyProperty As String = "Bar" Public ReadOnly Property MyProperty As String Get Return _MyProperty End Get End Property End Class The new version of Visual Basi...
Similar to partial classes the new version of Visual Basic is now able to handle partial modules and partial interfaces. The syntax and behaviour is exactly the same as it would be for partial classes. A partial module example: Partial Module Module1 Sub Main() Console.Write("Ping -&g...
Create an input (or button, or anchor) html element and call button() method of jQuery UI. <script> $(function() { $( "#myButton" ).button(); }); </script> HTML <input type="button" value="A button" id="myButton">
The clearfix hack is a popular way to contain floats (N. Gallagher aka @necolas) Not to be confused with the clear property, clearfix is a concept (that is also related to floats, thus the possible confusion). To contain floats, you've to add .cf or .clearfix class on the container (the parent)...
you can use -c <name>=<value> to add a configuration only for one command. To commit as an other user without having to change your settings in .gitconfig : git -c user.email = mail@example commit -m "some message" Note: for that example you don't need to precise both user...
Go to Help → About Eclipse → Check if the m2e feature is there: .
In order to use compression over the wire for a faster transfer, pass the --compress option to mysqldump. Example: mysqldump -h db.example.com -u username -p --compress dbname > dbname.sql Important: If you don't want to lock up the source db, you should also include --lock-tables=false. But ...
gunzip -c dbname.sql.gz | mysql dbname -u username -p Note: -c means write output to stdout.
Available in Git 1.8.2 and above. 1.8 Pre-push hooks can be used to prevent a push from going though. Reasons this is helpful include: blocking accidental manual pushes to specific branches, or blocking pushes if an established check fails (unit tests, syntax). A pre-push hook is created by simpl...
Sometimes it happens that a file was being tracked by git, but in a later point in time was added to .gitignore, in order to stop tracking it. It's a very common scenario to forget to clean up such files before its addition to .gitignore. In this case, the old file will still be hanging around in th...
Some problems can occur if the .git folder has wrong permission. Fixing this problem by setting the owner of the complete .git folder. Sometimes it happen that another user pull and change the rights of the .git folder or files. To fix the problem: chown -R youruser:yourgroup .git/
Normally, to remove files that are staged to be committed using the git reset commit, reset has a lot of functions depending on the arguments provided to it. To completely unstage all files staged, we can make use of git aliases to create a new alias that uses reset but now we do not need to remembe...

Page 553 of 1191