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 | |
//Url for column metadata | |
$urlColumns = "http://data.austintexas.gov/api/views/ecmv-9xxi/columns.json"; | |
$curlColumns = curl_init($urlColumns); | |
curl_setopt($curlColumns, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_HTTPHEADER, array('X-App-Token: GQXtcmDiC3Qjcoys9iwCI8esO', 'Content-Type: application/json')); | |
$json_columns = curl_exec($curlColumns); | |
$status = curl_getinfo($curlColumns, CURLINFO_HTTP_CODE); |
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 'faraday_middleware' | |
require 'json' | |
connection = Faraday.new 'http://data.austintexas.gov' do |conn| | |
conn.request :json | |
conn.response :json, :content_type => /\bjson$/ | |
conn.adapter Faraday.default_adapter | |
end | |
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
from postgres.orm import Model | |
from postgres import Postgres | |
class Foo(Model): | |
typname = "foo" | |
class FooRepository(connection_string): | |
def __init__(self): | |
self.db = Postgres(connection_string) | |
self.db.register_model(Foo) |
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
public class Child | |
{ | |
public string ParentPopertyName { get; set; } | |
} | |
public class Parent: INotifyPropertyChanged | |
{ | |
public Parent() | |
{ | |
this.PropertyChanged += Parent_PropertyChanged; |
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
public ActionResult DPM() | |
{ | |
String ApiLogin = "Your_login_id"; | |
String TxnKey = "Your_transaction_key"; | |
String checkoutform = DPMFormGenerator.OpenForm(ApiLogin, TxnKey, 2.25M, | |
"https://YOUR_RELAY_RESPONSE_URL", true); | |
// Add a credit card number input field | |
checkoutform = checkoutform + @"<p><div style='float:left;width:250px;'><label>Credit Card |
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
@using (Html.BeginDirectPostForm("ApiLogin", "TransactionKey", 2.25M, "https://YOUR_RELAY_RESPONSE_URL", true)) | |
{ | |
<p> | |
<div style='float: left; width: 250px;'> | |
<label> Credit Card Number </label> | |
<div id='CreditCardNumber'> | |
<input type='text' size='28' name='x_card_num' | |
value='4111111111111111' id='x_card_num' /> | |
</div> | |
</div> |
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
public static class FormExtensions | |
{ | |
private class DirectPostForm : IDisposable | |
{ | |
private readonly HtmlHelper _helper; | |
public DirectPostForm(HtmlHelper helper, string apiLogin, string transactionKey, decimal amount, | |
string returnUrl, bool isTest) | |
{ | |
_helper = helper; |
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
layout = | |
"{\"elements\": [" + | |
"{" + | |
"\"typeName\": \"Orchard.Layouts.Elements.Html\"," + | |
"\"data\": \"Content=" + Encode(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
var layout = new JObject("elements", | |
new JArray( | |
new JObject( | |
new JProperty("typeName", "Orchard.Layouts.Elements.Html"), | |
new JProperty("data", string.Format("Content={0}", Encode(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
<PropertyGroup> | |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
<ExcludeFoldersFromDeployment>node_modules</ExcludeFoldersFromDeployment> | |
</PropertyGroup> |
OlderNewer