This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2004-2010 Castle Project - http://www.castleproject.org/ | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file: file input control e.g. $("#file")[0] | |
function getFileSize(file) | |
{ | |
if (0 === file.value.length) | |
return 0; | |
// Non-IE browsers | |
if (file.files) | |
{ | |
if (file.files.length > 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET CurrentDate=%%L%%J%%K |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cmd = "MSBuild"; | |
var sourcePath = "C:\\Store.Web\\"; | |
var profile = "Release"; | |
var buildPath = "C:\\Build"; | |
// Temporary folder must ends with slash. | |
var tempPath = buildPath + "\\Temp\\"; | |
var outputPath = buildPath + "\\Output\\Store.zip"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Vietnamese localization for the jQuery UI date picker plugin. */ | |
/* Written by Tien Do ([email protected]) */ | |
jQuery(function ($) | |
{ | |
$.datepicker.regional["vi-VN"] = | |
{ | |
closeText: "Đóng", | |
prevText: "Trước", | |
nextText: "Sau", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<style> | |
.parent { | |
width: 600px; | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
background-color: yellow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://notes.ericwillis.com/2009/11/pixelate-an-image-with-csharp/ | |
private static Bitmap Pixelate(Bitmap image, Rectangle rectangle, Int32 pixelateSize) | |
{ | |
Bitmap pixelated = new System.Drawing.Bitmap(image.Width, image.Height); | |
// make an exact copy of the bitmap provided | |
using (Graphics graphics = System.Drawing.Graphics.FromImage(pixelated)) | |
graphics.DrawImage(image, new System.Drawing.Rectangle(0, 0, image.Width, image.Height), | |
new Rectangle(0, 0, image.Width, image.Height), GraphicsUnit.Pixel); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author: Tien Do | |
(function ($) { | |
$.fn.redify = function(options) { | |
// Extend our default options with those provided. | |
// Note that the first argument to extend is an empty | |
// object – this is to keep from overriding our "defaults" object. | |
var settings = $.extend({}, $.fn.redify.defaults, options); | |
return this.css({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I saw a sample code like this, but don't do it. | |
function() { | |
var selectId = "mySelectList"; | |
try { | |
var options = document.getElementById(selectId).options; | |
for (var i = 0;i < options.length;i++){ | |
if(options[i].selected) { | |
return options[i].value; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Dealing with long words in CSS | |
https://justmarkup.com/log/2015/07/31/dealing-with-long-words-in-css */ | |
.hyphenate { | |
overflow-wrap: break-word; | |
word-wrap: break-word; | |
-webkit-hyphens: auto; | |
-ms-hyphens: auto; | |
-moz-hyphens: auto; | |
hyphens: auto; |
OlderNewer