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
package in.mally.volleytest; | |
import java.util.ArrayList; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ArrayAdapter; | |
import android.widget.TextView; |
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
$ make test | |
/usr/local/bin/crystal run test/*_test.cr | |
Error in ./test/git_resolver_test.cr:1: while requiring "./test_helper" | |
require "./test_helper" | |
^ | |
in ./test/test_helper.cr:1: while requiring "minitest/autorun": can't find file 'minitest/autorun' relative to '/Users/vjdhama/Work/github_codes/shards/test' | |
require "minitest/autorun" |
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
# Returns a File::Stat object for the named file or raises | |
# `Errno::ENOENT` (See `File::Stat`) | |
# | |
# ``` | |
# echo "foo" > foo | |
# File.stat("foo").size #=> 4 | |
# File.stat("foo").mtime #=> 2015-09-23 06:24:19 UTC | |
# ``` | |
def self.lstat(path) | |
if LibC.lstat(path, out stat) != 0 |
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
$ make clean crystal | |
rm -rf .build | |
rm -rf ./doc | |
rm -rf src/llvm/ext/llvm_ext.o | |
c++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc ` --cxxflags` | |
/bin/bash: --cxxflags: command not found | |
src/llvm/ext/llvm_ext.cc:1:10: fatal error: 'llvm-c/Core.h' file not found | |
#include <llvm-c/Core.h> | |
^ | |
1 error generated. |
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
# Code | |
if Dir.exists?(name) || File.exists?(name) | |
STDERR.puts "file or directory #{name} already exists" | |
puts opts | |
exit 1 | |
end | |
# Spec |
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
if some_condition | |
name = "foo" #=> String | |
else | |
name = false #=> Boolean | |
end |
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
def add(x, y) | |
x + y | |
end | |
def add(x : String, y : Int32) | |
x + y.to_s | |
end | |
add(1, 2) |
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
def add(x, y) | |
x + y | |
end | |
add(1, 2) | |
add("foo", "bar") | |
add("foo", 1) |
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
struct Vehicle | |
property speed | |
property color | |
def initialize(@speed, @color) | |
end | |
end |
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
def add(x : Int32, y : Int32) | |
x + y | |
end |