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
| First request (you can also call for xml format, like described in docs): | |
| curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST https://sales.futuresimple.com/api/v1/authentication.json -d'{"email": "MY_EMAIL", "password": "MY_PASSWORD"}' | |
| Response: | |
| {"authentication":{"token":"MY_TOKEN"}} | |
| Now i put this token in my headers like this (to get contacts, also you can specify for xml, like in docs): | |
| curl -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Pipejump-Auth: MY_TOKEN" -H "X-Futuresimple-Token: MY_TOKEN" -X GET https://sales.futuresimple.com/api/v1/contacts.json | |
| I receive json representation of contacts 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
| filepath = "../test" | |
| def parse_input(input): | |
| lines = input.split("\n") | |
| parse_lines(lines[1:-2]) | |
| def parse_lines(lines): | |
| list_container = list() | |
| tmp_list = list() | |
| for line in lines: |
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
| set nocompatible | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| Bundle 'gmarik/vundle' | |
| Bundle 'kien/ctrlp.vim' | |
| Bundle 'nono/vim-handlebars' | |
| Bundle 'kchmck/vim-coffee-script' |
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
| go max lastMax [] = max | |
| go max lastMax (x : xs) | |
| | lastMax + x < 0 = go max 0 xs | |
| | lastMax + x > max = go (lastMax + x) (lastMax + x) xs | |
| | otherwise = go max (lastMax + x) xs | |
| maxsum = go 0 0 |
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
| array.inject(Hash.new { |h, k| h[k] = [] }) { |result, pair| result[pair[0]] << pair[1]; result} |
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
| /* | |
| * To change this template, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| package triangle; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; |
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 'digest/sha1' | |
| bob_texts_c = [] | |
| mallory_texts_c = [] | |
| bob_texts = {} | |
| mallory_texts = {} | |
| bob_text = 'Wyplacic Bobowi 100 zlotych.' | |
| mallory_text = 'Wyplacic Mallory 100 zlotych.' |
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 <stdlib.h> | |
| #include <stdio.h> | |
| #include <sys/types.h> | |
| #include <unistd.h> | |
| #include <sched.h> | |
| #include <ctype.h> | |
| #include <process.h> | |
| #include <sys/wait.h> | |
| int main4(int argc, char *argv[]) { |