Showing posts with label Tips. Show all posts
Showing posts with label Tips. Show all posts

Sunday, February 24, 2013

Successor of Xbox 360

The much awaited next generation gaming console from Microsoft is rumored to be showcased in the month of April. According to a report from Computer and Video Games, Redmond is currently planning to hold a press event in the month of April and the successor of the Xbox 360, which is reportedly named Xbox 720, might be unveiled in the event.

Furthermore, users at NeoGAF have noticed a domain named XboxEvent.com, which has been registered by Eventcore. The agency has handled many of the previous product launch preparations for the Windows giants and it looks like the agency has already started its preparation for a launch event, which is very likely to feature the latest console from Microsoft.
Meanwhile, Sony has unveiled its next generation PlayStation and it’s high time Microsoft answer back to the move of its arch rival.

Saturday, February 23, 2013

countdown to Xbox 720 just begun?

Xbox Live’s head Larry Hyrb otherwise known as Major Nelson, posted a countdown on its blog to E3 2013. It counts the days until June 11 this year when the expo kicks off and the text says: And it’s on…


Since the Xbox 360 is nearing the end of its cycle it just make sense we see the next generation announced this year.
Nintendo already announced and launched its next-gen console – the Wii U. Sony has also spilled the beans on PlayStation 4, although we can only expect it to launch next year.
Unlike previous years, Microsoft seems to push the PR for E3 quite early and I bet we’ll be seeing even more within the next few months. There is one more thing – unlike most past shows, this upcoming one isn’t expected to bring some hot sequels or smashing new IPs to Xbox 360. Halo 4 is out, Gears of War and Mass Effect Trilogies are over, and there are just few announced games that seems to deserve the gamers’ attention. Oh, and none of them is an Xbox 360 exclusive. A new Xbox should definitely be on the cards then.
The rumors from last year also suggested the next Xbox will arrive in time for the holiday season in 2013, which adds more credibility to the current one.
I just have one wish – Microsoft, please don’t name this one Xbox 720, because I don’t want to wait another 8 years just to see how you’ll call the one to follow.

Skype 2.0 for iPhone now available, brings free voice calls over 3G

It was about time Skype enable their voice calls over 3G in their iPhone app and now the Skype “coverage” on iPhone is extended outside Wi-Fi hotspots.




There is more – all mobile iPhone Skype calls are free until August. After that you’ll need to put some credits on.
You can download the new Skype 2.0 app from the Apple AppStore right away.

Free Gmail voice calls to US and Canada extended

The web-based VoIP client in Gmail was launched several months ago with free calls to the US and Canada until the end of 2010. Well, it’s either the Christmas mood or something else, I don’t know, but Google decided to extend those free calls through the whole 2011.
Sadly, as before, you’ll be charged when calling outside those two. And even if Google’s rates are pretty reasonable you still need to pay for calls to destinations other than the US and Canada.
By the way, Skype’s counter-offer isn’t too shabby either. The Skype app on my computer greeted me today with a reminder that I could sign up for a cheap monthly SkypeOut subscription and enjoy unlimited calls to way more than just two countries across the globe.
Eeny, meeny, miny, moe…
Source

Facebook for iOS updated, now offers free calls to US and Canada

Facebook has just issued an update to its iOS application. Facebook for iOS, which is one of the prominent applications in the App Store now comes with several new features and enhanced user experience.


Facebook 5.5 for iOS offers improved buttons to like, comment and share posts. The share button also allows you to re-post stories to your news feed and is available in all languages. Furthermore, you can now make free calls to US and Canada right from your iOS application. Of course, free calling uses your data plan, so make sure you have one.
You can download the latest version of the application for your iPhones and iPads from the App Store.
Source

Archive for the ‘HTML’ Category External links and the target attribute

I like external pages to open in a new window. So that my page stays open. But target attribute is deprecated. If you want to validate the XHTML pages, it would result in errors. The thought behind it was to allow the user to decide for himself if he want to open a new tab or if he want to go on in the same tab. Often times users just click on the link without thinking about it.
Sometimes as a web programmer it’s just too convenient to simply add ‘target=”_blank”‘ to external links. Quick and dirty. There is a Javascript-solution, though. The page itself is XHTML valid, but the behavior is the same as with the target attribute.
It scans for any link that starts with “http://” – in cake usually an external link (internal links are absolute to the root, like “/pages/xyz”).
(function() {
    var className = "external";
    var target = "_blank";
 
    var _onload = window.onload;
 
    window.onload = function() {
        var local = new RegExp("^" + window.location.protocol + "//" + window.location.hostname, i);
        var links = document.links;
 
        for (var i = 0; i < links.length; i++) {
            var link = links[i];
            if (/^https?:\/\//i.test(link.href) && !local.test(link.href)) {   // Not a local link.
                if (link.className && (link.className == 'internal' || link.className.split(" ")[0] == 'internal')) { // enable "override"
                    continue;
                }
                if (link.className && (link.className == 'external' || link.className.split(" ")[0] == 'external')) { // enable "override"
                    // we do not need to add the class again  
                } else {
                    link.className = className + (link.className ? " " : "") + link.className;
                }
                link.target = target;
                link.title = (link.title ? link.title+ " " : "") + "(opens new window)";   // get a title info as well 
            }
        }
 
        if (_onload) _onload();    // Play nice with others.
    }
})();
Of course you can manually override it by using 'class="internal"' for always opening it in the same window or 'class="external"' to always open in a new window.
And for all of our jQuery users ;) :
$(document).ready(function() {
    $("a[href=^http://], a[href=^https://], a.external").attr("target", "_blank");
    $("a.internal").removeAttr("target");
});
Examples:
<a href="/members">opens in the same window</a>
<a href="http://www.domain.e/some_url">opens in a new window/tab</a>
 
<a href="http://www.domain.e/some_url" class="internal">opens the same window</a>
<a href="/members" class="external">opens in a new window/tab</a>

PHP ERRORS AND Their Solutions

Fatal error: Call to undefined method domdocument::loadHTML()

 

find and comment the line: extension=php_domxml.dll (make it  ;extension=php_domxml.dll   ) in php.ini file(php configuration file) and restart the apache.






How can I get a post by title in Wordpress? or How to get a post by title in Wordpress?

 

get_page_by_title($post_title, OBJECT, 'Post');
the above code returns the object of the post. it will return single post object even if there 

 

 

plain html check box image

for all those people who are looking for plain html check box image .take the above image.





The URL can't be shown" message on iPad and URL includes unwanted tel tag


people see this error while working with html links on iPad.the telephone detection feature in iPad is the reason for this issue.if u don't need this feature on your site
u can fix this issue simply by copy pasting the following html inside your html head section(i.e. before
tag)






Deprecated: Function ........() is deprecated in ...\xampp..htdocs .....php on line 

 

 

The value of this setting (in latest php versions for e.g. php 5.3.5) may look like below:
error_reporting = E_ALL | E_STRICT
E_STRICT warns about the usage of deprecated functions. If you run an old piece of code on a new/ latest version then, you may get the following error.
Deprecated: Function split() is deprecated in D:\xampp-1.7.4\htdocs \newfile.php on line 5
{split function is deprecated in latest php versions (5.3.0+)}
To avoid this error change the setting as below
error_reporting = E_ALL

 

 

 

 

Strip additional white spaces

 

With UTF8 the “normal” preg_replace doesn’t really work anymore. For some cases we could use the following trick:
$str = utf8_decode($str);
$str = preg_replace('/\s\s+/', ' ', $str);
$str = utf8_encode($str);
A better solution, though, is:
$str = preg_replace('/\s\s+/u', ' ', $str);
With the param “u” it’s compatible with Unicode.

Sort arrays in natural order

$array = array('1.txt', '20.txt', '2.txt', '21.txt');
natsort($array); # sorts by reference (returns boolean $success)

Condition + assignment

If you want to save the extra line for $pos = $this->calcPos()) you need to be aware that extra brackets might be needed. Wrong (if $pos is supposed to hold the position and not the result of the comparison):
if ($pos = $this->calcPos() > 0 && ...) {...}
Correct:
if (($pos = $this->calcPos()) > 0 && $pos < 100) {
    # doSomething
    $pos++;
    # doSomethingElseWithPos
}
Note the extra brackets around $pos. They are necessary – otherwise it will assign the result of the operation $this->calcPos()) > 0 (which is a boolean).

Comparison (default and strict)

Since PHP isn’t type safe you should use strict comparison (===) wherever possible. "+010" == "10.0" is TRUE (!) only with "+010" === "10.0" you will get FALSE. This might be expected in this case – usually it’s not, though. So it is not if (strpos($str, 'hello') == 0) {} but if (strpos($str, 'hello') === 0) {}, for example! What happens in the == case? It will return true in 2 cases: If “hello” is not in the string at all or if it is at the very beginning. But we would only want the second case (and therefore need ===).

 

 

Tuesday, February 19, 2013

Software Run the Trial Program Forever

In this post, I will show you how to hack a Software and run the trial program forever. Most of us are familiar with many software programs that run only for a specified period of time in the trial mode. Once the trial period is expired, these programs stop functioning and demand for a purchase.
However, there is a way to run the software programs so that they function beyond the trial period. Isn’t this interesting?
Well, before I tell you how to hack the software and make it run in the trial mode forever, we will have to first understand how the licensing scheme of these programs work. I’ll try to explain this in brief.
When the software programs are installed for the first time, they make an entry into the Windows Registry with the details such as Installed Date and Time, installed path etc. After the installation, every time you run the program, it compares the current system date and time with the installed date and time. With this, it can make out whether the trial period is expired or not.
So, with this being the case, just manually changing the system date to an earlier date will not solve the problem. For this purpose there is a small tool known as RunAsDate.
RunAsDate is a small utility that allows you to run a program in the date and time that you specify. This utility doesn’t change the current system date, but it only injects the date/time that you specify into the desired application.
RunAsDate intercepts the kernel API calls that returns the current date and time (GetSystemTime, GetLocalTime, GetSystemTimeAsFileTime), and replaces the current date/time with the date/time that you specify. It works with Windows 2000, XP, 2003, Vista and 7.
You can download RunAsDate from the following link:
NOTE: FOLLOW THESE TIPS CAREFULLY:
You will have to follow these tips carefully to successfully hack a software and make it run in it’s trial mode forever:
  1. Note down the date and time, when you install the software for the first time.
  2. Once the trial period expires, you must always run the software using RunAsDate.
  3. After the trial period is expired, do not run the software(program) directly. If you run the software directly even once, this hack may no longer work.
  4. It is better and safe to inject the date of the last day in the trial period.
For example, if the trial period expires on jan 30 2009, always inject the date as jan 29 2009 in the RunAsDate. I hope this helps! Please express your experience and opinions through comments.

C Program to Print it’s Own Source Code

Ever wondered how to write a C program that can print it’s own source code. Well, here is the source code of a C program that when executed will print it’s own source code. In other words, the output of this program is exactly same as it’s source code.
Here’s the program:
#include
char *program=”#include%cchar *program=%c%s%c;%cvoid main()%c{%cprintf(program,10,34,program,34,10, 10,10,10);%c}”;
void main()
{
printf(program,10,34,program,34,10,10,10,10);
}

How to Protect Domain Name To Be Hijacked

In this post I will tell you about how the domain names are hacked and how they can be protected. The act of hacking domain names is commonly known as Domain Hijacking. For most of you, the term “domain hijacking” may seem to be like an alien. So, let me first tell you what domain hijacking is all about.
Domain hijacking is a process by which Internet Domain Names are stolen from it’s legitimate owners. It is also known as domain theft. Before we can proceed to know how to hijack domain names, it is necessary to understand how the domain names operate and how they get associated with a particular web server (website).

The Operation of a Domain Name is as Follows:

Any website say for example gohacking.com consists of two parts. The domain name (gohacking.com) and the web hosting server where the files of the website are actually hosted. In reality, the domain name and the web hosting server (web server) are two different parts and hence they must be integrated before a website can operate successfully. The integration of domain name with the web hosting server is done as follows:
  1. After registering a new domain name, we get a control panel where in we can have a full control of the domain.
  2. From this domain control panel, we point our domain name to the web server where the website’s data (web pages, scripts etc.) are actually hosted.
For a clear understanding let me take up a small example:
John registers a new domain called “abc.com” from an X domain registration company. He also purchases a hosting plan from Y hosting company. He uploads all of his files (.html, .php, javascripts etc.) to his web server (at Y). From the domain control panel (of X) he configures his domain name “abc.com” to point to his web server (of Y).
Now, whenever an Internet user types “abc.com”, the domain name “abc.com” is resolved to the target web server and the web page is displayed. This is how a website actually works.

What Happens When a Domain Name is Hijacked?

Now, let us see what happens when a domain name is hijacked. To hijack a domain name, you just need to gain access to the domain control panel and point the domain name to some other web server other than the original one. So, to hijack a domain you need not gain access to the target web server.
For example, a hacker gets access to the domain control panel of  “abc.com”. From here the hacker re-configures the domain name to point it to some other web server (Z). Now whenever an Internet user tries to access “abc.com” he is taken to the hacker’s website (Z) and not to John’s original site (Y).
In this case the John’s domain name (abc.com) is said to be hijacked.

How the Domain Names are Hijacked?

To hijack a domain name, it is necessary to gain access to the domain control panel of the target domain. For this you need the following ingredients:
  1. The domain registrar name for the target domain.
  2. The administrative email address associated with the target domain.
These information can be obtained by accessing the WHOIS data of the target domain. To get access to the WHOIS data, go to www.whois.domaintools.com, enter the target domain name and click on Lookup. Once the whois data is loaded, scroll down and you’ll see Whois Record. Under this, you’ll get the “Administrative contact email address”.
To get the domain registrar name, look for the words something like: “Registered through:: XYZ Company”. Here XYZ Company is the domain registrar. In case if you do not find this, scroll up and you’ll see ICANN Registrar under the “Registry Data”. In this case, the ICANN registrar is the actual domain registrar.
The administrative email address associated with the domain is the backdoor to hijack the domain name. It is the key to unlock the domain control panel. So, to take full control of the domain, the hacker will have to hack the administrative email associated with it. 
Once the hacker takes full control of this email account, he will visit the domain registrar’s website and click on forgot password in the login page. There, he will be asked to enter either the domain name or the administrative email address to initiate the password reset process. Once this is done, all the details to reset the password will be sent to the administrative email address.
Since the hacker has the access to this email account, he can easily reset the password of domain control panel. After resetting the password, he logs into the control panel with the new password and from there he can hijack the domain within minutes.

How to Protect the Domain Name from Getting Hijacked?

The best way to protect the domain name is to protect the administrative email account associated with the domain. If you loose this email account, you loose your domain. You can read my earlier post on how to protect your email account from being hacked. Another best way to protect your domain is to go for a private domain registration.
When you register a domain name using the private registration option, all your personal details such as your name, address, phone and administrative email address are hidden from the public.
whenever a hacker performs a WHOIS lookup for your domain name, he will not be able to find your name, phone or the administrative email address. Thus, the private registration provides an extra security and protects your privacy. Even though it costs a few extra bucks, is really is worth for it’s advantages.
I hope that this article has helped you. You can express your feedback through comments.