<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-33256684</id><updated>2026-08-21T05:30:19.016-04:00</updated><category term="API"/><category term="Azure"/><category term="Microsoft SQL"/><category term="SQL"/><category term="DDD"/><category term="Domain Driven Design"/><title type='text'>Caffeinated Wisdom</title><subtitle type='html'>A blog about real-world software engineering and development problems and solutions.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>131</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-33256684.post-6672138853269921311</id><published>2025-12-22T21:17:00.000-05:00</published><updated>2025-12-22T21:17:24.962-05:00</updated><title type='text'>How to embed PowerFX in NET app</title><content type='html'>&lt;h1&gt;How to embed PowerFX in a .NET Application&lt;/h1&gt;&lt;p&gt;PowerFX is a language from Microsoft aimed at power users. Writing PowerFX feels like Excel formulas, and one of the building blocks of PowerFX is actually “formulas” that are reactive to other formulas. Microsoft uses PowerFX mainly as the low code language for the PowerApps offering. &lt;/p&gt;&lt;p&gt;A few years ago, Microsoft open sourced PowerFX with the goal of letting others take advantage of the power and simplicity of the language. The main repo is located at &lt;a href=&quot;https://github.com/microsoft/Power-Fx&quot;&gt;https://github.com/microsoft/Power-Fx&lt;/a&gt; . The repo contains a link nice introductory video about the what, why and how of PowerFX (&lt;a href=&quot;https://www.youtube-nocookie.com/embed/ik6k89WNjuk&quot;&gt;https://www.youtube-nocookie.com/embed/ik6k89WNjuk&lt;/a&gt; ).&lt;/p&gt;&lt;p&gt;If you are a .NET developer, you too can take advantage of the power and simplicity of PowerFX by embedding a .NET PowerFX Interpreter created by Microsoft. One use case for embedding PowerFX in a .NET app is to allow Business Users to define Business Rules in PowerFX and then integrate them into your app. This allows the Business users to maintain the rules while you maintain the hosting app. &lt;/p&gt;&lt;p&gt;To use the interpreter:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Add the &lt;strong&gt;Microsoft.PowerFx.Interpreter&lt;/strong&gt;  NuGet to your project ( &lt;a href=&quot;https://www.nuget.org/packages/Microsoft.PowerFx.Interpreter&quot;&gt;https://www.nuget.org/packages/Microsoft.PowerFx.Interpreter&lt;/a&gt; )&lt;/li&gt;&lt;li&gt;Instantiate an object of type &lt;strong&gt;RecalcEngine.&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Add formulas by passing the formula as a string to the&lt;strong&gt; SetFormula &lt;/strong&gt;method of&lt;strong&gt; RecalcEngine.&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Notice that adding Formulas does not execute them. To make the engine execute the formulas, call RecalcEngine’s Eval (or EvalAsync) method, passing a string representing the expression to execute. The expression can reference formulas added with &lt;strong&gt;SetFormula.&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Here is the &lt;a href=&quot;https://github.com/TheJuanitoLearnsShow/PuppyWorkbooks/blob/a477193ea2e1b8c6519f2bb76363a4ef9530a14d/src/PuppyWorkbooks/5-Presentation/MinimalInterpreterExamples/Program.cs&quot;&gt;minimal C# example&lt;/a&gt;:&lt;/p&gt;&lt;p&gt;using Microsoft.PowerFx;&lt;br /&gt;using Microsoft.PowerFx.Types;&lt;br /&gt;&lt;br /&gt;var engine = new RecalcEngine();&lt;br /&gt;&lt;em&gt;// notice the escaped quotes as we are passing a PowerFX string literal. Our second parameter needs to be &lt;br /&gt;//  a valid PowerFX expression.&lt;br /&gt;&lt;/em&gt;engine.SetFormula(&quot;MyName&quot;, &quot;\&quot;Juanito\&quot;&quot;, OnFormulaUpdate); &lt;br /&gt;engine.SetFormula(&quot;Greeting&quot;, &quot;\&quot;Hello, \&quot; &amp;amp; MyName &amp;amp; \&quot;!\&quot;&quot;, OnFormulaUpdate);&lt;br /&gt;var greetingResult = engine.Eval(&quot;Greeting&quot;);&lt;br /&gt;Console.WriteLine(greetingResult.ToObject());&lt;br /&gt;return;&lt;br /&gt;&lt;br /&gt;void OnFormulaUpdate(string arg1, FormulaValue arg2)&lt;br /&gt;{&lt;br /&gt;    &lt;em&gt;// this method is called whenever the formula is evaluated by the engine&lt;br /&gt;&lt;/em&gt;}&lt;/p&gt;&lt;p&gt;I have been working on a new app ( &lt;a href=&quot;https://github.com/TheJuanitoLearnsShow/PuppyWorkbooks&quot;&gt;https://github.com/TheJuanitoLearnsShow/PuppyWorkbooks&lt;/a&gt;  ) that allows users to maintain an executable workbook containing PowerFX formulas. The app and its tests provide examples of how to use the interpreter. The repo has examples of how to create your own PowerFX function to be used by PowerFX expressions, a future post will cover the steps on how to accomplish that.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/6672138853269921311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/6672138853269921311' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/6672138853269921311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/6672138853269921311'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2025/12/how-to-embed-powerfx-in-net-app.html' title='How to embed PowerFX in NET app'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-5858552431727359918</id><published>2025-12-10T22:51:19.704-05:00</published><updated>2025-12-10T22:51:19.704-05:00</updated><title type='text'>How to read build variables in Source Generators</title><content type='html'>&lt;h1&gt;How to read build variables in Source Generators&lt;/h1&gt;&lt;p&gt;I used GitHub copilot to help me create a source generator that reads the schema of a database and generates C# ADO.net code that can call SQL Stored Procedures, Views and Functions in that database (&lt;a href=&quot;https://github.com/TheJuanitoLearnsShow/Puppy.Ado.SourceGenerator&quot;&gt;https://github.com/TheJuanitoLearnsShow/Puppy.Ado.SourceGenerator&lt;/a&gt;). The connection string to the database is set on a build variable in the consuming csproj file. The problem is that copilot missed the step described in &lt;a href=&quot;https://github.com/dotnet/roslyn/blob/main/docs/features/incremental-generators.cookbook.md#consume-msbuild-properties-and-metadata&quot;&gt;Microsoft’s Source Generator Cookbook&lt;/a&gt; . The missing step is to add a &lt;strong&gt;CompilerVisibleProperty &lt;/strong&gt;element to an ItemGroup for each of the build variables you want the source generator to use.&lt;/p&gt;&lt;p&gt;For example, my source generator uses two build variables: DbGen_EnableLiveSchema and DbGen_ConnectionString, so they are defined in the &lt;strong&gt;PropertyGroup&lt;/strong&gt; element in the consuming csproj file:&lt;/p&gt;&lt;pre&gt;&amp;lt;DbGen_EnableLiveSchema&amp;gt;true&amp;lt;/DbGen_EnableLiveSchema&amp;gt;&lt;br /&gt;&amp;lt;DbGen_ConnectionString&amp;gt;Data Source=.\sqlExpress;Database=AutomatedTESTS_AdoGenerator_SampleDb;Integrated Security=True;TrustServerCertificate=True;&amp;lt;/DbGen_ConnectionString&amp;gt;&lt;/pre&gt;&lt;p&gt;In addition to the above, I have to add the corresponding CompilerVisibleProperty elements in that same csproj file to allow the source generator to read those variables via the AnalyzerConfigOptionsProvider’s GlobalOptions dictionary:&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;ItemGroup&amp;gt;&lt;br /&gt;    &amp;lt;CompilerVisibleProperty Include=&quot;DbGen_EnableLiveSchema&quot; /&amp;gt;&lt;br /&gt;    &amp;lt;CompilerVisibleProperty Include=&quot;DbGen_ConnectionString&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/ItemGroup&amp;gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;C# code reading the variables:&lt;/strong&gt;&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;    var options = context.AnalyzerConfigOptionsProvider.Select(&lt;br /&gt;        (p, _) =&amp;gt; new GeneratorOptions(p));
…
public GeneratorOptions(AnalyzerConfigOptionsProvider provider)&lt;br /&gt;{&lt;br /&gt;    var global = provider.GlobalOptions;&lt;br /&gt;    global.TryGetValue(&quot;build_property.DbGen_EnableLiveSchema&quot;, out var enable);&lt;br /&gt;    global.TryGetValue(&quot;build_property.DbGen_ConnectionString&quot;, out var conn);&lt;br /&gt;    EnableLiveSchema = bool.TryParse(enable, out var b) &amp;amp;&amp;amp; b;&lt;br /&gt;    ConnectionString = conn;&lt;br /&gt;}&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/5858552431727359918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/5858552431727359918' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/5858552431727359918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/5858552431727359918'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2025/12/how-to-read-build-variables-in-source.html' title='How to read build variables in Source Generators'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-2801328665433808590</id><published>2025-11-05T21:45:00.000-05:00</published><updated>2025-11-05T21:45:47.177-05:00</updated><title type='text'>APIM requests not showing downstream requests in application</title><content type='html'>&lt;h1&gt;APIM requests not showing downstream requests in application insights&lt;/h1&gt;&lt;p&gt;In Application Insights, if you are not seeing the telemetry for the backend service being called by APIM, it could be you have the wrong type of correlation type option set under that API’s settings in APIM. The correct setting, for newer web apps that use the latest open telemetry or application insights nugets should be &lt;strong&gt;W3C&lt;/strong&gt;. The default value is &lt;strong&gt;Legacy&lt;/strong&gt; so you will need to change it to &lt;strong&gt;W3C.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjtSBDMNR96E5fhERNICuAkxDHqFAASf_FnNoJuRJSLvFGRBK709NiOxFAZ8Fscu8wHhJ0_ER35_bTgAj6s0ajA8lexhocplXocxbCUcr6WMvxtWivo1ECYwkhFF-s0hwuOEe7L_ea94Qcs1TiBNh2sTGAxhnosfWV9X_9Lct01QTKWqLwDCOs5IQ&quot; /&gt;&lt;/p&gt;&lt;p&gt;Without that correlation, the appropriate headers will not be included in the request to the backend service from APIM and the two parts of the request would appear as separate flows inside Application Insights.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/2801328665433808590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/2801328665433808590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/2801328665433808590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/2801328665433808590'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2025/11/apim-requests-not-showing-downstream.html' title='APIM requests not showing downstream requests in application'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEjtSBDMNR96E5fhERNICuAkxDHqFAASf_FnNoJuRJSLvFGRBK709NiOxFAZ8Fscu8wHhJ0_ER35_bTgAj6s0ajA8lexhocplXocxbCUcr6WMvxtWivo1ECYwkhFF-s0hwuOEe7L_ea94Qcs1TiBNh2sTGAxhnosfWV9X_9Lct01QTKWqLwDCOs5IQ=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-3038019605995352228</id><published>2023-06-28T21:06:00.005-04:00</published><updated>2023-06-28T21:06:56.905-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="API"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="DDD"/><category scheme="http://www.blogger.com/atom/ns#" term="Domain Driven Design"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Expose SQL Logic as APIs - Domain Driven Design in SQL</title><content type='html'>&lt;p&gt;Most Domain Driven Design articles and books teach you to develop your business logic in such a way that there is no trace of a database or other dependency that would make your business logic (also known as Core code or Domain Logic) impure. That is great advice if you are developing your core business logic in a programming language that is &lt;em&gt;not SQL&lt;/em&gt;. But what if all you know if SQL or SQL is your strong skill? The answer is yes, you can develop your domain logic in SQL in a domain driven way, if you try to adhere to the spirit of the DDD concepts.&lt;/p&gt;&lt;h2&gt;Objects or Tables?&lt;/h2&gt;&lt;p&gt;One of the main arguments for developing Domain Logic in Object-Oriented languages is that “real” world things are objects and thus is easier to model those real-world things in classes. But if you are in an organization and you start talking to Business Units about the logic they need, you would find that the concept of “spread sheets” are actually very familiar to them. It is so familiar, that countless of Business Units across history have tried to solve their problems but modeling their logic in Excel Spreadsheets. Thus, rationalizing the problem domain at hand in terms of tables (a.k.a. spreadsheets) is not very far of how a businessperson thinks day to day when solving their problems.&lt;/p&gt;&lt;p&gt;It might even make your domain easier to explain to a Business Unit.&lt;/p&gt;&lt;h2&gt;SQL features friendly to DDD&lt;/h2&gt;&lt;p&gt;Beyond tables, SQL allows us to also model &lt;strong&gt;relationships&lt;/strong&gt;. Relationships are an important Business concept as “things” in Businesses do not exist in a vacuum. &lt;/p&gt;&lt;p&gt;Most SQL variants (such as T-SQL) also allows us to avoid &lt;a href=&quot;https://blog.ploeh.dk/2015/01/19/from-primitive-obsession-to-domain-modelling/&quot;&gt;Primitive Obsession&lt;/a&gt; via custom types that we can define to model Business values. For example, instead of using &lt;strong&gt;varchar(50)&lt;/strong&gt; we can define a custom type &lt;strong&gt;VendorName&lt;/strong&gt; and use it in our tables and stored procedures to make clear the value represents a Vendor’s name not just a random varchar with max length of 50 characters.&lt;/p&gt;&lt;p&gt;Another tool that SQL provides to ensure our domain modeling is enforced, is the use of &lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/create-check-constraints?view=sql-server-ver16&quot;&gt;check constraints.&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Granted, a lot of the features we discussed are also found in OOO languages, but the point is that SQL &lt;em&gt;also&lt;/em&gt; offers them.&lt;/p&gt;&lt;h2&gt;One database, one Bounded Context&lt;/h2&gt;&lt;p&gt;One popular advice in the Micro Services realm is that each Micro Service needs its own database that one that service can access. What if the &lt;em&gt;database itself&lt;/em&gt; is the service? And if we follow another popular opinion that a service should implement only one DDD Bounded Context (&lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/ddd-oriented-microservice&quot;&gt;Designing a DDD-oriented microservice | Microsoft Learn&lt;/a&gt;) , then it follows our database should only model one Bounded Context.&lt;/p&gt;&lt;p&gt;Does it mean we expose everything in the db as a service? No, instead we should have at least two schemas (or the equivalent of a MS SQL schema in other RDBMS systems): &lt;/p&gt;&lt;ul&gt;&lt;li&gt;One schema that acts as our internal implementation that we can change at will (much like the &lt;em&gt;private&lt;/em&gt; members and classes in typical programming languages).&lt;/li&gt;&lt;li&gt;And another schema that acts as our contract to the callers outside our database. This schema serves the purpose of the &lt;em&gt;public &lt;/em&gt;members/types in other programming languages.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;This collection of Stored Procs, types and Views that compose your “public contract” schema &lt;b&gt;should not change much&lt;/b&gt; as it is what you are agreeing the callers can expect to interact with when working with the logic and data in your database. This will free you to make any changes you need to your objects in your internal schema because you know that as long as your public API schema is complying with the contracts established, your callers will not break.&lt;br /&gt;&lt;h2&gt;Less Risky Deployments&lt;/h2&gt;&lt;p&gt;One argument against database deployment is that they are risky. And sometimes they are because the databases that are being deployed are big in the sense that are trying to model multiple bounded contexts and thus the risk is that one thing can break another seemingly unrelated thing.&lt;/p&gt;&lt;p&gt;But the same is true if you are going to deploy a large application, if the application is one single unit of deployment. And just like the solution for reducing the risk of deployments in applications is to try to break the application into smaller, independent parts, we can mitigate this risk in the database world by limiting the database to modeling only one Bounded Context.&lt;/p&gt;&lt;p&gt;There are also ways to automate the deployments of the changes from a Repo, just like other programming languages have. &lt;/p&gt;&lt;h2&gt;Breaking Schema Changes&lt;/h2&gt;&lt;p&gt;Some of you might be wondering: what about breaking changes? And that question might come to mind because you might have experience in the past a painful task of a database change that broke something. The question is how do other programming languages deal with breaking changes? The answer for them also applies to SQL: a versioning strategy. &lt;/p&gt;&lt;p&gt;For example in C#, there are three types of changes to a class: removal of members, changing types or names of members and addition of members. Additions usually do not break things, but changes and removals do. And although is OK in C# to do those destructive changes in the internal implementation of your service, you better not break your public classes that define your public contract. And if you do, the most common solution is to version the library or the classes themselves.&lt;/p&gt;&lt;p&gt;A similar solution can be applied to SQL. Your objects in your “private” schema can have destructive schema changes as long as your do not violate your public contract. As for data loss, if a change would incur data loss and the data needs to be retained, it could retained in a table whose purpose is to archive that data or to have a separate database whose mission is to keep an archive version of that data. It all depends on the requirements of the business for that data that would be lost. As for changes to your public contract, just like in services implemented in other languages, you would have to adopt a versioning strategy with either having a separate stored proc for older versions or a separate db altogether. It all comes down to what makes more sense for the specific situation.&lt;/p&gt;&lt;h2&gt;Unit Testing&lt;/h2&gt;&lt;p&gt;Although not as polished as other languages, there are ways to create quick unit tests in SQL and have them run by a tool or command in the CI/CD pipeline. &lt;strong&gt;But if you touch the db then is not a unit test anymore! &lt;/strong&gt;Well, technically, even though your unit tests might involve temporarily storing data into tables, your test are still self-contained in transactions. And they might not run as fast as their .NET counterparts, but they would be fast enough to give you a good test dev loop.&lt;/p&gt;&lt;p&gt;To get started with unit testing, you can start simple, by having a schema for Test objects. Then define in that schema your Stored procs that will implement the test. Inside those procedures, you can do the typical &lt;a href=&quot;https://learn.microsoft.com/en-us/visualstudio/test/unit-test-basics?view=vs-2022&quot;&gt;Arrange, Act, Assert&lt;/a&gt; steps for the test and wrap them in a transaction to isolate the test. To run the test, just run the stored proc.&lt;/p&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;p&gt;In a future post and video, we will try to show an example of a database that follows the above advice.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/3038019605995352228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/3038019605995352228' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/3038019605995352228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/3038019605995352228'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2023/06/expose-sql-logic-as-apis-domain-driven.html' title='Expose SQL Logic as APIs - Domain Driven Design in SQL'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-1556124848462156038</id><published>2023-06-26T21:49:00.003-04:00</published><updated>2023-06-26T21:49:28.593-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="API"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Expose SQL Logic as APIs</title><content type='html'>&lt;p&gt;HTTP-based APIs have become a very popular way of exposing functionality to external entities outside an organization. For example, in order to support certain features of their products, some Vendors require integrating with your data real-time by calling HTTP APIs to get the information they need. Or maybe you have a very tech-savy customer that would like to get their data via APIs your organization exposes.&lt;/p&gt;&lt;p&gt;Typically, a Development Team spins up those APIs using programming languages and platforms such as .NET and Java. But what if your organization only has Microsoft SQL developers? In this series of posts, I would like to propose that they are able to encapsulate the needed logic into T-SQL stored procedures and/or views without the need of the work of a typical development team. This is great for those “multiple hats” DBAs who might not be strong enough in regular languages, but with good enough skills to do some basic managing in Azure.&lt;/p&gt;&lt;p&gt;Here is an overview of the process:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Design/Develop your database to address the use case&lt;/strong&gt;. Follow Domain Driven Design guidelines in SQL as if it were a regular programming language by using separate schemas for public and private objects and keeping logic and db limited to one Bounded Context.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Publish your database to a SQL server that can be accessed by Azure&lt;/strong&gt;. This could be an Azure SQL db, managed instance, Azure VM or an on-prem SQL db (if you have Network connectivity between Azure and your on-prem data center).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Build the HTTP-triggered Logic app&lt;/strong&gt;. Logic Apps can be built using a graphical interface, no need for code except for some formulas. This logic app will need to call your SQL server. There are many safe ways to authenticate the Logic App with your SQL server. The logic app will take care of transforming the data from the Stored Procedures/Views&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expose the Logic App via Azure APIM&lt;/strong&gt;. This product will also allow you to add extra features to your API such as rate-limiting, subscription keys, analytics without code except for some XML and JSON (JSON for defining your OpenAPI schema).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Implement security in layers&lt;/strong&gt;, by:&lt;ol&gt;&lt;li&gt;Limiting what can access your SQL server (the logic app)&lt;/li&gt;&lt;li&gt;Limiting what can access your Logic App (the APIM)&lt;/li&gt;&lt;li&gt;Setting up OAuth Client Credentials for your consumers by using Azure AD and APIM token validation policies.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The Azure offerings mentioned in the above list have either a free or reduced cost pricing option, making this approach inexpensive. &lt;a id=&quot;_Int_AAntYpRV&quot;&gt;&lt;/a&gt;In future posts we will dig deeper into each of the items in the list. For a video series please see: &lt;a href=&quot;https://youtube.com/playlist?list=PLVObt25IiZ6gxbnlGMIDNa_iquKiBjUmo&quot;&gt;https://youtube.com/playlist?list=PLVObt25IiZ6gxbnlGMIDNa_iquKiBjUmo&lt;/a&gt; &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/1556124848462156038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/1556124848462156038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/1556124848462156038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/1556124848462156038'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2023/06/expose-sql-logic-as-apis.html' title='Expose SQL Logic as APIs'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-6187021909279447297</id><published>2023-05-19T09:05:00.002-04:00</published><updated>2023-06-26T21:48:15.838-04:00</updated><title type='text'></title><content type='html'>&lt;p&gt;How can you allow a Business User to maintain the business logic of your application? If your business users are Excel-savvy (as much business users are), then you could use Microsoft’s Graph API to access and run the logic within those Excel workbooks (&lt;a href=&quot;https://learn.microsoft.com/en-us/graph/api/resources/workbook?view=graph-rest-1.0&quot;&gt;workbook resource type - Microsoft Graph v1.0 | Microsoft Learn&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;This is not the OLE Automation of years past. We are talking about calling an HTTP based API.&lt;/p&gt;&lt;p&gt;The approach is simple, from the business user side:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Have the business users create the workbook and adjust it so that it performs the business rules it needs. They can designate some of the cells to be used as the “parameters” for the business logic. For example, given the values of cells &lt;em&gt;A2&lt;/em&gt; and &lt;em&gt;B2&lt;/em&gt;, run a series of formula calculations whose final result is in cell &lt;em&gt;B30&lt;/em&gt;.&lt;/li&gt;&lt;li&gt;Save the excel workbook in a folder in your business’ OneDrive.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Then, from your application code, make a series of HTTP calls to the MS Graph API:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Get the Auth Token&lt;/li&gt;&lt;li&gt;Call the &lt;a href=&quot;https://learn.microsoft.com/en-us/graph/api/workbook-createsession?view=graph-rest-1.0&amp;amp;tabs=http&quot;&gt;&lt;strong&gt;createSession&lt;/strong&gt;&lt;/a&gt; endpoint to create a non-persistent session. The non-persistent session will prevent changes from being saved but still allow you to get the calculated results within the session. E.g.:&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;POST &lt;a href=&quot;https://graph.microsoft.com/v1.0/me/drive/root:/sources/public/excel-as-bz-rules-sample.xlsx:/workbook/createSession&quot;&gt;https://graph.microsoft.com/v1.0/me/drive/root:/sources/public/excel-as-bz-rules-sample.xlsx:/workbook/createSession&lt;/a&gt; &lt;/p&gt;&lt;ol&gt;&lt;li&gt;Call the &lt;a href=&quot;https://learn.microsoft.com/en-us/graph/api/worksheet-update?view=graph-rest-1.0&amp;amp;tabs=http&quot;&gt;worksheets&lt;/a&gt; endpoint with a PATCH verb (make sure you pass the session id of your non-persistent session) and the values to use to update the cells your business user designated as the “parameters”. E.g.:&lt;/li&gt;&lt;/ol&gt;&lt;pre&gt;PATCH https://graph.microsoft.com/v1.0/me/drive/root:/sources/public/excel-as-bz-rules-sample.xlsx:/workbook/worksheets/Sheet1/range(address=&#39;A3&#39;) &lt;/pre&gt;&lt;ol&gt;&lt;li&gt;Read the “results” cell(s) from the workbook by calling the &lt;a href=&quot;https://learn.microsoft.com/en-us/graph/api/worksheet-range?view=graph-rest-1.0&amp;amp;tabs=http&quot;&gt;worksheets endpoint with a GET&lt;/a&gt;. E.g.:&lt;/li&gt;&lt;/ol&gt;&lt;pre&gt;GET https://graph.microsoft.com/v1.0/me/drive/root:/sources/public/excel-as-bz-rules-sample.xlsx:/workbook/worksheets/Sheet1/range(address=&#39;B8&#39;)&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;&lt;ol&gt;&lt;li&gt;Again, make sure you pass the session id of your non-persistent session.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Having your business rules encapsulated in an Excel workbook would allow your business users to ensure the business logic is always right. Please note that this approach requires the following:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;The Business User is now responsible to ensure the logic is correct, which should be fine as they are the domain experts. What the business units are probably not familiar with is versioning of that logic. Thus, it is important to help them create a flow where the “ready” version of the Excel file gets delivered to the appropriate OneDrive folder so that unfinished or incorrect files are not used by the application.&lt;/li&gt;&lt;li&gt;You can still do integration testing from your code to test the accuracy of the business logic in an automated way. This means that you still need to talk to the business users and understand the success and failure conditions and create automated tests for that. This is not different from your unit tests on your domain logic code, with the exception that you are now calling APIs (i.e.: integration tests). &lt;strong&gt;But you should only need to do that testing when the business unit passes down in the flow a file ready to be used&lt;/strong&gt;. Again, it is highly important to establish the proper “release” flow with the business.&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/6187021909279447297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/6187021909279447297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/6187021909279447297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/6187021909279447297'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2023/05/excel-as-business-rules-engine-for-your.html' title=''/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-7392284813693197689</id><published>2023-04-12T21:03:00.001-04:00</published><updated>2024-09-13T06:28:09.353-04:00</updated><title type='text'>Sql Server Projects (sqlproj) deployment via CLI</title><content type='html'>&lt;p&gt;Sql Server Database projects are a great way to define your database structure and keep in in source control. Instead of maintaining a large list of migration scripts, you can instead define your database declaratively in the Sql Project as if you were creating a .net solution. This project style also facilitates the publishing of changes to Sql Servers. The publish process automatically detects what needs to change and creates the necessary Sql code to perform those changes.&lt;/p&gt;&lt;p&gt;One of the challenges of using Sql Server Database projects is to include the Sql Project in your CI/CD pipeline so that it can automatically publish the changes to a Sql Server.&lt;/p&gt;&lt;p&gt;Microsoft has migrated the Sql Server Database project format to the new “SDK style” project (introduced by .NET core). &lt;/p&gt;&lt;p&gt;A generic way to integrate it is to call the commands from the command line as most CI/CD pipelines support some sort of command line invocation. The steps to run from the pipeline are:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Build the project so that it generates a dacpac file&lt;/li&gt;&lt;li&gt;Install the SqlPackage dotnet tool&lt;/li&gt;&lt;li&gt;Run the SqlPackage tool with the “publish” option to publish the dacpac to the desired Sql Server.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The actual commands look like the following (assuming your database is named MyDb and your project is called MyDb.sqlproj):&lt;/p&gt;&lt;pre&gt;Cd &amp;lt;folder where your sql project is&amp;gt;
dotnet build /p:NetCoreBuild=true &lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; white-space: normal;&quot;&gt;/p:Configuration=Release&lt;/span&gt;
dotnet tool install -g microsoft.sqlpackage
SqlPackage /Action:Publish /SourceFile:&quot;.\bin\release\AdventureWorksLT.dacpac&quot; /TargetConnectionString:&quot;ConnectionString to the db you want to publish to” &lt;/pre&gt;&lt;h2&gt;&lt;span style=&quot;font-size: medium; font-weight: 400;&quot;&gt;Microsoft For the older style of project (i.e.: non sdk style sqlproj), you can replace the second line with:&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium; font-weight: 400;&quot;&gt;msbuild &quot;nameofsqlproject.sqlproj&quot; /p:Configuration=Release&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium; font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2&gt;References&lt;/h2&gt;&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/azure-data-studio/extensions/sql-database-project-extension-build-from-command-line?view=sql-server-ver16&quot;&gt;Build a Project from the Command Line - Azure Data Studio | Microsoft Learn&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-publish?view=sql-server-ver16&quot;&gt;SqlPackage Publish - SQL Server | Microsoft Learn&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/7392284813693197689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/7392284813693197689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/7392284813693197689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/7392284813693197689'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2023/04/add-sql-server-database-projects-to-ci.html' title='Sql Server Projects (sqlproj) deployment via CLI'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-556829495860689700</id><published>2021-11-08T19:29:00.007-05:00</published><updated>2021-11-08T19:29:49.091-05:00</updated><title type='text'>Can use Integrated Security via .net but not via JDBC</title><content type='html'>&lt;p&gt;I encountered an obscure issue when trying to connect to a SQL Server database using Windows Integrated Authentication from Java. My JDBC URL was correct but I kept getting the following error:&lt;/p&gt;
&lt;blockquote&gt;com.microsoft.sqlserver.jdbc.SQLServerException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.&lt;/blockquote&gt;
&lt;p&gt;And the SQL logs in the SQL server were showing the following:&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;blockquote&gt;SSPI handshake failed with error code 0x80090346, state 46 while 
establishing a connection with integrated security; the connection 
has been closed. Reason: The Channel Bindings from this client are
missing or do not match the established Transport Layer Security (TLS) 
Channel. The service might be under attack, or the data provider
or client operating system might need to be upgraded to support
Extended Protection. &lt;/blockquote&gt;

&lt;p&gt;The puzzling thing was that I was able to connect fine suing the system.data.sqlclient from .net and from SQL Server Management Studio from the same machine and domain account that was getting the JDBC error. In addition, Integrated Authentication was working fine when connecting to other SQL servers. So, it had to do something with that particular server. After searching in the internet, I found that the issue is due to the JDBC not implementing the Channel Binding feature needed to connect to SQL servers whose &lt;em&gt;Extended Protection&lt;/em&gt; is turned on. The native SQL Client does implement that feature and because the system.data.sqlclient from .net and SSMS use the native SQL Client under the covers, the connection for those succeeds. The following link takes you to the issue in GitHub for this scenario: &lt;a href=&quot;https://github.com/microsoft/mssql-jdbc/issues/963&quot;&gt;https://github.com/microsoft/mssql-jdbc/issues/963&lt;/a&gt;&lt;/p&gt;&lt;p&gt;
  &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/556829495860689700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/556829495860689700' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/556829495860689700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/556829495860689700'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2021/11/can-use-integrated-security-via-net-but.html' title='Can use Integrated Security via .net but not via JDBC'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-7164919106641958994</id><published>2020-08-20T20:12:00.001-04:00</published><updated>2020-08-20T20:12:51.546-04:00</updated><title type='text'>First Twitch Stream</title><content type='html'>&lt;p&gt;Inspired by what&amp;nbsp;Jeff Fritz (&lt;a href=&quot;https://www.twitch.tv/csharpfritz&quot;&gt;https://www.twitch.tv/csharpfritz&lt;/a&gt;) said&amp;nbsp;on .net rocks (&lt;a href=&quot;https://www.dotnetrocks.com/&quot;&gt;https://www.dotnetrocks.com/?show=1575&lt;/a&gt;), I decided to try doing a very small F# tutorial using Twitch:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.twitch.tv/videos/716521139&quot;&gt;https://www.twitch.tv/videos/716521139&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/7164919106641958994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/7164919106641958994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/7164919106641958994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/7164919106641958994'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2020/08/first-twitch-stream.html' title='First Twitch Stream'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-6574898265760526835</id><published>2020-08-07T10:32:00.007-04:00</published><updated>2020-08-07T10:33:26.677-04:00</updated><title type='text'>How to debug workflow console projects in Visual Studio 2019 using Designer Breakpoints</title><content type='html'>&lt;p&gt;I ran into an issue with debugging a Workflow Foundation workflow by using breakpoints in the designer in Visual Studio 2019. The breakpoints in the designer were not being hit when running the console workflow program in debug mode.&amp;nbsp;&lt;/p&gt;&lt;p&gt;A question posted by another member of the community at &lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/846593/not-able-to-debug-windows-workflow-designer.html&quot;&gt;https://developercommunity.visualstudio.com/content/problem/846593/not-able-to-debug-windows-workflow-designer.html&lt;/a&gt; led me to another link at &lt;a href=&quot;https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/retargeting/4.7.2-4.8#windows-workflow-foundation-wf&quot;&gt;https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/retargeting/4.7.2-4.8#windows-workflow-foundation-wf&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;In that last page, at the bottom, under the &quot;Workflow XAML checksums for symbols changed from SHA1 to SHA256&quot;, I found the piece of configuration code to add to my app.config file in the console workflow VS project. The following is the full configuration of my project that allowed VS to pause at the designer breakpoints:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;configuration&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;lt;startup&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;supportedRuntime version=&quot;v4.0&quot; sku=&quot;.NETFramework,Version=v4.8&quot; /&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/startup&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;lt;runtime&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;AppContextSwitchOverrides value=&quot;Switch.System.Activities.UseSHA1HashForDebuggerSymbols=true&quot; /&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/runtime&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/configuration&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/6574898265760526835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/6574898265760526835' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/6574898265760526835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/6574898265760526835'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2020/08/i-ran-into-issue-with-debugging.html' title='How to debug workflow console projects in Visual Studio 2019 using Designer Breakpoints'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-7832182128744504840</id><published>2020-06-17T14:38:00.000-04:00</published><updated>2020-06-17T14:40:27.669-04:00</updated><title type='text'>Previously trusted client certificate not longer trusted by IIS</title><content type='html'>&lt;div&gt;I was getting the following error from iSS when testing locally a web api that requires ssl client certificates:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; font-size: 16px;&quot;&gt;403.16&amp;nbsp;&lt;/span&gt;The client certificate used for this request is not trusted by the Web server&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;One way to troubleshoot is to use the certutil tool that comes with Windows. There is a verify switch that you can use to verify the public portion of the client certificate:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;certutil -f -urlfetch -verify &quot;public client cert.cer&quot;&lt;/pre&gt;The tool will show any errors encountered when validating the cert, such as a failure to lookup the revocation list (CRL) of the issuer.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can also capture the details of the client certificate, like the subject name, issuer and serial number, by adding custom fields to your IIS log. Instructions are &lt;a href=&quot;#&quot; id=&quot;https://docs.microsoft.com/en-us/iis/configuration/system.applicationhost/sites/site/logfile/customfields/&quot; name=&quot;https://docs.microsoft.com/en-us/iis/configuration/system.applicationhost/sites/site/logfile/customfields/&quot;&gt;here&lt;/a&gt; and the fields are under &quot;Server Variables&quot;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The specific issue I was having, however, is described in the answer to&amp;nbsp;&lt;a href=&quot;https://stackoverflow.com/questions/26247462/http-error-403-16-client-certificate-trust-issue&quot;&gt;https://stackoverflow.com/questions/26247462/http-error-403-16-client-certificate-trust-issue&lt;/a&gt;&amp;nbsp;. I had a Trusted Root cert that was invalid. After removing that cert from the Trusted Root Store at the computer level, the IIS was able to trust my client certificate. The interesting thing was that the Trusted Root cert I removed was not related at all to my client cert, so IIS was basically just failing because of an unrelated cert.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/7832182128744504840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/7832182128744504840' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/7832182128744504840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/7832182128744504840'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2020/06/previously-trusted-client-certificate.html' title='Previously trusted client certificate not longer trusted by IIS'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-1384965360796044502</id><published>2020-05-26T14:38:00.002-04:00</published><updated>2020-05-26T14:38:36.674-04:00</updated><title type='text'>Power Automate:  SFTP action &quot;Test connection failed&quot;</title><content type='html'>When I added an SFTP create file action to my Power Automate flow (&lt;a href=&quot;https://flow.microsoft.com&quot; target=&quot;_blank&quot;&gt;https://flow.microsoft.com&lt;/a&gt;)&amp;nbsp;, I got the following error in the action step, within the designer:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&quot;Test connection failed&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To troubleshoot the Power Automate connection, I had to:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;go the Power Automate portal&lt;/li&gt;&lt;li&gt;then &quot;Data&quot;-&amp;gt;&quot;Connections&quot;&amp;nbsp;&lt;/li&gt;&lt;li&gt;the sftp connection was there, I clicked on the ellipsis, and entered the connection info&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;It turns out, that screen provides more details about the connection error. In my case, it was complaining that &quot;SSH host key finger-print xxx format is not supported. It must be in &#39;MD5&#39; format&quot;. I had provided the sha fingerprint that WinScp shows. Instead, I needed to use the MD5 version of the fingerprint. To get that, I had to run in command line (I was in a folder that had openssh in it):&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ssh -o FingerprintHash=md5 mysftpsite.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To get the fingerprint in MD5 format. I took the string (without the &quot;MD5:&quot; part of the string) and put it in Power Automate where it asks for the host fingerprint.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/1384965360796044502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/1384965360796044502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/1384965360796044502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/1384965360796044502'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2020/05/power-automate-sftp-action-test.html' title='Power Automate:  SFTP action &quot;Test connection failed&quot;'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-26749950957399508</id><published>2020-05-25T14:58:00.002-04:00</published><updated>2020-05-25T16:08:30.131-04:00</updated><title type='text'>Windows Workflows Foundation in Azure Functions</title><content type='html'>Unfortunately, I have not been able to make the CoreWf library (&lt;a href=&quot;https://github.com/UiPath-Open/corewf&quot;&gt;https://github.com/UiPath-Open/corewf&lt;/a&gt;) run on an Azure v2 or v3 functions. Something about the Azure function runtime not able to fins the dependencies like System.Xaml or System.CodeDom.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, Azure v1 functions (which run on .net 4.6.1) have no problems running a Workflow created using the Workflow Designer in Visual Studio. A sample of such function is in&amp;nbsp;&lt;a href=&quot;https://github.com/jptarqu/WorkflowForCorePlayground/tree/master/src/AzureSamples&quot;&gt;https://github.com/jptarqu/WorkflowForCorePlayground/tree/master/src/AzureSamples&lt;/a&gt;&amp;nbsp;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I did run into an issue creating from Visual Studio the Function App Service with runtime version of &quot;1&quot;. I was seeing &quot;runtime: error&quot; in the portal&#39;s overview page for the app service. To work around that issue, I created the function app service inside the Azure Portal and then changed it to version 1 inside the portal (the default is v3 and you cannot change it until the App Service is created).&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/26749950957399508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/26749950957399508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/26749950957399508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/26749950957399508'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2020/05/windows-workflows-foundation-in-azure.html' title='Windows Workflows Foundation in Azure Functions'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-1158892587642837796</id><published>2020-05-21T20:53:00.001-04:00</published><updated>2020-05-21T20:53:23.880-04:00</updated><title type='text'>Workflows using CoreWF in .net core</title><content type='html'>Workflow Foundation is a great tool when designing workflows for .net. Unfortunately, just like WCF, that technology is not going to be ported to .net core. However, a company named UI Path (&lt;a href=&quot;https://www.uipath.com/&quot;&gt;https://www.uipath.com/&lt;/a&gt;)&amp;nbsp; that heavily relies on Windows Workflow Foundation, has started an unofficial port to .net (&lt;a href=&quot;https://github.com/UiPath-Open/corewf&quot;&gt;https://github.com/UiPath-Open/corewf&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
In order to see how compatible would be the the new port with the current Windows Workflow for simple workflows, I created a playground project at&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://github.com/jptarqu/WorkflowForCorePlayground&quot;&gt;https://github.com/jptarqu/WorkflowForCorePlayground&lt;/a&gt;&amp;nbsp;. The Visual Studio solution contains two projects:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a class=&quot;js-navigation-open &quot; href=&quot;https://github.com/jptarqu/WorkflowForCorePlayground/tree/master/src/WorkflowForCorePlayground&quot; id=&quot;d44e66853605359afb13f42cbd0f5037-10088c46014914d03fb115f9ee59582cabf097e8&quot; style=&quot;background-color: white; box-sizing: border-box; color: #0366d6; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 14px; text-decoration-line: none; white-space: nowrap;&quot; title=&quot;WorkflowForCorePlayground&quot;&gt;WorkflowForCorePlayground&lt;/a&gt;&amp;nbsp;: a VB.net Windows Workflow project created using the VS template for .net 4.8.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;js-navigation-open &quot; href=&quot;https://github.com/jptarqu/WorkflowForCorePlayground/tree/master/src/CoreWfSample&quot; id=&quot;af1d40bfc488b4e478fca4c72b2c245f-c5a113ee4ef28c55476fff0d36612949bc6054a1&quot; style=&quot;background-color: white; box-sizing: border-box; color: #0366d6; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 14px; text-decoration-line: none; white-space: nowrap;&quot; title=&quot;CoreWfSample&quot;&gt;CoreWfSample&lt;/a&gt;&amp;nbsp;: a .net core console app that runs a cleaned version of the same xaml that project #1 has.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
The idea is to explore the possibility of still having business users design the workflow using the regular .net framework 4.8 beautiful and easy-to-use designer, while still been able to run the workflow in .net, in for example an Azure Server-less Function. Obviously,&amp;nbsp; not all Workflow Activities would work with .net core, but hopefully simple workflows and flow charts encapsulating business rules can be used.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In order to use the CoreWF you must install the nuget in your project. But the nuget does not seem to be in Nuget.org, so you have to add the following url to yur nuget sources in Visual Studio:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
https://www.myget.org/F/uipath-dev/api/v3/index.json&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The .net core project works without needing to modfiy the xaml. I was able to copy and paste the xaml code from the xaml generated by the visual studio designer into the xaml file in my .net core.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
My next experiment is to try creating an Azure Function that runs the xaml workflow.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/1158892587642837796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/1158892587642837796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/1158892587642837796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/1158892587642837796'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2020/05/workflows-using-corewf-in-net-core.html' title='Workflows using CoreWF in .net core'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-279378199218302056</id><published>2014-10-11T09:26:00.002-04:00</published><updated>2014-10-11T09:26:38.767-04:00</updated><title type='text'>Inexpensive, Non-realtime Sites using Queues</title><content type='html'>&lt;br /&gt;
A lot of the sites for small and medium businesses rely on dynamic engines (such as ASP.NET, PHP, etc) to generate most of the content at run-time. This kind of typical setup requires expensive hosting (relative to a small and medium size company) and (if not designed properly) may not perform very well. I would like to argue that most of those sites could be served with static HTML pages generated offline at different time intervals (either fixed or on-demand intervals, discussed later) and a Javascript Client front end that communicates with a slim server side service whose only job is to store commands from visitors into a queue. The queue can then be read and processed by non-hosted computers, freeing the business from having to pay extra hosting fees for application server.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qrJS1snouPKlVv5cu_rfGLk8uT8VU_YjxE8SUI0sJ01p-2jMp2TY8DR0dmGsr5_o-lSluakS9cAOyyoZgyRdpiaVk9iV8BfeRkiHE5z-zBHkhhkVlGl6x0ZqCcuOwwW6PC29kw/s1600/queue+arch.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qrJS1snouPKlVv5cu_rfGLk8uT8VU_YjxE8SUI0sJ01p-2jMp2TY8DR0dmGsr5_o-lSluakS9cAOyyoZgyRdpiaVk9iV8BfeRkiHE5z-zBHkhhkVlGl6x0ZqCcuOwwW6PC29kw/s1600/queue+arch.png&quot; height=&quot;201&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The costs are reduced by the following:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Static HTML sites mean less power required.&lt;/li&gt;
&lt;li&gt;Queue storages are usually cheaper services than full SQL Databases.&lt;/li&gt;
&lt;li&gt;A slim service that just relays the commands from the user to the queue and from the queue to the user should require less power than a full blown Web Application.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Static HTML sites do not require a high end server to achieve great performance. In fact, static HTML sites can take advantage of CDN and client caching. Many cloud services such as &lt;a href=&quot;https://cloud.google.com/appengine/pricing&quot;&gt;Google App Engine&lt;/a&gt; provide a generous quota for static content. To generate the static site, one could use many of the static site generators out there, one example is &lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
A lot of user interaction in a small or medium business’ (SMB) public site do not require the ACID properties of SQL Databases. A simple Queue can reliably ensure storage of the visitor’s request for future processing, for example, a customer’s request to buy a product only needs to be stored in the Queue for the off-cloud Application Processor to retrieve it from the cloud’s queue and then do what it needs to do to process the sale. Cloud SQL databases can be expensive (e.g &lt;a href=&quot;http://azure.microsoft.com/en-us/pricing/details/sql-database/&quot;&gt;SQL Server on Azure&lt;/a&gt;), but queues such as GAE’s Queue are inexpensive and have quotas for free usage.&lt;br /&gt;
&lt;br /&gt;
By having as little code running in the cloud, the cost of processing minutes can be saved. In the customer purchase example, the code to process the sale does not need to live in expensive clouds, it could live in an on-premises regular computer that checks the queue every so often. The computer that does the heavy processing can also be placed on another cheaper hosted environment if that is required by the business needs. The point is that your public facing site (the front line of your business) is as quick as possible and your back-end services (that do not require real time responses) can be placed in inexpensive environments (on-premises or a hosting provider).&lt;br /&gt;
&lt;br /&gt;
Obviously, an application must be designed to make reliable Application Processors that can scale horizontally (i.e. more Application Processors can be added without impacting reliability). The back-end database to which the Application Processors connect can still be a SQL ACID database, but it does not need to be in the cloud anymore. In the customer purchase example, the sale and its details would go to its normal SQL Database after processed.&lt;br /&gt;
&lt;br /&gt;
In the next posts, I will be linking to examples of sites with content that take advantage of content generated at deployment time. I will also linkt o examples using slim services that take advantage of cheap or free code hosting such as Google App Engine and Azure Websites.</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/279378199218302056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/279378199218302056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/279378199218302056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/279378199218302056'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2014/10/inexpensive-non-realtime-sites-using.html' title='Inexpensive, Non-realtime Sites using Queues'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qrJS1snouPKlVv5cu_rfGLk8uT8VU_YjxE8SUI0sJ01p-2jMp2TY8DR0dmGsr5_o-lSluakS9cAOyyoZgyRdpiaVk9iV8BfeRkiHE5z-zBHkhhkVlGl6x0ZqCcuOwwW6PC29kw/s72-c/queue+arch.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-2299000610372149828</id><published>2014-06-02T20:40:00.000-04:00</published><updated>2014-06-02T20:42:38.633-04:00</updated><title type='text'>R Cookbook</title><content type='html'>The &lt;i&gt;&lt;a href=&quot;http://shop.oreilly.com/product/9780596809164.do&quot;&gt;R Cookbook&lt;/a&gt;&lt;/i&gt; by&amp;nbsp;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Verdana, Geneva, Helvetica, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;Paul Teetor (&lt;/span&gt;O&#39;Reilly Media) aims and succeeds in introducing programmers to the technical aspects of the R language. R is a programming language designed for Statistical work, therefore it might not share too much ground with other typical languages like Python or C. The &lt;i&gt;R Cookbook&lt;/i&gt; gives a tour to programmers to this wonderful language, from the very screen output beginnings, through ploting, to the creation of statistical models and Time Series.&lt;br /&gt;
&lt;br /&gt;
The author does a great job exposing the differences and similarities of R to other languages. For example, the author, explains how in R the single brackets applied to a vector (myvector[1]) mean &quot;give me a vector of one item from&amp;nbsp;myvector&quot;, he then explains that the correct way to get a single item is myvector[1]. Comparisons to other languages like SQL are dispersed through the chapters.&lt;br /&gt;
&lt;br /&gt;
Mr. Teetor provides a throughout explanation of other aspects of R that might not be common in other computer languages. For example, in Chapter 5, he explains in detail and with clear examples what the Recycling Rule is. I doubt I would have been able to grasp such concepts so easily without an explanation like his.&lt;br /&gt;
&lt;br /&gt;
This book however, is not a book about Statistics. The author goes ankle deep in Statistics Theory, just deep enough to have a general understanding of the examples. That is fine because he even states at the beginning of the book that this is not a book on Statistics. There are other books that deal with the theory, some of them are referenced in the book as a pointer to further reading. I recommend reading an introductory Statistical analysis book such as&amp;nbsp;&lt;span style=&quot;font-family: Arial; font-size: 15px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;http://shop.oreilly.com/product/0636920028918.do&quot; style=&quot;color: #888888; text-decoration: none;&quot;&gt;Data Science for Business&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;before reading the cookbook.&lt;br /&gt;
&lt;br /&gt;
This book fits very nicely as a step between an introductory book to Statistics and a book for Regression Modeling. I recommend this book for those programmers that have some basic notion of Statistical modeling and want to learn how to implement those concepts in R. This is exactly the place I was when I started reading the&amp;nbsp;&lt;i&gt;&lt;a href=&quot;http://shop.oreilly.com/product/9780596809164.do&quot;&gt;R Cookbook&lt;/a&gt;.&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/2299000610372149828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/2299000610372149828' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/2299000610372149828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/2299000610372149828'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2014/06/r-cookbook.html' title='R Cookbook'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-5385279610791418915</id><published>2014-05-29T15:08:00.004-04:00</published><updated>2014-05-29T15:08:48.171-04:00</updated><title type='text'>List to ICollection AutoMapper and WebAPI problem</title><content type='html'>I was getting an exception from Automapper when it tried to map a List&lt;myclass&gt; to an ICollection&lt;myclass&gt;. The problem was that WebApi was building the MyClass from the xml sent by the client and instead of using a List for the ICollection property, it used a plain array. When Automapper tried to map the List to the Array, it failed because even though Arrays are ICollections, they do not support some of the ICollection operations, such as &lt;b&gt;Add.&amp;nbsp;&lt;/b&gt;&lt;/myclass&gt;&lt;/myclass&gt;&lt;br /&gt;
&lt;br /&gt;
To solve the problem, I used Json in the client side when posting. After that, webapi chose to use List instead of an Array when the data came as Json.</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/5385279610791418915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/5385279610791418915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/5385279610791418915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/5385279610791418915'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2014/05/list-to-icollection-automapper-and.html' title='List to ICollection AutoMapper and WebAPI problem'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-5404377792843442184</id><published>2014-05-29T12:41:00.005-04:00</published><updated>2014-05-29T12:41:55.752-04:00</updated><title type='text'> Cryptic message when serializing Computed Observable to JSON</title><content type='html'>If you have an error in one of your computed observable in Knockout.js, the toJson function will set the value of that property to a cryptic script snipped when serializing it to JSON. For example:&lt;br /&gt;
&lt;pre style=&quot;background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #444444; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace !important; font-size: 12px; line-height: 18px; margin-bottom: 9px; outline: 0px; padding: 8.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;code class=&quot;lang-javascript&quot; style=&quot;background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace !important; outline: 0px; padding: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;var&lt;/span&gt; SortField = &lt;span class=&quot;hljs-function&quot; style=&quot;outline: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-params&quot; style=&quot;outline: 0px;&quot;&gt;(expression)&lt;/span&gt; {&lt;/span&gt;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;.FieldDef = ko.observable(&lt;span class=&quot;hljs-literal&quot; style=&quot;outline: 0px;&quot;&gt;null&lt;/span&gt;);
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;.SortOrder = ko.observable(&lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144; outline: 0px;&quot;&gt;&quot;&quot;&lt;/span&gt;);

        &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;.ExpressionType = &lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144; outline: 0px;&quot;&gt;&quot;SortField&quot;&lt;/span&gt;;

        &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;.Label = ko.computed(&lt;span class=&quot;hljs-function&quot; style=&quot;outline: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-params&quot; style=&quot;outline: 0px;&quot;&gt;()&lt;/span&gt; {&lt;/span&gt;
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;background-color: transparent; color: inherit;&quot;&gt;FieldDef&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: inherit;&quot;&gt;() == &lt;/span&gt;&lt;span class=&quot;hljs-literal&quot; style=&quot;background-color: transparent; color: inherit; outline: 0px;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: inherit;&quot;&gt;? &lt;/span&gt;&lt;span class=&quot;hljs-string&quot; style=&quot;background-color: transparent; color: #dd1144; outline: 0px;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: inherit;&quot;&gt; : &lt;/span&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;background-color: transparent; color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: inherit;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: inherit;&quot;&gt;FieldDef&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: inherit;&quot;&gt;().Label + &lt;/span&gt;&lt;span class=&quot;hljs-string&quot; style=&quot;background-color: transparent; color: #dd1144; outline: 0px;&quot;&gt;&#39; &#39;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: inherit;&quot;&gt; + &lt;/span&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;background-color: transparent; color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: inherit;&quot;&gt;.SortOrder();&lt;/span&gt;
        }, &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;);

    }
&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;var&lt;/span&gt; FieldDefinition = &lt;span class=&quot;hljs-function&quot; style=&quot;outline: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-params&quot; style=&quot;outline: 0px;&quot;&gt;(table_name, field_name, table_alias)&lt;/span&gt; {&lt;/span&gt;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;.TableName = table_name;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;.TableAlias = ko.observable(table_alias);
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;.FieldName = field_name;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;.Label = ko.computed(&lt;span class=&quot;hljs-function&quot; style=&quot;outline: 0px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-params&quot; style=&quot;outline: 0px;&quot;&gt;()&lt;/span&gt; {&lt;/span&gt;
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;.TableAlias() + &lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144; outline: 0px;&quot;&gt;&#39;⇨&#39;&lt;/span&gt; + field_name;
        }, &lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-weight: bold; outline: 0px;&quot;&gt;this&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;
In this example SortField’s &lt;b&gt;Label&lt;/b&gt; function is not calling the &lt;b&gt;Label&lt;/b&gt; function properly from the&amp;nbsp;&lt;span style=&quot;color: inherit; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;&quot;&gt;FieldDef&lt;/span&gt;&amp;nbsp;property. If&amp;nbsp;you serialize to JSON, you will get &amp;nbsp;the following:&lt;br /&gt;
&lt;pre style=&quot;background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #444444; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace !important; font-size: 12px; line-height: 18px; margin-bottom: 9px; outline: 0px; padding: 8.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;code class=&quot;lang-javascript&quot; style=&quot;background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace !important; outline: 0px; padding: 0px;&quot;&gt;function dependentObservable() &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;        if (arguments.length &amp;gt; 0) &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 if (typeof writeFunction === &lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\&quot;&lt;/span&gt;function&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\&quot;&lt;/span&gt;) &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
     // Writing a value&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
     writeFunction.apply(evaluatorFunctionTarget, arguments);&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt; else &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
     throw new Error(&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\&quot;&lt;/span&gt;Cannot write a value to a ko.computed unless you specify a &#39;write&#39; option. If you wish to read the current value, don&#39;t pass any parameters.&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\&quot;&lt;/span&gt;);&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 return this; // Permits chained assignments&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;        &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt; else &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 // Reading the value&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 if (!_hasBeenEvaluated)&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
     evaluateImmediate();&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 ko.dependencyDetection.registerDependency(dependentObservable);&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 return _latestValue;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;        &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;    &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt; ASC&quot;&lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;]&lt;/span&gt;,&quot;ExpressionType&quot;:&quot;Hierarchy&quot;,&quot;Label&quot;:&quot;function dependentObservable() &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;        if (arguments.length &amp;gt; 0) &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 if (typeof writeFunction === &lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\&quot;&lt;/span&gt;function&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\&quot;&lt;/span&gt;) &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
     // Writing a value&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
     writeFunction.apply(evaluatorFunctionTarget, arguments);&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt; else &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
     throw new Error(&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\&quot;&lt;/span&gt;Cannot write a value to a ko.computed unless you specify a &#39;write&#39; option. If you wish to read the current value, don&#39;t pass any parameters.&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\&quot;&lt;/span&gt;);&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 return this; // Permits chained assignments&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;        &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt; else &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 // Reading the value&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 if (!_hasBeenEvaluated)&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
     evaluateImmediate();&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 ko.dependencyDetection.registerDependency(dependentObservable);&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;
 return _latestValue;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;        &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-command&quot; style=&quot;outline: 0px;&quot;&gt;\n&lt;/span&gt;    &lt;span class=&quot;hljs-special&quot; style=&quot;outline: 0px;&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
For the value of the &lt;b&gt;Label&lt;/b&gt; property of the SortField.&lt;br /&gt;
&lt;br /&gt;
The fix is to call the Label function as&amp;nbsp;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 12px; font-weight: bold; line-height: 18px; outline: 0px; white-space: pre-wrap;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: inherit; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: inherit; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;&quot;&gt;FieldDef&lt;/span&gt;&lt;span style=&quot;color: inherit; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;&quot;&gt;().Label() inside&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: inherit; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;&quot;&gt;SortField&#39;s Label&lt;/span&gt;&lt;span style=&quot;color: inherit; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/5404377792843442184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/5404377792843442184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/5404377792843442184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/5404377792843442184'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2014/05/cryptic-message-when-serializing.html' title=' Cryptic message when serializing Computed Observable to JSON'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-2699174496702092641</id><published>2014-01-06T15:21:00.002-05:00</published><updated>2014-01-06T15:21:18.878-05:00</updated><title type='text'>Compile Postgres in Windows with GSSAPI</title><content type='html'>&lt;div&gt;
&lt;div&gt;
&lt;b&gt;Configuration Phase&lt;/b&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Install the 64 bit versions of OpenSSL and MIT Kerberos&lt;/li&gt;
&lt;li&gt;Get the professional version of Visual Studio 2010 or 2012.&lt;/li&gt;
&lt;li&gt;Open the 64Bit of the Visual Studio Command Prompt (not the 32 bit version)&lt;/li&gt;
&lt;li&gt;cd to src\tools\msvc in the folder that contains Postgres’ source code&lt;/li&gt;
&lt;li&gt;Change the config_default.pl:&lt;/li&gt;
&lt;/ol&gt;
add these lines:&lt;br /&gt;&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;includes =&amp;gt; &#39;C:\\Program Files\\MIT\\Kerberos\\include:C:\\OpenSSL-Win64\\include&#39;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;libraries =&amp;gt; &#39;C:\\Program Files\\MIT\\Kerberos\\lib\\amd64:C:\\OpenSSL-Win64\\lib&#39;,&lt;/blockquote&gt;
after&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
“iconv &amp;nbsp; =&amp;gt; undef,”&lt;/blockquote&gt;
change the krb5 and ssl lines to:&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;krb5 &amp;nbsp; &amp;nbsp;=&amp;gt; &#39;C:\\Program Files (x86)\\MIT\\Kerberos&#39;, &amp;nbsp; &amp;nbsp;# --with-krb5=&lt;path&gt;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;openssl =&amp;gt; &#39;C:\\OpenSSL-Win64&#39;, &amp;nbsp; &amp;nbsp;# --with-ssl=&lt;path&gt;&lt;/path&gt;&lt;/path&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Build Phase&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;in the vs command prompt, type Build&lt;/li&gt;
&lt;li&gt;When done, if no errors, then type Install C:\PathWhereYouWanToInstallPostgres&lt;/li&gt;
&lt;li&gt;Go to the folder where OpenSSL is installed&lt;/li&gt;
&lt;li&gt;Search in the folder and subfolders for libeay32 and ssleay.dll and copy those files&lt;/li&gt;
&lt;li&gt;Go to the folder where it Postgres was installed (C:\PathWhereYouWanToInstallPostgres)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Go to the BIN folder and paste libeay32 and ssleay.dll&lt;/li&gt;
&lt;li&gt;Start the regular command prompt in that folder and call pg_ctl -D PATH_TO_YOUR_DATA_FOLDER&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Please refer to the Postgresql documentation on how to configure GSSAPI in an installed Postgresql service &lt;a href=&quot;http://www.postgresql.org/docs/9.3/interactive/auth-methods.html#GSSAPI-AUTH&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/2699174496702092641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/2699174496702092641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/2699174496702092641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/2699174496702092641'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2014/01/compile-postgres-in-windows-with-gssapi.html' title='Compile Postgres in Windows with GSSAPI'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-762868520164104497</id><published>2013-11-19T18:33:00.001-05:00</published><updated>2013-11-19T20:45:01.890-05:00</updated><title type='text'>How to use Windows SSO with OpenXava</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;One of the nice things about the .NET web environment is the dead easy way to implement Single Sign On in your web apps through Active Directory authentication. In the Java world there are multiple alternatives to use Windows’ Single Sign On with Java based web apps. One of those alternatives is &lt;/span&gt;&lt;a href=&quot;http://dblock.github.io/waffle/&quot; style=&quot;line-height: 1.15; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1155cc; font-family: Arial; font-size: 15px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Waffle&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;. Waffle allows your Java web app to authenticate against Active Directory groups (and users). The only caveat is that your web server needs to be running in Windows, which kind of makes sense.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;In this article, you will learn the steps required to have your OpenXava web application use Waffle to authenticate your Windows users. &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The first step is to download Waffle from their site and then copy the JAR files outlined in &lt;/span&gt;&lt;a href=&quot;https://github.com/dblock/waffle/blob/master/Docs/tomcat/TomcatSingleSignOnValve.md&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;https://github.com/dblock/waffle/blob/master/Docs/tomcat/TomcatSingleSignOnValve.md&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; to the OpenXava’s tomcat server.&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;In your OpenXava project, create &lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;servlets.xml&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; in the Web-inf, containing the following:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Arial; font-size: x-small; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&amp;lt;!--  the role name (the domain gorup) must be entered EXACTLY as it appears in AD. It is case sensitive --&amp;gt;&lt;br /&gt; &amp;lt;security-role&amp;gt;&lt;br /&gt;  &amp;lt;role-name&amp;gt;YOURDOMAIN\YourADGroup&amp;lt;/role-name&amp;gt;&lt;br /&gt;&amp;lt;/security-role&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;security-constraint&amp;gt;&lt;br /&gt;  &amp;lt;web-resource-collection&amp;gt;&lt;br /&gt;    &amp;lt;web-resource-name&amp;gt;&lt;br /&gt;      Demo Application&lt;br /&gt;    &amp;lt;/web-resource-name&amp;gt;&lt;br /&gt;    &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;    &amp;lt;http-method&amp;gt;GET&amp;lt;/http-method&amp;gt;&lt;br /&gt;    &amp;lt;http-method&amp;gt;POST&amp;lt;/http-method&amp;gt;&lt;br /&gt;  &amp;lt;/web-resource-collection&amp;gt;&lt;br /&gt;  &amp;lt;auth-constraint&amp;gt;&lt;br /&gt;    &amp;lt;role-name&amp;gt;YOURDOMAIN\YourADGroup&amp;lt;/role-name&amp;gt;&lt;br /&gt;  &amp;lt;/auth-constraint&amp;gt;&lt;br /&gt;&amp;lt;/security-constraint&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Add a new file called &lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;filters.xml&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; to Web-inf:&lt;/span&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Arial; font-size: x-small; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&amp;lt;filter&amp;gt;&lt;br /&gt;  &amp;lt;filter-name&amp;gt;SecurityFilter&amp;lt;/filter-name&amp;gt;&lt;br /&gt;  &amp;lt;filter-class&amp;gt;waffle.servlet.NegotiateSecurityFilter&amp;lt;/filter-class&amp;gt;&lt;br /&gt;  &amp;lt;init-param&amp;gt;&lt;br /&gt;      &amp;lt;param-name&amp;gt;allowGuestLogin&amp;lt;/param-name&amp;gt;&lt;br /&gt;      &amp;lt;param-value&amp;gt;false&amp;lt;/param-value&amp;gt;&lt;br /&gt;  &amp;lt;/init-param&amp;gt;&lt;br /&gt;   &amp;lt;init-param&amp;gt;&lt;br /&gt;      &amp;lt;param-name&amp;gt;waffle.servlet.spi.NegotiateSecurityFilterProvider/protocols&amp;lt;/param-name&amp;gt;&lt;br /&gt;      &amp;lt;param-value&amp;gt;&lt;br /&gt;          Negotiate&lt;br /&gt;          NTLM&lt;br /&gt;      &amp;lt;/param-value&amp;gt;&lt;br /&gt;  &amp;lt;/init-param&amp;gt;&lt;br /&gt;&amp;lt;/filter&amp;gt;&lt;br /&gt;&amp;lt;filter-mapping&amp;gt;&lt;br /&gt;  &amp;lt;filter-name&amp;gt;SecurityFilter&amp;lt;/filter-name&amp;gt;&lt;br /&gt;  &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/filter-mapping&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;After creating the filters.xml file, create the a &lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; font-style: italic; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;context.xml&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; file in the &lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;META-INF&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; folder (not Web-inf):&lt;/span&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; line-height: 14px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;Context&amp;gt;&lt;br /&gt;  &amp;lt;Valve className=&quot;waffle.apache.NegotiateAuthenticator&quot; /&amp;gt;&lt;br /&gt;  &amp;lt;Realm className=&quot;waffle.apache.WindowsRealm&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/Context&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; line-height: 14px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 1.15;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Arial; font-size: 13px; line-height: 1.15; white-space: pre-wrap;&quot;&gt;That’s it! that will limit access to members of YOURDOMAIN\YourADGroup and the users that visit the site will have their Windows credential pass-thorugh their browser. Please consult OpenXava and Waffle on how to get the current username in order to handle custom logic based on the current user’s Active Directory groups.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial; font-size: 13px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/762868520164104497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/762868520164104497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/762868520164104497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/762868520164104497'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2013/11/how-to-use-windows-sso-with-openxava.html' title='How to use Windows SSO with OpenXava'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-1856061722554149242</id><published>2013-11-13T20:30:00.000-05:00</published><updated>2013-11-13T20:36:31.883-05:00</updated><title type='text'>Data Science for Business by Foster Provost &amp; Tom Fawcett O’Reilly Media</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;http://shop.oreilly.com/product/0636920028918.do&quot;&gt;Data Science for Business&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; is a book that makes a phenomenal job teaching the fundamental concepts of Data Science (a.k.a. Data Analysis and Data Mining). Foster Provost and Tom Fawcett explain in plain English, clear examples and beginner-level math the processes surrounding Data Science and the basics of its algorithms.&lt;/span&gt;&lt;/div&gt;
&lt;b id=&quot;docs-internal-guid-1b6acdb2-5439-17b9-f8a7-a4d0dbee53fe&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The authors go over the various steps of the CRISP method using situations found in the real world such as Customer Churn and Online Advertising. The most common data analysis models are reviewed and explained in detail such as Clustering, Decision Trees and Support Vector Machines. Extensive explanation is given to the difference between supervised and unsupervised methods. Even if you use software tools that create those models, this book will help you understand how to use/test them correctly and how to avoid over-fitting. &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Multiple examples are given in each chapter and most of the math is visually aided with graphs. The authors explain step by step any equation presented in the book. A notable example is how the authors show how the different parts of the Bayes’ Rule equation come together in chapter 9. There are also special Math-intensive sections that business managers might skip, but software developers and future data scientist need to examine closely.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;

&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;I would recommend this book to any DBA or Developer looking for an useful introduction to Data Science. For a practical application of the concepts in the book, I recommend &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Data Analysis Using SQL and Excel &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;by Gordon Linoff after reading &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Data Science for Business&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;. As a SQL Server DBA, I will apply the concepts I learned with the book to SQL Server Analysis Services.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/1856061722554149242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/1856061722554149242' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/1856061722554149242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/1856061722554149242'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2013/11/data-science-for-business-by-foster.html' title='Data Science for Business by Foster Provost &amp; Tom Fawcett O’Reilly Media'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-5763498007780724788</id><published>2013-11-02T10:17:00.001-04:00</published><updated>2013-12-26T08:23:20.502-05:00</updated><title type='text'>How to make MS SQL integrated security work in Spoon</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt;How to make Micorsoft SQL Server&#39;s integrated security (SSPI) work in Spoon:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span id=&quot;docs-internal-guid-7b776c57-192b-1fe9-bcfc-cee0c4096b98&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ol style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Download the MS SQL JDBC sql drivers&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Copy enu\auth\x64\sqljdbc_auth.dll to {spoon installtion folder}\libswt\win64&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Copy enu\auth\x64\sqljdbc_auth.dll &amp;nbsp;to {spoon installtion folder}\libswt\win32&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Copy C:\sqljdbc_4.0\enu\sqljdbc4.jar to {spoon installtion folder}\libext\JDBC&lt;/span&gt;&lt;/li&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Open Spoon&lt;/span&gt;&lt;/li&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;When creating the data source, make sure to check &quot;Use integrated authentication&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 15px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 15px; white-space: pre-wrap;&quot;&gt;Please note that you are copying the 64 bit version of &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt;sqljdbc_auth.dll to &lt;b&gt;both &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt;\libswt\win64 and &lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; line-height: 17px; white-space: pre-wrap;&quot;&gt;\libswt\win32 if you have a 64 bit processor. &lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/5763498007780724788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/5763498007780724788' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/5763498007780724788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/5763498007780724788'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2013/11/how-to-make-ms-sql-integrated-security.html' title='How to make MS SQL integrated security work in Spoon'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-8038139233495904146</id><published>2013-07-02T21:26:00.001-04:00</published><updated>2013-07-02T21:26:10.629-04:00</updated><title type='text'>Alert if file missing using Powershell</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The following Powershell script can be used to send an email alert when a file is missing from a folder or it is the same file from a previous check:&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$path_mask = &quot;yourfile_*.txt&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$previous_file_store = &quot;lastfileread.txt&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;$script_name = &quot;File Check&quot;&lt;/span&gt;&lt;/div&gt;
&lt;b id=&quot;docs-internal-guid-2b3eb982-a21f-8daf-2ba0-80b68feed19b&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;###### Functions ##########&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Function EMailLog($subject, $message) &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;{ &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$emailTo = &quot;juanito@yourserver.com&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$emailFrom = &quot;alert@yourserver.com&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$smtpserver=&quot;smtp.yourserver.com&quot; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$smtp=new-object Net.Mail.SmtpClient($smtpServer) &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$smtp.Send($emailFrom, $emailTo, $subject, $message) &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;} &lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Try&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#get files that match the mask&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$curr_file = dir $path_mask | &amp;nbsp;select name&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if ($curr_file.count -gt 0)&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#file found&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#check if the file is different from the previous file read&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$previous_file = Get-Content $previous_file_store&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$curr_file_name = $curr_file.Item(0).Name&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ($previous_file.trim() -eq &amp;nbsp;$curr_file_name.trim())&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$msg = &quot;Found same file as previous check: $previous_file and $curr_file_name&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$msg&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EMailLog &quot;$script_name Error&quot; $msg&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#different file, record its name for comparing in the next run&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$curr_file.Item(0).Name | out-file -filepath $previous_file_store&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$msg = &quot;$path_mask Not found&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$msg&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EMailLog &quot;$script_name Error&quot; $msg&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Catch [system.exception]&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;Caught a system exception &quot;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$error&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$error.Exception | EMailLog &amp;nbsp;&quot;$script_name System error&quot; $_ &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/8038139233495904146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/8038139233495904146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/8038139233495904146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/8038139233495904146'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2013/07/alert-if-file-missing-using-powershell.html' title='Alert if file missing using Powershell'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-8192309205678518423</id><published>2013-04-06T15:38:00.000-04:00</published><updated>2013-04-11T17:34:59.701-04:00</updated><title type='text'>Thoughts on how to prevent Abortions</title><content type='html'>I would like to first set the scope of this article; this is about abortions in cases where the&amp;nbsp;couple&amp;nbsp;had&amp;nbsp;consensual&amp;nbsp;sex and there is no life-or-death health risk to the pregnant mother. In regards to cases of rape or life-or-death&amp;nbsp;risks&amp;nbsp;to the mother, I think it is best for a panel of women (both pro-choice and pro-life) to discuss it. The panel should&amp;nbsp;include&amp;nbsp;people who have gone&amp;nbsp;through&amp;nbsp;those&amp;nbsp;situations&amp;nbsp;and who have taken either direction. No man (pro-choice or pro-life) should be included in that panel and meetings. I also want to clarify before we being that I am pro life in that I believe life begins as soon as the baby starts forming in the womb.&lt;br /&gt;
&lt;br /&gt;
Having set the scope of this article, it is important to address the fact that it is very important to point out that when a baby is conceived, the &lt;b&gt;couple is pregnant&lt;/b&gt;&amp;nbsp;not just the mother. The&amp;nbsp;responsibility&amp;nbsp;falls to both the man and the woman. Paying child support is not even near the share of responsibility that the father should take on. It is sad that the justice system makes it seem that by just paying child support, the father is off the hook. The father should be forced by the justice system to have more&amp;nbsp;responsibly such as baby sitting, spending sleepless nights, taking the child places and cleaning diapers. My suggestion is that if the father fails to comply with any of those, he should pay a fine and also be sterilize. This might sound like the&amp;nbsp;government&amp;nbsp;intruding&amp;nbsp;on areas it should not, but I prefer that than having women abort their children&amp;nbsp;because&amp;nbsp;they will not have the support they need. By sterilizing the bad fathers, we as society can ensure that they won&#39;t be doing that to another woman.&lt;br /&gt;
&lt;br /&gt;
Sterilizing procedures might sound a little bit extremist, but it can help curve&amp;nbsp;spending&amp;nbsp;on social welfare. I do believe in having some sort of safety net for &lt;i&gt;poor&amp;nbsp;&lt;/i&gt;children and &lt;i&gt;poor&amp;nbsp;&lt;/i&gt;elderly, however we as society need to be smart about it. Allowing people to have a large amount of children and then ask for welfare&amp;nbsp;assistance&amp;nbsp;sounds really dumb. People might disagree on how many&amp;nbsp;children&amp;nbsp;is too much for families&amp;nbsp;assisted&amp;nbsp;by the&amp;nbsp;government. I&amp;nbsp;suggest&amp;nbsp;that two is enough. If a family has two or more children and they need welfare&amp;nbsp;assistance&amp;nbsp; the government should sterilize the couple to prevent them from having more kids. This will free up more welfare resources for other children, like those with severe health&amp;nbsp;challenges&amp;nbsp;who might&amp;nbsp;otherwise&amp;nbsp;be aborted by couples who believe that abortion is a way to avoid the cost and time associated with taking care of a child challenged&amp;nbsp;with&amp;nbsp;severe&amp;nbsp;health&amp;nbsp;problems.&lt;br /&gt;
&lt;br /&gt;
This bring another excuse people often use to justify abortion. Some people believe is OK to abort a child if the&amp;nbsp;child&amp;nbsp;is going to have severe&amp;nbsp;health&amp;nbsp;problems during his/her life. We don&#39;t often see (or even allow) parents to go their child dying of cancer and&amp;nbsp;killing&amp;nbsp;him/her to &quot;spare&quot; him/her from the pain. Many people who are born and live&amp;nbsp;through&amp;nbsp;sever health&amp;nbsp;challenges&amp;nbsp;do not commit suicide,&amp;nbsp;which could mean that even if life is very&amp;nbsp;tough&amp;nbsp;there is either light at the end of the tunnel or there are some&amp;nbsp;aspects&amp;nbsp;in life that are worth living for.&amp;nbsp;The&amp;nbsp;same could be said about the &quot;undesired&quot; children,&amp;nbsp;children&amp;nbsp;who grew in families were they were not loved like they should. Many of them have had a terrible childhood life; but many of them are able to break away and find happiness even if it is at latter point in time or a reason to live for.&lt;br /&gt;
&lt;br /&gt;
If couples are not willing to take care of their children if they are born with severe health problems, then I&amp;nbsp;suggest&amp;nbsp;they don&#39;t try to have babies on their own at all. There will&amp;nbsp;always&amp;nbsp;be risks with new babies and many parents are willing to receive their new babies as they are. If some couples are not willing to take that responsibility, then I suggest they sterile&amp;nbsp;themselves to &quot;spare&quot; themselves from that risk. I then suggest they find an &lt;b&gt;orphan toddler who looks healthy&lt;/b&gt; and adopt the child. I am not being sarcastic, I think this is a better solution than having the couple abort a child because the child happened to have some&amp;nbsp;health&amp;nbsp;problems.&lt;br /&gt;
&lt;br /&gt;
Unplanned pregnancies can be avoided by abstinence or by using any kind of contraceptive. I truly believe abstinence works 100% of the time, but for people who do not believe in abstinence, contraceptives&amp;nbsp;like&amp;nbsp;condoms should be a no-brainier. There is &lt;b&gt;no excuse&lt;/b&gt; for not using one. Thanks to movies, TV shows, schools, peers and the Internet, pretty much everybody knows what they are and how to use them. This&amp;nbsp;responsibility should fall 100% on the man; no condom, no sex.&amp;nbsp;If you are stupid enough to decide not to use them, please do society a favor and have a vasectomy (yes I am suggest this a lot, but it is very effective). Human kind does not need your&amp;nbsp;stupidity&amp;nbsp;genes in our Gene Pool, we have plenty enough. &lt;br /&gt;
&lt;br /&gt;
If a couple do not have money to buy contraceptives, then they have &lt;i&gt;bigger &lt;/i&gt;problems than trying to get contraceptives. Instead of spending time having sex, they probably should be spending all their spare time on finding ways of earning more money; like a second job or inventing something everybody needs. Sexual relationships are not&amp;nbsp;unnecessary&amp;nbsp;to human survival like food or medicines, so I do not support the&amp;nbsp;government&amp;nbsp;subsidizing&amp;nbsp;contraceptives. We might as well&amp;nbsp;subsidize&amp;nbsp;video game consoles and&amp;nbsp;music&amp;nbsp;downloads. However, if it really comes down to either using tax money for contraceptives or aborting children, then please take my tax money and spare the babies.&lt;br /&gt;
&lt;br /&gt;
The final excuse that I want to address is&amp;nbsp;probably&amp;nbsp;the most prominent. Women&#39;s right to choose what they want for their bodies. I do&amp;nbsp;believe&amp;nbsp;on individuals on&amp;nbsp;having&amp;nbsp;the right to do whatever they want o their bodies. If they want a&amp;nbsp;tattoo&amp;nbsp;or chop the ears, let them do it.&amp;nbsp;Because&amp;nbsp;of biological reasons, women are the ones who host the development of new&amp;nbsp;humans&amp;nbsp;beings in their bodies. Yes, nobody asked them, but that is just reality. So even though women do have the right to do anything they want to their body (arms, ears, liver, &amp;nbsp;lungs, etc), the new human baby developing in their womb is off-limits&amp;nbsp;because&amp;nbsp;anything damaging the baby inside is violating the baby&#39;s right to his/her body.&lt;br /&gt;
&lt;br /&gt;
This brings another popular excuse: the baby is not really a person and is just a fetus and equivalent to a liver or to a kidney and therefore has no rights. The baby inside feels pain, moves, has a brain, has a palpitating heart, digests food and breaths. To me, that pretty much shows he is a human child. I really don&#39;t understand when people give this excuse since most of that same people would rightly fight tooth-and-nail to protect a child that is outside the womb. One of the excuses is that the baby inside the womb is completely&amp;nbsp;dependent&amp;nbsp;on his/her mother and therefore cannot be classified as a person. This argument is moot if you consider that newborn babies are also 100% dependent on another human being for protection and for food and they are classified as&amp;nbsp;persons. I honestly do not see the difference between a newborn outside the womb and a child developing inside his/her mother. They are both humans and they both depend on their mothers to survive. They should have the same rights,&amp;nbsp;including&amp;nbsp;the most important one: the right to life. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/8192309205678518423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/8192309205678518423' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/8192309205678518423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/8192309205678518423'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2013/04/thoughts-on-how-to-prevent-abortions.html' title='Thoughts on how to prevent Abortions'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33256684.post-2975123349233879261</id><published>2013-04-01T21:47:00.002-04:00</published><updated>2013-04-01T21:47:50.438-04:00</updated><title type='text'>How to easily import data from SQL Server into PostgreSQL</title><content type='html'>&lt;b id=&quot;internal-source-marker_0.5576659005600959&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.5576659005600959&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;I was looking for an ETL software similar to SSIS that would allow me to easily move data from SQL Server to PostgreSQL. I tried using SSIS, but I was never able to make BIDS generated the schema of the destination table automatically like it would do with a SQL server destination table. &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.5576659005600959&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;I downloaded Pentaho’s Spoon data integrator and it surpised how easy it was to do it there. The designer is somewhat similar to BIDS. You drop your input tables (from SQL Server) and then you drop your destination tables (PostgreSQL tables). &lt;/span&gt;&lt;img height=&quot;148px;&quot; src=&quot;https://lh6.googleusercontent.com/l05XgbdWwaHEbIRKMulUP-9pptXT1K3IxXDQBQ3xkjjZ4Nb5w9GaThDatG8xn-3XfnrV1sZh9Tm9ZEVYAYq4bKcru9VaIrFrZbE6vqyevpj-ZACfCPGq2r4m_iLTes6_acY&quot; width=&quot;416px;&quot; /&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.5576659005600959&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The good thing is that you do not need to create the tables in PostgreSQL beforehand. You just need to create the destination database. When you open the properties of the Table Output, you can enter the name of the new table and then do the following to create the table based on the data input:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b id=&quot;internal-source-marker_0.5576659005600959&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;ol style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;font-family: Arial; font-size: 15px; list-style-type: decimal; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Click “Database Fields”&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;font-family: Arial; font-size: 15px; list-style-type: decimal; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Click “SQL”&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li dir=&quot;ltr&quot; style=&quot;font-family: Arial; font-size: 15px; list-style-type: decimal; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Click “Execute”&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;That’s it. Your table will be created in PostgreSQL using the correct data types.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Pentaho’s Spoon data integrator also have other nice features, such as Json input/output, Google Analytics input, Hadoop and SalesForce connectors, and more. The software is free and can be found at &lt;/span&gt;&lt;a href=&quot;http://www.pentaho.com/explore/pentaho-data-integration&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Calibri; font-size: 15px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;http://www.pentaho.com/explore/pentaho-data-integration&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;img height=&quot;538px;&quot; src=&quot;https://lh3.googleusercontent.com/3A8mDMalv97Miwluxo8JxHiSFojjVOu4jE3Er6nW7JwBvatqX8GjS99Ye8mKBvY2Jfgn1HGDNHGplbiW4s71YfaqTDDPZlV8virrnzIndJ6s4iAO8JJ1oYLOp3-2x-SXFoI&quot; width=&quot;624px;&quot; /&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://jptarqu.blogspot.com/feeds/2975123349233879261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33256684/2975123349233879261' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/2975123349233879261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33256684/posts/default/2975123349233879261'/><link rel='alternate' type='text/html' href='http://jptarqu.blogspot.com/2013/04/how-to-easily-import-data-from-sql.html' title='How to easily import data from SQL Server into PostgreSQL'/><author><name>Juan Pablo</name><uri>http://www.blogger.com/profile/12924039177095666058</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh6.googleusercontent.com/l05XgbdWwaHEbIRKMulUP-9pptXT1K3IxXDQBQ3xkjjZ4Nb5w9GaThDatG8xn-3XfnrV1sZh9Tm9ZEVYAYq4bKcru9VaIrFrZbE6vqyevpj-ZACfCPGq2r4m_iLTes6_acY=s72-c" height="72" width="72"/><thr:total>1</thr:total></entry></feed>