Step by step guide to getting FsYacc and FsLex for development on OS X.
- 2017-01-09: Updated guide to reflect latest version of FsLexYacc (7.0.3)
- 2016: Created
By doing one of these:
- Recommended1: Via mono-project.com
#include <stdio.h> | |
#include <pthread.h> | |
#include <stdlib.h> | |
int is_prime(unsigned long long p){ | |
unsigned long long i; //For the loop | |
for (i = 2; i <= p-1; i++){ //Counts to the number before p | |
if (p % i == 0) { //If no remainder it divides and therefore a composite number |
# Finds greatest common divisor from 2 digits parsed from console | |
# Usage: ruby gcd.rb 5 2 | |
# Finds the greatest common divisor from the digits 5 and 2 | |
class GCD | |
$digits = Array.new | |
def initialize(args) | |
if args.length == 2 |
users = User.where('name IS NULL') | |
users.each do |user| | |
# Some api call which will retrive name of the user based on user email | |
name = API.getUserName user.email | |
if name.blank? | |
next | |
else | |
user.name = name | |
end | |
end |
package dk.itu.abhn.betterrandom; | |
/** | |
* BetterRandom is a better alternative to Javas' | |
* java.util.Random, as it generates a completely | |
* random number (that I picked). | |
* @author abhn@itu.dk | |
*/ | |
public class BetterRandom { | |
public void setExits(Room northExit, Room eastExit, Room southExit, Room westExit) { | |
this.northExit = northExit; | |
this.eastExit = eastExit; | |
this.southExit = southExit; | |
this.westExit = westExit; | |
} |
// Spørgsmål: | |
/* | |
Beskriv nogle regneudtryk (af type int eller double, med | |
operatorer såsom * + - / % osv) og nogle logiske udtryk (af type | |
boolean, med operatorer såsom == != < > <= >= ! && ||), hvordan de | |
udregnes og hvor de bruges. | |
*/ | |
// int og double (+ / -) | |
7 + 5 // = 12, to ints. Resultat er en int. |
package dk.itu.abhn.sandbox; | |
public class PlayWithBetterExceptions { | |
int[] someArray; | |
public PlayWithBetterExceptions() { | |
someArray = new int[]{1, 2, 3, 4, 5}; // array that is 5 elements long! | |
} | |
Step by step guide to getting FsYacc and FsLex for development on OS X.
By doing one of these:
using System; | |
using System.IO; | |
using System.Text; | |
class Solution { | |
static void Main(String[] args) { | |
var t = Convert.ToInt32(Console.ReadLine()); | |
for(var a0 = 0; a0 < t; a0++) { | |
var expression = Console.ReadLine(); |
#!/bin/sh | |
echo "andyersej" > original_file.txt | |
ln -s original_file.txt ./symlink | |
echo "Efter symlink: ls -l" | |
ls -l | |
ln original_file.txt ./hardlink |