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
curl_setopt_array($curl, array( | |
CURLOPT_URL => "https://payflowpro.paypal.com", | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_ENCODING => "", | |
CURLOPT_MAXREDIRS => 10, | |
CURLOPT_TIMEOUT => 30, | |
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, | |
CURLOPT_CUSTOMREQUEST => "POST", | |
CURLOPT_POSTFIELDS => "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<XMLPayRequest Timeout=\"30\" version = \"2.0\">\r\n\t<RequestData>\r\n\t\t<Vendor>armeniatr*****</Vendor>\r\n\t\t<Partner>VeriSign</Partner>\r\n\t\t<RecurringProfiles>\r\n\t\t\t<RecurringProfile>\r\n\t\t\t\t<Add>\r\n\t\t\t\t\t<Tender>\r\n\t\t\t\t\t\t<Card>\r\n\t\t\t\t\t\t\t <CardNum>".$donation->getAccountNumber()."</CardNum>\r\n\t\t\t\t\t\t\t <ExpDate>".$donation->getExpiryYear().$donation->getExpiryMonth()."</ExpDate>\r\n\t\t\t\t\t\t\t</Card>\r\n\t\t\t\t\t</Tender>\r\n\t\t\t\t\t<RPData>\r\n\t\t\t\t\t\t<Name>".$donation->getFirstName()." ".$donation->getLastName()."</Name>\r\n\t\t\t\t\ |
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
{ | |
"schema": "", | |
"header": { | |
"search-input-3": { | |
"background-color": "", | |
"border": "" | |
}, | |
"contacts-2": { | |
"background-color": "", | |
"text-color": "", |
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
// registration | |
{ | |
"user": { | |
"email": "brig9@example.com", | |
"password": "12345678", | |
"password_confirmation": "12345678", | |
"accountable_type": "Organization", | |
"organization": { | |
"name": "Rostelecom", | |
"logo_uri": "some logo uri", |
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
def reset_user_password(conn, %{"email" => email} = _params) do | |
{ user, is_org } = | |
case Repo.get_by(Innovator, email: email) do | |
i = %Innovator{} -> | |
{ i, false } | |
_ -> | |
{ nil, nil } | |
end | |
{ user, is_org } = |
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
use Mix.Config | |
# For production, we often load configuration from external | |
# sources, such as your system environment. For this reason, | |
# you won't find the :http configuration below, but set inside | |
# StuffSwapWeb.Endpoint.init/2 when load_from_system_env is | |
# true. Any dynamic configuration should be done there. | |
# | |
# Don't forget to configure the url host to something meaningful, | |
# Phoenix uses this information when generating URLs. |
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
module Main exposing (..) | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
main : Program Never Model Msg | |
main = | |
Html.program | |
{ init = init |
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
private Bitmap drawOnImage() { | |
int inlineMargins = 20, initialY = 20, linesDrawn = 0; | |
// canvas points 1/72 of an inch | |
Bitmap bitmap = getClearBitmap(); | |
Canvas canvas = new Canvas(bitmap); | |
Paint paint = new Paint(); | |
Paint paintForComments = new Paint(); | |
paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD)); | |
paintForComments.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.ITALIC)); | |
paintForComments.setTextSize(14); |
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
// Searching for printer with specified MAC address | |
private class SearchTask extends AsyncTask<ActiveOrderRealm, Void, ActiveOrderRealm> { | |
private List<PortInfo> mPortList; | |
private String mMacAddress = "00:11:62:17:19:EF"; | |
private boolean mFound = false; | |
SearchTask() { | |
super(); | |
} |