Monday 25 August 2014

create a module in node.js

Standard
requirement will took you to invent. so if you know what your requirement then you will try to invent it.
a good programmer invent or write/hack a code one time but use again and again so today i will tell you how you create/hack a module one time for future requirement in node.js.
create a module in node.js is so easy no complication is here .

ok lets hack first of you need to create a folder "node_modules" if not exist.
in node have two keyword for package manage one "require" and another "exports" require for import a package from node module and another for export a module to app.

create a file like "new_module.js" file or anything and write your function in this file only follow bellow structure:

exports.function_name=function(){
//your code here
};

Saturday 23 August 2014

export database data to excel file in node.js with express

Standard
today i will tell you a small script that are so useful.
we have saw that maximum user want to database data store in local machine by excel,csv or other file format so today i will give a code that will create a excel file in user m/c.
ok first you need to install excel-export module in node application so goto folder from terminal where you want to create your app and type bellow command:

$sudo npm install excel-export

next create a get method where you want write excel export code and then copy bellow code in this method:

user todo list application or sample project using python with django

Standard
ok today i will tell you how create application in python using django already i have tell you that python easy and smooth and also i have tell you how you install or create a application with mysql in django in previous article:

http://netai-nayek.blogspot.in/2014/08/today-is-my-first-blog-i-dont-know-how.html
http://netai-nayek.blogspot.in/2014/08/how-create-model-in-django.html
http://netai-nayek.blogspot.in/2014/08/how-create-besic-app-in-django.html
http://netai-nayek.blogspot.in/2014/08/how-start-your-first-django-programing.html
http://netai-nayek.blogspot.in/2014/08/how-to-get-database-data-in-django-view.html
http://netai-nayek.blogspot.in/2014/08/how-create-django-template.html

and also i have tell you how you create or login using django default user table:

http://netai-nayek.blogspot.in/2014/08/how-to-create-or-registerlogin-and.html

but i know you know all of this but you have any idie how you will start so today i have decide that i will tell you how you create/design a project , i give a sample project like user todo list, Already i have create this project using node.js but here i will create using python with django i think you will enjoy in this project

Wednesday 20 August 2014

embed command prompt or terminal in website using node.js

Standard
today i will explain most interesting topic on node.js.
it is not important that you know all about computer language but if you know or feel nothing is impossible then you can do anything today i will tell you like that type of job .
this job actually how you implement or embed your server command prompt or operating system terminal in website.
if you full article then you can realize that it's so easy.
OK now start your job, first open your terminal and go to your application folder and type bellow command:

sudo npm install tty.js

Friday 15 August 2014

image processing and manipulate in node.js with express

Standard
suppose you have milk,sugar and water but you don't know how you process a ice cream then this all stuff going to waste or no matter what resource you have, like you have image but you don't know how you process or manipulate for your requirement so
today i will tell how node.js manipulate or process a image or how you manipulate or process a image in node.js with express framework.

node have lots of image module like.

Thursday 14 August 2014

user todo list application or sample project using node.js with express

Standard

In previous article i have told you how you install and create  a node.js application and also i have told you how you connect with database so now i will give a sample project .
here you can see how database will connect with mysql server and how we manipulate data in node.js
without practice now knowledge is enough so you need a target what you create and how you create that's why i will give a sample project where user can create signup and login and also user can create,edit and delete to do list where you can see project structure and you can idea how a node.js projects work.

so i gave you lots of chitchat and blah blah blah...... now time to work

connect mysql database with node.js with express

Standard

you have developed a app but you have not database or you dont know how to connect with database like you create a icecream but its not cool

we have lots of database engine but today i will tell you how you connect with mysql database

so today i will describe how you connect database or install mysql.

Saturday 9 August 2014

create a application with node.js and express

Standard

today is nice day you have lot's of time so don't spend it or spoil it just do anything that will strong your skill.
so i have decide today i will discus about node.js how you create a basic app.
don't forget all project start from a basic app so if your basic and project basic is strong then project and your future not stop any how.

so question is how you will start your app already i have tolled you how you install node.js with express framework.

Wednesday 6 August 2014

how to install node.js with express in linux/ubontu

Standard

today i will tell you a new cocktail this cocktail have already prepared just you need to shake and test if anything is missing or short then again mixed up and drink any one can develop by node who knows javascript, and every body know javascript so any one can developed. 
node.js is a javascript platform for server-side programming that allows users to build network applications quickly. By using Javascript on both the front-end and the back-end, development can be more consistent and be designed within the same system.
In this guide, i will show you how to get started with Node.js on an linux server.

now you need to install node in your system

first of all open terminal and type bellow command

Monday 4 August 2014

how to create or register,login and manage user in django

Standard

you prepare a cocktail but no one have to drink so how to know your cocktail best or not

so today i will write how you manage,login,logout and register user

User registration and account management are universal features found in every
web application. Users need to identify themselves to the application before they can post and share content with other users. User accounts are also required for online discussions and friend networks, among many other uses. so i will focus on building features related to account registration and management, and
taking advantage of the user authentication system that comes with Django.

so now we will follow some common rules like

• Creating a login page.
• Enabling logout functionality.
• Creating a registration form.
• Enabling users to update their account information.

when i will developing the above items, then i use two important Django features:

• Template inheritance.
• The forms library.

Sunday 3 August 2014

how to find all ip address and website crawler using python

Standard

i have try lot's of crawler in this world but not fulfil my total requirement
so i decide to create a new crawler  that find all ip address and home page and store to my folder
it's work fine but little bit slow presently i have 70,000 website in my folder in 3 days this program find all ip address all over world

first of all create a folder where your program will store and create a python file with extension (.py) then copy this to the file and save

how to get database data in django view and send to template

Standard
now i will describe how to implement model and template in a view in django

this is so easy and simple follow some rules thats all

ok now take a cocktail and start your coding

we will try to create a user page, first open urls.py file in your editor and add bellow code :

urlpatterns = patterns('',(r'^$', main_page),(r'^user/(\w+)/$', user_page),)

how create a django template

Standard


good software engineering is separate from UI and business logic

now we will try to implement template in django it nice mechanism where where your application design separate from business logic first create a folder in store folder

next open setting file and write bellow code:

import os.path
TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates'),)


this is a variable where i have set my django template path so django can access easily my template folder

Saturday 2 August 2014

how create a model in django

Standard

model is a very important part of any framework now i will describe how create a model in django and how it work. model use for data source a model is connector between controller and database, in django connector between view and database actually django is MTV so view call a function from model module and this function is a table name . this function load respective row from database and give  row array

django create table automatic if you add your table in model then when synchronized then this all table will create in mysql database

ok now start by creating the data model for a user table, Open store/models.py in your editor and type the following code:

how create a besic app in django

Standard

Creating the Main Page View

A view in Django terminology is a regular Python function that responds to a page request by generating the corresponding page. To write our first Django view for the main page, we first need to create a Django application inside our project.

the following command within our store folder:

$ python manage.py startapp app

• __init__.py: This file for Python that app is a Python package.
• views.py: This file will contain our views.
• models.py: This file will contain our data models.

Now, create the main page view. Open the file store/views.py in your editor and enter the following:

how start your first django programing

Standard

this framework so easy and nice it just write little and get more

Django is an MVC framework. However, the controller is called the "view", and
the view is called the "template". The view in Django is the component which
retrieves and manipulates data, whereas the template is the component that presents data to the user. For this reason, Django is sometimes called an MTV framework (MTV stands for model template view). This different terminology not changes the fact that Django is an MVC framework, nor affects how applications are developed. But keep the terminology in mind to avoid possible confusion if you have worked with other MVC frameworks in the past

now i will create a empty project

how install python with django and mysql

Standard
this is my first blog i dont know how i will start but i will try my best

and today i will start blogging on python when i have start, first of I don't know where i will start and how i will start then i got a framework, this is nice and it is a python best framework and it is a DJANGO

and today is sunday no office, no trafic, no train, no boss and no nothing just free, anything i can do.

python and linux is the best combination, i thing it's cocktail.

so now quetions how start python with django first you need a python in your system so