text
string
meta
dict
Q: How do I process a string such as this using regular expressions? How can I create a regex for a string such as this: <SERVER> <SERVERKEY> <COMMAND> <FOLDERPATH> <RETENTION> <TRANSFERMODE> <OUTPUTPATH> <LOGTO> <OPTIONAL-MAXSIZE> <OPTIONAL-OFFSET> Most of these fields are just simple words, but some of them can be p...
{ "language": "en", "url": "https://stackoverflow.com/questions/265814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Join 2 datatables into one resultset I have a dataset that contains 2 datatables they link together using a DataRelation. it it possible to select from those tables into into one result set? thanks, Ofer A: Microsoft's suggestion is to create a helper class. See: http://support.microsoft.com/kb/326080/en-us This i...
{ "language": "en", "url": "https://stackoverflow.com/questions/265825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I use Sybase.Data.ASEClient.dll .NET provider in SSIS? I am trying to create a data connection in SSIS. I have the Sybase.Data.ASEClient.dll version 1.1.680 installed but this does not show as a .Net Provider. Is it possible to use this ADO.NET provider with SSIS and if so how can I make it accessible? A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/265837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Small RISC emulator I'm looking to build a VM into a game and was wondering if anyone knew of any really simple VM's (I was thinking RISC/PIC was close to what I wanted) that are usually used for embedded projects such as controlling robots, motors, sensors, etc. My main concern is having to write a compiler/assembl...
{ "language": "en", "url": "https://stackoverflow.com/questions/265846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I make a label on Form1 say "Hello" from form2? That's it. It's a dumb dumb (embarrassing!) question, but I've never used C# before, only C++ and I can't seem to figure out how to access a Label on my main form from a secondary form and change the text. If anybody can let me know real quick what to do I'd be...
{ "language": "en", "url": "https://stackoverflow.com/questions/265849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to query range of data in DB2 with highest performance? Usually, I need to retrieve data from a table in some range; for example, a separate page for each search result. In MySQL I use LIMIT keyword but in DB2 I don't know. Now I use this query for retrieve range of data. SELECT * FROM( SELECT SMALLI...
{ "language": "en", "url": "https://stackoverflow.com/questions/265850", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do you prevent time zone translation on a SqlConnection? I've got a database here that runs entirely on GMT. The client machines, however, may run on many different time zones (including BST). When you pull data back using SqlConnection, it will translate the datetime value so, for instance 19 August 2008 beco...
{ "language": "en", "url": "https://stackoverflow.com/questions/265855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Default string initialization: NULL or Empty? I have always initialized my strings to NULL, with the thinking that NULL means the absence of a value and "" or String.Empty is a valid value. I have seen more examples lately of code where String.Empty is considered the default value or represents no value. This stri...
{ "language": "en", "url": "https://stackoverflow.com/questions/265875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "138" }
Q: Can Ruby import a .NET dll? I am interested in using/learning RoR in a project where I have to use a .NET dll. Is Ruby capable of importing a .NET dll? A: You can also write a native -> C# wrapper DLL using managed C++ Export all the functions you want as C calls in the DLL, e.g. extern "C" __declspec ( dllexport )...
{ "language": "en", "url": "https://stackoverflow.com/questions/265879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: COM+ Singleton Numerous References I have a COM+ data service that is configured to use object pooling with a min and max pool size of 1. So I have a singleton. In some scenarios my Object count (the number of clients that have a reference to this instance) goes beyond 1 and steadily increases. The instance creation...
{ "language": "en", "url": "https://stackoverflow.com/questions/265883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: No drop packets using the error models for wireless scenario? I am trying to use the error model in ns2 with wireless links, I am using ns2.33. I tried the uniform error model and the markov chain model. No errors from ns but when I am trying to find the dropped packets due to corruption I can not find any of them ...
{ "language": "en", "url": "https://stackoverflow.com/questions/265886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Django Forms, Display Error on ModelMultipleChoiceField I'm having an issue getting validation error messages to display for a particular field in a Django form, where the field in question is a ModelMultipleChoiceField. In the clean(self) method for the Form, I try to add the error message to the field like so: msg...
{ "language": "en", "url": "https://stackoverflow.com/questions/265888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I delete a read-only file? I've got a junk directory where I toss downloads, one-off projects, email drafts, and other various things that might be useful for a few days but don't need to be saved forever. To stop this directory from taking over my machine, I wrote a program that will delete all files older ...
{ "language": "en", "url": "https://stackoverflow.com/questions/265896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: mod_rewrite, php and the .htaccess file I'm coding a small CMS to get a better understanding of how they work and to learn some new things about PHP. I have however come across a problem. I want to use mod_rewrite (though if someone has a better solution I'm up for trying it) to produce nice clean URLs, so site.com/...
{ "language": "en", "url": "https://stackoverflow.com/questions/265898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Free memory from a SafeArrayGetElem call? I have some code in C# which has a com wrapper. This com wrapper is used in a native c++ application. The c++ code uses a method which returns an array of instances of a class from the c# library. The instances come from a SafeArray like so: for (long i =min; i<=max;i++) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/265902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Flow of a use-case If use-case A extends use-case B, does that mean A is complete and flow shifted to B or flow will return to A? Does UML put any restrictions on that? Or does it depend on the modeler? A: "extends" in use-case terminology is not a sequential control-flow relationship; "A extends B" means that unde...
{ "language": "en", "url": "https://stackoverflow.com/questions/265903", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I monitor a flow over wireless connection? I am trying to monitor a tcp flow using flow monitor. attach-fmon wants link object which is not available in wireless connections. How can I solve this problem ? Are there any other solutions ? My code is here http://pastebin.com/f59241692 I got this error message ...
{ "language": "en", "url": "https://stackoverflow.com/questions/265914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why doesn't multithreading in C# reach 100% CPU? I'm working on a program that processes many requests, none of them reaching more than 50% of CPU (currently I'm working on a dual core). So I created a thread for each request, the whole process is faster. Processing 9 requests, a single thread lasts 02min08s, while ...
{ "language": "en", "url": "https://stackoverflow.com/questions/265919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: SQL design around lack of cross-database foreign key references For better or worse, we have a solution that relies on multiple databases that all reference a common administration database. Databases ship as part of modules, and not all modules are required for an installation (probably why we have multiple databa...
{ "language": "en", "url": "https://stackoverflow.com/questions/265921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Is there any difference between parameters in a URL and ? Now, I know a difference between parameters in a URL and a POST parameter: some browsers may misbehave if the URL is too long, so it is not a good idea to stuff hundreds of parameters in a URL, even if your app can respond to a GET request. For the sake of di...
{ "language": "en", "url": "https://stackoverflow.com/questions/265923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Round function in Excel, worksheet function vs VBA I had an application for returning closest matches to certain values in a large cluster of values( as in my earlier question) and I chose a VBA solution. While in the course of using the said application, I observed that the results for the value of 0.5 were not ...
{ "language": "en", "url": "https://stackoverflow.com/questions/265926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Show new WinForms window unfocused I'm generating and showing a new WinForms window on top of a Main Window. How can I achieve that the original (Main Window) keeps the focus? Setting the focus back after showing the new window does not solve my problem because I need to prevent the Main Window's title bar from flic...
{ "language": "en", "url": "https://stackoverflow.com/questions/265930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Indexing Multiple Tables in Lucene I want to use lucene.net to index records in our database. The records are stored in several different tables and tied together through a records table. Would it be better to index each table separately and tie the search results together in code, or should I tie the records toge...
{ "language": "en", "url": "https://stackoverflow.com/questions/265941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Backing Out a backwards merge on Mercurial How do you reverse the effect of a merge on polarised branches without dying of agony? This problem has been plaguing me for months and I have finally given up. You have 1 Repository, with 2 Named Branches. A and B. Changes that occur to A will inevitably occur on B. C...
{ "language": "en", "url": "https://stackoverflow.com/questions/265944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "77" }
Q: how can you easily check if access is denied for a file in .NET? Basically, I would like to check if I have rights to open the file before I actually try to open it; I do not want to use a try/catch for this check unless I have to. Is there a file access property I can check before hand? A: First, what Joel Coehoor...
{ "language": "en", "url": "https://stackoverflow.com/questions/265953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "112" }
Q: PHP "Wrong referrer" error when submitting a mail form I am pretty new to php, but I am learning! I have a simple form on a client website. I am testing the form and when I click submit, I get the following error: Form Mail Script Wrong referrer (referring site). For security reasons the form can only be used, if th...
{ "language": "en", "url": "https://stackoverflow.com/questions/265956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best way to strip punctuation from a string It seems like there should be a simpler way than: import string s = "string. With. Punctuation?" # Sample string out = s.translate(string.maketrans("",""), string.punctuation) Is there? A: This might not be the best solution however this is how I did it. import string f...
{ "language": "en", "url": "https://stackoverflow.com/questions/265960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "811" }
Q: How to get a DIB implemented in a C++/COM library into a .NET client using that COM object We have a COM object implemented with C++/ATL that includes a method which will return a DIB. We are also writing a .NET application that will use this COM object. Since we are writing both, we have the liberty of deciding h...
{ "language": "en", "url": "https://stackoverflow.com/questions/265967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CSS for container divs and falling to the next line I'm more of a programmer than a designer, and I'm trying to embrace <div>s rather than using tables but am getting stuck. Here's what I'm trying to do. I am setting up a survey page. I want each question's text to sit at the top of the blue div, and wrap if it's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/265970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Task run manually works, running from cron I get a sigfault I've inherited someone else's monster of a BASH script. The script was written in such a way that it uses a ridiculous amount of memory (around 1GB). I can run it from a shell with out issue, but if I run it from cron I crashes with a sig fault. Apart f...
{ "language": "en", "url": "https://stackoverflow.com/questions/265973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to redefine CSS classes with Javascript Let's say we have defined a CSS class that is being applied to various elements on a page. colourful { color: #DD00DD; background-color: #330033; } People have complained about the colour, that they don't like pink/purple. So you want to give them the ability to c...
{ "language": "en", "url": "https://stackoverflow.com/questions/265984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Processing only selected nodes An XSLT-newbie problem: I need to substitute a text value in XML-file. All other nodes must be left unchanged. Here's my input file (in.xml): <?xml version="1.0" encoding="UTF-8"?> <root> <level1 attr1="val1"> <level2>in</level2> </level1> </root> Here's my XSLT-transf...
{ "language": "en", "url": "https://stackoverflow.com/questions/265991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Reading the value of an input using XPath, then using in Greasemonkey I'm using this XPath to get the value of a field: //input[@type="hidden"][@name="val"]/@value I get several results, but I only want the first. Using //input[@type="hidden"][@name="val"]/@value[1] Doesn't work. Once I have this, how do I pick up...
{ "language": "en", "url": "https://stackoverflow.com/questions/266002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to create a new membership user via Ektron CMS400.NET web service API? I am attempting to create new membership users in an Ektron CMS400.NET-based website by through calls to the User web service API from a remote site. One of the methods I intend to utilize, AddMembershipUser has a remark in the documentation ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I keep CSS floats in one line? I want to have two items on the same line using float: left for the item on the left. I have no problems achieving this alone. The problem is, I want the two items to stay on the same line even when you resize the browser very small. You know... like how it was with tables. The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "217" }
Q: IIS API - Create virtual directories? Just looking for the relevant documentation. An example is not necessary, but would be appreciated. We have a situation where we are having to create 100s of virtual directories manually, and it seems like automating this would be a good way to make the process more efficient...
{ "language": "en", "url": "https://stackoverflow.com/questions/266026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to add and compile for custom 'Platform' switch for visual studio projects? We are looking to provide two custom Platform switches (the platform dropdown in the configuration manager) for our projects in Visual Studio. For example one for 'Desktop' and one for 'Web'. The target build tasks then compile the code...
{ "language": "en", "url": "https://stackoverflow.com/questions/266028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to set a timeout during remote ejb lookup? I'm trying to access a remote ejb which is not available yet. But the lookup takes 5 min before I get the NameNotFoundException. Is there a way I can set the lookup timeout to a lesser value so that the client application doesn't hang for 5 mins? Thanks in advance... ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I geo-search multiple models with ThinkingSphinx? I have two models indexed for searching (User and Item). I'm trying to do a geo-search across models: ThinkingSphinx::Search.search('keywords', :geo => [ degrees_to_radians(params[:lat].to_f), degrees_to_radians(params[:lon].to_f) ], ) But I only get an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to integrate simple data entry app with document management system? We have simple web-based data entry internal business app. Now business wants to be able to attach a document to a row in the database that represents business entity. Document can be Word, Excel, PDF. How can we do that? I think creating yet an...
{ "language": "en", "url": "https://stackoverflow.com/questions/266063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I tell if my application is running as a 32-bit or 64-bit application? How do I tell if my application (compiled in Visual Studio 2008 as Any CPU) is running as a 32-bit or 64-bit application? A: if (IntPtr.Size == 8) { // 64 bit machine } else if (IntPtr.Size == 4) { // 32 bit machine } A: I fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/266082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: SQL 2005 Analysis Services Installation problem I get this error message when installing SQL 2005 Analysis services. The cabinet File 'sql.cab' required for this installation is corrupt and cannot be used. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package. Im in...
{ "language": "en", "url": "https://stackoverflow.com/questions/266091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why are the controllers on ASP.NET MVC name-based? In ASP.NET MVC, we're required to use the suffix "Controller" for all controllers. This seems unnecessarily restrictive - is there a technical reason for it? I'm mostly just curious, but can see situations where more flexible naming rules could improve code organiz...
{ "language": "en", "url": "https://stackoverflow.com/questions/266106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: HowTo: Detect .Net Configuration Section instance without Loading into memory? Does anyone know how to detect if an instance of a configuration section exists in a .net configuration file without actually having to load the configuration section into memory, and without having to parse the xml file manually - ie, us...
{ "language": "en", "url": "https://stackoverflow.com/questions/266108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Setting up a Python web development environment on OS X I'm running Mac OS X Leopard and wanted to know what the easy way to setup a web development environment to use Python, MySQL, Apache on my machine which would allow me to develop on my Mac and then easily move it to a host in the future. I've been trying to ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/266114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Pass An Instantiated System.Type as a Type Parameter for a Generic Class The title is kind of obscure. What I want to know is if this is possible: string typeName = <read type name from somwhere>; Type myType = Type.GetType(typeName); MyGenericClass<myType> myGenericClass = new MyGenericClass<myType>(); Obviously,...
{ "language": "en", "url": "https://stackoverflow.com/questions/266115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "217" }
Q: How to get a screen capture of a .Net WinForms control programmatically? How do you programmatically obtain a picture of a .Net control? A: You can get a picture of a .NET control programmatically pretty easily using the DrawToBitmap method of the Control class starting in .NET 2.0 Here is a sample in VB Dim f...
{ "language": "en", "url": "https://stackoverflow.com/questions/266116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Is there a Windows IDE that can handle both C and Perl? I'm using Strawberry Perl which includes MinGW's GCC, I'm also making use of the GNU debugger GDB and Subversion. How can I have a single development environment that would suit this (other than just UltraEdit, the command shell and IE), and how can I further e...
{ "language": "en", "url": "https://stackoverflow.com/questions/266121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Flex - Is there a way to specify what direction a ComboBox will open? Maybe I should further qualify this - Is there a way to specify which direction a ComboBox will open without copying and pasting the entire ComboBox class and ripping out the code where it determines which direction it will open in... I'm my speci...
{ "language": "en", "url": "https://stackoverflow.com/questions/266123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Use case relationship with actor if A is extension use case (not base use case), can A be directly referenced by the actor? A: YES The user can as said above, but does not indirectly reference/use it, it must be explicitly modeled. Drive Truck extends Drive Steering Based Vehicle. It make sense that the Actor coul...
{ "language": "en", "url": "https://stackoverflow.com/questions/266166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Simple example of threading in C++ Can someone post a simple example of starting two (Object Oriented) threads in C++. I'm looking for actual C++ thread objects that I can extend run methods on (or something similar) as opposed to calling a C-style thread library. I left out any OS specific requests in the hopes th...
{ "language": "en", "url": "https://stackoverflow.com/questions/266168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "390" }
Q: Which web service specifications (WS-*) actually make sense to implement? I'm implementing an SOA at a large company, and I'm not sure which web service specifications (WS-*) actually make sense to implement. At a minimum, I'm looking at WS-Addressing, WS-Security, WS-Eventing, and WS-ReliableMessaging. However, the...
{ "language": "en", "url": "https://stackoverflow.com/questions/266172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: AS2 Version of MovieClip.getChildByName()? I'm trying to be responsible with my "DOM" references in this little Flash 8/AS2 project. What has become increasingly frustrating is obtaining references to other movie clips and objects. For example, currently my code to access the submit button of a form looks something...
{ "language": "en", "url": "https://stackoverflow.com/questions/266184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Web.config editing for Membership Role Authorization I want to user Role based security through the authorization section in the web.config file. Using Membership, my application will allow for new Roles to be created, and thus, the pages they can access need to be set dynamically. Can I programatically alter this s...
{ "language": "en", "url": "https://stackoverflow.com/questions/266188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .NET - Users and different databases I'm looking at having certain users access one database and other users accessing another database based on the company they belong to. What would be the best way to handle the connection strings and make sure the user connects to the right db when they login? Thanks for any idea...
{ "language": "en", "url": "https://stackoverflow.com/questions/266196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Prototype click, mouseover and mouseout can't work together? I'm trying to do a very simple button that changes color based on mouseover, mouseout and click, I'm doing this in prototype and the weird thing is if I used mouseover and mouseout, after I clicked on the button, the button wouldn't change to white, seems ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I programatically disable Etags in iis 6 I'm trying to turn Etags off on iis 6 since I'm load ballancing multiple servers, I don't want the etag to become a problem. A: I dont think that you actually turn them off, but you can set the value. Go to Default Web Site properties, the HTTP Headers Tab. Then add ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to organize the project tree for a C++ project using nmake? There seems to be two major conventions for organizing project files and then many variations. Convention 1: High-level type directories, project sub-directories For example, the wxWidgets project uses this style: /solution /bin /prj1 /pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/266202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Is there a way that I can run a ASP.NET MVC Project on godaddy.com shared web hosting? Is there a way that I can run a ASP.NET MVC Project on godaddy.com shared web hosting? A: As a developer who has deployed an MVC project on GoDaddy's ASP.NET shared hosting, I can tell you with certainty that you can do this, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/266205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Simple hashmap implementation in C++ I'm relatively new to C++. In Java, it's easy for me to instantiate and use a hashmap. I'd like to know how to do it in a simple way in C++, since I saw many different implementations and none of them looked simple to me. A: Take a look at boost.unordered, and its data structure...
{ "language": "en", "url": "https://stackoverflow.com/questions/266206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: how to detect if a URL points to a SWF Is there a way (preferrably using JavaScript) to determine whether a URL is to a SWF or a JPG? The obvious answer is to sniff the filename for ".jpg" or ".swf" but I'm dealing with banners that are dynamically decided by the server and usually have a lot of parameters and gene...
{ "language": "en", "url": "https://stackoverflow.com/questions/266213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What compression/archive formats support inter-file compression? This question on archiving PDF's got me wondering -- if I wanted to compress (for archival purposes) lots of files which are essentially small changes made on top of a master template (a letterhead), it seems like huge compression gains can be had with...
{ "language": "en", "url": "https://stackoverflow.com/questions/266214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Functional-style Updates This may be an oxymoron, but how would one update a data entity in the functional programming style? From all I've read, functional-style programming uses transformations to return an output on immutable entities. The only thing I can think of would be to completely replace the original enti...
{ "language": "en", "url": "https://stackoverflow.com/questions/266219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: git: how to merge commits from a remote to a different path? I have a git repository with remote foo. foo is a web app, is contains some files and dirs directly in its root: Rakefile app ... public script My main git repository is a larger system which comprises this web app. I want to pull the commits from foo, bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/266245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Can we see the source code for PowerShell cmdlets? I'm learning some PowerShell. Is it possible to see the source code for a built-in cmdlet like Get-ChildItem? A: The source for Powershell is now available on Github. The source for Get-ChildItem can be found here. A: You might also like to take a look at Windows ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: Is there a programming language "below" Assembly? Is there a programming language "below" Assembly? A: If by below, you mean lower level, then yes. There is machine language. Assembly is turned into machine language before it is run. On many modern processes the machine language is emulated in microcode. See this f...
{ "language": "en", "url": "https://stackoverflow.com/questions/266253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: FileNotFoundException with the SPSite constructor I try to instantiate an instance of SPSite on the farm server in a custom process (MyApp.exe) and I give it as parameter the whole URI (http://mysite:80/). I also made sure that the account running MyApp.exe is Site Collection Administrator. However, I can't make an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Best practices for web service timeouts It there any article/book that defines upper bounded design limits for WS timeouts? Do you timeout at the server or recommend the client specific timeouts too? Is there a common best practice like "never design WS that can take longer than 60 seconds, use an asynchronous token...
{ "language": "en", "url": "https://stackoverflow.com/questions/266281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: ActiveMQ setup of tcp socket using mina I am trying to setup a simple demo of activemq and mina. I edited the camelContext in the activemq.xml file to include two mina tcp sockets, two queues and routes as such: listenerA -> qA -> listenerB listenerB -> qB -> listenerA The intent is to have two way pass through be...
{ "language": "en", "url": "https://stackoverflow.com/questions/266283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# Collection Data Structure With 1:1 Key/Value Mapping Are there any built-in C# data structures that are like a hash table but requires both the Keys and the Values to be unique among each other? I basically want a way to look up my Key object in a table via a unique Value and vice-versa. Next to maintaining two h...
{ "language": "en", "url": "https://stackoverflow.com/questions/266292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: 2008 MFC and threads? I was reading this thread/post: https://stackoverflow.com/questions/262298/windows-c-ui-technology and am also wondering about a non .NET UI framework. Specifically - prior to .NET having support for serial ports (I can't believe they left that out of the first release of .NET) I was forced to...
{ "language": "en", "url": "https://stackoverflow.com/questions/266300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Compiling a .vbproj or .csproj project file without Visual Studio Is there a way to compile a .vbproj or .csproj project file directly, just like Visual Studio does? When you compile in Visual Studio, the "output" window shows the actual call to the compiler, which normally looks like: vbc.exe [bunch of options] [lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/266308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Most effective way to build box shadows with CSS I'm interested to find which way of creating box shadows with css is most effective. But that I mean : ease of implementation, flexibility, and cross browser compatibility. A: Onion skinning is my personal favorite. An example can be found in this alistapart article...
{ "language": "en", "url": "https://stackoverflow.com/questions/266321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a limit to the length of a GET request? Is there a limit to the length of a GET request? A: Not in the RFC, no, but there are practical limits. The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able t...
{ "language": "en", "url": "https://stackoverflow.com/questions/266322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "158" }
Q: How do I cast a bool to a BOOL? Am I safe in casting a C++ bool to a Windows API BOOL via this construct bool mybool = true; BOOL apiboolean = mybool ? TRUE : FALSE; I'd assume this is a yes because I don't see any obvious problems but I wanted to take a moment to ask only because this may be more subtle than it ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/266326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What's the best way to replace links with JS functions? A pattern that's started to show up a lot in one of the web apps I'm working are links that used to just be a regular a-tag link now need a popup box asking "are you sure?" before the link will go. (If the user hits cancel, nothing happens.) We've got a soluti...
{ "language": "en", "url": "https://stackoverflow.com/questions/266327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Embed non-managed directX into C# form I got a quick question about running a directX application (C++) in a managed environment. I'm attempting to write a MDI tool (in C#) where the background of the parent window would be an embedded render window of directX (C++). I've read ways that involved writing the C++ int...
{ "language": "en", "url": "https://stackoverflow.com/questions/266328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: using ColumnHidden properties within Datasheet objects I have a MS Access form with a Datasheet subform. Using code, I change the ColumnHidden property of various of its columns. But, when I close the form, I'm asked whether to save the table layout of the Datasheet's table. * *How can I stop the form from asking...
{ "language": "en", "url": "https://stackoverflow.com/questions/266332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Tokenizing strings in C I have been trying to tokenize a string using SPACE as delimiter but it doesn't work. Does any one have suggestion on why it doesn't work? Edit: tokenizing using: strtok(string, " "); The code is like the following pch = strtok (str," "); while (pch != NULL) { printf ("%s\n",pch); pch = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: SQL performance & MD5 strings I've got a DB table where we store a lot of MD5 hashes (and yes I know that they aren't 100% unique...) where we have a lot of comparison queries against those strings. This table can become quite large with over 5M rows. My question is this: Is it wise to keep the data as hexadecimal s...
{ "language": "en", "url": "https://stackoverflow.com/questions/266364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I unit test jdbc code in java? I'd like to write some unit tests for some code that connects to a database, runs one or more queries, and then processes the results. (Without actually using a database) Another developer here wrote our own DataSource, Connection, Statement, PreparedStatement, and ResultSet imp...
{ "language": "en", "url": "https://stackoverflow.com/questions/266370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: In VIM command line mode what is the special character/symbol for current line? In VIM in command line mode a "%" denotes the current file, "cword" denotes the current word under the cursor. I want to create a shortcut where I need the current line number. What is the symbol which denotes this? A: To return the lin...
{ "language": "en", "url": "https://stackoverflow.com/questions/266371", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Is it possible to query the @@DBTS on a database other than the current database? For a rigorous marker of the source database state, I'd like to capture the @@DBTS of an external database in a sproc. Yeah, I think I could issue USE ExternalDB GO SELECT @myVarbinary8 = @@DBTS GO USE OriginalDB GO but, even i...
{ "language": "en", "url": "https://stackoverflow.com/questions/266372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: One could use a profiler, but why not just halt the program? If something is making a single-thread program take, say, 10 times as long as it should, you could run a profiler on it. You could also just halt it with a "pause" button, and you'll see exactly what it's doing. Even if it's only 10% slower than it should...
{ "language": "en", "url": "https://stackoverflow.com/questions/266373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: Simplest way to restart service on a remote computer What's the easiest programmatic way to restart a service on a remote Windows system? Language or method doesn't matter as long as it doesn't require human interaction. A: As of Windows XP, you can use sc.exe to interact with local and remote services. Schedule a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Delphi: Displaying a subset of a data set in data-aware controls I've got an in-memory dataset with several fields, one of which is a primary key that another dataset references as a foreign key. Thing is, the master dataset can have multiple references to the detail dataset. (This is modeling an object that conta...
{ "language": "en", "url": "https://stackoverflow.com/questions/266391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: git-svn: how do I create a new svn branch via git? I have a git repository which tracks an svn repository. I cloned it using --stdlayout. I created a new local branch via git checkout -b foobar Now I want this branch to end up in …/branches/foobar in the svn repository. How do I go about that? (snipped lots of inves...
{ "language": "en", "url": "https://stackoverflow.com/questions/266395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "198" }
Q: WPF find a control I created a grid in procedural code on my WPF page. Now I want to reference that grid. Grid grid = (Grid)This.FindName("myGridName") does not work. Ideas? A: When you create an element in code, you need to also call the RegisterName method to allow FindName to work.
{ "language": "en", "url": "https://stackoverflow.com/questions/266402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I update a pre-existing Jar file I've got a WAR file that I need to add two files to. Currently, I'm doing this: File war = new File(DIRECTORY, "server.war"); JarOutputStream zos = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(war))); //Add file 1 File file = new File(DIRECTORY, "file1.ja...
{ "language": "en", "url": "https://stackoverflow.com/questions/266409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a way to check the MS Security Center for virus protection status? We are in a Windows environment and looking to automate this process for non-company machines. If a vendor comes on site, we'd like to be able to have him/her hit a website that can perform a quick scan of the workstation to determine if th...
{ "language": "en", "url": "https://stackoverflow.com/questions/266417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Management and deployment of an n-Tier architecture How do you manage development and deployment of a n-tier system that's made up of multiple websites, desktop applications, web services and databases that have a mix of dependencies? Assume that you have a continuous integration environment with source control and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Empty string in not-null column in MySQL? I used to use the standard mysql_connect(), mysql_query(), etc statements for doing MySQL stuff from PHP. Lately I've been switching over to using the wonderful MDB2 class. Along with it, I'm using prepared statements, so I don't have to worry about escaping my input and SQL...
{ "language": "en", "url": "https://stackoverflow.com/questions/266431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How does default/relative path resolution work in .NET? So... I used to think that when you accessed a file but specified the name without a path (CAISLog.csv in my case) that .NET would expect the file to reside at the same path as the running .exe. This works when I'm stepping through a solution (C# .NET2.* VS...
{ "language": "en", "url": "https://stackoverflow.com/questions/266433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Upgrade Windows Web Server 2008 toward "standard" edition? I have an instance of Windows Web Server 2008. Do you know if it is possible to upgrade it toward "Windows Standard Server 2008"? (I mean without a complete reinstall and considering that I have the license to do that) A: it is possible if your server is x6...
{ "language": "en", "url": "https://stackoverflow.com/questions/266436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Format RSS pubDate as .NET DateTime How would I format the standard RSS pubDate string as something closer to ASP.NET's DateTime? So, from this: Wed, 29 Oct 2008 14:14:48 +0000 to this: 10/29/2008 2:14 PM A: it is better to use DateTime.Now.Tostring("r") instead A: Something close to this should work: string orig ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: MDX filter problem I'm pretty new to the whole MDX thing, but the following is just driving me batty. A FILTER statement I'm using is acting... strangely. Code sample, followed by description: SELECT { FILTER( MEMBERS([Time].[5-4-4 Week Year]), [Measures].[Ship Gross Units] > 0 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How would I serialize a LINQ-to-SQL lazy list I have a linq query and I am trying to put that in to a serializable object for a distributed caching (Velocity) but its failing due to a LINQ-to-SQL lazy list like so return from b in _datacontext.MemberBlogs let cats = GetBlogCategories(b.MemberBlo...
{ "language": "en", "url": "https://stackoverflow.com/questions/266457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: In java, how do you write a java.awt.image.BufferedImage to an 8-bit png file? I am trying to write out a png file from a java.awt.image.BufferedImage. Everything works fine but the resulting png is a 32-bit file. Is there a way to make the png file be 8-bit? The image is grayscale, but I do need transparency as t...
{ "language": "en", "url": "https://stackoverflow.com/questions/266486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Shorten the code for a lot of buttons in Prototype I have a lot of buttons and by clicking on different button, different image and text would appear. I can achieve what I want, but the code is just so long and it seems very repetitive. For example: var aaClick = false; $("aa").observe('click', function() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/266491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MSHTML: How can you clear the undo / redo buffer of MSHTML I'm using a C# wrapper control similar to the WebBrowser control that contains the COM / unmanaged MSHTML control. I'm using this control in the edit mode which allows the user of the application to edit a a HTML document in a WYSIWYG manner. This control ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/266497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }