Use set operators in powershell like sql

Posted by on 21:52 in code | 1 comment

In Powershell there are no set operators like union, Except, Intersection by default. Set operators are used in sql like inner-join, union etc. You could use these operator for example to find out which certificates exist on server A but not B or to find what data is new in a huge csv file compared with the previous on. I will show you in a few articles a simple way to this good performance with some help from linq in CSharp and using the set operators that you can use on dictionaries. What common set operators are there? Union Intersect...

read more

Angular JS Controller error Argument is not a function

Posted by on 06:25 in code | 15 comments

Broken Control error in Angular Today I got an error of several hello world todo examples in AngularJS when I tryed new 1.3 version. Error like: Error: [ng:areq] Argument 'sarcCntrl' is not a function, got undefinedError: [ng:areq] Argument 'sarcCntrl' is not a function, got undefined Prevent bad habits It seems that they have broken the api. See my working example: See the broken example: See my fix of the broken example:...

read more

Vas-Stickan simple Xamarin App

Posted by on 17:47 in code | 0 comments

Xmarin Crossplattform slider I have started to write a crossplattform app with Xamarin for ios, windows and Android devices. I started using Xamarin a year ago. But did not get anywhere. I restarted now and decided to make a Hello world applikation in the form of a slider. This slider can be used to give a level of much pain you have. IRL they are used by nurses and doctors when asking patients: Show us on this stick how much pain you have on a scale between 0 and 10. Screenshot of iPad emulator on Mac Code is here:...

read more

Hello Bing Translator

Posted by on 17:57 in code | 0 comments

I am learning how to use the Bing translator via the Azure marketplace. Describes a console application that uses bing translation rest api. There are many rites where you have to register with microsoft to get keys. More will come…

read more

shorinji kempo notes

Posted by on 09:45 in Uncategorized | 2 comments

The new Shorinji Kempo Stockholm Södra youtube film The new Shorinji Kempo Stockholm Södra youtube film is on youtube now Preparation notes for my classes Lesson 18 Explore Ten’o ken Lesson 17 You need a sidekick. Lesson 16 Three principles in the wrist. Lesson 15 Copy the Embu and then leave it. Lesson 14 Dirty Go Ju ittai. Lesson 13 Explore Sango-Ken Branch of Shorinji Kempo tecniques. Lesson 12 How to train Kempo. Set goal. Explore branches of tree Lesson 11. Principle of Shorinji Kempo. Teko no ri, Kuruma no ri, Hazumi no ri Lesson...

read more

Hello World Rhino ETL

Posted by on 21:26 in code | 5 comments

Rhino-Etl is an Opensource framework for doing Extract Transform and Load of data (ETL) in C#. There are other commercial ETL products that can do this as well. I have mostly used Microsofts SSIS. It is easy to get started with SSIS and it has good performance. But in my humble opinion is it hard to keep track of the changes in the SSIS projects. All logical rules of the transformation of the data dissapperas in a forrest of boxes and lines that has to be clicked on. SSIS marriage to code repositories resemble the marriage Tom & Kate...

read more

My chinese javascript sorting plugin is added to the datatables jQuery component on GitHub

Posted by on 13:49 in Uncategorized | 1 comment

Allan Jardine accepted the pull request I did. See here Yipee I am a contributor. On Github I first made fork on the plug-in repository. That copied it all to my GitHub repository. After that I made a local repository with GithHub for windows. The first thing I did was a branch on my local repository called chinese-sorting. I saw on youtube that this was the way that Linus Torvald wanted it to be done. I slowly did my development and testing on the branch. To check from time to time if...

read more

ClosedXML det enkla sättet att exportera till Excel

Posted by on 11:31 in code | 8 comments

I flera projekt har jag använt ClosedXML för att spara i Excelformat. Kan verkligen rekommendera den. Den förenklar OpenXML formatet betydligt. För ett exempel. Gå till den här demositen och klicka på Excel så laddas data som man ser till Excel. Lagerhantering. ClosedXML finns att hämta ned via Nuget eller codeplex. Det är bara att skriva: Install-Package ClosedXML i packet manager consolen så installeras det i Viual Studio projektet. Nedan är ett exempel. Ett Proof of concept. Där jag ska exportera data (olika fonders statiska data) till...

read more

Powershell run sql scripts

Posted by on 21:33 in code | 0 comments

In my work today I have to run many sql scripts that other have written. We are talking 100 of them. They are configurations, T-SQL code changes, moving data, patches from developers. They can be in nested directories. Some times some of them fail for different reason. I have used Powershell for this. But decided now to try to refine the script and also make it easier for others to run the script. You call the script in its simplest form by .\run-sql.ps1 .\run-sql.ps1 it will then prompt you for the path where the T-SQL script folder is. It...

read more

排序中国汉字字符 javascript – Datatables – jQuery

Posted by on 21:45 in code | 3 comments

为了学习为jQuery 的 组件数据表写插件 ,我为其做了一个专门的网站 。您可以尝试为不同的术语排序。我打算解释中国字符的排序,并告诉大家我的排序方法和在此期间遇到的麻烦。 我遇到的第一个问题是,我认为三是在二之后出现的。我曾经深信这是一个错误。但通过仔细思考之后,我意识到数字3三的部首里的笔画数少于二的部首数量,二的部首里有两个笔画。 今天,在JavaScript只有少许的几行代码 。诀窍是使用 localCompare ( 参考 )。然而众所周知这一功能在不同的网页浏览器存在这问题。DataTables 的作者Allan Jardine给我指出了这一点。我会在我的博客上进一步探索看是否给汉字排序带来问题。 $.fn.dataTableExt.oSort['chinese-string-asc'] = function (s1, s2) { return s1.localeCompare(s2); }; $.fn.dataTableExt.oSort['chinese-string-desc'] = function (s1,...

read more