javascript-How to create such a page with the function of registering and logging into the message board (all-purpose code friends, please answer)?

1. Write a page that requires registration and login, and save the registration information locally. 2. Registered users can log in and leave messages. And close the web page and open it next time, the message will still be there. 1. What’s the idea? 2. What is needed? 3. How to achieve it? Reply content: 1. Write a page that requires registration and login, and saves the registration information locally. 2. Registered users can log in and leave messages. And close the web page and open it next time, the message will still be there. 1. What’s the idea? 2. What is needed? 3. How to achieve it? First write a form on the front-end page, and then submit it to the back-end. The back-end returns information to the front-end. Use session to save the user information and save the message in the database. Next time, use the user name to search for the message. Local? Do you want to use a standalone machine? localstroage?

Java crawler reads the URL of a specified picture, please answer

Java crawler reads the url of a specified picture, please answer Use jsoup to parse the url. The dom structure is as follows: There is only one look-inside-cover class, so directly find the img element and get the src attribute to get the image path. java accesses url to get pictures pri How to crawl pictures from web pages in Java Crawl website content through httpclient To analyze the image ‘rules’ in the current content page, crawling generally simulates a browser accessing the target web page, and analyzes the data search rules you need through the returned page HTML code. For example, when you crawl a web page and see the current page display The image format is as followsBy parsing the source code (html) of the crawled web page, you can perform string operations. Now There are corresponding third-party jar packages that can help you complete this part of the work faster, such as htmlpaser, get the corresponding address, and then save or download it. You can search, java crawler (httpclient) and htmlpaser to learn more. How does JAVA convert a local image into a network URL and then pass the URL to the front desk? Using the js…

Branch and bound method, Java, to implement circuit board arrangement problem, the program always sorts by default, please answer

Please let me know if there is any problem in running the code. After the program is written, the running result is always the default 1, 2, 3, 4, 5, 6, 7, 8. Unable to sort, urgent,,, Problem description: Let x represent an arrangement of n circuit boards, that is, insert circuit board x[i] into the i-th slot of the chassis The circuit board arrangement density density(x) determined by x is defined as the maximum number of connections spanning adjacent circuit board slots When designing the chassis, the wiring gap on one side of the slot is determined by the density of the circuit board arrangement. Therefore, the circuit board arrangement problem requires that for a given circuit board connection condition (connection block), determine the optimal arrangement of the circuit board so that It has the smallest density. Here is the code //Test class public class BbBoardTest { public static void main(String[] args) { BbBoard bbboard=new BbBoard(); bbboard.bb(); bbboard.display(); } } //Node class public class HeapNode { int []now; int []x; int td;// int s;//Arrange the levels in the tree public HeapNode(int []noww,int []xx,int tempd,int ss){ now=noww; x=xx; td=tempd; s=ss;              } } //A queue or heap class written by…

JavaNIO related, the Selector server cannot read the data during the second access, please answer~~

My intention is that the client first sends data to the server, and then the server sends data to the client to complete a data exchange. But the client can access it for the first time, but the server can’t get the data during the second access? This problem has been bothering me for two days. I just learned NIO and I don’t understand why? Environment: jdk 1.8, win 10. In addition, do clients generally not write this way? Is it better to use socket directly? The client tried using Socket and found that the server still could not receive data the second time… Server code: 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 package cs; import java.net.InetSocketAddress; import java.net.Socket ; import java.nio.ByteBuffer; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; import java.nio.charset.Charset; import java.util.Iterator; import java.util.Set; public class Server { public static void main(String[] args) throws Exception { ServerSocketChannel ssc = ServerSocketChannel.open(); ssc.configureBlocking(false); ssc. socket().bind(new InetSocketAddress(8888)); Selector selector = Selector.open(); ssc.register(selector, SelectionKey .OP_ACCEPT); ByteBuffer buffer = ByteBuffer.allocate(1024); while (true) { int readyNum = selector.select(); if (readyNum == 0) { System.out.println(“——– ———-“);                                                                                                                                                                                                                                                                                       selector.selectedKeys().iterator(); ; br /> it.remove(); if (key.isAcceptable()) { // Accept the connection                   SocketChannel accept…

Problems related to php installation, always prompt various exceptions, please answer

PHP installation problems always prompt various errors, please answer I have configured PHP under Linux before, and now I want to build wamp, so I downloaded httpd-2.2.22-win32-x86-openssl-0.9.8t .msi and php5.2.17 compressed packages, create a new wamp folder in F, with four subfolders Apache2.2, PHP, Mysql, www (as the server home directory). Install apahce, php, and mysql in the corresponding packages respectively. , and then configure it according to http://www.win7china.com/html/13026.html. After configuration, the following problems occurred when testing phpCreate test.php in www, enter localhost in the browser /test.php, it always prompts the error The requested URL /test.php was not found on this server. Later, I checked the error log of apache and found that File does not exist: F:/wamp/Apache2.2/htdocs/test.php , so I wondered if it was because the DocumentRoot had not been changed. I checked the DocumentRoot result in the configuration file httpd.conf and found no problem, so I ignored it and put test.php directly into F:/wamp/Apache2.2/htdocs and tested again. localhost/test.php, this time there is no The requested URL /test.php was not found on this server error, but the content in test.php is directly displayed as follows:<?php phpinfo ();?>phpinfo() is not parsed; the page that displays the php iconI hope experts…

php writes XML file encoding error, please answer

php writes XML file encoding error, please answer

The encoding of XML file written by php is wrong, please answerI have a video table, the data structure is as follows: I use the following program to read the files in the table and generate XML files: include(“conn.php”); include(“crop.php”); $xmlFile = “123.xml”; $dom = new DomDocument(‘1.0′,’utf-8’); $dom->formatOutput=true; $thumbnails = $dom->createElement(“thumbnails”); mysql_select_db(‘hdm0910283_db’, $lnk) or die (‘Can\’t use hdm0910283_db : ‘ . mysql_error()); mysql_query(“SET NAMES utf-8″); $sql=”select * from video”; $query=mysql_query($sql); while ($row = mysql_fetch_array($query)) { //Cut youku screenshot $imageurl=”../workshow/images/”.$row[imgname]; cutphoto(“$imageurl”,”$imageurl”,200,113); $dom -> appendChild($thumbnails); $thumbnail = $dom->createElement(“thumbnail”); $thumbnail->setAttribute(‘filename’, $row[imgname]); $thumbnail->setAttribute(‘label’, $row[title]); $thumbnail->setAttribute(‘url’, $row[url]); $thumbnails -> appendChild($thumbnail); } $dom->save($xmlFile); When running, the following error is prompted: arning: DOMElement::setAttribute() [domelement.setattribute]: string is not in UTF-8 in D:\AppServ\www\rj\control\xml_do.php on line 20 Warning: DOMDocument::save() [domdocument.save]: output conversion failed due to conv error, bytes 0xCA 0xD3 0xC6 0xB5 in D:\AppServ\www\rj\control\xml_do.php on line 24 I have tested the insertion and reading of data in the table and there is no problem. Please help me solve it. XML ——Solution——————–mysql_query(” SET NAMES utf8″); utf-8 is invalid

Questions related to PHP calling pytnon program, please answer

PHP calling pytnon program problem, urgent need for answersThis post was last edited by chuandali on 2013-07-18 20:00:58 Dear heroes, the problem is this: my interface needs to interact with the system, and I want to use exec(“python /home/huliang/nessus_schedul/application_update.py 202.115.36.218 app”,$ out,$states); The statement executes the system call, “202.115.36.218” in python /home/huliang/nessus_schedul/application_update.py 202.115.36.218 app And “app” is the required parameter. The statement python /home/huliang/nessus_schedul/application_update.py 202.115.36.218 app can be executed under Linux, but as exec ( ) The first parameter of the function cannot be executed correctly. I would be very grateful if you could give me some advice and a solution. . . PHP Linux Python Share to: ——Solution——————– Quote: What does the sentence “Execute this command under the shell as the user of the web server” on the 1st floor mean? I’m a newbie and don’t really understand. . . Does your server use apache or nginx? These servers also have users when they are running. When you access it with a browser, the environment user in which PHP is executed is the user of these servers. When you use exec to execute, the permissions to execute shell commands are also the permissions of these server users. You You…

Questions related to PHP calling pytnon program, please answer

PHP calling pytnon program problem, urgent need for answers This post was last edited by chuandali on 2013-07-18 20:00:58 Dear heroes, the problem is this: my interface needs to interact with the system, and I want to use exec(“python /home/huliang/nessus_schedul/application_update.py 202.115.36.218 app”,$ out,$states); The statement executes the system call, “202.115.36.218” in python /home/huliang/nessus_schedul/application_update.py 202.115.36.218 app And “app” is the required parameter. The statement python /home/huliang/nessus_schedul/application_update.py 202.115.36.218 app can be executed under Linux, but as exec ( ) The first parameter of the function cannot be executed correctly. I would be very grateful if you could give me some advice and a solution. . . PHP Linux Python Share to: ——Solution——————– Quote: What does the sentence “Execute this command under the shell as the user of the web server” on the 1st floor mean? I’m a newbie and don’t really understand. . . Does your server use apache or nginx? These servers also have users when they are running. When you access it with a browser, the environment user in which PHP is executed is the user of these servers. When you use exec to execute it, the permissions to execute shell commands are also the permissions of these server users.…

Questions related to PHP calling pytnon program, please answer

Problem with PHP calling pytnon program, please answer urgently This post was last edited by chuandali on 2013-07-18 20:00:58 Dear heroes, the question is this: My interface needs to interact with the system, and I want to use exec(“python /home/huliang/nessus_schedul/application_update.py 202.115.36.218 app”,$out,$states); Statement execution system call, “202.115.36.218” and “app” in python /home/huliang/nessus_schedul/application_update.py 202.115.36.218 app are the required parameters , the statement python /home/huliang/nessus_schedul/application_update.py 202.115.36.218 app can be executed under Linux, but it cannot be used as the first parameter of the exec() function It was executed correctly. I would be very grateful for the guidance and solution provided by the ball hero. . . PHP Linux Python Share to: ——Solution——————– Quote: What does the sentence “Execute this command under the shell as the user of the web server” on the 1st floor mean? I’m a newbie and don’t quite understand… Does your server use apache or nginx? These servers also have users when running, and you use a browser When accessing, the environment user for PHP execution is the user of these servers. When you use exec to execute, the permissions to execute shell commands are also the permissions of these server users. You can switch to log in as…

Problems related to php installation, always prompt various exceptions, please answer

PHP installation problems always prompt various errors, please answer I have configured PHP under Linux before, and now I want to build wamp, so I downloaded httpd-2.2.22-win32-x86-openssl-0.9.8t .msi and php5.2.17 compressed packages, create a new wamp folder in F, with four subfolders Apache2.2, PHP, Mysql, www (as the server home directory). Install apahce, php, and mysql in the corresponding packages respectively. , and then configure it according to http://www.win7china.com/html/13026.html. After configuration, the following problems occurred when testing phpCreate test.php in www, enter localhost in the browser /test.php, it always prompts the error The requested URL /test.php was not found on this server. Later, I checked the error log of apache and found that File does not exist: F:/wamp/Apache2.2/htdocs/test.php , so I wondered if it was because the DocumentRoot had not been changed. I checked the DocumentRoot result in the configuration file httpd.conf and found no problem, so I ignored it and put test.php directly into F:/wamp/Apache2.2/htdocs and tested again. localhost/test.php, this time there is no error The requested URL /test.php was not found on this server, but the content in test.php is directly displayed as follows:<?php phpinfo ();?>phpinfo() is not parsed; the page that displays the php iconI hope experts…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索