Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
I

ImHere2Learn

@ImHere2Learn
About
Posts
2
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Coding puzzle
    I ImHere2Learn

    I'm learning ES6:

    function* consec(array) {
    let arr = array.splice(0);

    while (arr.length > 0) {
    	let nextSeqIndex = arr.findIndex((v, i, a) => v != a\[0\] + i);
    	
    	if (nextSeqIndex === -1) return yield arr;
    	
    	yield arr.splice(0, nextSeqIndex);
    }
    

    }

    let array = [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 22];

    for (let sub of consec(array)) {
    console.log(sub);
    }

    code@repl.it[^]

    The Lounge csharp

  • The Laziness of LINQ
    I ImHere2Learn

    Why is that mate? It helps with little to no compromise, does it not?

    Dictionary> someDictionary = new Dictionary>()

    vs.

    var someDictionary = new Dictionary>()

    even

    var order = GetOrder(orderId)

    is hinting with (1) the variable name and (2) the function name and

    var users = account.Select(a => new { Name = a.FullName, Role = a.Role } )

    is simply cool. Or are you referring to things like the following?

    var money = 123m

    The Lounge csharp database linq
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups