Tag:Quotation marks

  • A little content of preventing SQL injection in mybatis

    Time:2022-4-10

    Some procedures related to preventing SQL injection:1. Mybatis parses # — > 2 in the SQL file, interacts with the database during JDBC precompiling — > 3, and interacts with the database when JDBC sets the value 1、 Mybatis parses # symbols into placeholders’? ‘ First look at the $symbol: public String handleToken(String content) { […]

  • R for Data Science (note) — data transformation (select basic use)

    Time:2022-3-29

    R for Data Science Tidy stream data processing is becoming more and more popular. I think it has a very important relationship with the use of pipeline symbol% >% and data processing verb. I call it efficient to solve the most important and common problems in the least time; The remaining difficulty, I call it […]

  • Sass string function

    Time:2022-3-22

    Sass defines various types of functions, most of which can be called directly through CSS statements. The following is the function classification in sass: String function Digital function List function Mapping function Selector function Introspection function Color value function In this section, we will first learn about string related functions. What are the string functions […]

  • Sometimes I think I won’t markdown

    Time:2022-2-15

    preface stay“A blog with vuepress + GitHub pages”In, we used vuepress to build a blog. The final effect is as follows:Typescript Chinese document。 In the process of optimizing blog, because you need to writemarkdown-itPlug in, turn over the markdownCommonMark Spec, I suddenly found that I didn’t know enough about markdown: Soft line breaks The newline […]

  • Introduction to the functions of special characters (dollar sign, backslash, quotation mark, etc.) in shell script

    Time:2022-2-7

    Special characters in shell are 1. $Dollar Sign2. \ backslash3. ` backquote4. “Double quotes” 5、< ,>;,*,?,[,] Let me list the explanations one by one 1、 $symbol 1、echo $? Displays the exit status of the previous instruction2、echo “$?” The effect is the same as above3、echo ‘$?’ Is $?4、echo \$? Is $?5、echo “\$?” Is $? You may […]

  • Remove quotation marks from Python dictionary

    Time:2022-1-8

    Remove quotation marks from Python dictionary import astd = {‘clustering’: ‘true’, ‘http_proxy_port’: ’80’, ‘https_proxy_port’: ‘443’, ‘localmemberhost’: ‘127.0.1.1’, ‘localmemberport’: ‘4100’, ‘members’: ‘{“mgt.as.wso2.com”: 4100,”as.wso2.com”: 4300}’, ‘portoffset’: ‘1’, ‘stratos_instance_data_mgt_host_name’: ‘mgt.as.wso2.com’, ‘stratos_instance_data_worker_host_name’: ‘as.wso2.com’, ‘subdomain’: ‘mgt’}print dfor k, v in d.items(): if v[0] == ‘{‘ and v[-1] == ‘}’: d[k] = ast.literal_eval(v) print d

  • Redis distributed lock implementation (golang version)

    Time:2021-12-14

    code . . . const redisMutexLockExpTime = 15 //Trygetdistributedlock distributed lock acquisition //Requestid is used to identify the requesting client. It can be a random string and must be unique func TryGetDistributedLock(lockKey, requestId string, isNegative bool) bool { If isnegative {// multiple attempts to get retry := 1 for { ok, err := cache.Do(“SET”, lockKey, […]

  • Zsh Development Guide (Part 3 escape characters and formatted output of string processing)

    Time:2021-11-24

    Reading guide The previous article talked about the common string operations of Zsh, and this article began to talk about more trivial escape characters and formatted output. Including the use of escape characters, quotation marks, print, printf, etc. There is no need to memorize many of them as a manual reference. Escape character Escape character […]

  • The role of ` in SQL statements

    Time:2021-11-11

    The role of ` in SQL statements Make the attack and defense World Web ZonesupersqliTopic: when building SQL statements, you can parse if there is a ‘in the SQL statement, but not if there is no’. According to the information, it is usually used to explain that the contents are database name, table name and […]

  • Type list generation parameter unpacking

    Time:2021-11-9

    Type system is the cornerstone of programming language.PHPData types exist implicitly. Some operations between different data types can complete the transformation automatically.java,golangBoth are strongly typed languages, and types need explicit declarations, even if go type inference behaves like a dynamic language. type pythonIn a sense, it is not completely dynamic like PHP, but it is […]

  • Zsh Development Guide (Part 20 code style)

    Time:2021-10-22

    Reading guide Because the shell script syntax is relatively flexible, and the programming languages familiar to the developers who write shell scripts are also quite different, it is easy for everyone to write code with different styles. It’s ok if you only use it by yourself. If you cooperate to develop the same project, different […]

  • Mongo change data type

    Time:2021-9-19

    Mongo writes in quotation marks, resulting in some numeric fields of string type. Modify the field type to numeric type. db.Report99.find().forEach( function(doc){ db.Report99.update({‘_id’: doc._id},{$set:{“begin-quantity”: parseFloat(doc[“begin-quantity”])}}); // Change to floating point number db.Report99.update({‘_id’: doc._id},{$set:{“end-quantity”: NumberInt(doc[“end-quantity”])}}); // Change to integer } ); Mongo4.2 + version, the parameters can be as follows: db.getCollection(“my-report”).update( { “begin-quantity”: { $type: “string” […]