Here's the procedure:
1) Set your local project as a git repository
git init
2) Stage your files:
git add *
3) Create a new repository from you hosting service website (GitHub, BitBucket etc.)
4) Copy the Git URL from the repository you just created
5) Associate the URL to the name "origin":
git remote add origin https://[email protected]/myproject/mygit.git
6) Commit your code:
git commit -m "Initial commit"
7) Push your code:
git push -u origin master
They are all authentication and/or authorization protocols for decentralized services. They solve the problem of accessing different servers with the same login.
SAML is a enterprise single-sign-on (SSO) authentication and authorization protocol. This means that the user logs once and accesses multiple servers. Well known implementations are OneLogin, Centrify or OpenSAML.
Kerberos is a LAN enterprise single-sign-on authentication and authorization protocol. Essentially it is like SAML, but not for internet.
Both are interfaces used to close resources. Closeable was introduced with JDK5 and now it looks as follows:
public interface Closeable extends AutoCloseable { public void close() throws IOException; }
AutoCloseable was introduced with JDK7 and looks as follows:
public interface AutoCloseable { void close() throws Exception; }
It's a design pattern that handles and encapsulates the interaction among objects. It reduces coupling, centralizes control and makes objects more reusable. It's particularly handy when there is a large number of classes interacting.
Here's a simple example with two objects that notify each other, through a mediator:
/** * Mediator interface for mediator pattern */ public interface Mediator { void notifyGroup(Colleague sender); void addColleague(Colleague colleague); } /** * Generic member for mediator pattern */ public abstract class Colleague {
It is a design pattern used to represent data in structures and do one of the two:
A parser is often required to convert a string into a data structure or tree, but it is not part of the pattern.
Here's an example to execute expressions containing additions and subtractions. A parser is not included in this example:
/** * An expression can be any number or operator */ public abstract class Expression { abstract public int interpret(); } /** * A number can be any integer */
In a Version Control System, when you branch you are creating a new line of development from the main one. There are different strategies on how to do that, each with pros and cons.
Continuos deployment is the simplest model, because there is no branching at all.
Branch by feature or short lived feature is a model where each developer branch from master to develop its own feature, then merge back in a few days.
Both "Java Language Specification" and "Java Virtual Machine Specifications" are freely available. There are multiple JDK and virtual machine implementations, some open source and others commercial.
HotSpot is the most popular virtual machine, distributed with Oracle JDK. This is a commercial distribution and is pretty stable. However OpenJdk, initially developed by Sun Microsystems, is still the reference implementation, under GPL license.
There are many others implementations like JRockit, particularly designed for production environment, or J9 from IBM.
It's a design pattern to cascade a task across a series of objects. The purpose can be finding the object that can solve a problem or can be processing the same data through a different number of algorithms.
Chain of responsability favour loose coupling. It is normally used when more than one object can handle a request.
Here's an example for a hypothetical server with multiple processors. It will check the first available processor to handle data.
import java.util.Random; /** * Processor with basic functionality for chain of responsability. */
It's a design pattern that works as a class wrapper to more control on the access to an object.
The main usages of a proxy are:
It's a design pattern that changes the behaviour of an object, based on the state.
A simple example is a wall switch that can have two possible states, on and off. An interface is provided for the state and each implementation can access and change the state of the switch, depending on the operation performed.
Here's the code:
/** * Interface used for each switch state */ public interface SwitchState { void turnOn(); void turnOff(); } /** * A wall switch that can be turned on and off */ public class Switch { SwitchState onState;
Copyright © 2013 Welcome to the website of Davis Fiore. All Rights Reserved.