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 <stdio.h> | |
#include <limits.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <assert.h> |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace FibonacciHeap | |
{ | |
public class StreamParser |
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
private const int BufferSize = 4096; | |
private static readonly char[] Buffer = new char[BufferSize]; | |
static void ReadInput(StreamReader reader) | |
{ | |
int count, read = 0; | |
while ((count = reader.ReadBlock(Buffer, read, BufferSize)) > 0) | |
{ | |
var index = 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
private static void Cut(FibTree<T> tree, FibNode node) | |
{ | |
if (tree == null) | |
throw new ArgumentNullException(nameof(FibTree<T>)); | |
while (node != null) | |
{ | |
var parent = node.Parent; | |
if (parent == null) | |
return; |
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
function [ Output ] = CrossVal(Name1,Name1L,Par1,Name2,Name2L,Par2,Pat,DOut,k,~) | |
if nargin < 9 | |
error("Wrong number of parameters. Expected at least 9."); | |
end | |
if nargin == 9 | |
% Shuffle the input set | |
perm = randperm(size(Pat,2)); | |
Pat = Pat(:,perm); | |
DOut = DOut(perm); |
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
function [ delta, s ] = CrossVal(Name1,Name1L,Par1,Name2,Name2L,Par2,Pat,DOut,k,NoShuffle) | |
if nargin < 9 | |
error("Wrong number of parameters. Expected at least 9."); | |
end | |
if nargin == 9 | |
% Shuffle the input set | |
perm = randperm(size(Pat,2)); | |
Pat = Pat(:,perm); | |
DOut = DOut(perm); |
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 cz.sokoban4j.simulation.board.minimal; | |
import cz.sokoban4j.simulation.board.compact.BoardCompact; | |
import cz.sokoban4j.simulation.board.compact.CTile; | |
import cz.sokoban4j.simulation.board.compressed.StateCompressed; | |
import cz.sokoban4j.simulation.board.oop.Board; | |
/** | |
* Runtime-part of the Sokoban game state (excluding static board configuration, just positions). | |
* <p> |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace MyProject | |
{ | |
class Program |
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 Text.Read | |
import Control.Monad | |
import Control.Monad.State | |
import System.Random | |
---------------- | |
-- Structures -- | |
---------------- | |
data Symbol = Circle | Cross deriving (Show, Read, Eq, Enum) |
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 <stdio.h> | |
int | |
main (int argc, char *argv[]) { | |
const int i = 2; | |
const int * const pi = &i; | |
int *xi; | |
xi = (int *)pi; |