This file contains hidden or 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
| select TOP 200 | |
| MD.Id mId | |
| ,MD.Code Metadata | |
| ,L.Name Lang | |
| ,S.Id sId | |
| ,S.LabelCode Snippet | |
| ,T.Text | |
| from [dbo].[BaseTranslation] T |
This file contains hidden or 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
| $('.k-focusable').find('td').each(function(ind,elt) {var t,h,mm; if((t = elt.innerText).match(/^\d+:\d\d$/)) { h = t.split(':')[0], mm = t.split(':')[1]; mm = Math.round((mm/6.0)*10); elt.innerText = h + ',' + (mm<10 ? '0':'') + mm } }) |
This file contains hidden or 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
| ## Image optimization | |
| ## Dependencies: | |
| ## * optipng http://optipng.sourceforge.net/ | |
| ## * jpegtran http://jpegclub.org/jpegtran/ | |
| # JPEG | |
| $files = ls -Name -Recurse -Include("*.jpg", "*.jpeg") | |
| $i = 0 | |
| foreach ($f in $files) { | |
| echo "Optimizing file: $f" |
This file contains hidden or 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
| // LinqPad test | |
| void Main() | |
| { | |
| int testNum = 1000, length = 32; | |
| int testRun = 0; | |
| while (testNum-- > 0) | |
| { | |
| string testString = GetRandomString(length); | |
| if (testString.All(c => ((int)c >= 32 && (int)c <= 32+94))) | |
| ++testRun; |
This file contains hidden or 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
| # Script creates local git repository linked with bare "remote" copy in dropbox directory, | |
| # so you gain cloud backups ater pushing changes. | |
| # Add following function to you PS Profile (don't forget to restart the shell) | |
| #----------------------------------------------------------------- | |
| # Git-Init | |
| #----------------------------------------------------------------- | |
| $boxRepoPath = '{PATH_TO_DROPBOX_DIR where repos will be stored}' | |
| function Git-Init($repoName $(throw "Parameter repoName is required.")) { # run inside directory where you want working copy to put |
This file contains hidden or 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
| # | |
| # DEPENDENCIES | |
| # ------------ | |
| # * coffee-script (npm install -g coffee-script) | |
| # * jasmine-node (npm install -g jasmine-node) | |
| # | |
| # Test directories structure: | |
| # --------------------------- | |
| # . [ROOT] | |
| # - src |
This file contains hidden or 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 string Octal(int n) { | |
| if (n < 0) return "-" + Octal(-n); | |
| if (n < 8) return n.ToString(); | |
| var s = new StringBuilder(); | |
| while (n > 0) { | |
| s.Append(n % 8); | |
| n /= 8; | |
| } | |
This file contains hidden or 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 padleft = function(number, count, abs, padChar) { | |
| count--; | |
| if (count < 0) count = 0; | |
| var str = ''; | |
| if (number < 0) { number = -number; str += '-'; } else str += '+'; | |
| if (abs) str = ''; | |
| if (!padChar) padChar = '0'; | |
| var mltp = 10; | |
| while (count > 0) { |
This file contains hidden or 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
| ## TODO: Add header, licence ... | |
| # Missing parts: | |
| # * Error handlig | |
| # * User friendly configuration and customization | |
| # * Usage info | |
| # ===== Configuration ==== # | |
| $SVNCMD = "C:\Program Files\TortoiseSVN\bin\svn.exe" | |
| $BUILDTOOL = "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" | |
This file contains hidden or 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: | |
| -- Print rows count for every table in given database | |
| DECLARE | |
| @Report_type smallint = 1; -- set 0 for 'ALL_TABLES', 1 for non-empty tables | |
| DECLARE | |
| @database varchar(128) = 'UsageAndHealthDB', | |
| @tbl_name varchar(128), | |
| @tbl_cnt int = 0, |
OlderNewer