Pages

Showing posts with label show. Show all posts
Showing posts with label show. Show all posts

Monday, July 24, 2017

Disable and Turn Off Windows XP Login Screen and Show Traditional NT Log On to Windows Box

Disable and Turn Off Windows XP Login Screen and Show Traditional NT Log On to Windows Box


When Windows XP boots up in multiple users system, by default on startup, Windows XP will display a graphical logon screen with user icons and user names. In this �Welcome Screen�, user can click on his or her username or icon, type in the password (if assigned) and then log on to Windows XP desktop. Some XP may find theWelcome Screen is a beautiful user interface and convenient feature to quickly log in to WindowsXP without tying additional long user name.

However, at times, Windows XP users may need to use the more traditional and standard �Log on To Windows� dialog box inherited from WindowsNT login screen that allows users to key in user name and password. For example, when want to log on to hidden user account such as Administrator account.






To immediately access and open Log On to Windows traditional and standard login dialog box while on XP Welcome Screen, user can press Ctrl-Alt-Del key sequence twice (same with key sequence for reboot or secure login in NT based Windows). After pressing Ctrl-Alt-Del keys simultaneously twice, Welcome Screen will be changed to logon dialog box with user name and password fields.
To permanently switch to �Log On to Windows� NT styled logon dialog box so that users log on to the computer without using the Welcome screen, instead of using the graphical Welcome login screen, follow these steps:
  1. Log on to Windows XP as Administrator or user with administrative privileges.
  2. Open User Accounts in Control Panel by clicking Start, click Control Panel, and then click User Accounts.
  3. Click Change the way users log on or off.


4. Clear the Use the Welcome screen check box.



1. Click Apply Options button.

Note that by turning off and disabing Welcome screen, Fast User Switching feature is no longer available. To revert and switch back to use Welcome screen in XP, simply tick again the �Use the Welcome Screen� check box so that it is checked.

Read more »

Thursday, April 20, 2017

Devil Survivor 2 Show You Free Will

Devil Survivor 2 Show You Free Will



 Konnichiwa minna-san, Ai is back XD Karena Ai sudah dapat laptop (Walau ini laptop bokap -Ayah-), jadi Ai bisa nge-posting lagi di sini~

Btw, Tahu gambar apa di atas? Yup, itu adalah gambar Devil Survivor 2 yang akan dibuat Manga~ Walau masih chapter 1 sih.... Ai juga mati-matian mencari di mana bisa membaca manga ini. Apalagi Persona 3 Vol. 6 dan Persona 4 (Ai gak tahu sudah sampai Vol. berapa di situs manga lainnya... Yang Ai tahu baru sampai Vol. 6) aja belum dapat-dapat TwT

Ah... Yang ingin membaca manga ini bisa klik disini (Warning : Dialognya bahasa Jepang, jadi jangan salahkan Ai karena belum ada tranlatornya -____-" )




Read more »

Monday, April 3, 2017

django Show form validation error with AJAX and jQuery

django Show form validation error with AJAX and jQuery


I once had a situation when I submited form with AJAX and if there were validation errors I had to put them at the same place as form was normally submited.

Assume that we have edit_user_data method in the views.py. If edit_form is valid we do some really useful things. If its not, we should show user form validation errors (btw, I use uni_forms in that example).

Here is our code:

def edit_user_data(request):
# ...
if edit_form.is_valid():
# ...
else:
error_message = dict([(key, [unicode(error) for error in value]) for key, value in edit_form.errors.items()])
return HttpResponse(simplejson.dumps({"result": error_message, }), mimetype='application/json')


error_message is a dictionary which contains all form errors. We use JSON so we could have access to the data like server_response.result[key]. Key is the name of the field.

Here is our javascript code:

$("#edit_form").ajaxSubmit({
url: save_url,
type: 'post',
success: function (server_response) {
// Inform about successfull save
if (server_response.result_success) {
// ...
}
// Remove form errors
$("#edit_form").find(".errorField").remove();
for (var key in server_response.result) {
// Check for proper key in dictionary
if (key in {first_name: 1, last_name: 1, gender: 1, sex: 1, phone: 1, }) {
// Get error message
error = server_response.result[key][0];
// Find related field
field = $("#edit_form").find("#div_id_" + key)
// Attach error message before it
field.before('<p class="errorField"><em></em>' + error + '</p>');
}
}
},
});


#edit_form - id of the submited form, url - where we submit the data to. If AJAX request successfuly was proceed by server (it doesnt matter if user submited valid data or not. It means he does submited something) we now could show user if his form is valid or not. If it is not valid, we remove old errors from form (or we will have multiple errors under the fields, probably duplicates). Let also assume that our form contains 5 fields: first_name, last_name, gender, sex, phone. Here you can see nice trick how to check if a key is related to one of our fields:
if (key in {first_name: 1, second_name: 1, gender: 1, sex: 1, phone: 1, }) {}

We also want to show user only one error per field (If there are more, he will be able to see them next time):
error = server_response.result[key][0];

To show error message above the field itself we need to find that field:
field = $("#edit_form").find("#div_id_" + key)

Luckly our key names are the same as field names :) And then attach a message before it:
field.before(

+ error +

);

Where error is description of error, for example, "This field is required". Done. Errors looks nice and native ")
Read more »