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" encoding="UTF-8" standalone="no"?> | |
| <profiles version="12"> | |
| <profile kind="CodeFormatterProfile" name="CS2103T" version="12"> | |
| <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> | |
| <setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> | |
| <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> | |
| <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> | |
| <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> | |
| <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> | |
| <setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/> |
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 java.util.Collections; | |
| import java.util.List; | |
| import java.util.Vector; | |
| public class ScissorsPaperStoneSortExpt { | |
| public static void main(String[] args) { | |
| List<Move> list = new Vector<Move>(); | |
| list.add(Move.paper()); | |
| list.add(Move.scissors()); |
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
| var data = { | |
| "NED": { | |
| "positions": 16, | |
| "fillKey": "MEDIUM" | |
| }, | |
| "IRL": { | |
| "positions": 1, | |
| "fillKey": "LOW" | |
| }, | |
| "MEX": { |
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(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null!=n&&!isNaN(n)}function e(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function r(n){return n.length}function u(n){for(var t=1;n*t%1;)t*=10;return t}function i(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function o(){}function a(n){return ia+n in this}function c(n){return n=ia+n,n in this&&delete this[n]}function s(){var n=[];return this.forEach(function(t){n.push(t)}),n}function l(){var n=0;for(var t in this)t.charCodeAt(0)===oa&&++n;return n}function f(){for(var n in this)if(n.charCodeAt(0)===oa)return!1;return!0}function h(){}function g(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function p(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
| from __future__ import division | |
| from datetime import datetime, time, timedelta | |
| import unittest | |
| ONE_SECOND = timedelta(seconds=1) | |
| HOUR_HAND_DEG_PER_SECOND = 1/120 | |
| HOUR_HAND_DEG_PER_MIN = 1/2 | |
| HOUR_HAND_DEG_PER_HOUR = 30 |
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
| 00:16:22 | |
| 00:49:05 | |
| 01:21:49 | |
| 01:54:33 | |
| 02:27:16 | |
| 03:00:00 | |
| 03:32:44 | |
| 04:05:27 | |
| 04:38:11 | |
| 05:10:55 |
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
| # -*- coding: utf-8 -*- | |
| """ | |
| Go to Google Bookmarks: https://www.google.com/bookmarks/ | |
| On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en | |
| After downloading the html file, run this script on it to generate a KML. | |
| Slight modification of regex to get lat/lng from web page from: https://gist.github.com/endolith/3896948= | |
| """ |
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
| :%s/<Ctrl-V><Ctrl-M>/\r/g | |
| http://stackoverflow.com/questions/811193/how-to-convert-the-m-linebreak-to-normal-linebreak-in-a-file-opened-in-vim |
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
| (** | |
| * This file contains 3 ways to solve the problem of: | |
| * | |
| * converting a binary search tree into a sorted linked list in-place | |
| * | |
| * In place means that no extra memory should be used, no structures are copied | |
| * | |
| * 1. Using ref nodes | |
| * 2. Using records with mutable fields | |
| * 3. Using immutable Cons and Nil linked list |
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
| var Claim = function () { | |
| // *********************************************************** | |
| // REQUIRED CONSTANTS, DO NOT MODIFY | |
| // *********************************************************** | |
| var ASSIGNMENT_MARKING = 'Assignment Marking'; | |
| var COURSE_MATERIAL_PREPARATION = 'Course Material Preparation'; | |
| var TUTORIAL = 'Tutorial'; | |
| var CONSULTATION = 'Consultation with students'; | |
| var MIDTERM_MARKING = 'Midterm Marking'; | |
| var PROJECT = 'Project Evaluation'; |
OlderNewer