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
module Main where | |
import System.Random | |
import Text.Read (readMaybe) | |
main::IO() | |
main = do | |
limit <- getPositiveInteger "Give me the secret number limit :" | |
gen <- newStdGen | |
let secretNumber = chooseSecretNumber gen limit |
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
#!/bin/bash | |
FOLDER_DOES_NOT_EXIST=1 | |
FOLDER_LACKS_SOME_SUBFOLDERS=2 | |
PROMPT_EMPTY=3 | |
# Getting the source folder | |
echo -n "What is the android resource pack root folder (the one that has the pictures to be copied) ? ($PWD) " | |
read srcFolder |
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
fn main() { | |
let (a,b) = (10, 20); | |
println!("Before swapping : a = {} and b = {}.", a, b); | |
let (b,a) = (a,b); | |
println!("After swapping : a = {} and b = {}.", a, b); | |
} |
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
fn main() { | |
let name_reversed:String = "Loloof64".chars().rev().collect(); | |
println!("{}", name_reversed); | |
} |
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
#include <iostream> | |
#include <cstdarg> | |
#include <limits> | |
using namespace std; | |
double myAdd(double a, double b, ...); | |
int main() | |
{ |
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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <functional> | |
template <typename T> | |
void traceVectorValues(const std::vector<T> &); | |
template <typename T> | |
void transformVectorWithUnaryFunction(std::vector<T> &, std::function<T(T)>); |
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
import React, { Component } from 'react'; | |
import { StyleSheet, View, Animated, PanResponder, UIManager, findNodeHandle } from 'react-native'; | |
import _ from 'underscore'; | |
class Square { | |
constructor(value, x, y, cellsSize) { | |
this.value = value; | |
this.pan = new Animated.ValueXY(); | |
this.cellsSize = cellsSize; |
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
#include <iostream> | |
#include <sstream> | |
#include <streambuf> | |
#include <string> | |
class OStringStreamListener | |
{ | |
public: | |
virtual void consume(const std::string &input) = 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Find the precious</title> | |
</head> | |
<body> | |
<header> | |
<nav id="main_menu"> | |
<ul> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Captured fellow</title> | |
<link rel="stylesheet" href="./styles/main.css" /> | |
</head> | |
<body> | |
<div class="reward"> | |
<img src="./images/gandalf.png" alt="fellow_photo" /> |
OlderNewer