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
" # Vundle config {{{ | |
set nocompatible | |
filetype off | |
if has('win32') || has('win64') | |
if $HOME == 'K:\' " stupid workaround for cuna remapping my home location | |
set rtp+=C:\Users\wgi7748\vimfiles\bundle\vundle\ | |
call vundle#rc('C:\Users\wgi7748\vimfiles\bundle') | |
else | |
set rtp+=~/vimfiles/bundle/vundle/ | |
call vundle#rc('$HOME/vimfiles/bundle') |
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 java.util.Random; | |
import java.util.Scanner; | |
public class Main { | |
private static final String[] card_labels = | |
{"Q CLUBS ","Q SPADES ","Q HEARTS ","Q DIAMONDS ","J CLUBS ", | |
"J SPADES ","J HEARTS ","J DIAMONDS ","A DIAMONDS ","10 DIAMONDS","K DIAMONDS ","9 DIAMONDS ", | |
"8 DIAMONDS ","7 DIAMONDS ","A CLUBS ","10 CLUBS ","K CLUBS ","9 CLUBS ","8 CLUBS ", | |
"7 CLUBS ","A SPADES ","10 SPADES ","K SPADES ","9 SPADES ","8 SPADES ","7 SPADES ", | |
"A HEARTS ","10 HEARTS ","K HEARTS ","9 HEARTS ","8 HEARTS ","7 HEARTS " }; |
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
trait Pet { | |
fn make_noise(&self); | |
} | |
struct Dog { | |
name: ~str, | |
age: int, | |
breed: ~str | |
} |
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
void ellipses(Element el){ | |
final tempElement = el.clone(true); | |
if(el.getComputedStyle().overflow == 'hidden'){ | |
tempElement.style.position = 'absolute'; | |
tempElement.style.overflow = 'visible'; | |
tempElement.style.width = '${el.clientWidth}px'; | |
tempElement.style.height = 'auto'; | |
tempElement.style.maxHeight = 'none'; | |
el.insertAdjacentElement('afterEnd', tempElement); |
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
/* | |
* Solves the dining philosphers problem using manual syncronization. Also solves for any arbitrary number of philosophers, | |
* which can be changed by altering the NUM_PHILOSPHERS constant. | |
* | |
* Besides solving the original problem, this solution also implements fairness. | |
* | |
* http://en.wikipedia.org/wiki/Dining_philosophers_problem | |
*/ | |
using System.Threading; |
NewerOlder