Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use latest"; | |
var Twitter = require('twitter'); | |
var handlebars = require('handlebars'); | |
var params = {screen_name: 'realDonaldTrump'}; | |
var view = `<html> | |
<head> | |
<title>Our favorite president tweets</title> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
namespace ConsoleApplication13 | |
{ | |
internal class Node | |
{ | |
public string Value { get; set; } | |
public List<Node> Children { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication5 | |
{ | |
internal class Program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class List<T>:IEnumerable<T> | |
{ | |
private readonly T _sentinel; | |
private readonly Node<T> _head; | |
public List() | |
{ | |
_head = new Node<T>(); | |
_sentinel = default(T); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IEnumerable<T> WhereByFilter<T>(this IEnumerable<T> collection, Expression filter) | |
{ | |
dynamic dynamicFilter = filter; | |
dynamic function = dynamicFilter.Compile(); | |
dynamic result = Enumerable.Where(collection, function); | |
return result; | |
} |