Skip to content

Instantly share code, notes, and snippets.

View Diullei's full-sized avatar

Diullei Gomes Diullei

View GitHub Profile
(defn my-last [xs]
(if (= (count xs) 1)
(first xs)
(my-last (rest xs))))
require! [jison, util]
Parser = jison.Parser
_ = (expr) ->
rx = //
^function\s*\(\)\s*\{\s*
(
[\s\S]*
);
public class IUmaClasse<T>
{
public interface Usando<M>
{
T FazAlgo<M>();
}
}
public class ClassTeste : IUmaClasse<string>.Usando<bool>
{
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TestProject3
{
public interface IExecuteType<T>
{
bool IsExecuted { get; set; }
}
public class StringUtils {
public static boolean isBlank(String str) {
int strLen;
if (str == null || (strLen = str.length()) == 0) {
return true;
}
for (int i = 0; i < strLen; i++) {
if ((Character.isWhitespace(str.charAt(i)) == false)) {
return false;
}
(defn blank? [s] (every? #(Character/isWhitespace %) s))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Sample - Windows Form made in ClojureCLR
; Diullei Gomes
; diullei@gmail.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(System.Reflection.Assembly/LoadWithPartialName "System.Windows.Forms")
(import '(System.Windows.Forms MessageBox Form Button))
(import '(System.Windows.Forms Application))
(defstruct cliente :codigo :nome)
(defn blank? [s] (every? #(Char/IsWhiteSpace %) s))
(defstruct person :first-name :last-name)