A Preliminary Study on python decorators and a preliminary study on python decorations
1. contains a decorator
1 # encoding: UTF-8 2 3 ############ contains a decorator ######### 4 def outer (func ): 5 def inner (* args, ** kwargs): # To decorate f1 (), use these two parameters to accept any parameter, whether f1 defines several parameters 6 print "1" 7 r = func (* args, ** kwargs) # func is used here, do n
IReport study notes, Study NotesOverview
This section describes how to generate pdf documents based on jasper reports and data, solutions to Chinese font problems, and formatted output of date and time.
IReport version: 5.2.0Generate maven dependency for pdf documents
Complete dependency tree:
[INFO] +- net.sf.jasperreports:jasperreports:jar:5.2.0:compile [INFO] | +- commons-beanutils:commons-beanut
Python 3 Study Notes (4) ---- character encoding, functions and parameters, python Study Notes
I. character encoding and Transcoding
1. In python2, the default encoding is ASCII, and in python3, the default encoding is unicode.2. unicode is divided into utf-32 (4 bytes), UTF-16 (2 bytes), UTF-8 (1-4 bytes), so UTF-16 is now the most commonly used unicode version, however, UTF-8 is stored in the file because
Xadmin Study Notes (1) -- programming preparation, xadmin Study NotesPreface
Xadmin is an open-source project on GitHub. It is a powerful upgraded version of Django admin. It provides powerful plug-in systems, rich built-in functions, and unparalleled UI themes, makes the management system implementation very simple. For more information, see the official website.
First, I declare that I am also a beginner.
Python Study Notes-day 5, file read/write and basic serialization, python Study Notes
When we use a large amount of data, we cannot write all the data into the program. We can write the data into the file and read or modify it when the program needs to be used.Read/write files
When you open a file object in Read mode and use the built-in function open (), a file object is returned. The basic syntax format i
Python Study Notes-day 4, recursive functions (factorial and tower games), python Study Notes
Today I learned mainly about recursive functions and have tried some small examples. Here I will record them with the factorial and tower of death.
1. factorial Functions
Factorial is very simple, that is, n! = 1x2x3x... xn.
Use a common iteration function to write a factorial. The Code is as follows:
1 def factori
Rookie Python Study Notes Day 1: python Study Notes on the use of some function libraries
Tuesday, January 3, 2017
It is really difficult for freshman to learn a new computer language. Sometimes I can even check the spelling error of a function for half a day. No way. Who makes my English too bad.
I think it is better to learn computer languages from the C language. Python has many advantages and discards t
Python Study Notes 01-basics, python Study Notes 01 --I. interpreted language
Python is an interpreted language, which means:
L The compiled code can be run without compiling connections, saving debugging time
L python interpreters are well implemented in most systems, so the compiled code can run in any system.
However, this also means:
L interpretation execution efficiency is relatively low, so the progra
Dapper Study Notes (3)-add, delete, modify, and query dapper Study Notes
I. Create a table
Create the following three tables in the database:
1 CREATE TABLE [dbo].[T_User] 2 ( 3 [UserId] [int] IDENTITY(1, 1) PRIMARY KEY NOT NULL, 4 [Username] [nvarchar](256) NOT NULL, 5 [Password] [nvarchar](500) NULL, 6 [Email] [nvarchar](256) NULL, 7 [PhoneNumber]
Mybatis Study Notes (4): dynamic SQL statements and mybatis Study NotesDynamic SQL
The dynamic SQL statement of mybatis is based on the OGNL expression. Some logic can be easily implemented in SQL statements. In general, mybatis dynamic SQL statements mainly include the following types:
1. if statement (simple condition judgment)2. choose (when, otherwize) is equivalent to a switch in java, similar to choos
Python Study Notes 4-regular expressions, python Study Notes 4-
Import re -- all functions related to regular expressions are included in the re module.
Re. sub () -- string replacement
>>> import re>>> s= "100 NORTH BROAD ROAD">>> re.sub('ROAD$','RD.',s)'100 NORTH BROAD RD.'>>> s = "100 BROAD">>> re.sub('\\bROUAD$','RD.',s)'100 BROAD'>>> s='100 BROAD ROAD APT. 3'>>> re.sub(r'\bROAD$','RD.', s) '100 BROAD
JavaSE Study Notes-Tomcat (8) and javase Study Notes
1. directory structure
Bin binary Directory, which stores startup commands for starting and stopping servers. batconf configuration directory, server. xml web. the third-party jar package logs used by the xmllib server software records the log information during running of the server software temp temporary file storage directory webapps stores the workin
Hibernate Study Notes and hibernate Study Notes
1. Hibernate environment construction, configuration and HelloWorld
1.Build a Hibernate environment in Eclipse
Download the offline Hibernate jar package (jbosstools-4.4.final-updatesite-core.zip) -- "Help in Eclipse --" Install New Software -- "add...
2.Develop Helloworld for Hibernate
> Prepare the Hibernate Environment
1) import the required jar package, un
Java Study Notes-JDBC2 (17), study notes jdbc2
1. Review: six fixed steps of jdbc * (take query as an example)
// 1. register the driver (which can be connected to the database) DriverManager. registerDriver (new Driver (); // 2. obtain the Connection con = DriverManager object connected to the database. getConnection ("jdbc: mysql: // 127.0.0.1: 3306/mydb", "root", "root"); // 3. get an execution SQL objec
Python Study Notes 15: Date and Time Processing notes, python Study Notes
#-*-Coding: UTF-8-*-import datetime # date def dateadd_day (days) for the given date to the next N days: d1 = datetime. datetime. now () d3 = d1 + datetime. timedelta (days) return d3 # Yesterday def getYesterday (): today = datetime. date. today () oneday = datetime. timedelta (days = 1) yesterday = today-oneday return yesterday # to
[Python study notes, python Study Notes
We recommend a Visual website [Visual Algo]: URL = 'https: // visualgo.net/en/sorting'
This website provides the principles and processes of various sorting algorithms, which are displayed in a dynamic manner. In addition, the relevant pseudo-code and the specific step of code execution are also provided.
[Bubble Sorting]
The sequence to be sorted needs to be ac
Python3.x Study Notes 3, python3.x Study Notes
1. SetA set is an unordered, non-repeated data combination. Its function is as follows:> Deduplication: automatically removes duplicates when a list is converted to a set.> Link test: tests the intersection, difference set, and union of the two groups of data.
2. relational operation
Intersection: set1.intersection (set2)Union: set1.union (set2)Difference set:
Python study Note 5: module and package, python study note ModuleI. import modules using import
Cal. py:
#! /Usr/bin/pythondef add (x, y): return x + yif _ name _ = '_ main _': print add (1, 2)
Note: __name _ is a built-in variable. If the call value in CLI is _ mail __, otherwise it is a file name.
Import in new. py:
Import calprint cal. add (2, 3 );Ii. Package: modules organized by directory name
1.
Oracle study notes 9 database objects, oracle Study NotesOracle database objects are also called schema objects. database objects are a set of logical structures, and the most basic database objects are tables. Other database objects include: synonym is an alias of an existing object. It has the following functions: 1. Simplified SQL statement 2. Hiding the Object Name and owner (hiding the original object
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.