This file contains hidden or 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
{ | |
"saveVersion": 15, | |
"resources": [ | |
{ | |
"name": "catnip", | |
"value": 143495309.65551314, | |
"unlocked": true, | |
"isHidden": false | |
}, | |
{ |
This file contains hidden or 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
// Program | |
static int Main(string[] array) | |
{ | |
int[] array2 = new int[1000]; | |
int num = int.Parse(Console.ReadLine()); | |
if ((num >= 1000) ?? (num < 2)) | |
{ | |
Console.WriteLine(-1); | |
} | |
else |
This file contains hidden or 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 Get-CroppedText | |
{ | |
$pdftotext="C:\Program Files\xpdf\pdftotext.exe" | |
$bbox=$args[0] | |
$inFile=$args[1] | |
pdfcrop --bbox $bbox $inFile tmp2.pdf | Out-Null | |
& $pdftotext -nopgbrk tmp2.pdf - | Select-Object -First 1 | foreach { $_.Trim() } | |
rm tmp2.pdf | |
} |
This file contains hidden or 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
#!/usr/bin python | |
pdf = """%PDF-1.4 | |
1 0 obj | |
<< /Type /Catalog | |
/Outlines 2 0 R | |
/Pages 3 0 R | |
>> | |
endobj | |
2 0 obj |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
/* | |
Konverterer en streng til Q-encoding | |
En del spam filtrer ser ud til at regne det for mere sandsyneligt at en mail er spam hvis | |
subject og from er base64 encodet - og der er ingen grund til at udfordre skæbnen... | |
Q-encoding er en modificeret udgave af quoted-printable, som benyttes til mime headers | |
quoted-printable er beskrevet på wikipedia på http://en.wikipedia.org/wiki/Quoted-printable | |
forskellene der er i Q-encoding er beskrevet på http://en.wikipedia.org/wiki/MIME#Encoded-Word | |
Der er faktisk en funktion i php til at gøre dette - iconv_mime_encode - | |
denne encoder bare ikke alting korrekt (mellemrum som =20), |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
$listObj = [ADSI]"LDAP://CN=DistList,CN=Users,DC=example,DC=com" | |
$tmpMembers = $listObj.PSBase.Invoke('Members') | %{([System.DirectoryServices.DirectoryEntry] $_).mail} |
This file contains hidden or 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
#include <string> | |
#include <codecvt> | |
#include <locale> | |
int main(int argc, const char *argv[]) | |
{ | |
std::wstring_convert < std::codecvt<wchar_t, char, std::mbstate_t> > conv; | |
std::vector<const wchar_t*> wargv; | |
std::vector<std::wstring> wsargv; | |
wargv.resize(argc); |
This file contains hidden or 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 write_int(int n) { | |
// Length of INT_MIN as a decimal number is 11 (-2147483647) | |
char buf[11]; | |
int neg = n < 0; | |
n *= 1 - 2*neg; | |
int pos = 11; | |
do { | |
buf[--pos] = '0' + (n % 10); | |
n /= 10; | |
} while (n); |