This is a general question. What are some techniques you employ to prevent the links in your PHP code from breaking every time you move a file or switch a directory?
Does anyone know if Python's shelve module uses memory-mapped IO?
Maybe that question is a bit misleading. I realize that shelve uses an underlying dbm-style module to do its dirty work. What are the chances that the underlying module uses mmap?
I'm prototyping a datastore, and while I realize premature optimization is generally frowned upon,…
I simply cannot get excanvas to work at all. I have tried everything I can think of. I am even uploading the examples that come with excanvas to my website and testing them and they do not even work. I don't know if it has something to do with my server or what, but I haven't seen a working excanvas image yet.
for instance... I this example comes…
How do I ensure that an app.config file gets read on assembly initialization, for .Net 3.5-4 ?
It's a class library assembly. VS2008 provides a menu to add an app.config file, but it's ignored so far.
I need to use the app.config to provide information for logging from the assembly.
Thanks in advance!
I'm writing an app that has a foreground service, content provider, and a Activity front end that binds to the service and gets back a List of objects using AIDL. The service does work and updates a database.
If I leave the activity open for 4-8+ hours, and go to the "Running Services" section under settings on the phone (Nexus One) an unusually…
I am trying to write a simple Perl script that reads a *.csv, places the rows of the *.csv file in a two dimensional array, and then prints on item out of the array and then prints a row of the array.
#!/usr/bin/perl
use strict;
use warnings;
open(CSV, $ARGV[0]) || die("Cannot open the $ARGV[0] file: $!");
my @row;
my @table;
…
This isn't strictly about programming, more about being a programmer, so I'm sorry if its not the right kind of question to ask on this forum (mod, please delete if it isn't)
I'm a computer tech in the US Army, and once I'm out I'll have eight years on the job. I'm about to start a degree through an online school (the only way…
I can't believe I'm back to this after working with WPF for 3 months :)
Consider very common setup:
How do I configure the rowheights so that the top and bottom rows (menu bar and status bar) size to fit the height of their content, and the middle row (main content), fills the remaining available space in the program?
I…
I have been struggling with this for quite some time having been accustomed to SQL Server. I have the following code and I have verified that the OracleDbType's are correct and have verified that the actual values being passed to the parameters match. I think my problem may rest with the return value. All it does is give…
I'm writing a plugin for my wordpress site and am having trouble understanding the jquery ajax requests. In a nutshell, I am trying to get some user meta data loaded when the page loads.
So in my javascript file I have a line:
$.getJSON("http://mysite.co.uk/wp-content/plugins/myplugin/ajax/ajax.php?action=test",…
I have a VB.Net 1.1 application works just fine after compiling in Visual Studio. However, I want to use ILMerge to combine all the referenced assemblies into a single executable just to make it easier to move around. After I send it through ILMerge and try to run it I get the error
"Strong name validation…
I've tried everything (every method that shows up on a SO search), but I can't get it to work.
I'm trying to parse this:
questions = (
{
owner = {
"display_name" = "Neil";
};
title = "Initialising ";
"up" = 11;
"view" = 92;
…
The code I want to have saved through TinyMCE is as follows:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="90" id="homepage-banner">
<param name="movie" value="/images/header.swf" />
<param name="wmode" value="transparent" />
<!--[if…
I'm playing around with wrapping FUSE with Go. However I've come stuck with how to deal with struct fuse_operations. I can't seem to expose the operations struct by declaring type Operations C.struct_fuse_operations as the members are lower case, and my pure-Go sources would have to use C-hackery to…
The project I am currently working on used Linq to SQL as an ORM data access technology. Its an MVC3 Web app. The problem I faced was primarily due to the inability to mock (for testing) the DataContext which gets autogenerated by the DBML designer.
So to solve this issue (after much reading) I…
I've got a handler (list.ashx for example) that has a method that retrieves a large dataset, then grabs only the records that will be shown on any given "page" of data. We are allowing the users to do sorting on these results. So, on any given page run, I will be retrieving a dataset that I…
I have come across an awkward situation where I would like to have a class with an NSTimer instance variable that repeatedly calls a method of the class as long as the class is alive. For illustration purposes, it might look like this:
// .h
@interface MyClock : NSObject {
NSTimer*…
I'm working on an ASP.NET website where I am using an asp:repeater with paging done through a VB.NET code-behind file. I'm having trouble with the database connection though. As far as I can tell, the paging is working, but I can't get the data to be certain.
The database is a…
We have three developers and one tester all working against the same database. We change the schema of the database quite often, and every time we do it tends to have a ripple effect of headaches for everyone else.
Are there good practices in place for .NET oriented…
For the sake of arguement, lets say that I've got a basicHttp WCF service. Besides implementing authentication (login/logout methods), what is stopping someone from just cracking open Visual Studio, adding a web reference to my website's service, and then playing…
I came across the following code in a code base I am working on:
public final class ConfigurationService {
private static final ConfigurationService INSTANCE = new ConfigurationService();
private List providers;
private ConfigurationService() {
…
Each datatemplate in my WPF ItemsControl contains FIVE custom bindable richtextbox controls.
It is a data-driven app that for authoring multiple-choice questions -- The question and four answer choices must all support:
1) Spell check
2) Rich formatting…
Is it possible to use the SQL BEGIN TRANSACTION, COMMIT TRANSACTION, ROLLBACK TRANSACTION when embedding SQL Queries into an application with mutiple calls to the SQL for Table Updates. For example I have the following code:
Q.SQL.ADD(<UPDATE A…
My question is essentially the same as this one:
http://stackoverflow.com/questions/1168047/polymorphic-association-with-multiple-associations-on-the-same-model
However, the proposed/accepted solution does not work, as illustrated by a commenter…