What's a good way to construct an LPCWSTR on WinCE 6? I'd like to find something similar to String.Format() in C#. My attempt is:
OSVERSIONINFO vi;
memset (&vi, 0, sizeof vi);
vi.dwOSVersionInfoSize = sizeof vi;
GetVersionEx (&vi);
char buffer[50];
int n = sprintf(buffer, "The OS version is: %d.%d", vi.dwMajorVersion,…
I can successfully perform container.ResolveAll<IMyInterface>(), and I get back an Enumerable containing every registered IMyInterface. However, I can't find a way to have these injected into the constructor of my class. I have tried using ResolvedArrayParameter(), but this gives me an empty enumerator. Am I doing…
I am using rails3 beta3 and couchdb via couchrest. I am not using active record.
I want to add multiple "Sections" to a "Guide" and add and remove sections dynamically via a little javascript. I have looked at all the screencasts by Ryan Bates and they have helped immensely. The only difference is that I want to save…
Does MVC have an equivalent to the web forms icallbackeventhandler. Webforms allow you to make a call a function after the page has loaded.
Any guidance is appreciated.
I have the following function that get's the current page URL:
<?php
// get current page url
function currentPageUrl() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .=…
I have two entities, say, House and People, where multiple people can live in one house.
It's a unidirectional link where each Person has a field for which House they belong to, so the Person table has a column named house_id.
I need to be able to return all the Person objects who belong to a certain House, but I…
I have a fresh rails 3 app, here's my Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.0' gem 'delayed_job'
gem 'sqlite3-ruby', :require =
'sqlite3'
Here's the class that represents the job that I want to queue:
class Me < Struct.new(:something)
def perform
puts "Hello from me"…
I have a very simple web form which consists of labels and input fields, however I can not seem to find a way of aligning the form in the center of the page and for the labels to have an equal width so that they appear neatly next to each other, one under the other. The structure of my page is basically:
…
I have an application structured as follows:
dao
domain
main
services
utils
I've made a class that reads the application configuration from an XML file. The question is where should it be placed? In the utilities package?
I'm trying to send an image to a server, using HTTP Post Multipart. Everything else is fine, I have all the boundrys set and stuff.
But what do I have to do to the image before hand? Do I have to convert it to binary? Here is the header data from the header (using Fiddler). This is what I need to upload:…
I have 2 databases (users, userRankings) for a system that needs to have rankings updated every 10 minutes. I use the following code to update these rankings which works fairly well, but there is still a full table scan involved which slows things down with a few hundred thousand users.
…
I have a base type that I want to inherit from, for all my DAO objects, but this member gets the error further down about not being defined:
type BaseDAO() =
member v.ExecNonQuery2(conn)(sqlStr) =
let comm = new MySqlCommand(sqlStr, conn, CommandTimeout = 10)
…
I am storing date/times in the database as UTC and computing them inside my application back to local time based on the specific timezone. Say for example I have the following date/time:
01/01/2010 00:00
Say it is for a country e.g. UK which observes DST (Daylight Savings Time)…
Using Javascript, Jquery preferably, I want to be able to trigger the visiblity of the div when a user is at a certain page height. NYtimes has an example of this when you scroll to the bottom of a story, a slider pops out with another news story, and goes away if you scroll up.
Is it possible to send a complexType to a SOAP web service by creating the complexType locally, i.e. create the type by creating a class and then sending the instance of that class back to the service? Admittedly this is only possible if I can get the definition of the type from…
Hi,
I have the following problem.
First my environment, I have two 24-CPU servers to work with and one big job (resampling a large dataset) to share among them. I've setup multicore and (a socket) Snow cluster on each. As a high-level interface I'm using foreach.
What is…
Hello,
I have two classes which both extends Example.
public class ClassA extends Example {
public ClassA() {
super("a", "class");
}
....
}
public class ClassB extends Example {
public ClassB() {
super("b", "class");
}
....
}
…
I am currently developing a handful of similar Cocoa desktop apps. In an effort to share code between them, I have identified a set of core classes and functions that can be common across all of these applications. I would like to bundle this common code into a framework…
I have written an app to replace a single page and need to redirect the requests for the old page to the new app.
In IIS, how would I redirect the request for
http://www.mysite.com/foo.aspx
to
http://www.mysite.com/bar/default.aspx
Thanks!
I am using linkButtons with a background skin inside a linkBar with a dataProvider. A couple of the labels from the linkButtons are too long and distort the linkButton skin. How can I make all of the linkButtons labels the same width?
How can you go about modelling an object that can have multiple simultaneous states?
For example, you could have a person that's waiting for a bus. That's one state. But they could also be reading a newspaper while waiting for the bus. Furthermore, they could be…
I'm using GMail as my SMTP server. I have that configuration working just fine:
# config/initializers/action_mailer.rb:
ActionMailer::Base.smtp_settings = {
:tls => true,
:address => "smtp.gmail.com",
:port => "587",
…
I am trying to copy all data from worksheet1 and paste the values into worksheet2 at the same position I am using office 2003 and the Interlop library.
Here is my code;
public void CreateExcelWorksheet()
{
…