The Python Tutorial#Data Structures

The Python Tutorial#Data Structures 5.1 Data Structures This chapter details some of the previous introductions, and also introduces some new ones. 5.1 More on Lists List data types have more methods. Here are all the methods for list objects: list.append(x) Adding a new item at the end of the list is equivalent to a [len (a):]= [x] list.exten ...

Posted by chigley on Mon, 31 Dec 2018 16:45:08 -0800

Master Kotlin standard functions: run, with, let, also and apply

Links to the original text Some of Kotlin's Standard function Very similar, we are not sure which function to use. Here I will introduce a simple way to clearly distinguish their differences and how to choose to use them. Range function I focus on run, with, T.run, T.let, T.also and T.apply functions. I call them scope functions because I thi ...

Posted by nicholasstephan on Thu, 27 Dec 2018 14:33:06 -0800

ruby block & proc & lambda

List contents First, what is block in ruby? Block is a general term, Chinese name is also called closure, English is Closure, in the form of block, Proc and Lambda. Proc is an object-oriented encapsulation of block, lambda is a further encapsulation of Proc. block Writing Style Braces + code {p'hi'} do... end, which is also a blo ...

Posted by Adika on Thu, 27 Dec 2018 10:36:06 -0800

json, pickle, random, hashlib, collections

1. json and pickle json is used for conversion between strings and Python data types pickle is used for conversion between python-specific types and python-specific data types json and pickle provide four methods: dumps,dump,loads,load ##json dumps() ##Convert to a string loads() ##Converting json-coded strings to python ...

Posted by zszucs on Sun, 23 Dec 2018 22:48:05 -0800

Chapter 2 Entity Framework: ASP.NET MVC Enterprise-Level Practice

Use tools: sql server 2012, vs2017 Owing to the sql server used in books, the database used in the study of this book is sql server 2012. Before learning, add the database used in books. Data sharing: northwnd Links: https://pan.baidu.com/s/1i6FSRlj Password: fuh7 Catalog 1.DBFirst 2 Entity Framework Addendum, Delet ...

Posted by wizzard on Fri, 21 Dec 2018 10:33:05 -0800

Use of < function > in C++/C++11

<function> is a header file in C++ standard library. It defines several class templates used to represent function objects in C++ standard, including arithmetic operation, comparison operation, logical operation, and binder used to bind function objects. Examples of these class templates are C++ classes with function call operators, and ...

Posted by biggieuk on Fri, 21 Dec 2018 03:48:06 -0800

C++ Case Analysis - C++ Packaging of SQLite3 C API (Part I)

For reprinting, please indicate the source: http://cyc.wiki/index.php/2017/07/12/cpp-case-sqlite3-cpp-1/ Never say "proficient in C++". This actually comes from one of my work projects. One of the requirements is to encapsulate the original C API of SQLite3 in C++. At that time, the encapsulation did the same, referring to so ...

Posted by dandaman2007 on Wed, 19 Dec 2018 18:39:05 -0800

Python 3 Learning Notes 3 - Quote http://python 3-cookbook.readthedocs.io/zh_CN/latest/

2018-03-01 Data Structure and Algorithms (3) 1.11 Named Section Suppose you have a piece of code that extracts specific data fields (such as files or similar formats) from several fixed positions in a record string: ###### 0123456789012345678901234567890123456789012345678901234567890' record = '....................100 .......513.25 ........ ...

Posted by blue928 on Wed, 19 Dec 2018 00:36:04 -0800

Python filter(), map(), reduce() and lambda

1.lambda definition python allows you to create anonymous functions with lambda keywords. Parameters are optional and, if used, are usually part of the expression. The grammar of the lower anonymous function: lambda [arg1[, arg2, ... argN]]: expression def true(): return True #Amount to lambda :True In the example above, we simply created ...

Posted by gasper000 on Sat, 15 Dec 2018 14:18:03 -0800

< Notes > Python - 08 Python Object Oriented Advanced Features

08 Python Object-Oriented Advanced Features By Kevin Song 08-01 __slots__ 08-02 @property 08-03 multiple inheritance 08-04 custom class 08-05 enumeration class 08-06 meta class 08-01 __slots__ Binding attributes and methods to objects class Student(object): pass Binding properties to objects >>> s = Student() &gt ...

Posted by chantown on Mon, 10 Dec 2018 14:18:05 -0800