C-LVAN微信是什么么意思C-LVAN

114网址导航千万别惹程序员 - 开源中国社区
当前访客身份:游客 [
当前位置:
千万别惹程序员
酷壳好久没有发娱乐性质的技术文章了,搞得气氛有点严肃了,考虑到程序员们都是比较严肃和容易较真的类书呆子的群体,所以,需要更新一个有娱乐性质的文章了。正好最近看到了两个比较有趣的图,在新浪微博上都得到了比较不错的反响,因此,更新到酷壳上来。
如果编程语言是一种刀
下面这个图是把编程语言看做是一种刀,那么会是什么样的。这个图我个人感觉很有意思。
对于这个图,最好不要解释,意会就好。不过,我却有点想不解风情,忍不住想解释一下。
C++,C,Pascal 都是瑞士军刀,说明是用来做细活的工具。C语言的刀上有个USB,说明是可以做硬件操作的。C++的刀是什么都有,说明C++是一种功能繁多的语言。(图 中C++的那把瑞士军刀很强大,不要以为其是虚构的,这把刀是真实存在的,叫Wenger巨人刀, (这个网页上有个Youtube视频,可以爬墙去看),,价格在1万4左右。)
Java/C#是一把塑料餐刀,这说明,Java和C#语言是带虚拟机的,而且其语法和使用并不像C++那么复杂,其泛型编程可以有很多种玩法,而Java和C#的泛型编程是比较单一的。
Python是把电锯,人挡杀人,佛招杀佛,威力很大,面对大型的物体的修整,比C++/C/Java什么的得心应手得多得多,但是对于一些精细的调优工作,明显不行。这和Ruby很像。
PHP没有MySQL,明显是被幽默了一把。不过最近对PHP的批评越来越多,不过,facebook的PHP的引擎HiPo已经很牛B了。
Perl是一本日本武士刀,是忍者玩的语言。
VB,就是一个玩具。你见过用塑料玩具勺当刀的吗?Haskell感觉是外星来的。呵呵
千万别惹程序员
下图一张昨天我公司内部被传递的图片。经典的SQL注入式攻击。千万别惹程序员
这是一个有技术含量的号牌遮挡。我们先不说其是不是能奏效,不过,这个创意相当的NB啊。当你驾车通过某些路口时,被摄像头捕捉到你的车牌,通过 OCR变成文本,然后插入数据库,于是,上图的这个车牌就成了SQL注入。(不要以为车牌的OCR技术还不行,这项目技术已经非常成熟了,无论是国内还是 国外)。这张图片就如同“”中说的一样——永远不要相信用户的输入。
插曲:我昨天把这张图片,结果,被转了几万次,上了热门转发的top list和一些社会热点和明星八卦排在了一起。主要是被“@微博搞笑排行榜:& @全球潮流趣闻:& @实用小百科: @经典英文语录:& @当时我就泪奔了: @老榕: @全球经典音乐: @环球汽车搜罗: @怪诞心理行为学: @精彩电影: @互联网的那点事: @潮混搭:& @热门微博: @SinaAppEngine: ” 还有些什么体育记者,法律记者都转了, 这些转发了。这多少让我觉得有些诧异,这是很技术的一件事啊,怎么连什么电影,英文对白,汽车,音乐什么的都转了?我是相当的费解啊,我只能有两个认为——
简单的认为关心技术的人还是很多的。
复杂地认为国人是喜欢起哄的,不问为什么。
(全文完)
文章出处:
想通过手机客户端(支持 Android、iPhone 和 Windows Phone)访问开源中国:
旧一篇: 4年前
新一篇: 4年前
你也许会喜欢
drop database 太威武了
2楼:jonny123
有点意思,非常通俗易懂啊,:)
太凶残了。。。
5楼:Liuxd
车牌碉堡了!!!
6楼:绿色圣光
哈哈!大赞!不过关于车牌,反光,位置,0和O等等都是问题。
7楼:viperasi
程序猿,“人挡杀人,佛招杀佛,威力很大”!
9楼:南宫傲
drop database太残忍了
10楼:zhonghua.zhi
挺有意思的。
11楼:幽灵一号
为什么很多人批评php啊?那位大牛来回答一下
12楼:桔子
扯淡了python有那么牛再说一个delphi
13楼:Vincent Tone
PHP without mysql...不是还有PGSQL之类的?不过是幽默就是幽默好了。
14楼:yisen
跟删除 / 一样残忍
15楼:hokim
哇众取宠的文章及作者
16楼:fzxu_05
drop database 有权限么?哈哈
17楼:落舞者
车牌+1,由此联想到了条形码。。
18楼:种族歧视
19楼:SeaJones
经解释,终于明白车牌的威力了。哈哈。
20楼:leeyousee
看到PHP我笑了...
与内容无关的评论将被删除,严重者禁用帐号
本周热点资讯
本站最新资讯微机电系统_MEMS_技术及在引信中的应用_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
微机电系统_MEMS_技术及在引信中的应用
上传于||文档简介
&&微​机​电​系​统​_​M​E​M​S​_​技​术​及​在​引​信​中​的​应​用
阅读已结束,如果下载本文需要使用1下载券
想免费下载本文?
下载文档到电脑,查找使用更方便
还剩4页未读,继续阅读
你可能喜欢二次元同好交流新大陆
扫码下载App
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
#include &Windows.h&#include &exception&#include &assert.h&#ifndef ASSERT# & define ASSERT(f) assert(f)#endif#ifndef VERIFY# & define VERIFY(f) ((void)(f))#endif#ifndef ENSURE# & define ENSURE(cond) \& & do { int __afx_condVal=!!(cond); assert(__afx_condVal); if (!(__afx_condVal)){std::} } while (false)#endiftypedef UINT (__cdecl *_SIMPLETHREADPROC)(void*);#define ST_CREATE_SUSPENDED 1#define ST_CREATE_NORMAL & &0class CSimpleThread{public:& & CSimpleThread(void);& & CSimpleThread(_SIMPLETHREADPROC pfnThreadProc, LPVOID pParam);& & ~CSimpleThread(void);& & void CommonConstruct();& & BOOL CreateThread(DWORD dwCreateFlags = ST_CREATE_NORMAL, UINT nStackSize = 0,& & & & LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL);& & int GetThreadPriority();& & BOOL SetThreadPriority(int nPriority);& & DWORD SuspendThread();& & DWORD ResumeThread();& & operator HANDLE()& & HANDLE m_hT& & DWORD m_nThreadID;& & LPVOID m_pThreadP& & _SIMPLETHREADPROC m_pfnThreadP};inline BOOL CSimpleThread::SetThreadPriority(int nPriority){ ASSERT(m_hThread != NULL); return ::SetThreadPriority(m_hThread, nPriority); }inline int CSimpleThread::GetThreadPriority(){ ASSERT(m_hThread != NULL); return ::GetThreadPriority(m_hThread); }inline CSimpleThread::operator HANDLE() const{ return this == NULL ? NULL : m_hT }inline &DWORD CSimpleThread::ResumeThread(){ ASSERT(m_hThread != NULL); return ::ResumeThread(m_hThread); }inline &DWORD CSimpleThread::SuspendThread(){ ASSERT(m_hThread != NULL); return ::SuspendThread(m_hThread); }-----------------------------------------------------------------------------------------------------#include "SimpleThread.h"#include &process.h&struct SIMPLETHREAD_STARTUP{& & CSimpleThread* pT & & // CSimpleThread for new thread& & DWORD dwCreateF & & & &// thread creation flags& & HANDLE hE & & & & & & &// event triggered after success/non-success& & HANDLE hEvent2; & & & & & & // event triggered after thread is resumed& & // strictly "out" -- set after hEvent is triggered& & BOOL bE & & & & & & & &// TRUE if error during startup};UINT APIENTRY _SimpleThreadEntry(void* pParam){& & SIMPLETHREAD_STARTUP* pStartup = (SIMPLETHREAD_STARTUP*)pP& & ASSERT(pStartup != NULL);& & ASSERT(pStartup-&pThread != NULL);& & ASSERT(pStartup-&hEvent != NULL);& & ASSERT(!pStartup-&bError);& & CSimpleThread* pThread = pStartup-&pT& & { && & & & // do something before parent thread going.& & }& & // pStartup is invlaid after the following& & // SetEvent (but hEvent2 is valid)& & HANDLE hEvent2 = pStartup-&hEvent2;& & // allow the creating thread to return from CSimpleThread::CSimpleThread& & VERIFY(::SetEvent(pStartup-&hEvent));& & // wait for thread to be resumed& & VERIFY(::WaitForSingleObject(hEvent2, INFINITE) == WAIT_OBJECT_0);& & ::CloseHandle(hEvent2);& & // check for simple worker thread& & DWORD nResult = 0;& & if (pThread-&m_pfnThreadProc != NULL)& & {& & & & nResult = (*pThread-&m_pfnThreadProc)(pThread-&m_pThreadParams);& & }& & // cleanup and shutdown the thread& & _endthreadex(nResult);& & return 0; & // not reached}CSimpleThread::CSimpleThread(void){& & m_pThreadParams = NULL;& & m_pfnThreadProc = NULL;& & CommonConstruct();}CSimpleThread::CSimpleThread(_SIMPLETHREADPROC pfnThreadProc, LPVOID pParam){& & m_pfnThreadProc = pfnThreadP& & m_pThreadParams = pP& & CommonConstruct();}void CSimpleThread::CommonConstruct(){& & m_hThread = NULL;& & m_nThreadID = 0;}CSimpleThread::~CSimpleThread(void){& & // free thread object& & if (m_hThread != NULL)& & & & CloseHandle(m_hThread);}BOOL CSimpleThread::CreateThread(DWORD dwCreateFlags, UINT nStackSize,& & LPSECURITY_ATTRIBUTES lpSecurityAttrs){& & ENSURE(m_hThread == NULL); &// already created?& & // setup startup structure for thread initialization& & SIMPLETHREAD_STARTUP&& & memset(&startup, 0, sizeof(startup));& & startup.pThread =& & startup.hEvent = ::CreateEvent(NULL, TRUE, FALSE, NULL);& & startup.hEvent2 = ::CreateEvent(NULL, TRUE, FALSE, NULL);& & startup.dwCreateFlags = dwCreateF& & if (startup.hEvent == NULL || startup.hEvent2 == NULL)& & {& & & & if (startup.hEvent != NULL)& & & & & & ::CloseHandle(startup.hEvent);& & & & if (startup.hEvent2 != NULL)& & & & & & ::CloseHandle(startup.hEvent2);& & & & return FALSE;& & }& & // create the thread (it may or may not start to run)& & m_hThread = (HANDLE)(ULONG_PTR)_beginthreadex(lpSecurityAttrs, nStackSize, && & & & &_SimpleThreadEntry, &startup, dwCreateFlags | ST_CREATE_SUSPENDED, (UINT*)&m_nThreadID);& & if (m_hThread == NULL)& & {& & & & ::CloseHandle(startup.hEvent);& & & & ::CloseHandle(startup.hEvent2);& & & & return FALSE;& & }& & // start the thread just for initialization& & VERIFY(ResumeThread() != (DWORD)-1);& & VERIFY(::WaitForSingleObject(startup.hEvent, INFINITE) == WAIT_OBJECT_0);& & ::CloseHandle(startup.hEvent);& & // if created suspended, suspend it until resume thread wakes it up& & if (dwCreateFlags & ST_CREATE_SUSPENDED)& & & & VERIFY(::SuspendThread(m_hThread) != (DWORD)-1);& & // if error during startup, shut things down& & if (startup.bError)& & {& & & & VERIFY(::WaitForSingleObject(m_hThread, INFINITE) == WAIT_OBJECT_0);& & & & ::CloseHandle(m_hThread);& & & & m_hThread = NULL;& & & & ::CloseHandle(startup.hEvent2);& & & & return FALSE;& & }& & // allow thread to continue, once resumed (it may already be resumed)& & VERIFY(::SetEvent(startup.hEvent2));& & return TRUE;}
阅读(795)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
在LOFTER的更多文章
loftPermalink:'',
id:'fks_',
blogTitle:'[C/C++]模仿CWinThread的快捷简单的线程类CSimpleThread',
blogAbstract:'使用C++写多线程的时候,经常需要从头开始一步一步的写,造成很多重复代码。为了解决如此问题,我从CWinThread借鉴了几乎所有内容,写成了如下的简单线程类。CSimpleThread线程类只能工作在工作者模式下。PS:CWinThread支持工作者模式和用户模式双模式。-------------------------------------------------------------------------------------------------------------#pragma once#include &Windows.h&#include &exception&',
blogTag:'多线程,thread,线程安全,操作系统',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:8,
publishTime:8,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'0',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}}

我要回帖

更多关于 微信是什么 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信