Tutorial by Examples: f

Every Heroku app runs in at least two environments: on Heroku (we’ll call that production) and on your local machine (development). If more than one person is working on the app, then you’ve got multiple development environments - one per machine, usually. Usually, each developer will also have a te...
For a C-style function call, e.g. plus(a, b); // Parentheses surrounding only the arguments, comma separated Then the equivalent Haskell code will be (plus a b) -- Parentheses surrounding the function and the arguments, no commas In Haskell, parentheses are not explicitly required for functi...
In the previous example, we didn't end up needing the parentheses, because they did not affect the meaning of the statement. However, they are often necessary in more complex expression, like the one below. In C: plus(a, take(b, c)); In Haskell this becomes: (plus a (take b c)) -- or equivale...
DB backup Database backup is a must before starting any Dynamics CRM upgrade process. This is mandatory as to always have the option to rollback in case of any major roadblock. Wrong Estimation DO NOT underestimate the work involved in a CRM Upgrade process. Audit your current Microsoft Dynamics...
Now, here are some common pitfalls which might come along your way when upgrading your Dynamics CRM system. The organisation database selected for the import is a different version than the organisation database that is currently deployedCRM Organization Database To fix this issue, we need to in...
Go to File -> Project Structure -> Modules. Add new Hibernate module. Right click on the desired module -> Add -> Hibernate. Select the newly created Hibernate configuration option, and click the (+) sign in the right pane to create hibernate.cfg.xml file. Go to File -> Project ...
Object1 := nil; Object2 := nil; try Object1 := TMyObject.Create; Object2 := TMyObject.Create; finally Object1.Free; Object2.Free; end; If you do not initialize the objects with nil outside the try-finally block, if one of them fails to be created an AV will occur on the finally bl...
Let's say you use Webpack for front end bundling. You can add webpack-dev-middleware to serve your statics through tiny and fast server. It allows you to automatically reload your assets when content has changed, serve statics in memory without continuously writing intermediate versions on disk. Pr...
This example helper class interacts with the finger print manager and performs encryption and decryption of password. Please note that the method used for encryption in this example is AES. This is not the only way to encrypt and other examples exist. In this example the data is encrypted and decryp...
The clj-time.coerce library can help converting other date-time formats to joda time format (clj-time.core/date-time). The other formats include Java long format, String, Date, SQL Date. To convert time from other time formats, include the library and use the from- function, e.g. (require '[clj-ti...
You can create a New Project in Android Studio and then add Kotlin support to it or modify your existing project. To do it, you have to: Add dependency to a root gradle file - you have to add the dependency for kotlin-android plugin to a root build.gradle file. buildscript { repositorie...
# ruby 1.92 lower_limit = 1 upper_limit = 6 Random.new.rand(lower_limit..upper_limit) # Change your range operator to suit your needs
public class NetworkConnection : IDisposable { string _networkName; public NetworkConnection(string networkName, NetworkCredential credentials) { _networkName = networkName; var netResource = new NetResource() {...
The first instrument you’ll look at is the Time Profiler. At measured intervals, Instruments will halt the execution of the program and take a stack trace on each running thread. Think of it as pressing the pause button in Xcode’s debugger.Here’s a sneak preview of the Time Profiler :- This scree...
cf logs AppName --recent Note, depending on who is hosting your CF app, the size of this log may be limited.
The If control statement allows different code to be executed depending upon the evaluation of a conditional (Boolean) statement. A conditional statement is one that evaluates to either True or False, e.g. x > 2. There are three patterns that can be used when implementing an If statement, which ...
Given the following class: public class FinalizableObject { public FinalizableObject() { Console.WriteLine("Instance initialized"); } ~FinalizableObject() { Console.WriteLine("Instance finalized"); } } A program that create...
Weak references are... references, to other objects (aka "targets"), but "weak" as they do not prevent those objects from being garbage-collected. In other words, weak references do not count when the Garbage Collector evaluates objects as "live" or "dead". T...
Implement Dispose() method (and declare the containing class as IDisposable) as a means to ensure any memory-heavy resources are freed as soon as the object is no longer used. The "catch" is that there is no strong guarantee the the Dispose() method would ever be invoked (unlike finalizers...

Page 413 of 457