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
| domains | |
| element = integer | |
| list = element* | |
| predicates | |
| sort(list, list) | |
| join(list, list, list) | |
| split(list, element, list, list, list, list) | |
| inverse(list, list, 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
| // | |
| // CloudFolderContentsDataRequestSpecs.m | |
| // Launchpad v3 | |
| // | |
| // Created by Andrei on 11/16/12. | |
| // Copyright (c) 2012 __MyCompanyName__. All rights reserved. | |
| // | |
| #import "CloudFolderContentsDataRequestSpecs.h" | |
| #import "CloudFolderContentDataRequest.h" |
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
| <LPDirectoryFileCollection xmlns:i='http://www.w3.org/2001/XMLSchema-instance' xmlns='www.classlink.galaxy.com'> | |
| <LPDirectoryFile> | |
| <ContentType i:nil='true'/> | |
| <CreatedDate> | |
| January 13, 2012 | |
| </CreatedDate> | |
| <DirectoryCount> | |
| 0 | |
| </DirectoryCount> | |
| <FileCount> |
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
| int put(int a, int b) { | |
| if (b == 0) { | |
| return 1; | |
| } | |
| if (b == 1) { | |
| return a; | |
| } | |
| int ret = put(a, b/2); | |
| return ret * ret * (b % 2 ? a : 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
| require 'nokogiri' | |
| require 'open-uri' | |
| album = "http://imgur.com/a/o37VA/layout/blog" | |
| dom = Nokogiri::HTML(open(album)) | |
| base_name = "sexy" | |
| index = 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
| // | |
| // GIFLoader.h | |
| // AnimatedGifExample | |
| // | |
| // Created by Andrei on 10/15/12. | |
| // Copyright (c) 2012 Whatevra. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |
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
| before_filter :restrict_access | |
| protected | |
| def restrict_access | |
| if Rails.env != "development" | |
| access_token = request.headers['access_token'] | |
| access_token ||= params[:access_token] | |
| begin | |
| @auth = Authorization.find_by_access_token(access_token) |
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
| -//////////////////////////////////////////////////////////////////////////////////// | |
| - UIImage *maskImg = [UIImage imageNamed:@"Ethics-Risk-Triangle.png"]; | |
| - CGImageRef maskRef = maskImg.CGImage; | |
| - | |
| - CGImageRef mask = CGImageMaskCreate(CGImageGetWidth(maskRef), | |
| - CGImageGetHeight(maskRef), | |
| - CGImageGetBitsPerComponent(maskRef), | |
| - CGImageGetBitsPerPixel(maskRef), | |
| - CGImageGetBytesPerRow(maskRef), | |
| - CGImageGetDataProvider(maskRef), NULL, false); |
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
| def reactions | |
| @article = Article.find(params[:article_id]) | |
| comments = @article.comments.includes(:user) | |
| emotions = @article.emotions.includes(:user) | |
| reactions = comments + emotions | |
| reactions.sort! { |x, y| | |
| y.created_at <=> x.created_at |
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
| { | |
| "faces" : ["https://si0.twimg.com/profile_images/1860046271/image_normal.jpg", | |
| "https://si0.twimg.com/profile_images/2518045421/image_normal.jpg", | |
| "https://si0.twimg.com/profile_images/2452768851/bhd68fvfnr5k0micbpcz_normal.jpeg", | |
| "https://si0.twimg.com/profile_images/1824002576/pg-railsconf_normal.jpg", | |
| "https://si0.twimg.com/profile_images/1620281242/Screen_shot_2011-11-03_at_1.11.35_PM_normal.png", | |
| "https://si0.twimg.com/profile_images/1884069342/BGtwitter_normal.JPG", | |
| "https://si0.twimg.com/profile_images/1766054826/cristian_normal.jpg", | |
| "https://si0.twimg.com/profile_images/2235748695/mrtall_white_bg_normal.png" | |
| ], |