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
#[derive(Deserialize)] | |
struct Demo { | |
d1: Demo<i32>, | |
d2: Demo<String>, | |
d3: Demo<String>, | |
} | |
enum DemoEnum<T> { | |
A, | |
B, |
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
let my_buf=bufnr('banana', 1) | |
call nvim_buf_set_lines(my_buf, 0, 0, v:true, ['this is a line']) | |
call nvim_buf_set_option(my_buf, 'modifiable', v:false) | |
execute ":buffer " . my_buf | |
execute "normal! oTyped after modifiable=False\<esc>" |
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.File; | |
import java.util.Iterator; | |
import javax.imageio.ImageIO; | |
import javax.imageio.ImageReader; | |
import javax.imageio.metadata.IIOMetadata; | |
import javax.imageio.stream.ImageInputStream; | |
import org.w3c.dom.NamedNodeMap; |
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.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import java.io.File; | |
public final class GlobBuilder { | |
private static final String PATTERN_STAR; | |
private static final String PATTERN_STAR_STAR = ".*"; | |
private static final String PATTERN_QUESTION = "."; |
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
/* | |
* A proof of concept client-side XSS mitigation library with minimal server side requirements. | |
* | |
* Installation: | |
* | |
* Insert this script immediately following the opening tag of the body element. | |
* | |
* Strip every instance of </noscript> and </iframe> before the output leaves | |
* your server. | |
*/ |
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
-- Base class for all versioned models | |
CREATE TABLE `VersionedModel` ( | |
`BlobId` INTEGER(11) NOT NULL, | |
`VersionId` BINARY(64) NOT NULL, | |
`IsTip` BOOLEAN NOT NULL, | |
PRIMARY KEY (`BlobId`,`VersionId`), | |
KEY `model_tip_index` (`BlobId`,`IsTip`) | |
) ENGINE=InnoDB; | |
-- Tracks changes to models |