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. ...
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 ...
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 {
...
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.
&...
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 = {
...
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.
<...
ArgumentCaptor will to receive the actual invocation arguments that has been passed to method.
ArgumentCaptor<Foo> captor = ArgumentCaptor.forClass(Foo.class);
verify(mockObj).doSomethind(captor.capture());
Foo invocationArg = captor.getValue();
//do any assertions on invocationArg
For ...
# It creates vendor folder and vendor.json inside it
govendor init
# Add dependencies in vendor.json
govendor fetch <dependency>
# Usage on new repository
# fetch depenencies in vendor.json
govendor sync
Example vendor.json
{
"comment": "",
"ignore&qu...
Using scanf
Scanf scans text read from standard input, storing successive space-separated values into successive arguments as determined by the format. It returns the number of items successfully scanned. If that is less than the number of arguments, err will report why. Newlines in the input mus...
In order to install asyncio:
pip install asyncio
Notice that python asyncio requires Python 3.3 or later.
This module became part of the Python standard library since Python 3.4.
Sometimes you need to create your own Event, one that other plugins can listen to (Vault, among other plugins, does this) and even cancel. Bukkit's Event API allows this to be possible. All you need to do is make a new class, have it extend Event, add the handlers and the attributes your event needs...
# General syntax:
# grep(<pattern>, <character vector>)
mystring <- c('The number 5',
'The number 8',
'1 is the loneliest number',
'Company, 3 is',
'Git SSH tag is [email protected]',
'My personal site is w...