Tag:Age

  • C ා calculate days according to birth date / calculate x year x month x day string

    Time:2020-10-21

    public class TimeTool { //Calculate the whole number of days according to the date of birth private static int GetAgeByBirthdate(DateTime birthdate) { DateTime now = DateTime.Now; int age = now.Year – birthdate.Year; if (now.Month < birthdate.Month || (now.Month == birthdate.Month && now.Day < birthdate.Day)) { age–; } return age < 0 ? 0 : age; […]

  • C practical exercises topic 28

    Time:2020-9-24

    Title:Five people sat together and asked how old was the fifth? He said he was two years older than the fourth. Asked about the age of the fourth person, he said that he was two years older than the third. Ask the third person and say that he is two years old than the second. […]

  • Oracle obtains the sample code of province, city, gender and age according to the ID card number

    Time:2020-8-5

    1. Query the province and city by ID card number SELECT count(*) as total, case substr(t.CERTNO,0,2) When ’11’ then ‘Beijing When ’12’ then ‘Tianjin When’13 ‘then’ Hebei Province ‘ When ’14’ then ‘Shanxi Province’ When’15 ‘then’ Inner Mongolia Autonomous Region ‘ When’21 ‘then’ Liaoning Province ‘ When ’22’ then ‘Jilin Province’ When’23 ‘then’ Heilongjiang Province […]

  • Oracle Foundation

    Time:2020-4-1

    Oracle am.2019/10/22 C:\app\Administrator\product C:\app\Administrator\oradata C:\app\Administrator\oradata\orcl20. CTL control document20. DBF data file20. Log log file JDK path C:\app\Administrator\product\11.1.0\db_1\jdk\bin Default storage path of database file C:\app\Administrator\product\11.1.0\db_1\database (mysql -u root -p)CMD DOS command line executionSqlplus user name / password sqlplus system/123 Connect to Oracle serverConn username / password as connection identity @ server connection string –Create tablespaceCreate tablespace […]

  • Constructor or builder?

    Time:2020-3-20

    In the process of instantiating a class, constructors with multiple parameters are usually encountered, but what if some parameters are not required? Do you want to initialize so many parameters every time? public class Person { Private int ID; // ID card No Private string name; // name Private int age; // age Private Boolean […]

  • C ා if else statement

    Time:2020-3-16

    I. Introduction An IF statement can be followed by an optional else statement, which is executed when the Boolean expression is false. Two. Grammar If (judgment condition) { Code executed; } else { Code executed; } Description: Execution process:When the program executes to if, it first determines if the parenthesis of if is to determine […]

  • Python foundation function

    Time:2020-2-13

    function What is a function Function is a tool that can be called repeatedly Why use functions Prevent code redundancy; do not use functions, poor code readability How to use functions Definition of function Keyword (DEF) function name (index) parentheses ():“” “function description: used to describe the function code body’s function” “” def index(): “” […]

  • Dynamic analysis of JSON

    Time:2020-1-10

     Recently, JSON needs to be parsed dynamically in projects, but there are many ways to parse JSON. How to parse it reasonably is the problem we need to consider? For example, jtoken and jobobject provided under newtonsoft.json.linq and jsonconvert provided under newtonsoft.json. JObject  Used to manipulate JSON objects JArray For manipulating JSON arrays JValue Represents […]