1

The Years of Experience Myth

http://www.codinghorror.com
Read »
Created by wonderlamad Created 20 weeks 6 days ago
Category: Programming   Tags:
1

firefox not showing vertical scrollbars in blog

http://feeds.dzone.com

hey everyone,

I'm new here and wondering if someone can help me out. i have a couple wordpress blogs i've built for clients, and i'm occasionally getting a wierd behavior in Firefox Win/Mac: sometimes even though there is plenty of content below the fold, no vertical scrollbar will show at all. it only does this on firefox.

here's an example (must view in firefox):

http://www.lorihedrickphotography.com/blog/

and i've tried adding this:

html {
height:101%;
overflow-y:scroll;
}

Read more »
Created by radbone Created 20 weeks 6 days ago
Category: Programming   Tags:
1

Upload a file using Ajax

http://feeds.dzone.com

This code is categorised as Ajax because it "fits within my definition of Ajax" as explained from the Ajax File Upload [openjs.com] article.

File upload

// function init() {
document.getElementById('file_upload_form').onsubmit=function() {
//'upload_target' is the name of the iframe
document.getElementById('file_upload_form').target = 'upload_target';
}
}

Read more »
Created by tuckerj Created 20 weeks 6 days ago
Category: Programming   Tags:
1

Upload a file using Ruby

http://feeds.dzone.com

The following code was used to upload an image file to the web server. Source code origin: Ruby Language Stuff | mod_ruby File upload scripts [zytrax.com]

file: file_upload.cgi

#!/usr/bin/ruby

# ruby script fragment
require 'cgi'
require 'stringio'

cgi = CGI.new() # New CGI object
puts "Content-Type: text/plain"
puts
print ''

# get uri of tx'd file (in tmp normally)
tmpfile = cgi.params['myfile'].first.path

Read more »
Created by payton Created 20 weeks 6 days ago
Category: Programming   Tags:
1

c++ pointers suck

http://feeds.dzone.com

// pointers worky

#include

class A {
public:
void setMember(A& m) { this->member = &m; }

A* member;
int x;
};

int main(int argc, char** argv) {
A a, b;
a.x = 2;
b.x = 3;
a.setMember(b);
b.setMember(a);

std::cout x = " x

Read more »
Created by modrepublic Created 20 weeks 6 days ago
Category: Programming   Tags:
1

DRM Ignorance is Expensive

http://www.codinghorror.com
Read »
Created by TheGuvnor Created 20 weeks 6 days ago
Category: Programming   Tags:
1

Code Isn't Beautiful

http://www.codinghorror.com

I was thrilled to see the book Beautiful Code: Leading Programmers Explain How They Think show up in my Amazon recommendations. It seems like exactly the type of book I would enjoy. So of course I bought a copy.

Unfortunately, Beautiful Code wasn't nearly as enjoyable of a read as I had hoped it would be. It is by no means a bad book, but there's something about it that's not quite right.

Read more »
Created by carl Created 20 weeks 6 days ago
Category: Programming   Tags:
1
1

Code Of A Game

http://feeds.dzone.com

This Is A Code Of A Game.

Coppy It Into Notepad And Then Save It As Game.bat

Warning!
Make Sure It Says "All Files (*.*)" And Not "Text Document (.txt)" At The Bottom.
The Code Is:

@echo off
goto verybegingame
: verybegingame
echo Welcome To This Game!
title Game Start
echo Press Any Key For Stuff.
pause >nul
echo Loading...
ping localhost 6 >nul
echo.. Loading Comple!
pause >nul
cls
echo Rules:
title Game Rules
echo..You Answer Each Question.

Read more »
Created by bingobongofl Created 20 weeks 6 days ago
Category: Programming   Tags:
1

What's Your Backup Strategy?

http://www.codinghorror.com

Jamie Zawinski's public service backup announcement starts off with a bang:

Option 1: Learn not to care about your data. Don't save any old email, use a film camera, and only listen to physical CDs and not MP3s. If you have no possessions, you have nothing to lose.

Read more »
Created by BillGates Created 20 weeks 6 days ago
Category: Programming   Tags:
1

Generate a graph using Gruff

http://feeds.dzone.com

This Ruby code produced a graph using gruff. The output shows a line graph [twitxr.com] for the different fruits. Source code origin: Gruff Update With Bar Graphs | Ruby on Rails for Newbies [rubyonrails.com]

require 'gruff'

g = Gruff::Line.new
g.title = "My Graph"

g.data("Apples", [1, 2, 3, 4, 4, 3])
g.data("Oranges", [4, 8, 7, 9, 8, 9])
g.data("Watermelon", [2, 3, 1, 5, 6, 8])
g.data("Peaches", [9, 9, 10, 8, 7, 9])

Read more »
Created by BSOD Created 20 weeks 6 days ago
Category: Programming   Tags:
1

Save a Ruby source text file to XML.

http://feeds.dzone.com

This code will output a text file as an XML file which can later be transformed into an HTML file using a back-end XSLT processor called Gorg.

#!/usr/bin/ruby

#file: rubytxt2xml.rb

require 'rexml/document'
include REXML

class RubyTxt2XML

def rubytxt2xml(h)
h[:infilepath] = './' if h[:infilepath].nil?
h[:outfilepath] = './' if h[:outfilepath].nil?
h[:xmlfile] = h[:sourcefile][/^(.*)\.\w+$/,1] + '.xml' if h[:xmlfile].nil?

Read more »
Created by Aaron Created 20 weeks 6 days ago
Category: Programming   Tags:
1

Get Your Database Under Version Control

http://www.codinghorror.com

A little over a year ago, I wrote about the importance of version control for databases.

When I ask development teams whether their database is under version control, I usually get blank stares.

Read more »
Created by watkins Created 20 weeks 6 days ago
Category: Programming   Tags:
1

The Ultimate Unit Test Failure

http://www.codinghorror.com
Read »
Created by Angel Created 20 weeks 6 days ago
Category: Programming   Tags:
1

The Dramatic Password Reveal

http://www.codinghorror.com

As far back as I can remember-- which admittedly isn't very far-- GUI toolkits have included a special type of text entry field for passwords. As you type, the password field displays a generic character, usually a dot or asterisk, instead of the character you actually typed.

Read more »
Created by lilgrl Created 20 weeks 6 days ago
Category: Programming   Tags:
1

Using XMPP4R-Simple to check for activity.

http://feeds.dzone.com

Using XMPP4R--Simple these Ruby code snippets show a user's status change and any messages they may have sent you since the last time.

# user1 changes their status to away
jabber.presence_updates do |friend, old_presence, new_presence|
puts "Received presence update from #{friend.to_s}: #{new_presence}"
end

# user1 sends the message "do you like Tofu?"
jabber.received_messages do |message|
puts "Received message from #{message.from}: #{message.body}"
end

Read more »
Created by notxenu Created 20 weeks 6 days ago
Category: Programming   Tags:
1

A Lesson in Apple Economics

http://www.codinghorror.com

A new in box Apple //c system was recently sold on eBay. This is quite remarkable; a vintage computer-- twenty-three years old-- that has never been opened. The people who ultimately won the auction posted a beautiful set of unboxing pictures. For a brief moment, it was 1984 all over again.

Read more »
Created by jboz Created 20 weeks 6 days ago
Category: Programming   Tags:
1

Every User Lies

http://www.codinghorror.com

Heidi Adkisson notes that features sell products, but the people buying those products often don't use the very features they bought the product for in the first place.

Read more »
Created by donkeydust Created 20 weeks 6 days ago
Category: Programming   Tags:
1

ruby debug

http://feeds.dzone.com

def debug(*args)
p [caller.first, *args] if $DEBUG
end
$DEBUG = true
debug "debug information"

Read more »
Created by mobiletheshark Created 20 weeks 6 days ago
Category: Programming   Tags:
1

Tivoization and the GPL

http://www.codinghorror.com

The original Tivo was one of the finest out of box experiences I've ever had as a consumer. I remember how exciting it was to tell friends about our newfound ability to pause live television, and how liberating it felt to be freed from the tyranny of television schedules. Imagine watching whatever you want, whenever you want! Of course, digital video recorders are no longer the rare, expensive creatures they were back in 2002, so some of that original Tivo luster is irretrievably lost.

Read more »
Created by jonny5 Created 20 weeks 6 days ago
Category: Programming   Tags: