Tutorial by Examples: asp

In addition to predicates functioning as specs, you can register a spec globally using clojure.spec/def. def requires that a spec being registered is named by a namespace-qualified keyword: (clojure.spec/def ::odd-nums odd?) ;;=> :user/odd-nums (clojure.spec/valid? ::odd-nums 1) ;;=> tru...
This script, from here and here, will return all Tables and Columns where a specified value exists. This is powerful in finding out where a certain value is in a database. It can be taxing, so it is suggested that it be executed in a backup / test enviroment first. DECLARE @SearchStr nvarchar(100) ...
In /res/values/strings.xml: <string-array name="spinner_options"> <item>Option 1</item> <item>Option 2</item> <item>Option 3</item> </string-array> In layout XML: <Spinner android:id="@+id/spinnerName" ...
Create a new httpHandler inside your ASP.NET project. Apply the following code (VB) to the handler file: Public Class AttachmentDownload Implements System.Web.IHttpHandler Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest ' pass an ID thr...
Simple item insertion can be done with Array.prototype.splice method: arr.splice(index, 0, item); More advanced variant with multiple arguments and chaining support: /* Syntax: array.insert(index, value1, value2, ..., valueN) */ Array.prototype.insert = function(index) { this.splice.a...
//Creates a Random instance with a seed of 12345. Random random = new Random(12345L); //Gets a ThreadLocalRandom instance ThreadLocalRandom tlr = ThreadLocalRandom.current(); //Set the instance's seed. tlr.setSeed(12345L); Using the same seed to generate random numbers will return the sa...
By overloading the indexer you can create a class that looks and feels like an array but isn't. It will have O(1) get and set methods, can access an element at index 100, and yet still have the size of the elements inside of it. The SparseArray class class SparseArray { Dictionary<...
Currently there is no one-click-button method to actually enforce any code style guidelines across a team but there are two methods to make sure a certain code style is applied to your product. Import PhpStorm Code Style Schemes The first and more easier solution is to set up a code style scheme o...
Common Requirements All reports, regardless of how the data is presented, take a path to the report template and a parameter map. The variables are used in all examples that follow: // Parameters passed into the report. Map<String, Object> parameters = new HashMap<>(); // Arbitrary...
You may sometimes want to change the size of a split or vsplit. To change the size of the currently active split, use :resize <new size>. :resize 30 for example would make the split 30 lines tall. To change the size of the currently active vsplit, use :vertical resize <new size>. :vert...
public void ConfigureServices(IServiceCollection services) { services.AddCors(o => o.AddPolicy("MyPolicy", builder => { builder.AllowAnyOrigin() .AllowAnyMethod() .AllowAnyHeader(); })); // ... } public void Configur...
public void ConfigureServices(IServiceCollection services) { services.AddMvc(); services.AddCors(); services.ConfigureCors(options => options.AddPolicy("AllowSpecific", p => p.WithOrigins("http://localhost:1233") ...
.jrxml is the report design file, it's format is in human readable XML, it can be complied into a JasperReport object and saved as a .jasper .jasper is the compiled version of the .jrxml and can be loaded directly into a JasperReport object ready to be filled with data .jrprint is the se...
A sprite sheet by definition is a bitmap that contains a certain animation. Old games use grid type sprite sheet, that is, every frame occupies an equal region, and frames are aligned by the edges to form a rectangle, probably with some spaces unoccupied. Later, in order to minimize the bitmap size,...
You can change the url of an existing remote by the command git remote set-url remote-name url
https://github.com/jaymedavis/stripe.net is a great starting point. Assuming you are using MVC w/Razor you need to have a few things in your View page <script type="text/javascript" src="https://js.stripe.com/v2/"></script> This script calls upon the stripe.js t...
When editing text, a common task is to navigate to a particular word on the screen. In these examples we explore how we can navigate to the word updated. For the sake of consistency across the examples, we aim to land on the first letter of the word. Mid-screen jump M$B This approach is quick...
-- Identity primary key - unique arbitrary increment number create table person ( id int identity(1,1) primary key not null, firstName varchar(100) not null, lastName varchar(100) not null, dob DateTime not null, ssn varchar(9) not null )
You can obtain the url for an existing remote by using the command git remote get-url <name> By default, this will be git remote get-url origin

Page 3 of 8