Skip to content

Instantly share code, notes, and snippets.

#Create client
client=PostalMethods::Client.new({:api_key=>"1sekret58"})
client.prepare!
@contact_postalcard = ContactPostalcard.new(params[:contact_postalcard])
@postalcard = Postalcard.find(@contact_postalcard.postalcard_id)
uploadtrue = 1
def return_search
report_start_date = build_date_from_params("start_date", params[:report])
report_end_date = build_date_from_params("end_date", params[:report])
puts report_start_date
puts report_end_date
@sent_emails = ContactEmail.all(:conditions => ['date_sent >= ? and date_sent <= ?', report_start_date, report_end_date])
@timfong888
timfong888 / text.txt
Created October 10, 2011 18:45
Response from target
The Problem
The number of donor organs available far exceeds the number of patients requiring a kidney (7800 patients waiting for an organ with just 2695 transplants taking place in the UK 2010/11). Therefore it is essential to utilise donor organs wisely. The best match between donor and recipient depends upon genetic similarity (tissue-type) and antibody status (which antibodies have been found to other peoples tissue-types)
Patients may have antibodies which will preclude them from even being considered for a kidney.
The problem we have at present is that not all antibodies defined seem to correlate with poor outcome. In other words, the tests we use to identify antibodies are far too sensitive but we have to be cautious and include them on a patient’s record. Furthermore antibody detection can vary for the same sample depending on which laboratory tests them.
Thus by comparing actual transplant successes and failures with the data produced by the tests, we are able to better correlate which antibody and

Allyforce Sample Model

This shows the complex relationships

Initial Data Model

  • Alliance Manager (am)

  • Sales Rep (rep)

  • Sales Organization (org)

  • Accounts (accounts)

require_relative "../iron.io/refactor_bot_response"
require_relative "../iron.io/survey_class"
# http://jakegoulding.com/presentations/rspec-structure/#slide-32
# https://railsadventures.wordpress.com/2013/09/25/11-steps-to-make-your-rspec-specs-awesome/
# https://semaphoreci.com/community/tutorials/rspec-subject-helpers-hooks-and-exception-handling
RSpec.describe Survey do
describe "#new for a repeating survey for bot_client_id = x" do
➜ code sudo apt-get install build-essential libssl-dev libffi-dev python-dev python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
python-dev is already the newest version.
libffi-dev is already the newest version.
libssl-dev is already the newest version.
python-pip is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
May 21, 2016

Reset everything

docker stop imply
docker rm imply
docker run -p 8081-8110:8081-8110 -p 8200:8200 -p 9095:9095 -d --name imply imply/imply:$implyversion
docker ps
@timfong888
timfong888 / MarkdownCustomWidget.dart
Last active May 15, 2022 20:19
Flutter Markdown Custom Widget Code in FF UI
import 'package:flutter_markdown/flutter_markdown.dart';
class MarkdownCustomWidget extends StatefulWidget {
const MarkdownCustomWidget({Key{NULL_SAFE_QUESTION_SENTINEL} key ,
this.width,
this.height,
this.markdownData, }) : super(key: key);
final double{NULL_SAFE_QUESTION_SENTINEL} width;
final double{NULL_SAFE_QUESTION_SENTINEL} height;
@timfong888
timfong888 / amplitudeflutterCustomAction.dart
Created May 15, 2022 21:24
AmplitudeFlutterCustomAction
import 'package:amplitude_flutter/amplitude.dart';
import 'package:amplitude_flutter/amplitude_web.dart';
import 'package:amplitude_flutter/constants.dart';
import 'package:amplitude_flutter/identify.dart';
import 'package:amplitude_flutter/web/amplitude_js.dart';
Future amplitudeAction(
BuildContext context,
String userID,
String page,
@timfong888
timfong888 / main.dart
Created July 20, 2022 20:25
Listener routing to named Route
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
FFAppState(); // Initialize FFAppState
GetSocial.addOnInitializedListener(() => {
// GetSocial SDK is ready to use
});