# golang+数据库定时任务 --- ``` 项目背景大致如下,楼主在用nodejs写项目时遇到一些需要定时去处理的事情,例如僵尸用户定时清除,一些产品定时下架,邮件定时发送等等! 期初使用nodejs setTimeOut递归嵌套实现...
                            
                            
                                分类:
数据库   时间:
2015-05-26 21:40:02   
                                阅读次数:
320
                             
                         
                    
                        
                            
                            
                                悲观锁(Pessimistic Lock), 顾名思义,就是很悲观,每次去拿数据的时候都认为别人会修改,所以每次在拿数据的时候都会上锁,这样别人想拿这个数据就会block直到它拿到锁。传统的关系型数据库里边就用到了很多这种...
                            
                            
                                分类:
其他好文   时间:
2015-05-26 21:40:20   
                                阅读次数:
139
                             
                         
                    
                        
                            
                            
                                CORAU OPENCART 2.X 自适应主题模板 ABC-0567 ?Corau is a new responsive and elegant OpenCart theme. It’s suitable for fashion, clothing,high fashion, jewelries, shoes, hats, accessories stores. It...
                            
                            
                                分类:
其他好文   时间:
2015-05-26 21:39:13   
                                阅读次数:
177
                             
                         
                    
                        
                            
                            
                                var fs = require(‘fs‘);
var async = require(‘../lib/async.js‘)
var db=require(‘../lib/mysql.js‘);
!function main(){
    async.waterfall([function(call){
       fs.readFile(‘./aaa.html‘,‘utf-8‘,call...
                            
                            
                                分类:
其他好文   时间:
2015-05-26 21:39:09   
                                阅读次数:
143
                             
                         
                    
                        
                            
                            
                                测试service中使用了一个Toast来打印log。 提示无法调用Looper.prepare() 加入后代码正常执行。 ?Looper.prepare();????
?Toast.makeText(getApplicationContext(),?"Services?Thread",?Toast.LENGTH_LO...
                            
                            
                                分类:
移动开发   时间:
2015-05-26 21:39:48   
                                阅读次数:
800
                             
                         
                    
                        
                            
                            
                                Oracle更改表空间文件位置: set oracle_sid=orcl; sqlplus /nolog conn sys/password as sysdba; shutdown immediate; 复制(移动)数据文件至新路径 startup mount; alter database rename file ‘c:\oracle_d...
                            
                            
                                分类:
数据库   时间:
2015-05-26 21:38:59   
                                阅读次数:
145
                             
                         
                    
                        
                            
                            
                                同样的一个URL在浏览器中输入可以查询并正确的返回结果 ?? 而在代码中使用HTTPClient来请求的时候总是报URL中包含非法字符。 ? ? 经过一番思索分析后来也搞明白了:需要将大括号进行编码,也就是URL...
                            
                            
                                分类:
Web程序   时间:
2015-05-26 21:38:37   
                                阅读次数:
314
                             
                         
                    
                        
                            
                            
                                laravel必须PHP>5.4支持mcrypt。 从https://github.com/overtrue/latest-laravel?这里下载大神整理好的,解压即可使用 nginx伪静态: server
	{
		listen?80;
		#listen?[::]:80;
		server_name?laravel.zy62....
                            
                            
                                分类:
系统相关   时间:
2015-05-26 21:38:48   
                                阅读次数:
456
                             
                         
                    
                        
                            
                            
                                //
//??ViewController.m
//??SQLLITE
//
//??Created?by?wup?on?15/5/26.
//??Copyright?(c)?2015年?apple.?All?rights?reserved.
//
#import?"ViewController.h"
#import?<sqlite3.h>
#im...
                            
                            
                                分类:
数据库   时间:
2015-05-26 21:36:44   
                                阅读次数:
300
                             
                         
                    
                        
                            
                            
                                本文出自:http://wuyudong.com/archives/119? 对于全分布式的HBase安装,需要通过hbase-site.xml文档来配置本机的HBase特性,由于各个HBase之间通过zookeeper来进行通信,因此需要维护一组zookeeper系统,关于z...
                            
                            
                                分类:
其他好文   时间:
2015-05-26 21:36:48   
                                阅读次数:
262
                             
                         
                    
                        
                            
                            
                                题目如下:
A long-distance telephone company charges its customers by the following rules:
Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is...
                            
                            
                                分类:
编程语言   时间:
2015-05-26 21:35:30   
                                阅读次数:
1019
                             
                         
                    
                        
                            
                            
                                ADO.NET数据访问技术的一个突出的特点就是支持离线访问,而实现这种离线访问技术的核心就是DataSet对象,该对象通过将数据驻留在内存来实现离线访问。
        DataSet对象概述
        DataSet对象由一组DataTable对象组成,这些对象与DataRelation对象互相关联。这些DataSet对象又包含Rows集合,Columns集合,Rows集合由多个Da...
                            
                            
                         
                    
                        
                            
                            
                                3Sum Closest : https://leetcode.com/problems/3sum-closest/Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three in...
                            
                            
                                分类:
其他好文   时间:
2015-05-26 21:36:09   
                                阅读次数:
132
                             
                         
                    
                        
                            
                            
                                今天做一个小Demo用到了SoundPool,总结一下。
MediaPlayer缺点:不能重叠播放音乐,封装程度比较高,所以加载起来会比较慢。
SoundPool简介
Android系统提供了另一种播放音效的类。用来加载多个音效,短促音效和多个短促音效,可自行设置声音品质,音量,重复和优先级。在一定场合还是很好用的。
属于android.media包下,继承自Object。
...
                            
                            
                                分类:
移动开发   时间:
2015-05-26 21:37:37   
                                阅读次数:
219
                             
                         
                    
                        
                            
                            
                                1、LinkList.h
#ifndef _LINKLIST_H_
#define _LINKLIST_H_
typedef void LinkList;
typedef struct _tag_LinkListNode LinkListNode;
struct _tag_LinkListNode
{
    LinkListNode* next;
};
Link...
                            
                            
                                分类:
编程语言   时间:
2015-05-26 21:35:26   
                                阅读次数:
197
                             
                         
                    
                        
                            
                            
                                题目描述 Description 
设r是个2k2^k进制数,并满足以下条件: 
(1)r至少是个2位的2k2^k进制数。 
(2)作为2k进制数,除最后一位外,r的每一位严格小于它右边相邻的那一位。 
(3)将r转换为2进制数q后,则q的总位数不超过w。 
在这里,正整数k(1≤k≤91≤k≤9)和w(k<W≤30000)w(k<W≤30000)是事先给定的。 
问:满足上述条件的不同的r共有多少...
                            
                            
                                分类:
其他好文   时间:
2015-05-26 21:37:27   
                                阅读次数:
1063
                             
                         
                    
                        
                            
                            
                                树上的背包
#include 
#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;
const int MAXN = 110;
int n, m;
struct Node {
    int num,cost, val;
}room[MAXN];
int  dp[MAXN][M...
                            
                            
                                分类:
其他好文   时间:
2015-05-26 21:34:37   
                                阅读次数:
144