Undo a commit and redo
$ git commit ... (1)
$ git reset --soft HEAD~1 (2)
<< edit files as necessary >> (3)
$ git add .... (4)
Undo a commit and redo
$ git commit ... (1)
$ git reset --soft HEAD~1 (2)
<< edit files as necessary >> (3)
$ git add .... (4)
http://www.hpique.com/2013/09/updating-a-fork-directly-from-github/
Here’s how to update your fork directly from GitHub (as shown in the video above):
This housecleaning worked for me:
mv /usr/local/lib/node_modules /tmp rm -rf /tmp/node_modules/npm curl https://www.npmjs.com/install.sh | sh npm cache clean npm install -g $(ls -1rt /tmp/node_modules/)
#Add onClick for layout
RelativeLayout layout = (RelativeLayout)findViewById(R.id.rv_layout);
layout.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
// Do Actions
// Find the View that shows the ContactUs category
TextView contactUs = (TextView) findViewById(R.id.contact);
// Set a click listener on view
if (contactUs != null) {
contactUs.setOnClickListener(new View.OnClickListener() {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final Context mContext = getContext();
final ViewHolder holder;
final Earthquake currentEarthquake = (Earthquake) getItem(position);
if (convertView == null) {
convertView = LayoutInflater.from(getContext()).inflate(
R.layout.earthquake_list_item, parent, false);
/** | |
* <p> | |
* An {@code ArrayAdapter} that also knows how to save and restore its state. | |
* Basically all it does is save/restore the array of objects being managed by | |
* the Adapter. | |
* </p> | |
* | |
* <p> | |
* Note that this only saves the items and not things like checked item | |
* positions. Those belong to the {@link ListView} itself. Consider using |
from http://stackoverflow.com/questions/772802/storing-uuid-as-base64-string
####Usage
import org.apache.commons.codec.binary.Base64;
String uuid_str = "6fcb514b-b878-4c9d-95b7-8dc3a7ce6fd8";
String uuid_as_64 = uuidToBase64(uuid_str);
System.out.println("as base64: "+uuid_as_64);
System.out.println("as uuid: "+uuidFromBase64(uuid_as_64));
// Return HTML Entity code equivalents for any special characters | |
public static String HTMLEntityEncode( String input ) { | |
StringBuffer sb = new StringBuffer(); | |
for ( int i = 0; i < input.length(); ++i ) { | |
char ch = input.charAt( i ); | |
if ( ch>='a' && ch<='z' || ch>='A' && ch<='Z' || ch>='0' && ch<='9' ) { |
package com.sigilius.utility; | |
import sun.text.Normalizer; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletRequestWrapper; | |
import javax.validation.ValidationException; | |
import java.util.regex.Pattern; |