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
// kendo autocomplete and delete for not select item | |
$("#kendoList").kendoAutoComplete({ | |
dataTextField: "ten", | |
dataSource: dataSource, | |
placeholder: 'aaa', | |
filter: "contains", | |
select(e) { | |
var item=e.item.index(); | |
}, | |
change() { |
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
/* description: Parses end executes mathematical expressions. */ | |
/* lexical grammar */ | |
%lex | |
%% | |
\s+ /* skip whitespace */ | |
[0-9]+("."[0-9]+)?\b return 'NUMBER' | |
"*" return '*' | |
"/" return '/' |
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
//assign data to class with function | |
_.assign(new ClassWithFunction(),objectData); |
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
gulp.task('watch:replace', function () { | |
return gulp.watch(['./app/scripts/controllers/*.ts', 'app/scripts/math/*.ts'], ['replacefile']); | |
}); | |
// noi' cac' file trong cung` 1 folder lai. de? cho dep. code :) | |
gulp.task('replacefile', function() { | |
var result = ''; | |
var header = ''; | |
var folders = { | |
'_Controller': 'app/scripts/controllers', |
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
// create date time 2008-03-09 16:05:07.123 | |
DateTime dt = new DateTime(2008, 3, 9, 16, 5, 7, 123); | |
String.Format("{0:y yy yyy yyyy}", dt); // "8 08 008 2008" year | |
String.Format("{0:M MM MMM MMMM}", dt); // "3 03 Mar March" month | |
String.Format("{0:d dd ddd dddd}", dt); // "9 09 Sun Sunday" day | |
String.Format("{0:h hh H HH}", dt); // "4 04 16 16" hour 12/24 | |
String.Format("{0:m mm}", dt); // "5 05" minute | |
String.Format("{0:s ss}", dt); // "7 07" second | |
String.Format("{0:f ff fff ffff}", dt); // "1 12 123 1230" sec.fraction |
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
public class StringUtil | |
{ | |
private static readonly string[] VietnameseSigns = new string[] | |
{ | |
"aAeEoOuUiIdDyY", | |
"áàạảãâấầậẩẫăắằặẳẵ", | |
"ÁÀẠẢÃÂẤẦẬẨẪĂẮẰẶẲẴ", | |
"éèẹẻẽêếềệểễ", | |
"ÉÈẸẺẼÊẾỀỆỂỄ", | |
"óòọỏõôốồộổỗơớờợởỡ", |
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
void Main() | |
{ | |
var url="http://google.com"; | |
var startPos=url.IndexOf("chuong-")+7; | |
startPos.Dump(); | |
var endPos=url.IndexOf("-",url.IndexOf("chuong-")+7)-startPos; | |
endPos.Dump(); | |
var result=url.Substring(startPos,endPos); | |
result.Dump(); |
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
try { | |
Regex regexObj = new Regex(@"library/(\d*)", RegexOptions.Multiline); | |
resultString = regexObj.Match(subjectString).Groups[1].Value; | |
Console.WriteLine(resultString); | |
} catch (ArgumentException ex) { | |
// Syntax error in the regular expression | |
Console.WriteLine(ex.StackTrace); | |
} |
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
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=ContextMenu}, Path=PlacementTarget.SelectedItem}" |
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
{ | |
"name": "", | |
"version": "1.0.0", | |
"authors": [ | |
"Flatfull" | |
], | |
"description": "", | |
"keywords": [ | |
"AngularJS", | |
"admin", |