ArticleDirectory
I have been very full recently and spent almost all my work hours on my novel website. I can refer to the previous article about the origin of this novel Website:Keep in mind your personal growth after an interview is not as expectedFor example, you can use httpwebrequest to create a request and httpwebresponse to accept the data returned by the request, some exceptions may be reported from time to time:The server submitted a protocol conflict.. This exception is intermittent, and access and reading through socket occasionally occurs:The server actively rejects the connection and the basic link is disabled.. I later read a method for encapsulating HTTP webrequest on the Internet:
Httpwebrequest t_request = (httpwebrequest) webrequest. Create (I _url );
t_request.timeout = c_time_out;
t_request.useragent = " Mozilla/5.0 (windows; U; Windows NT 5.1; en-US; RV: 1.9.0.5) Gecko/2008120122 Firefox/3.0.5 (. net CLR ";
T_request.accept ="Text/html, application/XHTML + XML, application/XML; q = 0.9, */*; q = 0.8";
T_request.headers ["Accept-Language"] ="En-US, en; q= 0.5";
T_request.headers ["Accept-charset"] ="ISO-8859-1, UTF-8; q = 0.7, *; q = 0.7";
Specify some attributes of the request and accept the submitted sentiment data in the form of a delegate. It is found that this method is relatively stable and the speed does not seem to be much different. View the logs generated by the website on a daily basis (the log component of my website uses nlog. From the introduction, it is thread-based and records logs in parallel.CodeThe logic is not directly affected. This still needs to be verified and whether or not the code execution speed will be affected by logging.) analyze some of the improvements that need to be made on the website and put them in it several hours a day, I learned to think slowly, gradually get used to thinking, and gradually develop the habit of recording and thinking. These are all digress. This article is written because the Department is recruiting people recently, the previous written examination questions by the leaders are outdated, so that the brothers can brainstorm and think about the questions. So I thought about the following questions, it basically comes from refining some of my questions on this website.
1. extract a number from a string (return a lower-case number, return 0 if there is no readable number). character string features: There may be upper-case numbers, such as twelve thousand three hundred and sixty, return 12360, it may also contain lower-case numbers, such as 14520, which directly returns 14520. Sometimes it is possible that 0 in the number is written as O, for example, 12021 is written as 12o21. 2, The data table contains two fields: siteid and siteurl. The data is as follows:
siteid |
siteurl |
1 |
abc.com |
1 |
cde.com |
2 |
2abc. coom |
2 |
2abc. coom |
3 |
3abc. coom |
3 |
3abc. coom |
4 |
4abc. coom |
4 |
4abc. coom |
5 |
5abc. coom |
Please read the table data into a queueQueue <siteinfo>,To reach 10Siteinfo, The 10SiteinfoOfSiteidAre not the same
3. Create a windowserviceProgramUse 50 threads to read a piece of data from the database and write it to a text file. Each thread writes a file once every second. data read by each thread cannot be crossed. The number of database data entries is 1 million. 4. When a page has a very high access level, how can I provide the page loading speed? It is explained from the front of HTML and the server. 5. When a business logic involves multiple enumerations, for example, if the SQL statement "select * from a" is executed under Condition, execute the "select * from B" SQL statement under Condition B. However, there may be hundreds of conditions. How can I write this logic code. 6. Implement word reversal in an English sentence, such as "I am come from Shanghai" and input Shanghai from come am I. There may be multiple spaces between words. 7. A web page in Asp.net contains the front-end ASPX page and backend. CS class, written in the <body> label of the aspx code: I am a Chinese, followed. response in the page_load method of CS. write ("I am a Chinese"). The two methods are the one shown on the page first. 8. A large background image is referenced in a page, and a certain area of the background image is used as the background of a div. How can I write it with CSS? 9. How does JS reference variables in. CS? For example, a variable in. CS is string T_A = "123". How does JS define a variable to accept the value of T_A. 10. a js file contains the following content: document. write ('Something, the content here is long'); the page will output "something, the content here is very long" where the JS is referenced ", how can I dynamically specify the "something, the content here is very long" content to an HTML control.
These questions are random and of no particular value or representativeness. However, these questions can be traced from the knowledge points I recently used on my website, and are derived from my life, you don't know what to do. If you ask for a question, how can you do it?
Postscript:
When I went home to log on to the blog Park, I found that this article came up with the headlines. After reading some comments, I felt some people were enthusiastic about the discussion of technical knowledge points. The question was dead, the idea is to live, and everyone's point of view is unique,
Some people want to provide comprehensive answers or ideas,I believe that there will be a variety of implementation methods. In the next article, I will talk about my personal ideas about these topics and talk about them using pseudocode.
After reading the comments of Dr. Zhang Tao, "Zhang Tao: How many levels have the landlord had in English? The question is no. "A few simple words contain great wisdom, haha.
I will not reply to your comments one by one. You can post your opinion in the next article.