instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
There are a number of obfuscation programs out there for .Net and I've tried one, my exe seems much slower when obfuscated. Do all obfuscation programs have the same effect or have I chosen a bad one? I'm hoping some are better than others, if you know of a fast one let me know.
stackexchange/codereview
I need to load some fonts temporarily in my program. Preferably from a dll resource file.
stackexchange/codereview
So the official XML-RPC standard doesn't support 64-bit values. But in these modern times, 64-bit values are increasingly common. How do you handle these? What XML-RPC extensions are the most common? What language bindings are there? I'm especially interested in Python and C++, but all information is appreciated.
stackexchange/codereview
I heard Joel and Jeff talking about sIFR in one of the early podcasts. I've been using it on www.american-data.com and www.chartright.us with some fairly mixed results. Yesterday I was informed that the first line of text on my website appeared upside down in Internet Explorer 6 without flash player. I'm pretty sure ...
stackexchange/codereview
Excluding the Micro Framework Emulator ;)
stackexchange/codereview
I'd like to to associate a file extension to the current executable in C#. This way when the user clicks on the file afterwards in explorer, it'll run my executable with the given file as the first argument. Ideally it'd also set the icon for the given file extensions to the icon for my executable. Thanks all.
stackexchange/codereview
There are many options for editing and writing Stored Procedures in Oracle; what is the best tool for you and why? (one tool per answer.)
stackexchange/codereview
I'm an experienced programmer in a legacy (yet object oriented) development tool and making the switch to C#/.Net. I'm writing a small single user app using SQL server CE 3.5. I've read the conceptual DataSet and related doc and my code works. Now I want to make sure that I'm doing it "right", get some feedback from ex...
stackexchange/codereview
I need a way to easily export and then import data in a MySQL table from a remote server to my home server. I don't have direct access to the server, and no utilities such as phpMyAdmin are installed. I do, however, have the ability to put PHP scripts on the server. How do I get at the data? I ask this question purely ...
stackexchange/codereview
We are mainting a web application that is built on Classic ASP using VBScript as the primary language. We are in agreement that our backend (framework if you will) is out dated and doesn't provide us with the proper tools to move forward in a quick manner. We have pretty much embraced the current webMVC pattern that is...
stackexchange/codereview
I'm wondering if people can suggest the best tutorial that will walk me through the best way to do Drag and Drop with control collision detection etc, using MS Silverlight V2. I've done the Jesse Liberty tutorials at Silverlight.net, and they were a good introduction, but I'm looking for something a bit deeper. Suggest...
stackexchange/codereview
Given this XML, what XPath returns all elements whose prop attribute contains Foo (the first three nodes): <bla> <a prop="Foo1"/> <a prop="Foo2"/> <a prop="3Foo"/> <a prop="Bar"/> </bla>
stackexchange/codereview
I am trying to write a C# client to a server that is written in Java. The server expects a 4 byte (DataInputStread readInt() in Java) message header followed by the actual message. I am absolutely new to C#, how can I send this message header over to the Java Server? I tried it several ways (mostly trial and error with...
stackexchange/codereview
I have VB application that requires visual service pack 6 to run , now when I install visualstudio.net (any version of .net) Its debugger doesn't work properly ,I am able to create windows/web application in visualstudio.net but not able to debug anything , so I have to keep 2 computers , one for VB and one for .net ...
stackexchange/codereview
Do you use Luabind, toLua++, or some other library (if so, which one) or none at all? For each approach, what are the pro's and con's?
stackexchange/codereview
What is the best (regarding performance) way to compute the critical path of a directional acyclic graph when the nodes of the graph have weight? For example, if I have the following structure: Node A (weight 3) / \ Node B (weight 4) Node D (weight 7) / ...
stackexchange/codereview
I'm still trying to decide whether my (home) project should use UTF-8 strings (implemented in terms of std::string with additional UTF-8-specific functions when necessary) or some 16-bit string (implemented as std::wstring). The project is a programming language and environment (like VB, it's a combination of both). Th...
stackexchange/codereview
If you have a situation where a TCP connection is potentially too slow and a UDP 'connection' is potentially too unreliable what do you use? There are various standard reliable UDP protocols out there, what experiences do you have with them? Please discuss one protocol per reply and if someone else has already mentione...
stackexchange/codereview
Ok, I get the basics of video format - there are some container formats and then you have core video/audio formats. I would like to write a web based application that determines what video/audio codec a file is using. How best can I programmatically determine a video codec? Would it be best to use a standard library vi...
stackexchange/codereview
Should I bind directly to objects returned from a webservice or should I have client-side objects that I bind to my gridcontrols? For instance if I have a service that returns object Car should I have a client side Car object that I populate with values from the webservice Car object? What is considered best-practice?...
stackexchange/codereview
I think it's associating my Web Service's CS files with the related ASMX files. But whatever's happening, I can't double-click to open the CS files - I have to "view Code" or it opens in the designer. Anyone know how to turn off this automatic behavior? I just want to edit the code!
stackexchange/codereview
I need to add role based permissions to my Rails application, and am wondering what the best plugins out there are to look into. I am currently using the RESTful authentication plugin to handle user authentication. Why is the plug in you suggest better than the other ones out there?
stackexchange/codereview
I've been playing around with OpenGL ES development on Android. OpenGL ES applications seem to run slowly in the Emulator on my development machine. Does this reflect likely performance of actual hardware? I'm concerned about spending too much time developing an application if the graphics performance is going to be sl...
stackexchange/codereview
I'd like to build a real quick and dirty administrative backend for a Ruby on Rails application I have been attached to at the last minute. I've looked at activescaffold and streamlined and think they are both very attractive and they should be simple to get running, but I don't quite understand how to set up either on...
stackexchange/codereview
I'd like to unit test responses from the Google App Engine webapp.WSGIApplication, for example request the url '/' and test that the responses status code is 200, using GAEUnit. How can I do this? I'd like to use the webapp framework and GAEUnit, which runs within the App Engine sandbox (unfortunately WebTest does not...
stackexchange/codereview
I've got a java servlet which is hitting this bug when down-scaling images... https://bugs.java.com/bugdatabase/view_bug?bug_id=5101502 I'm trying to work out the best way to work around it and would appreciate any ideas from the community. Thanks, Steve
stackexchange/codereview
I don’t think I’ve grokked currying yet. I understand what it does, and how to do it. I just can’t think of a situation I would use it. Where are you using currying in JavaScript (or where are the main libraries using it)? DOM manipulation or general application development examples welcome. One of the answers mentions...
stackexchange/codereview
I'm using managed c++ to implement a method that returns a string. I declare the method in my header file using the following signature: String^ GetWindowText() However, when I'm using this method from C#, the signature is: string GetWindowTextW(); How do I get rid of the extra "W" at the end of the method's name?
stackexchange/codereview
I'm thinking in particular of how to display pagination controls, when using a language such as C# or Java. If I have x items which I want to display in chunks of y per page, how many pages will be needed?
stackexchange/codereview
I cant post the code (proprietary issues) but does anyone know what types of things would cause the following error in C#. It is being thrown by a VOIP client that I wrote (using counterpath api) when the call is ended by the other client. The error is: System.AccessViolationException was unhandled Message="Attempted...
stackexchange/codereview
I have a web application written in C# that consumes several internal web services. We have a development tier, a testing tier, and a production tier. Also, we use the WSDL.exe command to generate a Proxies.cs file for a given tier's web services. When we are ready to deploy our code up the stack from development to ...
stackexchange/codereview
Question in the title. And what happens when all 3 of $_GET[foo], $_POST[foo] and $_COOKIE[foo] exist? Which one of them gets included to $_REQUEST?
stackexchange/codereview
I am wanting to use ActiveScaffold to create assignment records for several students in a single step. The records will all contain identical data, with the exception of the student_id. I was able to override the default form and replace the dropdown box for selecting the student name with a multi-select box - which i...
stackexchange/codereview
Does anyone know why in Oracle 11g when you do a Count(1) with more than one natural join it does a cartesian join and throws the count way off? Such as SELECT Count(1) FROM record NATURAL join address NATURAL join person WHERE status=1 AND code = 1 AND state = 'TN' This pulls back like 3 million rows when SELECT * F...
stackexchange/codereview
I followed this tutorial on configuring the Rails plugin ExceptionNotifier. I know that I have ActionMailer configured correctly because I am getting mail from other forms. I even have local_addresses.clear set so that it should be delivering mail no matter what. I am using Apache with a mongrel_cluster running in the ...
stackexchange/codereview
Is there a tool or a way to find out how much memory consumed by each DLL or object in .NET? The more detail it analyzes the better. Thanks.
stackexchange/codereview
I'm having trouble with global variables in php. I have a $screen var set in one file, which requires another file that calls an initSession() defined in yet another file. The initSession() declares global $screen and then processes $screen further down using the value set in the very first script. How is this possible...
stackexchange/codereview
Has any one done this before? It would seem to me that there should be a webservice but i can't find one. I am writing an application for personal use that would just show basic info from IMDB.
stackexchange/codereview
I've got an open-source app that is hosted at code.google.com. It is cross platform ( Linux / Windows / Mac ). I uploaded the code initially from a WinXP machine using TortoiseSVN and it seems that none of the "configure" batch files that are used for the linux build have their "execute" bits set. What would be the ea...
stackexchange/codereview
In SharePoint, it is easy to set up a List webpart consisting of Links to other documents, folders, sites, etc. Unfortunately, when clicking these links, the default behavior is for the page to open in the current browser window. That is, it does NOT open the page in a new instance of the browser. This has proven an...
stackexchange/codereview
My colleague has found himself in an "interesting" situation. He is working on a Silverlight (2.0) prototype that needs to call existing web services in the enterprise and bind the returned data to data-display controls. The thing is, the web services return .NET DataSets (they are not about to change existing implemen...
stackexchange/codereview
I'm working on VS 2005 and something has gone wrong on my machine. Suddenly, out of the blue, I can no longer build deployment files. The build message is: ERROR: An error occurred generating a bootstrapper: Invalid syntax. ERROR: General failure building bootstrapper ERROR: Unrecoverable build error A quick Google s...
stackexchange/codereview
Is there a way to hide the google toolbar in my browser programmable?
stackexchange/codereview
My understanding of the Git pack file format is something like: Where the table is 32-bits wide, and the first three 32-bit words are the pack file header. The last row of 32 bits are the first 4 bytes of an entry. As I understand it, the size of the entry is specified by consecutive bytes with the MSB set, followed...
stackexchange/codereview
How would you write a regular expression to convert mark down into HTML? For example, you would type in the following: This would be *italicized* text and this would be **bold** text This would then need to be converted to: This would be <em>italicized</em> text and this would be <strong>bold</strong> text Very simi...
stackexchange/codereview
I am writing a web app using TurboGears, and in that app the users must be able to generate different reports. The data the reports need is stored in a database (MySQL). The reports must be returned either as a easily printable html document, or a pdf file. I have previously used jasper and iReport for creating the doc...
stackexchange/codereview
C++ just sucks too much of my time by making me micro-manage my own memory, making me type far too much (hello std::vector<Thingy>::const_iterator it = lotsOfThingys.begin()), and boring me with long compile times. What's the single best alternative for serious real-time graphics programming? Garbage collection is a ...
stackexchange/codereview
kt@rails-ubuntu:~/rails/ledger/releases/20080820144914/.git/hooks$ ls -al ls: cannot access post-commit: No such file or directory ls: cannot access update: No such file or directory ls: cannot access post-update: No such file or directory ls: cannot access commit-msg: No such file or directory ls: cannot access pre-r...
stackexchange/codereview
Currently i am developing sites using DNN framework. Currently my development and staging environment is same. Client is vewing same site which I am using for development. I have started using tortoise svn (subversion) for maintaining versions and backup. I am using file based svn repository for it. The issue is svn cr...
stackexchange/codereview
When attempting to call functions in math.h, I'm getting link errors like the following undefined reference to sqrt But I'm doing a #include <math.h> I'm using gcc and compiling as follows: gcc -Wall -D_GNU_SOURCE blah.c -o blah Why can't the linker find the definition for sqrt?
stackexchange/codereview
Within an event, I'd like to put the focus on a specific TextBox within the ListViewItem's template. The XAML looks like this: <ListView x:Name="myList" ItemsSource="{Binding SomeList}"> <ListView.View> <GridView> <GridViewColumn> <GridViewColumn.CellTemplate> ...
stackexchange/codereview
We use a CruiseControl.Net/NAnt/Subversion stack for CI. Doing a fresh checkout for every build is way too time-consuming, so currently we just do an update on a working copy. However, this leaves the possibility that orphaned files may remain in the working copy, after being deleted in source control. We have tried us...
stackexchange/codereview
Is there a unicode debug visualizer in Visual Studio 2008? I have a xml file that I'm pretty sure is in unicode. When I open it in wordpad, it shows the japanese characters correctly. When I read the file into a string using File.ReadAllText (UTF8), all the japanese characters show up as blocks in the string visualizer...
stackexchange/codereview
For a long time i have tried to work out the best way to access certain site files which i don't wish to be apart of a project or to ease integration with multiple developers (and talents, e.g. designers) on a single project. A lot of sites i have created have had folders with large amounts of images and other binary f...
stackexchange/codereview
I have a sprite loaded as a texture and I need to animate it, allowing it to "face" left or right -- essentially sometimes I need to "flip" it. I know that OpenGL has a gltranslate which repositions an object, and glrotate which rotates it. Is there a method that simply flips it across one axis? If not, how would ...
stackexchange/codereview
A lot of contact management programs do this - you type in a name (e.g., "John W. Smith") and it automatically breaks it up internally into: First name: John Middle name: W. Last name: Smith Likewise, it figures out things like "Mrs. Jane W. Smith" and "Dr. John Doe, Jr." correctly as well (assuming you allow for field...
stackexchange/codereview
I've always taken the approach of first deploying the database with a minimal set of indexes and then adding/changing indexes as performance dictates. This approach works reasonably well. However, it still doesn't tell me where I could improve performance. It only tells me where performance is so bad that users complai...
stackexchange/codereview
I've started to work a bit with master pages for an ASP.net mvc site and I've come across a question. When I link in a stylesheet on the master page it seems to update the path to the sheet correctly. That is in the code I have <link href="../../Content/Site.css" rel="stylesheet" type="text/css" /> but looking at th...
stackexchange/codereview
How do I park a Bluetooth connection? I'm trying to communicate with dozens of Bluetooth devices, and the time to re-establish a connection is unacceptable. I've read that you can park connections, but not found anything that answers how to do this.
stackexchange/codereview
PHP's explode function returns an array of strings split on some provided substring. It will return empty strings when there are leading, trailing, or consecutive delimiters, like this: var_dump(explode('/', '1/2//3/')); array(5) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(0) "" [3]=> string(...
stackexchange/codereview
I like jQuery and I was wondering if anyone have used a good plugin or (non-jQuery) JavaScript library that allows for auto-formatting of structured fields like phone numbers or dates. I know of the jquery-ui-datapicker plugin, and not what I am looking for here. You may type in a phone number as 123 which then becom...
stackexchange/codereview
Where can I find a complete reference of the ncurses C API?
stackexchange/codereview
Who here is using WASP (http://wasp.sourceforge.net/content/) to in real world applications? What impressions do you have? Good? Bad? If you can provide any inputs, how good it is comparing with rails for example. I'm really looking for MVC frameworks for PHP Update: This comparation I found is good.
stackexchange/codereview
I am reading a .NET book, and in one of the code examples there is a class definition with this field: private DateTime? startdate What does DateTime? mean?
stackexchange/codereview
I've seen questions for doing the reverse, but I have an 800MB PostgreSQL database that needs to be converted to MySQL. I'm assuming this is possible (all things are possible!), and I'd like to know the most efficient way of going about this and any common mistakes there are to look out for. I have next to no experienc...
stackexchange/codereview
I am trying to create a service with C# that launches a process that can be displayed on the Windows XP Logon screen. I found some code that is doing this in C++. The C++ code is for a service that creates another process with STARTUPINFO.lpDesktop set to "WinSta0\WinLogon". The created process is then displayed to t...
stackexchange/codereview
In a ColdFusion Component (CFC), is it necessary to use fully qualified names for variables-scoped variables? Am I going to get myself into trouble if I change this: <cfcomponent> <cfset variables.foo = "a private instance variable"> <cffunction name = "doSomething"> <cfset var bar = "a function local ...
stackexchange/codereview
I'm a single developer looking to get off of Visual Source Safe and move to svn. A quick search brings up several tools, but I don't see a clear winner and I can't afford to spend a lot of time testing different tools. Has anyone done this successfully, and can recommend a method?
stackexchange/codereview
Mac OS X ships with apache pre-installed, but the files are in non-standard locations. This question is a place to collect information about where configuration files live, and how to tweak the apache installation to do things like serve php pages.
stackexchange/codereview
Years ago I created a programming collaboratory in Diversity University MOO -- a room written in MOOcode that used TCP/IP to communicate with a perl server back at my campus to compile and execute C, Perl, Bash and other programs and return results to the MOO collaboratory -- all for demonstrating programming languages...
stackexchange/codereview
How can I remove those annoying Mac OS X .DS_Store files from a Git repository?
stackexchange/codereview
Is output buffering enabled by default in Python's interpreter for sys.stdout? If the answer is positive, what are all the ways to disable it? Suggestions so far: Use the -u command line switch Wrap sys.stdout in an object that flushes after every write Set PYTHONUNBUFFERED env var sys.stdout = os.fdopen(sys.stdout.fi...
stackexchange/codereview
Is there an easy way of finding out the host name of a machine that generated a user mode dump file via WinDbg? Or at least any piece of identifying information to try and confirm that two dump files came from the same system.
stackexchange/codereview
I need to get the name of the machine my .NET app is running on. What is the best way to do this?
stackexchange/codereview
Is there the way to apply "greedy" behavior to and keys in Visual Studio? By "greedy" I mean such behavior when all whitespace between cursor position and next word bound can be deleted using one keystroke.
stackexchange/codereview
I'm using the .NET TWAIN code from http://www.codeproject.com/KB/dotnet/twaindotnet.aspx?msg=1007385#xx1007385xx in my application. When I try to scan an image when the scanner is not plugged in, the application freezes. How can I check if the device is plugged in, using the TWAIN driver?
stackexchange/codereview
Can somebody in SO please provide me with a list of resources about Enterprise Mashups and technologies related to SharePoint platform? Update (as per suggestion of @Spoon16 in the comments):- The mashup application may typically retrieve a list of contacts from a SharePoint site and display the address of a selected c...
stackexchange/codereview
Imagine I have an function which goes through one million/billion strings and checks smth in them. f.ex: foreach (String item in ListOfStrings) { result.add(CalculateSmth(item)); } it consumes lot's of time, because CalculateSmth is very time consuming function. I want to ask: how to integrate multithreading in th...
stackexchange/codereview
If I have a table in MySQL which represents a base class, and I have a bunch of tables which represent the fields in the derived classes, each of which refers back to the base table with a foreign key, is there any way to get MySQL to enforce the one-to-one relationship between the derived table and the base table, or ...
stackexchange/codereview
I have an application with one form in it, and on the Load method I need to hide the form. The form will display itself when it has a need to (think along the lines of a outlook 2003 style popup), but I can' figure out how to hide the form on load without something messy. Any suggestions?
stackexchange/codereview
I have a Data Access Object TransactionDao. When you call TransactionDao.Save(transaction) I would like for it to setting a transaction.IsSaved=true flag (this is a simplification the actual thing I'm trying to do is not quite so banal). So when mocking my TransactionDao with RhinoMocks how can I indicate that it sho...
stackexchange/codereview
Those of you who have used Pex, what do you think its advantages and disadvantages are of Pex as a tool? Also, what do you think are the advantages and disadvantages of "Automated Exploratory Testing" in general, as a supplement to TDD/Unit Testing?
stackexchange/codereview
I am developing a C++ class library containing domain model classes, and I would like to add support for instantiating these classes from various persistence mechanisms, i.e. databases and file. The user of the class library should be given an interface(?) against which to program a class that can transfer the data fro...
stackexchange/codereview
I've built a wrapper over NumbericUpDown control. The wrapper is generic and can support int? and double? I would like to write a method that will do the following. public partial class NullableNumericUpDown<T> : UserControl where T : struct { private NumbericUpDown numericUpDown; private T? Getvalue() { T?...
stackexchange/codereview
I am using USRP with DBSRX daughter board. I need a very high sample frequency. Currently, the USRP can give me maximum sample frequency of 64M/8 in I and Q, and the data type is short, which takes 2 bytes. So can I decrease the length of the output data? for example save the data as char which takes 1 bytes, and incr...
stackexchange/codereview
Typing Ctrl+O twice in editor when a java type is selected pops-up an outline context dialog that displays the members && inherited members. How can I have this in the main outline view?
stackexchange/codereview
Take this code: <?php if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; } if ($action) { echo $action; } else { echo 'No variable'; } ?> And then access the file with ?action=test Is there any way of preventing $action from automatically being declared by the GET? Oth...
stackexchange/codereview
After hitting a few StackOverflowExceptions in .NET I noticed they completely bypass the unhandled exception handlers that .NET offers (Application.ThreadException / AppDomain.UnhandledException). This is very disturbing since we have critical cleanup code in those exception handlers. Is there any way to overcome this?...
stackexchange/codereview
Is it possible to automount a TrueCrypt volume when logging in to Ubuntu 8.04? It's already storing the wireless network keys using the Seahorse password manager. Could TrueCrypt be made to fetch its volume password from the same keyring? Currently this would seem like the most convenient way to store my source code on...
stackexchange/codereview
In a Linux-based system (specifically, Ubuntu Server 8.04), how can you measure downstream bandwidth on a per-user basis? Optimally, I would like a method that provides data directly instead of having to run another process and parse its output. I have a technique for measuring per-user upstream bandwidth by setting ...
stackexchange/codereview
I knew ActionScript and ActionScript2 inside out, but I've been away from Flash for a couple years. What's the magnitude of becoming fluent in ActionScript3 and the new Flash functionality? From Colin Moock's blog, I heard that some of the fundamental movieclip methods have changed...
stackexchange/codereview
I have a large source repository split across multiple projects. I would like to produce a report about the health of the source code, identifying problem areas that need to be addressed. Specifically, I'd like to call out routines with a high cyclomatic complexity, identify repetition, and perhaps run some lint-like s...
stackexchange/codereview
Is it possible to launch a new window in JavaScript using the window.Open function, then set the focus to that tab? Here's what I'm doing today: var winRef = window.open(outUrl,wName,'left='+ wX +',top=' + wY + ',height=' + wH + ',width=' + wW + args); try { // Not all window t...
stackexchange/codereview
Using Django's built in models, how would one create a triple-join between three models. For example: Users, Roles, and Events are the models. Users have many Roles, and Roles many Users. (ManyToMany) Events have many Users, and Users many Events. (ManyToMany) But for any given Event, any User may have only one Role....
stackexchange/codereview
How do I get timestamp from e.g. 22-09-2008?
stackexchange/codereview
Is there a runtime performance penalty when using interfaces (abstract base classes) in C++?
stackexchange/codereview
Has anyone found a way to run Selenium RC / Selenium Grid tests, written in C# in parallel? I've currently got a sizable test suite written using Selenium RC's C# driver. Running the entire test suite takes a little over an hour to complete. I normally don't have to run the entire suite so it hasn't been a concern up t...
stackexchange/codereview
Say I have a blogging app in Django. How can i re-order the posts using a draggable table in the default admin? It would be best if i didn't have to add any extra fields to the model, but if i really have to i can.
stackexchange/codereview
What is the best way to measure the channel for use in space-time coding schemes using an RFX2400 board? As far as I know you can only get the I and Q streams out of the USRP, and I'm not sure how you would get a set of channel coefficients. I am planning on using the conjugate of the measured channel to 'reverse' the ...
stackexchange/codereview
I'm working on a WinCE 6.0 system with a touchscreen that stores its calibration data (x-y location, offset, etc.) in the system registry (HKLM\HARDWARE\TOUCH). Right now, I'm placing the cal values into registry keys that get put into the OS image at build time. That works fine for the monitor that I get the origina...
stackexchange/codereview