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 random | |
def main(): | |
# create array of 500 elements | |
nums=[0]*500 | |
# populate each array element with a random int from 0-100 | |
for i in range(len(nums)): | |
nums[i]=random.randint(0, 100) | |
total=getTotal(nums) |
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 | |
$loggedin = false; | |
$error = false; | |
session_start(); | |
if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
$userName=addslashes($_POST['userName']); | |
$userPwd=addslashes($_POST['userPwd']); | |
$sql="SELECT * FROM users WHERE userName='$userName' and userPwd='$userPwd'"; | |
$result=mysql_query($sql); |
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 os = require('os'); | |
var methodNames = []; | |
for (var prop in os) { | |
if ( os.hasOwnProperty(prop) && typeof os[prop] === 'function') { | |
methodNames.push(prop) | |
} | |
} |
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 AudioToolbox | |
func loadAndPlaySounds() { | |
var path = NSBundle.mainBundle().bundlePath.stringByAppendingPathComponent("sounds") | |
if let fileNames = NSFileManager.defaultManager().contentsOfDirectoryAtPath(path, error: nil) as? [String] { | |
for fileName in fileNames { | |
var filePath = path.stringByAppendingPathComponent(fileName) | |
println("filePath = \(filePath)") |
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 NonMatchedAccountExporter { | |
public void run(List_MRK__c listID) { | |
Boolean moreToProcess = execute(listID); | |
while(moreToProcess = true) { | |
moreToProcess = execute(listID); | |
} | |
} | |
public Boolean execute(List_MRK__c listID) { |
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"?> | |
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()"> | |
<mx:HTML left="10" top="10" bottom="10" right="10" id="html"/> | |
<mx:Script> | |
<![CDATA[ | |
private function init():void { | |
html.addEventListener(Event.COMPLETE, this.htmlComplete); | |
html.htmlText = Helper.html(); | |
} |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Brian Pfeil"> | |
<!-- Date: 2010-05-20 --> |
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
{ | |
"id": "8d98e250-5e11-11e5-8d11-8912d003bf4f", | |
"complete": true, | |
"operation": "open-project", | |
"error": "Cannot read property 'path' of undefined", | |
"stack": "TypeError: Cannot read property 'path' of undefined\n at /Applications/MavensMate.app/Contents/Resources/app/node_modules/mavensmate/lib/mavensmate/commands/project/open-project.js:36:40\n at tryCatch2 (/Applications/MavensMate.app/Contents/Resources/app/node_modules/mavensmate/node_modules/bluebird/js/main/util.js:53:21)\n at Promise._resolveFromResolver (/Applications/MavensMate.app/Contents/Resources/app/node_modules/mavensmate/node_modules/bluebird/js/main/promise.js:544:13)\n at new Promise (/Applications/MavensMate.app/Contents/Resources/app/node_modules/mavensmate/node_modules/bluebird/js/main/promise.js:82:37)\n at Command.execute (/Applications/MavensMate.app/Contents/Resources/app/node_modules/mavensmate/lib/mavensmate/commands/project/open-project.js:25:10)\n at /Applications/MavensMate.app/Contents/Resources/app/no |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Brian Pfeil"> | |
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/ui-lightness/jquery-ui.css" type="text/css" media="screen" title="no title" charset="utf-8"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" charset="utf-8"></script> |
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 c = new forcetk.Client('<client_id>'); | |
c.login({ | |
'environment': 'test', | |
'client_id': '<client_id>', | |
'client_secret': '<client_secret>', | |
'username': 'joe@example.com', | |
'password': 'secret123' | |
}, function(data) { |
OlderNewer