text
stringlengths
8
267k
meta
dict
Q: "Unknown column 'user_id' error in django view I'm having an error where I am not sure what caused it. Here is the error: Exception Type: OperationalError Exception Value: (1054, "Unknown column 'user_id' in 'field list'") Does anyone know why I am getting this error? I can't figure it out. Everything seems...
{ "language": "en", "url": "https://stackoverflow.com/questions/293300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I run Ruby tasks that use my Rails models? I have a Rails app with some basic models. The website displays data retrieved from other sources. So I need to write a Ruby script that creates new instances in my database. I know I can do that with the test hooks, but I'm not sure that makes sense here. I'm not su...
{ "language": "en", "url": "https://stackoverflow.com/questions/293302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What's the best method to pass parameters to SQLCommand? What's the best method to pass parameters to SQLCommand? You can do: cmd.Parameters.Add("@Name", SqlDbType.VarChar, 20).Value = "Bob"; or cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = "Bob"; or cmd.Parameters.Add("@Name").Value = "Bob"; It seems li...
{ "language": "en", "url": "https://stackoverflow.com/questions/293311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: HtmlAgilityPack Drops Option End Tags I am using HtmlAgilityPack. I create an HtmlDocument and LoadHtml with the following string: <select id="foo_Bar" name="foo.Bar"><option selected="selected" value="1">One</option><option value="2">Two</option></select> This does some unexpected things. First, it gives two par...
{ "language": "en", "url": "https://stackoverflow.com/questions/293342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: wxPython, Set value of StaticText() I am making a little GUI frontend for a app at the moment using wxPython. I am using wx.StaticText() to create a place to hold some text, code below: content = wx.StaticText(panel, -1, "Text Here", style=wx.ALIGN_CENTRE) I have a button when clicked retrieves data from MySQL, I a...
{ "language": "en", "url": "https://stackoverflow.com/questions/293344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Haskell string list through lines I'm using the lines functionality to take an input and split up many variables before sending it off to a function. Please look at the run function and tell me why I get the following error. It seems like it should just assign the first string in ln to seq, but I get an error. ER...
{ "language": "en", "url": "https://stackoverflow.com/questions/293345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Controlling designer appearance of double-buffered owner-drawn UserControl in C#/.NET 2.0 I have an owner-drawn UserControl where I've implemented double-buffering. In order to get double-buffering to work without flicker, I have to override the OnPaintBackground event like so: protected override void OnPaintBackgr...
{ "language": "en", "url": "https://stackoverflow.com/questions/293351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# to VB.NET help I have moved from C# to 9-5pm VB.NET Any tricks i should know? Where does VB.NET differ the most apart from syntax? Where have namespaces gone? [Note: just found http://converter.telerik.com/ brilliant] Cheers John A: the telerik converter craps out on me on some of the newer syntax. I think this...
{ "language": "en", "url": "https://stackoverflow.com/questions/293352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Fluent Interfaces - Method Chaining Method chaining is the only way I know to build fluent interfaces. Here's an example in C#: John john = new JohnBuilder() .AddSmartCode("c#") .WithfluentInterface("Please") .ButHow("Dunno"); Assert.IsNotNull(john); [Test] public void Should_Assign_Due_Date_With...
{ "language": "en", "url": "https://stackoverflow.com/questions/293353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Why did Microsoft decide to put 32-bit applications in "Program Files (x86)"? Might it make more sense to put 64-bit applications into "Program Files (x64)" and leave 32-bit applications to run in "Program Files"? I have a batch file that need to run a Flex compiler. In x64, that program is in "Program Files (x86)"...
{ "language": "en", "url": "https://stackoverflow.com/questions/293364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: vb6 Open File For Append issue Path Not Found Open App.Path & "\Folder\" & str(0) For Output Seems to get a path not found however if directly before that I do MsgBox App.Path & "\Folder\" & str(0) It Provides the correct directory/filename that I want and if I replace that string with the direct path in quotes i...
{ "language": "en", "url": "https://stackoverflow.com/questions/293368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How important is to not load unused scripts in PHP? On a site where 90% of the pages use the same libraries, should you just load the libraries all the time or only load them when needed? The other pages would be ajax or simple pages that don't have any real functionality. Also, should you only load the code when ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/293375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why Isn't My C Code Being Compiled To An EXE I'm just starting out writing trying to write a simple program in C and I am using Visual Studios to do so. I heard that it does compile C as well as C++. And I know that it does because it says it compiles. The only problem is that when I go to the output directory, ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/293380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best approach to handling exceptions thrown in a separate thread? I am working on a J2ME project that spawns worker threads for numerous tasks such as downloading HTTP content. The basic thread layout is similar to most java apps--there is a main UI thread and worker threads spawned to do stuff behind th...
{ "language": "en", "url": "https://stackoverflow.com/questions/293388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Execute code after HTTP request is complete in PHP? PHP provides a mechanism to register a shutdown function: register_shutdown_function('shutdown_func'); The problem is that in the recent versions of PHP, this function is still executed DURING the request. I have a platform (in Zend Framework if that matters) wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/293389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: MSVCR90.DLL was not found I know a question like this was already asked, but the situation is a little different, and all the answers on that problem didn't work for me. I'm trying to compile some C code in VS2008 and it doesn't create an exe. Also, when I try to run it with f5, I get: This application has failed t...
{ "language": "en", "url": "https://stackoverflow.com/questions/293401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Lucene QueryParser Does Lucene QueryParser.parse(string) still work? If it is deprecated, what is the new syntax? Query query = QueryParser.parse("Ophelia"); Thanks Tatyana A: Not sure of the exact API, but it's changed to an instance object. All QueryParsers are now instance objects. var qp = new QueryParser(new S...
{ "language": "en", "url": "https://stackoverflow.com/questions/293403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Passing parameters as path variables in ruby on rails I'm still new to ROR, so pardon the simplicity of the question... So http://www.example.com/controller/:id displays a record in my table, with :id being a number (1,2,3 etc.). Is there a way I can have :id in the URL be the value of a field in the displayed recor...
{ "language": "en", "url": "https://stackoverflow.com/questions/293409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C++: Using operator of two intrinsic types as a function object I have a vector-like class that contains an array of objects of type "T", and I want to implement 4 arithmetic operators, which will apply the operation on each item: // Constructors and other functions are omitted for brevity. template<class T, unsigne...
{ "language": "en", "url": "https://stackoverflow.com/questions/293421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: NHibernate 2.0.1 Criteria: IsNull restriction throwing exception I've been utilizing NHibernate 2.0.1.4000 on all current .NET 3.5 SP1 projects and have had no problems with any other queries (utilizing either the Query or Criteria APIs), until some new business logic dictated the necessity of a new query in this pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/293423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: In terms of databases, is "Normalize for correctness, denormalize for performance" a right mantra? Normalization leads to many essential and desirable characteristics, including aesthetic pleasure. Besides it is also theoretically "correct". In this context, denormalization is applied as a compromise, a correction t...
{ "language": "en", "url": "https://stackoverflow.com/questions/293425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Python object deleting itself Why won't this work? I'm trying to make an instance of a class delete itself. >>> class A(): def kill(self): del self >>> a = A() >>> a.kill() >>> a <__main__.A instance at 0x01F23170> A: 'self' is only a reference to the object. 'del self' is deleting the 'self' refere...
{ "language": "en", "url": "https://stackoverflow.com/questions/293431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "88" }
Q: Left-pad printf with spaces How can I pad a string with spaces on the left when using printf? For example, I want to print "Hello" with 40 spaces preceding it. Also, the string I want to print consists of multiple lines. Do I need to print each line separately? EDIT: Just to be clear, I want exactly 40 spaces print...
{ "language": "en", "url": "https://stackoverflow.com/questions/293438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "153" }
Q: Python help - Parsing Packet Logs I'm writing a simple program that's going to parse a logfile of a packet dump from wireshark into a more readable form. I'm doing this with python. Currently I'm stuck on this part: for i in range(len(linelist)): if '### SERVER' in linelist[i]: #do server parsing stuff pack...
{ "language": "en", "url": "https://stackoverflow.com/questions/293444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What would be the best approach to porting MAME or SCUMMVM to .NET (XNA or Silverlight)? I wonder what are the main challenges to porting those emulator engines. Could there been any sucess without having to rewrite all the code? Any conversion tools available that can help? A: Some people have tried but it seems...
{ "language": "en", "url": "https://stackoverflow.com/questions/293477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I fix wrongly nested / unclosed HTML tags? I need to sanitize HTML submitted by the user by closing any open tags with correct nesting order. I have been looking for an algorithm or Python code to do this but haven't found anything except some half-baked implementations in PHP, etc. For example, something lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/293482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Asp.net ajax update panel sharing a database connection I have a dropdown box and a literal tag inside an Update Panel. On the selection change event of the dropdown up requery the database and repopulate the literal tag and then call UPdatePanel.Update(). below, is there are way i can avoid having to create a new ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293495", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What happens if you don't return a value in C++? Yesterday, I found myself writing code like this: SomeStruct getSomeStruct() { SomeStruct input; cin >> input.x; cin >> input.y; } Of course forgetting to actually return the struct I just created. Oddly enough, the values in the struct that was returne...
{ "language": "en", "url": "https://stackoverflow.com/questions/293499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to deploy an RubyGem-based Server We have built a custom socket server in ruby and packaged it as a gem. Since this is an internal project we can not simply publish it to RubyForge or GitHub. I tried to setup our own gem server but gem would not authenticate over https. Our other deployment is all for standard...
{ "language": "en", "url": "https://stackoverflow.com/questions/293500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Javascript; Sending user to another page I am trying to send a user to another page using a Javascript Function: <input type="button" name="confirm" value="nextpage" onClick="message()"> And my JavaScript: function message() { ConfirmStatus = confirm("Install a Virus?"); if (ConfirmStatus == true) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How do I find trustworthy database help out on the interweb? I am trying to help a small business that has an application that could benefit from occasional (or temporary) database expertise. The problem is, this company has all their IP in this database, so they are rightfully hesitant to give someone access it. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ajax callback UpdatePanel.Update() still reloading whole page I have code in an Update Panel and even though on a button click i am inserting data into a db and simply calling Updatepanel.Update() the whole page is reloaded: Gifts.ASPX <table style="width:100%;"> <tr> <td> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP version of confirm() of JavaScript Is there a PHP version of JavaScript's confirm() function? If not, what are my other options or how do I make something similar to the confirm()? A: Because PHP is a server-side language (all the PHP code is executed on the server, and the output of the code is sent to the cli...
{ "language": "en", "url": "https://stackoverflow.com/questions/293541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can you compile code on the fly in Silverlight? I should clarify that I am looking for a client-side solution. Alternatively, is there a C# compiler written in managed code? A: On the Client Take a look at the Dynamic Language Runtime if you're using Silverlight 2.0: * *http://www.silverlightexamples.net/post/Ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/293545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Side-effects in closures, are they still purely functional? Being relatively new to functional programming, I expend lots of energy wondering “is this the functional way to do things?” Obviously recursion vs. iteration is pretty straightforward and it’s obvious that recursion is the functional way of doing things. B...
{ "language": "en", "url": "https://stackoverflow.com/questions/293567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Can I use CSS in directory listing of Firefox? For example if I put "C:\docs" in address bar of Firefox, it shows all files in the directory. Is it possible to customize this page with CSS? Apache 2.2 allows us to do it using IndexStyleSheet directive, so I wondered if Firefox can do it. A: Firefox has a file userC...
{ "language": "en", "url": "https://stackoverflow.com/questions/293570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Attach JavaScript event handler to Zend_Form_Element I need to attach some javascript to the onchange event of the Zend_Form_Element. How do I do that? A: Try with setAttrib($name, $value), for example: $element->setAttrib('onchange', 'jsFunction();'); You can find more detailed information about Zend_Form_Element...
{ "language": "en", "url": "https://stackoverflow.com/questions/293575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I view the changes made after a revision is committed and parse it for comments? I was hoping to automate some tasks related to SubVersion, so I got SharpSvn. Unfortunately I cant find much documentation for it. I want to be able to view the changes after a user commits a new revision so I can parse the cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/293582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the best way to get an integer into an enum? Criteria: Performance, Performance, Performance. I need a way to convert a uint, int, etc into it's enum equivalent. What's the fastest way I can do that using C#? A: Why can't you just do a direct cast? MyEnum enumVar = (MyEnum)intVar;
{ "language": "en", "url": "https://stackoverflow.com/questions/293586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is flex memory safe (leak free) I would like to make apps that can run in a flash enabled browser and decided flex would be best for me so I started to learn that. AFAIK flex has a GC but how that GC works compared to the ones in other languages I've seen may be a bit different. I have found this but apparently ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/293587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Dynamically include .js files from Zend_Controller_Action? I came across the case where depending on the execution path I may need to invoke an inclusion of .js file from controller. Is there a nice way of doing it? (besides setting some view variable with actual .js include code)? A: See the view helper headScript...
{ "language": "en", "url": "https://stackoverflow.com/questions/293590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: MySQL, PHP - Forms Help Greetings, I have the following code <? include("conn.php"); $sn=$_GET["sn"]; $sql="select * from kpi where no='$sn'"; $result=mysql_query($sql,$connection) or die(mysql_error()); while($row=mysql_fetch_array($result)) { $s...
{ "language": "en", "url": "https://stackoverflow.com/questions/293595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Route www link to non-www link in .net mvc It seems with the built in friendly routing library in .NET MVC, it would allow us to do something like this. In case it's not obvious what I want to with the built in stuff in .NET MVC, I want to a url starting with www to be automatically redirected to a non-www url using...
{ "language": "en", "url": "https://stackoverflow.com/questions/293597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Basic steps for Agile software development methodology What are the basic steps for Agile software development? And how you start a new project with agile methodology? A: have a look at "Agile Software Development, Principles, Patterns, and Practices" by robert marin. there is a java and a c# version. http://www....
{ "language": "en", "url": "https://stackoverflow.com/questions/293599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: If I'm posting a question about Oracle SQL query performance, what should I include in my question? If I am posting a question about a query against an Oracle database, what should I include in my question so that people have a chance to answer me? How should I get this information? Simply providing the poorly perf...
{ "language": "en", "url": "https://stackoverflow.com/questions/293600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: PHP and concurrent file access I'm building a small web app in PHP that stores some information in a plain text file. However, this text file is used/modified by all users of my app at some given point in time and possible at the same time. So the questions is. What would be the best way to make sure that only one u...
{ "language": "en", "url": "https://stackoverflow.com/questions/293601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: "aspnet_compiler.exe" exited with code 1" error when including ASP file I have a ASP.NET project and when building the project it is showing build suceessfull. But when I am building the deployment project, it is showing build failed with an error message Error 5 "aspnet_compiler.exe" exited with code 1 I re...
{ "language": "en", "url": "https://stackoverflow.com/questions/293602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Decimal DateTime formatter in Java or Joda I'm writing a file that requires dates to be in decimal format: 2007-04-24T13:18:09 becomes 39196.554270833331000 Does anyone have a time formatter that will do this (Decimal time is what VB/Office, etc. use)? Basic code goes like follows: final DateTime date = new DateT...
{ "language": "en", "url": "https://stackoverflow.com/questions/293617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Monitor process start in the system Is there a way to monitor processes starting in the system before they start? Example: On programs like ZoneAlarm or Antivirus programs, when you run a program it asks you if you allow running this program or not before it runs... A: There's a few ways to do this. If you only nee...
{ "language": "en", "url": "https://stackoverflow.com/questions/293624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Site which shows algos in popular languages? Is there a site like "language shootout"'s (shootout.alioth.debian.org and dada.perl.it/shootout/), which show how to do simple/advanced things in different languages? I.e. how to use hashes in different languages, how to sort, how to write classes, how to connect to site...
{ "language": "en", "url": "https://stackoverflow.com/questions/293625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Building DB schema from Entity Framework Model I see that EF can update a model based on an existing database schema. However, I'm starting totally from scratch; I don't want to build tables, then rebuild them in the EF model file. Is there a way that I can draw out a model file, and have the SQL tables automaticall...
{ "language": "en", "url": "https://stackoverflow.com/questions/293631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Display confirmation popup with JavaScript upon clicking on a link How do I make one of those hyperlinks where when you click it, it will display a popup asking "are you sure?" <INPUT TYPE="Button" NAME="confirm" VALUE="???" onClick="message()"> I already have a message() function working. I just need to know what ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to rank stories based on "controversy"? I'd like to rank my stories based on "controversy" quotient. For example, reddit.com currently has "controversial" section: http://www.reddit.com/controversial/ When a story has a lot of up and a lot of down votes, it's controversial even though the total score is 0 (for e...
{ "language": "en", "url": "https://stackoverflow.com/questions/293649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Question regarding an ASP.NET MVC form posting scenario I currently have a user control that is used on both an /Address/Edit and an /Address/Create page. This user control simply has the following code in it to submit a new address to the system: <% using (Html.BeginForm()) { %> <table> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to hide a caret in IE? (JavaScript) While displaying a pop-up window above a wysiwyg editor, the caret (cursor in text area) is still visible under the pop-up window. Any ideas? A: First idea coming to my mind is to blur() the textarea or put the focus elsewhere. Of course, I suppose the WYSIWYG editor uses a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/293657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Different types of build using CruiseControl.NET I would like to know what kinds of builds (i.e for example and learning) does one have. I currently set up nightly build triggered on changes.. Should I have a different server for ci builds or different config blocks??? Please give ideas or samples on how you maintai...
{ "language": "en", "url": "https://stackoverflow.com/questions/293665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: jQuery ajax, Prevent callback from running is it possible to use the ajaxComplete or ajaxStop features of jQuery to decide whether or not the callback gets called? Essentially I want to be able to take basic error checking code that is currently in most of my callbacks, and add it to a sort of global callback. A: S...
{ "language": "en", "url": "https://stackoverflow.com/questions/293668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Reading files larger than 4GB using c++ stl A few weeks back I was using std::ifstream to read in some files and it was failing immediately on open because the file was larger than 4GB. At the time I couldnt find a decent answer as to why it was limited to 32 bit files sizes, so I wrote my own using native OS API. S...
{ "language": "en", "url": "https://stackoverflow.com/questions/293672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: I've got problem with fine tuning of regex i've got regex which was alright, but as it camed out doesn't work well in some situations Keep eye on message preview cause message editor do some tricky things with "\" [\[]?[\^%#\$\*@\-;].*?[\^%#\$\*@\-;][\]] its task is to find pattern which in general looks like tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/293694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET message box I am looking for a custom control which could enable me to call message of following type. http://extjs.com/deploy/dev/examples/message-box/msg-box.html Is there a control which function like a .NET desktop application messagebox? I know, exactly similar may not be possible but main features I am...
{ "language": "en", "url": "https://stackoverflow.com/questions/293697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: "Invalid postback or callback argument" with Databound controls I am getting the following error when an event (Add/Edit/Delete) occurs on my databound control. Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. Fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/293699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Is LINQ to SQL the best way to build a Model or create my own classes I am develop a medium system in ASP.net with MS SQL Server Database and I wonder what is the best way to create a model layer with LINQ or create own classes that dealing with database? A: The best way is subjective, but I think the easiest is to...
{ "language": "en", "url": "https://stackoverflow.com/questions/293712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How could I create a custom windows message? Our project is running on Windows CE 6.0 and is written in C++ . We have some problems with the code , and we are unable to debug . We also found out that if in our application we create threads and try to printf from them , the output won't appear . The only output that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Regular expression to convert substring to link i need a Regular Expression to convert a a string to a link.i wrote something but it doesnt work in asp.net.i couldnt solve and i am new in Regular Expression.This function converts (bkz: string) to (bkz: show.aspx?td=string) Dim pattern As String = "&lt;bkz[a-z0-9$-$&...
{ "language": "en", "url": "https://stackoverflow.com/questions/293725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: é is not correctly parsed My application will read xml from urlconnection. The xml encoding is ISO-8859-1, it contains é character. I use xerces saxparser to parse received xml content. However, é can not be parsed correctly while running application under lunix OS. Everything works fine in Windows. Could you guys p...
{ "language": "en", "url": "https://stackoverflow.com/questions/293728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Making a drop-down list using scriptaculous and prototype's BlindDown or SlideDown effect I'm trying to make a javascript dropdown list using scriptaculous and prototype. I know this can be done using CSS :hover pseudo-selectors, but I would like to add some additional flair to it. The problem is that while I can ki...
{ "language": "en", "url": "https://stackoverflow.com/questions/293735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: multiple keyword search script needs some expert input I have been writting a keyword search script based on this tutorial: http://www.hackosis.com/2007/11/06/howto-simple-search-engine-with-php-and-mysql/ Like some of the commenters mentioned, the script only ends up returning results based on the last word in the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How could I know when someone attaches a removable disk on my computer? I would like to know how can I detect when the user attaches a removable drive on a computer ( in a Windows XP environment ) . There surely has to be a better way than constantly checking to see if the number of drives increased , right ? A: Si...
{ "language": "en", "url": "https://stackoverflow.com/questions/293747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: jQuery-ui slider - How to stop two sliders from controlling each other This is in reference to the question previously asked The problem here is, each slider controls the other. It results in feedback. How do I possibly stop it? $(function() { $("#slider").slider({ slide: moveSlider2 }); $("#slider1").slide...
{ "language": "en", "url": "https://stackoverflow.com/questions/293750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: In C#, how do I save a webpage to file without destroying whatever the encoding is? Here's what I got so far (that doesn't work). At this point I thought my target was Ansi encoded, but I really don't want to have to know at this point. My browser seems to be able to determine what encoding to use, How can I? static...
{ "language": "en", "url": "https://stackoverflow.com/questions/293760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I make Emacs show blank spaces? How can I make Emacs show blank spaces (like a space, a tab, a line-jump, etc). Many other editors like Kate and Eclipse have this feature and I find it very useful to see when code is indent-broken because of mix of spaces and tabs (particularly Python). A: WhiteSpace mode is...
{ "language": "en", "url": "https://stackoverflow.com/questions/293761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: How to add ChartFrame (JFreeChart library) to JFrame(javax.swing library)? I can't directly add ChartFrame object to my Jframe object with .add(Component) method. And it's not possible to cast from ChartFrame to JComponent. Casting ChartFrame to Component from java.awt library is also impossible. How can I add Char...
{ "language": "en", "url": "https://stackoverflow.com/questions/293762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I send a patch to another developer and avoid merge conflicts? How do I get a patch from a commit in order to send it to another developer? And how do I best avoid a merge conflict with this patch when merging our trees at a later date? If you know how please explain how to do this in your VCS of choice such ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to create a QWidget with a HWND as parent? With wxWidgets I use the following code: HWND main_window = ... ... wxWindow *w = new wxWindow(); wxWindow *window = w->CreateWindowFromHWND(0, (WXHWND) main_window); How do I do the same thing in Qt? The HWND is the handle of the window I want as the parent window for...
{ "language": "en", "url": "https://stackoverflow.com/questions/293774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is a formal application framework too much? Our shop designs and create custom software applications for a vareity of vertical industies. We currently use a modified version of the Csla framework for most of our development. It's a great framework, supports a vareity of ways to communicate with a database, direct...
{ "language": "en", "url": "https://stackoverflow.com/questions/293776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Free space in a CMD shell Is there a way to get the amount of free diskspace of a disk or a folder in a CMD without having to install some thirdparty applications? I have a CMD that copies a big file to a given directory and could of course use the errorlevel return from the copy command, but then I have to wait for...
{ "language": "en", "url": "https://stackoverflow.com/questions/293780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "132" }
Q: How to use Castle Windsor with ASP.Net web forms? I am trying to wire up dependency injection with Windsor to standard asp.net web forms. I think I have achieved this using a HttpModule and a CustomAttribute (code shown below), although the solution seems a little clunky and was wondering if there is a better suppor...
{ "language": "en", "url": "https://stackoverflow.com/questions/293790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: PHP MYSQL - Explode help Greetings, I have data stored on mysql with delimiter "," in 1 table. I have rows and column stored on database too. Now i have to output the data using rows and column number stored on database to draw the table. Rows and column number are user input, so it may varies. Let say, there is n...
{ "language": "en", "url": "https://stackoverflow.com/questions/293794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Project dependency diagram in Visio I'm looking for a tool that will generate an assembly/project dependency diagram in Visio (or as close as possible) to assist me with breaking up some of our system into more manageable trunks. The ability to include/exclude non-project dependencies is a must (i.e. include/exclude...
{ "language": "en", "url": "https://stackoverflow.com/questions/293797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I use std::tr1::mem_fun in Visual Studio 2008 SP1? The VS2008 SP1 documentation talks about std::tr1::mem_fun. So why, when I try and use std::tr1::mem_fun, why do I get this compile error?: 'mem_fun' : is not a member of 'std::tr1' At the same time, I can use std::tr1::function without problems. Here is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/293799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the difference between CIL and MSIL (IL)? Are these two terms interchangeable? A: Both the terms are similar but with following difference: CIL – Common Intermediate Language – is the term used in the International Standard. MSIL – Microsoft Intermediate Language – is the product term for the Microso...
{ "language": "en", "url": "https://stackoverflow.com/questions/293800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Is there a way to specify outlining defaults in Visual Studio 2008 so that a file opens up with members collapsed by default? What I would like to do is have VS2008, when I open a code file, collapse all members of the classes/interfaces in the file by default (including, crucially, any XML documentation and comment...
{ "language": "en", "url": "https://stackoverflow.com/questions/293806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: LINQ to XML: parsing XML file which one of nodes presents type of another node Helo! Is this possible to use string value of one node which tells what type of field is presented in another node using LINQ to XML? For example: <node> <name>nodeName</name> <type>string</type> </node> <node> <name>0</name> <typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Need advice on combining ORM and SQL with legacy system We are in the process of porting a legacy system to .NET, both to clean up architecture but also to take advantage of lots of new possibilities that just aren't easily done in the legacy system. Note: When reading my post before submitting it I notice that I ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/293826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are the common issues and best practices when using ASP.NET session state? For example, I make extensive use of the session in my ASP.NET application but have heard somewhere that objects stored in session can be removed by the system where server memory runs low. Is this true? Is there any session 'callback' f...
{ "language": "en", "url": "https://stackoverflow.com/questions/293831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to create a dashboard user interface using ASP.NET MVC? I am currently building an application using ASP.NET MVC. The data entry pages are fairly easy to code, I just make the Model for the page of the type of my business object: namespace MyNameSpace.Web.Views.ProjectEdit { public partial class MyView : Vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/293832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to call remote EJB from standalone client I have my EJB deployed on weblogic server. I want to access those EJB from standalone applications (a thin client). A: Ok... I found it myself. :) Here is code that I used to connect to Remote EJB from thin client. Hashtable env = new Hashtable(5); env.put(Context.IN...
{ "language": "en", "url": "https://stackoverflow.com/questions/293835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is there a fast way to transfer all the variables of one identical object into another in C#? This is probably a simple question. Suppose I have a object called Users and it contains a lot of protected variables. Inside that Users class I have a method that creates a temporary Users object, does something with it,...
{ "language": "en", "url": "https://stackoverflow.com/questions/293840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Defining new tooltips in Emacs I would like to add custom tooltips to emacs. More specifically, whenever I hover on a symbol (function/variable) name with my mouse of I would like to see a tooltip with the symbol's definition. I know that I can find this kind of info with a tool like cscope but I have no idea how t...
{ "language": "en", "url": "https://stackoverflow.com/questions/293853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How can I enable live preview for FCKeditor in an ASP.Net site? Over in this question, Scott writes that it is possible to get the current HTML for what's written in the FCKeditor by using FCKeditorAPI.__Instances['instanceNameHere'].GetHTML(); Could someone provide step-by-step instructions on how to accomplish thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/293854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does this const member function allow a member variable to be modified? class String { private: char* rep; public: String (const char*); void toUpper() const; }; String :: String (const char* s) { rep = new char [strlen(s)+1]; strcpy (rep, s); } void String :: toUppe...
{ "language": "en", "url": "https://stackoverflow.com/questions/293857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Program to simulate vehicles at an intersection using queues HI I got this coursework question to solve. This is the question: Design a program to simulate vehicles at an intersection. Assume that there is one lane going in each of four directions, with stoplights facing each direction. Vary the arrival time of veh...
{ "language": "en", "url": "https://stackoverflow.com/questions/293874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to allow authorization to an rss feed using ASP.NET MVC? Our shop is in the process of converting our internal project management application from ASP.NET Web Forms to ASP.NET MVC. I would like to provide an RSS feed for our customers of their current open issues ... but I would like to do so with some type of...
{ "language": "en", "url": "https://stackoverflow.com/questions/293878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Redirect to Error page when user clicks the Browser Refresh button i need to check whether the user clicking the browser Refresh button and redirect to error page. Can we do this in javascript or any server side methods in ASP.net A: If you give each link you present a unique ID (e.g. a GUID) in the URL as a parame...
{ "language": "en", "url": "https://stackoverflow.com/questions/293882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I automate (script) creating a war file in eclipse? It's 5 button clicks to get eclipse to create a deployable war file for my eclipse project, I figure there's probably some eclipse command line option to do the same thing, so I can just write it into a script, but I'm not seeing it. A: Use the Ant war tas...
{ "language": "en", "url": "https://stackoverflow.com/questions/293900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Reflection - Getting the generic arguments from a System.Type instance If I have the following code: MyType<int> anInstance = new MyType<int>(); Type type = anInstance.GetType(); How can I find out which type argument(s) "anInstance" was instantiated with, by looking at the type variable? Is it possible? A: Use Ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/293905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Tracking user stories in JIRA / Greenhopper If anyone is trying to do agile, i am trying to figure out a way to use JIRA / Greenhopper for this. We are a global dev team so the distributed nature is crucial here. We were initially using Scrumworks but the team complained that they had duplicate information in JIRA ...
{ "language": "en", "url": "https://stackoverflow.com/questions/293909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: where does the model go? I have a VS solution, with the following projects. -GUI -DataAccess -BusinessLogic -BusinessObjects but where should the main model class reside? This is usually a cache of a set of objects which are the results from the data access layer and the GUI using virtual grids to view data insid...
{ "language": "en", "url": "https://stackoverflow.com/questions/293915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to iterate hierarchical data and output the hierarchy using C# given the following class ... public class Category { public string Name {get;set;} public Category ParentCategory {get;set;} } What the most efficient way to output the following from a collection (IList<Category>) of Category objects? + Parent...
{ "language": "en", "url": "https://stackoverflow.com/questions/293916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Writing apps in C for microcontrollers What resources do you know dedicated to software development in C for PIC microcontrollers? I would like to see some kind of framework that handles both IO (buttons for input and LCD for output) and application logic. You can think of it as a VERY simple OS. I understand that P...
{ "language": "en", "url": "https://stackoverflow.com/questions/293923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }