For an example application that integrates this process, see my FullstackOverview repo on GitHub. The code in this example is taken directly from this app.
This component allows you have a custom styled file upload element.
///http://stackoverflow.com/questions/11830174/how-to-flatten-tree-via-linq | |
public static IEnumerable<T> Flatten<T>( | |
this IEnumerable<T> e, | |
Func<T,IEnumerable<T>> f) | |
{ | |
return e.SelectMany(c => f(c).Flatten(f)).Concat(e); | |
} |
var paths = [ | |
["Account"], | |
["Account", "Payment Methods"], | |
["Account", "Payment Methods", "Credit Card"], | |
["Account", "Payment Methods", "Paypal"], | |
["Account", "Emails"], | |
["Account", "Emails", "Main Email"], | |
["Account", "Emails", "Backup Email"], | |
["Account", "Devices"], | |
["Account", "Devices", "Google Pixel"], |
public ActionResult Grid(string FirstName, string LastName) | |
{ | |
GridHelper.Filters filter = new GridHelper.Filters("FirstName", "LastName"); | |
var _page =(!String.IsNullOrEmpty(HttpContext.Request.QueryString["page"])) ? Convert.ToInt32(HttpContext.Request.QueryString["page"]) : 1; | |
var _contacts = from c in testDB.Contacts | |
join ac in testDB.Account_Contact on c.ID equals ac.ContactID | |
where ac.AccountID == 725 | |
select c; |
Number.prototype.pad = function(size) { | |
var s = String(this); | |
while (s.length < (size || 2)) {s = "0" + s;} | |
return s; | |
} | |
(1).pad(3) // => "001" | |
(10).pad(3) // => "010" | |
(100).pad(3) // => "100" |
For an example application that integrates this process, see my FullstackOverview repo on GitHub. The code in this example is taken directly from this app.
This component allows you have a custom styled file upload element.
<!-- | |
Use this snippet to add a google map location chooser to your form | |
Step 1: Get a google map api key and insert it in the first javascript tag | |
Step 2: In your html form, create two hidden elements, one for latitude, and one for longitude. Give the elements ids and set the LATITUDE_ELEMENT_ID and LONGITUDE_ELEMENT_ID to the appropriate variables | |
Done! | |
--> |
DECLARE @tableName NVARCHAR(MAX), @schemaName NVARCHAR(MAX), @className NVARCHAR(MAX) | |
--------------- Input arguments --------------- | |
SET @tableName = 'Incidents' | |
SET @schemaName = 'dbo' | |
SET @className = 'IncidentDto' | |
--------------- Input arguments end ----------- | |
DECLARE tableColumns CURSOR LOCAL FOR | |
SELECT cols.name, cols.system_type_id, cols.is_nullable FROM sys.columns cols |
/* | |
*ngFor="let c of oneDimArray | sortBy:'asc'" | |
*ngFor="let c of arrayOfObjects | sortBy:'asc':'propertyName'" | |
*/ | |
import { Pipe, PipeTransform } from '@angular/core'; | |
import { orderBy } from 'lodash'; | |
@Pipe({ name: 'sortBy' }) | |
export class SortByPipe implements PipeTransform { |
// Includes a mini-program for checking and fixing files that have no extension | |
// Only checks for the most common types | |
// If you create a better version, please upload it here. | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
namespace AppendJPG | |
{ |
/* | |
Copyright (C) 2013 Richard Szalay | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, | |
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the | |
Software is furnished to do so. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | |
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |