Posts

Getting started with React native

Image
It's been a long time since i have posted anything in this blog. I have been trying react-native for the last 3 months. And it's been a wonderful experience. From a Angular background it seemed difficult to adopt react initially. Once i got it, it seems very easy and interesting. About the performance of RN is just awesome.
I am using
Windows 10 AndroidInstallation
Installation is pretty simple. There are two ways to create an application, using expo-cli and react-native-cli. I prefer the second one. It seems like a little complex but when developing large application it's the best way to start.

Setup
As a prerequisite we need to install nodeJS, Python, JDK and need to setup Android. We need to install react-native-cli globally for creating and running the project
npm install -g react-native-cli
Running
Once you install the cli we can create the application.
react-native init firstProject After creating the application we can move into the application folder and run the a…

Bitcoin mining - a rookie experience

Image
Happy New Year



It's my first blog post in year 2018 and it's a new technology.

So it's crypto currency time. Wherever we look it's bitcoin and altcoins. After some thought i decided to try the blockchain. Just like any other technologies i used in the past, i decided to go for something small and easy one. Mining.

Before understanding anything about blockchain, i tried mining. Yes I know it's not profitable one. but decided to go for it just to have some beginning.

Mining

So everywhere i looked for mining, it's always high-end GPU/ASIC. I don't have a decent CPU with me. And it says CPU mining is not profitable. Okay. I agree. And i still went for CPU mining. Just because i would like to start taste the bitcoin.

Wallet

So  we need some wallet for keeping my precious currency. Am from India and i found ZepPay . It's a mobile based online wallet. Oh, so there is online and offline wallet. Do i need to go for offline wallet which is more secure? What i am go…

Angular4 - primeng, ngx-bootstrap

In previous post we tried to create module, component and routing. Lets look into how to add third party libraries.

You could check out the code from here.
git checkout -b part3.0 origin/part3.0
In Angular4 adding third party libraries is pretty easy. Install using npm and add the module. Its one of my most loved feature in Angular4.

PrimeNG

PrimeNG is one of the most used and most popular Angular4 library. It consists lot of components and its easy to setup and use. Besides it does have a good team working behind this library. In my experience it's one of the fast developing library.
To install PrimeNg run

npm install primeng --save
npm install font-awesome --save
PrimeNg needs font awesome for icons . Unlike any other libraries , PrimeNG had separate module for each component, which helps to include only selected component in the bundle.
Lets include styles for the components. In .angular-cli.json add

"styles": [ "../node_modules/bootstrap/dist/css/bootstrap.min.cs…

Angular 4 - Modules, components and routing

Image
In the previous post we created a new Angular 4 project. Lets check the how to add modules, components and routing.

You could check out the code from here.
git checkout -b part2.0 origin/part2.0
We are going to use bootstrap styling . So lets add bootstrap in our aplication . We are going to use only styling not the components.

npm install bootstrap@3
We need to add the bootstrap stylesheet in tha .angular-cli.json.


"styles": [ "../node_modules/bootstrap/dist/css/bootstrap.min.css", "styles.css" ],
Our first Module

Lets add a new module employee. Inside "src/app" run

ng generate module employee or
ng g m employee
Wait we are going to lazy load this module , so we need routing inside the module, right? So we are going to create the routing also.
ng g m employee --routing
Time for component

It will create new employee module with its own routing.lets add a component for listing the employee. So inside employee folder run

ng g c empl…

Angular 4 - The Beginning

Image
When i first started using Angular 2 its in beta. Getting started with Angular is pretty easy. The team provided an awesome cli-tool which will help to create, develop, test and build the Angular project easily. We need to install the angular/cli (Formerly angular-cli) globally. Latest angular/cli(1.1.2 at the time of this writing) will create an Angular 4 project.

npm install -g @angular/cli
Suppose you need to create an Angular 2 project. What will you do? NOrmally what i will do is will install rc4 version of angular cli and create a new project, which will by default create a angular2 project. Then later will update to latest cli and the project will work smoothly in latest cli,

npm install -g @angular/cli@1.0.0-rc.4
So that's all about angular/cli. You could check out detail in here.

Lets create an application and try it. For creating new application run the following command.

ng new ngApp
This will create a new application and it will install all the dependencies . Do you kn…