Based on Ana Tudor's styling of Range Sliders, I have used my own extension for jQueryUI to create really usable and pretty range sliders.
A Pen by Simon Goellner on CodePen.
// server.js | |
var socketIO = require(‘socket.io’); | |
var socketIOHelper = require(‘./app/helpers/socketio’); | |
var PORT = process.env.PORT || 8088; | |
var server = app.listen(config.port, function() { | |
console.log(‘Listening on port ‘ + config.port); | |
}); | |
var io = socketIO(server); | |
socketIOHelper.set(io); |
{ | |
"_id" : ObjectId("56cfcac32239305dc57ed859"), | |
"profile_url" : "https://s3-ap-southeast-1.amazonaws.com/amaderdoctor/misc/person.png", | |
"is_admin" : 1, | |
"is_active" : true, | |
"is_manager" : 0, | |
"is_mpo" : 0, | |
"is_fieldstaff" : 0, | |
"is_rmp" : 0, | |
"is_doctor" : 0, |
Based on Ana Tudor's styling of Range Sliders, I have used my own extension for jQueryUI to create really usable and pretty range sliders.
A Pen by Simon Goellner on CodePen.
// C++ includes used for precompiling -*- C++ -*- | |
// Copyright (C) 2003-2013 Free Software Foundation, Inc. | |
// | |
// This file is part of the GNU ISO C++ Library. This library is free | |
// software; you can redistribute it and/or modify it under the | |
// terms of the GNU General Public License as published by the | |
// Free Software Foundation; either version 3, or (at your option) | |
// any later version. |
/****************************************************************************** | |
* Compilation: javac Stack.java | |
* Execution: java Stack < input.txt | |
* Dependencies: StdIn.java StdOut.java | |
* | |
* A generic stack, implemented using a singly-linked list. | |
* Each stack element is of type Item. | |
* | |
* This version uses a static nested class Node (to save 8 bytes per | |
* Node), whereas the version in the textbook uses a non-static nested |
public class Compress { | |
public static String compressedString(String str){ | |
StringBuilder dest = new StringBuilder(); | |
for(int i=0;i<str.length();i++){ | |
char c = str.charAt(i); | |
dest.append(c); | |
int j = i; |
public class ReplaceCharacter { | |
public static String stringReplacer(String str,char source,String replaced){ | |
StringBuilder dest = new StringBuilder(); | |
for(int i = 0;i<str.length();i++){ | |
char ch = str.charAt(i); | |
if(ch==source){ | |
dest.append(replaced); |
import java.util.Arrays; | |
public class IsPermutation { | |
public static boolean isPermutation(String str1, String str2){ | |
if(str1.length() != str2.length()) return false; | |
char[] c1 = str1.toCharArray(); | |
char[] c2 = str2.toCharArray(); | |
Arrays.sort(c1); | |
Arrays.sort(c2); |
public class StringReverse { | |
public static String reverseString(String str){ | |
StringBuilder dest = new StringBuilder(str.length()); | |
for(int i = str.length()-1;i>=0;i--){ | |
dest.append(str.charAt(i)); | |
} | |
return dest.toString(); | |
} |
package com.company; | |
public class Unique { | |
public static boolean checkUnique(String word){ | |
if(word.length()>256) return false;// if a string is more than 256 characters long, it repeats any of the string | |
boolean[] charset = new boolean[256]; | |
for(int i = 0;i<word.length();i++){ | |
char c = word.charAt(i); | |
if(charset[c]) return false; | |
charset[c]=true; |