Questions

TypeForwardedTo attribute

  I have a general question.   I am using TypeForwardedTo attribute for approx. 3500 class files where they have been moved from old assembly to various new assembly. Is there will be any performance issue for serialization and deserialization, since each time it verifies the type and assembly in ...

CakePHP - Manipulating data-Attribute in validation process

I am trying to manipulate the $this->data attribute while performing an advanced validation method. The data seems to be changing, but when it comes to saving, the changes don't apply. My question: Am I able do edit $this->data while performing a validation method? Best regards, Benedi ...

getdate() formatting

I am trying to convert getdate() into a certain varchar(10) format.  What I want it to look like is 2007-12-30.  However, I can't seem to find the proper code to make it do this.  Is there one?  The closest I could find was 105.DELETE FROM [<database>].[<user>].[<table>]      WHERE ...

Parse an integer from a string with trailing garbage

I need to parse a decimal integer that appears at the start of a string. There may be trailing garbage following the decimal number. This needs to be ignored (even if it contains other numbers.) e.g. "1" => 1 " 42 " => 42 " 3 -.X.-" => 3 " 2 3 4 5" => 2 Is there a built ...

Making Asynchronous method calls.

 I've tried using a BackgroundWorker for asynch callbacks. But no luck. The System.ComponentModel.backgroundworker does not exist. Then I tried implementing asynch callbacks using delegates to BeginInvoke. In this case I get an exception that says method call is not supported.  Are asy ...

How to disable submit behaviour of asp:ImageButton?

I have a image button in a page which can be triggered on mouse click, by default it gets triggered on enter press also which i want to disable. I know about "UseSubmitBehaviour" attribute in asp:Button, is there a way to do the same in asp:ImageButton? ...

Linux: Unzip an archive containing files with the same name

I was sent a zip file containing 40 files with the same name. I wanted to extract each of these files to a seperate folder OR extract each file with a different name (file1, file2, etc). Is there a way to do this automatically with standard linux tools? A check of man unzip revealed not ...

Serial communication RS-422

  We are doing some development which involves serial communication via RS-422 for the first time. We have problems, getting the communication up an running. Now the question. Is the serial driver for windows all the same for rs-232  rs-422? Any hints that might help?   Thanks Vit ...

Stack vs. Heap in .NET [closed]

In your actual programming experience, how did this knowledge of STACK and HEAP actually rescue you in real life? Any story from the trenches? Or is this concept good for filling up programming books and good for theory? ...

Multi-Monitor Programming WPF

Hi, I'm currently working with a WPF application on a multi-monitor system.  We need to ensure that the each window is visible on only a specific display.   Is there an alternative to System.WinForms.Screen for determining monitor information in WPF? If so could you point me in the direction of w ...

Flex: Binding to an MXML-esque “binding string” in action script?

Is it possible to specify MXML-esque "binding strings" in ActionScript? For example, I want to be able to do something like: MXMLBinding(this, "first_item", this, "{myArrayCollection.getItemAt(0)"); MXMLBinding(this, ["nameLbl", "text"], this, "Name: {somePerson ...

Clean get from source control after moving local files

I tried to reproduce a problem my team members faced when checking out my project by moving my local files for this project to a separate location. Then I tried to get this project from source control again, but source control kept insisting that my files where up-to-date and&nbs ...

Can a MeshGeometry3D have multiple textures?

I really like to have a big 3D surface and put on multiple image textures. Is it possible in WPF? Thanks! ...

Overuse of static in my Java Game project?

I am currently developing a little platform in Java and I wrote my own game engine for it called Bonsai. Now I'm asking myself the question "Did I overuse statics?". On the one hand it's very convenient since I don't have to keep a reference to the game instance in each class like the m ...

MsgBox

I have a dialog form which shows me my drivers (dvd,cd,floppy hard drives partitions,removable disks ) by buttons (showing the image ) and by labels (showing the name , ex :" A:\").My questions is how can I give the user a msgbox saying that the "The drive requested is not ready " ...

Mocking ResourceManager in .NET

We have a small wrapper class that uses ResourceManager to load string resources from assemblies. We also have some unit tests that check it loads the correct details from the correct assemblies for different cultures, assemblies etc. Our tests are therefore currently dependant upon ...

How do you have a child open another child in the same MdiParent?

  I would like to have one child form open up another child form in the same MdiParent Instance.  How do I do that? I know in the parent, you can do this: Form2 f2 = new Form2(); f2.MdiParent = this; f2.Show();   But this creates a new instance.  If the MdiParent is already open, how do I use ...

ASP.NET Binding integer to CheckBox's Checked field

I have a following ListView item template, in which I am trying to bind integer value to Checked property of CheckBox. IsUploaded value contains only 0 and 1... <asp:ListView ID="trustListView" runat="server"> <ItemTemplate> <asp:CheckBox ID="isUploadedCheckB ...

Creating ActiveX Controls That Show Up In Word 2007

 We have created several ActiveX controls that worked in Microsoft Word 2003 and earlier.  When our application is installed on a user's system, the controls are registered and ready to be used.  However, in Word 2007, after setting the options so that all ActiveX controls are trusted, when we attem ...

How to speed up query with multiple INNER JOINs

I've been toying around with switching from ms-access files to SQLite files for my simple database needs; for the usual reasons: smaller file size, less overhead, open source, etc. One thing that is preventing me from making the switch is what seems to be a lack of speed in SQLite. For ...

BuildStore Depreciation in 2008

I have successfully migrated some of my code from the 2005 BuildStore object to the IBuildServer.  I have found one instance that I am having trouble finding the proper conversion as the methods do not exist in IBuildServer.   store.GetTestResultsForBuild(BuildUri, "Any CPU", "Relea ...

Structuring a program. Classes and functions in Python

I'm writing a program that uses genetic techniques to evolve equations. I want to be able to submit the function 'mainfunc' to the Parallel Python 'submit' function. The function 'mainfunc' calls two or three methods defined in the Utility class. They instantiate other classes and call v ...

Using WorkflowTrackingLocation for Finding the Status Changes of a Workflow instance

  Hi All,      I have a StateMachine Workflow and i am using the Default SqlTracking Service and the SqlWorkflowPersistanceService . And everything is working fine so far. I can see the entries in the Tables when an activity is started / peristed or idled.      Now In my UI i have to Show the W ...

Help needed in Monitor.PulseAll()

can anybody explain me with simple example to handle Monitor.PulseAll().I have already gone some examples from this stackoverflow.As i am a beginner i feel those are above my head. ...

jQuery adding and removing classes on Anchor

I can't figure out why I cant remove a class from a then add a new one. I can change its css using .css(...) but using .removeClass and .addClass dont seem to work. I am using add and remove class on some spans and that works just fine. Anyone know what i am doing wrong? Thanks so much ...

EXECUTE AS

Hi, I have some problems with the execute as command.   I have a proc in a database, lets call it 'source'. The proc looks like this: create proc backup_proc with execute as 'account2' as select * into destination.dbo.loaddata from source.dbo.loaddata exec dbo.backup_proc   I also have two ...

NSString dataUsingEncoding not working?

I can't get this to work: NSString *string = @"!#€%&/()*^*_:;;:;_poawolwasnndaw"; NSData *stringData = [string dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:NO]; stringData will be nil. Why? ...

XBAP - Error in markup file 'Page1.xaml' Line 1 Position 7. Cannot read from XML file.

Hi all, yes I have read all the threads on this.  I have also captured the Inner Exception and here is what it is.   +  $exception {"Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' f ...

Get a Win32 program request a debugger on startup?

We have a C++ Win32 application which spawns, using Qt's QProcess (undoubtedly a wrapper for CreateProcess()), a secondary 'slave' program. Unfortunately, when debugging the system with Visual Studio 2008, the debugger does not autoamtically attach to the spawned process. I know it's p ...

Best practice in administering cubes on a single server

Hello: In my current environment I only have one server on which I develop and publish my cubes.  To avoid corrupting the cube in 'production' and create a space to test my changes I have created two AS projects; one which acts as my development space, and the other projects stores the production c ...

Hot Tags