instruction
stringlengths
0
30k
|wpf|xaml|binding|.net|
I'm getting all learned up about binding in WPF. I'm having a lot of trouble debugging the parse errors in my xaml, though. Can somebody pretty please tell me what's wrong with this little piece? : <Border Name="TrackBackground" Margin="0" CornerRadius="2" ...
|.net|wpf|silverlight|xaml|binding|
Is the Border in a Template btw ? Because there is no need for TemplateBinding if the border is not located in a Template (either ControlTemplate or DataTemplate)
How can I modify .xfdl files? Update #2
|unix|linux|base64|gzip|compression|encryption|
Before reading anything else, please read the <a href = "http://beta.stackoverflow.com/questions/1615/how-can-i-modify-xfdl-files-update-1">original thread</a>. A quick simple overview: A .xfdl file is a is a gzipped .xml file which has then been encoded in base64. I wish to de-encode the .xfdl into xml which I ca...
|testing|perl|framework|
Are there conventions for function names when using the Perl Test::More or Test::Simple modules. I'm specifically asking about the names of functions that are used to set up a test environment before the test and to tear down the environment after successful completion of the test(s). cheers, Rob
|testing|perl|frameworks|
Does anyone have any real-world experience of CSLA?
|.net|framework|csla|
The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable and one of my colleagues has suggested CSLA. So I've bought the book but as : > _programmers don't read books anymore_ I wanted to gauge the SOFlow community's opinion of it. So h...
|.net|frameworks|csla|
Web framework programming mindset
|web|framework|object|abstract|
I am just starting to play with Django/Python and am trying to shift into the MTV mode of programming that Django asks for (insists on). Deciding on what functions should be methods of a model vs simple being a function in a view has so far been confusing. Does anyone know of a book, website, blog, slideshow, whateve...
|framework|object|abstract|
|framework|object|
|framework|object|
|frameworks|object|
Best way to implement a dirty flag in EF
|framework|entity|
You can easily use the PropertyChanges events to set the flag but how do you easily reset it after a save to the ObjectContext?
|frameworks|entity|
Regex's For Developers
|visual-c++|regex|utility|
I've been trying to figure out a regex to allow me to search for a particular string while automatically skipping comments. Anyone have an RE like this or know of one? It doesn't even need to be sophisticated enough to skip `#if 0` blocks; I just want it to skip over `//` and `/*` blocks. The converse, that is only ...
|language-agnostic|oop|
|language-agnostic|oop|
.Net Security Policy change by standard users?
|.net|security|windows|
The .Net Security Policy can be changed from a script by using **CasPol.exe**. Say I will be distributing an application to several users on a local network. Most of those users will be unprivileged, standard accounts, so they will not have necessary permissions for the relevant command. I think I shall be looking i...
|.net|windows|security|
The .Net Security Policy can be changed from a script by using **CasPol.exe**. Say I will be distributing an application to several users on a local network. Most of those users will be unprivileged, standard accounts, so they will not have necessary permissions for the relevant command. I think I shall be looking i...
I prefer to use functional programming to save myself repeated work, by making a more abstract version and then using that instead. Let me give an example. In Java, I often find myself creating maps to record structures, and thus writing getOrCreate structures. SomeKindOfRecord<T> getOrCreate(T thing) { ...
I prefer to use functional programming to save myself repeated work, by making a more abstract version and then using that instead. Let me give an example. In Java, I often find myself creating maps to record structures, and thus writing getOrCreate structures. SomeKindOfRecord<T> getOrCreate(T thing) { ...
Examples for coding against the PayPal API in .NET 2.0+?
|.net|asp.net|paypal|
Can anyone point me to a good introduction to coding against the paypal API?
I use <a href="http://www.aql.com/">AQL</a> who provide gateways to send SMS messages, voice push messages, inbound SMS -> HTTP POST gateways and other stuff. For Perl there's my <a href="http://search.cpan.org/dist/SMS-AQL">SMS::AQL</a> module to interface with them; whipping up something in C# should be pretty eas...
1. Go into your fogbugz account and click Extras > Configure Source Control Integration 2. Download "post-commit.bat" and the VBScript file for Subversion 3. Create a "hooks" directory in the root directory of each *checked out* project you want to integrate with 4. Place a copy of the files in each of those h...
The following works well enough. note the *position*, and the use of *auto* <div style="border: 1px solid black; width: 300px; height: 300px;"> <div style="width: 150px; height: 150px; background-color: blue; positi...
The following works well enough. note the *position*, and the use of *auto* <div style="border: 1px solid black; width: 300px; height: 300px;"> <div style="width: 150px; height: 150px; background-color: blue; positi...
Ah, the age old problem of not wanting to increase the session time because of higher memory usage. One answer is to also set a cookie that expires after more like a day that will tell the system to still remember the user. That's what eBay does, among others.
What do you do when you can't use ViewState?
|c#|asp.net|viewstate|webforms|page-lifecycle|
I have a rather complex page that dynamically builds user controls inside of a repeater. This repeater must be bound during the Init page event before ViewState is initialized or the dynamically created user controls will not retain their state. This creates an interesting Catch-22 because the object I bind the repe...
|asp.net|viewstate|webforms|page-lifecycle|
|asp.net|webforms|viewstate|page-lifecycle|
I have a rather complex page that dynamically builds user controls inside of a repeater. This repeater must be bound during the Init page event before ViewState is initialized or the dynamically created user controls will not retain their state. This creates an interesting Catch-22 because the object I bind the repe...
Here are two I've used [DirectX forum feed][1] and [Summary of interesting resources][2] [1]: http://www.programmersheaven.com/mb/dxgameprog/rss.aspx?AllPosts=1 "DirectX game programming" [2]: http://feeds.feedburner.com/TheGeeksOf3d "Good summary of interesting gaming resources"
One of the techniques I used some time back was to write my own function. Basically catch the exception and retry using a timer which you can fire for a specified duration. If there is a better way, please share.
GameDevKicks.com might become interesting over time - if used more: [http://www.gamedevkicks.com/][1] [1]: http://www.gamedevkicks.com/
Windows Low Level Disk Question
|windows|hard-drive|
I need to programmatically determine out how many sectors, heads, and cylinders are on a physical disk from Windows XP. Does anyone know the API for determining this? Where might Windows expose this information? Thanks, Terry
I don't know what you're using to determine the file's lock status, but something like this should do it. <pre> while (true) { try { stream = File.Open( fileName, fileMode ); break; } catch( FileIOException ) { // check whether it's a lock problem Thread.Sleep...
What is a good way to format logs?
|c#|logging|parsing|
I'm designing an application which includes the need to log all incoming messages I receive from a Telnet connection. The text is largely plain though can include ANSI tags that provide text colour and formatting (16 colours, bold, underline, etc). I'm would like to format my logs to store the text with formatting, ...
|c#|parsing|logging|
I'm designing an application which includes the need to log all incoming messages I receive from a Telnet connection. The text is largely plain though can include ANSI tags that provide text colour and formatting (16 colours, bold, underline, etc). I'm would like to format my logs to store the text with formatting, ...
**This answer is incomplete and flawed! It only works from TortoisSVN to Fogbugz, but not the other way around. I still need to know how to get it to work backwards from Fogbugz (like it's designed to) so that I can see the Revision number a bug is addressed in from Fogbugz while looking at a bug.** ---------- ...
**This answer is incomplete and flawed! It only works from TortoisSVN to Fogbugz, but not the other way around. I still need to know how to get it to work backwards from Fogbugz (like it's designed to) so that I can see the Revision number a bug is addressed in from Fogbugz while looking at a bug.** ---------- ...
1. Go into your fogbugz account and click Extras > Configure Source Control Integration 2. Download "post-commit.bat" and the VBScript file for Subversion 3. Create a "hooks" directory in the root directory of each *checked out* project you want to integrate with 4. Place a copy of the files in each of those h...
**This answer is incomplete and flawed! It only works from TortoisSVN to Fogbugz, but not the other way around. I still need to know how to get it to work backwards from Fogbugz (like it's designed to) so that I can see the Revision number a bug is addressed in from Fogbugz while looking at a bug.** ---------- ...
|php|windows|iis|upload|
I'm trying to write some php to upload a file to a folder on my webserver. Here's what I have: <?php if ( !empty($_FILES['file']['tmp_name']) ) { move_uploaded_file($_FILES['file']['tmp_name'], './' . $_FILES['file']['name']); header('Location: http://www.mywebsite.com/dump/'); exit; ...
I would look at [Java migrations](http://www.google.com/search?q=Zork+in+Java) of [Zork](http://en.wikipedia.org/wiki/Zork), and lean towards a simple [Natural Language Processor](http://en.wikipedia.org/wiki/Natural_language_processing) (driven either by tokenizing or regex) such as the following (from this [link](www...
Before reading anything else, please read the <a href = "http://beta.stackoverflow.com/questions/1615/how-can-i-modify-xfdl-files-update-1">original thread</a>. A quick simple overview: A .xfdl file is a is a gzipped .xml file which has then been encoded in base64. I wish to de-encode the .xfdl into xml which I ca...
How can I re-encode xml files to base64-gzip? Update #2
How can I encode xml files to xfdl (base64-gzip)? Update #2
How can I encode xml files to xfdl (base64-gzip)?
|ruby|unix|encryption|compression|gzip|base64|
Before reading anything else, please read the <a href = "http://beta.stackoverflow.com/questions/1615/how-can-i-modify-xfdl-files-update-1">original thread</a>. A quick simple overview: A .xfdl file is a is a gzipped .xml file which has then been encoded in base64. I wish to de-encode the .xfdl into xml which I ca...
Before reading anything else, please take time to read the <a href = "http://beta.stackoverflow.com/questions/1615/how-can-i-modify-xfdl-files-update-1">original thread</a>. A quick simple overview: A .xfdl file is a is a gzipped .xml file which has then been encoded in base64. I wish to de-encode the .xfdl into x...
public class MyClass<SpeciesType,OrderType> where SpeciesType : Speciese where OrderType : Order
public class Animal<SpeciesType,OrderType> where SpeciesType : Speciese where OrderType : Order { }
Can code running on top of an un-trustworthy platform retain its integrity? No, decades of broken copy-protection schemes lead me to postulate that this is impossible. The inverse, malicious code running in a trusted sandbox is feasible, but the best you can do with your problem is make it inconvenient for people to ch...
SQL Server unused, but allocated table space
|sql-server|
I have ms sql databases that grow very large. Upon examination I find that there is a bunch of unused space in certain tables. I don't do many physical deletes, so I don't think that its just deleted records. DBCC SHRINK doesn't make the file smaller. But, if I dump the table to a new, empty database, the size goes dow...
I think I fixed it. It's turns out I had a simple config error. My ini file read: sqlalchemy.default.url = [connection string here] sqlalchemy.pool_recycle = 1800 The problem is that my `environment.py` file declared that the engine would only map keys with the prefix: `sqlalchemy.default` so `pool_recyc...
I find [doxygen][1] is useful for generating all kinds of dependency information when faced with a new project. It apparently handles "*C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D*". It uses Graphviz to generate graphical dependency charts. You can...
I believe project [mono][1] has mac support. Yup - [right here][2] Of course, using paralles/vmware/virtualbox or any other virtual machine with a windows guest as you describe will also work fine. [1]: http://go-mono.org [2]: http://www.mono-project.com/Mono:OSX
I believe project [mono][1] has mac support. This assumes you want to develop directly on the mac and that you are happy to forgo some of the MS specific features and tools (so no C#3.0, libraries like WPF and Visual Studio). Of course, using paralles/vmware/virtualbox or any other virtual machine with a windows ...
I prefer to use functional programming to save myself repeated work, by making a more abstract version and then using that instead. Let me give an example. In Java, I often find myself creating maps to record structures, and thus writing getOrCreate structures. SomeKindOfRecord<T> getOrCreate(T thing) { ...
> I think the use of opaque context objects (HANDLEs in Win32, FILE*s in C, to name two well-known examples--hell, HANDLEs live on the other side of the kernel-mode barrier, and it really doesn't get much more encapsulated than that) is found in procedural code too; I'm struggling to see how this is something particula...
Accessing a CONST attribute of series of Classes
|php|oop|
This is how I wanted to do it which would work in PHP 5.3.0+ <?php class MyClass { const CONSTANT = 'Const var'; } $classname = 'MyClass'; echo $classname::CONSTANT; // As of PHP 5.3.0 ?> But I'm restricted to using PHP 5.2.6. Can anyone...
|php|object-oriented|
|php|oop|
Speed Comparisons - Procedural vs. OO in interpreted languages
|oop|procedural|speed|maintainability|interpreted|comparison|
In interpreted programming languages, such as PHP and JavaScript, what are the repercussions of going with an Object Oriented approach over a Procedural approach? Specifically what I am looking for is a checklist of things to consider when creating a web application and choosing between Procedural and Object Oriente...
I would look at [Java migrations](http://www.google.com/search?q=Zork+in+Java) of [Zork](http://en.wikipedia.org/wiki/Zork), and lean towards a simple [Natural Language Processor](http://en.wikipedia.org/wiki/Natural_language_processing) (driven either by tokenizing or regex) such as the following (from this [link](www...
I would look at [Java migrations](http://www.google.com/search?q=Zork+in+Java) of [Zork](http://en.wikipedia.org/wiki/Zork), and lean towards a simple [Natural Language Processor](http://en.wikipedia.org/wiki/Natural_language_processing) (driven either by tokenizing or regex) such as the following (from this [link](www...
**This answer is incomplete and flawed! It only works from TortoisSVN to Fogbugz, but not the other way around. I still need to know how to get it to work backwards from Fogbugz (like it's designed to) so that I can see the Revision number a bug is addressed in from Fogbugz while looking at a bug.** ---------- ...