java jdbc ResultSet results are assigned to Java objects through java reflection

In the case of unconformity framework, when using jdbc to read data from the database, we have to get and set one by one, which is not only tedious but also not concise. So we write a tool class using java reflection mechanism, so it is not so troublesome to use jdbc to get data from the database. Because in many cases there is more than one p ...

Added by jdpatrick on Fri, 24 Apr 2020 19:05:46 +0300

Security mode of MYSQL: introduction to SQL safe updates

What is safe mode In mysql, if the where condition is not added to update and delete, all data will be modified. It's not only the developers who are new to MySQL that will encounter this problem, but also the engineers who have some experience will inevitably forget to write where conditions. In order to avoid all data modification and deleti ...

Added by tyler on Thu, 23 Apr 2020 17:03:38 +0300

oracle Operations and Maintenance Personal Common Check Statements

1. Find the most ordered SQL SQL> SELECT HASH_VALUE, SQL_TEXT, SORTS, EXECUTIONS FROM V$SQLAREA ORDER BY SORTS DESC; 2. Find the SQL with the most reads and writes on the disk SQL> SELECT * FROM (SELECT sql_text,disk_reads "total disk" , executions "total exec",disk_reads/executions "disk/exec" FROM v$sql WHERE executions>0 and is_o ...

Added by millesm on Tue, 21 Apr 2020 20:37:12 +0300

[interesting case] Python command line implementation - check the national 7-day weather

Why climb the weather? 1. You can practice. 2. After using the itchat library to realize the function of automatic reply, integrate the function of weather check, and realize the function of wechat self-service weather check! First of all, it's a similar pattern. Let's see if we can grab a general API directly on the official website (XHR). The ...

Added by expertis on Tue, 21 Apr 2020 10:55:26 +0300

Introduction to SLS Machine Learning: Time Series Complement and Version Comparison

This time, we introduce two useful functions: time series complement function and abnormal contrast function. 1. Time Series Complement Point Function Indicator description in the chart above Log Event Event T0: The earliest event a log generates Log Event Event T1: The latest event the log generates Actual point data: There is definite data ...

Added by puritania on Mon, 20 Apr 2020 06:44:07 +0300

EFCore Extended Select Method (Customize Query Statements to Entities)

EFCore Extended Select Method (Customize Query Statements to Entities) Often when working with databases, queries return fields that are inconsistent with what we define as entities, so it is cumbersome to create a large number of models for UI or interface layers and to manually correspond to the fields.This article addresses these repeti ...

Added by welsh_sponger on Fri, 17 Apr 2020 20:51:39 +0300

Oracle common function usage

1.decode function SELECT ID,NAME,DECODE(LEVER,1,'professor',2,'associate professor',3,'tutor','lecturer') POSITION, (SELECT CLASSNUM FROM CLASS T WHERE T.NUM = S.NUM) NUM FROM TEACHER S WHERE T.LEVER IN (1,2,3); The usage logic of the decode function in the previous SQL is as follows: IF(LEVER==1) THEN RETURN 'professor'(Translati ...

Added by msimoes on Thu, 16 Apr 2020 18:34:45 +0300

Overview of redis for NoSQL + Deployment

1. Relational and non-relational databasesRelational DatabaseA relational database is a structured database, built on a relational model and generally oriented to recordsHe works with data in databases using mathematical concepts and methods such as set algebraRelational models refer to two-dimensional table models, so a relational database is ...

Added by adiwood on Fri, 10 Apr 2020 04:16:00 +0300

Optimized points (window functions) of sparksql over hivesql

Sometimes, a select statement contains multiple window functions whose window definitions (OVER clauses) may be the same or different. For the same windows, there is no need to partition and sort them again. We can merge them into a Window operator. such as The realization principle of window function in spark and hive Case in: select i ...

Added by serverman on Tue, 07 Apr 2020 17:52:21 +0300

ElasticSearch implements data paging (using bucket sort)

Be careful: es version at least 6.1 above Sentence: GET 76/sessions/_search { "size": 0, "query": { "bool": { "must": [ { "term": { "sid": { "value": "76e14832" } } }, { "range": { "v_ymd": { "format": "yyyy-MM-d ...

Added by ryanlwh on Mon, 06 Apr 2020 20:42:41 +0300