errata

Errata for Java Language Specification 3rd Edition

折月煮酒 提交于 2019-12-07 10:54:22
问题 I use JLS extensively both as a learning and teaching resource, but I've noticed that there are some errors in it. There's the simple typos (e.g. JLS 5.1.4 "convesions"), but there's also some that I consider quite serious errors. For example, JLS 18.1 The Grammar of the Java Programming Language is supposed to be the authoritative reference for the grammar of the Java language, but it contains a production rule that never gets used! (e.g. MoreStatementExpressions ). Surely this is a sign of

Errata for Java Language Specification 3rd Edition

别说谁变了你拦得住时间么 提交于 2019-12-05 13:36:55
I use JLS extensively both as a learning and teaching resource, but I've noticed that there are some errors in it. There's the simple typos (e.g. JLS 5.1.4 "convesions"), but there's also some that I consider quite serious errors. For example, JLS 18.1 The Grammar of the Java Programming Language is supposed to be the authoritative reference for the grammar of the Java language, but it contains a production rule that never gets used! (e.g. MoreStatementExpressions ). Surely this is a sign of more serious errors in other parts of the given grammar, right? So is there an errata for the 3rd

Apress Pro Asp.net MVC Framework 3 - SportsStore Edit Product not working?

我与影子孤独终老i 提交于 2019-12-04 18:33:40
问题 G’day All, has anyone purchased the ALPHA of Apress Pro Asp.net MVC Framework 3 and created the SportsStore? I can’t for the life of me edit products and have the DB update successfully? No errors are displayed and unit tests all function, but no successful ‘edit’ i.e. I change some details, click save, it reports successful – I then check the results, and nothing has happened? Did anyone else find this when working through the SportsStore? Any advice will be greatly appreciated. Cheers. 回答1:

Array-syntax vs pointer-syntax and code generation?

我的梦境 提交于 2019-12-04 14:55:43
问题 In the book, "Understanding and Using C Pointers" by Richard Reese it says on page 85, int vector[5] = {1, 2, 3, 4, 5}; The code generated by vector[i] is different from the code generated by *(vector+i) . The notation vector[i] generates machine code that starts at location vector , moves i positions from this location, and uses its content. The notation *(vector+i) generates machine code that starts at location vector , adds i to the address, and then uses the contents at that address.

Apress Pro Asp.net MVC Framework 3 - SportsStore Edit Product not working?

浪尽此生 提交于 2019-12-03 11:11:40
G’day All, has anyone purchased the ALPHA of Apress Pro Asp.net MVC Framework 3 and created the SportsStore? I can’t for the life of me edit products and have the DB update successfully? No errors are displayed and unit tests all function, but no successful ‘edit’ i.e. I change some details, click save, it reports successful – I then check the results, and nothing has happened? Did anyone else find this when working through the SportsStore? Any advice will be greatly appreciated. Cheers. The state of the EF object needs to be updated before saving. public void SaveProduct(Product product) { if

Array-syntax vs pointer-syntax and code generation?

烈酒焚心 提交于 2019-12-03 09:17:46
In the book, "Understanding and Using C Pointers" by Richard Reese it says on page 85, int vector[5] = {1, 2, 3, 4, 5}; The code generated by vector[i] is different from the code generated by *(vector+i) . The notation vector[i] generates machine code that starts at location vector , moves i positions from this location, and uses its content. The notation *(vector+i) generates machine code that starts at location vector , adds i to the address, and then uses the contents at that address. While the result is the same, the generated machine code is different. This difference is rarely of

For iterating though an array should we be using size_t or ptrdiff_t?

做~自己de王妃 提交于 2019-11-30 23:10:52
In this blog entry by Andrey Karpov entitled, "About size_t and ptrdiff_t " he shows an example, for (ptrdiff_t i = 0; i < n; i++) a[i] = 0; However, I'm not sure if that's right, it seems that should be for (size_t i = 0; i < n; i++) a[i] = 0; Is this correct? I know we should also likely be using something like memset , but let's avoid that entirely. I'm only asking about the type Pascal Cuoq In a blog post , I argue that you should always refrain from allocating memory blocks larger than PTRDIFF_MAX (*), because doing so will make compilers such as Clang and GCC generate nonsensical code

For iterating though an array should we be using size_t or ptrdiff_t?

╄→尐↘猪︶ㄣ 提交于 2019-11-30 18:53:02
问题 In this blog entry by Andrey Karpov entitled, "About size_t and ptrdiff_t" he shows an example, for (ptrdiff_t i = 0; i < n; i++) a[i] = 0; However, I'm not sure if that's right, it seems that should be for (size_t i = 0; i < n; i++) a[i] = 0; Is this correct? I know we should also likely be using something like memset , but let's avoid that entirely. I'm only asking about the type 回答1: In a blog post, I argue that you should always refrain from allocating memory blocks larger than PTRDIFF