CaveOps: Night-City
#Hello Edgerunners, welcome to the Night-City.

Welcome!

PHP Primer 001 : Hello World

为什么要学习PHP? 可以运行在服务器端 跨平台性 脚本语言 免费 下面来一段 Hello World: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>learning php</title> </head> <body> ...

PHP Primer 002 : 初识 echo

接上文,想要在 HTML 中嵌入 PHP 代码十分简单,与嵌入 JS 使用 <script> 和 </script > 标签的道理类似,我们需要将 PHP 代码卸载 <?php 和 ?> 之间。举个栗子: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php&...

Perl Primer 001 : 概述

我写教程的习惯是第一篇都叫做概述。要学习 Perl,首先当然要对 Perl 这门语言有一个基本了解。 Perl 最初的设计者叫做 Larry Wall,他参考了 C、sed、awk、shell scripting 等其他程序语言的特性创造了 Perl,起初这个名称来自 Practical Extraction and Report Language 的缩写。 Perl 强大而灵活,同时也十分简单。 本文约定 在开始之前,我将默认你有其他至少一种主流语言基础,例如 C 语言或者 Java 等。 开发坏境 如果你在使用 Mac OS X 系统,你的系统可能已经安装好了 Perl 环境,你可以在 T...

Perl Primer 002 : 变量与作用域

在 Perl 中,使用和声明变量并不需要指明数据类型。 对于标量,采用 $ 后接变量名的方式表示,这一点与 PHP 等语言相同,例如 $var。 对于数组和列表,采用 @ 后接变量名的方式表示,例如 @var。 对于哈希,采用 % 后接变量名的方式表示,例如 %var。 变量可以不声明,未赋值的变量的值为 undef,等同于 JavaScript 中的 undefined。 如果要声明变量,语法是: 作用域 [$|@|%]变量名; 变量的作用域主要有 my 和 local 两种,如果没有添加作用域限定,则为全局变量。 ...

NSCoding Tutorial for iOS: How To Save Your App Data

This bug doesn't look so scary on disk! There are many different ways to save your data to disk in iOS – raw file APIs, Property List Serialization, SQLite, Core Data, and of course NSCoding. For apps with heavy data requirements, Core Data is often the best way t...

MFC: 对话框添加背景图片

有两种实现方法,分别是: 插入一个 Bitmap 的资源图片,假设资源名称为 IDC_BITMAP1 在 CXXXDialog::OnPaint() 中实现: void CMyDialogDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // 用于绘制的设备上下文 SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0); // 使图标在工作区矩形中居中 ...

CommandLine 001

查看 dd 进度 killall -INFO dd ...

CommandLine 002

列出目录中所有的扩展名: find /path/to/dir -type f | grep -o '\.[^./]*$' | sort | uniq ...

CommandLine 003

转换 ogg 为 avi: mencoder -idx a.ogg -ovc lavc -oac mp3lame -o b.avi ...

CommandLine 004

保护目录不被 rm -rf * 命令删除: cd <directory>; touch ./-i ...

CommandLine 005

查找大文件: find -type f -exec du -sh {} + | sort -rh | head ...

C Primer 003 : rand()、srand()、time() 函数

这篇博客主要介绍 C 语言的 rand()、srand() 以及 time() 函数。 rand() rand() 函数是一个定义在 stdlib.h 中的函数,可以用来获得随机数把标准函数调用语句直接当数字使用就可以得到随机数。 int rand(void); // 取一个 a 到 b 之间的随机数: a + rand() % (b - a); srand() srand() 函数是一个定义在 stdlib.h 中的函数,可以置新的随机数种子,srand标准函数在每个程序中只应该使用一次。 void srand(unsigned int seed); time() time() ...

What's this?

The Night-City version of CaveOps inspired by Cyberpunk 2077. Not finished yet.

Pinned Message

The Founder and CEO of Infeca Technology.

Developer, Designer, Blogger.

Big fan of Apple, Love of colour.

Feel free to contact me.

反曲点科技创始人和首席执行官。

开发、设计与写作皆为所长。

热爱苹果、钟情色彩。

随时恭候 垂询