Showing posts with label user. Show all posts
Showing posts with label user. Show all posts
Monday, June 12, 2017
Detect when a user stops typing with jQuery
Detect when a user stops typing with jQuery
When writing forms I frequently find I need to do some of my validation server side(for example checking if a username is already taken) but want to have a responsive real-time field validation displayed to the user. Obviously this effect can be achieved using AJAX but if you want to validate while the user is typing sending an AJAX request on every keypress is a very inefficient way of doing things. It seems to me that a "onInputFinished" event is needed so that you can detect and take action when a user stops typing in an input field.
I had a bit of a google around and couldnt find an elegant solution for it so I decided to roll my own using jQuery. This simple jQuery script allow you to add the "onfinishinput" attribute to HTML input fields in the same way you would use normal onclick and onkeyup events.
you can check out a working example here:
http://dl.dropbox.com/u/6217043/js-example/example.html
Using the Script:
After including the script on your page you can use the new event like this:
<input type="text" onfinishinput="alert(You typed + input_field.val())" />
NOTE: instead of using "this" when referring to the element use "input_field" like the example above.
Installing the Script:
The script can be downloaded from here:
http://dl.dropbox.com/u/6217043/js-example/onfinishinput.js
The script requires jQuery to function, the latest jQuery can be downloaded from here:
http://jquery.com/
Just include the scripts on your page and you are ready to go.
Tuesday, June 6, 2017
Difference Between ASP NET User Controls and Custom Controls
Difference Between ASP NET User Controls and Custom Controls

Monday, June 5, 2017
Detect user touch with GestureDetectorCompat
Detect user touch with GestureDetectorCompat

Android example to Detect user touch with GestureDetectorCompat:
MainActivity.java
package com.blogspot.android_er.androidgesturedetector;
import android.os.Bundle;
import android.support.v4.view.GestureDetectorCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
private GestureDetectorCompat gestureDetectorCompat;
TextView textInfo;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textInfo = (TextView)findViewById(R.id.info);
gestureDetectorCompat = new GestureDetectorCompat(
this, new MySimpleOnGestureListener(textInfo));
}
@Override
public boolean onTouchEvent(MotionEvent event) {
gestureDetectorCompat.onTouchEvent(event);
return super.onTouchEvent(event);
}
private class MySimpleOnGestureListener
extends GestureDetector.SimpleOnGestureListener{
TextView textView;
public MySimpleOnGestureListener(TextView v) {
super();
textView = v;
}
@Override
public boolean onSingleTapUp(MotionEvent e) {
textView.append(" - onSingleTapUp -");
return super.onSingleTapUp(e);
}
@Override
public void onLongPress(MotionEvent e) {
textView.append(" - onLongPress -");
super.onLongPress(e);
}
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
textView.append(" - onScroll -");
return super.onScroll(e1, e2, distanceX, distanceY);
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
textView.append(" - onFling -");
return super.onFling(e1, e2, velocityX, velocityY);
}
@Override
public void onShowPress(MotionEvent e) {
textView.append(" - onShowPress -");
super.onShowPress(e);
}
@Override
public boolean onDown(MotionEvent e) {
textView.append(" - onDown -");
return super.onDown(e);
}
@Override
public boolean onDoubleTap(MotionEvent e) {
textView.append(" - onDoubleTap -");
return super.onDoubleTap(e);
}
@Override
public boolean onDoubleTapEvent(MotionEvent e) {
textView.append(" - onDoubleTapEvent -");
return super.onDoubleTapEvent(e);
}
@Override
public boolean onSingleTapConfirmed(MotionEvent e) {
textView.append(" - onSingleTapConfirmed -");
return super.onSingleTapConfirmed(e);
}
@Override
public boolean onContextClick(MotionEvent e) {
textView.append(" - onContextClick -");
return super.onContextClick(e);
}
}
}
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_layout_width="match_parent"
android_layout_height="match_parent"
android_padding="16dp"
android_orientation="vertical"
tools_context="com.blogspot.android_er.androidgesturedetector.MainActivity">
<TextView
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_gravity="center_horizontal"
android_autoLink="web"
android_text="http://android-er.blogspot.com/"
android_textStyle="bold" />
<TextView
android_id="@+id/info"
android_layout_width="match_parent"
android_layout_height="match_parent"
android_gravity="bottom"
android_textStyle="italic" />
</LinearLayout>
Labels:
detect,
gesturedetectorcompat,
touch,
user,
with
Wednesday, May 31, 2017
Disable Password Protect Single User Mode RHEL CentOS 5 x 6 x
Disable Password Protect Single User Mode RHEL CentOS 5 x 6 x
Hello All,
If you have not protected Single User Mode with Password then it is big risk for your Linux Server, So protecting Single User Mode with Password is very important when it comes to security,
Today in this article i will show you how you can protect Single User Mode with Password on RHEL / CentOS 5.x and RHEL / CentOS 6.x.
Read more : http://www.tejasbarot.com/2014/05/05/disable-password-protect-single-user-mode-rhel-centos-5-x-6-x/
Sunday, May 14, 2017
Disconnect a network user from the network using Tuxcut in Ubuntu Debian
Disconnect a network user from the network using Tuxcut in Ubuntu Debian

How to install tuxut in ubuntu/Debian
see This Link
Saturday, April 29, 2017
DIABLO 3 menembus rekor user terbanyak
DIABLO 3 menembus rekor user terbanyak
Setelah kmaren diablo 3 dimaenkan 100.000 gamer dunia.kini rekor baru terpecahkan lagi.
Menunggu dalam waktu tahunan untuk sebuah game yang berkualitas memang bukan pekerjaan yang mudah bagi seorang gamer. Keinginan untuk segera menjajal kualitas yang hanya selama ini hanya bisa dinikmati lewat screenshot dan trailer memang menjadi godaan yang sulit untuk ditolak. Hal inilah yang mungkin menyelimuti sebagian besar gamer yang dengan sabar menunggu kehadiran seri game RPG Barat yang sangat diantisipasi � Diablo III. Setelah melewati beberapa kali penundaan dan rumor-rumor tidak menyenangkan, Blizzard akhirnya memberikan tanggal rilis resmi untuk game yang satu ini. Seperti yang sudah dapat ditebak, ada jutaan gamer di seluruh dunia yang sudah mempersiapkan diri.
Blizzard melaporkan bahwa Diablo III merupakan game dengan jumlah pre-order tertinggi sepanjang sejarah game yang sudah mereka rilis selama ini. Tercatat kurang lebih 1,2 juta gamer sudah terdaftar untuk menjadi konsumen pertama yang akan menikmati Diablo III. Tidak hanya itu saja, animo ketertarikan gamer akan seri ini juga tercermin dari angka gamer versi Betanya yang berhasil mencapai 2 juta users. Wow! Ini tentu akan menjadi indikator yang �manis� untuk memastikan kesuksesan Diablo III yang akan dirilis pada tanggal 15 Mei mendatang.
Subscribe to:
Posts (Atom)