Tutorial by Examples: o

Bootstrap components are a collection of optional jQuery plugins which bundled with Bootstrap. The purpose of Bootstrap components is to provide extended features and capabilities which would be difficult (or impossible) to accomplish without the use of Javascript. Some components provide are pure...
This command, given a commit range commit1..commit2, rewrites history so that git commit author becomes also git committer: git filter-branch -f --commit-filter \ 'export GIT_COMMITTER_NAME=\"$GIT_AUTHOR_NAME\"; export GIT_COMMITTER_EMAIL=\"$GIT_AUTHOR_EMAIL\"; exp...
To list all the git repository locations on your you can run the following find $HOME -type d -name ".git" Assuming you have locate, this should be much faster: locate .git |grep git$ If you have gnu locate or mlocate, this will select only the git dirs: locate -ber \\.git$
To comment on the same line as the code you can use &:: or &rem. You can also use && or || to replace &. Example : @echo off echo This is a test &::This is a comment echo This is another test &rem This is another comment pause A curiosity: SET command allows limit...
var Vehicle = Backbone.Model.extend({ description: function () { return 'I have ' + this.get('wheels') + ' wheels'; } }); var Bicycle = Vehicle.extend({ defaults: { wheels: 2 } }); var Car = Vehicle.extend({ defaults: { wheels: 4 } })...
the easiest way is to have the local branch checked out: git checkout old_branch then rename the local branch, delete the old remote and set the new renamed branch as upstream: git branch -m new_branch git push origin :old_branch git push --set-upstream origin new_branch
Note: The shown CMake error messages already include the fix for "non-standard" library/tool installation paths. The following examples just demonstrate more verbose CMake find_package() outputs. CMake internally supported Package/Module If the following code (replace the FindBoost modul...
In order to build an IPA file in XCode, you require to sign your application with a certificate and provisioning profile. These can be created at https://developer.apple.com/account/ios/profile/create Provisioning Profile Types Provisioning Profiles are split into two types, Development, and Distr...
vagrant reload --provision
DateUtils.formatDateTime() allows you to supply a time, and based on the flags you provide, it creates a localized datetime string. The flags allow you to specify whether to include specific elements (like the weekday). Date date = new Date(); String localizedDate = DateUtils.formatDateTime(contex...
Format a date: Date date = new Date(); DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); String localizedDate = df.format(date) Format a date and time. Date is in short format, time is in long format: Date date = new Date(); DateFormat df = DateFormat.getDateTimeInstance(DateFor...
Date date = new Date(); df = new SimpleDateFormat("HH:mm", Locale.US); String localizedDate = df.format(date) Commonly used patterns: HH: hour (0-23) hh: hour (1-12) a: AM/PM marker mm: minute (0-59) ss: second dd: day in month (1-31) MM: month yyyy: year
Based on this blog post. Assume you have a method like this: def get[T]: Option[T] = ??? When you try to call it without specifying the generic parameter, Nothing gets inferred, which is not very useful for an actual implementation (and its result is not useful). With the following solution t...
Grunt is a JavaScript Task Runner, used for automation of repetitive tasks like minification, compilation, unit testing, linting, etc. In order to get started, you'll want to install Grunt's command line interface (CLI) globally. npm install -g grunt-cli Preparing a new Grunt project: A typica...
Guice is the default dependency injection (further DI) framework of Play. Other frameworks may be used as well, but using Guice makes development efforts easier, since Play takes care for things under the veil. Injection of Play API-s Starting from Play 2.5 several API-s, which were static in the ...
Thread Pools are used mostly calling methods in ExecutorService. The following methods can be used to submit work for execution: MethodDescriptionsubmitExecutes a the submitted work and return a future which can be used to get the resultexecuteExecute the task sometime in the future without gettin...
Premise These instruction shows a procedure to install native OCaml binaries in Windows. If your operative system is Windows 10 (Insider Preview) build 14316 or later you can also install OCaml through Bash on Ubuntu on Windows. In this case, follow the instruction to install OCaml on Ubuntu. Inst...
CountDownTimer is useful for repeatedly performing an action in a steady interval for a set duration. In this example, we will update a text view every second for 30 seconds telling how much time is remaining. Then when the timer finishes, we will set the TextView to say "Done." TextView ...
In this example, we will pause/resume the CountDownTimer based off of the Activity lifecycle. private static final long TIMER_DURATION = 60000L; private static final long TIMER_INTERVAL = 1000L; private CountDownTimer mCountDownTimer; private TextView textView; private long mTimeRemaining; ...
FlowRouter is more modular compared to Iron Router. Install FlowRouter meteor add kadira:flow-router Rendering a template In particular, you must manually add a layout rendering package to link with your rendering engine: Blaze Layout for Blaze: meteor add kadira:blaze-layout React Layout ...

Page 641 of 1038