Tutorial by Examples

If your Internet connection is provided via a proxy Maven will not be able to download jars from remote repositories - a common problem faced by companies. To solve this, Maven needs to be provided the details and credentials of the proxy by going to {Maven install location} → conf → settings.xml. ...
Renaming a variable or class is usually a tedious task, by searching for all the locations where it is used. This can be significantly speeded up by highlighting the word, pressing Alt+Shift+R and then typing the new word. Eclipse will automatically rename the word in every file where it is called. ...
MARS MIPS simulator is an assembly language editor, assembler, simulator & debugger for the MIPS processor, developed by Pete Sanderson and Kenneth Vollmar at Missouri State University (src). You get the MARS for free here. As for installing the 4.5 version, you might need the suitable Java SD...
Ordered broadcasts are used when you need to specify a priority for broadcast listeners. In this example firstReceiver will receive broadcast always before than a secondReceiver: final int highPriority = 2; final int lowPriority = 1; final String action = "action"; // intent filter ...
Detailed instructions on getting django-views set up or installed.
Scimax is an Emacs starter kit focused on reproducible research, targeted mainly at scientists and engineers. Scimax customizes Org-Mode with features that make cross-referencing, exporting, and coding (in particular Python), simpler. Installation instructions can be found on the landing page of th...
The message you want to serialize and send that you can include into a file test.proto, containing package example; enum FOO { X = 17; }; message Test { required string label = 1; optional int32 type = 2 [default=77]; repeated int64 reps = 3; optional group OptionalGroup = 4 { ...
To understand Dependency Inversion Principle (DIP) we need to clear concept about Inversion Of Control(IOC) and Dependency Injection(DI). So here we discuss all about the terms with Dependency Inversion Principle (DIP). Inversion Of Control(IOC) : The control or logic which is not the part of t...
Introduction SRP can be defined as “a class handles only one responsibility”. This is a very short definition for something influential on to the other principles of S.O.L.I.D. I believe that if we get this right, it will have a positive knock-on effect on the upcoming principles, so let’s get star...
Here we give an example of ISP violation and then refactor that violation. Without talking unnecessary things let's jump into the code. ISP violation : public interface IMessage{ IList<string> ToAddress {get; set;} IList<string> BccAddresses {get; set;} string MessageBody {get; s...
A docstring is a multi-line comment used to document modules, classes, functions and methods. It has to be the first statement of the component it describes. def hello(name): """Greet someone. Print a greeting ("Hello") for the person with the given name. &...
First Select Or Create a database. > use mydb switched to db mydb Using db.createCollection("yourCollectionName") method you can explicitly create Collection. > db.createCollection("newCollection1") { "ok" : 1 } Using show collections command see all col...
All documents from students collection. > db.students.find().pretty(); { "_id" : ObjectId("58f29a694117d1b7af126dca"), "studentNo" : 1, "firstName" : "Prosen", "lastName" : "Ghosh", "age" ...
MongoDB's db.collection.drop() is used to drop a collection from the database. First, check the available collections into your database mydb. > use mydb switched to db mydb > show collections newCollection1 newCollection2 newCollection3 system.indexes Now drop the collection with...
Virtual Environment tool (virtualenv) is used to isolate different projects and their dependencies by creating individual python environments for each of them. It's like installing a package locally (and not globally), similar to npm package installation option. Following is an example to install ...
Ajax calls, request and retrieve data for giving the user a sense of a better interactive user interface experience. This article will show you how to use jQuery and send data through Ajax calls. For this example, we’re going to POST the following JavaScript object to our server. var post = { ...
After installation of hazelcast and adding to Java Build Path, you can write Main.class that starts cluster work public static void main(String[] args){ Config config = new Config(); // creates a new HazelcastInstance (a new node in a cluster) HazelcastInstance instance = Hazelcast.n...
Prerequisite A running MongoDB server, more details on that here. Setting Up a Java Project The MongoDB Java Driver is supplied as a JAR file and can be included in a project just like any other JAR. For example: Maven: add an entry to the <dependencies> section of your pom.xml. &lt...
MongoClient.connect('mongodb://localhost:27017/myNewDB',function (err,db) { if(err) console.log("Unable to connect DB. Error: " + err) else console.log('Connected to DB'); db.close(); }); myNewDB is DB name, if it does not exists in database then it...
In GraphQL the Schema defines the root execution queries and mutations as well as the types for your data. Schema Object Type The Person type has two fields, one is a standard Scalar type and the other represents a relationship to a list of other Person types that are 'friends'. Linking other type...

Page 1221 of 1336