- Checkout a single file from another branch
git checkout some-other-branch -- yarn.lock
- View the log without merge commits
git log --oneline --no-merges
- Rewrite your last commit message
git commit -v --amend
git checkout some-other-branch -- yarn.lock
git log --oneline --no-merges
git commit -v --amend
[ | |
{ "keys": ["f12"], "command": "htmlprettify"}, | |
{ "keys": ["f1"], "command": "fold" }, | |
{ "keys": ["f2"], "command": "unfold" }, | |
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} }, | |
{ "keys": ["ctrl+space"], "command": "auto_complete" }, | |
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context": | |
[ | |
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" }, |
curl -v -s http://awesome-site.com 1> /dev/null |
http://brikis98.blogspot.com/2014/05/dont-learn-to-code-learn-to-think.html https://itunes.apple.com/us/course/coding-together-apps-for-iphone/id537447071 http://teamtreehouse.com/
---University courses
Coursera
Udacity
MIT OpenCourseWare
Stanford Engineering Everywhere
#Spring Controller and ViewResolver
In This tutorial we look at the Controllers and View Resolvers.
###Controller
The DispatcherServlet receives request and then passes on the request to the appropriate Controller. The base Controller interface receives HttpServletRequest and HttpServletResponse. Controllers are like struts Action. The implementation of Controller should be a thread safe class that can handle multiple Http Requests. The Controller implementations are generally JavaBeans. The Controller returns a ModelAndView instance. Spring comes bundled with Some Controllers that provide basic functionalities.
####AbstractUrlViewController This returns a view name based on the request URL. MultiActionController - Allows multiple request types to be handled by the same class. When the class returns a Map the configured RequestToViewNameTranslator will be used to get the view name. When return type is void the handler method is responsible for writing directly to the response. A string return value indic
A Java object is considered immutable when its state cannot change after it is created. Use of immutable objects is widely accepted as a sound strategy for creating simple, reliable code. Immutable objects are particularly useful in concurrent applications. Since they cannot change state, they cannot be corrupted by thread interference or observed in an inconsistent state. java.lang.String and java.lang.Integer classes are the Examples of immutable objects from the Java Development Kit. Immutable objects simplify your program due to following characteristics :
Immutable objects are simple to use test and construct. Immutable objects are automatically thread-safe. Immutable objects do not require a copy constructor. Immutable objects do not require an implementation of clone. Immutable objects allow hashCode to use lazy initialization, and to cache its return value. Immutable objects do not need to be copied defensively when
Java Multi-Threading Interview Questions | |
What is the difference between Process and Thread? | |
What are the benefits of multi-threaded programming? | |
What is difference between user Thread and daemon Thread? | |
How can we create a Thread in Java? | |
What are different states in lifecycle of Thread? | |
Can we call run() method of a Thread class? | |
How can we pause the execution of a Thread for specific time? | |
What do you understand about Thread Priority? |
#http://www.codeskulptor.org/#user25_DRIZbYlzBq_16.py | |
# Mini-project #6 - Blackjack | |
import simplegui | |
import random | |
# load card sprite - 949x392 - source: jfitz.com | |
CARD_SIZE = (73, 98) | |
CARD_CENTER = (36.5, 49) | |
card_images = simplegui.load_image("http://commondatastorage.googleapis.com/codeskulptor-assets/cards.jfitz.png") |
public class RemoteServiceServletextends javax.servlet.http.HttpServletimplements SerializationPolicyProvider | |
The servlet base class for your RPC service implementations that automatically deserializes incoming requests from the client and serializes outgoing responses for client/server RPCs. |
Question: | |
Convert the following English description into code. | |
1. Initialize n to be 1000. Initialize numbers to be a list of numbers from 2 to n, but not including n. | |
2. With results starting as the empty list, repeat the following as long as numbers contains any numbers. | |
2.1. Add the first number in numbers to the end of results. | |
2.2. Remove every number in numbers that is evenly divisible by (has no remainder when divided by) the number that you had just added to results. | |
How long is results? | |
To test your code, when n is instead 100, the length of results is 25. |