Skip to content

Instantly share code, notes, and snippets.

View cuongdev's full-sized avatar

Cường Tuấn Nguyễn cuongdev

View GitHub Profile
@cuongdev
cuongdev / Remove VietNameseSign using C#
Last active June 9, 2016 19:31
Remove VietNameseSign using C#
public static string VietnameseSigns(string str)
{
str = str.Trim();
var charsToRemove = new string[] { "@", ",", ".", ";", "'", "/", "\\", "\"", "[", "]","#","+" };
foreach (var c in charsToRemove)
{
str = str.Replace(c, string.Empty);
}
const string FindText = "áàảãạâấầẩẫậăắằẳẵặđéèẻẽẹêếềểễệíìỉĩịóòỏõọôốồổỗộơớờởỡợúùủũụưứừửữựýỳỷỹỵÁÀẢÃẠÂẤẦẨẪẬĂẮẰẲẴẶĐÉÈẺẼẸÊẾỀỂỄỆÍÌỈĨỊÓÒỎÕỌÔỐỒỔỖỘƠỚỜỞỠỢÚÙỦŨỤƯỨỪỬỮỰÝỲỶỸỴ ";
const string ReplText = "aaaaaaaaaaaaaaaaadeeeeeeeeeeeiiiiiooooooooooooooooouuuuuuuuuuuyyyyyAAAAAAAAAAAAAAAAADEEEEEEEEEEEIIIIIOOOOOOOOOOOOOOOOOUUUUUUUUUUUYYYYY-";
@cuongdev
cuongdev / Big number in linked list
Created June 11, 2016 17:43
Big number in linked list C++
#include <iostream>
#include <string.h>
using namespace std;
struct NODE
{
int data;
NODE *pNext, *pPred;
}; typedef struct NODE NODE;
@cuongdev
cuongdev / node-folder-structure-options.md
Created December 27, 2016 02:10 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
/**
* Tính cosine similarity two vector using UJMP lib
*
* @param m1
* @param m2
* @return
*/
public static double getCosineSimilartiy(double[] m1, double[] m2) {
double aiSum = 0;
double a2Sum = 0;
{
"type": "FeatureCollection",
"geometries": [
{
"type": "MultiPolygon",
"coordinates": [
[
[
[
106.356770999999995,
id,name
1,Charlie Sheen
2,Michael Douglas
3,Martin Sheen
4,Morgan Freeman
5,Charlie Sheen
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
[
{
"_id": "5db87aff0f077c68f586e73e",
"longitude": 106.64445495605469,
"latitude": 10.749702453613281
},
{
"_id": "5db87aff0f077c68f586e73d",
"longitude": 106.72650146484375,
"latitude": 10.752511024475098
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
</head>
<body>
<div id="cus-info">
<div>