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
| -- PRAGMAs | |
| PRAGMA foreign_keys = ON; | |
| -- User | |
| CREATE TABLE account( | |
| id TEXT PRIMARY KEY, | |
| user_id TEXT UNIQUE NOT NULL, | |
| password TEXT NOT NULL, | |
| password_reset_code TEXT NULL, | |
| email TEXT UNIQUE NOT NULL, |
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
| [UIView beginAnimations:nil context:nil]; | |
| [UIView setAnimationDuration:time]; | |
| [UIView setAnimationDelay:0]; | |
| [UIView setAnimationCurve:UIViewAnimationCurveLinear]; | |
| [UIView commitAnimations]; |
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 onOpen() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var menuEntries = [ {name: "Duplicate Selected Row Down", functionName: "duplicate_row_down"},]; | |
| ss.addMenu("Utilities",menuEntries); | |
| } | |
| function duplicate_row_down (){ | |
| var sh = SpreadsheetApp.getActiveSheet(); | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var d = ss.getActiveSelection(); |
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
| <?xml version="1.0"?> | |
| <project name="Clue" default="main" basedir="."> | |
| <property name="src.dir" location="src" /> | |
| <property name="build.dir" location="build" /> | |
| <property name="dist.jar" location="clue.jar" /> | |
| <property name="libs.dir" location="jars" /> | |
| <target name="clean"> | |
| <delete dir="${build.dir}" /> | |
| <delete dir="${dist.jar}" /> |
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 you have this it would not break */ | |
| #define SWAP(x, y, T) do { T temp##x##y = x; x = y; y = temp##x##y; } while (0) | |
| int main(void) { | |
| int temp; | |
| int a = 1; | |
| int b = 2; |
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
| /*Question 1: Bitwise operators*/ | |
| #define INT_SIZE (sizeof(int) * 8) | |
| #include <stdio.h> | |
| /* Helper function to print a binary representation of an unsigned integer */ | |
| void print_int_as_binary_string(unsigned int b) { | |
| int i; | |
| char buffer[INT_SIZE + 1]; |
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
| invert (unsigned x, int p, int n){ | |
| p = specified starting position, n = how many to change, x = number being altered; | |
| while (p <= n){ | |
| change the 0 or 1 at p to the opposite; | |
| n++; | |
| } | |
| } |
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 you had this it would break */ | |
| #define SWAP(x, y, T) do { T temp = x; x = y; y = temp; } while (0) | |
| int main(void) { | |
| int temp; | |
| int a = 1; | |
| int b = 2; |
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 | |
| define("CACHE_FILE_NAME", "cache.html"); | |
| define("CACHE_TIME", 1 * 60 * 60); | |
| // timeout cache (you can also delete the file on update to page and check for existing file only or combination of both) | |
| if (filemtime(CACHE_FILE_NAME) + CACHE_TIME >= time() ) { | |
| echo file_get_contents(CACHE_FILE_NAME); | |
| return; | |
| } |
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
| import Chalkboard; | |
| import Mouth; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.File; | |
| import UnknownEmotion; | |
| public class RoboDonna { | |
| public static void main(String [] args) { | |
| RoboDonna donna = new RoboDonna(); |