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
| <?php | |
| $fileName = $_FILES['afile']['name']; | |
| $fileType = $_FILES['afile']['type']; | |
| $fileContent = file_get_contents($_FILES['afile']['tmp_name']); | |
| $dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent); | |
| $json = json_encode(array( | |
| 'name' => $fileName, | |
| 'type' => $fileType, | |
| 'dataUrl' => $dataUrl, |
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
| <select name="country"> | |
| <option value="DE" selected>Deutschland</option> | |
| <option value="AT">Österreich</option> | |
| <option value="CH">Schweiz</option> | |
| <optgroup label="A"> | |
| <option value="AF">Afghanistan</option> | |
| <option value="EG">Ägypten</option> | |
| <option value="AX">Åland</option> | |
| <option value="AL">Albanien</option> | |
| <option value="DZ">Algerien</option> |
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
| 24.03.2015 | |
| ---------- | |
| Stealing data from computers using heat (http://www.codeproject.com/News.aspx?ntag=19837497518395608&_z=8113364) | |
| Eight bits an hour! Game over, man. | |
| 13.04.2015 | |
| ---------- | |
| Mysterious radio signals came from microwave oven, not outer space (http://www.codeproject.com/News.aspx?ntag=19837497534085628&_z=8113364) | |
| But what if it's aliens IN the microwave oven? |
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 MyClass() { | |
| // private member | |
| var that = this; | |
| // public members | |
| this.publicMember = 'Bazinga'; | |
| // private functions | |
| var privateFunction = function() { | |
| }; |
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
| To get a bit mask: | |
| var mask = 1 << 5; // gets the 6th bit | |
| To test if a bit is set: | |
| if ((n & mask) != 0) { | |
| // bit is set | |
| } else { | |
| // bit is not set |
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
Show hidden characters
| { | |
| "word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?" | |
| } |
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
| "One of my most productive days was throwing away 1000 lines of code." | |
| - Ken Thompson | |
| "Measuring programming progress by lines of code is like measuring aircraft building progress by weight." | |
| - Bill Gates | |
| "When debugging, novices insert corrective code; experts remove defective code." | |
| - Richard Pattis | |
| "Good code is its own best documentation. As you’re about to add a comment, ask yourself, ‘How can I improve the code so that this comment isn’t needed?’" |
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
| if ($('#entitytable').length === 0) { | |
| alert("not there"); | |
| } else { | |
| alert("there"); | |
| } |
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
| h1. Sublime Text 2 - Useful Shortcuts (PC) | |
| Loosely ordered with the commands I use most towards the top. Sublime also offer "full documentation":http://www.sublimetext.com/docs/2/. | |
| h2. Editing | |
| | *Ctrl+C* | copy current line (if no selection) | | |
| | *Ctrl+X* | cut current line (if no selection) | | |
| | *Ctrl+⇧+K*| delete line | | |
| | *Ctrl+↩* | insert line after | |