2014/10/23 -- remember the question of a new account registration. Account 2014

Source: Internet
Author: User

2014/10/23 -- remember the question of a new account registration. Account 2014
The reason may be lazy recently. I feel that I haven't recorded any problems related to oj usage for a long time. I don't feel too lazy to write it.

Yesterday, I encountered a problem that the non-family Software Association member could not register. I want to record the previous issue with the Journal account by the way (I am trying to recall it and hope I don't miss any details ):

1. Fixed the bash vulnerability in UNIX-like systems:

During a chat by the end of September, I had no intention of knowing the bash vulnerability in the like UNIX system, which was so popular on the Internet at the time. Then, all my friends directly asked me, I finally found a good blog post on the 30th, fixed it, and made a simple record after learning nothing about it on the Internet. Http://blog.csdn.net/u013634961/article/details/39699035


2. Questions about batch registration of new accounts:

I started to think about how to solve this problem during the summer vacation, but I didn't ask my brother all the time until I got a new student at the beginning of September. However, since the Academic Affairs Office's class list has not been determined, this year's new students can select teachers, and the list has been postponed for a long time. I did not get the basic confirmation list until mid-late September, so start this matter.

In fact, the principle of batch registration for new accounts is quite simple: it is the data in the database import table.
The specific implementation is to use the python xlrd module to read data from an excel table and then import the data into the mysql database. In fact, the predecessors have already written the entire operation into a python script. All I need to do is modify some values as needed and then execute the script program.

Before that, of course, one of the things I have to do is to make sure the local lab is correct. The problem arises again: first, I set up the same environment as the server (mainly the establishment of mysql databases and the installation of various python modules )! Knowledge about importing and exporting databases in linux, and installing slrd and mysqldb modules in ubuntu. The problem encountered when executing python scripts is a principle: What is missing!

During this period, because deeplin was used to cause various database problems, Pei Ye's debian had no database problems and put it on hold for a while until he switched to ubuntu again. During this period, people are also upset and don't want to do anything, ah .... Old problems!

Something went wrong after everything was configured: first, I didn't understand the python code, so I didn't know where to modify it (the data in the table should correspond to the fields in the mysql database ); the second step is to import only one workbook at a time after the modification. (One excel table has multiple workbooks, And the python script has the write. You can modify the relevant data to import them separately ); in addition, because each Workbook is edited by a different instructor, there is a format problem. Some workbooks can be imported normally, and some workbooks cannot be imported normally, some workbooks cannot be imported because the account is of the floating point type during the import process, or even a decimal point occurs after the student ID.

In fact, this problem is the biggest headache for all problems. It has been a long time since the end of the 11 s. The teacher personally supervised the problem and joined the whole brother to solve the problem. (during this period, I tried various methods: format is changed to text, and format is used for refreshing .....), therefore, the import is successful. However, because of reading the wiki and then (in fact, there is no need to take that step on the wiki), the person in the same class has been imported twice (fortunately, I discovered it in time ), the 70 s were deleted from the database one by one, so they were crying for one afternoon. So far, the registration of 12 employees of the family planning software has come to an end, and some minor personal questions will not be raised in the future. On April 9, October 7, it may be nearly a month late last year. Sorry!


3. Question about viewing code for an experiment competition:

It may be around October 17. This is what Mr. Liu asked me to do. How do I feel like there are so many things (5555555) in the background of my session? for front-end things, look for my brother! Download the source code to the server;

Add a field to the contest table of the database to check whether the field is 0 or 1 to determine whether it is an experiment-type competition;

The next day, we fixed the bug that we could only modify when adding a game. We could not change the game management interface to an experiment;

On the third day, the data hi-eye game was fixed to display icons that can be viewed by everyone's code (but you can only view your own code, but what we need is a bug that shows the icons we can see as in practice, and can only look at our own code;

This problem is caused by modifying the source code.


4. Non-family software Member registration problems:

In February October 22, when a non-family software member was registered, after entering the information and clicking submit, the browser was blank without any response, and then the user could not log on. Check the database, no. The registration is successful.

Reason: the number of characters in the nickname column is 21, and the number of characters in the registration specification is large (Nickname: ACM2014 + professional class abbreviation + name!

Knowledge:

Commonly used Chinese characters are encoded with UTF-8 and occupy 3 bytes (about 20 thousand characters). However, most Chinese Characters in super-large character sets occupy 4 bytes (in the unicode encoding system, U + 20000 starts with more than 50 thousand Chinese characters ). The GBK and GB2312 Chinese characters constitute two bytes.
We use UTF-8 to take up three bytes! The solution is to change!

This is also the code changed by Quan GE. I still do physical work, and I cannot do it for the time being.



Write an activity Composition

Remember a meaningful autumn tour today, we are going to visit the space crop exhibition. Early in the morning, we came here because of a painting blow competition. When I first got to the fifth grade, I held a picture blowing competition in the class.

When we were studying at night, the teacher asked the class leader to name the class and remember that it was not corporal punishment if we hit 10 times with a steel ruler.

You are a middle school student or a primary school student. It won't happen in middle school.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.