Skip to content

Instantly share code, notes, and snippets.

View evgenyneu's full-sized avatar

Evgenii Neumerzhitckii evgenyneu

View GitHub Profile
@komasaru
komasaru / pi_bbp.cpp
Last active September 14, 2020 01:12
C++ source code to compute pi with BBP formula.
/***************************************************************
* Computing pi with BBP formula.
**************************************************************/
#include <math.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
@s-aska
s-aska / Keychain.swift
Last active September 16, 2022 03:37
Swift Keychain class ( supported Xcode 6.0.1 )
import UIKit
import Security
class Keychain {
class func save(key: String, data: NSData) -> Bool {
let query = [
kSecClass as String : kSecClassGenericPassword as String,
kSecAttrAccount as String : key,
kSecValueData as String : data ]