Quick uninstall JetBrains settings:
curl -sL https://gist.githubusercontent.com/denji/9731967/raw/jetbrains-uninstall.sh | sudo bash -s
a |
public class Solution { | |
/** | |
* @param s : A string | |
* @return : The length of the longest substring | |
* that contains at most k distinct characters. | |
*/ | |
public int lengthOfLongestSubstringKDistinct(String s, int k) { | |
// write your code here | |
if(s == null || s.length() == 0 || k == 0){ | |
return 0; |
#!/bin/bash | |
#eval "$(ssh-agent -s)" | |
#SERVICE='ssh-agent' | |
#if ps ax | grep -v grep | grep $SERVICE > /dev/null | |
#then | |
# : | |
# #echo "$SERVICE service running, everything is fine" | |
#else |
// Q sample by Jeff Cogswell | |
/*=========== | |
We want to call these three functions in sequence, one after the other: | |
First we want to call one, which initiates an ajax call. Once that ajax call | |
is complete, we want to call two. Once two's ajax call is complete, we want to call three. | |
BUT, we don't want to just call our three functions in sequence, as this quick | |
demo will show. Look at this sample function and think about what order |
Quick uninstall JetBrains settings:
curl -sL https://gist.githubusercontent.com/denji/9731967/raw/jetbrains-uninstall.sh | sudo bash -s
public class HelloYaml { | |
@SuppressWarnings("unchecked") | |
public static void main(String[] args) throws FileNotFoundException { | |
Yaml yaml = new Yaml(); | |
System.out.println(yaml.dump(yaml.load(new FileInputStream(new File( | |
"hello_world.yaml"))))); | |
Map<String, Map<String, String>> values = (Map<String, Map<String, String>>) yaml | |
.load(new FileInputStream(new File("hello_world.yaml"))); |
test |