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
| // | |
| // File.c | |
| // | |
| // | |
| // Created by Kenneth Ballenegger on 1/13/14. | |
| // | |
| // | |
| #include <stdlib.h> | |
| #include <stdio.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
| { | |
| NSView *emailFieldContainer = [[NSView alloc] initWithFrame:NSMakeRect(80.0/2, 150.0/2, 650.0/2, 60.0/2)]; | |
| self->emailField = [[NSTextField alloc] initWithFrame:NSMakeRect(10.0/2, 10.0/2, 670.0/2, 40.0/2)]; | |
| self->emailField.stringValue = @"[email protected]"; | |
| [self->emailField setFont:boldFont]; | |
| [self->emailField setEditable:YES]; | |
| self->emailField.drawsBackground = NO; | |
| [self->emailField setBezeled:NO]; | |
| self->emailField.textColor = [NSColor colorWithCalibratedRed:0.872 green:0.197 blue:0.228 alpha:1.000]; | |
| [self->emailField setWantsLayer:YES]; |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <link type="text/css" rel="stylesheet" href="stylesheet.css" /> | |
| <title>My Photo Page</title> | |
| </head> | |
| <body> | |
| <table> | |
| <thead> | |
| <tr> |
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
| <html> | |
| <head> | |
| <title>Box Pricing</title> | |
| <style> | |
| td:nth-child(2) { | |
| border-left:1px solid black; | |
| } | |
| td { | |
| padding: 5px; | |
| } |
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
| # configure Kongo :) | |
| Kongo::Collection.add_extension(:apps, Module.new do | |
| def find_by_itunes_id(id) | |
| find_many(itunes: id, live_notified: true) | |
| end | |
| self; end) | |
| Apps = Kongo::Collection.new(:apps) |
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
| Modernizer.new do | |
| request_version { @env[...] } | |
| first do | |
| add 'hello' { 'hardcoded' } | |
| end | |
| modernize '1.2.1' do | |
| add 'foo' { "#{@body['hello']}-bar" } |
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
| #ifdef HAVE_CONFIG_H | |
| #include "config.h" | |
| #endif | |
| #include "php.h" | |
| #include "php_cb_pbkdf2.h" | |
| #include <string.h> | |
| #include "cb-pbkdf2.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
| Cs = [1, 2, 5, 10, 20, 50, 100, 200] | |
| def left(n, s) | |
| Cs.select do |c| | |
| c <= s | |
| end.map do |c| | |
| x = n-c | |
| x > 1 ? left(x, c) : (x < 0 ? 0 : 1) | |
| end.reduce(&:+) | |
| 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
| string = '111sjhfb1234321asdjkhbfhhjjhhkik' | |
| long_palindromes = [] | |
| (0..string.length-1).each do |i| | |
| # xyx | |
| xyx0 = i < 1 ? nil : string[i-1] | |
| xyx1 = string[i] | |
| xyx2 = string[i+1] | |
| # xx |