Key/Command | Description |
---|---|
Ctrl + A | Go to the beginning of the line you are currently typing on. This also works for most text input fields system wide. Netbeans being one exception |
Ctrl + E | Go to the end of the line you are currently typing on. This also works for most text input fields system wide. Netbeans being one exception |
Ctrl + Q | Clears everything on current line |
Ctrl + L | Clears the Screen |
⌘Cmd + K | Clears the Screen |
Ctrl + U | Cut everything backwards to beginning of line |
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
<?php | |
/** | |
* Translates a number to a short alhanumeric version | |
* | |
* Translated any number up to 9007199254740992 | |
* to a shorter version in letters e.g.: | |
* 9007199254740989 --> PpQXn7COf | |
* | |
* specifiying the second argument true, it will | |
* translate back e.g.: |
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
CREATE OR REPLACE FUNCTION string_to_bits(input_text TEXT) | |
RETURNS TEXT AS $$ | |
DECLARE | |
output_text TEXT; | |
i INTEGER; | |
BEGIN | |
output_text := ''; | |
FOR i IN 1..char_length(input_text) LOOP |
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
/** | |
* Javascript AlphabeticID class | |
* | |
* Usage: | |
* var str = AlphabeticID.encode(9007199254740989); // str = 'fE2XnNGpF' | |
* var id = AlphabeticID.decode('fE2XnNGpF'); // id = 9007199254740989; | |
**/ | |
var AlphabeticID = { | |
index:'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', |
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
class ShortId | |
{ | |
public static readonly string Alphabet = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
private static decimal BcPow(double a, double b) | |
{ | |
return Math.Floor((decimal)Math.Pow(a, b)); | |
} | |
public static ulong Decode(string value, int pad = 0) |
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
ALPHABET = "bcdfghjklmnpqrstvwxyz0123456789BCDFGHJKLMNPQRSTVWXYZ" | |
BASE = len(ALPHABET) | |
MAXLEN = 6 | |
def encode_id(self, n): | |
pad = self.MAXLEN - 1 | |
n = int(n + pow(self.BASE, pad)) | |
s = [] |
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
# Mysql: Convert encoding to UTF8 without garbled data | |
#1 Convert to blob then UTF8 | |
ALTER TABLE comments MODIFY title BLOB; | |
ALTER TABLE comments MODIFY title VARCHAR(255) CHARACTER SET utf8; | |
#2 convert to BINARY then UTF8 | |
-- test | |
SELECT CONVERT(CAST(CONVERT(title USING latin1) AS BINARY) USING utf8) FROM comments WHERE id = 123; |
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
table { | |
display:block; | |
padding: 0px; | |
border-collapse:collapse; | |
border-spacing:0; | |
margin-top: 0px; | |
margin-right: auto; | |
margin-bottom: 0px; | |
margin-left: auto; | |
} |
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
// Main Code [Execution of script begins here] | |
// uncomment to suppress Illustrator warning dialogs | |
// app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS; | |
var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pngExportOpts; | |
// Select the source folder. | |
sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator files you want to convert to PNG', '~' ); | |
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
# Bitcoin | |
[$Ƀ-409]#,##0.00000000;-[$Ƀ-409]#,##0.00000000 | |
# Ethereum | |
[$Ξ-409]#,##0.0000000000000000;-[$Ξ-409]#,##0.0000000000000000 | |
# Core | |
[$₡-409]#,##0.0000000000000000;-[$₡-409]#,##0.0000000000000000 |
OlderNewer