standards

Google App Engine Standard or Flexible environment?

≯℡__Kan透↙ 提交于 2019-11-30 15:04:44
问题 I am stuck in deciding between choosing Google App Engine Standard Vs. Flexible environment for a real world production. I want to use Java definitely. Need to use Firebase(latest version) for Authentication and Push notification; I'm not sure whether new Firebase is compatible with standard or flexible. per the caution note in the following link, my impression is that recent Firebase is compatible is with Flexible Environment only. https://cloud.google.com/solutions/mobile/firebase-app

Google App Engine Standard or Flexible environment?

故事扮演 提交于 2019-11-30 12:53:49
I am stuck in deciding between choosing Google App Engine Standard Vs. Flexible environment for a real world production. I want to use Java definitely. Need to use Firebase(latest version) for Authentication and Push notification; I'm not sure whether new Firebase is compatible with standard or flexible. per the caution note in the following link, my impression is that recent Firebase is compatible is with Flexible Environment only. https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio All things being equal any standard environment app can also run in a flexible

Why __func__, __FUNCTION__ and __PRETTY_FUNCTION__ aren't preprocessor macros?

江枫思渺然 提交于 2019-11-30 12:44:09
问题 I've just noticed that __func__ , __FUNCTION__ and __PRETTY_FUNCTION__ aren't treated as preprocessor macros and they're not mentioned on the 16.8 Predefined macro names section of the Standard (N4527 Working Draft). This means that they cannot be used in the string concatenation trick of phase 6: // Valid constexpr char timestamp[]{__FILE__ " has been compiled: " __DATE__ " " __TIME__}; // Not valid!!! template <typename T> void die() { throw std::runtime_error{"Error detected in " __PRETTY

Status of ranges for C++1z? [closed]

隐身守侯 提交于 2019-11-30 12:36:16
There is a study group on ranges in the C++ committee: but I have not followed the history of this study group and I am not sure of what kind of delivery is expected for C++1z (furthermore I do not use boost.range so I do not have a clear view of existing practices). Will we have: ranges as a pair of first/last iterators? union and other set operations on ranges(for example [v.begin()+5, v.begin()+7[ U [v.begin()+10, v.begin()+15[ U [v.begin()+21, v.begin()+42[ ), namely: union, intersection, disjoint union, complement? iterator filters (in order to execute a for_each where a condition is

Should I learn XML 1.0 or XML 1.1?

我们两清 提交于 2019-11-30 12:35:21
问题 I know that a well-formed XML 1.1 is not necessarily a well-formed XML 1.0 and vice-versa. I want to learn xml formally and i was wondering whether i should learn XML 1.0 or XML 1.1? I mean would it be more effective to learn XML 1.0 or would it be more effective to learn XML 1.1? I mean of course I know its best to read them both.. but i really only have the time to read one of them, so which would be "better" (more useful to me, me as in the average programmer)? 回答1: Unless you have a

Can a “container_of” macro ever be strictly-conforming?

大兔子大兔子 提交于 2019-11-30 11:39:17
A commonly-used macro in the linux kernel (and other places) is container_of , which is (basically) defined as follows: #define container_of(ptr, type, member) (((type) *)((char *)(ptr) - offsetof((type), (member)))) Which basically allows recovery of a "parent" structure given a pointer to one of its members: struct foo { char ch; int bar; }; ... struct foo f = ... int *ptr = &f.bar; // 'ptr' points to the 'bar' member of 'struct foo' inside 'f' struct foo *g = container_of(ptr, struct foo, bar); // now, 'g' should point to 'f', i.e. 'g == &f' However, it's not entirely clear whether the

Why is ::operator new[] necessary when ::operator new is enough?

时光毁灭记忆、已成空白 提交于 2019-11-30 11:30:59
问题 As we know, the C++ standard defines two forms of global allocation functions: void* operator new(size_t); void* operator new[](size_t); And also, the draft C++ standard (18.6.1.2 n3797) says: 227) It is not the direct responsibility of operator new or operator delete to note the repetition count or element size of the array. Those operations are performed elsewhere in the array new and delete expressions. The array new expression, may, however, increase the size argument to operator new to

Why a variable can't be defined twice in 2 files in C

家住魔仙堡 提交于 2019-11-30 10:58:45
Why can't I have int a; in 2 C files. I intend to combine both to make executable. I know from experience that I can't, but I want to find where the standard C99 says this and seal my understanding. I am reading ISO C99 standard from http://www.open-std.org/jtc1/sc22/wg...docs/n1256.pdf . It says on page 42: 6.2.2 Linkages of identifiers 1 An identifier declared in different scopes or in the same scope more than once can be made to refer to the same object or function by a process called linkage.There are three kinds of linkage: external, internal, and none. 2 In the set of translation units and

Why do compilers give a warning about returning a reference to a local stack variable if it is undefined behaviour?

谁都会走 提交于 2019-11-30 10:54:56
The C++ standard states that returning reference to a local variable (on the stack) is undefined behaviour, so why do many (if not all) of the current compilers only give a warning for doing so? struct A{ }; A& foo() { A a; return a; //gcc and VS2008 both give this a warning, but not a compiler error } Would it not be better if compilers give a error instead of warning for this code? Are there any great advantages to allowing this code to compile with just a warning? Please note that this is not about a const reference which could lengthen the lifetime of the temporary to the lifetime of the

Standard use of 'Z' instead of NULL to represent missing data?

試著忘記壹切 提交于 2019-11-30 10:21:23
问题 Outside of the argument of whether or not NULLs should ever be used: I am responsible for an existing database that uses NULL to mean "missing or never entered" data. It is different from empty string, which means "a user set this value, and they selected 'empty'." Another contractor on the project is firmly on the "NULLs do not exist for me; I never use NULL and nobody else should, either" side of the argument. However, what confuses me is that since the contractor's team DOES acknowledge