Tự ôn tập phỏng vấn về lập trình (Coding Interview University)
https://github.com/jwasham/coding-interview-university/blob/master/translations/README-vi.md
Tree to List in JavaScript
https://danmartensen.svbtle.com/converting-a-tree-to-a-list-in-javascript
function convertTreeToList(root) {
var stack = [], array = [], hashMap = {};
stack.push(root);
while(stack.length !== 0) {
var node = stack.pop();
if(node.children === null) {
visitNode(node, hashMap, array);
} else {
for(var i = node.children.length - 1; i >= 0; i--) {
stack.push(node.children[i]);
}
}
}
return array;
}
function visitNode(node, hashMap, array) {
if(!hashMap[node.data]) {
hashMap[node.data] = true;
array.push(node);
}
}
var tree = {
"data": null,
"children": [
{
"data": "A",
"children": null
},
{
"data": "B",
"children": null
},
{
"data": null,
"children": [
{
"data": "C",
"children": null
},
{
"data": "D",
"children": null
},
{
"data": "A",
"children": null
}
]
}
]
}
// intial tree has leaf nodes A, B, C, D, A
console.log(tree);
// do conversion
var array = convertTreeToList(tree);
// converts to list of A, B, C, D
// removes duplicates and preserves order
console.log(array);
JavaScript Type Checking
https://danmartensen.svbtle.com/type-checking-techniques-in-javascript-part-1
https://danmartensen.svbtle.com/type-checking-techniques-in-javascript-part-2
Map, Filter & Reduce
https://code.tutsplus.com/tutorials/how-to-use-map-filter-reduce-in-javascript--cms-26209
http://cryto.net/~joepie91/blog/2015/05/04/functional-programming-in-javascript-map-filter-reduce/
https://danmartensen.svbtle.com/javascripts-map-reduce-and-filter
var tasks = [
{
'name' : 'Write for Envato Tuts+',
'duration' : 120
},
{
'name' : 'Work out',
'duration' : 60
},
{
'name' : 'Procrastinate on Duolingo',
'duration' : 240
}
];
var task_names = [];
for (var i = 0, max = tasks.length; i < max; i += 1) {
task_names.push(tasks[i].name);
}
var task_names = [];
tasks.forEach(function (task) {
task_names.push(task.name);
});
var task_names = tasks.map(function (task, index, array) {
return task.name;
});
var task_names = tasks.map((task) => task.name );
----------
var map = function (array, callback) {
var new_array = [];
array.forEach(function (element, index, array) {
new_array.push(callback(element));
});
return new_array;
};
var task_names = map(tasks, function (task) {
return task.name;
});
Cache
http://johnnycoder.com/blog/2008/12/10/c-cache-helper-class/
Chrome tools
https://viblo.asia/p/mot-so-chrome-extensions-huu-ich-danh-cho-viec-test-web-apps-GrLZD9vElk0
https://viblo.asia/p/top-chrome-extensions-danh-cho-viec-test-web-apps-ZjlvawjneqJ
Paging HTML using JavaScript
http://dotnet-munesh.blogspot.in/2016/08/paging-in-html-table-using-javascript.html
JavaScript frameworks
All the C# versions
http://dotnetcrunch.com/list-of-c-new-features-by-version/
Exception
- Syntactical Error
- Compilation Error
- Runtime Error
- Argument Exception
- ArgumentNullException
- ArithmeticException
- IndexOutOfRange
- NullReferenceException
- InSufficientException
- and others
Object-oriented Programming in C# for C and Java programmers
http://people.cs.aau.dk/~normark/oop-csharp/html/notes/theme-index.html
The System.Collections namespace includes following non-generic collections.
- ArrayList
- SortedList
- Hashtable
- BitArray
- Stack
- Queue
Read more http://dotnetcrunch.com/what-are-non-generic-collections-in-c/
The System.Collections.Genrics namespace includes following generic collections.
- List<T>
- SortedList<TKey, TValue>
- Hashset<T>
- Dictionary<Tkey, TValue>
- Stack<T>
- Queue<T>
Read more http://dotnetcrunch.com/generic-collections-c-example/
Differences between cookies and sessions?
http://www.devshed.com/c/a/PHP/Sessions-and-Cookies/
Sessions are server-side files that contain user information, while Cookies are client-side files that contain user information. Sessions have a unique identifier that maps them to specific users. This identifier can be passed in the URL or saved into a session cookie.
Most modern sites use the second approach, saving the identifier in a Cookie instead of passing it in a URL (which poses a security risk). You are probably using this approach without knowing it, and by deleting the cookies you effectively erase their matching sessions as you remove the unique session identifier contained in the cookies.
Cookies và một số vấn đề bảo mật
https://whitehat.vn/threads/web12-http-cookie-va-mot-so-van-de-bao-mat-phan-1.1948/
Cookies và Session trong ASP.NET
https://anhthienad.com/blog/so-sanh-cookie-va-session-trong-asp-net.html
- Địa chỉ URL của website mà trình duyệt nhận cookie
- Thời gian tồn tại của Cookie
- Giá trị lưu trữ
Cookies trong ASP.NET
- Name: Tên Cookie.
- Domain: Tên miền của Cookie lưu trữ.
- Expires: Xác định thời gian hiệu lực của Cookie.
- Value: Giá trị của Cookie.
- HasKeys: Cho biết Cookie có tập giá trị con hay không.
- Values: Tập các giá trị của Cookie.