Skip to content

Instantly share code, notes, and snippets.

@ystrohanov
ystrohanov / Swift4JSONValue.swift
Created January 14, 2020 22:02 — forked from hannesoid/Swift4JSONValue.swift
Decodes an unknown JSON structure using Swift 4 Decoding
import XCTest
// Requires a recent Swift 4 snapshot toolchain (Xcode 9 beta 2 not new enough)
public indirect enum JSONValue: Decodable {
case double(Double)
case string(String)
case bool(Bool)
case dictionary([String: JSONValue])
case array([JSONValue])
@robcarver17
robcarver17 / temp.py
Last active September 17, 2022 13:55
# Gist example of IB wrapper ...
#
# Download API from http://interactivebrokers.github.io/#
#
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install
#
# Note: The test cases, and the documentation refer to a python package called IBApi,
# but the actual package is called ibapi. Go figure.
#
# Get the latest version of the gateway:
@robcarver17
robcarver17 / temp.py
Created July 6, 2017 08:09
ibAPIexample2.py
# Gist example of IB wrapper ...
#
# Download API from http://interactivebrokers.github.io/#
#
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install
#
# Note: The test cases, and the documentation refer to a python package called IBApi,
# but the actual package is called ibapi. Go figure.
#
# Get the latest version of the gateway:
@hannesoid
hannesoid / Swift4JSONValue.swift
Created June 26, 2017 13:47
Decodes an unknown JSON structure using Swift 4 Decoding
import XCTest
// Requires a recent Swift 4 snapshot toolchain (Xcode 9 beta 2 not new enough)
public indirect enum JSONValue: Decodable {
case double(Double)
case string(String)
case bool(Bool)
case dictionary([String: JSONValue])
case array([JSONValue])
# Gist example of IB wrapper ...
#
# Download API from http://interactivebrokers.github.io/#
#
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install
#
# Note: The test cases, and the documentation refer to a python package called IBApi,
# but the actual package is called ibapi. Go figure.
#
# Get the latest version of the gateway:
# Gist example of IB wrapper ...
#
# Download API from http://interactivebrokers.github.io/#
#
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install
#
# Note: The test cases, and the documentation refer to a python package called IBApi,
# but the actual package is called ibapi. Go figure.
#
# Get the latest version of the gateway:
# Gist example of IB wrapper ...
#
# Download API from http://interactivebrokers.github.io/#
#
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install
#
# Note: The test cases, and the documentation refer to a python package called IBApi,
# but the actual package is called ibapi. Go figure.
#
# Get the latest version of the gateway:
@thousandlemons
thousandlemons / how-to-connect-django-to-remote-mysql.md
Created November 1, 2016 09:06
How to Connect Django to Remote MySQL

How to Connect Django to Remote MySQL

==[ONLY for Ubuntu]== Install libmysqlclient-dev

$ sudo apt-get install libmysqlclient-dev

Install mysqlclient.

import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
},
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };
@arturlector
arturlector / ios-questions-interview.md
Last active February 25, 2024 18:44
Вопросы на собеседование iOS разработчика.

Вопросы на собеседование iOS разработчика (дополненное издание):

General:

  • Что такое полиморфизм?

  • Что такое *инкапсуляция? Что такое *нарушение инкапсуляции?

  • Чем абстрактный класс отличается от интерфейса?

  • Расскажите о паттерне MVC. Чем отличается пассивная модель от активной?