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 <utility> | |
void sort(int *tab, int N){ | |
bool sorted; | |
do { | |
sorted = true; | |
for(int i = 0; i < N - 1; ++i) { | |
if(tab[i] > tab[i+1]) { | |
std::swap(tab[i], tab[i+1]); | |
sorted = 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
// Bonfire: Slasher Flick | |
// Author: @praxitelis | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-slasher-flick?solution=function%20slasher(arr%2C%20howMany)%20%7B%0A%20%20%20%20%2F%2F%20it%20doesn%27t%20always%20pay%20to%20be%20first%0A%20%20%20%20%0A%20%20%20%20%22use%20strict%22%3B%0A%0A%20%20%20%20var%20array%3B%0A%20%20%20%20%0A%20%20%20%20array%20%3D%20arr.slice(howMany%2C%20arr.length)%3B%0A%0A%20%20%20%20return%20array%3B%0A%7D%0A%0Aslasher(%5B1%2C%202%2C%203%5D%2C%202)%3B%0A | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function slasher(arr, howMany) { | |
// it doesn't always pay to be first | |
"use strict"; |
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 Jekyll | |
class Document | |
#Updated for Jekyll 3.0.0 | |
# override post method in order to return categories names as slug | |
# instead of strings | |
# | |
# An url for a post with category "category with space" will be in |
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
// function prototype to create queue and consumers with one call | |
RabbitStew.createConsumers(exchange, options, consumers); | |
// example usage | |
var exchange = RabbitStew.exchange(process.env.RABBIT_URL, 'test.exchange'); | |
var queue = createConsumers(exchange, { name: 'test.queue', exclusive: false }, { | |
'logs.error': function (data) { | |
... | |
return Promise.resolve('ack'); |
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
Advisors | |
has_many :licenses | |
has_many :contacts | |
has_many :contact_records, foreign_key => :owner_id | |
has_many :clients | |
has_many :affiliates | |
has_one :office | |
belongs_to :manager |
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
// | |
// C4WorkSpace.m | |
// | |
// Created by Travis Kirton | |
// | |
#import "C4WorkSpace.h" | |
@implementation C4WorkSpace { | |
NSMutableArray *skyImages, *tableImagesRight, *tableImagesLeft; |
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
.radio | |
input.radio-input(type='radio' name='ZIP99 FM - https://www.facebook.com/photo.php?fbid=10207850698527916&set=p.10207850698527916&type=3&theater') | |
.radio-container | |
.radio-fill |
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
/* | |
Drop this right after your document.ready statement and you can accurately use screenWidth and screenHeight to do dynamic calculations | |
*/ | |
screenWidth = window.innerWidth | |
|| document.documentElement.clientWidth | |
|| document.body.clientWidth; | |
screenHeight = window.innerHeight | |
|| document.documentElement.clientHeight | |
|| document.body.clientHeight; |
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
<?php | |
header('Content-Type: text/html; charset=utf-8'); | |
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'OneDriveClient.php'; | |
$client = new OneDriveClient('EwBYAq1DBAAUGCCXc8wU/zFu9QnLdZXy+YnElFkAAfMuYeVr71bpeGhrjEkpQerilJPcmh5WClc92WvF86QcVJ09c00C00bBiJJx/fqpt2yJvsDglNWfdMLIDpTR61kwq4CEcoDvlI1uyksJg9u62mSghrxEaJoEGyknY1s3LJOhzkZrycStJZ7uKsx7qd/2DU/mcFaGkEcH0ggGbwuEubeL8N4ZRJ0+I03M50uy722upZ1fGFjDikvJ//YqZYUHAI7HcPE9JSIhproutL/cpin61JvkEEI8yA0GC2ekqgBDasSpJi6f9nq8IQoGxpDubZwxiaW188YXj2r63Ktgfs/s5TYY8b7g+6OnpMeg0E678Y1W6PGG/g1a4N1T5rADZgAACGmwAtyU3SluKAFloXbZtKXG513XWnGB2LOnJEI2tCzi6Mq6WUJSZT0sLPGubkmxYGNHzpMXFUCblUt8EHO/RRCj+OWxqyd/d5h9ZAwkBhxnsvp9nixpdUDi2Y20TK6O+H7CxPsFqDLqSOV8MbrFXtkGBpDrVkiUcw+MOX5fDC3ixQzLts0GemJMYr/mT4qsTVQE67iR9IoGAOpatdMKXNKBLyFlv7OVTA9Q09hAb9hX1Ye0flepM/p/2827XCYdglO7d/Sk3RNFrruSLRwmixkpVKo1jr9q646hr83hMhXH7D9H5RsMS4FPT4QcoNVZ0TJolKJ8D1hGARqq+7W4rEhRMYSyGyAf8cnsGD2miNilF95z4zU2TQgBzs37/94sL/e7zmQGWQca9sSmBADHufdS+VAB'); | |
$result = $client->download_file('faila.txt'); | |
var_dump($ |
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
class abc { | |
public static void main(String[] args) { | |
DomainObject subDomain = null; | |
Map<DomainField, String> d = null; | |
subDomain.add(DomainField.ZIP, d.get(DomainField.ZIP)); | |
} | |
private static interface SomeOtherInterface { } | |
private static class FieldValueAssociation { } |