The Dangerous Flask Hsiaoming YangThe dangerous Flask Let's talk about itsdangerous About Me 0 https://github.com/lepture https://lepture.com/about The Pallets Projects https://typlog.com/ https://authlib.org/ Session 1 app mB92K27uhbUJU1p1r_wW1gFWFOEjXk JWT based on JWS header payload signature JWE & JWK & JWA 6 Real dangerous thing in Flask 7 {{ config.SOME_SECRET_CONFIG }} Session Again 8 Backend Session Thanks0 码力 | 38 页 | 2.75 MB | 1 年前3
A Long Journey of Changing std::sort Implementation at Scaleof them but more dangerous. absl::c_sort(vector, [](const auto& lhs, const auto& rhs) { return lhs >= rhs; // BUG, comp(a, a) is true }); 60We found fewer of them but more dangerous. const bool descending descending is false, comp(a, a) is true. return !descending; }); 60.1We found fewer of them but more dangerous. absl::c_sort(vector, [](const auto& lhs, const auto& rhs) { return lhs->value() < rhs->value(); {NoValueElement()}; // Technically passes but incorrect. Sort(vector); } 60.2We found fewer of them but more dangerous. absl::c_sort(vector, [](const auto& lhs, const auto& rhs) { if (!lhs.has_value()) { return0 码力 | 182 页 | 7.65 MB | 6 月前3
《Efficient Deep Learning Book》[EDL] Chapter 4 - Efficient ArchitecturesPetting Zoo for Kids Let’s go back to our example of cute and dangerous animals, and represent each animal using two features, say cute and dangerous. We can assign values between 0.0 and 1.0 to these two features feature represents the given animal. In Table 4-1 we manually assigned values for the cute and dangerous features for six animals2, and we are calling the tuple of these two features an embedding, where its dimensions. We will shortly explain how we can use these embeddings. Animal Embedding (cute, dangerous) dog (0.85, 0.05) cat (0.95, 0.05) snake (0.01, 0.9) bear (0.5, 0.95) raccoon (0.5, 0.5) mouse0 码力 | 53 页 | 3.92 MB | 1 年前3
Leveraging C++20/23 Features for Low Level InteractionsExisting APIs Conversion to raw pointers So, use C++, but don’t negate the advantages by creating dangerous C-like code.Why not rewrite all the C code? There’s LOTS of code out there!1 �. See also Stroustrup a ‘delete’ when the scope changes So we need to tell the language to not delete Where D is a (dangerous!) custom deleter de�ned by: shared_ptrmy_ptr = rhs; unique_ptr my_uniqueptr = rhs; shared_ptr a ‘delete’ when the scope changes So we need to tell the language to not delete Where D is a (dangerous!) custom deleter de�ned by: Don’t template the custom no_deleter! shared_ptr my_ptr = rhs; 0 码力 | 56 页 | 5.39 MB | 6 月前3
Regular, RevisitedRegular? "Copy or copy not; there is no shallow" - Master Yoda overloading operators can be dangerous when you change the common meaning of the operator2023 Victor Ciura | @ciura_victor - Regular Regular? "Copy or copy not; there is no shallow" - Master Yoda overloading operators can be dangerous when you change the common meaning of the operator the meaning of copy construction and copy assignment Regular? "Copy or copy not; there is no shallow" - Master Yoda overloading operators can be dangerous when you change the common meaning of the operator the meaning of copy construction and copy assignment0 码力 | 180 页 | 19.96 MB | 6 月前3
Go 101 (Golang 101) v1.21.0unsafe pointers in Go. Go unsafe pointers are much like C pointers, they are powerful, and also dangerous. For some cases, we can write more efficient code with the help of unsafe pointers. On the other on Linux AMD64 architecture. The three functions provided in the unsafe package don't look much dangerous. The signatures of these functions are very impossible to be changed in future Go 1 versions . Rob elsewhere . Most of the unsafety of the unsafe package comes from unsafe pointers. They are as dangerous as C pointers, what is Go safe pointers always try to avoid. Go 1.17 introduces one new type and0 码力 | 610 页 | 945.17 KB | 1 年前3
ClickHouse in Production864.jpg 63 / 97 ODBC Engine: Dangerous way Driver Manager (shared library) ODBC Driver Database ClickHouse Server Dynamic Linking 64 / 97 ODBC Engine: Dangerous way Driver Manager (shared library) 65 / 97 ODBC Engine: Dangerous way Driver Manager (shared library) ODBC Driver Database ClickHouse Server Dynamic Linking Segmentation Fault 66 / 97 ODBC Engine: Dangerous way Driver Manager (shared0 码力 | 100 页 | 6.86 MB | 1 年前3
Go 101 (Golang 101) v1.21.0unsafe pointers in Go. Go unsafe pointers are much like C pointers, they are powerful, and also dangerous. For some cases, we can write more efficient code with the help of unsafe pointers. On the other on Linux AMD64 architecture. The three functions provided in the unsafe package don't look much dangerous. The signatures of these functions are very impossible to be changed in future Go 1 versions ? elsewhere ? . Most of the unsafety of the unsafe package comes from unsafe pointers. They are as dangerous as C pointers, what is Go safe pointers always try to avoid. Go 1.17 introduces one new type and0 码力 | 880 页 | 833.34 KB | 1 年前3
Go 101 (Golang 101) v1.21.0unsafe pointers in Go. Go unsafe pointers are much like C pointers, they are powerful, and also dangerous. For some cases, we can write more efficient code with the help of unsafe pointers. On the other on Linux AMD64 architecture. The three functions provided in the unsafe package don't look much dangerous. The signatures of these functions are very impossible to be changed in future Go 1 versions ? elsewhere ? . Most of the unsafety of the unsafe package comes from unsafe pointers. They are as dangerous as C pointers, what is Go safe pointers always try to avoid. Go 1.17 introduces one new type and0 码力 | 630 页 | 3.77 MB | 1 年前3
Delivering safe C++One size doesn’t fit all • C++ is (also) a systems programming language – we can’t “outsource” dangerous operations to some other language • We can’t just break billions of lines of existing code • abstractions • Use the STL • Add a small library (the GSL) • No new language features • Messy/dangerous/low-level features can be used to implement the GSL • Then subset • What we want is “C++ on steroids” Dangling references • Unions (use variants) • Casts • Underflow and overflow • Data races • “Dangerous features” can be used in explicitly unverified code • “Just test everywhere at run time” is not0 码力 | 74 页 | 2.72 MB | 6 月前3
共 695 条
- 1
- 2
- 3
- 4
- 5
- 6
- 70













