Tag Archives: programming

JavaScript – Processing.js 2D library – part 004.

The Processing.js is available for Linux, Mac OS X, and Windows and come with the last version 3.3.7 (13 March 2018).
Today I tested processing.js for android. They say us about this issue:
Use Processing for Android to create Android apps with ease, including live wallpapers, watch faces, and VR apps. You can run your Processing sketches on Android devices (phones, tablets, watches) with little or no changes in the code, and without worrying about installing SDK files or editing layout files. Processing for Android also lets you accessing the Android API to read sensor data, and exporting your sketch as a signed package ready to upload to the Google Play Store.
To use processing.js for android you need to follow this links:

They tell us about new android processing :
The version 4.0 brings several improvements to the Android mode, incuding new functionality for creating live wallpapers, watch faces, and VR apps.

Posted in All, Android, javascript, Processing.js, Programming. Tagged with , , , , .

Using SVG with HTML5 – part 001.

Scalable Vector Graphics (SVG) is a family of specifications of an XML-based file format for two-dimensional vector graphics, both static and dynamic, interactive or animated.
The first step is how to add the svg file to html5 file. This can be done with the follow this steps:
– using the HTML img tag;
– using the HTML object tag;
– using the HTML iframe tag;
– using CSS (background images);
– including SVG within SVG using the image tag;
inlining the SVG code within HTML code.
This steps come from basic include file into html5 exception make the: including SVG within SVG.
Let’s see one example of : including SVG within SVG.
We have a square.svg and will put into another svg file, see:

Posted in All, HTML 5, Programming, web. Tagged with , , , .

Python security versus insecurity .

The development team of python programming language tell us:
The Python Software Foundation and the Python developer community take security vulnerabilities very seriously. A Python Security Response Team has been formed that does triage on all reported vulnerabilities and recommends appropriate countermeasures.
Let’s start with some important elements that are involved in the title of this article – which I consider a good tutorial for those who start programming.
Depending on the project you want to develop, you should know the essential elements on which your project is based. A simple project with executable output will be different from one with a web target.
The key issue is prioritization, real-time knowledge of risk factors and defense against key points that are possibly vulnerable to python-specific programming.
Like other programming languages (examples: java, javascript, go, c++, lua, perl, c ) , Python also has gaps and unpleasant developments that give the wrong impression. This problem can be eliminated from the start by a good programmer. My personal and personal view of python is nonexistent and control over declared python modules. Eventually implement a signing system that is different from PEPs (Python Enhancement Proposals).
Now, it’s a trustworthy system signed by developers to support programmers without verifying the python module source code. It is up to the programmer to solve this problem. A system of advancing and eliminating under the official influence of python developers with accurately implemented evolutions would be more useful. I have seen such a system implemented at Fedora linux distribution and other distributions.
Although it is licensed in organizational management, it must specify: a complete analysis should also contain the resources correctly evaluated throughout the evolution process.
Read more about python security and get help from python security official webpage.

Posted in All, Programming, Python. Tagged with , , , .

Python and common mistakes .

Python it very attractive for Rapid Application Development because is an interpreted, object-oriented, high-level programming language with dynamic semantics. This is not all.
If you search on the Internet articles about “python common mistakes”, you will find a whole series of articles that will disappoint you.
In this tutorial I present some of these mistakes to avoid a misconception about this programming language.
Let’s start with :

  1. Do not use or install old python or old python modules – use help and read the Python Enhancement Proposals (PEP) ;
  2. Incorrect indentation, tabs and spaces – never use tabs, only spaces (use 4 spaces for a tab);
  3. Scoping – Python decided to treat variables as global or local ( being an interpreted language is executed line-by-line and executed statement-by-statement) ;
  4. Copying – depends how  treat variables this can have many issues ( example mistakes when using Python dictionary) ;
  5. Using a mutable value as a default value – you to specify that a function argument is optional by providing a default value for it;
  6. Specifying parameters incorrectly for an exception block (example: to catch multiple exceptions in an except statement is to specify the first parameter as a tuple containing all exceptions to be caught) ;
  7. Modifying a list while iterating over it (example: deleting an item from a list or array while iterating over it) ;
  8. Confusing how Python binds variables in closures into a wrong way – (example: the expect the following output is wrong) ;
  9. Stop writing classes – is no need to use it.
  10. Using class variables incorrectly – class variables are internally handled as dictionaries and referred as Method Resolution Order (MRO) ;
  11. Creating circular module dependencies – the presence of a circular import can be a problem in Python importing modules;
  12. Name clashing with Python Standard Library modules – your code would be in conflict with the standard library module of the same name ;
  13. Do not confuse the concept of: error with mistakedepends on how you understand python language and output with development errors.

The subject of this tutorial is very complex, but it is more important if you go through it while developing the source code.

Posted in All, Programming, Python. Tagged with , , , .

Google Apps Script – addon example – part 006.

Today I will show you how to make a SideBar addon with Google Apps Script.
This tutorial is very simple.
Open one sheet into your google drive account.
Go to ToolsScript editor … and that will open a new tab into your browser with the script editor.
Save your sheet and your project from script editor.
You need to add this source code into your Code.gs file:

The next step is to add a html file named : openSideBar.html.
Go to FileNewHtml file and add new html file with this source code:

You now run the Google Apps script.
The Google want to have your permission to run this into Google applications area :
Display and run third-party web content in prompts and sidebars inside Google applications
This allow you to run the addon and result will be a sidebar html file, see:

Posted in All, Google Apps Script, Programming. Tagged with , , , .