Tag: Javascript

CSS in Svelte

CSS in Svelte

Svelte is a front-end framework for web development, you can find more about it here. This post is about using CSS in Svelte. CSS in Svelte Components CSS styles specified in Svelte components are scoped to the component itself, meaning they don’t affect anything outside the component. Svelte compiler achieves this by making appropriate changes…

Read More Read More

Svelte – a kind of UI Framework

Svelte – a kind of UI Framework

Svelte is a front-end framework for web development like React, Vue and Angular. In a short time, Svelte has become very popular as you can see from ‘State of JS’ survey or the stars on it’s GitHub repo. Single Page Application (SPA) These UI Frameworks enable us to create single-page applications where most of the…

Read More Read More

Create Masonry Layout with CSS (Grid with variable-sized contents arranged in columns)

Create Masonry Layout with CSS (Grid with variable-sized contents arranged in columns)

Source code for examples in this article can be found at https://github.com/umaranis/css-masonry-layout In Masonry layout, variable-sized items are arranged in columns. It is different from a regular grid in the sense that it doesn’t have fixed-sized rows. Pinterest is a popular example of the masonry layout. The layout looks beautiful and makes efficient use of…

Read More Read More

Add linting to NodeJs and TypeScript project

Add linting to NodeJs and TypeScript project

We are going to install TypeScript ESLint for finding potential problems with our code. Most online tutorials talk about using TSLint for TypeScript, but it is deprecated now in favour of ESLint. Let’s start by installing ESLint. To configure the linter, we need to create a config called .eslintrc.js in the root directory. Let’s create…

Read More Read More

Setup Nodejs + Typescript development environment

Setup Nodejs + Typescript development environment

Here is the summary: Install Nodejs Initialize Javascript project Convert to Typescript Install ts-node Prerequisite You would need a code editor installed on your system. I personally recommend Visual Studio Code as it has amazing support for Typescript. Install Nodejs Nodejs can be downloaded and installed from here. It will also include NPM (node package…

Read More Read More

Maximo Test Automation with Cypress

Maximo Test Automation with Cypress

Cypress.io is a newish front-end test automation tool. In my brief encounter with Cypress, I found it relatively easy to set up and get started. The development workflow from coding to writing tests and running them is refreshingly smooth as compared to other Selenium based tools. Cypress does have its own limitations though as explained…

Read More Read More

How Public Key Cryptography works? (RSA algorithm)

How Public Key Cryptography works? (RSA algorithm)

Public-key Cryptography is asymmetric meaning the key used for encryption cannot be used for decryption. There is a pair of keys, if the message is encrypted with one key, then the other is required for decryption. How Public-key Cryptography works conceptually? Let’s say Alice and Bob want to exchange messages in a secure way. To do it using…

Read More Read More

Calculate Modular Exponentiation (PowerMod) in Javascript (a^p % n)

Calculate Modular Exponentiation (PowerMod) in Javascript (a^p % n)

Computing PowerMod is required for implementing public-key cryptography as it is used to encrypt and decrypt data. Calculating it by regular arithmetic (i.e. calculating pth power of a) doesn’t work with large numbers used for encryption. That’s where PowerMod helps, it calculates the result by keeping the numbers significantly small and within range of the integer data type.…

Read More Read More

CodeSchool courses on JavaScript Frameworks

CodeSchool courses on JavaScript Frameworks

CodeSchool is a great site for introductory programming courses. With all guides and practice exercises available right within the browser, it is a hassle-free way to start learning. The design of the site is also very pleasing which enhances the overall experience. Recently, CodeSchool offered a free weekend pass to all their content. I took the…

Read More Read More

Convert C# code to JavaScript

Convert C# code to JavaScript

Update June 2019: Five years on, each one of the following projects is either discontinued or stale for years. While Bridge.Net has been active for many years and doing pretty well. There are some tools which convert C# code to JavaScript. Obviously, these will only be useful if your code is not tightly coupled with…

Read More Read More