Why You Should Learn Python Programming

Mohd Mohtashim
Updated on 24-Jan-2020 10:58:56

317 Views

Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical constructions than other languages.Python is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Web Development Domain. I will list down some of the key advantages of learning Python −Python is Interpreted − Python is processed at runtime by the interpreter. You do not need to compile your program before executing it. This is similar to PERL ... Read More

Zoom HTML5 Canvas to Mouse Cursor

Ankith Reddy
Updated on 24-Jan-2020 10:52:18

1K+ Views

The canvas always scales from its current origin. The default origin is [0, 0]. If you want to scale from another point, you can first do ctx.translate(desiredX, desiredY);. This will reset the origin of the canvas to [desiredX, desiredY].The translate() method remaps the (0, 0) position on the canvas. The scale() method scales the current drawing, bigger or smaller. If you want to translate() the canvas context by your offset, you need to first scale() it to zoom in or out, and then translate() back by the opposite of the mouse offset.These steps are given in the following examplectx.translate(pt.x, pt.y); ... Read More

Use JSF with HTML 4.5 and Facelets

George John
Updated on 24-Jan-2020 10:47:16

192 Views

Facelets is an open-source Web template system for JavaServer Faces (JSF). The language requires valid input XML documents to work. Facelets supports all of the JSF UI components and focuses completely on building the JSF component tree, reflecting the view for a JSF application.Facelets is a XML based view technology. It cannot be used with HTML4 doctype. You can use with JSF/Facelets, even without a declaration in top of the page.           Title               Header       Nav       Main       Footer    

Get Readable Date Value in AngularJS and HTML5 Date Input for Firefox

Ankith Reddy
Updated on 24-Jan-2020 10:46:12

296 Views

The elements of type date allows user to enter date, using a text box or using date picker. With the ng-model directive, bins the values of AngularJS application data to HTML input controls. Firefox does not currently support type="date". It will convert all the values to string. Sinceyou want date to be a real Date object and not a string, so we create another variable, and then link the two variables as done in the below given code function MainCtrl($scope, dateFilter) {    $scope.date = new Date();    $scope.$watch('date', function (date){       $scope.dateString = dateFilter(date, 'yyyy-MM-dd');   ... Read More

Take a Screenshot of the Page Using HTML5 Canvas

George John
Updated on 24-Jan-2020 10:39:44

673 Views

Html2Canvas is a JavaScript library that can take screenshot of the whole web page or specific part. It doesn’t take the screenshot but creates the view based on the page information.ExampleBelow given is an example code. Here, html2canvas.js script is included at the . The html2canvas() method is called. Returns the base64 value, which eventually creates image source or an image file.                         Take screenshot                                                      function screenshot(){             html2canvas(document.body).then(function(canvas) {                document.body.appendChild(canvas);             });          }          

HTML5 Canvas Double Buffering Support

Chandu yadav
Updated on 24-Jan-2020 10:38:56

624 Views

For double buffering on the canvas, create a 2nd canvas element and draw to it. After that draw the image to the first canvas using the drawImage() method,// canvas element var canvas1 = document.getElementById('canvas'); var context1 = canvas1.getContext('2d'); // buffer canvas var canvas2 = document.createElement('canvas'); canvas2.width = 250; canvas2.height =250; var context2 = canvas2.getContext('2d'); // create on the canvas context2.beginPath(); context2.moveTo(10,10); context2.lineTo(10,30); context2.stroke(); //render the buffered canvas context1.drawImage(canvas2, 0, 0);

Differentiate Object.create vs new in JavaScript Inheritance

Abhinanda Shri
Updated on 24-Jan-2020 10:16:54

197 Views

In the first example, you are just inheriting amitBaseClass prototype.function SomeClass() { } SomeClass.prototype = Object.create(amitBaseClass.prototype);In the second example, you are executing the constructor function. An instance of amitBaseClass is created and you are inheriting the who complete amitBaseClass object.function SomeClass () { } SomeClass.prototype = new amitBaseClass ();So, both are doing separate work.

Disable Browser's Back Button with JavaScript

George John
Updated on 24-Jan-2020 10:16:08

3K+ Views

To disable web browsers’ back button, try to run the following code. This is the code for current HTML page,Example           Disable Browser Back Button                               Next Page               $(document).ready(function() {          function disablePrev() { window.history.forward() }          window.onload = disablePrev();          window.onpageshow = function(evt) { if (evt.persisted) disableBack() }       });     The following is the code for newpage.html,           Go to back page using web browser back button.     a

Key Points on Automation

Sharon Christine
Updated on 24-Jan-2020 09:59:23

723 Views

Automation is one of the hot domain in the Information and Technology, which has become predominant topic of discussion among the IT professionals. In general, automation can be defined as the process of involving software robots or hardware robots to solve the human problems (requirements). Due to this automation, it is said that ¼th of the job will be lost in the market. But people still prefer automation for (top) 7 reasons, which is discussed in this article.Cost SavingsCost is one of the major factor in the software development cycle, which predominantly comes into picture right from the planning phase. ... Read More

Is Fully Autonomous Driving Possible Through Tesla Autopilot?

Sharon Christine
Updated on 24-Jan-2020 09:54:23

216 Views

Fully self-driving cars may soon be a reality with Tesla cars. But Tesla still has a long way to completely set its autopilot suite of self-governing technologies in place. Autonomous driving refers to driving cars without the need of any human involvement. As of now, Tesla cars are semi-autonomous i.e. features that assist drivers on highways.The Tesla Autopilot SystemThe Tesla autopilot is a semi-autonomous system. It was rolled out in October 2014 in Tesla Model S cars. But it was only in 2015, that the Tesla Autopilot system (Tesla Version 7.0) rolled out. It allowed the car to adjust its ... Read More

Advertisements