This post how to enable CORS in Node. CORS means cross-domain requests. Simply using below line of code in the application respond level will solve CORS issue. res.header("Access-Control-Allow-Origin", "*"); By below lines enable CORS for all the routes in that server. app.use(function(req, res, next) { res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); next();}); you can add this for resources files ...

In here we will try to mange session in node application. Here are the dependencies which is used in this sample "dependencies": { "express": "^4.8.7", "express-session": "^1.7.6" } express-session module needs express. Therefore you have to add express in your project also. var express = require('express');var session = require('express-session');var app = express(); session can be initialized by below code. Here ...

dhis2-android-dashboard Build from Source DHIS 2 [1] is health management information system and DHIS Mobile covers the wide area of mobile development related to DHIS2, with focus on a wide portfolio of solutions for utilizing mobile technology. Let build dhis2-android-dashboard from source [2]. 1. Get git clone from source [2]. (You can use ‘legacy’ branch for build for now, No breaks) 2. Get SDK ...

Installing NodeJS in CentOS It is fast and quick, just only two steps 1. Get the setup curl --silent --location https://rpm.nodesource.com/setup_4.x | bash - Note --location If the server reports that the requested page has moved to a different location this option will make curl redo the request on the new place. --silent Makes curl mute (silent mode). Don't show progress meter or error ...

Packaging and Distributing Python Projects Requirements Wheel: It is a built package that can be installed without the build procespip install wheel Twine : It is a utility for interacting with PyPIpip install twine Configuring a Project Here are files that will needed in root level. setup.py : It contains a global setup() function. The keyword arguments to this function are how specific details of ...

Data Validation Data validation is a process of ensuring data in zeppelin is clean, correct and according to the data schema model. Data validation provides certain well-defined rule set for fitness, and consistency checking for zeppelin charts. Here is more about data validation types. Where the data validator is used in zeppelin? Data validator is used in zeppelin before drawing ...

Introducing New Chart Library and Types for Apache Zeppelin Why Charts are important in zeppelin?Zeppelin is mostly used for data analysis and visualization. Depending on the user requirements and datasets the types of charts needed could differ. So Zeppelin let user to add different chart libraries and chart types. Add New Chart LibraryWhen needed a new JS chart library than D3 (nvd3) which is included in zeppelin, a new ...

Tutorial with Map Visualization in Apache Zeppelin Zeppelin is using leaflet which is an open source and mobile friendly interactive map library. Before starting the tutorial you will need dataset with geographical information. Dataset should contain location coordinates representing, longitude and latitude. Here the online csv file will be used for the next steps. Here I am sharing sample dataset in gist. 1 import org.apache.commons.io.IOUtils 2 import ...

Zeppelin Docs Install Ruby Version Manager (rvm) curl -L https://get.rvm.io | bash -s stable --ruby Then check which rubies are installed by using rvm list ruby -v you can then switch ruby versions using rvm use 1.9.3 --default If not install you can install by rvm install ruby-1.9.3-p551 Now we have correct version start building app gem install bundler To start serve ...

Data validation Data validation is a process of ensuring that a program operates on clean, correct and useful data. Data validation provide certain well-defined guarantees for fitness, accuracy, and consistency for user/stream/data input into an application. It can designed using various methodologies, and be deployed in any of various contexts. Different kinds of data validation Data type validationIt carried out on one ...

Generate a AngularJS application with grunt and bower 1. Install grunt, bower, yo.. etc. If you have miss any.npm install -g grunt-cli bower yo generator-karma generator-angularYeoman is used to generate the scaffolding of your app.Grunt is a powerful, feature rich task runner for Javascript.2. Install the AngularJS generator:npm install -g generator-angular3. Generate a new AngularJS application.yo angular The generator will ask you a couple of questions. Answer them ...

In my previous post, I wrote about git work flows. Now I will going to try out simple 'Feature Branch Workflow'.1. I pull down the latest changes from mastergit checkout mastergit pull origin master2. I make branch to make changes git checkout -b new-feature3. Now I am working on the feature4. I keep my feature branch fresh and up to ...

There are many Workflows for GitCentralized WorkflowFeature Branch WorkflowGitflow WorkflowForking WorkflowIn Centralized Workflow, Team develop projects in the exact same way as they do with Subversion. Git to power your development workflow presents a few advantages over SVN. First, it gives every developer their own local copy of the entire project. This isolated environment lets each developer work independently of ...

Chart Types and Data Models in Google Charts Different data model is need for different chart types. This post is basically covering google chart types and support of data models. Bar charts and Column chartEach bar of the chat represent the value of elements of x-axis. Bar charts display tooltips when the user hovers over the data. For a vertical version of this chart called the 'column chart'.Each ...

Options for Google Charts In Google chart some different chart type contains different format of data sets Google Chart Tools is with their default setting and all customizations are optional. Every chart exposes a number of options that customize its look and feel. These options are expressed as name:value pairs in the options object. eg:visualization supports a colors option that lets you specify "colors": ...

Google Chart with AngularJS Google Charts provides many chart types that is useful for data visualization. Charts are highly interactive and expose events that let you connect them to create complex dashboards. Charts are rendered using HTML5/SVG technology to provide cross-browser compatibility. All chart types are populated with data using the DataTable class, making it easy to switch between chart types. Google chart contains ...

Grammar induction Few days I was working for pattern mining on huge files and came across with millions of pattern (even different length from 2 to 150). Now I am looking for regex generation algorithms and came across by ‘Grammar induction’ which we knew some thing when in university time. But this is much more to do. Grammar induction Grammar induction, also ...

Adding Configuration file for Python 'configuration files' or 'config files' configure the initial settings for some computer programs. They are used for user applications. Files can be changed as needed. An administrator can control which protected resources an application can access, which versions of assemblies an application will use, and where remote applications and objects are located. It is important to have config files in ...

NLTK tutorial–03 (n-gram) An n-gram is a contiguous sequence of n items from a given sequence of text or speech. The items can be syllables, letters, words or base pairs according to the application. n-grams may also be called shingles. Tokenization My first post was mainly on this. 1 from nltk.tokenize import RegexpTokenizer2 3 tokenizer = RegexpTokenizer("[a-zA-Z'`]+")4 #skipping the numbers in here, include ...

NLTK tutorial–02 (Texts as Lists of Words / Frequency words) Previous post was basically about installing and introduction for NLTK and searching text with NLTK basic functions. This post main going on ‘Texts as Lists of Words’ as text is nothing more than a sequence of words and punctuation. Frequency Distribution also visited at the end of this post. sent1 = ['Today', 'I', 'call', 'James', '.'] len(sent1)—> 4 Concatenation combines ...

Previous Page