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
<snippet> | |
<content><![CDATA[ | |
blah blah | |
]]></content> | |
<!-- Optional: Tab trigger to activate the snippet --> | |
<tabTrigger>html5</tabTrigger> | |
<!-- Optional: Scope the tab trigger will be active in --> | |
<scope>source.html</scope> | |
<!-- Optional: Description to show in the menu --> | |
<description>My Fancy HTML snippet</description> |
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
[{"name": "foo"},{"name": "bar"}] |
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
{ "keys": ["tab"], "command": "move", "args": {"by": "characters", "forward": true}, "context": | |
[ | |
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)'\"\\]]", "match_all": true }, | |
{ "key": "auto_complete_visible", "operator": "equal", "operand": false } | |
] | |
} |
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
final List<Integer> numbers = Arrays.asList(1,2,3,4,5,6,6); | |
Set<Integer> unique = numbers | |
.stream() | |
.map(x -> x * x) | |
.filter(x -> x < 10) | |
.collect(Collectors.toSet()); |
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
//javap -c -p Foo.class | |
Compiled from "Foo.java" | |
class Foo { | |
Foo(); | |
Code: | |
0: aload_0 | |
1: invokespecial #1 // Method java/lang/Object."<init>":()V | |
4: return | |
public static void main(java.lang.String[]); |
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 makeList(n){ | |
var head = {'i':0}; | |
var prev = head; | |
var current; | |
for (var i = 1; i < n; i++) { | |
current = {'i': i}; | |
prev.next = current; | |
prev = current; | |
}; |
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 Main{ | |
public static void main(String[] args){ | |
System.out.print1n("Yo Wassup World"); | |
} | |
} |
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
/** | |
* | |
* Ray Tayek needs function that escapes all regular expression characters in a string. | |
*/ | |
public class RegexEscape { | |
private static char[] reserved="$()*+-.?[\\]^{|}".toCharArray(); | |
//the toCharArray() way | |
public static String encode(String arg){ | |
char[] source = arg.toCharArray(); |
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
String s = "<SCRIPT type=\"blah\" .....>xyz" + | |
"blah blah blah blah\n" + | |
"blah blah blah blah\n" + | |
"blah blah ...........\n" + | |
"</script>"; | |
Pattern p = Pattern.compile("<script .*?(>.*?)</script>", | |
Pattern.DOTALL | Pattern.CASE_INSENSITIVE); | |
Matcher m = p.matcher(s); | |
if (m.matches()) { |
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 com.javajosh.bender.server; | |
import com.javajosh.bender.client.GreetingService; | |
import com.javajosh.bender.client.GreetingServiceAsync; | |
import com.google.gwt.core.client.GWT; | |
import com.google.gwt.user.client.rpc.AsyncCallback; | |
import com.google.gwt.user.server.rpc.RemoteServiceServlet; | |
/** | |
* The server side implementation of the RPC service. |
OlderNewer