自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 收藏
  • 关注

原创 Enable Unattended Upgrades for Debian Linux

Unattended Upgrades Linux

2016-11-13 09:55:00 480

原创 how-to upgrade all local docker images

upgrade docker image

2016-11-12 18:20:21 446

原创 How to do non greedy regex match in command line

I want to do a non greedy regex replace on a text file. But “sed” does not work.“perl” is suitable for this:out of place:perl -pe 's|textA.+?textB|textC|g' file in place:perl -pe 's|textA.+?textB|textC

2016-11-09 07:44:57 387

原创 docker with sshfs mounted directory

docker sshfs mount

2016-11-04 22:08:10 808

原创 MPI (Message Passing Interface) materials

mpi

2016-11-01 18:52:27 585

原创 How-to create a Windows 10 usb installation media in Linux

create a Windows 10 usb installation media in Linux

2016-10-27 19:35:08 1094

转载 Career Management Lession 2/6 - Forge Relationships

Forge Relationships Career success is complex today—you’ll encounter many opportunities and navigate lots of change. Discover how to enlist smart people to help you on your journey.

2016-10-27 10:34:29 638

转载 Career Management Lession 1/6 - Chart Your Career Path

Chart Your Career Path Don’t wait for someone else to decide the direction of your career. When it comes to managing your career, you are in charge.

2016-10-26 20:55:42 628

转载 Career management

Career management is the combination of structured planning and the active management choice of one’s own professional career.

2016-10-26 20:18:04 853

原创 Generate C enum define from python dict

First we need to prepare the dict, then sort and format it: text = """#ifndef bb2421a299d24d4abbe59c3721a794f9 #define bb2421a299d24d4abbe59c3721a794f9 enum {{ {} }}; #endif//bb2421a299d24d4abbe5

2015-09-24 12:01:32 411

原创 How to disable compiler optimization for a piece of code

Preface: In a C++ project, a source file contains a very large array, which contains unions, template function pointers ..., on Windows & Mac, the compilation time is 20 minutes, but on Linux, it's 2

2015-09-21 19:59:49 1199

转载 Xen in WiFi networks

From: Xen in WiFi networks Successfully running Xen on a machine with a single WiFi card can be tricky. In my situation the network in dom0 worked fine but in domU I could only see incoming pa

2015-01-23 19:28:31 593

原创 ipmi IP setup

I have acquired a static IP for IPMI, then try to configure it in Linux. ipmitool lan set 1 access off  ## must set, or the following command will have no effect. ipmitool lan set 1  ipsrc static

2014-12-24 17:23:38 698

原创 IPMI SOL setup in Ubuntu Linux

Pre-request: Server has IPMI SOL feature. Client setup: sudo aptitude install ipmitoolServer setup: Enter BIOS setup, enable console redirect, SOL, and set serial connection parameters. In Ub

2014-12-19 11:22:55 2135

转载 C++ template instanctiation process

From: http://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html Next: Bound member functions,Previous: C++ Interface,Up: C++ Extensions 7.5 Where's the Template? C++ templates are the

2014-12-03 13:15:49 751

转载 Visual Studio 2013 has a powerful code analyis tool

From MSDN: Analyzing Managed Code Quality by Using Code Analysis

2014-11-21 16:44:35 625

原创 example: call cuda toolkit curand API from common lisp

continue example: call cuda toolkit API from python, curand

2014-10-16 11:48:27 841

转载 Common Lisp the Language, 2nd Edition

Common Lisp the Language, 2nd Edition

2014-10-12 13:01:08 794

原创 example: call cuda toolkit API from python, curand

see:  curand

2014-10-09 22:34:07 1529

转载 Native Client (NaCl) is an open-source technology for running native compiled code in the browser

Technical Overview

2014-10-06 17:21:04 557

转载 Mounting Individual Parititons in RAW Disk Images

From: http://blog.lifebloodnetworks.com/?p=934 Let us say, for the sake of simplicity, that you backup whole disks by using dd in Linux. Now let us assume that you need just a single file out o

2014-09-25 22:14:53 491

原创 My X window config: .xinitrc

First, install stumpwm, xrandr . then, add a file ~/.xi

2014-09-18 14:55:07 1003

原创 C++: Function as template parameter, example

Function as template parameter. Code: #include template D Funcall(F f, D a, D b) { return f(a, b); } template D Add(D a, D b) { return a + b; } template D Sub(D a, D b) { return a - b; } i

2014-09-07 14:45:42 827

原创 Speed comparison between C & Lisp

When I was reading "On Lisp"

2014-09-06 14:58:49 573

原创 C++ 11: simple map reduce functions

Try to simulate common lisp's map/reduce functions in C++11. #include #include #include #include #include #include template T reduce(std::function afun, std::list& somenums, T init = 0) { T

2014-09-02 15:30:38 1810

原创 C++ 11 : Variadic Templates , Example

In Lisp, we can use variadic function parameters like this:

2014-09-01 16:30:52 649

原创 C++: template meta programming, emample 1

#include template struct Factorial { enum { value = N * Factorial::value }; }; template <> struct Factorial { enum { value = 1 }; }; int main() { std::cout ::value << std::endl;

2014-08-31 11:13:39 705

原创 C++ 11: lexical closure in lambda function, example 1

We know #include #include auto makeAdder = [](int n) {   return [=](int val) { return val + n; }; }; int main() {   int n = 0;   std::cin >> n;   auto addn = makeAdder(n);   std::cou

2014-08-30 21:26:08 695

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除