charanblog: New HTML5 Tags: HTML5 brings a host of new elements and attributes to allow developers to make their documents more easily understood by other systems (es...
Here we will show you how you can create a web-based desktop application using PHP, CSS, HTML, and JavaScript with the help of PHP Desktop. In fact, PHP Desktop is an easy and simple solution we can use to create very powerful and complex desktop application. What Is PHP Desktop? PHP Desktop is an open source project founded by Czarek Tomczak in 2012 to provide a way for developing native desktop GUI applications using web technologies such as PHP, HTML5, JavaScript and SQLite. Mind you, the development workflow you are used to while creating web applications remains the same. The step of turning an existing website into a desktop application is basically a matter of copy and paste. PHPDesktop is an all-made container that will just swallow your project. With that, you can easily transform an existing website into a desktop application without any modification. When you download PHP Desktop , you will have some set of files and folders; among them you will have a ...
1. What are the key features of Python? If it makes for an introductory language to programming, Python must mean something. These are its qualities: Interpreted Dynamically-typed Object-oriented Concise and simple Free Has a large community 2. Differentiate between lists and tuples. The major difference is that a list is mutable, but a tuple is immutable. Examples: >>> mylist=[1,3,3] >>> mylist[1]=2 >>> mytuple=(1,3,3) >>> mytuple[1]=2 Traceback (most recent call last): File “<pyshell#97>”, line 1, in <module> mytuple[1]=2 TypeError: ‘tuple’ object does not support item assignment 3. Explain the ternary operator in Python. Unlike C++, we don’t have ?: in Python, but we have this: [on true] if [expression] else [on false] If the expression is True, the statement under [on true] is executed. Else, that under [on false] is executed. Below is how you would use it: >>> a,b=2,3 >...
A cookie is set with the following code: setcookie(name, value, expiration) <?php $Month = 2592000 + time(); //this adds 30 days to the current time setcookie(AboutVisit, date("F jS - g:i a"), $Month); ?> The above code sets a cookie in the visitor's browser called "AboutVisit". The cookie sets the value to the current date , and set's the expiration to be be in 30 days (2592000 = 60 seconds * 60 mins * 24 hours * 30 days.) Now let's retrieve the cookie. <?php if(isset($_COOKIE['AboutVisit'])) { $last = $_COOKIE['AboutVisit']; echo "Welcome back! <br> You last visited on ". $last; } else { echo "Welcome to our site!"; } ?> This code first checks if the cookie exists. If it does, it welcomes the user back and tells them when they last visited. If they are new, it skips this and prints a generic welcome message. TIP: If you are calling a cooking on the sa...
Comments
Post a Comment