Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
/* Program to evaluate simple expressions (value operator value)*/
int main() {
float value1, value2;
char operator;
for (int count = 1; count <= 3; count++) {
printf("What are your value opreator and value (seperate with Enter)?\n");
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var base64 = require('base64-js')
@EvanCarroll
EvanCarroll / coreopen_and_iofile.t
Created May 12, 2009 18:48
CORE::Open vs IO::File
#!/usr/bin/env perl
##
## These tests to help illustrate some of the difference between IO::File and CORE::open()
##
use feature ':5.10';
use Test::More tests => 18;
use_ok ( 'IO::File' );
my $oofh = IO::File->new('foobar', 'w');
CORE::open( my $fh, '>', 'foobar' );
foreach my $method ( $poe_kernel->meta->get_method_list ) {
next unless $method =~ /^[a-z]/; #skip constants
next if $method eq 'run' or $method eq 'meta' or $method eq 'singleton';
around ( $method => sub {
my ( $sub, $self, @args ) = @_;
if ( Scalar::Util::reftype( $self ) eq 'ARRAY' ) {
$self = __PACKAGE__->instance;
}
$sub->( $self, @args );
} );
package Class;
use Moose;
use Moose::Util::TypeConstraints;
## Whatever, you get the idea.
sub trim_whitespace { my $str = shift; $str =~ s/^\s+|\s+$//; $str };
sub boolify { my $str = shift; $str =~ /^y/i ? 1 : $str };
## Guess i need to say an OLBool is just a regular bool that coerces, stringifies, and removes padding... JOYZER. Shouldn't the where be at the very least, inherited it is a subtype.
Delivery to the following recipient failed permanently:
130376-subscribe@bugs.debian.org
Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 unknown user (state 14).
Original message
Delivered-To: me@evancarroll.com
I'm looking to solve a long standing bug, here is a brief overview.
DESCRIPTION:
* BUG ID: 130376
* LINK: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=130376
* PROBLEM: Prevents using cpanp and cpan to update system
The real issue here is this was done **totally** wrong. Someone forked over a module from cpan by polluting the namespace with save_parsers_debian {} and breaking upstreams save_parsers {}. This results in an update of XML::SAX (which will install to /usr/local) holding higher precedence than /usr in the perl load sequence and totally breaking dpkg.
My fix for this problem is fairly simple:
package XML::SAX::Debian;
use strict;
use warnings;
use base 'XML::SAX';
use File::Spec;
our $VERSION = '0.01';
sub save_parsers {
package nolocal;
use warnings;
use strict;
use File::Spec ();
our $VERSION = '0.01';
sub import {
my @newinc;