instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I'm trying to convert an application using the 1.1 version of the Enterprise Library Caching block over to the 2.0 version. I think where I'm really having a problem is that the configuration for the different EntLib pieces was split out over several files. Apparently, this used to be handled by the ConfigurationMana...
stackexchange/codereview
When writing C/C++ code, in order to debug the binary executable the debug option must be enabled on the compiler/linker. In the case of GCC, the option is -g. When the debug option is enabled, how does the affect the binary executable? What additional data is stored in the file that allows the debugger to function ...
stackexchange/codereview
I have a table that got into the "db_owner" schema, and I need it in the "dbo" schema. Is there a script or command to run to switch it over?
stackexchange/codereview
Has anyone used both FogBugz and Axosoft's OnTime and care to offer an opinion? AxoSoft has a big feature comparison chart but I'm also interested in more subjective thoughts on things like ease of use and stability.
stackexchange/codereview
I have added some code which compiles cleanly and have just received this Windows error: --------------------------- (MonTel Administrator) 2.12.7: MtAdmin.exe - Application Error --------------------------- The exception Privileged instruction. (0xc0000096) occurred in the application at location 0x00486752. I am a...
stackexchange/codereview
I'm looking for the best way to take a simple input: echo -n "Enter a string here: " read -e STRING and clean it up by removing non-alphanumeric characters, lower(case), and replacing spaces with underscores. Does order matter? Is tr the best / only way to go about this?
stackexchange/codereview
I've created my own application in VB.NET that saves its documents into a file with it's own custom extension (.eds). Assuming that I've properly associated the file extension with my application, how do I actually handle the processing of the selected file within my application when I double click on the file in File ...
stackexchange/codereview
My C# project - we'll call it the SuperUI - used to make use of a class from an external assembly. Now it doesn't, but the compiler won't let me build the project without the assembly reference in place. Let me elaborate. This project used to throw and catch a custom exception class - the SuperException - which was der...
stackexchange/codereview
Is that needed?
stackexchange/codereview
I'd like to ask a question then follow it up with my own answer, but also see what answers other people have. We have two large files which we'd like to read from two separate threads concurrently. One thread will sequentially read fileA while the other thread will sequentially read fileB. There is no locking or comm...
stackexchange/codereview
Real strange. I cannot find a tool that enables one to display a SVN repository in graphical form. I would like the ability to see changes in revision / time , branch / time graphs. Does anyone know of one. Ideally it would be platform neutral or even better web based. Solutions offered so far in brief: svn-graph Fish...
stackexchange/codereview
After successfully building dblink on solaris 10 using Sun C 5.9 SunOS_sparc 2007/05/03 and gmake. I ran gmake installcheck and got the following output: ========== running regression test queries ========== test dblink ... FAILED ====================== 1 of 1 tests failed. The differences tha...
stackexchange/codereview
My university doesn't support the POST cgi method (I know, it's crazy), and I was hoping to be able to have a system where a user can have a username and password and log in securely. Is this even possible? If it's not, how would you do it with POST? Just out of curiosity. Cheers!
stackexchange/codereview
Is anyone aware of a language feature or technique in C++ to prevent a child class from over riding a particular method in the parent class? class Base { public: bool someGuaranteedResult() { return true; } }; class Child : public Base { public: bool someGuaranteedResult() { return false; /* Haha I broke thing...
stackexchange/codereview
RPO 1.0 (Runtime Page Optimizer) is a recently (today?) released component for ASP and Sharepoint that compresses, combines and minifies (I can’t believe that is a real word) Javascript, CSS and other things. What is interesting is that it was developed for ActionThis.com a NZ shop that saw at TechEd last year. They b...
stackexchange/codereview
I had an idea for a client-side language other than JavaScript, and I'd like to look into developing a Firefox plugin that would treat includes of this new language in a page, like <script type="newscript" src="path/script.ns" />, just as if it were a natively supported language. The plugin would do all of the language...
stackexchange/codereview
Here's the scenario: A C# Windows Application project stored in SVN is used to create an executable. Normally, a build server handles the build process and creates builds at regular intervals which are used by testing. In this particular instance I was asked to modify a specific build and create the executable. I'm n...
stackexchange/codereview
Specifically, what commands do I run from the terminal?
stackexchange/codereview
How does one convert an image from one color profile to another (screen to printer, or scanner to screen). In Visual C++ you would use the function in ICM.h, is there a managed way to do this with GDI+? I need to use GDI+, not WPF. I'd prefer to have a managed solution, but if it is not available, I guess PInkvoke wi...
stackexchange/codereview
I would like to pass an argument(s) to a method being defined using define_method, how would I do that?
stackexchange/codereview
It seems like if you want to get the keys of a mapping, you ask for them; otherwise, give me the whole mapping (constituted by a set of key-value pairs). Is there a historical reason for this?
stackexchange/codereview
I'm a bit perplexed by drag and drop in wxPython (but perhaps this questions pertains to drag and drop in other GUI frameworks as well). The frameworks provides a couple of callbacks (OnEnter and OnDragOver) that purportedly allow me to inform the system whether the current mouse position is a valid place to drop whate...
stackexchange/codereview
I'm trying to re-install a DLL in the GAC, everything seems to work fine but the web application accessing it still seems to be using the old one. The old DLL is the same version as the new one with only a minor edit, it will be used by 50 different sites so changing the version then changing the reference in the web.c...
stackexchange/codereview
How does the new Microsoft asp.net mvc implementation handle partitioning your application - for example: --index.aspx --about.aspx --contact.aspx --/feature1 --/feature1/subfeature/action --/feature2/subfeature/action I guess what I am trying to say is that it seems everything has to go into the root of the views/con...
stackexchange/codereview
And, if not, is the only other alternative a blob?
stackexchange/codereview
What's the difference between struct and class in .NET?
stackexchange/codereview
I'm looking for a clear, concise and accurate answer. Ideally as the actual answer, although links to good explanations welcome.
stackexchange/codereview
On Windows, is there any way to programatically approve a USB device after insertion, if it is of a certain type (say Removable Drive) allow its use, otherwise not? Also not to allow running of drivers, only allow usage of the device in an approved way? I.E. We want to allow the insertion of USB drives, but not have t...
stackexchange/codereview
I am using <input type="file" id="fileUpload" runat="server"> to upload a file in an ASP.NET application. I would like to limit the file type of the upload (example: limit to .xls or .xlsx file extensions). Both JavaScript or server-side validation are OK (as long as the server side validation would take place before ...
stackexchange/codereview
I find I can do more with NHibernate, and even Castle than with the Linq to Entities, or linq to SQL. Am I crazy?
stackexchange/codereview
I have been a VB.net developer for a few years now but I am currently applying to a few companies that use C#. I have even been told that at least one of the companies doesn't want VB.net developers. I have been looking online trying to find real differences between the two and have asked on crackoverflow. The only ma...
stackexchange/codereview
How do I prevent vim from replacing spaces with tabs when autoindent is on? An example: if I have two tabs and 7 spaces in the beginning of the line, and tabstop=3, and I press Enter, the next line has four tabs and 1 space in the beginning, but I don't want that...
stackexchange/codereview
I want to embed an .asp page on an html page. I cannot use an iframe. I tried: <object width="100%" height="1500" type="text/html" data="url.asp"> alt : <a href="url.asp">url</a> </object>" works great in ff but not ie7. Any ideas? Is it possible to use the object tag to embed .asp pages for IE or does it only work...
stackexchange/codereview
We are currently looking to adopt some type of "standard" developer framework and have looked into using the Enterprise Library. Would you recommend using these blocks as the foundation for software development, or should we do something home grown?
stackexchange/codereview
I have a directory structure like the following; script.php inc/include1.php inc/include2.php objects/object1.php objects/object2.php soap/soap.php Now, I use those objects in both script.php and /soap/soap.php, I could move them, but I want the directory structure like that for a specific reason. When executing ...
stackexchange/codereview
I lost my MySQL username and password. How do I retrieve it?
stackexchange/codereview
When you create a new content type in Drupal using the Content Creation Kit, you automatically get Title and Body fields in the generated form. Is there a way to remove them?
stackexchange/codereview
I know that if you have a loop that modifies the count of the items in the loop, using the NSEnumerator on a set is the best way to make sure your code blows up, however I would like to understand the performance tradeoffs between the NSEnumerator class and just an old school for loop
stackexchange/codereview
I would like to do the equivalent of: object result = Eval("1 + 3"); string now = Eval("System.DateTime.Now().ToString()") as string Following Biri s link, I got this snippet (modified to remove obsolete method ICodeCompiler.CreateCompiler(): private object Eval(string sExpression) { CSharpCodeProvider c = new ...
stackexchange/codereview
What compiler (I'm using gcj 4.x) options should I use to generate an "exe" file for my java application to run in windows?
stackexchange/codereview
Java has a convenient split method: String str = "The quick brown fox"; String[] results = str.split(" "); Is there an easy way to do this in C++?
stackexchange/codereview
I have a set of multiple assemblies (one assembly is to be used as an API and it depends on other assemblies). I would like to merge all assemblies into one single assembly but prevent all assemblies except the API one to be visible from the outside. I will then obfuscate this assembly with Xenocode. From what I have s...
stackexchange/codereview
When creating scrollable user controls with .NET and WinForms I have repeatedly encountered situations where, for example, a vertical scrollbar pops up, overlapping the control's content, causing a horizontal scrollbar to also be needed. Ideally the content would shrink just a bit to make room for the vertical scrollb...
stackexchange/codereview
I have a flash player that has a set of songs loaded via an xml file. The files dont start getting stream until you pick one. If I quickly cycle through each of the 8 files, then flash starts trying to download each of the 8 files at the same time. I'm wondering if there is a way to clear the file that is being downloa...
stackexchange/codereview
What is the best way of ensuring that a user supplied password is a strong password in a registration or change password form? One idea I had (in python) def validate_password(passwd): conditions_met = 0 conditions_total = 3 if len(passwd) >= 6: if passwd.lower() != passwd: conditions_met += 1 ...
stackexchange/codereview
More than once I've lost work by accidentally killing a temporary buffer in Emacs. Can I set up Emacs to give me a warning when I kill a buffer not associated with a file?
stackexchange/codereview
Two years ago, we shipped a multi-gigabyte Windows application, with lots of video files. Now we're looking to release a significant update, with approximately 1 gigabyte of new and changed data. We're currently looking at DVD fulfillment houses (like these folks, for example), which claim to be able to ship DVDs to ou...
stackexchange/codereview
I've read (in Nish Sivakumar's book C++/CLI In Action among other places) that you should use the __clrcall decorator on function calls to avoid double-thunking, in cases where you know that the method will never be called from unmanaged code. Nish also says that if the method signature contains any CLR types, then the...
stackexchange/codereview
I have Oracle SQL Developer already installed and am able to connect to and query Oracle databases. Using Help -> Check for Updates I was able to install the Oracle MySQL Browser extension but there are no connection options for MySQL databases.
stackexchange/codereview
As a lot of people pointed out in this question, Lisp is mostly used as a learning experience. Nevertheless, it would be great if I could somehow use my Lisp algorithms and combine them with my C# programs. In college my profs never could tell me how to use my Lisp routines in a program (no, not writing a GUI in Lisp,...
stackexchange/codereview
Is there any way to know if I'm compiling under a specific Microsoft Visual Studio version?
stackexchange/codereview
I'm using the .NET CF 3.5. The type I want to create does not have a default constructor so I want to pass a string to an overloaded constructor. How do I do this? Code: Assembly a = Assembly.LoadFrom("my.dll"); Type t = a.GetType("type info here"); // All ok so far, assembly loads and I can get my type string s = "Pa...
stackexchange/codereview
I want to shift the contents of an array of bytes by 12-bit to the left. For example, starting with this array of type uint8_t shift[10]: {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xBC} I'd like to shift it to the left by 12-bits resulting in: {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAB, 0xC0, 0x00}
stackexchange/codereview
I have a scenario wherein, for example, I need to repeat a list of US states and display a table of cities and city populations after the name of each state. The design requirement dictates that every outer repetition must be the name of a state followed by a table of cities, and that requirement cannot be changed at t...
stackexchange/codereview
So I have about 10 short css files that I use with mvc app. There are like error.css login.css etc... Just some really short css files that make updating and editing easy (At least for me). What I want is something that will optimize the if else branch and not incorporate it within the final bits. I want to do somethin...
stackexchange/codereview
I have my own class inside the file "Particles.h" and the class's implementation is inside "Particles.cpp" I want the file "Load.h" to recognize my classes inside there, so I've added the line #include "Particles.h" and the file doesn't recognize it and in the past everything was OK (I haven't made any changes inside ...
stackexchange/codereview
I am writing a DDL script to drop a number of tables but need to identify all dependencies for those tables first. Those dependencies include foreign key constraints, stored procedures, views, etc. Preferably, I want to programmatically script out dropping those dependencies using the system tables/views before droppin...
stackexchange/codereview
Can anyone point me to a good introduction to coding against the paypal API?
stackexchange/codereview
The leaving your wireless network open question reminded me of this. I typically share the root drive on my machines across my network, and tie login authorization to the machines NT ID, so there is at least some form of protection. My question, how easy is it to gain access to these drives for ill good? Is the authori...
stackexchange/codereview
I'm going through the problems on projecteuler.net to learn how to program in Erlang, and I am having the hardest time creating a prime generator that can create all of the primes below 2 million, in less than a minute. Using the sequential style, I have already written three types of generators, including the Sieve of...
stackexchange/codereview
I am trying to extract a gif image embedded as a resource within my ISAPI dll using WebBroker technology. The resource has been added to the DLL using the following RC code: LOGO_GIF RCDATA logo.gif Using resource explorer I verified it is in the DLL properly. using the following code always throws an exception, "res...
stackexchange/codereview
I have a very specific problem using C# and a Windows MDI Form application. I want to display two (or more) images to the user, a 'left' and a 'right' image. The names of the images are concealed from the user, and then the user selects which image they prefer (this is part of a study involving medical image quality,...
stackexchange/codereview
The System.Windows.Threading.DispatcherObject class (which DependencyObject is based on) contains a useful function, called CheckAccess(), that determines whether or not the code is running on the UI thread. When I wanted to use it yesterday, I was puzzled to find out that Intellisense didn't show the function (nor Ver...
stackexchange/codereview
I would like to know what semaphores, messageQueues, etc... are active in my vxWorks 6.x system. I have access to this information via the debugger, but I would like access to it from the shell. Is there a way?
stackexchange/codereview
I'd like to know what the currently checked out revision number is for a file or directory. Is there a way to do this in TortoiseSVN on Windows ?
stackexchange/codereview
I'm trying this with Oracle SQL Developer and am on an Intel MacBook Pro. But I believe this same error happens with other clients. I can ping the server hosting the database fine so it appears not to be an actual network problem. Also, I believe I'm filling in the connection info correctly. It's something like this...
stackexchange/codereview
earlier today someone asked about free/cheap component libraries for winforms. I'm interested in the same thing, but for asp.net. There are some great commercial libraries like Telerik and DevExpress, but are there any great free/cheap alternatives?
stackexchange/codereview
What command checks if a directory exists or not within a Bash shell script?
stackexchange/codereview
I know I can programatically make the taskbar item for a particular window start flashing when something changes, but is there any way I can stop it from flashing either programatically after a certain period of time or at least is there a keyboard shortcur I can give to my users to somehow stop the flashing?
stackexchange/codereview
I'm working on getting an Introduction to Groovy presentation ready for my local Java User's Group and I've pretty much got it together. What I'd like to see is what you all think I just have to cover. Remember, this is an introductory presentation. Most of the people are experienced Java developers, but I'm pretty...
stackexchange/codereview
I use solr to search for documents and when trying to search for documents using this query "id:*", I get this query parser exception telling that it cannot parse the query with * or ? as the first character. HTTP Status 400 - org.apache.lucene.queryParser.ParseException: Cannot parse 'id:*': '*' or '?' not allowed as...
stackexchange/codereview
I am trying to implement a software Null Modem. Any suggestion how to create virtual COM Ports? Looking for tips, strategy, known techniques, etc..
stackexchange/codereview
I had the idea of a search engine that would index web items like other search engines do now but would only store the file's title, url and a hash of the contents. This way it would be easy to find items on the web if you already had them and didn't know where they came from or wanted to know all the places that somet...
stackexchange/codereview
Can I write a plug in for Microsoft SQL Enterprise Manager which changes the query window background if the query window points to a production database?
stackexchange/codereview
It's a bit difficult to implement a deep object copy function. What steps you take to ensure the original object and the cloned one share no reference?
stackexchange/codereview
When I use the default java locale on my linux machine it comes out with the US locale settings, where do I change this so that it comes out with the correct locale?
stackexchange/codereview
How do I change font size on the DataGridView?
stackexchange/codereview
I have a strange problem when I publish my website. I inherited this project and the problem started before I arrived so I don't know what conditions lead to the creation of the problem. Basically, 3 folders below the website project fail to publish properly. When the PrecompiledWeb is transferred to the host these thr...
stackexchange/codereview
Is it possible to have XML-embedded JavaScript executed to assist in client-side (browser-based) XSL transformations? How is it done and how official is it? Microsoft's XML DOM objects allow this on the server-side (i.e. in ASP/ASP.NET). Clarification: I do not mean HTML DOM scripting performed after the document is t...
stackexchange/codereview
I have a three-tier application which is installed in corporate environments. With every server version update, all clients have to be updated, too. Currently, I provide an MSI package which is automatically deployed via Active Directory, however my customers (mostly with 20-300 users each) seem to hate the MSI solutio...
stackexchange/codereview
I know you could make a helper pretty easily given the data. So, if possible, please only submit answers that also include getting the data.
stackexchange/codereview
I'm using Visual Studio (2005 and up). I am looking into trying out making an application where the user can change language for all menues, input formats and such. How would I go on doing this, as I suppose that there is some complete feature within .Net that can help me with this? I need to take the following into ac...
stackexchange/codereview
I know something about Java but completely new to Enterprise Java. I'm trying my hand with NetBeans 6.1 and GlassFish Application Server. Please guide me to some resources which tell me actually what java enterprise applications are, how they are different from normal java classes etc. Also which is the best applicat...
stackexchange/codereview
I am trying to find the virtual file that contains the current users id. I was told that I could find it in the proc directory, but not quite sure which file.
stackexchange/codereview
How can I get hierarchy recordset in ms access through select statement?
stackexchange/codereview
I'll admit that I don't know the inner workings of the unix operating system, so I was hoping someone could shed some light on this topic. Why is the Unix file system better than the windows file system? Would grep work just as well on Windows, or is there something fundamentally different that makes it more powerful o...
stackexchange/codereview
Does filling out HTML meta description/keyword tags matter for SEO?
stackexchange/codereview
Is the return value of GetHashCode() guaranteed to be consistent assuming the same string value is being used? (C#/ASP.NET) I uploaded my code to a server today and to my surprise I had to reindex some data because my server (win2008 64-bit) was returning different values compared to my desktop computer.
stackexchange/codereview
I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string. In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated). Ideally, I would be able to specify...
stackexchange/codereview
I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to this question only in .Net.
stackexchange/codereview
How do I Unit Test a MVC redirection? public ActionResult Create(Product product) { _productTask.Save(product); return RedirectToAction("Success"); } public ActionResult Success() { return View(); } Is Ayende's approach still the best way to go, with preview 5: public static void RenderView(this Con...
stackexchange/codereview
My web application generates pdf files and either e-mails or faxes them to our customers. Somehow IIS6 is keeping hold of the file and blocking any other requests for it claiming the old '..the process cannot access the file 'xxx.pdf' because it is being used by another process.' When I recycle the application pool all...
stackexchange/codereview
I just came across the proposed Boost::Dataflow library. It seems like an interesting approach and I was wondering if there are other such alternative frameworks for C++, and if there are any related design patterns. I have not ruled out Boost::Dataflow, I am just looking into any available alternatives so I can under...
stackexchange/codereview
I have a BSTR object that I would like to convert to copy to a wchar__t object. The tricky thing is the length of the BSTR object could be anywhere from a few kilobytes to a few hundred kilobytes. Is there an efficient way of copying the data across? I know I could just declare a wchar_t array and alway allocate the ma...
stackexchange/codereview
<servlet> <servlet-name>myservlet</servlet-name> <servlet-class>workflow.WDispatcher</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>myservlet</servlet-name> <url-pattern>*NEXTEVENT*</url-pattern> </servlet-mapping> Above is the snippet from Tomcat's...
stackexchange/codereview
Using reflection, how can I get all types that implement an interface with C# 3.0/.NET 3.5 with the least code, and minimizing iterations? This is what I want to re-write: foreach (Type t in this.GetType().Assembly.GetTypes()) if (t is IMyInterface) ; //do stuff
stackexchange/codereview
Most program languages have some kind of exception handling; some languages have return codes, others have try/catch, or rescue/retry, etc., each with its own pecularities in readability, robustness, and practical effectiveness in a large group development effort. Which one is the best and why ?
stackexchange/codereview
I'm looking for a profiler in order to find the bottleneck in my C++ code. I'd like to find a free, non-intrusive, and good profiling tool. I'm a game developer, and I use PIX for Xbox 360 and found it very good, but it's not free. I know the Intel VTune, but it's not free either.
stackexchange/codereview
Alright, currently I have my SWF hitting a php file that will go and find all the files I specify to it, add their sizes together and return their combined sizes as one number. I then use this number with a ProgressEvent listener to determine the current percentage of files downloading for that particular section of th...
stackexchange/codereview
So for e.g. 0110 has bits 1 and 2 set, 1000 has bit 3 set 1111 has bits 0,1,2,3 set
stackexchange/codereview