Masonry is a library for objective-c but xamarin have created a binding for it and created it as a nuget package https://www.nuget.org/packages/Masonry/.
Nuget install
Install-Package Masonry
This centers a button 100 points below the centre point of the containing view and sets a width between...
Auditing is an Alfresco feature that allows the user to trace and log some specific events during ECM platform usage.
Enable auditing
To enable auditing you have to add some lines of configuration to the alfresco-global.properties file, which resides in tomcat/shared/classes/
audit.enabled = true...
Suppose you are searching for a Title Case pattern in a large text file and you want to edit a incorrect regular expression:
First, go into Ex mode by typing q:
You will now see all the commands that you typed in commandline mode, press j to go the regular expression you want to edit (/\v[A-Z]\w...
A Sample class diagram based on which we will see JPA implementation.
@Entity
@Table(name = "VEHICLE")
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "VEHICLE_TYPE")
public abstract class Vehicle {
@TableGenerator(name = "VEHICLE_GE...
The following code can be found in a demo here: https://ellie-app.com/mbFwJT9jD3/0
import Html exposing (..)
import Json.Decode exposing (Decoder)
payload =
"""
[{
"id": 0,
"name": "Adam Carter",
"work": "Uni...
A letter with a diacritic may be represented with the letter, and a combining modifier letter. You normally think of é as one character, but it's really 2 code points:
U+0065 — LATIN SMALL LETTER E
U+0301 — COMBINING ACUTE ACCENT
Similarly ç = c + ¸, and å = a + ˚
combined forms
To compl...
public ActionResult Index()
{
//Redirects to another action method by using its URL.
return new RedirectResult("http://www.google.com");
}
Action methods typically return a result that is known as an action result. The ActionResult class is the base class for all action resu...
public ActionResult PopulateFoods()
{
// Redirects to another action method. In this case the index method
return RedirectToAction("Index");
}
Action methods typically return a result that is known as an action result. The ActionResult class is the base class for all action ...
Assuming that you are running redis server on localhost you can type command
redis-cli
After this command appear redis command line prompt
127.0.0.1:6379>
The following example is a very useful basis when you are trying to convert transaction data to un-pivoted data for BI/reporting reasons, where the dimensions which are to be un-pivoted can have a dynamic set of columns.
For our example, we suppose that the raw data table contains employee assessme...
mongodump --db mydb --gzip --out "mydb.dump.$(date +%F_%R)"
This command will dump a bson gzipped archive of your local mongod 'mydb' database to the 'mydb.dump.{timestamp}' directory
FOR XML PATH and STUFF to concatenate the multiple rows into a single row:
select distinct t1.id,
STUFF(
(SELECT ', ' + convert(varchar(10), t2.date, 120)
FROM yourtable t2
where t1.id = t2.id
FOR XML PATH (''))
, 1,...
This can be done in 3 steps :
You must define an elixir module which use Ecto.Repo and register your app as an otp_app.
defmodule Repo do
use Ecto.Repo, otp_app: :custom_app
end
You must also define some config for the Repo which will allow you to connect to the database. Here is an...
Overloading the disconnect function allows you to handle what to do when a user disconnects.
public override Task OnDisconnected(bool stopCalled)
{
//Your disconnect logic here
return base.OnDisconnected(stopCalled);
}
/// <summary>
/// Overrides the onDisconnected function and sets the user object to offline, this can be checked when other players interacts with them...
/// </summary>
/// <param name="stopCalled"></param>
/// <returns></returns>...
AppleScript can display dialogs and alerts to the user. Dialogs are for optionally requesting user input.
display dialog "Hello World"
display alert "Hello World"
You can customise the buttons of either using buttons and passing a list of text.
display dialog "Hell...
#lang racket
(for ([path (in-directory)]
#:when (regexp-match? #rx"[.]rkt$" path))
(printf "source file: ~a\n" path))
The #lang line specifies the programming language of this file. #lang racket we are using the baseline, battery-included Racket programming language. O...