先还是要称赞一下 Apple 的 Mail,比Windows 的 Live Mail 要强太多了:+1:。之前我只是简单的输入了一下Google Apps的账号信息,它就能替我同步邮件了,甚至我都没有在Google Apps 中enable 它的 smtp 和 imtp,太神奇了。而到了Live Mail 这边,就不行了,必须一步一步设置,甚至连端口号,都得我从网上去查。但是这样一来,就带了一点麻烦,因为之前 Mail 已经为我同步了邮件,enable Google Apps 的 smtp 和 imtp 之后,它又替我把每一封邮件重复下载了一遍。还好,我用下面这段 AppleScript 把重复的邮件都删除了,非常好的练手机会。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(RCurl) | |
library(stringr) | |
RootURL <- "http://10.130.19.139/19659/" | |
DatFileURLs <- c() | |
CheckDatFolder <- function(folder) | |
{ | |
URL <- sprintf("%s%s/", RootURL, folder) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ReadUserInfoFunc <- function(file) | |
{ | |
#print(file) | |
ret <- read.table(file, header=TRUE, sep=",") | |
return (ret) | |
} | |
SplitIntoBox <- function(num, split) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lx = c(1:9) | |
ly = c(10:18) | |
#pdf 的单位应该是inch | |
#pdf("D:/firstpdf.pdf", width=100, height=10) | |
# png 的单位是像素 | |
png("D:/firstpng.png", width=640, height=1280) | |
opar <- par(no.readonly = TRUE) | |
par(mfrow=c(3, 1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ChromiumEmbedded_test.cpp : Defines the entry point for the application. | |
// | |
#include "stdafx.h" | |
#include <assert.h> | |
#include "ChromiumEmbedded_test.h" | |
#include "include\cef_app.h" | |
#include "bareboneshandler.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// draw window background | |
// before this ctx should be created first in every rendering frame, like this: | |
// cairo::Context ctx(cario::createWindowSurface()) | |
void renderScene(cairo::Contect& ctx) | |
{ | |
// clear the context with our radial gradient | |
cairo::GradientRadial radialGrad( getWindowCenter(), 0, getWindowCenter(), getWindowWidth() ); | |
radialGrad.addColorStop( 0, Color( 1, 1, 1 ) ); | |
radialGrad.addColorStop( 1, Color( 0.6, 0.6, 0.6 ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool getline(FILE* f, std::string& line) | |
{ | |
line.clear(); | |
char c = 0; | |
do { | |
c = fgetc(f); | |
if (c == EOF) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// iterate from fromD(like "2014-04-02") to toD("2014-05-02") | |
std::string tpStr = fromD; | |
do { | |
//std::cout << tpStr << std::endl; | |
ParseIntoUserInfoDB(tpStr, root, order); | |
std::tm tm; | |
std::stringstream ss(tpStr + " 0:0:1"); | |
ss >> std::get_time(&tm, "%Y-%m-%d %H:%M:%S"); | |
auto tp = std::chrono::system_clock::from_time_t(std::mktime(&tm)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "=======ExportUserReport bash===========" | |
Root="http://10.130.19.139/19659/" | |
Root2="http://10.164.7.76/19659/" | |
DateBegin=$1 | |
TargetRoot="F:/UserReport/" | |
d=$DateBegin | |
while true; do | |
echo $d |
OlderNewer