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
//enform specific code | |
require_once("../../lib/EnformSOAPClient.php"); | |
$enf = new EnformSOAP(); | |
$modulesComplete = array(); | |
//just for PST and CSTS - because CSTS isn't a 'real' course we actually send completion for PST, odd I know | |
if($course->id == 104 || $course->id== 87) | |
{ | |
$ers = $db->Execute("SELECT gi.itemname FROM mdl_grade_grades g, mdl_grade_items gi WHERE g.itemid = gi.id and g.userid={$USER->id} AND g.itemid IN (157,159,160,161)"); | |
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
Features: | |
Features test\MavenThought.MediaLibrary.Acceptance.Tests\bin\Debug\MavenThoug | |
ht.MediaLibrary.Acceptance.Tests.dll | |
tools\nunit\nunit-console.exe /nologo test\MavenThought.MediaLibrary.Acceptan | |
ce.Tests\bin\Debug\MavenThought.MediaLibrary.Acceptance.Tests.dll | |
ProcessModel: Default DomainUsage: Single | |
Execution Runtime: net-2.0.50727.4952 | |
drop table if exists "Movie" |
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 | |
/* | |
SOAP client to EnForm | |
This uses PHP5 built-in SoapClient | |
*/ | |
if(!defined("HSE_PATH")) define("HSE_PATH", str_replace("/utils/cw_soap","",dirname(__FILE__))); | |
class EnformSOAP { |
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
require 'soap/wsdlDriver' | |
require 'rubygems' | |
require 'mysql' | |
con = Mysql::connect("HOST", "USER", "PASSWORD", "DATABASE") | |
wsdl = 'http://enform.ca/externalCompletion/Service.svc?wsdl' | |
driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver | |
key = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" | |
sql = "select firstname, | |
lastname, |
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
{ | |
"translatorID":"6ec8008d-b206-4a4c-8d0a-8ef33807703b", | |
"label":"The Economist", | |
"creator":"Michael Berkowitz", | |
"target":"^http://(www\\.)?economist\\.com/", | |
"minVersion":"1.0.0b4.r5", | |
"maxVersion":"", | |
"priority":100, | |
"inRepository":"1", | |
"translatorType":4, |
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
//silly | |
string result = Enumerable.Range(0, 100).Aggregate("", (current, nextValue) => | |
{ | |
if (nextValue % 3 != 0 && nextValue % 5 != 0) | |
{ | |
current += nextValue; | |
} | |
if (nextValue % 3 == 0) | |
{ | |
current += "Fizz"; |
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 the results table | |
$(".bottomframe").append("<table id='results'><tr><th>Latitude</th><th>Logitude</th></tr></table>"); | |
//only do one request at a time | |
$.ajaxSetup({async:false}); | |
//perform the lookup | |
$.post("http://www.ags.gov.ab.ca/gis/map_converters/Convert_ATS_CGI.exe", {FTN:0, FTW:0, ILN: 5, IMN:4,IRN:3,ISN:1, ITN: 2, SPS: 'C'}, | |
function(data){ | |
var latitude = $($(data).find("td[colspan=3]")[0]).text(); |
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
[Test] | |
public void The_database_should_be_called() | |
{ | |
ContainerBuilder builder = new ContainerBuilder(); | |
var mockDrivingAlertRepository = new Mock<IDrivingAlertRepository>(); | |
mockDrivingAlertRepository.Setup(x => x.GetDrivingTimeAlertByAlertID(It.IsAny<int>())).Returns(new CustomerEntities.DrivingTimeAlert()); | |
builder.RegisterInstance<IDrivingAlertRepository>(mockDrivingAlertRepository.Object); | |
var handler = new Alerting.Handlers.DrivingTimeHandler(null, null, null, null, builder.Build()); |
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"?> | |
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Target Name="Build"> | |
<CreateProperty Value="firstValue"> | |
<Output | |
TaskParameter="Value" PropertyName="LocalProp" /> | |
</CreateProperty> | |
<Message Text="New value: $(LocalProp)" /> |
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 text = currentCall.initialText; | |
call(currentCall.callerID, | |
{ | |
network:"PSTN", | |
onAnswer: function() | |
{ | |
say(text); | |
} | |
}); |
OlderNewer