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 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. | |
*/ |
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
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) |
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
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"}; | |
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
class Frog{ | |
static int number; | |
} | |
class Sheep{ | |
static int number; | |
} | |
class Owl{ | |
static int number; |
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
<?php | |
$lunch = array('meat'=>'chicken', | |
'sideDish'=>'rice', | |
'salad'=>'beetroot', | |
'dessert'=>'pancakes'); | |
foreach($lunch as $food=>$name){ | |
echo $name.'<br />'; | |
} | |
?> |
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 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]) { |
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 enums; | |
enum CardTypes { | |
CLUBS, // ♣ | |
DIAMONDS,//♦ | |
HEARTS, //♥ | |
SPADES // ♠ | |
} | |
public class playingCards { |
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
{ "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": "" | |
} |
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 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>' | |
}) |
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
<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"/> |