This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.yogedra.test; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.io.Serializable; | |
public class ReadWriteObjects { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$(function(){ | |
${1} | |
}); | |
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.swing.JButton; | |
import javax.swing.JFrame; | |
import javax.swing.JLabel; | |
import javax.swing.JOptionPane; | |
import javax.swing.JPasswordField; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table id="deptInfo"> | |
<thead> | |
<tr> | |
<th>Login</th> | |
<th>Account Name</th> | |
<th><span class="keep"><input type="checkbox" />Keep (<span class="count"><span class="selected">0</span>/<span class="total">0</span></span>) </span></th> | |
<th><span class="remove"><input type="checkbox" class="remove" />Remove (<span class="count"><span class="selected">0</span>/<span class="total">0</span></span>) </span></th> | |
</tr> | |
</thead> | |
<tbody class="dept-name"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SimpleHTTPServer | |
import SocketServer | |
import cgi | |
import logging | |
import base64 | |
import time | |
import os | |
ts = time.time() | |
uploadDir="upload/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.prototype.setNested = function(s, v) { | |
s = s.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties | |
s = s.replace(/^\./, ''); // strip a leading dot | |
var a = s.split('.'); | |
o = this; | |
while (a.length) { | |
var n = a.shift(); | |
if(a.length == 0){ | |
o[n]=v; | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
import java.util.LinkedHashMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class AbstractMathOperation implements MathOperation{ | |
public void preOperate(Integer... values){ | |
System.out.println("This is a pre operation "); | |
} | |
public void postOperate(Integer... values){ | |
System.out.println("This is a post operation "); | |
} | |
public Integer operate(Integer... values){ | |
preOperate(values); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project basedir="." default="package" name="PROJECT_NAME"> | |
<!-- | |
This script assumes: | |
1) CATALINA_HOME environment variable points to tomcat's directory | |
2) Following Folder Structure | |
./ (project root) | |
|- src/ (project.src.dir - source folder) | |
|- build/ | |
| |- classes/ (project.classes.dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Add vagrant as sudo user with no password required | |
# vagrant ALL=(ALL) NOPASSWD: ALL >> /etc/ | |
sudo visudo |
OlderNewer