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
/* play.c */ | |
#include "mp2.h" | |
/***************************************************************** shuffle *****************************************************************************************/ | |
void shuffle(int cards[][12], int num_cards[], int drawnDeck[]) | |
{ |
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
villo.ajax = function (url, modifiers) { | |
//Set up the request. | |
var vAJ = new XMLHttpRequest(); | |
if (vAJ) { | |
var request = new XMLHttpRequest(); | |
if ("withCredentials" in request) { | |
//Good Browsers | |
//Line up the variables to be sent. | |
var sendingVars = ""; |
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
store = { | |
set: function(name, value, days){ | |
var expires = "" | |
if (days) { | |
var date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); | |
} | |
document.cookie = name+"="+value+expires+"; path=/"; | |
}, |
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 mmo = new villo.Game({ | |
//Give it some name. This doesn't really make a big difference: | |
name: "mmo", | |
//The type defines how it behaves. All is a safe type to use in most cases. | |
type: "all", | |
//This defines what features we want to import. In this example, we're only using data. | |
use: ["data"], | |
//Define some events for the system: | |
events: { | |
//Define the function that is called when data data is received from the data.interval function later on. |
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
enyo.Book.transition({ | |
name: "slade", | |
auto: true, | |
directional: true, | |
transition: { | |
duration: 500, | |
next: { | |
visible: { | |
opacity: 1, | |
transform: { |
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
enyo.Book.transition({ | |
//Name of the transition: | |
name: "everything", | |
//Using this will set up the step function, automatically transitioning between values. | |
//If you don't set this as true, you're expected to provide your own step function. | |
auto: true, | |
//Set it up to use next/back animations. | |
directional: true, | |
//Set the easing function. The default is enyo.easing.quadInOut. You can also define your own easing function here. | |
easing: enyo.easing.quadInOut, |
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 net.keenstudios.orient; | |
import org.apache.cordova.api.PluginResult; | |
import org.json.JSONArray; | |
import android.content.Intent; | |
import android.content.pm.ActivityInfo; | |
import android.net.Uri; | |
import android.os.Environment; | |
import com.phonegap.api.Plugin; |
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
// Create a new YUI instance and populate it with the required modules. | |
YUI().use('node', 'event', function (Y) { | |
// Node is available and ready for use. Add implementation | |
// code here. | |
var allPanels = Y.all('.accordeonContainer > .accordeonContent').hide(); | |
var panelHeaders = Y.all('.accordeonContainer > h2'); | |
panelHeaders.on('click', function(e) { | |
//Get the parent node: |
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
//Create app view: | |
fact.view('app', { | |
//called on render of the view: | |
render: function(elem){ | |
//Set up the fact.js router with the app view. We could make this call anywhere, such as after the render, but it's easy here because we have reference to the just-created element (elem). | |
fact.router({ | |
//The element that we want the router to apply to. In this case, it's the outlet | |
element: elem.$('.outlet'), | |
//Routes that we specify: |
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 { registerExtension } from './extensionManager'; | |
function createNamespacingMiddleware(reducerKey, reducerNamespace) { | |
return () => next => (action) => { | |
const namespacedAction = action; | |
namespacedAction.meta = { | |
...action.meta, | |
withNamespace: { | |
reducerKey, |
OlderNewer