Ubuntu Compile and Install PHP 8.0 Alpha Procedure Author: Chuwen Time: 2020-06-26 Classification: PHP comment ``` apt install libsqlite3-dev ``` ## configure: error: Please reinstall the BZip2 distribution Then go to install ``` sudo apt-get install libbz2-dev ``` ## No package 'libcurl' found ``` apt-get install libcurl4-openssl-dev ``` ## configure: error: GNU MP Library version 4.2 or greater required. ``` apt install libgmp-dev ``` ## No package 'oniguruma' found ``` apt install libonig-dev ``` ## configure: error: Please reinstall readline - I cannot find readline.h ``` sudo apt-get install libreadline6-dev ``` --- ``` apt install libsqlite3-dev apt-get install libbz2-dev apt-get install libcurl4-openssl-dev apt install libgmp-dev apt install libonig-dev apt-get install libreadline6-dev ``` ``` +--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+ Thank you for using PHP. configure: WARNING: unrecognized options: --enable-inline-optimization, --with-libxml-dir, --with-xmlrpc, --with-pcre-regex, --with-pcre-dir, --with-gd, --with-jpeg-dir, --with-png-dir, --with-freetype-dir, --with-onig, --enable-zip, --enable-wddx ```
Windows FFmpeg batch flac to mp3 music format Author: Chuwen Time: 2020-06-25 Classification: Windows comment #Please use CMD to execute the following command >This is the creation folder ``` md result ``` >Batch convert format to result folder ``` for /R %v IN (*.flac) do ( ffmpeg -i %v -ab 320k -ar 44100 -id3v2_version 3 "result\%~nv.mp3") ```
JavaScript natively supports replaceAll Author: Chuwen Time: 2020-06-24 Classification: Other classifications 1 comment See MDN for details: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll >The 'replaceAll()' method returns a new string, all of which meet the requirements; Pattern matching is replaced by; Replaced. The pattern can be a string or a 'RegExp', and the replacement can be a string or a function to be called every time a match is made. #However, the compatibility is very low. Only Chrome 85 Firefox 77 and Safari 13.1 start to support ! [Snipaste_2020-06-24_16-23-06.png][1] #Chrome 85 running results ``` I 66 you 66 ah ". replace (" 66 "," like "); >>>"I like you 66 ah" "I 66 you 66 ah". replaceAll ("66", "like"); >>>"I like it You like it" ``` ! [Snipaste_2020-06-24_16-28-26.png][2] #Of course, you can also use replace to achieve similar functions ``` "I 666, you 666". replace (/666/g, "like"); >>>"I like it You like it" "I {{$tmp}} you {{$tmp}}". replace (/{{ $tmp}}}/g, "like"); >>>"I like it You like it" ``` [1]: https://cdn.nowtime.cc/2020/06/24/3937386759.png [2]: https://cdn.nowtime.cc/2020/06/24/4110438231.png
General code for the new version of Zhengfang educational administration system of Xiao'ai curriculum Author: Chuwen Time: 2020-06-10 Classification: JQuery comment ! [Snipaste_2020-06-10_20-10-18.png][1] ! [Snipaste_2020-06-10_20-10-18.png][2] #Code ``` function scheduleHtmlParser(html) { //Editable except function name //The passed in parameter is the html obtained from the previous function //Regular matching can be used //It can be used to resolve dom matching. The tool has a built-in $, which is the same as the jquery method. You can use it directly. Refer to: https://juejin.im/post/5ea131f76fb9a03c8122d6b9 //The following is an example that you can completely override or change on this basis let course = $('#table1 .timetable_con'); var courseInfos = [];// Course information var sectionsTimes = [];// Section information, not required for (let i = 0; i < course.length; i++) { var _name = $(course[i]).find("p[class=title]").text();// Course name var _day_session = $(course[i]).parent().attr("id").split("-"); var day = _day_session[0];// What day of the week Var _position='',//Class location _Teacher='',//teacher SectionsTmp=[],//Temporary storage section array weeksTmp = [];//// Temporary storage week array $(course[i]).find("p").each(function (index, item) { var _typeName = $(this).children("span").attr("data-original-title");// Class alias. Festival/week, class location, teacher, class name if(_typeName !== undefined) _typeName = _typeName.trim(); var _text = $(this).text().trim(); If (_typeName=='Day/Week '){ Var _length=_text. match (/ ((.+?) sections )/); //Determine whether there is a section if (_length === null) { Return 0;//Jump out of this loop if it does not exist } //Current course session information sectionsTmp = function () { let num = _length[1].split("-"); let tmp = []; for (let i = parseInt(num[0]); i <= parseInt(num[1]); i++) { tmp.push({ section: parseInt(i) }); } return tmp; }(); //Temporary storage week weeksTmp = function () { var tmp = [], _Week=_text. replace (_length [0], ""). split ("week") [0],//week _weekRange = _week.split("-"), _weeekType = -1;//- 1: No single or double week, 1: single week, 0: double week If (_text. indexOf ("(single)")!==- 1) { _weeekType = 1; }Else if (_text. indexOf ("(double)")!==- 1) { _weeekType = 0; } for (let i = parseInt(_weekRange[0].trim()); i <= parseInt(_weekRange[1]); i++) { if (i % 2 === _weeekType && _weeekType !== - 1) tmp.push(i);// Special single and double cycle indentation if (_weeekType === -1) tmp.push(i);// Partial single and double cycle indentation } return tmp; }(); }Else if (_typeName==='Class location '){ _position = _text; }Else if (_typeName=='Teacher'){ _teacher = _text; } }); courseInfos.push({ Name: _name,//Course name Position: _position,//Position Teacher: _teacher,//teacher name day: day, Weeks: weeksTmp,//Which weeks have classes Sections: sectionsTmp,//which sections }) } console.info(courseInfos); return { courseInfos: courseInfos } } ``` [1]: https://cdn.nowtime.cc/2020/06/10/1914996304.jpg [2]: https://cdn.nowtime.cc/2020/06/10/383694665.png
Windows 10 New/Delete Folder and File Do Not Refresh Solution Author: Chuwen Time: 2020-06-08 Classification: Windows 2 comments #Preamble For the past few days, I don't know what I have done. As a result, new/deleted folders and files in the file manager will not be displayed immediately, but can only be seen after refreshing/pressing F5. This is very annoying. I think my mechanical hard disk is broken (now it takes several seconds to delete a blank file....) #Solution After checking online, they said that modifying the registry and disabling the audio panel detection could solve the problem, but it didn't work for me. The guide saw a solution that can be solved by executing one line of command Win+R pops up the * * Run Creation window * *, and then enter 'ie4uinit - show' and press Enter to solve my problem ! [Snipaste_2020-06-08_09-34-26.png][1] --- reference resources: https://jingyan.baidu.com/article/e5c39bf5f0c4d839d76033b2.html [1]: https://cdn.nowtime.cc/2020/06/08/3442822281.png