Category:Program Language

  • Map and factory model


    Map and factory pattern The value of a map can be a method Together with the dock type interface mode of go, it is convenient to implement the factory mode of a single method object func TestMap(t *testing.T) { m := map[int]func(op int) int{} m[1] = func(op int) int { return op } m[2] = […]

  • C actual combat exercise topic 26 – finding factorial by recursion


    Title:Use recursive method to find 5!. Program analysis:Recursive formula: FN = FN_ 1*4! example: #include int main() { int i; int fact(int); for(i=0;i<6;i++){ printf(“%d!=%d\n”,i,fact(i)); } } int fact(int j) { int sum; if(j==0){ sum=1; } else { sum=j*fact(j-1); } return sum; } The output results of the above examples are as follows: 0!=1 1!=1 2!=2 […]

  • JetBrains round 2: another three months for the free family bucket


    Yesterday, I shared how to get the exchange code of the original family barrel by participating in the decryption task of JetBrains. Today, JetBrains continued to launch the second wave of tasks on twitter early this morning: Now, let’s continue to take part in the fight to save the lives of our original JetBrains family! […]

  • PHP mysqli_ stmt_ bind_ Param mysqli function


    Definition and Usage mysqli_stmt_bind_param– bind variables to prepared statements as parameters Version support PHP4 PHP5 PHP7 I won’t support it support support grammar mysqli_stmt_bind_param ( mysqli_stmt $stmt , string $types , mixed &$var1 [, mixed &$… ] ) Pass to mysqli_ In the SQL statement of prepare(), bind variables for parameter markers. be careful: if […]

  • How to create real-time audio and video functions in games based on blueprint


    Recently, epic released its unreal 5 game engine for next generation games and a stunning demo. It is said that each resource in the game has one million drawing triangles, and each frame has more than one billion drawing triangles. That is to say, the game scene built by developers can get the visual experience […]

  • Analysis of Java static and non static member variable initialization process


    This article mainly introduces the Java static and non-static member variable initialization process analysis, the article through the example code introduction is very detailed, has the certain reference study value to everybody’s study or the work, needs the friend may refer to The initialization time of non static member variable and static member variable in […]

  • A detailed explanation of dotsql in go Language Library Series


    Guide: is it very interesting to be able to carry out a line or several lines of SQL file separately? Today, let’s introduce this interesting library, dotsql. Background Dotsql is not ORM, nor the builder of SQL query statements. It is a tool that can carry out a few lines in a SQL file, which […]

  • Code of searching folder by date under vbs


    On Error Resume Next dtmTargetDate = “20020301000000.000000-420” strComputer = “.” Set objWMIService = GetObject _     (“winmgmts:” & “!\\” & strComputer & “\root\cimv2”) Set colFolders = objWMIService.ExecQuery _     (“Select * from Win32_Directory Where CreationDate > ‘” & _         dtmtargetDate & “‘”) For Each objFolder in colFolders     Wscript.Echo objFolder.Name  Next

  • How to realize face recognition verification through Python


    This article mainly introduces how to realize face recognition verification through python. The example code is introduced in detail, which has certain reference learning value for everyone’s study or work. Friends in need can refer to it Code directly, this case is based on Login modified, recognition rate is not very good, sometimes blocked […]

  • Laravel modification verification exception response format example code details


    The default response format of larravel is as follows. Sometimes this format does not meet its own requirements and needs to be modified. // status 422 { “message”:”The given data was invalid.”, “errors”:{ “url”:[ “Invalid URL format” ] } } Thrown when the request fails validationValidationExceptionException, which is finally handed over to the global exceptionHandlerClass […]

  • Simple call example of JSP page to get server time


    Calendar c = Calendar.getInstance(); int year = c.get(Calendar.YEAR); int month = c.get(Calendar.MONTH); int day= c.get(Calendar.DAY); These three lines are added to <%% > Call with <% = year% > <% = month% > <% = day% >

  • XPath: HTML parsing artifact of Python crawler series


    Through the previous article, we have known how to obtain the web page and download the file, but the previous web page we obtained is unprocessed, redundant information is too much, can not be analyzed and used In this section, we’ll learn how to filter the information you need from the web page, and recommend […]