Skip to content

Instantly share code, notes, and snippets.

View conectado's full-sized avatar

Gabi conectado

View GitHub Profile
@conectado
conectado / recursiveChildren.js
Last active November 16, 2017 05:45
Getting the children of a jQuery object recursively and applying a callback.
//Adding to jQuery prototype
//Recursively applies callback to all children of a given jQuery object.
(function ($) {
$.fn.recursiveChildren = function (callback) {
$(this).children().each(
function()
{
//If it has any children
if($(this).children.length > 0)
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace yourComplaint
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
}
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello World!");
});
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace yourComplaint.Controllers
{
public class HomeController : Controller
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace yourComplaint.Controllers
{
public class HomeController : Controller
<p>Hello World!! :)</p>