Skip to content

Instantly share code, notes, and snippets.

View masaru-b-cl's full-sized avatar

TAKANO Sho / @masaru_b_cl masaru-b-cl

View GitHub Profile
@masaru-b-cl
masaru-b-cl / Program.cs
Created February 27, 2014 08:04
semicolonless FizzBuzz
class Program
{
static void Main(string[] args)
{
if (
System.Linq.Enumerable.ToList(
System.Linq.Enumerable.Select(
System.Linq.Enumerable.Range(1, 100),
n =>
n % 3 == 0 && n % 5 == 0 ? "FizzBuzz" :
@masaru-b-cl
masaru-b-cl / Program.cs
Created February 27, 2014 07:57
single semicolon FizzBuzz
class Program
{
static void Main(string[] args)
{
System.Linq.Enumerable.ToList(
System.Linq.Enumerable.Select(
System.Linq.Enumerable.Range(1, 100)
, n =>
n % 3 == 0 && n % 5 == 0 ? "FizzBuzz" :
n % 3 == 0 ? "Fizz" :
New python executable in /opt/kanon/bin/python2.7
Not overwriting existing python script /opt/kanon/bin/python (you must use /opt/kanon/bin/python2.7)
Installing distribute.................................done.
Complete output from command /opt/kanon/bin/python2.7 /opt/kanon/bin/easy_install pip:
/opt/kanon/bin/python2.7: can't open file '/opt/kanon/bin/easy_install': [Errno 2] No such file or directory
----------------------------------------
Traceback (most recent call last):
File "resource/virtualenv.py", line 1647, in <module>
main()
File "resource/virtualenv.py", line 558, in main
@masaru-b-cl
masaru-b-cl / Default.aspx.cs
Created December 21, 2013 06:57
One ASP.NET Calendar 2013 - Default.aspx.cs
using System;
using Microsoft.AspNet.FriendlyUrls;
namespace FriendlyURLsSample
{
public partial class Default : System.Web.UI.Page
{
protected void Greet_Click(object sender, EventArgs e)
{
@masaru-b-cl
masaru-b-cl / Greeting.aspx.cs
Created December 21, 2013 06:56
One ASP.NET Calendar 2013 - Greeting.aspx.cs
using System;
using System.Linq;
using Microsoft.AspNet.FriendlyUrls;
namespace FriendlyURLsSample
{
public partial class Greeting : System.Web.UI.Page
{
public string Name { get; private set; }
@masaru-b-cl
masaru-b-cl / Greeting.aspx
Created December 21, 2013 06:55
One ASP.NET Calendar 2013 - Greeting.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Greeting.aspx.cs" Inherits="FriendlyURLsSample.Greeting" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Greeting!</title>
</head>
<body>
@masaru-b-cl
masaru-b-cl / Default.aspx
Created December 21, 2013 06:54
One ASP.NET Calendar 2013 - Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="FriendlyURLsSample.Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Greeting!</title>
</head>
<body>
@masaru-b-cl
masaru-b-cl / Global.asax.cs
Created December 21, 2013 06:27
One ASP.NET Calendar 2013 - Global.asax.cs
using System;
using System.Web.Routing;
namespace FriendlyURLsSample
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
RouteConfig.RegisterRoutes(RouteTable.Routes); // <- FriendlyURLsを有効に
@masaru-b-cl
masaru-b-cl / RouteConfig.cs
Created December 21, 2013 06:27
One ASP.NET Calendar 2013 - RouteConfig.cs
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Routing;
using Microsoft.AspNet.FriendlyUrls;
namespace FriendlyURLsSample
{
public static class RouteConfig
{
@masaru-b-cl
masaru-b-cl / gist:8036060
Last active December 31, 2015 19:49 — forked from leque/gist:8035729
Common Lisp Scheme Haskell OCaml F# SML Ruby Smalltalk C#
mapc for-each mapM_ iter iter app each do: ForEach (List<T>のみ)
mapcar map map map map map map, collect collect: Select
find-if find find find find find find, detect detect: First
remove-if-not filter filter filter, find_all filter filter find_all, select select Where
reduce fold, fold-left foldl fold_left fold foldl inject inject:into: Aggregate
reduce :from-end t fold-right foldBack foldr fold_right foldr - - -
some any, exists any exists exists exists any? anySatisfy: Any
every every, for-all all for_all forall all all? allSatisfy: All