How to make placeholder work in IE browser

As we all know that HTML 5 placeholder attribute is not working in IE less than 10 version. If you have input elements in your DOM with placeholder attribute and access the page in IE browser less than 10 version then you will get an error message that placeholder is not defined. To resolve this issue you have to use javascript or jQuery. I have attached a sample code file please download and check it out in different browser. Sample Code

Apple eyes Passbook coupons with touch of NFC

passbook-baseball-tickets

passbook-baseball-tickets-1690

A new patent from Apple provides loads of information on Passbook and hints at the possibility of using near-field communications with the app.

Published today by the U.S. Patent and Trademark Office, the patent, dubbed “Integrated Coupon Storage, Discovery, And Redemption System,” goes into great detail about a system that lets you manage and redeem electronic coupons on a mobile device.

As described in the patent, such a system could trigger an alert on your phone when you’re near a store where a saved coupon can be used. It could also alert you when you’re using your device to buy something.

Passbook currently allows you to store digital coupons on your iOS device so that you can redeem them at different stores and merchants. Read More…

Apple in 2013: Five predictions

What will Apple do next? It’s the very secret sauce that keeps the company interesting, along with some very successful products.

Here are five predictions for the next 12 months as Apple heads into one of its most closely watched years yet.

Editor’s note: This is the first in a series of stories looking ahead at what’s to come from a handful of major technology companies, and technology categories. In the coming days CNET will do the same for Google, Facebook, Microsoft, Amazon, and others. Read More…

Hackers hit Westboro Baptist Church after Newtown threat

A group attached to the online hacktivist group Anonymous claims to have hacked the Web site of the Westboro Baptist Church in response to plans by the controversial church to picket the funerals of those massacred Friday at a school in Newtown, Conn.

As part of a campaign dubbed #OpWestBoro, KY Anonymous said yesterday it posted the personal information belonging to members of the extremist organization, which is best known for conducting protests designed to disrupt the funerals of members of the military killed in action. The data dump included the names, phone numbers, e-mail addresses, and physical addresses of dozens of alleged members of the religious organization. The group did not indicate where or how it acquired the data.  Read More…

 

10 Tech CEOs Who Could Be Fired Now

Bangalore: CEOs are at helm of the company and so are credited with all things, good or bad, the company goes through. More than often they have to captain a ship out of mighty storm. Some pull trough and some fizzle out. The CEOs who failed to pull through, had to put up with “hot seat” before they were actually relieved of their positions. Read to know such 10 CEOs who were in hot seats, as compiled by Business Insider. Read More…

How to make compatible nextgen gallery with AWS plugin

From few peoples I heard that nextgen gallery plugin is not working with AWS plugin as it should and asking me How to make compatible nextgen gallery with AWS plugin? So I have work around it and come out with some solution explaining below:

– Create gallery and add images as per the rule of NGG.
– Show your created gallery as per the rule of NGG.
– Now find out the ID of the div in which all your gallery images are present.
– Put this ID in “AWS Options” admin form’s first field named “No ajax container IDs”.

- Now add the below code in AWS plugins ajaxify.js file just before the "$body.removeClass('loading');"(at line 179)
scriptNode = document.createElement('script');
contentNode.appendChild(scriptNode);
scriptNode.setAttribute('src', rootUrl + 'wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js');

scriptNode = document.createElement(‘script’);
contentNode.appendChild(scriptNode);
scriptNode.setAttribute(‘src’, rootUrl + ‘wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js’);

scriptNode = document.createElement(‘script’);
contentNode.appendChild(scriptNode);
scriptNode.setAttribute(‘src’, rootUrl + ‘wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.js’);

that’s it :)
– Example site link: http://www.youngtechleads.com/development/ngg-aws/

How to modify Active Directory passwords through PHP

The secret is keep in Active Directory on a user object within the unicodePwd attribute. This attribute is written under some restricted conditions, however it can’t be accessible, but the value of this attribute can be modify or alter.
In order to alter this attribute, you must have a 128-bit Secure Socket Layer (SSL) connection to the server. For this connection to be possible, the server must possess a server certificate for a 128-bit RSA connection, the client must trust the certificate authority (CA) that generated the server certificate, and both client and server must be capable of 128-bit encryption.

Passwords must meet complexity requirements determines whether password complexity is enforced. If this setting is enabled, user passwords meet the following requirements:

  • The password is at least six characters long.
  • The password contains characters from at least three of the following five categories:
    • English uppercase characters (A – Z)
    • English lowercase characters (a – z)
    • Base 10 digits (0 – 9)
    • Non-alphanumeric (For example: !, $, #, or %)
    • Unicode characters
  • The password does not contain three or more characters from the user’s account name.

PHP code as follows:
function create_ldap_connection() {
$ip = "Ad server IP";
$ldaps_url = "ldaps://$ip";
$port = 636;

$ldap_conn = ldap_connect( $ldaps_url, $port ) or die("Sorry! Could not connect to LDAP server ($ip)");

ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3);

$username = "AdminUserName";
$password = "AdminPassword";
$binddn = "CN=Administrator,CN=Users,DC=TestDomain,DC=local";

$result = ldap_bind( $ldap_conn, $binddn, $password ) or die("
Error: Couldn't bind to server using provided credentials!");

if($result) {
return $ldap_conn;
} else {
die("
Error: Couldn't bind to server with supplied credentials!");
}
}

function get_user_dn( $ldap_conn, $user_name ) {
/* Write the below details as per your AD setting */
$basedn = "DC=AD Test,DC=Local";
/* Search the user details in AD server */
$searchResults = ldap_search( $ldap_conn, $basedn, $user_name );
if ( !is_resource( $searchResults ) )
die('Error in search results.');

/* Get the first entry from the searched result */
$entry = ldap_first_entry( $ldap_conn, $searchResults );
return ldap_get_dn( $ldap_conn, $entry );
}

function pwd_encryption( $newPassword ) {
$newPassword = "\"" . $newPassword . "\"";
$len = strlen( $newPassword );
$newPassw = "";
for ( $i = 0; $i < $len; $i++ ){
$newPassw .= "{$newPassword{$i}}\000";
}
$userdata["unicodePwd"] = $newPassw;
return $userdata;
}

$user_name = "(sAMAccountName=UserName of user whose password want to change)";//Dont remove parentheses brackets
$user_password = "New Password";

$ldap_conn = create_ldap_connection();
$userDn = get_user_dn($ldap_conn, $user_name);
$userdata = pwd_encryption($user_password);

$result = ldap_mod_replace($ldap_conn, $userDn , $userdata);
/* Check whether the password updated successfully or not. */
if ( $result )
die("Password changed successfully!");
else
die("Error: Please try again later!");