• C language notes (2): data type (basic data type), type conversion (automatic conversion, cast)


    Welcome to my official account, “old notes”, or to visit my personal blog. www.yuxiaoshao.cn Can QQ exchange learning 1316677086 or join my group exchange: 901648700 share resources, exchange learning data type Can add QQ group together to learn C language 984775301Data types are a wide range of systems used to declare variables or functions of […]

  • Summary of common regular expressions


    Regular expression is a basic skill necessary for web development. Mastering regular expression skillfully can greatly improve your development efficiency, especially in the analysis of web crawler crawling page content. Here are some common regular expressions, hoping to help you Check number Number: ^*$ N-bit number: ^ D {n}$ Number of at least N bits: […]

  • The processing method of decimal number that can only be input in the input box of Vue


    <a-input @input=” FC.numDxsCheck (form, 2, ‘name’)” v-model=” form.name “: MaxLength = 50” placeholder = please enter “/ >” /** *Numeric input with decimal point – default 4 as decimal *For example: FC.numDxsCheck (form, 3,’phone’) *Form: form object, including phone *Ws: how many decimal places *Key: when the key name is not called phone, you need […]

  • Python learning note day3 – Python operator


    1. Python type conversion 2. Python arithmetic operators 2.1 addition (+) operator m = 10 n = 97 sum1 = m + n x = 7.2 y = 15.3 sum2 = x + y print(“sum1=%d, sum2=%.2f” % (sum1, sum2) ) Operation results:sum1=107, sum2=22.50 Concatenated string When+When used with numbers, it means addition, but when+When used […]

  • Implementation of input format restriction of input box in Vue


    In the process of development, we have encountered some situations where we need to restrict the input, such as the amount of money, only alphanumeric characters, and the number of decimal places that can be input. We searched many methods on the Internet and encountered some pitfalls, so we shared them 1. Use modifiers to […]

  • Common operations of CSS


    Get element width 1. Only inline styles can be obtained var ele = document.getElementById(‘element’); console.log ( ele.style.width ); // empty string console.log(ele.style.height); // ‘100px’ 2. Real time style MDN data var ele = document.getElementById(‘element’); console.log(window.getComputedStyle(ele).width); // ‘100px’ console.log(window.getComputedStyle(ele).height); // ‘100px’ 3、Element.currentStyle.width/height The function is the same as the second point. It only exists in the […]

  • Why are your query results beyond the query time range


    Let’s cut the crap. Go directly to the SQL code (test and verify it if you are interested). Why did the following query statement query the records of 2008-11-27? This is a problem encountered by colleagues. I designed an example.   USE AdventureWorks2014; GO SELECT *  FROM [Person].[Person] WHERE ModifiedDate >= ‘2008-11-26 00:00:00:000’   AND […]

  • PHP asynchronous processing


    a.php \n”; } else { $out = “GET ” . $url . ” / HTTP/1.1\r\n”; $out .= “Host: ” . $domain . “\r\n”; $out .= “Connection: Close\r\n\r\n”; fwrite($fp, $out); /*Ignore execution results while (!feof($fp)) { echo fgets($fp, 128); }*/ fclose($fp); } } fsockopen_get(‘temp.com’, ‘/b.php’); $end = microtime(true); $time= $end – $start; //It can be adjusted […]

  • Why is precision lost? Teach you to understand IEEE-754!


    Link to the original text: https://ssshooter.com/2020-09… The image above is from Wikipedia. IEEE-754 standard is a floating-point number standard. There are three formats: 32-bit, 64-bit, and 128 bit (the above two pictures are 32-bit and 64 bit respectively, and the structure is consistent). JavaScript uses 64 bit, which is commonly known as “double precision”. This […]

  • The C ා string extension removes the thousandth, and supports setting accuracy


    /// ///The decimal places are removed from the string, and the precision can be specified. The default value is two decimal places. If the string fails, the string is 0 /// /// /// /// public static String ParseThousands(this String This, int accuracy = 2) { if (String.IsNullOrEmpty(This)) return This; try { This = double.Parse(This, NumberStyles.AllowThousands […]

  • JS operation of strange skills, continuous record learning


    1. Array dimensionality reductionTwo dimensional array let arr = [ [1], [2], [3] ]; arr = Array.prototype.concat.apply([], arr); console.log(arr);// [1, 2, 3] let array = [ [1], [2], [3] ]; array = array.flat(2); console.log(array); // [1, 2, 3] Multidimensional array let arrMore = [1, 2, [3], [[4]]]; arrMore = arrMore.flat(Infinity); console.log(arrMore); 2. Determine whether the […]

  • 9. C language format controller / place holder


    The Internet has such a paragraph: If a boy has no partner –single af; If a girl has no partner –Go Believe;   Whether it’s a single dog or a dog, it always corresponds to a type. In the previous article, we also introduced that variable types in C language include shaping, floating-point numbers, strings, […]