Monday, August 14, 2017

svg in HTML5

SVG is variously described as  'part of HTML5 specification' or an HTML5 extension. In either case, I am very happy as I am a fan of SVG.

In HTML documents you could embed an in-line SVG code.
SVG in some cases appear superior to Canvas in HTML. SVG creates prefabricated graphics that is part of the documnet model which can be accessed by the ID for any event based action, where as the graphics for use in CANVAS needs to be created and rendered during page loading.

Read my SVG related posts here:

http://hodentekhelp.blogspot.com/2015/12/does-microsoft-edge-support-svg.html

http://hodentek.blogspot.com/2009/10/finally-svg-in-visual-studio.html

http://hodentek.blogspot.com/2010/09/svg-gets-rendered-on-ie-90.html

http://hodentek.blogspot.com/2013/08/short-of-cash-get-apache-openoffice-40.html

http://hodentek.blogspot.com/search?q=svg

http://hodentekmobile.blogspot.com/2016/03/intel-xdk-controls-2-usage-of-svg-and.html

Monday, July 17, 2017

Single Page (web) Applications are trending

It is exactly what it says. Single Page Applications (SPAs) are web applications with a single web page that uses AJAX for its dynamic interactions. As page refresh is on the client side the SPAs can have downside of performance degradation if they are not properly designed and SEO optimized.

There are many JavaScript frameworks to write SPAs. There are lots of JavaScript frameworks that you can use to build SPAs. Lots of them are Open Source. Here are some:

WinJS
Angular
React
Ember
Aurelia
Dojo
Vue.js
Cycle.js
Backbone
Dojo


I hear a lot about Angular and Aurelia, perhaps more people are using them.
Intel XDK had both Angular and Backbone templates, but they are not supporting them anymore.

AngularJS is in Version 2.

I have a large number of posts on Intel XDK here.

Friday, June 30, 2017

Comprehensions in JavaScript

Comprehension(s) list(array) is used in many computer languages. What it does is it takes an array and modifies it  to create a new list(array) based on some modifier.

For example if you have a list like this: [ 1,2,3 ],
you can create a new list with each element of list replaced by itself multiplied 3 times like in Example 1

In the second example from Mozilla site, you take an array of lower case letters and use the Javascript string operatory 'toUpper()' to generate a new array with letters of each element capitalized.


Read here:
https://www.xul.fr/javascript/comprehension.php
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Comparison_operators

These were tested to work in Mozilla Firefox (I believe it is version 54). However it does not work in Microsoft Edge. I believe these are still being tested for future version of ECMA script according to the Mozilla Developer site.

Monday, June 26, 2017

Apache CORDOVA is the place to go if you were using Intel XDK

I was following Intel XDK for more than a year  with many posts on my blog for mobile devices and participating in Intel's forums.  I have observed that its emphasis was slowly changing and I started looking for alternatives. There are programs for which you need to pay, which I am not ready, as I do not derive any revenue from what I do. I am looking for free programs.

Progressively Intel XDK has been shifting their focus to mostly Intel IoT devices. The App Designer support does not exist anymore except for a few features in the interface. The Interface as you knew it is now mostly geared for IoT devices. Intel XDK forum suggests that there are more tools freely available (on the Internet) that may do equally well and a strong recommendation for using Cordova CLI.

Well one cannot expect a tool to live eternally and things do change. What is needed on the part of developers\users is to turn somewhat nomadic and look for new pastures.

Here is a link to Apache CORDOVA site where you need to forage next. Of course, Apache CORDOVA will be there much longer than Intel XDK could have been. For one thing, Apache CORDOVA has a neat architecture for building web/native apps which means you need to use the plugins if you need to access sensors in the mobile device.

Here is a picture of the well-knit Apache CORDOVA architecture from their site:


Monday, June 19, 2017

AngularJS Directives that you should know

AngularJS directives are extensions of HTML markups. They can be attributes, element names, CSS class etc. AnuglarJS script reference is important and the script can be found here:

https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"
The above script reference needs to be added to your hTML page.

You can find the whole list of directives here:
https://docs.angularjs.org/api

Here is the usage of some directives placed in a html page that can be displayed on your localhost (in this case the IIS in Windows 10). Place this code with a suitable name in the inetpub / wwwroot directory.

======================


  Some directives in AngularJS

ng-app
Sorry, blogger still does not support the "pre" tag!. The ng-app directive can be in the 'html' or the 'body' (shown here).
==============
When viewed on the browser (in this case Microsoft Edge), the HTML page renders as shown.



Type anything it gets copied next to Hello
Enter the increment region with your mouse, the count (presently 1) gets incremented
Click the link and you get to the page

More to come in future posts on AngularJS

Monday, May 29, 2017

What is Cafee2Go?

You create a video and you want it the way Picasso or Monet would have visualized it. Can it be done? The answers appears to be answered by Facebook's Caffe2Go. It was easy with stills as many programs do it, but with a video it is another thing.

Caffe2Go is supposed to be third iteration of AI, the deep learning. This was possible earlier with big machines and lots of computing power, since the program has to learn the myrid images that these great artists envisioned it could not have been done otherwise. But to do it on the phone in the palm of your hand, that is something that Facebook seems to have pulled off, with the Facebook app Caffe2Go.

It is a deep learning platform on the mobile phone. The app takes the style of the artist and transforms the input video, it is basically a style transformer.

Here is a demo of this deep learning app:
https://www.facebook.com/Engineering/videos/1015460775164720

Thursday, April 6, 2017

Markdown Syntax makes web page more readable, editable

HTML markup is well known and Markdown Syntax is a construct to make a web page readable.  Markdown syntax is used to make it possible to write to the web using simple text.  It is a text-to-HTML tool for web authors. No need to type those angle brackets(< and >).

Markdown syntax is very small and not extensive like that of HTML. It is not used to replace HTML but to make it easy to read/write/edit prose in a web page. Markdown does not need special editors.

Since Markdown consists of few constructs if you need beyond them you can use HTML. One of the special constraints in using Markdown is in the case of block level elements such as 'table', 'pre', 'p' etc. In this case for using Markdown just surround block-level elements with blank lines and Markdown syntax takes care of the rest.

Learn more about Markdown syntax here. While you are there click on the tab Dingus tool (written in Perl) to convert your Markdown Syntax to html syntax.

For example you can create first and second level headers by just typing them as shown here:

A First Level Header
=====================

A Second Level Header
---------------------


The above Markdown text will be converted  into the HTML source by the Dingus tool: (note: Blogger does not render the 'pre' tags which are in the source of this page. That is why you are seeing the h1 and h2 tags rendered. Review my post on this browser problem.

A First Level Header

A Second Level Header

The Markdown text is readable and can be typed in with a text editor and the tool converts it to web compliant HTML.

Review the screen shot here: