I hereby claim:
- I am arthraim on github.
- I am arthurwxy (https://keybase.io/arthurwxy) on keybase.
- I have a public key ASDzdcG3WrWCSwZw_MKETFLenwyM6AGcVXEiPErXfo7Zygo
To claim this, I am signing this object:
import Foundation | |
func longRunningTask() async throws { | |
// Simulate a long-running task | |
print("Long-running task started") | |
try await Task.sleep(nanoseconds: UInt64(60 * Double(NSEC_PER_SEC))) | |
print("Long-running task completed") | |
} | |
func timerTask() async throws { |
let JSON_COMMA = "," | |
let JSON_COLON = ":" | |
let JSON_LEFTBRACKET = "[" | |
let JSON_RIGHTBRACKET = "]" | |
let JSON_LEFTBRACE = "{" | |
let JSON_RIGHTBRACE = "}" | |
let JSON_QUOTE = "\"" | |
let JSON_WHITESPACES: [String] = [" ", "\t", "\n", "\r"] | |
let JSON_SYNTAX: [String] = [JSON_COMMA, JSON_COLON, |
#coding: utf-8 | |
from bottle import route, error, post, get, run, static_file, abort, redirect, response, request, template | |
@route('/') | |
@route('/index.html') | |
def index(): | |
return '<a href="/hello">Go to Hello World page</a>' | |
@route('/hello') | |
def hello(): |
/** | |
* Width of hairline (1px on real device screen) | |
* The dppx of screens can be found here http://dpi.lv/ | |
* | |
* @return CGFloat number to be set for "1px" | |
*/ | |
+ (CGFloat)hairLineWidth { | |
if ([UIScreen mainScreen].bounds.size.width == 414.f) { // Plus | |
return 1.f / 2.46f; // 2.46 is the dppx of plus screens | |
} else { |
.attribution.hover-card-parent { | |
display: none; | |
} | |
.tools.group { | |
display: none; | |
} | |
.extras { | |
display: none; | |
} | |
.dribbbles { |
//: An extremely easy implementation of redux in Swift 4 | |
// !!!! | |
// THIS IMPLEMENTATION HAS BEEN MOVED TO https://github.com/Arthraim/redux.swift | |
// !!!! | |
typealias Reducer<S, A> = (_ state: S, _ action: A) -> S | |
typealias Listener = () -> Void | |
class Store<S, A> { |
I hereby claim:
To claim this, I am signing this object:
# coding:utf-8 | |
def calc(p_count, p_price, m_count, m_price, w_count, w_price, t_p_count, t_m_count, t_w_count, t_price): | |
"""计算各套餐价格 | |
p_count -- 通话时间(分钟) | |
p_price -- 通话价格 | |
m_count -- 短信(条) | |
m_price -- 短信价格 | |
w_count -- 流量(mb) | |
w_price -- 流量价格 | |
t_p_count -- 套餐内通话时间 |
#coding: utf-8 | |
# http://acm.hdu.edu.cn/showproblem.php?pid=1312 | |
while True: | |
queue = [] | |
#input W and H | |
WnH = raw_input() | |
width = int(WnH.split(' ')[0]) | |
height = int(WnH.split(' ')[1]) |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSetRGBStrokeColor (context, 0, 0, 0, 1); | |
CGContextSetLineWidth(context, 1); | |
CGContextSetTextMatrix(context, CGAffineTransformMake(1.0,0.0, 0.0, -1.0, 0.0, 0.0)); | |
int hours = 0; | |
float gap = self.height / 24; | |
for (float y = gap; y < self.height + gap / 2; y += gap) { | |