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 usernames = [PFUser]() | |
| var currentUser = PFUser.currentUser() | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| var query = PFUser.query() | |
| query?.findObjectsInBackgroundWithBlock({ (objects, error: NSError?) -> Void in | |
| if error == nil{ | |
| for username in objects as Array!{ | |
| if(self.currentUser?.objectId != username.objectId){ |
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
| change_color = function(color){ | |
| var color = "#03ffc5" | |
| var num = parseInt(color,16) | |
| var num = parseInt(color.slice(color.length-2,color.length),16); | |
| num = num + 50; | |
| if(num>255){num = num-255;} | |
| return color.slice(0,color.length-2)+num.toString(16) | |
| } |
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 numbers = [] //Array of numbers | |
| var range = 100 // Maximum number | |
| for (var i = 0; i < range; i++) { | |
| numbers.push(Math.round(Math.random()*range)); | |
| } | |
| blue_color_shade = function (range,number) { | |
| var ratio = 255/range; | |
| var shade = Math.round(number*ratio).toString(16) |
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
| #include <Keypad.h> | |
| const byte ROWS = 4; | |
| const byte COLS = 4; | |
| char keys[ROWS][COLS] = { | |
| { | |
| '1','2','3','A' } | |
| , | |
| { | |
| '4','5','6','B' } |
NewerOlder