Skip to content

Instantly share code, notes, and snippets.

View si-yao's full-sized avatar
🎯
Focusing

si-yao

🎯
Focusing
View GitHub Profile
public class TextSpliter {
public List<String> splitText(String txt, int len) {
List<Integer> startList = new ArrayList<Integer>();
List<Integer> lenList = new ArrayList<Integer>();
String[] words = txt.split(" ");
boolean violate;
do {
violate = false;
int pLen0 = 3 + digits(startList.size()); //length needed for (ab/cd), not including ab.
int curPage = 1;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" >
<head>
<base href="http://www.qservtech.com/employment/job-board/job/416/1/list" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="keywords" content="Commissary, Vehicle Operations and Maintenance, Grounds Maintenance and Custodial Services, Military Family Housing Maintenance, Military Housing Renovation, Parks and Lakes Operations and Maintenance, Hospital Antiseptic Maintenance, Moral Welfare and Recreation (MWR) Operations, NCO &amp; Officer Club Operations, Bowling Alley and Movie Theatre Operations, Full Food Service Operations, Hotel and Motel Operations, Re-Forestation Services" />
<meta name="description" content="Federal Service Contracting for Commissary, Constuction, Grounds
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml" lang="EN" xml:lang="EN">
<head id="ctl00_Head1">
<title>
Lettings Lister/Valuer - East London Job in East London Salary: £15000 - £35000 per annum | Curtis &amp; Mayfair
</title>
<meta http-equiv='CACHE-CONTROL' content='PRIVATE' />
JOB DESCRIPTION: Applicant will be proficient in the following tasks: Re-stock Requirements,Placement of Merchandise on Shelves, Merchandise Rotation, Excess Stock (Overwrite), Expired Code Dates Cleaning and Dusting Shelf Area, Not in Stock (NIS),Facing and Fronting, Disposal of Cardboard, Returning Merchandise, Damaged Items, Disposal of Waste Materials, Cutting Open Cases of Merchandise.
PRIMARY RESPONSIBILITIES are, but not limited to: A night shelf stocker performs stock replenishment of merchandise that has been depleted from the day’s sales. You are responsible to properly stock the goods in an organized and timely manner on the shelves and displays. You are responsible for product rotation, attention to product placement and keeping track of the products life or expiration dates. You are required to meet production goals by cases per hour, in accordance to company policy and procedures.
SKILLS: • Speaking - Talking to others to convey information effectively. • Active Listening - Giving full att
package experience;
import java.util.Timer;
import java.util.TimerTask;
/**
* Count the API call in the last minute.
* Created by siyao on 9/13/15.
*/
public class APICallCounter {
public class Solution {
public boolean isMatch(String s, String p) {
if (s == null || p == null) {
return false;
}
return helper(s, 0, p, 0, new HashMap<List<Integer>, Boolean>());
}
public boolean helper(String s, int sstart, String p, int pstart, Map<List<Integer>, Boolean> dp) {
if (pstart >= p.length()) {
return false;
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
public class Solution {
public boolean isMatch(String s, String p) {
if (s == null || p == null) {
return false;
}
return helper(s, 0, p, 0, new HashMap<List<Integer>, Boolean>());
}
public boolean helper(String s, int sstart, String p, int pstart, Map<List<Integer>, Boolean> dp) {
boolean rst = false;
if (dp.containsKey(Arrays.asList(sstart, pstart))) {
class MinStack {
long min;
Stack<Long> stack;
public MinStack() {
min = 0;
stack = new Stack<Long>();
}
public void push(int x) {
@si-yao
si-yao / example_of_return_json.json
Created December 3, 2015 02:22
What server will return after you send request(moviename, username)
{
"name": "Looper",
"url": "http://www.metacritic.com/movie/looper",
"rlsdate": "2012-09-28",
"score": "84",
"summary": "In Looper, time travel exists, but it is illegal and only available on the black market. When the mob wants to get rid of someone, they send their target 30 years into the past, where a “looper” –...",
"rating": "R",
"cast": "Bruce Willis, Emily Blunt, Garret Dillahunt, Jeff Daniels, Joseph Gordon-Levitt, Noah Segan, Paul Dano, Piper Perabo",
"genre": "Action, Sci-Fi, Thriller, Crime",
"avguserscore": "8.0",