How to detect in jquery if screen resolution changes?

Ok, so you’re using jQuery. So let’s make a custom event for it. (function () { var width = screen.width, height = screen.height; setInterval(function () { if (screen.width !== width || screen.height !== height) { width = screen.width; height = screen.height; $(window).trigger(‘resolutionchange’); } }, 50); }()); Now $(window).bind(‘resolutionchange’, fn) should do what you want.

New Activity in Android “enter from the side”

In android OS 2.1 or later I think you can use the OverridePendingTransition() method to provide the kind of transition between activities animations you are looking for. Firstly, define a couple of animation resources in /res/anim/. Here is one that is named right_slide_out.xml : <?xml version=”1.0″ encoding=”utf-8″?> <set xmlns:android=”http://schemas.android.com/apk/res/android” android:interpolator=”@android:anim/accelerate_decelerate_interpolator”> <translate android:fromXDelta=”0″ android:toXDelta=”100%p” android:duration=”500″ /> … Read more

Draw on the screen without a form

Method 1: Call the Windows API You need System.Drawing and System.Runtime.InteropServices. You may need to add project references to them. using System.Runtime.InteropServices; using System.Drawing; Add the methods to your class with P/Invoke [DllImport(“User32.dll”)] public static extern IntPtr GetDC(IntPtr hwnd); [DllImport(“User32.dll”)] public static extern void ReleaseDC(IntPtr hwnd, IntPtr dc); Get a Graphics object for the entire … Read more

android: broadcast receiver for screen on and screen off

The two actions for screen on and off are: android.intent.action.SCREEN_OFF android.intent.action.SCREEN_ON But if you register a receiver for these broadcasts in a manifest, then the receiver will not receive these broadcasts. For this problem, you have to create a long running service, which is registering a local broadcast receiver for these intents. If you do … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)