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
| module Paperclip | |
| class Watermark < Processor | |
| WATERMARK_PATH = "#{Rails.root}/public/images/watermark.png" | |
| def initialize(file, options = {}, attachment = nil) | |
| super | |
| @file = file | |
| @watermark_path = options[:watermark_path] | |
| @current_format = File.extname(@file.path) | |
| @basename = File.basename(@file.path, @current_format) |
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 read_input | |
| line = STDIN.gets | |
| m, n = line.split(" ").map{|s| s.to_i} | |
| fingerprints = [] | |
| m.times do | |
| fingerprints << STDIN.gets.chomp | |
| end | |
| return fingerprints | |
| end |
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 "cuPrintf.cu" | |
| #include <stdio.h> | |
| __device__ __host__ int distance(int x1, int y1, int x2, int y2) | |
| { | |
| return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2); | |
| } | |
| /* The CPU version of Voronoi Diagram computation */ | |
| void cpuVoronoiDiagram(Point2D *points, int *output, int noPoints, int width, int height) |
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
| #define MAX_DESIRABILITY 10; | |
| #define NUM_BIDDERS 10; | |
| #define NUM_ITEMS 20; | |
| #define BIDDER_BALANCE 100; | |
| #define YOUR_BALANCE 100; | |
| Seller() = generateBidOrders -> showItem(); | |
| showItem() = getAllBidPrices -> announceWinner -> announceWinnerPrice -> showItem(); | |
| NormalBidder() = checkDesirability -> checkBalance -> calculatePrice -> bid -> getResults -> updateBalance -> NormalBidder(); |
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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <math.h> | |
| #include <string.h> | |
| // ********************************************************************************************** | |
| //*Global Vars | |
| // ********************************************************************************************** | |
| int dp; // Field is displayed every dp generations (0..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
| // "sp" is used to slow down the game - by putting in a timing loop between generations. A value of sp of | |
| // 1000 should do one generation in about 1 second. A value of 0 will do the generation as fast as possible. | |
| void generation_sleep(){ | |
| if(sp > 0){ | |
| sleep(sp); | |
| } | |
| } |
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 build_adaptive_payment_request(sheet) | |
| trackingId = generate_token | |
| api = PayPal::SDK::AdaptivePayments::API.new | |
| pay_request = api.build_pay() | |
| pay_request.trackingId = trackingId | |
| pay_request.actionType = "PAY" | |
| pay_request.cancelUrl = orders_cancel_url | |
| pay_request.returnUrl = orders_success_url(trackingId) | |
| pay_request.ipnNotificationUrl = orders_ipn_notify_url |
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
| $(document).on("page:change", function() { | |
| UserVoice=window.UserVoice||[];(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/1foGiwZkzLazJrcOoI22A.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})(); | |
| UserVoice.push(['set', { | |
| accent_color: '#448dd6', | |
| trigger_color: 'white', | |
| trigger_background_color: 'rgba(46, 49, 51, 0.6)' | |
| }]); | |
| UserVoice.push(['addTrigger', { mode: 'contact', trigger_position: 'bottom-right' }]); | |
| UserVoice.push(['autoprompt', {}]); | |
| }); |
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
| Q: Is there a restriction for front-tier APIs to talk to DBs directly? If there is, is it a restriction from Raptor or PPaas? If it's from Raptor, ask for more details. |
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
| {"name":"Richard Hendriks","email":"[email protected]","phone":"(912) 555-4321","skills":"HTML, CSS, Javascript\nMpeg, MP4, GIF\nWEB DEVELOPMENT\nCOMPRESSION","experience":"Pied Piper\nCEO/President Dec 2013 - Dec 2014\nPied Piper is a multi-platform technology based on a proprietary universal compression algorithm that has consistently\nfielded high Weisman Scores that are not merely competitive, but approach the theoretical limit of lossless compression.\nBuild an algorithm for artist to detect if their music was violating copy right infringement laws\nSuccessfully won Techcrunch Disrupt\nOptimized an algorithm that holds the current world record for Weisman Scores\nVOLUNTEERING\nCoderDojo\nTeacher Jan 2012 - Jan 2013\nGlobal movement of free coding clubs for young people.\nAwarded 'Teacher of the Month'","education":"University of Oklahoma\nJun 2011 - Jan 2014\nBachelor - Information Technology GPA: 4.0","awards":"Digital Compression Pioneer Award\nundefined NaN\nTechcrunch\nThere is no spoon.\nPUB |