##分布式系统(Distributed System)资料
介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.
##分布式系统(Distributed System)资料
介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'rest_client' | |
def send_mail | |
response = RestClient.post "http://api.sendcloud.net/apiv2/mail/send", | |
:apiUser => 'ahelp17cow_test_rSoOwt', # 使用api_user和api_key进行验证 | |
:apiKey => '', | |
:from => "help@17cow.com", # 发信人,用正确邮件地址替代 |
require "stripe" | |
# fill your secrete key below | |
Stripe.api_key = "" | |
=begin | |
Stripe::Charge.create({ | |
:amount => 2000, | |
:currency => "usd", | |
:source => "tok_1AfmufFvcm7x2qiEmA1KYAgk", # obtained with Stripe.js | |
:description => "Charge for emily.williams@example.com" | |
}, { |
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <signal.h> | |
#include <sys/wait.h> | |
pid_t p1, p2; | |
void handler(int s) | |
{ | |
kill(p1, SIGUSR1); | |
kill(p2, SIGUSR2); |
/*It seems to have done nothing if the ip address is the outside server. | |
*But it works quiet well on local. | |
*For example,the ip address is 192.168.1.1,the router of your network. | |
*Then all computers can hardly connect the Internet. | |
*然并卵!!! | |
* */ | |
#include<stdio.h> | |
#include<string.h> //memset | |
#include<sys/socket.h> |
def dpMakeChange(coinValueList,change,mincoins,coinsused): | |
for cents in range(change+1): | |
coincount = cents | |
newcoin = 1 | |
for j in [c for c in coinValueList if c <= cents]: | |
if mincoins[cents-j] + 1 <coincount: | |
coincount = mincoins[cents-j]+1 | |
newcoin = j | |
mincoins[cents] = coincount | |
coinsused[cents] = newcoin |