然后残酷的事实证明了百度云的文件链不过来..
所有由罗佳(博主)发布的文章
wordpress里怎么给code标签用js转成代码列表呢
知道的童鞋举个手
这里来打个Win32应用程序最基本代码的笔记
此代码直接丢进VC或VS或C-Free或其他什么win下的编译器就可以直接编译运行,无需冷藏。。(在VS下需把编码调一下)
#include "windows.h" LRESULT CALLBACK MainWProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_PAINT: // 窗口客户区需要重画 { HDC hdc; PAINTSTRUCT ps; char szText[] = "这神马程序"; // 使无效的客户区变的有效,并取得设备环境句柄 hdc =BeginPaint (hwnd, &ps) ; // 显示文字 TextOut(hdc, 250, 10, szText, strlen(szText)); EndPaint(hwnd, &ps); return 0; } case WM_DESTROY: // 正在销毁窗口 // 向消息队列投递一个WM_QUIT消息,促使GetMessage函数返回0,结束消息循环 PostQuitMessage(0); return 0 ; } // 将我们不处理的消息交给系统做默认处理 return DefWindowProc(hwnd, message, wParam, lParam); } int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow) { TCHAR szClassName[] = "MainWClass"; WNDCLASSEX wndclass; // 用描述主窗口的参数填充WNDCLASSEX结构 wndclass.cbSize = sizeof(wndclass); // 结构的大小 wndclass.style = CS_HREDRAW|CS_VREDRAW; // 指定如果大小改变就重画 wndclass.lpfnWndProc = MainWProc; // 窗口函数指针 wndclass.cbClsExtra = 0; // 没有额外的类内存 wndclass.cbWndExtra = 0; // 没有额外的窗口内存 wndclass.hInstance = hInstance; // 实例句柄 wndclass.hIcon = LoadIcon(NULL,IDI_APPLICATION); // 使用预定义图标 wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); // 使用预定义的光标 wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); // 使用白色背景画刷 wndclass.lpszMenuName = NULL; // 不指定菜单 wndclass.lpszClassName = szClassName ; // 窗口类的名称 wndclass.hIconSm = NULL; // 没有类的小图标 // 注册这个窗口类 RegisterClassEx(&wndclass); // 创建主窗口 HWND hwnd = CreateWindowEx( 0, // dwExStyle,扩展样式 szClassName, // lpClassName,类名 "喵~", // lpWindowName,标题 WS_OVERLAPPEDWINDOW, // dwStyle,窗口风格 NULL, // X,初始 X 坐标 NULL, // Y,初始 Y 坐标 1000, // nWidth,宽度 500, // nHeight,高度 NULL, // hWndParent,父窗口句柄 NULL, // hMenu,菜单句柄 hInstance, // hlnstance,程序实例句柄 NULL) ; // lpParam,用户数据 // 显示窗口,刷新窗口客户区 ShowWindow(hwnd, nCmdShow); UpdateWindow(hwnd); // 从消息堆中取出消息 MSG msg; while(GetMessage(&msg, NULL, 0, 0)) { // 转化键盘消息 TranslateMessage(&msg); // 将消息发送到相应的窗口函数 DispatchMessage(&msg); } // 当GetMessage返回0时程序结束 return msg.wParam; }
这么就写完了
仿制示波器版BadApple教程
Bad Apple!
蓝移·思念
bilibili视频源文件地址获取工具(来自BlackGlory)
http://www.blackglory.me/biliget/
这里是原文章地址。
ajax那啥的通用框架
ajax虾米的最有爱了,用起来也很方便。。【第一次写长文,出错请留言来让我改正】
var xmlhttp; //创建一个Request对象先 if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST或者GET","请求的脚本文件",true或false【不加引号,true是异步,false是同步】); //异步通俗的说就是请求时浏览器接着干其他事,同步就是浏览器要等服务器处理完了才接着做其他事 xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) //当海枯石烂的时候 { //这里就可以做ajax接收后行为的事了,然后xmlhttp.responseText是从服务器扔回来的数据。 } } xmlhttp.send("这里是发送出去的数据");
未来程序猿之歌
mysql的蛋疼注意事项一条
今天一个神一般的问题纠结了我一天。。
那就是Mysql创建table的时候,语法问题。
本来是想做个ip记录模块的,结果时间都浪费在这里了。接下来是高能重点!!!!
$info = "CREATE TABLE ips ( number int NOT NULL AUTO_INCREMENT, PRIMARY KEY(number), ip varchar(30) )"; mysql_query($info,$sql);
上面这是修改后正确的代码(其中一个原来出错的部分),先来猜猜原来是哪里出错了呢~~~~
希望这是大多数人都遇到过的问题,接下来公布答案。。
那就是ip varchar(30)这个了,不得不说mysql解析的智能程度还不够,我只是在最后加了个,而已,它就不认爹了【也就是ip varchar(30),】
接下来是错误版
$info = "CREATE TABLE ips ( number int NOT NULL AUTO_INCREMENT, PRIMARY KEY(number), ip varchar(30), //←注意这个悲催的逗号,难道逗号后面没有参数它就不能当作空参数吗!执行到这里就直接当作错误跳过了【坑爹呐!!!(掀桌子)】 )"; mysql_query($info,$sql);
值得庆幸的是。。我终于发现并解决了这个问题。ip记录模块还有希望的说喵~~
太阳君和月亮酱
上个例子先。。
然后由于某些原因。。在文章后面的这个太阳或者月亮就是例子了。
单独的例子看这里:demo.luojia.me/sunandmoon/
<html> <head> <script src="http://www.luojia.tk/jquery.js"></script> <script> function resunmoondivsize(){ var height=window.innerHeight; var width=window.innerWidth; if(height>width){ document.getElementById("sunmoondiv").style.width=width*2; document.getElementById("sunmoondiv").style.height=width*2; } else{ document.getElementById("sunmoondiv").style.width=height*2; document.getElementById("sunmoondiv").style.height=height*2; } document.getElementById("sunmoondiv").style.left=(width-document.getElementById("sunmoondiv").style.width); var divwidth=document.getElementById("sunmoondiv").style.width; var divheight=document.getElementById("sunmoondiv").style.height; var setwidth=width/2; var setdivwidth=divwidth/2; document.getElementById("sunmoondiv").style.left=setwidth-setdivwidth; document.getElementById("sunmoondiv").style.top=divheight/2; } function setsunmoon(){ var divwidth=document.getElementById("sunmoondiv").style.width; var sunwidth=document.getElementById("sun").style.width; var moonwidth=document.getElementById("moon").style.width; } sunshinejiaodu=0; function zhuansunshine(){ sunshinejiaodu=sunshinejiaodu+0.4; var jiaodu="rotate("+sunshinejiaodu+"deg)"; $("#sunshine").css({"transform":jiaodu,"-webkit-transform":jiaodu,"-moz-":jiaodu,"-ms-":jiaodu,"-o-":jiaodu}); } function zhuansunmoon(){ var date=new Date(); var zhengtijiaodu=(date.getHours()*60+date.getMinutes()+date.getSeconds()/60)*0.25; var jiaodu="rotate("+zhengtijiaodu+"deg)"; $("#sunmoondiv").css({"transform":jiaodu,"-webkit-transform":jiaodu,"-moz-":jiaodu,"-ms-":jiaodu,"-o-":jiaodu}); } </script> </head> <body style="margin: 0px;"> <div style="position:fixed;height:100%;width:100%;overflow:hidden;min-height:360px;min-width:360px;" id="sunmoonmain"> <div style="position:relative;min-height:360px;min-width:360px; margin:0px auto;" id="sunmoondiv"> <!--月亮酱--> <div style="position:absolute;height:180px;width:180px;overflow:hidden;top:0px;left:50%; margin-left:-90px;transform:scale(0.5);-webkit-transform:scale(0.5);-o-transform:scale(0.5);-ms-transform:scale(0.5);-moz-transform:scale(0.5);" id="moon"> <div style="position:absolute;width:50%;height:50%;left:22.5%;top:22.5%;border-radius:999px; background-color:rgba(255,204,51,0.6)"></div> </div> <!--太阳君--> <style> div.suncolor{background-color:rgba(255,0,0,0.8);} </style> <div style="position:absolute;height:180px;width:180px;overflow:hidden;bottom:0px;left:50%; margin-left:-90px;transform:scale(0.5);-webkit-transform:scale(0.5);-o-transform:scale(0.5);-ms-transform:scale(0.5);-moz-transform:scale(0.5);" id="sun"> <div style="position:absolute;width:50%;height:50%;left:25%;top:25%;border-radius:999px;" class="suncolor"></div> <div style="position:absolute;height:180px;width:180px;" id="sunshine"> <div style="position:absolute;width:3px;height:13%;left:88.5px;top:16px;" class="suncolor"></div> <div style="position:absolute;width:13%;height:3px;top:88.5px;right:16px;" class="suncolor"></div> <div style="position:absolute;width:3px;height:13%;left:88.5px;bottom:16px;" class="suncolor"></div> <div style="position:absolute;width:13%;height:3px;top:88.5px;left:16px;" class="suncolor"></div> <div style="position:absolute;height:180px;width:180px;transform:rotate(22.5deg);-webkit-transform:rotate(22.5deg);-moz-transform:rotate(22.5deg);-ms-transform:rotate(22.5deg);-o-transform:rotate(22.5deg);"> <div style="position:absolute;width:3px;height:7%;left:88.5px;top:26px;" class="suncolor"></div> <div style="position:absolute;width:7%;height:3px;top:88.5px;right:26px;" class="suncolor"></div> <div style="position:absolute;width:3px;height:7%;left:88.5px;bottom:26px;" class="suncolor"></div> <div style="position:absolute;width:7%;height:3px;top:88.5px;left:26px;" class="suncolor"></div> <div style="position:absolute;height:180px;width:180px;transform:rotate(22.5deg);-webkit-transform:rotate(22.5deg);-moz-transform:rotate(22.5deg);-ms-transform:rotate(22.5deg);-o-transform:rotate(22.5deg);"> <div style="position:absolute;width:3px;height:13%;left:88.5px;top:16px;" class="suncolor"></div> <div style="position:absolute;width:13%;height:3px;top:88.5px;right:16px;" class="suncolor"></div> <div style="position:absolute;width:3px;height:13%;left:88.5px;bottom:16px;" class="suncolor"></div> <div style="position:absolute;width:13%;height:3px;top:88.5px;left:16px;" class="suncolor"></div> <div style="position:absolute;height:180px;width:180px;transform:rotate(22.5deg);-webkit-transform:rotate(22.5deg);-moz-transform:rotate(22.5deg);-ms-transform:rotate(22.5deg);-o-transform:rotate(22.5deg);"> <div style="position:absolute;width:3px;height:7%;left:88.5px;top:26px;" class="suncolor"></div> <div style="position:absolute;width:7%;height:3px;top:88.5px;right:26px;" class="suncolor"></div> <div style="position:absolute;width:3px;height:7%;left:88.5px;bottom:26px;" class="suncolor"></div> <div style="position:absolute;width:7%;height:3px;top:88.5px;left:26px;" class="suncolor"></div> </div> </div> </div> </div> </div> </div> </div> <script> $(document).ready(function(e) { resunmoondivsize(); setsunmoon(); zhuansunmoon(); setInterval('zhuansunshine()',100); setInterval('zhuansunmoon()',60000); $(window).resize(function() { resunmoondivsize(); }); }); </script> </body> </html>
由MySQL引起的笔记
升级win8以后各种碉堡,IIS先挂还拉上了千辛万苦装好的MySQL,于是就把这货卸了再装。但他怎么卸的时候就不顺便把服务删了呢!!!so,这篇文章出现了。
以下才是主要部分:
sc delete 服务名(应该要注意大小写的吧..)
于是这篇文章就这样结束了。。
纯属酱油文
传说中的无意义文章就是这样了。。。
CHAOTIC UNIVERSE
如果无法正常观看可能要进一遍bilibili官网随便看个视频(不知何原因)
FREELY TOMORROW(MMDPV)
如果无法正常观看可能要进一遍bilibili官网随便看个视频(不知何原因)
源地址:http://www.bilibili.tv/video/av361656/
CSS3旋转和放大缩小元素
不解释,直接上demo(解释都写在demo里了。。)
于是请疯狂的点这里:demo.luojia.me/css3/