In .NET there are 8 bytes of overheard for each object. 4 bytes are a pointer to the object's type. What are the other 4 bytes, known as the object header, used for?
I am using a listview, and trying to populate using a file.
I need the file to be read in as soon as the form starts.
private void mainForm_Load(object sender, EventArgs e)
{
//get file read in
if (File.Exists("../../MealDeliveries.txt"))
{
StreamReader sr = new StreamReader("../../MealDeliveries.txt");
…
I'm messing about with some stuff in XNA and am trying to move an object around asteroids-style in that you press left and right to rotate and up/down to go forwards and backwards in the direction you are pointing.
I've got the rotation of the sprite done, but i can't get the object to move in the direction you've pointed it, it always moves up…
Currently my TFS build agent using the current date as the build name. For example, "Intranet_20100707.1" would be today's first build. Currently I use "1.2.*" as my assembly version number where 1 and 2 are manually incremented.
How can I sync the build names with my application's version number?
We want to use the same page to service the desktop, iPhone, and BlackBerry, so we have to come up with a way for the different devices to load different stylesheets.
So, is there a way to specify a stylesheet to run on BlackBerry?
For example, iPhone's use the media attribute:
<link media="only screen and (max-device-width: 320px)"…
So I have a query, can someone let me know if it looks ok content wise?
"INSERT INTO ".TBL_MESSAGES." (NULL, 'Your ranking points have changed',
'Due to your recent activity, your ranking points have increased by $r', '2', '$u',
'0', '0', '0', '0', NULL,…
I just tried the Apache Wicket "Hello, world" application and I noticed that in the rendered HTML output, Wicket is exposing it's internal attributes.
This is what the rendered HTML looks like in the 'view source' of the browser:
<html>
<body>
<span wicket:id="message" id="message">Hello World!</span>…
I am creating a messaging system but the problem I face is that when users try and enter certain characters like ' into the message, the database doesnt want to allow it.
Any idea what this is?
When working remotely, our team only has access to our source code by remote desktop into our office PCs so we never really work in offline mode. Does a distributed version control system like Mercurial or Git still give us advantages over our current centralized Subversion set up? If so, what are they? Are there any drawbacks or…
Hi all,
I am doing a little graphing via the System.Drawing and im having a few problems.
I'm holding data in a Queue and i'm drawing(graphing) out that data onto three picture boxes
this method fills the picture box then scrolls the graph across.
so not to draw on top of the previous drawings (and graduly looking messier) i…
Hey guys, the following code shows what i am trying to do.
private void btnEdit_Click(object sender, EventArgs e)
{
iDeliverySelected = lstDeliveryDetails.SelectedIndex;
bool addEdit = false;
}
The selectedindex is throwing up the following error..
'System.Windows.Forms.ListView' does not contain a…
Here's the method i want to write:
public static IEnumerable<String> GetTableNames(this IQueryable<T> query)
{
//...
}
where the IQueryable is a linq-to-sql query (is there a more specific interface i should use?).
then if i had a query like this
var q = from c in db.Customers
from p in…
I am having issues adding an image across a view while moving finger across the screen.
Currently it is adding the image multiple times but squeezing them too close together and not really following my touch.
Here is what I am trying:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch…
Im passing function GetCurrentDate() the pointer to a tm struct.
Within that function I printf the uninitialized data, then the initialized. Expected results.
However when i return the tm struct appears uninitialized.
See console output bellow. What am i doing wrong?
uninitialized date:??? ???-1073908332
…
We've noticed a compatibility issue with a Silverlight 3 app which runs fine with v3.0.40818, v3.0.50106 and v4.0.50401 but refuses to load in v3.0.40624. Instead it gives a message box saying a more recent version of Silverlight is required.
Does anyone know what the changes were between 3.0.40624 and 3.0.40818…
I have an NSTextField that I would like to enable "as-you-type" spell checking. When I load my application I can do this from the Menu Bar Edit Spelling and Grammar Check Spelling While Typing.
I would like this option to be enabled by default. Within IB I can enable this for a NSTextView but I would like…
Hi there, my company's software product has a feature that allows users to generate forms from Word templates. The program auto fills some fields from the SQL database and the user can fill in other data that they desire. So we have a .dotx template that holds the design of the form, and then the user gets the…
Using ASP.NET and the DataGrid, how do I bind a HyperLinkColumn to more than one field?
Dim detail As New HyperLinkColumn
With detail
.Text = "View Details"
.HeaderText = ""
.NavigateUrl = "\TeamDetail.aspx?Account={0}&Broker={1}"
…
I have a main class in a program that launches another class that handles all the GUI stuff.
In the GUI, i have a button that i need to attach an ActionListener to.
The only problem is, the code to be executed needs to reside within the main class.
How can i get the…
I have a Queue that contains a collection of objects, one of these objects is a class called GlobalMarker that has a member called GlobalIndex.
What I want to be able to do is find the index of the queue where the GlobalIndex contains a given value (this will always…
In the code below I have a function int GetTempString(char Query[]);
calling it in main works fine.
However, when calling the function from a fork the fork hangs (stops running, no errors, no output) before this line: pch = strtok (Query," ,"); the printf shows that…
I understand that when the C# compiler sees a linq query comprehension, it basically does a straight translation to the corresponding Linq Extension methods and lambdas. i.e.
from x in list
select x.property
gets translated to:
list.Select(x => x.property)
…
Introduction
A user reported to me this morning that he was having an issue with inconsistent results (namely, column values sometimes coming out null when they should not be) of some parallel execution code that we provide as part of an internal framework. This…