-
[综合] 两个行业的故事:编程语言与富裕国家和发展中国家之间的差异
ATaleofTwoIndustries:HowProgrammingLanguagesDifferBetweenWealthyandDevelopingCountries 技术与人均国内生产总值相关在最近的一篇文章中,我们看到Android的流量问题(占国家堆栈溢出访问的百分比)往往与一个国家的人...
18
热度 -
[综合] [[][[]]+[]][+[]][++[+[]][+[]]] is n in javascript
[[][[]]+[]][+[]][++[+[]][+[]]] Thisevaluatesto"n"injavascript.Why? Let'sstartwithanemptyarray [] Now,let'saccessamemberofit. [][] Whatmember?Let'sc...
48
热度 -
[综合] nRF51822低功耗睡眠函数应用
通过的nRF51822低功耗睡眠的软件应用,当执行NRF_POWER->SYSTEMOFF=1;CPU将停止运行,保留外设参数,睡眠模式下电路电流消耗10微安,当被GPIO的DETECT信号唤醒后,复位,软件从main函数开始执行。whilie(1)下CPU消耗18毫安电流。 /******...
29
热度 -
[综合] 开发人员应该知道的10个Git命令
我们检查一切gitdiff-在本地查看所有文件更改。指定文件名时,将仅显示更改。gitlog-查看提交历史记录。它也可以用于带有gitlog-pmy_file的文件。输入q退出。gitblamemy_file-查看my_file中的更改者,内容和内容。gitreflog-在本地存储库头中显示更改日志...
0
热度 -
[综合] 12 个Docker助手 - 帮助开发的开源工具
我们考虑使用开源工具来加速,促进,改进并有时优化Docker的工作。Habitus一个更开源的docker构建工具。使用Dockerfile文件和build.yml创建包含任意数量任意命令的多阶段容器程序集。程序集中的每个步骤都可以保持对某个先前步骤的依赖性,以确保任何复杂的多步依赖项的正确操作。H...
66
热度 -
[综合] 【C Prime Plus】学习笔记,Chapter 10,数组和指针之二
//CPrimePlus,Page656/*intmarbles[10];如果要计算这个数组所有元素的和,函数的可能调用形式如下:inttotal=sum(marbles)数组名marbles是它的第一个元素的地址,而地址(指针)是个整型数(int)也就是说形参marbles实际是传递了个地址,因此...
78
热度 -
[综合] 【C Prime Plus】学习笔记,Chapter 10,数组和指针之四
//指针操作:使用指针作为参数page661 #include<stdio.h> #defineSIZE10 intsump(int*start,int*end); intmain(void) { intmarbles[SIZE]={20,10,5,39,4,16,19,26,3...
73
热度 -
[综合] 【C Prime Plus】学习笔记,Chapter 10,数组和指针之五
//【CPrimePlus】学习笔记,Chapter10,数组和指针之五 //指针的赋值,加减运算 //Page667 #include<stdio.h> intmain(void) { int*ptr0,*ptr1,*ptr2; //如果指针没有初始化,进行++运算,编译会war...
62
热度 -
[综合] 【C Prime Plus】学习笔记,Chapter 10,用const 修饰形参 保护数据,以防修改
//Page674 //保护数组,防止传给形参时被修改 //如果要改变实参数组的元素值,就如下定义 voidadd_to(doublear[],intn,doubleval) { inti; for(i=0;i<n;i++) ar[i]+=val; } //如果不希望实参数组被改变,就...
58
热度 -
[综合] 【C Prime Plus】学习笔记,Chapter 10,数组初始化问题
//【CPrimePlus】学习笔记,Chapter10,P631 #include<stdio.h> intmain(void) {inti; chararr[4]; printf("局部变量没有初始化,看看打印出来是什么\n"); for(i=0;i<4;i++) prin...
42
热度 -
[综合] 【C Prime Plus】学习笔记,Chapter 3, 整型溢出 (integer overflow)
//【CPrimePlus】学习笔记,Chapter3,整型溢出(integeroverflow) //Page111 #include<stdio.h> intmain(void) { inti=2147483647;//32位最大整型数 unsignedintj=4294967...
45
热度 -
[综合] 【C Prime Plus】学习笔记,Chapter 12, 指针常量和常量指针
关于中文翻译过来的"指针常量"和"常量指针"叫起来还真顺口,颠倒一下都顺口,反导致记不住其真实差别,好像类似这样AB/BA结构的东西第一次记错后,后面就无法纠正了,反正我是经常一段时间后就忘记了。 一句简单的英文就能解决了这个问题: Inshort,aconstanywheretotheleftof...
16
热度 -
[综合] C语言字符串与文件读写函数 fgets(),fputs()......
《C语言入门经典第四版霍顿》P470 //从文本文件中读出一个字符串 #include<stdio.h> #include<stdlib.h> //#include<stdbool.h>//编译器报错,没有这个文件据说是bool类型变量定义的头文件 co...
71
热度 -
[综合] string,char,char*,char a[] 占字节数, 以及sizeof,strlen(),str.length()的用法
//studystring.cpp: // #include"stdafx.h" #include<iostream> #include<string> usingnamespacestd; intmain(intargc,char*argv[]) { cout&l...
68
热度 -
[综合] C++,类的对象 (栈上的和堆上的),语法练习
#include<iostream> #include<string> usingnamespacestd; //定义一个类Student classStudent { private: stringname; intage; stringaddress; publi...
69
热度 -
[综合] C++,类,对象,引用--语法练习.
#include<iostream> #include<string> usingnamespacestd; //定义一个类Student classStudent { private: stringname; intage; stringaddress; publ...
60
热度 -
[综合] C++,返回对象的引用,语法练习
#include<iostream> #include<string> usingnamespacestd; //定义一个类Student classStudent { private: stringname; intage; stringaddress; publ...
52
热度 -
[综合] C++ 类的 this 指针 语法练习
#include<iostream> #include<string> usingnamespacestd; //定义一个类Student classStudent { private: stringname; intage; stringaddress; publ...
23
热度 -
[综合] C++ 类的 this 指针 语法练习2
#include<iostream> #include<string> usingnamespacestd; //定义一个类Student classStudent { private: stringname; intage; stringaddress; publ...
63
热度 -
[综合] C++ 类的 this 指针 语法练习3
#include<iostream> #include<string> usingnamespacestd; //定义一个类Student classStudent { private: stringname; intage; stringaddress; publ...
23
热度