Skip to content

Instantly share code, notes, and snippets.

Demis Bellot mythz

Block or report user

Report or block mythz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mythz
mythz / main.cs
Last active Jul 9, 2017 — forked from gistlyn/main.cs
What is going on?
View main.cs
var n = "1";
object value;
var hasDecimal = n.IndexOf('.') >= 0;
value = hasDecimal
? double.Parse(n)
: int.Parse(n);
System.Console.WriteLine($"{value} is {value.GetType().Name}");
@mythz
mythz / data.cs
Last active Nov 18, 2016 — forked from gistlyn/data.cs
OrmLite LoadSelect Example
View data.cs
using System.Collections.Generic;
using System.Data;
using ServiceStack;
using ServiceStack.OrmLite;
using ServiceStack.DataAnnotations;
public class Artist
{
public int Id { get; set; }
public string Name { get; set; }
@mythz
mythz / Afile.cs
Last active Jul 25, 2016 — forked from gistlyn/data.cs
OrmLite Reference Test Data
View Afile.cs
// Afile.cs
// Created by mythz on 2016/07/25
class File {
}
@mythz
mythz / data.cs
Last active Jul 23, 2016
OrmLite SELECT Examples
View data.cs
using System.Collections.Generic;
using ServiceStack.DataAnnotations;
public class Artist
{
public int Id { get; set; }
public string Name { get; set; }
[Reference]
public List<Track> Tracks { get; set; }
View fizzbuzz.bat
REM courtesy of https://github.com/nixha
@echo off
for /L %%I IN (1, 1, 100) DO (
call :OUTPUT %%I
)
pause
exit
@mythz
mythz / Cat.cs
Created Sep 10, 2011 — forked from anonymous/cat.coffee
Go and CoffeeScript examples of writing a file to stdout
View Cat.cs
using System;
public class File {
public string Name { get; set; }
public string Read() {
return System.IO.File.ReadAllText(Name);
}
}
class Program {
You can’t perform that action at this time.