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
void printInts(List<int> a) => print(a); | |
void main() { | |
var list = <int>[]; | |
list.add(1); | |
list.add(2); | |
printInts(list); | |
} |
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
void printInts(List<int> a) => print(a); | |
void main() { | |
var list = []; | |
list.add(1); | |
list.add("2"); | |
printInts(list); | |
} |
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
// Define a function. | |
printInteger(int aNumber) { | |
print('The number is $aNumber.'); // Print to console. | |
} | |
// This is where the app starts executing. | |
main() { | |
var number = 42; // Declare and initialize a variable. | |
printInteger(number); // Call a function. | |
} |
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
fn process(from: &Path, to: &Path) -> IoResult<()> { | |
// creates a new tempdir with the specified suffix | |
let tempdir = try!(TempDir::new("skylight")); | |
// open the input file | |
let mut from_file = try!(File::open(from)); | |
// create a temporary file inside the tempdir | |
let mut tempfile = | |
try!(File::create(&tempdir.path().join("tmp1"))); |
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.java2novice.files; | |
import java.io.File; | |
public class FilesListFromFolder { | |
public static void main(String a[]){ | |
File file = new File("C:/MyFolder/"); | |
File[] files = file.listFiles(); | |
for(File f: files){ | |
System.out.println(f.getName()); | |
} | |
} |
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
# Install dependencies | |
# | |
# * checkinstall: package the .deb | |
# * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
mkdir -p ~/sources/ && \ | |
# Compile against OpenSSL to enable NPN. I updated this block to get the latest 1.0.2h release. It's critical that OpenSSL be up to date. |
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
<!-- Microsoft EMET is a free tool can dramatically improve the security of the OS and applications. It can force Data Execution Protection (DEP), ASLR, Heap Spray Protection, Export Address Table Access Filtering (EAF), ROP Caller Check, and a few other runtime protections on most applications. | |
By default, EMET only governs Microsoft Office applications, the Java VM, and major browsers. I've configured EMET to govern many more applications, and this file is my exported config. EMET allows for the export and import of these XML configs. This config covers Python, Ruby, Go, Opera, Pushbullet, UltraEdit, Sublime Text, Vivaldi browser, Wireshark, Fiddler, SpiderOak, WinSCP, MuPDF, ConEmu, LibreOffice, Amazon Music, lots of compression utilities, and much more. The install paths are defaults except for dev tools, which are usually C:\(tool)... | |
Some apps break when you enfold them in EMET's mitigations, and you have to isolate which of the many mitigations is breaking the app. For example, Amazon Music won |