This file contains hidden or 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 sequence = [1]; | |
var invocations = 0; | |
function main(args) { | |
invocations = 0; | |
var int = parseInt(args.num); | |
//num is a zero-based index | |
This file contains hidden or 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 openwhisk = require('openwhisk’); | |
function main(params) { | |
var wsk = openwhisk({ignore_certs: true}) | |
//do stuff | |
} |
This file contains hidden or 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
<html> | |
<head> | |
<link href="index.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<cfquery | |
name="statesQuery" | |
datasource="census" |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>HTML DOM Chart</title> | |
<style> | |
#chart1, | |
#chart2{ | |
border: 1px solid black; |
This file contains hidden or 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
Answered Questions (39) | |
-------------------------- | |
1. Steven Erat: I see that the Cordova project creation script lands some Jasmine Unit Testing code under {project}/www/spec/lib/jasmine1.2.0. This implies Jasmine UT is baked in, yet I can't find a definitive doc about getting started with UT for PhoneGap apps, with the exception of Adobe's Fil Maj whose blog links some presentations he's given about it. What would you recommend for unit testing PG apps? I've also found a blog on Ripple UT for PhoneGap. | |
* Raymo: As far as I know, the UTs that ship with Cordova are assuming you have your own test runner. I'm not necessarily sure we expect 'regular' folks (grin) to actually use them. To answer your second question about UTs and PG in genera, I think Jasmine would work great, and perhaps even Selenium. It isn't something I've used yet myself (with PG), but I'd imagine it would work the same as a desktop web app. (Or near close enough.) | |
2. Shawn Flanagan: As a new PhoneGap user, I have found it rather difficu |
This file contains hidden or 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
myFunction( param ) { | |
var emulated = window.tinyHippos != undefined; | |
if ( emulated ){ | |
//do something specific to emulated environment; | |
return; | |
} | |
///do something else... |
This file contains hidden or 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
Q: I need to pay to upload my app at the google play store or necesary i need to buy a google dev account? | |
A: Yes, while PG is free, you have to pay Google (and Apple, and MS) for a Dev Account. Google is cheap though - I think 20 bucks. | |
Q: lukas: i would like to ask when we use google maps api v3 in phonegap app, is there any way to do it a little bit faster? cause we are experiencing performance problems and for example caching of the maps area i have already seen is not functional | |
A: We do not control the Google Maps API. However, you can use any 3rd party javascipt API. I (Andy) have had a lot of success using Leaflet with Open Street Maps, however this is not the exact same API as Google. There isn't necessarily a technical reason that the Google API would not work, since it is contained within a webview. | |
To add to this - you can also use the Google Static Maps API. It doesn't allow zooming/panning, but it returns maps as simple graphics. | |
Q: if i make a php document on Dreamweaver can i get a p |
This file contains hidden or 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
Answered Questions (78) | |
-------------------------- | |
1. Steven Benjamin: How can I configure a splash screen, I am using PG 2.0.0 for Android.? | |
* Piotr Walczyszyn: You do it in Java code, here is snippet of my code: | |
public class MyGapActivity extends DroidGap | |
* Piotr Walczyszyn(privately): This line does the trick: super.setIntegerProperty("splashscreen", R.drawable.splash); | |
and you put your splash in drawable/{RES}/splash.png |
This file contains hidden or 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>JSON Transform</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/douglascrockford/JSON-js/master/json2.js"></script> | |
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet"></link> |
This file contains hidden or 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 _w = Math.max( $(window).width(), $(window).height() ); | |
var _h = Math.min( $(window).width(), $(window).height() ); | |
// assume tablet view based upon display resolution | |
var tabletView = (_w >= 1000 && _h >= 600); | |
if ( tabletView ) { | |
//Setup the tablet form factor via JS | |
} | |
else { |