Tutorial by Examples: f

The sequence for an error is usually: error is triggered by looking up the error name in errordict and executing this procedure. the errordict procedure calls signalerror, passing it the error name. signalerror takes snapshots of the stacks, saving the snapshots in $error, and then calls stop. ...
The documentation for docker events provides details, but when debugging it may be useful to launch a container and be notified immediately of any related event: docker run... & docker events --filter 'container=$(docker ps -lq)' In docker ps -lq, the l stands for last, and the q for quiet. Th...
TextFile is the default file format, unless the configuration parameter hive.default.fileformat has a different setting. We can create a table on hive using the field names in our delimited text file. Lets say for example, our csv file contains three fields (id, name, salary) and we want to create ...
Hash function h() is an arbitrary function which mapped data x ∈ X of arbitrary size to value y ∈ Y of fixed size: y = h(x). Good hash functions have follows restrictions: hash functions behave likes uniform distribution hash functions is deterministic. h(x) should always return the same v...
The replica set is a group of mongod instances that maintain the same data set. This example shows how to configure a replica set with three instances on the same server. Creating data folders mkdir /srv/mongodb/data/rs0-0 mkdir /srv/mongodb/data/rs0-1 mkdir /srv/mongodb/data/rs0-2 Starting ...
We add three records to our collection test as: > db.test.insert({"key":"value1","key2":"Val2","key3":"val3"}) WriteResult({ "nInserted" : 1 }) > db.test.insert({"key":"value2","key2":"V...
Loading custom fonts can be lead to a bad performance. I highly recommend to use this little helper which saves/loads your already used fonts into a Hashtable. public class TypefaceUtils { private static final Hashtable<String, Typeface> sTypeFaces = new Hashtable<>(); /** * Get...
Usually the case when one wants to change a field type to another, for instance the original collection may have "numerical" or "date" fields saved as strings: { "name": "Alice", "salary": "57871", "dob": "198...
After you got the Location object from FusedAPI, you can easily acquire Address information from that object. private Address getCountryInfo(Location location) { Address address = null; Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault()); String errorMessage; Li...
If you do deployments, configure your applications on multiple servers and required to login to your servers and make some changes in infrastructure, applications, pre-requisits etc. then puppet can definitely help you. Except all this if you handle a big infrastructure and want a centralized manag...
Before you decide to work on puppet there are few things that you need to know. puppet work in both client-server architecture (widely used) as well single machine (specially for testing purpose) puppet master can only be configured on a linux machine (master machine/node), windows can b...
Puppet provide official documention for both open-source and enterprise versions. you can find it here
# This is an example of a .profile or .bash_profile for Linux and Mac systems export GOPATH=/home/user/go export PATH=$PATH:/usr/local/go/bin
Android Studio -> Preferences -> Gradle -> Tick Offline work and then restart your Android studio. Reference screenshot:
// Mixin to generate hidden classes @mixin generate-hidden-classes { @each $bp in map-keys($grid-breakpoints) { .hidden-#{$bp} { @include media-breakpoint-only($bp) { display: none !important; } } } } // Call to the mixin @include generate-hidden-classes(...
Just add this function to your functions.php. It will remove the version from all enqueued js and css files. function remove_cssjs_ver( $src ) { if( strpos( $src, '?ver=' ) ) $src = remove_query_arg( 'ver', $src ); return $src; } add_filter( 'style_loader_src', 'remove_cssjs_ver', 9...
Initial Creation and Download (CakePHP 3.x) The easiest way to create a new CakePHP project is via Composer (if you don't know about composer look here for more info) Install Composer If you need to install it and are on a windows machine follow this guide If you are on Linux/Unix/OSX follow thi...
@Configuration // @Lazy - For all Beans to load lazily public class AppConf { @Bean @Lazy public Demo demo() { return new Demo(); } }
@Component @Lazy public class Demo { .... .... } @Component public class B { @Autowired @Lazy // If this is not here, Demo will still get eagerly instantiated to satisfy this request. private Demo demo; ....... }
Mongoose contains some built in functions that build on the standard find(). doc.find({'some.value':5},function(err,docs){ //returns array docs }); doc.findOne({'some.value':5},function(err,doc){ //returns document doc }); doc.findById(obj._id,function(err,doc){ //returns doc...

Page 288 of 457