Skip to content

Instantly share code, notes, and snippets.

run program 'java -jar exportedJar.jar'
Test 1 PASSED (empty balance) [w=1.00]
Test 2 PASSED (sum of two expenses) [w=1.00]
Test 3 PASSED (not using external storage) [w=1.00]
Test 4 PASSED (no message) [w=1.00]
Test 5 PASSED (sender involved) [w=1.00]
Test 6 PASSED (don't register transaction when amount is 0) [w=0.50]
Test 7 PASSED (should handle decimals) [w=1.00]
Test 8 PASSED (should discard wrong handlers) [w=1.00]
Test 9 PASSED (discard ill-formatted messages) [w=1.00]
Test 1 PASSED (empty balance) [w=1.00]
Test 2 PASSED (sum of two expenses) [w=1.00]
Test 3 PASSED (not using external storage) [w=1.00]
Test 4 PASSED (no message) [w=1.00]
Test 5 PASSED (sender involved) [w=1.00]
Test 6 PASSED (don't register transaction when amount is 0) [w=0.50]
Test 7 PASSED (should handle decimals) [w=1.00]
Test 8 PASSED (should discard wrong handlers) [w=1.00]
Test 9 PASSED (discard ill-formatted messages) [w=1.00]
Test 10 PASSED (negative expenses) [w=0.50]
export var IBAuthenticationManager = {
completeAuthenticationOfInstagramUserInfo_instagramCookies_asSecondaryAccount_challenge_completion:function(userInfo, cookies, asSecondaryAccount, challenge, completion){
self.context().APIManager().postLoginChallenge_instagramUserInfo_receiptEnabled_block(challenge, userInfo, self.context().settingsManager().settings().receiptVerificationEnabled(),
block("ORAPIResponse *", function(response){
if (response.result() != 1) {
if(response.serverErrorCode == 331){
utils.alert(""+response.serverErrorMessage().toJS());
completion(7)
return
}
export var IBAuthenticationManager = {
completeAuthenticationOfInstagramUserInfo_instagramCookies_asSecondaryAccount_challenge_completion:function(userInfo, cookies, asSecondaryAccount, challenge, completion){
self.context().APIManager().postLoginChallenge_instagramUserInfo_receiptEnabled_block(challenge, userInfo, self.context().settingsManager().settings().receiptVerificationEnabled(),
block("ORAPIResponse *", function(response){
if (response.result() != 1) {
if(response.serverErrorCode == 331){
utils.alert(""+response.serverErrorMessage().toJS());
completion(7)
return
}
@cipolleschi
cipolleschi / IG_video_resource_sample.json
Created July 12, 2016 13:15
This is the json of a video that comes from instagram.
{
"taken_at": 1447227470,
"pk": 1115747346106909319,
"id": "1115747346106909319_2204139703",
"device_timestamp": 1447227266,
"media_type": 2,
"code": "977ky_yYKH",
"client_cache_key": "MTExNTc0NzM0NjEwNjkwOTMxOQ==.2",
"filter_type": 0,
"image_versions2": {
@cipolleschi
cipolleschi / LocaleList
Created January 31, 2019 15:15
All possible localse
Id: eu
language code: Optional("eu")
collator: Optional("eu")
---
Id: hr_BA
language code: Optional("hr")
collator: Optional("hr_BA")
---
Id: en_CM
language code: Optional("en")
@cipolleschi
cipolleschi / TabbarFullCode.swift
Created December 16, 2019 09:08
Custom Tabbar with Containment API
import UIKit
// MARK: - Tabbar VC
// Base view controller of the tabbar
class TabbarViewController: UIViewController {
// list of all the supported tabs
enum Tab: String {
case tab1, tab2, tab3
}
@cipolleschi
cipolleschi / RamenLegacyState.swift
Last active January 8, 2020 11:33
Proposal to remove the GlobalHak
import UIKit
// MARK: - Ramen State
public struct RamenState: AnyStateWithRamen, AnyLegacyState {
public var monetizationState: MonetizationState {
get { return monetizationState(from: self.monopolyState) }
}
var monopolyState: MonopolyState
}
@cipolleschi
cipolleschi / vcInApplicationDidFinishLaunching.swift
Last active March 15, 2020 14:26
setup the ifrst VC in applicationDidFinishLaunching
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
let window = UIWindow()
let vc = ViewController()
vc.view.backgroundColor = .red
window.rootViewController = vc
self.window = window
@cipolleschi
cipolleschi / Podfile
Last active March 15, 2020 14:48
Default podfile for katana and tempura
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'DiceRoller' do
platform :ios, '13.0'
pod 'Katana', '~> 3.0'
pod 'Tempura', '~> 4.0'
end