Tutorial by Examples

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: .
For the common case of having one Flask application all you have to do is to create your Flask application, load the configuration of choice and then create the SQLAlchemy object by passing it the application. Once created, that object then contains all the functions and helpers from both sqlalchem...
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...
To create a patch, there are two steps. Make your changes and commit them. Run git format-patch <commit-reference> to convert all commits since the commit <commit-reference> (not including it) into patch files. For example, if patches should be generated from the latest two commit...
We can use git apply some.patch to have the changes from the .patch file applied to your current working directory. They will be unstaged and need to be committed. To apply a patch as a commit (with its commit message), use git am some.patch To apply all patch files to the tree: git am *.patch...
To list local branches that contain a specific commit or tag git branch --contains <commit> To list local and remote branches that contain a specific commit or tag git branch -a --contains <commit>
impl<K, V> Serialize for MyMap<K, V> where K: Serialize, V: Serialize { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer { let mut state = serializer.serialize_map(Some(self.len()))?; ...
// 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...

Page 625 of 1336