1. Can Seesion still work after disabling cookies?
2. What function would you use to capture remote images locally?
3. Given name a and name b, give an algorithm to find their fate
4. Do you think Lunix is much faster than Win in pv10w with the same configuration?
5. Briefly describe the maximum capacity of post and get transmission respectively?
6. Write a function to find the maximum of 3 values with the least code.
Answer: 1. Cookies are stored locally, while seesion is stored on the server. Therefore, there is no direct relationship between the two. Seesion can still be used after disabling cookies.
2. Use file_get_contents function, ex:
3、
function is_gfriend($na,$nb)
{
$random1=rand(1,5);//Calculate that they have 1/5 fate
$random2=rand(1,5);
if ($random1==$random2)
return $na."+".$nb."You are destined";
else
return $na."+".$nb."Unfortunately there is no fate";
}
echo is_gfriend(a,b);
?>
4,
Company interview questions: Baidu web development engineer written test questions】
Part 1:
1. Explain the meaning of the following statement: document.form["formname"].submit;
2. There is the following statement:
Write code. When the mouse moves over the text box, the content in the text box will be automatically selected.
3. Convert character 09 into decimal number. www.xfcodes.com
4. Convert 1234567890 into 1,234,567,890 by separating every 3 digits with commas.
5. I forgot about html and css.
6. Enter a year in the text box, determine its zodiac sign, and output it next to the text box.
Required to write both html and javaservlet.
7.ajax retrieves data from the server {id: 123, name: "baidu", username: "mm", checked: true};
Analyze the value corresponding to name ("baidu"). (The question is long, I can’t remember )
8. Talk about customer experience. (Edited and compiled by Script Academy www.jbxue.com)
Answer: 1. Get the formname form submit button element.
2,
3,
4,
6,
8. Analyze from the perspective of satisfaction, tolerance, and feedback.
Part 2:
1. Common ideas of ajax, database trigger, gui, and interrupt mechanism. Let’s talk about this idea (mechanism).
2. Convert the first letters of all words in an English document to uppercase, and the document is stored in doc.txt. You can choose from a variety of programming languages (cc++, java, php...) to write out your ideas and try to optimize your program.
3. About the data structure of tree.
4. Database optimization:
There is a table product(id, name, price, count);
The speed is always very slow when executing the query:
select * from product where price=100;
Add to the price field With the previous non-clustered index, the query speed was still very slow.
(1) Analyze the reasons for slow query.
(2) How to optimize.
5.
One is the topic table and the other is the reply table.
1. Ask what are the shortcomings of doing this in terms of performance.
2. If the query reply time does not exceed a specific time period, the title of the topic
whose author’s name starts with mike should be queried as follows: (Edited by Script Academy www.jbxue.com)
What are the shortcomings of the above query statement in terms of performance?
How to optimize?
Answer: 1. The database trigger and interrupt mechanism are automatically completed by the database, while the ajax trigger is triggered by the user. Ajax optimizes the GUI and the database asynchronously.
2、