当前位置: 首页 > 编程日记 > 正文

C\C++宏大全


一、标准预定义宏
The standard predefined macros are specified by the relevant language standards, so they are available with all compilers that implement those standards. Older compilers may not provide all of them. Their names all start with double underscores.

__FILE__ 
This macro expands to the name of the current input file, in the form of a C string constant. This is the path by which the preprocessor opened the file, not the short name specified in #include or as the input file name argument. For example, "/usr/local/include/myheader.h" is a possible expansion of this macro.

__LINE__ 
This macro expands to the current input line number, in the form of a decimal integer constant. While we call it a predefined macro, it's a pretty strange macro, since its "definition" changes with each new line of source code. 
__FILE__ and __LINE__ are useful in generating an error message to report an inconsistency detected by the program; the message can state the source line at which the inconsistency was detected. For example,

 fprintf (stderr, "Internal error: "
                      "negative string length "
                      "%d at %s, line %d.",
              length, __FILE__, __LINE__);
     
An #include directive changes the expansions of __FILE__ and __LINE__ to correspond to the included file. At the end of that file, when processing resumes on the input file that contained the #include directive, the expansions of __FILE__ and __LINE__ revert to the values they had before the #include (but __LINE__ is then incremented by one as processing moves to the line after the #include).

A #line directive changes __LINE__, and may change __FILE__ as well. See Line Control.

C99 introduces __func__, and GCC has provided __FUNCTION__ for a long time. Both of these are strings containing the name of the current function (there are slight semantic differences; see the GCC manual). Neither of them is a macro; the preprocessor does not know the name of the current function. They tend to be useful in conjunction with __FILE__ and __LINE__, though.


__DATE__ 
This macro expands to a string constant that describes the date on which the preprocessor is being run. The string constant contains eleven characters and looks like "Feb 12 1996". If the day of the month is less than 10, it is padded with a space on the left. 
If GCC cannot determine the current date, it will emit a warning message (once per compilation) and __DATE__ will expand to "??? ?? ????".


__TIME__ 
This macro expands to a string constant that describes the time at which the preprocessor is being run. The string constant contains eight characters and looks like "23:59:01". 
If GCC cannot determine the current time, it will emit a warning message (once per compilation) and __TIME__ will expand to "??:??:??".


__STDC__ 
In normal operation, this macro expands to the constant 1, to signify that this compiler conforms to ISO Standard C. If GNU CPP is used with a compiler other than GCC, this is not necessarily true; however, the preprocessor always conforms to the standard unless the -traditional-cpp option is used. 
This macro is not defined if the -traditional-cpp option is used.

On some hosts, the system compiler uses a different convention, where __STDC__ is normally 0, but is 1 if the user specifies strict conformance to the C Standard. CPP follows the host convention when processing system header files, but when processing user files __STDC__ is always 1. This has been reported to cause problems; for instance, some versions of Solaris provide X Windows headers that expect __STDC__ to be either undefined or 1. See Invocation.


__STDC_VERSION__ 
This macro expands to the C Standard's version number, a long integer constant of the form yyyymmL where yyyy and mm are the year and month of the Standard version. This signifies which version of the C Standard the compiler conforms to. Like __STDC__, this is not necessarily accurate for the entire implementation, unless GNU CPP is being used with GCC. 
The value 199409L signifies the 1989 C standard as amended in 1994, which is the current default; the value 199901L signifies the 1999 revision of the C standard. Support for the 1999 revision is not yet complete.

This macro is not defined if the -traditional-cpp option is used, nor when compiling C++ or Objective-C.


__STDC_HOSTED__ 
This macro is defined, with value 1, if the compiler's target is a hosted environment. A hosted environment has the complete facilities of the standard C library available.

__cplusplus 
This macro is defined when the C++ compiler is in use. You can use __cplusplus to test whether a header is compiled by a C compiler or a C++ compiler. This macro is similar to __STDC_VERSION__, in that it expands to a version number. A fully conforming implementation of the 1998 C++ standard will define this macro to 199711L. The GNU C++ compiler is not yet fully conforming, so it uses 1 instead. We hope to complete our implementation in the near future.

__OBJC__ 
This macro is defined, with value 1, when the Objective-C compiler is in use. You can use __OBJC__ to test whether a header is compiled by a C compiler or a Objective-C compiler.

__ASSEMBLER__ 
This macro is defined with value 1 when preprocessing assembly language.

GCC 中普通预定义宏
__GNUC__ 
__GNUC_MINOR__ 
__GNUC_PATCHLEVEL__ 
These macros are defined by all GNU compilers that use the C preprocessor: C, C++, and Objective-C. Their values are the major version, minor version, and patch level of the compiler, as integer constants. For example, GCC 3.2.1 will define __GNUC__ to 3, __GNUC_MINOR__ to 2, and __GNUC_PATCHLEVEL__ to 1. They are defined only when the entire compiler is in use; if you invoke the preprocessor directly, they are not defined. 
__GNUC_PATCHLEVEL__ is new to GCC 3.0; it is also present in the widely-used development snapshots leading up to 3.0 (which identify themselves as GCC 2.96 or 2.97, depending on which snapshot you have).

If all you need to know is whether or not your program is being compiled by GCC, you can simply test __GNUC__. If you need to write code which depends on a specific version, you must be more careful. Each time the minor version is increased, the patch level is reset to zero; each time the major version is increased (which happens rarely), the minor version and patch level are reset. If you wish to use the predefined macros directly in the conditional, you will need to write it like this:


          #if __GNUC__ > 3 || \
              (__GNUC__ == 3 && (__GNUC_MINOR__ > 2 || \
                                 (__GNUC_MINOR__ == 2 && \
                                  __GNUC_PATCHLEVEL__ > 0))
          
Another approach is to use the predefined macros to calculate a single number, then compare that against a threshold:

 #define GCC_VERSION (__GNUC__ * 10000 \
                               + __GNUC_MINOR__ * 100 \
                               + __GNUC_PATCHLEVEL__)
          ...
         
          #if GCC_VERSION > 30200
          
Many people find this form easier to understand.


__GNUG__ 
The GNU C++ compiler defines this. Testing it is equivalent to testing (__GNUC__ && __cplusplus).

__STRICT_ANSI__ 
GCC defines this macro if and only if the -ansi switch, or a -std switch specifying strict conformance to some version of ISO C, was specified when GCC was invoked. It is defined to 1. This macro exists primarily to direct GNU libc's header files to restrict their definitions to the minimal set found in the 1989 C standard.

__BASE_FILE__ 
This macro expands to the name of the main input file, in the form of a C string constant. This is the source file that was specified on the command line of the preprocessor or C compiler.

__INCLUDE_LEVEL__ 
This macro expands to a decimal integer constant that represents the depth of nesting in include files. The value of this macro is incremented on every #include directive and decremented at the end of every included file. It starts out at 0, it's value within the base file specified on the command line.

__ELF__ 
This macro is defined if the target uses the ELF object format.

__VERSION__ 
This macro expands to a string constant which describes the version of the compiler in use. You should not rely on its contents having any particular form, but it can be counted on to contain at least the release number.

__OPTIMIZE__ 
__OPTIMIZE_SIZE__ 
__NO_INLINE__ 
These macros describe the compilation mode. __OPTIMIZE__ is defined in all optimizing compilations. __OPTIMIZE_SIZE__ is defined if the compiler is optimizing for size, not speed. __NO_INLINE__ is defined if no functions will be inlined into their callers (when not optimizing, or when inlining has been specifically disabled by -fno-inline). 
These macros cause certain GNU header files to provide optimized definitions, using macros or inline functions, of system library functions. You should not use these macros in any way unless you make sure that programs will execute with the same effect whether or not they are defined. If they are defined, their value is 1.


__CHAR_UNSIGNED__ 
GCC defines this macro if and only if the data type char is unsigned on the target machine. It exists to cause the standard header file limits.h to work correctly. You should not use this macro yourself; instead, refer to the standard macros defined in limits.h.

__WCHAR_UNSIGNED__ 
Like __CHAR_UNSIGNED__, this macro is defined if and only if the data type wchar_t is unsigned and the front-end is in C++ mode.

__REGISTER_PREFIX__ 
This macro expands to a single token (not a string constant) which is the prefix applied to CPU register names in assembly language for this target. You can use it to write assembly that is usable in multiple environments. For example, in the m68k-aout environment it expands to nothing, but in the m68k-coff environment it expands to a single %.

__USER_LABEL_PREFIX__ 
This macro expands to a single token which is the prefix applied to user labels (symbols visible to C code) in assembly. For example, in the m68k-aout environment it expands to an _, but in the m68k-coff environment it expands to nothing. 
This macro will have the correct definition even if -f(no-)underscores is in use, but it will not be correct if target-specific options that adjust this prefix are used (e.g. the OSF/rose -mno-underscores option).


__SIZE_TYPE__ 
__PTRDIFF_TYPE__ 
__WCHAR_TYPE__ 
__WINT_TYPE__ 
These macros are defined to the correct underlying types for the size_t, ptrdiff_t, wchar_t, and wint_t typedefs, respectively. They exist to make the standard header files stddef.h and wchar.h work correctly. You should not use these macros directly; instead, include the appropriate headers and use the typedefs.

__CHAR_BIT__ 
Defined to the number of bits used in the representation of the char data type. It exists to make the standard header given numerical limits work correctly. You should not use this macro directly; instead, include the appropriate headers.

__SCHAR_MAX__ 
__WCHAR_MAX__ 
__SHRT_MAX__ 
__INT_MAX__ 
__LONG_MAX__ 
__LONG_LONG_MAX__ 
Defined to the maximum value of the signed char, wchar_t, signed short, signed int, signed long, and signed long long types respectively. They exist to make the standard header given numerical limits work correctly. You should not use these macros directly; instead, include the appropriate headers.

__USING_SJLJ_EXCEPTIONS__ 
This macro is defined, with value 1, if the compiler uses the old mechanism based on setjmp and longjmp for exception handling.

__NEXT_RUNTIME__ 
This macro is defined, with value 1, if (and only if) the NeXT runtime (as in -fnext-runtime) is in use for Objective-C. If the GNU runtime is used, this macro is not defined, so that you can use this macro to determine which runtime (NeXT or GNU) is being used.

__LP64__ 
_LP64 
These macros are defined, with value 1, if (and only if) the compilation is for a target where long int and pointer both use 64-bits and int uses 32-bit.

VC的宏定义
VC的标准宏
The compiler recognizes 10 predefined ANSI C macros, and the Microsoft C++ implementation provides several more. These macros take no arguments and cannot be redefined. Their value, except for __LINE__ and __FILE__, must be constant throughout compilation. Some of the predefined macros listed below are defined with multiple values. See the following tables for more information.

ANSI-Compliant Predefined Macros

Macro Description 
__DATE__ The compilation date of the current source file. The date is a string literal of the form Mmm dd yyyy. The month name Mmm is the same as for dates generated by the library function asctime declared in TIME.H. 
 
__FILE__ The name of the current source file. __FILE__ expands to a string surrounded by double quotation marks. 
You can create your own wide string version of __FILE__ as follows:

#include <stdio.h>
#define WIDEN2(x) L ## x
#define WIDEN(x) WIDEN2(x)
#define __WFILE__ WIDEN(__FILE__)
wchar_t *pwsz = __WFILE__;

int main()
{
}
 
__LINE__ The line number in the current source file. The line number is a decimal integer constant. It can be altered with a #line directive.

__STDC__ Indicates full conformance with the ANSI C standard. Defined as the integer constant 1 only if the /Za compiler option is given and you are not compiling C++ code; otherwise is undefined.

__TIME__ The most recent compilation time of the current source file. The time is a string literal of the form hh:mm:ss.

__TIMESTAMP__ The date and time of the last modification of the current source file, expressed as a string literal in the form Ddd Mmm Date hh:mm:ss yyyy, where Ddd is the abbreviated day of the week and Date is an integer from 1 to 31.

微软的VC宏
_ATL_VER Defines the ATL version.
 
_CHAR_UNSIGNED Default char type is unsigned. Defined when /J is specified. 
 
__COUNTER__ Expands to an integer starting with 0 and incrementing by 1 every time it is used in a compiland. __COUNTER__ remembers its state when using precompiled headers. If the last __COUNTER__ value was 4 after building a precompiled header (PCH), it will start with 5 on each PCH use. 
__COUNTER__ lets you generate unique variable names. You can use token pasting with a prefix to make a unique name. For example:

#include <stdio.h>
#define FUNC2(x,y) x##y
#define FUNC1(x,y) FUNC2(x,y)
#define FUNC(x) FUNC1(x,__COUNTER__)

int FUNC(my_unique_prefix);
int FUNC(my_unique_prefix);

int main() {
   my_unique_prefix0 = 0;
   printf("\n%d",my_unique_prefix0);
   my_unique_prefix0++;
   printf("\n%d",my_unique_prefix0);
}
 
__cplusplus Defined for C++ programs only. 
_CPPLIB_VER Defined if you include any of the C++ Standard Library headers; reports which version of the Dinkumware header files are present.

_CPPRTTI Defined for code compiled with /GR (Enable Run-Time Type Information).

_CPPUNWIND Defined for code compiled with /GX (Enable Exception Handling).

_DEBUG Defined when compiling with /LDd, /MDd, /MLd, and /MTd.

_DLL Defined when /MD or /MDd (Multithread DLL) is specified.

__FUNCDNAME__ Valid only within a function and returns the decorated name of the enclosing function (as a string). __FUNCDNAME__ is not expanded if you use the /EP or /P compiler option.

__FUNCSIG__ Valid only within a function and returns the signature of the enclosing function (as a string). __FUNCSIG__ is not expanded if you use the /EP or /P compiler option.

__FUNCTION__ Valid only within a function and returns the undecorated name of the enclosing function (as a string). __FUNCTION__ is not expanded if you use the /EP or /P compiler option.

_M_ALPHA Defined for DEC ALPHA platforms. It is defined as 1 by the ALPHA compiler, and it is not defined if another compiler is used.

_M_IX86 Defined for x86 processors. See values for _M_IX86 for more details.

_M_IA64 Defined for 64-bit processors.

_M_MPPC Defined for Power Macintosh platforms (no longer supported).

_M_MRX000 Defined for MIPS platforms (no longer supported).

_M_PPC Defined for PowerPC platforms (no longer supported).
 
_MANAGED Defined to be 1 when /clr is specified.

_MFC_VER Defines the MFC version. For example, 0x0700 represents MFC version 7.

_MSC_EXTENSIONS This macro is defined when compiling with the /Ze compiler option (the default). Its value, when defined, is 1.

_MSC_VER Defines the major and minor versions of the compiler. For example, 1300 for Microsoft Visual C++ .NET. 1300 represents version 13 and no point release. This represents the fact that there have been a total of 13 releases of the compiler. 
If you type cl /? at the command line, you will see the full version for the compiler you are using.
 
__MSVC_RUNTIME_CHECKS Defined when one of the /RTC compiler options is specified. 
_MT Defined when /MD or /MDd (Multithreaded DLL) or /MT or /MTd (Multithreaded) is specified.  
_WCHAR_T_DEFINED 
and

_NATIVE_WCHAR_T_DEFINED
 Defined when wchar_t is defined. Typically, wchar_t is defined when you use /Zc:wchar_t or when typedef unsigned short wchar_t; is executed in code. 
 
_WIN32 Defined for applications for Win32 and Win64. Always defined.

_WIN64 Defined for applications for Win64.

_Wp64 Defined when specifying /Wp64.

As shown in following table, the compiler generates a value for the preprocessor identifiers that reflect the processor option specified.

values for _M_IX86

Option in Development Environment Command-Line Option Resulting value 
Blend /GB _M_IX86 = 600 (Default. Future compilers will emit a different value to reflect the dominant processor.) 
Pentium /G5 _M_IX86 = 500 
Pentium Pro, Pentium II, and Pentium III /G6 _M_IX86 = 600 
80386 /G3 _M_IX86 = 300 
80486 /G4 _M_IX86 = 400

转载于:https://www.cnblogs.com/zengkefu/p/7001380.html

相关文章:

POJ 3630 Phone List

题目大意:给n个字符串,问是否有一个是另一个的前缀思路:把n个字符串插到trie里,然后判断就好&#xff0c;注意一个长字符串覆盖另一个短字符串和短字符串匹配长字符串的区别 1 #include<iostream>2 #include<cstring>3 #include<cstdio>4 #define maxn 10000…

微信小程序地图标记点,点击标记点显示详细信息源码加效果图

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 效果图&#xff1a; 实现代码: <!-- <text>{{markers[id].placeName}}</text> --> <block wx:if{{isshow}}><map id"map" longitude"114.048410" latit…

如何仅使用HTML和JavaScript构建简单的URL缩短器

by Palash Bauri由Palash Bauri 如何仅使用HTML和JavaScript构建简单的URL缩短器 (How to build a simple URL shortener with just HTML and JavaScript) You might have used a URL shortener before, such as bit.ly, goo.gl. They are useful for shortening long URLs so…

hibernate中的hql查询语句list查询所有与iterate查询所有的区别

hibernate中的hql查询语句list查询所有与iterate查询所有的区别 list查询所有&#xff1b; 01&#xff0c;会立即产生一条select语句1select查询出来的所有语句都会被session管理&#xff0c; 保 存在缓存中 02&#xff0c;清空或者不清空session缓存中的数据&#xff0c;再次…

php解决 mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysq

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 The mysql extension is deprecated and will be removed in the future: use mysq 翻译&#xff1a; mysql_connect这个模块将在未来弃用&#xff0c;请你使用mysqli或者PDO来替代。 解决方法&#x…

Test execution order

刚开始的时候&#xff0c;JUnit并没有规定测试方法的调用执行顺序。方法通过映射的API返回的顺序进行调用。然 而&#xff0c;使用JVM顺序是不明智的&#xff0c;因为Java平台没有规定任何特定的顺序&#xff0c;事实上JDK7或多或少的返回的是随机顺序。大部分写的好的测试代码…

您需要了解有关Angular中的ng-template,ng-content,ng-container和* ngTemplateOutlet的所有信息...

It was one of those days when I was busy working on new features for my office project. All a sudden, something caught my attention:那是我忙于为Office项目开发新功能的日子之一。 突然间&#xff0c;一些事情引起了我的注意&#xff1a; While inspecting the DOM …

洛谷P2587 [ZJOI2008]泡泡堂

传送门 1368 泡泡堂 省队选拔赛 时间限制: 1 s空间限制: 128000 KB题目等级 : 大师 Master题解题目描述 Description第XXXX届NOI期间&#xff0c;为了加强各省选手之间的交流&#xff0c;组委会决定组织一场省际电子竞技大赛&#xff0c;每一个省的代表队由n名选手组成&#xf…

bootstrap的日期选择器 完整源码demo附效果图

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 效果图&#xff1a; &#xff08;点击图1时钟显示图2自动隐藏图1&#xff0c;点击图2的日历会显示图1自动隐藏图2&#xff09; 源码 <!DOCTYPE html> <html><head><meta charset&q…

redux 局部刷新_如何使用Redux Observables和刷新令牌API获取新的访问令牌

redux 局部刷新by Sachin Kumar由Sachin Kumar 如何使用Redux Observables和刷新令牌API获取新的访问令牌 (How to get a new access token using Redux observables and the refresh token API) This article is about how I handled a 401 status code on an API response. …

九宫格抽奖转盘源码分析

效果如上图所示&#xff0c;下面对其实现代码进行分析&#xff0c;看能不能破解其抽奖规则。需要引入jquery-1.8.3.min.js和images/9张图片。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-tra…

关于使用strtok的一个小问题

今天在弄一下啊小小程序的时候。报错&#xff0c;出现了问题。先看代码 int main(int argc, char* argv[]) {char *filename "interface_ipset_1_1.json";char* split1 "_";char* split2 ".";char splitfile1[4][NAME_MAX];sagent_string_sp…

微信小程序发送模板消息,php发送模板消息

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 formId 在安卓系统是纯数字&#xff0c;在IOS系统是一串加密字符&#xff0c;如图&#xff1a; 发送模板消息&#xff08;服务通知&#xff09;效果图&#xff1a; 前端 wxml <form bindsubmit"…

使用TypeScript映射和条件类型使React组件更出色

by Deepu K Sasidharan通过Deepu K Sasidharan 使用TypeScript映射和条件类型使React组件更出色 (Make your React components great with TypeScript mapped and conditional types) You’ve probably heard about TypeScript. You may have heard someone claiming how grea…

2017年6月16号课堂笔记

2017年6月16号 星期五 空气质量&#xff1a;中度污染~轻度污染 内容&#xff1a;jQuery&#xff1a;remove&#xff0c;bind&#xff0c;attr&#xff0c;on和live&#xff0c;同辈和父辈节点的操作&#xff0c; keyup/keypress/keydown,focus-blur应用&#xff0c;表单事件/键…

大宗商品(Bulk Stock)交易

大宗商品&#xff08;Bulk Stock&#xff09;是指可进入流通领域&#xff0c;但非零售环节&#xff0c;具有商品属性用于工农业生产与消费使用的大批量买卖的物质商品。在金融投资市场&#xff0c;大宗商品指同质化. 可交易. 被广泛作为工业基础原材料的商品大宗商品电子交易主…

【Ant Design Pro 二】 创建页面,组件,并在页面调用

开发交流qq群 173683895 路由里面的参数作用介绍: {path: "/a_nowdayserver/nowdayserver", //随便取名,显示在访问路径url中,如果是子路由,需要和父路径匹配icon: "file", //菜单栏显示的图标name: "你好", //菜单栏显示的标题component…

安卓收取费用_作为自由职业者应收取的费用:以价值为基础的定价是否能达到炒作的目的?...

安卓收取费用by Benek Lisefski由Benek Lisefski 作为自由职业者应收取的费用&#xff1a;以价值为基础的定价是否能达到炒作的目的&#xff1f; (What to charge as a freelancer: does value-based pricing live up to the hype?) 定价很难。 (Pricing is hard.) Even afte…

Java笔记(25):设计模式概述

1、设计模式的概述和分类 设计模式&#xff1a; 经验的总结。 A:创建型 创建对象 B:结构型 对象的组成 C:行为型 对象的功能创建型模式&#xff1a;1)简单工厂模式 2)工厂方法模式 3)设计模式 2、简单工厂模式概述和使用 1 package cn.itcast_01; 2 3 public abstract class A…

Ant Design Pro 使用图表 charts bizcharts

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 淌了一下午坑,都是辛酸泪 总结:首先要知道, 它不能直接使用 charts ,需要安装 bizcharts 插件,然后导入 bizcharts 中的 charts; 点击跳转到 bizcharts 官方文档,建议看完整个流程再跳转 首先,…

【剑指offer 面试题47】不用加减乘除做加法

思路&#xff1a; 利用位运算 C&#xff1a; 1 #include <iostream>2 using namespace std;3 4 int main()5 {6 int a 11, b 17;7 int sum, carry;8 do9 { 10 sum a ^ b; 11 carry (a & b) << 1; 12 a sum; 13 …

travis-ci自动部署_如何使用Travis CI部署(几乎)零恐惧的Cloud Foundry应用

travis-ci自动部署by Robin Bobbitt罗宾波比(Robin Bobbitt) 如何使用Travis CI部署(几乎)零恐惧的Cloud Foundry应用 (How to deploy your Cloud Foundry app with (almost) zero fear using Travis CI) Application deployments to the cloud should be painless. We should…

Activiti 规则任务(businessRuleTask)

Activiti 规则任务&#xff08;businessRuleTask&#xff09; 作者&#xff1a;邓家海 目前国内研究Activiti规则任务businessRuleTask&#xff09;的文章在网上应该不超出3篇 小觑夜漫酒作伴&#xff0c;破晓黎明当笑言 前言&#xff1a; 最近一直在研究Activiti工作流的自动化…

10年工作经验老程序员推荐的7个开发类工具

做.NET软件工作已经10年了&#xff0c;从程序员做到高级程序员&#xff0c;再到技术主管&#xff0c;技术总监。见证了Visual Studio .NET 2003,Visul Studio 2005, Visual Studio Team System 2008, Visual Studio 2010 Ultimate,Visual Studio 2013一系列近5个版本的变化与亲…

PHP SSL certificate: unable to get local issuer certificate的解决办法

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 当本地curl需要访问https时&#xff0c;出现SSL certificate: unable to get local issuer certificate错误信息 解决办法&#xff1a; 到http://curl.haxx.se/ca/cacert.pem下载pem文件&#xff0c;并…

辞职前为什么挣扎_当您感到自己像开发人员一样挣扎时,为什么学得最多

辞职前为什么挣扎by Walt Schlender由Walt Schlender 当您感到自己像开发人员一样挣扎时&#xff0c;为什么学得最多 (Why you learn the most when you feel like you’re struggling as a developer) The times when I have made the greatest leaps in my development skil…

Hadoop学习之Mapreduce执行过程详解

一、MapReduce执行过程 MapReduce运行时&#xff0c;首先通过Map读取HDFS中的数据&#xff0c;然后经过拆分&#xff0c;将每个文件中的每行数据分拆成键值对&#xff0c;最后输出作为Reduce的输入&#xff0c;大体执行流程如下图所示&#xff1a; 整个流程图具体来说&#xff…

汇编试验十五:安装新的int 9中断例程

安装新的int 9中断例程&#xff08;按A键后显示满屏幕的A&#xff09; int 9 是外中断&#xff0c;同样&#xff0c;程序编写还是和其他中断例程类似&#xff0c;安装&#xff08;复制&#xff09;&#xff0c;调用&#xff1b; 不同点是在于&#xff0c;他要从端口读取数据60h…

php判断前端传的多个字段与数据库匹配

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 代码 <?phpheader("Content-Type:text/html;charsetutf8"); header("Access-Control-Allow-Origin: *"); //解决跨域header(Access-Control-Allow-Methods:POST);// 响应类型 …

javascript编写_用JavaScript深入探讨:为什么对编写好的代码至关重要。

javascript编写Using simple terminology and a real world example, this post explains what this is and why it is useful.这篇文章使用简单的术语和一个真实的例子&#xff0c;解释了this是什么以及为什么有用。 这是给你的吗 (Is this for you) I have noticed that man…