Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Saturday, April 7, 2012

What Programming Language Should I Learn?

As I do my professional and personal work, I am always looking for the best tool for the job. In software development, there are several programming languages that can be used for a wide variety of reasons. I am often asked by people new to software development what is the best language to learn. They get confused when I ask them what they plan on doing. The reason is that people think there is going to be a best language for everything. However, everyone knows that there is no silver bullet. On the other hand, there are some languages which are better suited or more widely used in specific areas. So, given that idea, I came up with a list.
Enterprise Software DevelopmentJava is typically used in this space as people are moving many administrative applications to an intranet.
Windows DevelopmentC# should be used for any Windows development, this includes anything interface with the Microsoft Office Suite. Don’t tell me about POI for Java, I have used it, but the native libraries kick POI’s ass.
Rapid web prototyping and anything WordPressPHP is really good for rapid prototyping what a web site should act like. It may even qualify as v1.0 for your site. It may not be a good long term solution and there are better options for large-scale development. It is also the main language for anything related to WordPress.
Web Prototype with a backbonePython has quickly gained acceptance as the “next step” after PHP. Many current web applications use Python extensively. Adoption will continue as more services natively support Python like Google’s AppEngine.
General Web Development(X)HTML, CSS and Javascript must be in your toolbox for any significant web development. If you try to remain standards compliant (which you should) then you need to look at the XHTML standards.
Data IntegrationXML and JSON are the main data interchange formats on the web and in corporate development. With XML, there are various syndication formats (likely the subject of another post) and other business format standards to review.
DatabasesSQL is critical to almost any application. If you learn standard SQL, then you can translate this to almost any database product on the market especially the popular engines like Microsoft SQLServer, Oracle, DB2, MySQL.
Toolbox – Every programmer should be able to do more than just program in one language. In addition, there are many scripting tools that can be part of your toolbox which can make you extra productive. Cygwin is a Unix shell that you can install on Windows, and I can not live without it. Unix scripting is very powerful when dealing with batch processing of files or even just interacting with the file system. Perl, the Pathetically Eclectic Rubbish Lister, is another language that can be used for web development, but it really shines when dealing with file and text processing.
I know I have ignored various tools and languages, but this is really just a starting point. In software development, it is always helpful to keep learning new things and new concepts. If you really want to stretch your mind, start working in Artificial Intelligence and programming in LISP, or do some logic programming in Prolog. If you feel really adventurous take a look at Standard ML. I am not sure what it is really useful for, but it is a completely different language than most.

Friday, April 6, 2012

Disable Right Click At Your Website Using Javascript

Disable Right Click At Your Website Using Javascript 
 
Disabling right click at your website may help you in protecting your content like text from copying easily. Now a days many peoples are copying and pasting the content from other websites to their own website.

But using below javascript code you can disable the functionality of right mouse click at your website so that the users will not be able to copy your content.

However this is not a 100% guaranteed way to protect the content but it may help you a lot in protecting your content.

Just copy and paste the below code in between your head area (i.e.: <head>Below Code here</head>).
Code:

<script type="text/javascript">
<!--
var message="Put a custom message here.....";
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {alert(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</script>

Creating a Simple Popunder Script

Creating a Simple Popunder Script 

Popunder scripts can be very helpful in certain cases. in this post you will find a fully functional popunder script that can be used at any place as per need.
You can use the below code with some custom adjustments to fit your needs. Below are some useful parameters in the below code:
popunder[0] = "this can be any url or link that you want in popunder."
var width = 'width of your popunder window';
var height = 'height of your popunder window';
var one_time = This is a numerical value that sets the number of popunders per session. putting 0 will open a popunder each time the page is loaded.



Place the below code in between the head area(ie <head>Code here</head>) or the bottom of your webpage before </body></html>.
Code:


<script type="text/javascript">
var popunder=new Array()
popunder[0]="http://codingtrickz.blogspot.com/"
var width = '700';
var height = '100';
var p = 'scrollbars=no,resizable=yes,toolbar=no,' + //these are obvious variables. set "yes" or "no".
'menubar=yes,status=yes,location=no,left=85,top=20,height=' + //the location on the user's screen
height + ',width=' + width;
var one_time=1
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if the cookie exists
offset += search.length
end = document.cookie.indexOf(";", offset); // set the index of beginning value
if (end == -1) // set the index of the end of cookie value
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie('popunder')==''){
load_pop_power()
document.cookie="popunder=yes"
}
}
function load_pop_power(){
win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p)
win2.blur()
window.focus()
}
if (one_time==0)
load_pop_power()
else
loadornot()
</script>