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
<?xml version="1.0" encoding="UTF-8"?> | |
<journey> | |
<!-- sample transitions --> | |
<state id="1"> | |
<transition id="transition_11" event="onsubmit" target="2"/> | |
<html> | |
<head> | |
<title>Search</title> | |
</head> | |
<body> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<core:IFMLModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:core="http://www.omg.org/spec/20130218/core" xmlns:ext="http://www.omg.org/spec/20130218/ext" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" id="_QwKrAM7OEeOGsv3AxEnrmw" name="Movies"> | |
<interactionFlowModel id="_YON7gM7PEeOGsv3AxEnrmw" name="InteractionFlowModel"> | |
<interactionFlowModelElements xsi:type="ext:IFMLWindow" id="_BTIDUM7QEeOGsv3AxEnrmw" name="MovieList" isDefault="true"> | |
<viewElements xsi:type="ext:List" id="_LjeRwM7QEeOGsv3AxEnrmw" name="MovieList" inInteractionFlows="//@interactionFlowModel/@interactionFlowModelElements.3/@outInteractionFlows.0"> | |
<parameters id="_4Fxrgs7mEeOGsv3AxEnrmw" name="SelectedMovie"> | |
<type xsi:type="uml:Class" href="model.uml#__W1boJ6PEeGdnpRmAZh-dQ"/> | |
</parameters> | |
<viewElementEvents xsi:type="ext:OnSelectEvent" id="_js4hwM7QEeOGsv3AxEnrmw" name="Select a movie" viewElement="//@interactionFlowModel/@interactio |
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
var searchAttributes = ['form[action="/search"]','[class*="search"]','[name*="search"]','[id*="search"]','[type="search"]','[placeholder*="search"]']; |
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
pre { | |
// initial setup of the IFML model structure | |
var IFMLModel := new IFML!IFMLModel; | |
IFMLModel.id = "journey"; | |
IFMLModel.name = "journey"; | |
IFMLModel.contentModel := new IFML!ContentModel; | |
IFMLModel.contentModel.id = "ContentModel"; | |
IFMLModel.contentModel.name = "ContentModel"; | |
IFMLModel.interactionFlowModel := new IFML!InteractionFlowModel; | |
IFMLModel.interactionFlowModel.id = "InteractionFlowModel"; |
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
@namespace(uri="top", prefix="top") | |
package top; | |
@namespace(uri="http://www.omg.org/spec/IFML", prefix="ifml") | |
package ifml { | |
@namespace(uri="http://www.omg.org/spec/IFML/ext", prefix="ext") | |
package extensions { | |
class Form extends core.ViewComponent { | |
!ordered ref SubmitEvent[*] submitEvent; | |
} |
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
@namespace( | |
uri="HTML", | |
prefix="HTML") | |
package HTML; | |
class Model { | |
val HTMLHtmlElement HTMLHtmlElement; | |
} | |
abstract class HTMLHtmlElement { |
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
//casperjs | |
var casper = require('casper').create({ | |
pageSettings: { | |
webSecurityEnabled: false | |
}, | |
clientScripts: [] | |
//verbose: true, | |
//logLevel: "debug" | |
}); |
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 NumPy | |
from numpy import * | |
from matplotlib.pyplot import * | |
# add a line to print out floating point numbers to 3 decimal places | |
set_printoptions(precision=3) # float precision for printing | |
N = 100 # define number of random steps | |
P = 2*N+1 # define the number of positions |
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 itertools | |
import binascii | |
# R - red | |
# O - orange | |
# Y - yellow | |
# G - green | |
# B - blue | |
# I - indigo | |
# V - violet |
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 | |
// username and password sent from form | |
$myusername=$_POST['myusername']; | |
$mypassword=$_POST['mypassword']; | |
try { | |
// Connect to server and select database. | |
$db = new PDO("mysql:host=$host;dbname=$db_name", $username, $password); | |
$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); |
NewerOlder