码迷,mamicode.com
首页 >  
搜索关键字:atomic write    ( 15635个结果
ASP.NET C# 去掉字符串中间空格方法
string strName = "大 张 伟"; string str = Regex.Replace(strName, @"\s", ""); Response.Write("输出内容:" + str);
分类:Web程序   时间:2014-06-18 21:18:50    阅读次数:215
Big Number------HDOJ杭电1212(大数运算)
Problem DescriptionAs we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to write a program to c...
分类:其他好文   时间:2014-06-18 21:09:31    阅读次数:303
rapidjson的read和write的sample
#include "json/document.h"#include "json/prettywriter.h"#include "json/stringbuffer.h"void test(){ //read json char json[100] = "{ \"hello\" : \"wo...
分类:Windows程序   时间:2014-06-18 21:05:40    阅读次数:702
[LeetCode] Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to...
分类:其他好文   时间:2014-06-18 20:54:36    阅读次数:202
Mysql锁机制和事务控制
如何加锁锁定表的语法: LOCK TABLES tbl_name [AS alias] {READ [LOCAL] | [LOW_PRIORITY] WRITE} [, tbl_name [AS alias] {READ [LOCAL] | [LOW_PRIORITY] WRITE}] ...解.....
分类:数据库   时间:2014-06-18 18:40:01    阅读次数:336
spin_lock & mutex_lock的差别?
本文由该问题引入到内核锁的讨论,归纳例如以下为什么须要内核锁?多核处理器下,会存在多个进程处于内核态的情况,而在内核态下,进程是能够訪问全部内核数据的,因此要对共享数据进行保护,即相互排斥处理有哪些内核锁机制?(1)原子操作atomic_t数据类型,atomic_inc(atomic_t *v)将v...
分类:其他好文   时间:2014-06-18 16:11:05    阅读次数:224
golang中的检验hash
1.对字符串进行hash大家可以看一下, SHA1 HashesGo by Example写道:The pattern for generating a hash is sha1.New(), sha1.Write(bytes), then sha1.Sum([]byte{}). 附上golang代...
分类:其他好文   时间:2014-06-18 16:07:48    阅读次数:294
[LeetCode] Same Tree
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:其他好文   时间:2014-06-18 12:32:58    阅读次数:169
Longest Common Prefix
题目 Write a function to find the longest common prefix string amongst an array of strings. 方法 从第一个字符开始,判断是否相同。 public String longestCommonPrefix(String[] strs) { if (strs ...
分类:其他好文   时间:2014-06-18 11:18:30    阅读次数:205
topcoder SRM 618 DIV2 WritingWords
只需要对word遍历一遍即可 int write(string word) { int cnt = 0; for(int i = 0 ; i < word.length(); ++ i){ cnt+=word[i]-'A'+1; ...
分类:其他好文   时间:2014-06-17 14:01:50    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!