Skip to content

Instantly share code, notes, and snippets.

View cfierbin's full-sized avatar

Cristina Fierbinteanu cfierbin

  • Bucharest, Romania
View GitHub Profile
import javafx.application.Platform;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Group;
import javafx.scene.Scene;
import javax.swing.*;
/**
* A custom {@link java.applet.Applet Applet} that sets-up a JavaFX environment.
*/
public class RadicalsAndLogarithms {
public static void main(String[] args) {
double result1 = Math.pow((double)27,(double)1/3);
//x^y = e^(y*ln(x))
//e^(3*ln(x)) = 27
//3*ln(x) = ln(27)
//ln(x) = 1/3(ln(27))
//x = pow (Math.E, ln(27)/3)
String[] team1 = {"frog","frog","frog"};
String[] team2 = {"owl", "owl", "frog", "owl"};
String[] team3 = {"frog","sheep","owl", "sheep"};
String[] team4 = {"sheep","frog", "owl"};
String[] op1 = {"x","x"};
String[] op2 = {"x","x","x"};
String[] op3 = {"x","x","x"};
String[] op4 = {"+","x"};
@cfierbin
cfierbin / FrogsSheepOwlsModel.java
Created November 29, 2015 09:04
Frogs, Sheep and Owls Modeling- First Sketch
class Frog{
static int number;
}
class Sheep{
static int number;
}
class Owl{
static int number;
@cfierbin
cfierbin / Maps.php
Last active January 22, 2016 08:49
<?php
$lunch = array('meat'=>'chicken',
'sideDish'=>'rice',
'salad'=>'beetroot',
'dessert'=>'pancakes');
foreach($lunch as $food=>$name){
echo $name.'<br />';
}
?>
function end(str, target) {
// "Never give up and good luck will find you."
// -- Falcor
//find position of first character of target in str
var last = lastMatch(str, target);
if ((last >= 0) && (target.length == str.length-last)){
for (var i=last+1; i<target.length-1; i++){
if (str[i] !== target [i-last]) {
package enums;
enum CardTypes {
CLUBS, // ♣
DIAMONDS,//♦
HEARTS, //♥
SPADES // ♠
}
public class playingCards {
{ "quotes":
[
{
"quote": "It is only with the heart that one can see rightly.",
"author": "Antoine de Saint-Exupery",
"tags": [ "inspiration", "success" ],
"category": "StExupery",
"title": "My Favourite Quote",
"id": ""
}
@cfierbin
cfierbin / quotesStep1.js
Created April 1, 2016 06:58
Angular 2 Random Quote Generator, Step 1
// import does not work in Codepen
// using const instead
const {Component, Inject} = ng.core;
const {bootstrap} = ng.platform.browser;
const {HTTP_PROVIDERS, Http, Response} = ng.http;
@Component({
selector: 'my-app',
template: '<h1>{{ quote }}</h1>'
})
@cfierbin
cfierbin / WindyAfternoon.html
Created April 26, 2016 06:46
Client Side of VoteMyHaiku App
<div>
<h2>Windy Afternoon</h2>
<p>Windy afternoon</p>
<p>Your smile</p>
<p>On a stranger's face</p>
<form action=http://votemyhaiku.azurewebsites.net/VoteMyHaiku/vote method=Get>
<input type=Submit name="smile" value="Like" class="my_button"/>