Showing 201 to 300 of 315 posts.

Log WebAPI Request Response

Example of Log WebAPI MVC3 Controller

Example code of logging every request/response/exception when access to ASP.NET MVC 3 controller.

Read more...June 1st, 2014

C# WebAPI(Microsoft)

Resource for Upgrade ASP.NET WebAPI 1 to ASP.NET WebAPI2 project

With WebAPI2, you can define more restful API url. However, if you want to convert your existing WebAPI1 to WebAPI2 is take some effort. Here are few Urls you could reference to resolve the problem. I'll include example at next time.For example, Http://yourDomain.com/test/usa/california/Alameda/foods/

Read more...June 1st, 2014

ASP.NET MVC WebAPI(Microsoft)

Convert Jade to Html and Vice Versa

http://html2jade.org/

Nice site powered by jade, convert html to jade template and vice versa.

http://naltatis.github.io/jade-syntax-docs/

Jade Template Syntax Documentation by Example

Read more...May 11th, 2014

Jade

import/export mongo database

With mongodb's mongodump & mongorestore command, you can achieve export and import data to your mongo database.

1. Export Database

Go to your local mongo bin folder. Type mongodump --db {your database name}

This command will export all your database as binary file under dump folder. When I have 200 MB, totall collection around 50,000. This command run like 2,3 second in my Windows 8 (8GB memory) PC.

If you're connect to remote mongo db, following command could be use.


mongodb\bin>mongodump --db {your database} --host {your host server name} --port {host server port number} --usernmae {mongodb username} --password {mongodb userpassword}

 

2. Restore you database to the remote connected database

Asume your remote mongo database have nothing, you just want to import everything you just export from local mongo datatabase. Run following command.

mongorestore --db {your database} --host {server name} -- port {server port number} --username {your database user name} --password {your database user's password} dump/{your database name}

Read more...May 11th, 2014

MongoDB

Angular with SEO

Angular with SEO, I think the answer is NO.  Angular just like other JS framework, dynamic loading content, these kind of imprementation is hard for SEO engine to catch up, it might have few ways for doing for the SEO. However, SEO is not simply if you put the html when page load, not just limit your link to 100 per page, not just put meta tag, Angular, or other JS framework to fully support SEO going to take a long time, or I don't know what going to happen next.

So my anwser now is, angular is good for small app. That's it.

Referenced following links.

Javascript SEO

AngularJS with SEO

SEO tools

Read more...May 4th, 2014

Angular.js SEO

Best Mongo UI for windows

List of Free Mongodb Management tools.

Read more...May 4th, 2014

MongoDB

C# add extension to all enum

In C# you sometime have to convert enum to Int value. Like following example

Read more...May 4th, 2014

C#

C# parallel coding

Use C# Parallel would do task in parallel, which could run jobs faster and the code is simple to use.

If you have to call 2000 api via internet in a job schedular for some kind of reason. For example, you could use this way to imprement the application, which call 2000 times api in parallel.

Parallel.ForEach(dataList, data =>
{
    DoYourWorkInParallel(data);                        
});

Read more...May 4th, 2014

C#

Environment config file on node.js

Depend on running enviroment, use different configuration files. At node.js world, following module is one of the choice.

Everything is on following link.

https://www.npmjs.org/package/node-env-file

 

1. Basically, what need to be have is, you need to install node-env-file module. 

npm install node-env-file --save

This command will update package.json and install
 node-env-file module. 

2. Create your enviroment file, like .env. The name could be any name. .env_dev, env_prod

PORT=9000
NODE_ENV=development

Read more...May 4th, 2014

Node.js

Ioc Ninject tool's basic information

What's Ninject? Looks like Ninject is greate tool for you to do Dependecy Injection, You could use Ninject for your Unit-Test, wrapper your Interface with your impremenataion file.

This's article is about to provide, basic information about Ninject, links, relatived blogs for learning.

Read more...May 4th, 2014

C#

Bower Install error : git

When you try to run follwoing command at first time, but get following error.

bower install 

 Failed to execute "git ls-remote --tags --heads git://github

.com/twbs/bootstrap.git", exit code of #128

 

Reference following link, to update git global config to use https instead of git://

git-bower-errors-exit-code-128-failed-connect

 

It might be become of your computer's policy setting is exclude for centern outpound port. 

Read more...May 3rd, 2014

Node.js

MongoDB Script Quick Note

Few mongo db script/command note

Read more...May 3rd, 2014

MongoDB

Redirect to other url within node.js

at node.js server side, you want to redirect to another url after you success get response from one api.

you can try use request module.

Read more...May 3rd, 2014

get url query string at node.js

If you want to get the query string like following 

http://localhost:9000/api/myapi?id=1

at your node.js code, you can write this to get the id's value at the function you defined for you api.

var url = require('url');
var url_parts = url.parse(req.url, true);
console.info(url.parts.querystring.id);

Read more...May 3rd, 2014

Node.js

Useful Linux Command

delete all folder, files and sub directory.

rm -rf ./{your folder location}

http://www.mediacollege.com/linux/command/linux-command.html

Read more...May 1st, 2014

Linux

Issue list want to resolve

Few my personal list I have to take time to learn.

Read more...May 1st, 2014

C# MongoDB WebAPI(Microsoft)

Free Node.js Applications

Free Node.js Applications

 

Ghost

A blog platform.

 

KeyStone

A Blog and Image Gallery system.

 

 

Read more...May 1st, 2014

Node.js

Run Node as background by using forever

This is for running at windows, I'm able to make it start but can't stop. Still looking for the solution. However, quick solution is, deploy your node.js web application to linux, seems like forever works. If you use windows for your deployment, how about try IIS-node.

When get start using node.js, you'll notice when you stop the node.js command, your HTTP server is done. You might close the command by your perpose, or after a long time, the machine auto closed command. At this kind of case, your node.js Http Server will not run automatically. So, In this blog, I'll show how to use forever.

Read more...May 1st, 2014

Ninject Dependency Injection in ASP.NET MVC

How to use Dependency Injection in Ninject at ASP.NET MVC application

Read more...April 6th, 2014

ASP.NET MVC ASP.NET C# Ninject Dependency Injection

ASP.NET state management

Read more...April 4th, 2014

ASP.NET MVC Razor Syntax

Read more...April 4th, 2014

7 Tools for Dependency Injection

Read more...April 4th, 2014

PuTTY Key Generator

PuTTY Key generator is generate public key and private key. Public key could store on other web application, when you try to use SSH to login to that application, it will check your local pc's ssh folder's private key.

Read more...April 3rd, 2014

Basic Information About Dependency Injection

Read more...April 3rd, 2014

Application Architect : ASP.NET MVC web application and shared application's structure

Read more...April 3rd, 2014

ASP.NET or MVC - How to Referece master or layout page's content

Read more...April 3rd, 2014

ASP.NET MVC HTML5 - start build HTML5 web application using .NET technology

Read more...April 3rd, 2014

5 Ways for Paging using ASP.NET

Read more...April 3rd, 2014

C# Automated Unit Test

Read more...April 3rd, 2014

use mandrillapp.com for your app email

Mandrillapp.com is very good for developing your application's email functions. If you have a small application but want email function, you could use mandrillapp.com.

Read more...April 3rd, 2014

Just start keystone

First, I love this. Use keystone is just better than I wrote everything from beginning.

 

Read more...April 2nd, 2014

Visual Studio tool: Add color picker tool to your visual studio

Read more...April 2nd, 2014

yeoman community is very powerful

YEOMAN is project template generator, few weeks ago the most used one was html and angular. But looks this screen, it contains 662 generators now.

Read more...April 2nd, 2014

Create your first iPhone app

Read more...April 2nd, 2014

Create assembly to your SQL Database

Read more...April 2nd, 2014

C# GridView Paging - databasae

Read more...April 2nd, 2014

CSS: Display ToolTips

Read more...April 2nd, 2014

embed.ly - Get url link detail

Looks like http://embed.ly/ is greate site, if I want to create something with URL. It'll get the short version of the url's detail. I have thought about imprement these kind of stuff, but since somebody already create this, why not just use it. 

 

Nextime, i'll post some detail when I use it.

Using C# default keyword

Read more...April 1st, 2014

Using C# Extension for enum, int, bool, etc

Read more...April 1st, 2014

How to Rewrite URL using ASP.NET MVC

Read more...April 1st, 2014

Use WinMerge to Compare Files at TFS 2010

Read more...April 1st, 2014

Deploy your MVC To IIS, Error: Unrecognized attribute 'targetFramework'.

Read more...April 1st, 2014

C# ? : Operator condition

Read more...April 1st, 2014

C# null Operator check ??

Read more...April 1st, 2014

C# : how to return more then one result.

Read more...April 1st, 2014

C# : use Tuple to list different type.

Read more...April 1st, 2014

C# : how to use delegate Func

Read more...April 1st, 2014

C# : how to use delegate Action

Read more...April 1st, 2014

Visual Studio Tool: Generate html from your coding

Read more...April 1st, 2014

C# : How to use object Initializers

Read more...April 1st, 2014

C# : automatic properties

Read more...April 1st, 2014

Visual Studio .NET debug by using attach process

Read more...April 1st, 2014

Dev tools : Snippet Compiler

Read more...April 1st, 2014

How to track active select item in Visual Studio

Read more...April 1st, 2014

How to make circle to your web page

Read more...April 1st, 2014

Visual Studio: add line number to your source editor windows

Read more...April 1st, 2014

Trying to write code in one line

Read more...April 1st, 2014

How to add CSS to your parent page from child page

Read more...April 1st, 2014

Installation guide for MonoTouch

Read more...April 1st, 2014

How to validate check box by using Microsoft MVC, Data Annotations Validation

Read more...April 1st, 2014

How to validate radio button list by using Microsoft MVC - ModelState Validation

Read more...April 1st, 2014

Microsoft MVC : add validation message to summary section

Read more...April 1st, 2014

How to validate combox by using Microsoft MVC, Data Annotations Validation

Read more...April 1st, 2014

how to create table by using CSS

Read more...April 1st, 2014

how to create table by using Html Table tag

Read more...April 1st, 2014

How to build your MVC razor view

Read more...April 1st, 2014

How to control URL by using MVC -- ver.1

Read more...April 1st, 2014

How to control URL by using MVC -- ver.2

Read more...April 1st, 2014

MVC : using Json pass string value

Read more...April 1st, 2014

MVC : using Json pass int value

Read more...April 1st, 2014

MVC : using Json pass enum value

Read more...April 1st, 2014

MVC : using Json pass datetime value

Read more...April 1st, 2014

MVC : using Json pass View Model

Read more...April 1st, 2014

How to validate length -- text box

Read more...April 1st, 2014

All default C# Project type for Visual Studio 2010

Read more...April 1st, 2014

Simple example to see how to use Visual Studio 2010 Console Project

Read more...April 1st, 2014

Simple example to see how to use Visual Studio 2010 console Project

Read more...April 1st, 2014

Simple example to see how to use Visual Studio 2010 Class Library Project

Read more...April 1st, 2014

Install guide for Microsoft XNA Game Studio 4.0

Read more...April 1st, 2014

Other Project Template C# Projects type for Visual Studio

Read more...April 1st, 2014

Simple example to see how to use Visual Studio 2010 to create Web Project

Read more...April 1st, 2014

Install guide for Develop Windows Phone

Read more...April 1st, 2014

Build your own simple logging utility using C#

Read more...April 1st, 2014

mobile market sales share

Read more...April 1st, 2014

How to Use Subversion

Read more...April 1st, 2014

Tool - Paste your code to Web Page by using Third Party Tool

Read more...April 1st, 2014

Design Database By using Visual Studio

Read more...April 1st, 2014

C# HttpContext Unit-Test - Write Testable ASP.NET MVC Web Application

Read more...April 1st, 2014

C# how to create singleton class

Read more...April 1st, 2014

Moq: Mocking Method by using Moq Mocking Framework

Read more...April 1st, 2014

C# How to Send Email

Read more...April 1st, 2014

C# How to Send Email By Html

Read more...April 1st, 2014

C# Send Email by RazorEngine

Read more...April 1st, 2014

C# GridView Paging

Read more...April 1st, 2014

CSS Menu

Read more...April 1st, 2014

C# GridView Paging - object data source

Read more...April 1st, 2014

C# List View Paging

Read more...April 1st, 2014

C# GridView Customize Paging

Read more...April 1st, 2014

C# Use TestView Window

Read more...April 1st, 2014