Category:Program Language

  • Example of FTP image upload function implemented by ThinkPHP framework

    Time:2020-4-2

    The example of this paper describes the function of FTP image upload implemented by ThinkPHP framework. To share with you for your reference, as follows: Background: The image upload function should be very common. In this paper, I refer to the integration method in ThinkPHP framework to sort out the FTP image upload function, so […]

  • Jsp + jQuery using Ajax to call JSON

    Time:2020-4-2

    The example of this paper describes the implementation of JSP + jQuery using Ajax to call JSON. To share with you for your reference, as follows: Reception: <script type=”text/javascript” src=”jquery-1.5.1.min.js”></script> <script type=”text/javascript”> //test function test(uid) { If (confirm (“confirm the user action” + uid + “? ()) { var date = new Date(); var param […]

  • Reg2vbs.vbs convert reg file to VBS file save script home revision

    Time:2020-4-2

    Copy codeThe code is as follows: ‘***************************************************************************** ‘ FileName: Reg2Vbs.VBS ‘ Author: baomaboy ‘Abstract: convert reg file to VBS file to save‘***************************************************************************** Dim WshShell,FSO On Error Resume Next Set WshSHell = WScript.CreateObject(“WScript.Shell”) Set FSO = CreateObject(“Scripting.FileSystemObject”) Set Args = WScript.Arguments CloseTime = 5 FileName = WScript.ScriptName FileFullName = WScript.ScriptFullName FilePath = FSO.GetParentFolderName(FileFullName) InsPath = FSO.GetSpecialFolder(1) […]

  • Randomly generating any number of license plate numbers in Python

    Time:2020-4-2

    When setting up the class, my roommate encountered the problem of generating 500W license plate number, so I wrote a program of randomly generating license plate number, which I hope you can adopt. Note: Python implementation import random def chepaihao(len=6): Char0 = ‘Beijing, Tianjin, Shanghai, Chongqing, Hebei, Yunnan, Liaoning, Hunan, Anhui, Shandong, new Jiangsu, Zhejiang, […]

  • Ruby + nokogori grab the first 10 pages of the embarrassing encyclopedia and store them in the database example

    Time:2020-4-2

    Ruby, nokogori, crawl the latest 10 pages of the Encyclopedia of embarrassing events and compare them with pictures and save them into the text and database at the same time Copy codeThe code is as follows: #encoding:utf-8require “open-uri”require “nokogiri”require “mysql”@dbh=Mysql.real_connect(“localhost”,”root”,”dengli”,”pachong”)@file=open(“qb.txt”,”w”)def getQiubai(url)  data=open(url){|f| f.read}  doc=Nokogiri::HTML(data)  doc.css(‘div.block.untagged.mb15.bs2’).each{|p|    content=p.css(‘div.content’).text    @file.puts(“#{content}\n”)    img=p.css(‘div.thumb img’).each{|img|       imgAddr=img.attr(‘src’)        @file.puts(“#{imgAddr}\n”)       time=Time.now       sql=”INSERT INTO […]

  • Deep understanding of closures in go language

    Time:2020-4-2

    closure Closures are often used in functional programming. What are closures? How is it generated and what problem is it used to solve? First, the literal definition of closure is given: closure is an entity composed of function and its related reference environment (i.e., closure = function + reference environment). This is hard to understand […]

  • How to switch and manage the appearance of WordPress website

    Time:2020-4-2

    Keyword Description: how to switch the website appearance management theme WordPress In the last tutorial, we talked about the management of WordPress links. Now let’s talk about the appearance management of WordPress. WordPress blog program is very excellent. It provides a simple appearance management mode, which allows users to easily design and manage the theme […]

  • Analysis of monitor operation in Java GUI programming

    Time:2020-4-2

    The example of this paper describes the monitor operation of Java GUI programming. To share with you for your reference, as follows: When you click the component component in the frame, it will produce the corresponding effect, but the corresponding component must be monitored to determine the object and the operation. However, if you use […]

  • An example of addition and subtraction of pointer in C language

    Time:2020-4-2

    It’s worth reading char arr[3]; printf(“arr:\n%d\n%d\n%d\n”, arr, arr + 1, arr + 2); char *parr[3]; printf(“parr:\n%d\n%d\n%d\n”, parr, parr + 1, parr + 2); From the results, we can see that each element of the character array occupies 1 byte, and each character pointer array occupies 4 bytes. Let’s take another example: char a = ‘a’, […]

  • SSM integration and construction (I)

    Time:2020-4-2

    This SSM integration is built by referring to the SSM integration of shangsilicon valley. The guys who need video can go to station B to find out Our project uses Maven to build, so first create a maven project Then choose a simple project   Changing the following jar to war represents a dynamic web […]

  • Python analysis tells you which products are popular in free fish?

    Time:2020-4-2

      Preface The text and pictures of the article are from the Internet, only for learning and communication, not for any commercial purpose. The copyright belongs to the original author. If you have any questions, please contact us in time for handling. Author: [Airport] PS: if you need Python learning materials, you can click the […]

  • C programming (24): number system conversion

    Time:2020-4-2

    Example 24 number system conversion Title Description Please make a program to realize the data conversion between two different bases. Input format There are three lines in total. The first line is a positive integer, representing the base n (2 ≤ n ≤ 16) of the number to be converted. The second line is an […]