Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@raison00
raison00 / culinary-video-streaming.as
Created January 8, 2021 01:24
Culinary Council Streaming Video Content
var swfPath:String = insecureHost+"/media/campaign/videoplayer/player_283x213.swf";
//swfPath = "player_283x213.swf";
_global.insecureHost = insecureHost;
var xmlPath:String = _global.insecureHost+"/img/campaign/cc/xml/chefvideo.xml";
//var xmlPath = "chefvideo.xml";
//var url1:String = "http://macys.edgeboss.net/flash/macys/cc/4513_rick768.flv";
//var url0:String = "http://macys.edgeboss.net/flash/macys/cc/4513_tom768.flv";
@raison00
raison00 / believe-o-meter.xml
Created January 8, 2021 01:21
Believe Campaign with Custom Video Player Code
<?xml version="1.0" encoding="iso-8859-1"?>
<home>
<believemeter>
<title><![CDATA[ ]]></title>
<explanation>
<![CDATA[ ]]>
</explanation>
<believeLevels>
<!-- these dates are inclusive, so specifying 11/07/2008-11/08/2008 will mean that amount will be in effect for both the 7th and 8th of November -->
<level amt="10" dateRange="11/06/2008-11/09/2008" />
@raison00
raison00 / quizData.xml
Created October 26, 2020 00:38
cycles quiz data
<quiz>
<question>
<q> What year was the 19th Amendment to the Constitution ratified, guaranteeing American women citizens the right to vote? It was quietly signed into law in a ceremony to which the press and suffragists were not invited. </q>
<answer>1910</answer>
<answer>1935</answer>
<answer>1920</answer>
<correct>3</correct>
</question>
<question>
@raison00
raison00 / FlexibleCustomMultiChildLayout.dart
Created May 1, 2020 20:55
CustomMultiChildLayout with flexible vs non-flexible widgets
import 'package:flutter/material.dart';
// This example is adapted from https://stackoverflow.com/questions/51304568/
class ScaffoldContextError extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Unbounded Viewport Error',
theme: ThemeData(
@raison00
raison00 / BoxConstraintsVisualizationDemo.dart
Created April 28, 2020 17:49
Box Constraints Visualization
// Question from https://stackoverflow.com/questions/41727553/
//Box Constraints Visualization - no text clipping issues/errors
// to be visualized in Flutter Wiget inspector
import 'package:flutter/material.dart';
class TextClippingError extends StatelessWidget {
@override
@raison00
raison00 / renderflex_overflow_error_flexible.dart
Last active April 22, 2020 00:56
Using Flexible Widget to solve render flex overflow errors
// for Flutter Inspector layout tools: visualizing render overflow solutions
// This example is adapted from
//https://github.com/InMatrix/flutter_error_studies/blob/master/lib/renderflex_overflow_error2.dart
import 'package:flutter/material.dart';
class ColumnOverflow extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
@raison00
raison00 / renderflex_overflow_error_expanded.dart
Last active April 22, 2020 01:03
Using Expanded Widget to solve render flex overflow errors
// for Flutter Inspector layout tools: visualizing render overflow solutions
// This example is adapted from
//https://github.com/InMatrix/flutter_error_studies/blob/master/lib/renderflex_overflow_error2.dart
import 'package:flutter/material.dart';
class ColumnOverflow extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@raison00
raison00 / renderflex_overflow_CustomMultiChild.dart
Last active April 22, 2020 15:39
Overflow Solution: Using CustomMultiChild Layout to Resolve RenderOverflow Errors
// for Flutter Inspector layout tools: visualizing render overflow solutions
// This example is adapted from SO "How to use CustomMultiChildLayout & CustomSingleChildLayout in Flutter"
//https://stackoverflow.com/questions/59483051/how-to-use-custommultichildlayout-customsinglechildlayout-in-flutter/59483482#59483482
import 'package:flutter/material.dart';
void main() {
runApp(ColumnOverflow());
@raison00
raison00 / main.dart
Last active April 17, 2020 18:05
Sample Overflow Challenge: Using CustomMultiChild Layout to Resolve RenderOverflow Errors
// This version of the code gives exposure to another tricky layout issue.
// There is no blantant render overflow issue using the CustomMultiChild
import 'package:flutter/material.dart';
void main() {
runApp(RenderOverflowResolution());
}
class RenderOverflowResolution extends StatelessWidget {