Tutorial by Examples

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...
In Haskell, functions can be partially applied; we can think of all functions as taking a single argument, and returning a modified function for which that argument is constant. To illustrate this, we can bracket functions as follows: (((plus) 1) 2) Here, the function (plus) is applied to 1 yiel...
As another example, we have the function map, which takes a function and a list of values, and applies the function to each value of the list: map :: (a -> b) -> [a] -> [b] Let's say we want to increment each value in a list. You may decide to define your own function, which adds one to...
Reagent is an interface between ClojureScript and react. It allows you to define efficient React components using nothing but plain ClojureScript functions and data, that describe your UI using a Hiccup-like syntax. Example:- (defn sample-component [] [:div [:p "I am a component!"...
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 ...
To use bokeh you need to launch a bokeh server and connect to it using a browser. We will use this example script (hello_world.py): from bokeh.models import ColumnDataSource from bokeh.plotting import figure from bokeh.io import curdoc def modify_doc(doc): """Add a plotted ...
Detailed instructions on getting tastypie set up or installed.
When declaring an annotation, meta-info can be included using the following meta-annotations: @Target: specifies the possible kinds of elements which can be annotated with the annotation (classes, functions, properties, expressions etc.) @Retention specifies whether the annotation is store...
ScriptAnalyzer ships with sets of built-in preset rules that can be used to analyze scripts. These include: PSGallery, DSC and CodeFormatting. They can be executed as follows: PowerShell Gallery rules To execute the PowerShell Gallery rules use the following command: Invoke-ScriptAnalyzer -Path /...
To run the script analyzer against a single script file execute: Invoke-ScriptAnalyzer -Path myscript.ps1 This will analyze your script against every built-in rule. If your script is sufficiently large that could result in a lot of warnings and/or errors. To run the script analyzer against a w...
To see all the built-in rules execute: Get-ScriptAnalyzerRule
var record = nlapiCreateRecord('customrecord_ennveeitissuetracker', { recordmode: 'dynamic' }); nlapiLogExecution('DEBUG', 'record', record); record.setFieldValue('custrecord_name1', name); record.setFieldValue('custrecord_empid', id); record.setFieldValue('custrecord_contactno', contactno); re...
Following script enters predefined strings on hotkey presses if the scroll lock is active. This can be useful if you often paste a number of repeating strings. Included hotkey for script refresh (for example if you need to edit paste-able strings). ; refresh script hotkey Numpad9:: GetKeyS...
SET v_column_definition := CONCAT( v_column_name ,' ',v_column_type ,' ',v_column_options ); SET @stmt := CONCAT('ALTER TABLE ADD COLUMN ', v_column_definition); PREPARE stmt FROM @stmt; EXECUTE stmt; DEALLOCATE PREPARE stmt;
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...
The pack() geometry manager organizes widgets in blocks before placing them in the parent widget. It uses the options fill, expand and side. Syntax widget.pack(option) Fill Determines if the widget keeps the minimal space needed or takes up any extra space allocated to it. Attributes: NONE (defa...
The grid() geometry manager organises widgets in a table-like structure in the parent widget. The master widget is split into rows and columns, and each part of the table can hold a widget. It uses column, columnspan, ipadx, ipady, padx, pady, row, rowspan and sticky. Syntax widget.grid(options) ...

Page 1207 of 1336