add below dependencies to build.gradle file in dependency section. (this is an unOfficial library for date picker)
compile 'com.wdullaer:materialdatetimepicker:2.3.0'
Now we have to open DatePicker on Button click event.
So create one Button on xml file like below.
<Button
...
To check if a Dictionary has an specifique key, you can call the method ContainsKey(TKey) and provide the key of TKey type. The method returns a bool value when the key exists on the dictionary. For sample:
var dictionary = new Dictionary<string, Customer>()
{
{"F1", new Custom...
A drawable can be tinted a certain color. This is useful for supporting different themes within your application, and reducing the number of drawable resource files.
Using framework APIs on SDK 21+:
Drawable d = context.getDrawable(R.drawable.ic_launcher);
d.setTint(Color.WHITE);
Using android...
Notepad++ provides 2 types of features for auto-completion and suggestions:
Auto-completion that reads the open file and provide suggestion of words and/or functions within the file
Suggestion with the arguments of functions (specific to the language)
To enable it, you need to change a settin...
Parameters hints can be customized by the user as indicated in this link: http://docs.notepad-plus-plus.org/index.php/Auto_Completion#How_to_create_keyword_auto-completion_definition_files
How to create keyword auto-completion definition files
Since version 5.0 Notepad++ has support for so calle...
// Generate stream that references itself in its evaluation
lazy val primes: Stream[Int] =
2 #:: Stream.from(3, 2)
.filter { i => primes.takeWhile(p => p * p <= i).forall(i % _ != 0) }
.takeWhile(_ > 0) // prevent overflowing
// Get list of 10 primes
assert(primes.take(...
ODS (on-disk structure) version is a number representing version of the database low-level data layout structure (ODS). When a new feature is added to Firebird it might or might not require the structure of database pages or system tables (database metadata) to change. If it does, the ODS version mu...
For some use cases, you can use the using syntax to help define a custom scope. For example, you can define the following class to execute code in a specific culture.
public class CultureContext : IDisposable
{
private readonly CultureInfo originalCulture;
public CultureContext(string ...
Copy the package installer unit file to /etc where changes will not be overwritten on an upgrade:
cp /lib/systemd/system/docker.service /etc/systemd/system/docker.service
Update /etc/systemd/system/docker.service with your options on ExecStart:
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0...
In simple terms:
UNION joins 2 result sets while removing duplicates from the result set
UNION ALL joins 2 result sets without attempting to remove duplicates
One mistake many people make is to use a UNION when they do not need to have the duplicates removed. The additional performance cost...
Ionic uses Gulp, so install gulp-babel and gulp-plumber.
npm install --save-dev gulp-babel gulp-plumber
Add babel to gulpfile.js like so:
//...
var babel = require("gulp-babel");
var plumber = require("gulp-plumber");
var paths = {
es6: ['./src/es6/*.js'],
sass: ...
QModelIndex does not actually know about it's parent/child indexes, it only contains a row, a column and a pointer, and it is the models responsibility to use this data to provide information an index's relations. The model therefore needs to do a lot of conversions from the void* stored inside the ...
Sometimes you have to deal with structures defined in terms of C data types from Perl. One such application is the creation of raw network packets, in case you want to do something fancier than what the regular socket API has to offer. This is just what pack() (and unpack() of course) is there for.
...
Raycasting means throwing a ray from the mouse position on the screen to the scene, this is how threejs determines what object you want to click on if you have implemented it. Threejs gets that information using an octree, but still in production you may not want to compute the result at each frame ...
Object picking using Raycasting might be a heavy task for your CPU depending on your setup (for example if you don't have an octree like setup) and number of objects in the scene.
If you don't need the world coordinates under the mouse cursor but only to identify the object under it you can use GPU...
For example, in the sentence:
That cake is extremely nice.
The rules of the English language would make cake a noun, extremely an adverb that modifies the adjective nice, and through this analysis the meaning could be understood.
However, this analysis is dependent on us recognising that the...