2013年4月26日

摘要: 为了做像 MS 0ffice 2013 风格的界面。这是MahApps.Metro的文档;在安装mahapps.metro(找不到下载链接)之前,先安装NuGet,原因;Installing NuGet;然后按照MahApps.Metro的文档来进行。安装包的的时候可能会遇到问题:PM> Install-Package MahApps.MetroInstall-Package : 基础连接已经关闭: 发送时发生错误。所在位置 行:1 字符: 16+ Install-Package <<<< MahApps.Metro + CategoryInfo : NotSpe阅读全文
posted @ 2013-04-26 15:10 SubmarineX 阅读(66) 评论(0) 编辑

2013年4月16日

摘要: 1、后台打开网页1 private void OpenWeb(object sender, RoutedEventArgs e)2 {3 System.Diagnostics.Process.Start("http://www.cnblogs.com/submarine");4 }2、窗口间跳转1 private void LogInSucc(object sender, RoutedEventArgs e)2 {3 this.Hide();4 OtherWindow win = new OtherWindow();5 win.Show();6 }3、垂直分割线...阅读全文
posted @ 2013-04-16 09:44 SubmarineX 阅读(97) 评论(0) 编辑

2013年4月14日

摘要: 推荐软件:Windows Hotkey Explorer问题:QQ的Ctrl+Alt+A热键被占用,发现被foobar2000占用,经排查是它的插件AutoLyric以此作为全局热键。阅读全文
posted @ 2013-04-14 10:07 SubmarineX 阅读(8) 评论(0) 编辑

2013年4月2日

摘要: 本文内容部分转自:巧用CSS文件愚人节恶搞代码转自:wesbos/aprilFools.css一、打开浏览器的 Custom.css 文件本文以 Chrome 为例(CSS 修改后立即生效),进入同事或朋友的电脑,按下面方式打开 Custom.css 文件Mac:~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.cssWindows XP:系统盘:\Documents and Settings\用户名\Local Settings\Application Data\Google\Chrome\阅读全文
posted @ 2013-04-02 10:28 SubmarineX 阅读(15) 评论(0)  编辑

2013年3月19日

摘要: 1、评级使用组件:foo_playcount.fb2k-componentFoobar2000:Components/Playback Statistics v3.x (foo playcount)======================================进入foobar2000;选择菜单栏中的“Library”中的“Configure”;======================================添加组件:选择左侧栏中的“Components”;把文件拖入右侧栏中,“Apply”;提示重启foobar2000。========================阅读全文
posted @ 2013-03-19 19:31 SubmarineX 阅读(67) 评论(0) 编辑

2013年3月17日

摘要: 《C++标准程序库》13.10.3 将标准 Streams 重新定向(Redirecting)通过“设置 stream 缓冲区”来重定向某个 sream。“设置 stream 缓冲区”意味 I/O stream 的重定向可由程控,不必借助操作系统。 1 #include <iostream> 2 #include <fstream> 3 4 using namespace std; 5 6 void Redirect(ostream &); 7 8 int main() 9 {10 cout << "the first row" 阅读全文
posted @ 2013-03-17 18:26 SubmarineX 阅读(50) 评论(0) 编辑
 
摘要: News:we released SIMD-oriented Fast Mersenne Twister (SFMT). SFMT is roughly twice faster than the original Mersenne Twister, and has a better equidistibution property, as well as a quicker recovery from zero-excess initial state. Clickhere!(2007/1/31)Among the all previous initialization routines o阅读全文
posted @ 2013-03-17 16:20 SubmarineX 阅读(19) 评论(0)  编辑
 
摘要: About Processes and ThreadsEach process provides the resources needed to execute a program. A process has a virtual address space, executable code, open handles to system objects, a security context, a unique process identifier, environment variables, a priority class, minimum and maximum working se阅读全文
posted @ 2013-03-17 10:26 SubmarineX 阅读(30) 评论(0)  编辑

2013年3月13日

摘要: 【大街分享】 惠普(HP)惠普大中华区总裁孙振耀退休后九大感言这是前HP大中华区总裁孙振耀在从HP退休15天后的九大职场感言。这篇文章是在孙振耀5月卸任后所撰写,距今已经将近4,5年时间,但至今读来,仍然让很多职场中人受益匪浅,今天推荐给大家。-----------------------文章分割线----------------------- 一、关于工作与生活 我有个有趣的观察,外企公司多的是25-35岁的白领,40岁以上的员工很少,二三十岁的外企员工是意气风发的,但外企公司40岁附近的经理人是很尴尬的。我见过的40岁附近的外企经理人大多在一直跳槽,最后大多跳到民企,比方说,唐骏。外企..阅读全文
posted @ 2013-03-13 22:58 SubmarineX 阅读(16) 评论(0)  编辑

2013年3月2日

摘要: 参看维基百科:Dangling pointer迷途指针===============================================================================================温馨提示:由于本人英语水品有限,有些地方翻译得可能不准确,也比较生涩。===============================================================================================当所指向的对象被释放或者收回,但是对该指针没有作任何的修改,以至于该指针仍旧指向已经回收的内存地阅读全文
posted @ 2013-03-02 16:03 SubmarineX 阅读(904) 评论(0) 编辑
 
摘要: const int *const method(const int *const &param) const; 1 2 3 4 51:const int常量整型(值不能被修改)2:*const常量指针(指向的对象不能被修改)1和2结合起来:const int *const method();返回指向常量整型的常量指针。3:同14:同23和4结合起来:const int *const &param形参为指向 指向常量整型的常量指针的 引用。5:method() const;调用该方法,不会改变该类内部非 muta...阅读全文
posted @ 2013-03-02 13:31 SubmarineX 阅读(101) 评论(0) 编辑

2013年2月24日

摘要: 1 /* 表存储结构 */ 2 // 或者: template <class Type> class DuLinkList; 3 template <class Type> 4 class DuLNode 5 { 6 // 当授予对给定模版的所有实例的访问权的时候, 7 // 在作用域中不需要存在该模版或函数模版的声明。 8 // 实质上,编译器将友元声明也当作类或函数的声明对待。 9 template <class Type> friend class DuLinkList;10 // 或者: friend class DuLinkList<Type阅读全文
posted @ 2013-02-24 15:30 SubmarineX 阅读(12) 评论(0) 编辑

2013年2月21日

摘要: fstream::binary开启:新行采用‘LF’,作为一个字节;关闭:新行采用‘CR’‘LF’组合,作为一个字节。关于‘CR’‘LF’,参见:http://en.wikipedia.org/wiki/Newline以下是《C++ Primer》第四版中的一段代码: 1 int main() 2 { 3 fstream fInOut("copyOut", fstream::ate | fstream::in | fstream::out | fstream::binary); 4 if (!fInOut) 5 { 6 cerr << "Un...阅读全文
posted @ 2013-02-21 15:58 SubmarineX 阅读(14) 评论(0) 编辑

2013年2月14日

摘要: 转自http://www.williamlong.info/archives/3347.html 译者按:Aaron Swartz是个传奇般的人物,他是一个网络奇才,也是一个资讯自由斗士。此前笔者对他一无所知,但早就受益于他的智慧。大学阶段,笔者很大一部分知识都来自于Google Reader,而RSS是他14岁跟别人共同创作的作品。天妒英才,美国扭曲的知识产权保护制度和司法体系更是将他逼上了绝路。Aaron Swartz自杀是自由互联网世界的一个悲剧,作为Google Reader的深度用户,笔者十分感谢他在RSS中的贡献,因此,笔者把Aaron Swartz的这篇著名的《HOWTO: B.阅读全文
posted @ 2013-02-14 19:43 SubmarineX 阅读(24) 评论(0)  编辑

2013年1月3日

摘要: 思路来自:MFC Tutorial - Creating a window with two classes在工程中新建一个类CChildFrameclass CChildFrame : public CFrameWnd在构造函数中:1 CChildFrame::CChildFrame()2 {3 Create(NULL,"MFC Tutorial Part 1 CoderSource Window");4 }可选:添加WM_PAINT消息: 1 void CChildFrame::OnPaint() 2 { 3 CPaintDC dc(this); // device c阅读全文
posted @ 2013-01-03 23:41 SubmarineX 阅读(778) 评论(0) 编辑
 
摘要: Win32应用中创建多窗口,创建同一个窗口类的多个窗口对象和不同窗口类的窗口对象。 1 // win32_多窗口.cpp : Defines the entry point for the application. 2 // 3 4 #include "stdafx.h" 5 #include "resource.h" 6 7 #define MAX_LOADSTRING 100 8 9 // Global Variables: 10 HINSTANCE hInst; // current instance ...阅读全文
posted @ 2013-01-03 20:36 SubmarineX 阅读(155) 评论(0) 编辑

2012年12月22日

摘要: 参考:http://blog.csdn.net/desow/article/details/4592847环境是 XP + VC++6.0。按照方法1添加:把 .h 文件添加到以下目录:把GdiPlus.lib 添加到以下目录:接着是针对具体的工程设置:a. StdAfx.h 中:b. CXXXApp 类中声明两个变量:c. CXXXApp 类中的 InitInstance() 中调用 GdiplusStartup 方法:d. CXXXApp 类中声明ExitInstance 方法,并定义:!!!声明的时候我只是照猫画虎写的!!!阅读全文
posted @ 2012-12-22 15:49 SubmarineX 阅读(15) 评论(0) 编辑

2012年12月17日

摘要: 环境:Win7(C:) + VS2010(D:)添加环境变量1、“PATH”中追加“D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE”,分别为cl.exe 和mspdb100.dll 的路径。2、新建“INCLUDE”,“D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;C:\Program Files (x86)\Micro阅读全文
posted @ 2012-12-17 22:56 SubmarineX 阅读(22) 评论(0) 编辑

2012年12月9日

摘要: 效果:分别拖动下方和上方滚动视图用数组把所有的UIScrollView对象储存起来。 1 #import "ViewController.h" 2 3 @interface ViewController () <UIScrollViewDelegate> 4 5 @end 6 7 @implementation ViewController 8 9 @synthesize scrollViews = _scrollViews;10 11 - (void)viewDidLoad12 {13 [super viewDidLoad];14 15 UIImageView阅读全文
posted @ 2012-12-09 22:45 SubmarineX 阅读(627) 评论(0) 编辑

2012年12月6日

摘要: 在上一篇博文《在滚动视图里添加图像视图,在图像视图里添加按钮控件》的基础上做了小小的改动。》》点击button1》》》》点击button2》》需要改写两个地方:@synthesize scrollView = _scrollView;- (void)viewDidLoad{ [super viewDidLoad]; // 配置 UIImageView 对象 UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"1.png"]]; imgView.userIn...阅读全文
posted @ 2012-12-06 22:26 SubmarineX 阅读(1180) 评论(0) 编辑