January 06, 2020

My first Geo Location program using Leaflet JS

Hi folks,

Today I am going to explain writing an geo location HTML page with Leaflet JS.

You can find my program in my GIST GitHub List

https://gist.github.com/psrdotcom/85c56bc2ffaadb254e63bde2b3b162d5

Procedure


  • Make the empty HTML page with HTML, HEAD, BODY tags
  • Place the CSS link first in HEAD tag
    • "https://unpkg.com/leaflet@1.6.0/dist/leaflet.css"
  • After CSS, paste the Leaflet JS file reference
    • "https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"
  • In BODY, create a DIV tag specifying the ID attribute and height and width style attributes
    • id="mapid" style="width: 600px; height: 400px;"
  • Get lat (Latitude) and long (Longitude) of your own choice of location.
  • Take latlong reference from https://www.mapcoordinates.net/en
  • Use map setView to set the location with latlong and zoom level
    • var mymap = L.map('mapid').setView([17.496380,78.393175], 15);
  • Make a marker with popup using marker and bindPopup functions
    • var marker = L.marker([17.496380,78.393175]).addTo(mymap);
    • marker.bindPopup("Hello !! This is JNTU, Hyderabad, India campus.").openPopup();
  • Open your HTML page in any compatible browser
  • You should be able to view your map with specified location and control the map with zoom out and zoom in capabilities.
Please send your feedback and comments to psrdotcom@gmail.com

January 03, 2020

My first WebAssembly program

Hi folks,

Today, I am going to explain how to setup and write a sample program.

WebAssembly enables high performance applications on web pages. WebAssembly natively runs on browser along with HTML, CSS, JavaScript and approved by W3C (World Wide Web Consortium).

To know more about WebAssembly, go through the official webiste https://webassembly.org/

Pre-requisites


  1. Git
  2. CMake
  3. Host system compiler
    • Windows - Visual Studio 2017 +
    • Linux - GCC
    • Mac - XCode
  4. Python 2.7.x
After downloading and installing the pre-requisites, make sure git, cmake and python are accessible in path.

Install

  1. Open Terminal/PowerShell with Admin rights
  2. Get the emsdk files
    • git clone https://github.com/emscripten-core/emsdk.git
  3. Navigate to the downloaded folder emsdk
    • cd emsdk
  4. Install (Note: On PowerShell execute this command, Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine)
    • ./emsdk install latest
  5. Activate
    • ./emsdk activate latest

Create Sample HTML file

  • Create folder
    • mkdir hello
  • Navigate to the folder
    • cd hello
  • Create a file hello.c and place the following code
#include
int main(int argc, char ** argv) { printf("Hello PSR!\n");}

Convert C file to HTML

emcc hello.c -o hello.html

Run WebServer (Optional)

Run emrun webserver to serve the html pages.
emrun --no_browser --port 8080 .
Hope, the tutorial is useful. Happy coding.

Please send your comments and feedback to psrdotcom@gmail.com



December 10, 2019

Go language install and configuration in Windows and Visual Studio Code as IDE

Hi folks,

Today I am going to describe you the best way to install and configure the Go language.

Download

From the Go language from its official web page https://golang.org/dl/

After installation, you would be able to program and run the code from any terminal.

What else?

Open your .go file in Visual Studio Code, it asks you something else. What was it?

"The "go-outline" command is not available. Run "go get -v github.com/ramya-rao-a/go-outline" to install."

What you need to do?

First, in Visual Studio Code set the the following in "settings.json" file.

"go.toolsGopath": "C:\\Go"

Note: If you are getting the following error, then click on "Install All"
The "go-outline" command is not available. Run "go get -v github.com/ramya-rao-a/go-outline" to install.

  • Get the location, where it is installing
  • Copy the bin and pkg folder contents to your Go installed folders.
  • Delete the folder which VS Code used to download the content.

That's all.. you should be able to code in Visual Studio Code as well without having 2 different go installed folders.

Happy Go coding!!

Please send your feedback and comments to psrdotcom@gmail.com

November 27, 2019

Virtual Reality (VR), Augmented Reality (AR), 3D Application Development Tools and Platforms

Hi folks,

Most of the developers think Unity is only the development platform to develop Virtual Reality (VR), Augmented Reality (AR), 3D Applications.

Here is the list which might be useful you to explore based on your skillset.


  1. Unity - C#
  2. Unreal - C++
  3. Apple SceneKit - Swift / Objective-C
  4. Google Sceneform - Android
  5. Amazon Sumerian - JavaScript
  6. Babylon - JavaScript - Try online Playground
  7. A-Frame - HTML JavaScript
  8. Three - JavaScript - Examples
Hope this information is useful for you to create your own applications based on your knowledge.

Make your dreams to real using the VR, AR, 3D technologies.

Please send your feedback and comments to psrdotcom@gmail.com

October 24, 2019

Markdown file convert/export to html, png, jpeg, pdf with images

Hi folks,

Today I will share about, how we can include the images in markdown file and export to pdf, html, png and jpeg formats.

You can do this with 2 Visual Studio Code extensions

Pre-requisites

Visual Studio Code with following MarkDown Extensions
  1. To place images
  2. To convert the markdown to pdf, html, png and jpeg formats
Install the above 2 Visual Studio Code extensions.

Insert an image

Create images folder and keep all your images (Optional, but easy to maintain)
Syntax: ![](images/imagename.extension)
Usages: ![](images/abc.png)

By now, your image is part of your file.

Preview your file

Open Command Palette (View -> Command Palette OR Type F1 OR Ctrl+Shift+p)
Type "Markdown: Open Preview" OR Ctrl+Shift+v keyboard shotcut

Export Markdown

Open Command Palette (View -> Command Palette OR Type F1 OR Ctrl+Shift+p)
Type export and select below
  • markdown-pdf: Export (pdf)
  • markdown-pdf: Export (html)
  • markdown-pdf: Export (png)
  • markdown-pdf: Export (jpeg)
  • markdown-pdf: Export (all: pdf, html, png, jpeg)

Change Markdown conversion settings

  1. Select File > Preferences > UserSettings or Workspace Settings
  2. Find markdown-pdf settings in the Default Settings
  3. Copy markdown-pdf.* settings
  4. Paste to the settings.json, and change the value
Hope this blog is useful to insert images in your markdown file and export to supported formats.

Please send your valuable feedback and comments to psrdotcom@gmail.com

October 01, 2019

Remote desktop connection to Azure AD joined computer device

Hi Folks,

I have an issue of remotely connecting one of the Azure AD joined computer.

Fix is explained below


  1. Open "Remote Settings" from "System".
  2. You should be able to view "Remote" tab from "System Properties".
  3. Uncheck "Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended)" from Remote Desktop section.
  4. Open regedit.exe.
  5. Navigate to "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp".
  6. Update "SecurityLayer" key to "0" (Zero) from default 2 (Two).
  7. Reboot your system.
  8. While taking remote desktop, user "AzureAD\"your work email id" as your username.
  9. You should be able to connect your AzureAD joined system remotely from now.


Please send your comments and feedback to psrdotcom@gmail.com

September 23, 2019

ADFS (Active Directory Federation Services) not starting after reboot

Hi all,

I have stuck with one of the problem where ADFS was not starting after rebooting the PC.

Solution from different sources worked for me

Try your luck.


ADFS not starting issue solution
  1. Start "Microsoft Key Distribution Service"
  2. Start "Windows Internal Database"
  3. Start "Active Directory Federation Services"
Please send your feedback to psrdotcom@gmail.com


Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com