text
stringlengths
8
267k
meta
dict
Q: C++ Instance Initialization Syntax Given a class like this: class Foo { public: Foo(int); Foo(const Foo&); Foo& operator=(int); private: // ... }; Are these two lines exactly equivalent, or is there a subtle difference between them? Foo f(42); Foo f = 42; Edit: I confused matters by making the...
{ "language": "en", "url": "https://stackoverflow.com/questions/372665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What is ASP.NET MVC? Can anyone explaine me, what is MVC, why we use it and how we can use it. Benefits of using this? and can we use ASP.NET MVC in ASP.NET 2.0 (VS 2005) A: You'll use MVC when you need total control over the HTML output from ASP.NET. It also allows for better/easier unit-testing. It is based on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I specify system properties in Tomcat configuration on startup? I understand that I can specify system properties to Tomcat by passing arguments with the -D parameter, for example "-Dmy.prop=value". I am wondering if there is a cleaner way of doing this by specifying the property values in the context.xml fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/372686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "78" }
Q: Submit with JQuery in firefox 3 & opera in a modal dialog box from SimpleModal I'm trying to submit a form who is rendered in a SimpleModal dialog, but my submit is never called when I'm using FF3 & Opera (Chrome, Safari and IE works). I use the following code: function ShowModal(rendercontainerid, modalcontainerid,...
{ "language": "en", "url": "https://stackoverflow.com/questions/372691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Convert string to Brushes/Brush color name in C# I have a configuration file where a developer can specify a text color by passing in a string: <text value="Hello, World" color="Red"/> Rather than have a gigantic switch statement look for all of the possible colors, it'd be nice to just use the properties in the c...
{ "language": "en", "url": "https://stackoverflow.com/questions/372693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: Drawing a caret between a point and a draggable div I have a draggable div that represents a little info popup that the user can drag around the screen. But this div is anchored to a point on the screen, and I would like there to be a caret drawn between the div and the point that it is anchored to. An example of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/372694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a standard C++ function object for taking apart a std::pair? Does anyone know if there's a de-facto standard (i.e., TR1 or Boost) C++ function object for accessing the elements of a std::pair? Twice in the past 24 hours I've wished I had something like the keys function for Perl hashes. For example, it wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/372695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Funky Line feeds in MS SQL When I inserted text from one SQL Server VARCHAR(MAX) field in one database to another, I get question mark symbols - "?" - in the target database (in addition to line feeds) whenever there are line feeds in the source database. Text in the target database looks like this: Line one.? ? Lin...
{ "language": "en", "url": "https://stackoverflow.com/questions/372696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get/Set in the c++ world, faux-pas? I notice that get/set is not the c++ way as far as I can tell by looking at boost/stl, and even reading the writings of some of the top c++ experts. Does anyone use get/set in their c++ class design, and can someone suggest a rule of thumb on where if at all this paradigm belongs ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Have log4net use application config file for configuration data I would like to store log4net config data in my application.config file. Based on my understanding of the documentation, I did the following: * *Add a reference to log4net.dll *Add the following line in AssemblyInfo.cs: [assembly: log4net.Config.X...
{ "language": "en", "url": "https://stackoverflow.com/questions/372703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: c:import or c:url - specify a timeout value I would like to use c:import or c:url to grab the contents of a page (adserver). In addition, I need to specify a timeout, and if the call either times out or the page is not accessible I need some default text to be returned as my value. Is there a jstl tag lib to do this...
{ "language": "en", "url": "https://stackoverflow.com/questions/372712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Problem with a constructor c++ So I have this code for these Constructors of the Weapon class: Weapon(const WeaponsDB * wepDB); Weapon(const WeaponsDB * wepDB_, int * weaponlist); ~Weapon(void); And I keep getting an error: 1>c:\users\owner\desktop\bosconian\code\bosconian\weapon.h(20) : error C2062: type 'int' u...
{ "language": "en", "url": "https://stackoverflow.com/questions/372714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: AJAX calendar extender display issue in Safari Ok, this is not a CSS issue, I removed all styling from the page. This is a calendar extender that has a target id of a textbox and the popupbutton is the same text box. The month name is displaying lower than the days, so it's not usable. it's fine in IE. I am usin...
{ "language": "en", "url": "https://stackoverflow.com/questions/372715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Showing the Restore Button without a Maximize button I want to prevent the user from maximizing the Windows Form to full screen so I have disabled the Maximize button. However, I want to be able to have the user 'restore' the Form. When they click the Restore button I want it to show a different, smaller, minified, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the smallest program possible to parse an email message header? the homework: http://www.cs.rit.edu/~waw/networks/prob1.082.html Ok, I am still confused why this question was asked for my data communications and networks class, but here is the question from my homework: *Write a computer program that re...
{ "language": "en", "url": "https://stackoverflow.com/questions/372721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I set a button background color on iPhone? How can I set a custom background color of a button? Interface Builder doesn't seem to have an interface to do this. Is it only available programmatically? If so, can you provide an example, please? A: http://github.com/dermdaly/ButtonMaker You can generate UIbu...
{ "language": "en", "url": "https://stackoverflow.com/questions/372731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Coderush and resharper, do they work together? anyone have any experience of using them together? How well does it work? or is it just too much grief? A: I've used Resharper for awhile and recently installed the free Coderush Express too. After a week or so, I can say that Coderush has not gotten in my way in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/372738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Can I test SmtpClient before calling client.Send()? This is related to a question I asked the other day on how to send email. My new, related question is this... what if the user of my application is behind a firewall or some other reason why the line client.Send(mail) won't work... After the lines: SmtpClient cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/372742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: TextMate's Dawn color theme for Emacs Does anybody know if there is a color theme like the TextMate Dawn theme, for Emacs ? I simply don't like the way the fonts look on my dark emacs theme and I am not sure if it's emacs's fault or just the theme. Here's a comparison: http://mixandgo.com/emacs_textmate.png Thanks, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Getting started with SLIME and SWANK: Lisp connection closed unexpectedly: connection broken by remote peer I was trying to use the slime-connect function to get access to a remote server with sbcl. I followed all the steps from the slime.mov movie from Marco Baringer, but I got stuck when creating the ssh connectio...
{ "language": "en", "url": "https://stackoverflow.com/questions/372750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Does anyone know of any good tutorials for the Slick 2D lib? There is a 2D java graphics library called Slick 2D (http://slick.cokeandcode.com/) that seems to be used by a bunch of indie games (mostly applets), but the documentation is a little lacking. Does anyone know of any good tutorials for this lib? A: Most ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Merging Visual Studio solution files Microsoft Visual Studio (2005 and 2008) seems to have fun shuffling the Project IDs (GUIDs) around each time we do a little change in a solution. We found that this little detail leads to frustration each time someone has to merge branches in Source control... We though about cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/372770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: org.jgroups.protocols.UDP - failed sending message to null [hannel,192.168.0.46:40014] 15:08:03,642 - ERROR - org.jgroups.protocols.UDP - failed sending message to null (61 bytes) java.lang.Exception: dest=/225.1.2.46:30446 (64 bytes) at org.jgroups.protocols.UDP._send(UDP.java:333) at org.jgroups.protocols....
{ "language": "en", "url": "https://stackoverflow.com/questions/372771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Are varargs allowed in a java enum constructor? enum MyEnum { A( 1, 2, 3, 4), B(1, 2), C(4, 5, 8, 8, 9); private MyEnum( int firstInt, int... otherInts ) { // do something with arguments, perhaps initialize a List } } Are there any problems with this? Any reasons not to do it? A: Sure,...
{ "language": "en", "url": "https://stackoverflow.com/questions/372773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using the ">" selector with IE6 I have written some CSS which targets elements using the parent > child selector. Specifically for tables so I can apply certain styles to the headers and footers like this table > thead > tr > th ... table > tbody > tr > td ... //there are other uses in the css as well This works gr...
{ "language": "en", "url": "https://stackoverflow.com/questions/372778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Adding event handlers by using reflection I am adding dynamically controls to page by using LoadControl and Controls.Add. I need somehow to wrap Init and Load event handlers of this loaded controls into my code. So it should be such order of events SomeMyCode() -> Control.Init() -> AnotherMyCode() and the same for L...
{ "language": "en", "url": "https://stackoverflow.com/questions/372780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unit/Integration Tests, how granular should they be? I am testing the UI of my ASP.Net Web Forms app using NUnit/Watin. I understand the high level concepts around TDD, Unit Testing, integration testing etc, but have not had much of a chance to put them to use until now. So, when I am testing the validation logic...
{ "language": "en", "url": "https://stackoverflow.com/questions/372797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: .NET Convert Number to TimeZone value Say I have the value: -5 that represents a TimeZone (GMT-5). How can I convert that into: "Central DST" or something similarly textual using C# and the .NET framework? Thanks! A: Using .NET 3.5 you can use TimeZoneInfo.GetSystemTimeZones(), and then iterate through until you fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/372799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Avoid expansion of * in bash builtin function let I have a problem with a bash script. I have to use the operator * to multiplicate. Instead the script bugs me with expansion and using as operator the name of the script itself. I tried with single quotes but it doesn't work :( Here's the code #!/bin/bash -x # Bash ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Dir.glob doesn't work on site hosted by site5? I have uploaded some files to a directory under public and I try to access them using Dir.glob. But I get no results back. The Dir.glob works fine on dev server (mongrel) and also works fine when using script/console on the site installed on site5 is there a way to get...
{ "language": "en", "url": "https://stackoverflow.com/questions/372808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do get some of the object from a list without Linq? I am running C# framework 2.0 and I would like to get some of the data from a list? The list is a List<>. How can I do that without looping and doing comparaison manually on each element of the List<>? A: If I follow your question correctly, you can just call ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: A little help with a delphi loop for m := 0 to 300 do if Pos(certain_String, string(arrayitem(m)) <> 0 then begin randomize; x := random(100); begin case x of 0..69 : function(m); // 70 percent 70..79 : function(m+1); // 10 percent ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you databind to a System.Windows.Forms.Treeview control? I'm looking at this control, and it seems to be lacking the standard .net "datasource" and "datamember" properties for databinding. Is this control not bindable? I can write some custom function that populates the treeview from a given data source, I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Inserting taking longer on Sql Server 2005 table I have a table with about 45 columns and as more data goes in, the longer it takes for the inserts to happen. I have increased the size of the data and log files, reduced the fill factor on all the indexes on that table, and still slower and slower insert times. Any...
{ "language": "en", "url": "https://stackoverflow.com/questions/372825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: double click function by JQuery doesn't work on radio input in FireFox I wrote below code to remove checked item from radio group in my form by double click. $("input[type='radio']").each(function(){ $(this).dblclick(function(){ $(this).removeAttr("checked"); }); }); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Hide/Block uses from accessing/downloading files/folders in a VS2008 Solution with TFS? is it possible to hide/block files/folders in a VS2008 solution from various users (by their NTDomainName) if the solution is under TFS? I have some files and a folder that contains secret info (eg. release.web.config, etc) which...
{ "language": "en", "url": "https://stackoverflow.com/questions/372831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Permissions required for 'CREATE USER' in SQL Server 2005? I am trying to create a SQL server login and database user from within my application, along with a custom application user row. I want these users to be able to create other users - i.e. the application will control who can/can't create users but I need all...
{ "language": "en", "url": "https://stackoverflow.com/questions/372834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Eclipse syntax highlighting preferences save and restore I spend some time customizing the colors for syntax highlighting in Eclipse (Java, JSP, HTML, CSS, etc.) but whenever I try to export these settings via File|Export|General|Preferences and reimport them, the settings never completely get imported back. Some co...
{ "language": "en", "url": "https://stackoverflow.com/questions/372837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "96" }
Q: C++ programming style I'm an old (but not too old) Java programmer, that decided to learn C++. But I have seen that much of C++ programming style, is... well, just damn ugly! All that stuff of putting the class definition in a header file, and the methods in a different source file- Calling functions out of nowhere,...
{ "language": "en", "url": "https://stackoverflow.com/questions/372862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Path.Combine for URLs? Path.Combine is handy, but is there a similar function in the .NET framework for URLs? I'm looking for syntax like this: Url.Combine("http://MyUrl.com/", "/Images/Image.jpg") which would return: "http://MyUrl.com/Images/Image.jpg" A: I found UriBuilder worked really well for this sort of thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/372865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1460" }
Q: Refactoring tool in VS 2008? At University we have VS 2005 and it has some refactoring tool like rename, extract method, extract class, etc. I have decide to download VS 2008 from MSDN and it has only Rename and Extract method, how can I activate the other? EDIT: I have downloaded Microsoft VS 2008 C# Express Editi...
{ "language": "en", "url": "https://stackoverflow.com/questions/372867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Get name of a variable as input and change the variable with that name I get the name of a variable from the script user as the first argument and I echo the value of said variable back to the console: #!/bin/bash variablename=$1 echo "The value of $variablename is: " ${!variablename} This works great! What I can't...
{ "language": "en", "url": "https://stackoverflow.com/questions/372869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to set background color for transparent pixels in MagickWand? When converting from PNG to JPG using the MagickWand API, how do I set the background to white for transparent pixels? A: if(current_wand && IsMagickWand(current_wand)){ status=MagickReadImage(current_wand, "test.png"); if (status == MagickFa...
{ "language": "en", "url": "https://stackoverflow.com/questions/372872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Response.Redirect not ending execution I have Default.aspx page, which inherits from BasePage.cs, which inherits from System.Web.UI.Page. BasePage is where I do some common things every page must do upon loading. In BasePage, lets say I'm checking for X. If X=1, then I will redirect to my "Discontinued.aspx" page ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How do I connect to a MySQL Database in Python? How do I connect to a MySQL database using a python program? A: Even though some of you may mark this as a duplicate and get upset that I am copying someone else's answer, I would REALLY like to highlight an aspect of Mr. Napik's response. Because I missed this, I c...
{ "language": "en", "url": "https://stackoverflow.com/questions/372885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1262" }
Q: Shell Extension - Virtual File Creation I want to create a file that only resides in memory... In looking through some documentation I saw a recommendation to use a shell extension as a virtual file. Im not sure that is a workable solution but I would like to know * *Is it a good approach (or should I be using ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to define a user-defined data type with addressable members? I have an unusual situation to model in a MS SQL Server database: the primary key of a table is a multi-segment 'natural' key composed of 5 foreign keys (of fixed sizes). I'd like to be able to define a user-defined data type to implement the data stru...
{ "language": "en", "url": "https://stackoverflow.com/questions/372898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Maintain scroll position in Javascript window.open() How do I maintain the scroll position of the parent page when I open new window using window.open()? The parent page returns to the top of the page. Here is my current code: <a href="#" onclick="javascript: window.open('myPage.aspx');"> Open New Window </a> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Count previous elements that have the local-name() equal to 'FootNoteReference' How can I count how many previous FootNoteReference nodes there are in an xml doc such as this... <MyDoc> <title>&lt;Big Title&gt;</title> <head>Objective</head> <head2>&lt;Heading&gt;</head2> <head>Introduction</head> <Para> asdf as...
{ "language": "en", "url": "https://stackoverflow.com/questions/372909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Zipping Files and Downloading them Using SaveAs Dialog I have the following code to zip all the files and then save it to the harddisk. I want zip all the files (this is done) and then attach the zip file to the Response stream so that the user have the option to save it! protected void DownloadSelectedFiles_Click(...
{ "language": "en", "url": "https://stackoverflow.com/questions/372914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Game Logic in XML Files I'm dealing with game dialogue files (conversation between player and non-playable-characters) where dialogue choices and their outcome depend on certain conditions and result in certain actions. Now, I could write a simple parser to handle some sort of language for specifying the pre and pos...
{ "language": "en", "url": "https://stackoverflow.com/questions/372915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Best practice for returning IEnumerables from LINQ Methods OK, This question has probably been answered before, but I'm not sure of how to word the Title. I have a class that has methods which return many composite LINQ queries. Most of these queries form Anonymous Types in order to get the data I need. I found ou...
{ "language": "en", "url": "https://stackoverflow.com/questions/372916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Server BCP insert additional columns My reuirement: Input File: 1,abc,xyx 2,def,mno 3,ghi,suv DB Table Structure: Col1 char col2 char col3 char col4 char col5 char Data in Table after BCP: col1 col2 col3 col4 col5 1 abc xyz ab xy 2 def mno de mn 3 ghi suv gh su Basically the col4 and col5...
{ "language": "en", "url": "https://stackoverflow.com/questions/372925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Making a control "transparent" to click events I have a ListBox displaying some items, and in certain modes I "stamp" a kind of watermark across the top of it. I've done this with a Border containing a TextBlock with an Opacity of 0.5. All this works nicely. However, I still want the user to be able to click on the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can I be vulnerable to SQL injection by appending input with no whitespace to my query? I am taking in a string from user input, and splitting it on whitespace (using \w) into an array of strings. I then loop through the array, and append a part of the where clause like this: query += " AND ( " ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I join to a "fixed vector" in SQL? By "fixed vector" I mean a static list of values, like 1 through 24. The current query looks like this (simplified) SELECT Period, Profit FROM Projections But the data is "sparse" — so there's not a row for every period. What query will give me a row for peiods 1-24 every t...
{ "language": "en", "url": "https://stackoverflow.com/questions/372934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using Windows Services to process MSMQ messages via WCF We have a solution where we are picking the messages using Windows Service. The Windows Service fires every after 2 minutes and retrieves the MSMQ message to pass it to a Web Service. * *Can I create a WCF service which will automatically picks up the messa...
{ "language": "en", "url": "https://stackoverflow.com/questions/372935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does large SQL Server Memory Usage cause errors? Just started getting a bunch of errors on our C# .Net app that seemed to be happening for no reason. Things like System.IndexOutOfRangeException on a SqlDataReader object for an index that should be returned and has been returning for a while now. Anyways, I looked at...
{ "language": "en", "url": "https://stackoverflow.com/questions/372937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: LINQ, iterators, selecting and projection What I would like to do is use the elegance of LINQ while maintaining an iterator.... essentially Class A { int Position; string Name; } if I have a list of strings, i want to project them into List<A> but have the Position be populated in the projection... List<string...
{ "language": "en", "url": "https://stackoverflow.com/questions/372945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Best way to filter domain objects for json output in an ASP.NET MVC application If I'm rendering a regular view in asp.net mvc the only domain object properties that show up in my page the ones I specifically write out. For example: <div><%= Customer.FirstName %></div> However, if I serialize a domain object for js...
{ "language": "en", "url": "https://stackoverflow.com/questions/372955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Full text search on a table How to enable and perform a "full text" search on a table in SQL Server 2005? I did not quite understand the solution in: How do I use full text search across multiple tables, SQL Server 2005 A: I think that this video tutorial, should get you a good part of the way there. you have to s...
{ "language": "en", "url": "https://stackoverflow.com/questions/372958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: PHP/CURL/Other - How resource intensive? I am going to have a daemon that will run on a FreeBSD server, which will exchange small amounts of data with a list of URIs every minute. I am thinking to use the curl_multi functions to run them all at once, or in groups, every minute, using a post. I am open to other idea...
{ "language": "en", "url": "https://stackoverflow.com/questions/372960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL: Use Aliased Fields in Aggregate Functions I have a SQL statement similar to this: SELECT COUNT(*) AS foo, SUM(foo) AS foo_sum FROM bar But MySQL doesn't allow this because foo is an alias. Does anyone have an idea of how this could be accomplished in SQL? A: No, you can't use an alias in the select-list or ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: WinForms: How to programmatically fire an event handler? I want to programmatically invoke an event handler for a control. For example: DateTimePicker dtpLastConsummated; I want to trigger the TextChanged event handler for the dtpLastConsummated, how can i do it? In other languages I would call something akin to: d...
{ "language": "en", "url": "https://stackoverflow.com/questions/372974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Do you use the TR 24731 'safe' functions? The ISO C committee (ISO/IEC JTC1/SC21/WG14) has published TR 24731-1 and is working on TR 24731-2: TR 24731-1: Extensions to the C Library Part I: Bounds-checking interfaces WG14 is working on a TR on safer C library functions. This TR is oriented towards modifying existin...
{ "language": "en", "url": "https://stackoverflow.com/questions/372980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "87" }
Q: Counting down for x to 0 in Javascript? I have from the backend a time on the format 00:12:54 and I display it to the screen. But, I would like to have this time to continue to go down. I have though to create a variable in javascript that will old the time and with setTimeout to loop to display with document.getEle...
{ "language": "en", "url": "https://stackoverflow.com/questions/372982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the difference between making an index on 2 columns and an index on each of the columns separately? I'm new to database indexing, if I have 2 columns in a table that are good choices for indexing like for example, [Posts]( [PostID] [int] IDENTITY(1,1) NOT NULL, [UserName] [nvarchar](64) NOT NULL, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: .NET CF 2.0: possible single-threaded reentrancy A simple application is written in CF 2.0. It's single-threaded as far as I'm concerned. Two parts of the application are of interest: an event handler that handles "Barcode scanned" event raised by a class that represents PDA's barcode scanner (provided by manufactur...
{ "language": "en", "url": "https://stackoverflow.com/questions/372990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Better ruby markdown interpreter? I'm trying to find a markdown interpreter class/module that I can use in a rakefile. So far I've found maruku, but I'm a bit wary of beta releases. Has anyone had any issues with maruku? Or, do you know of a better alternative? A: The listing at http://ruby-toolbox.com/categories/m...
{ "language": "en", "url": "https://stackoverflow.com/questions/373002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "73" }
Q: MFC Edit Box - Multiple Characters per Keystroke? I am trying to create a simple dialog in MFC using Visual C++. My problem is that when I get the dialog on the screen and try to type in an Edit Box field, if I type the letter 'a' once, it appears in the edit box as 'aaaaaaaaaaa' (that's 12 a's). Furthermore, if I...
{ "language": "en", "url": "https://stackoverflow.com/questions/373012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL Studio - "Modify Stored Procedure" Script Errors In MS SQL Server Management Studio 2005: If you have the setting Tools|Options|Scripting|"Include IF NOT EXISTS clause" set to true, modifying a stored procedure will create a strange script that doesn't even work. It looks something like the following: (ellipsis...
{ "language": "en", "url": "https://stackoverflow.com/questions/373015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Wildcard search on column(s) in a large table (>10.000.000 rows) in MySQL Which techniqes would you use to implement a search for contents in a column on a very big table in MySql? Say for instance that you have 10.000.000 emails stored in a table in the database and would like to implement a subject search, that w...
{ "language": "en", "url": "https://stackoverflow.com/questions/373017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Windows Live ID in ASP.NET MVC does anyone know is there a way to implement Windows Live ID authentication into your ASP.NET MVC site. There is some info about OpenID implementations and it uses some libraries. So is there a way to implement Live ID or it is not yet supported. Thank you A: The same way you would wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/373018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Finding the Current Active Window in Mac OS X using Python Is there a way to find the application name of the current active window at a given time on Mac OS X using Python? A: First off, do you want the window or the application name? This isn't Windows—an application process on Mac OS X can have multiple windows....
{ "language": "en", "url": "https://stackoverflow.com/questions/373020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Can't fetch data do Gridview I'm trying to retrive a dataset to a Gridview, but I just don't get any row in my Gridview. What am I doing wrong? the page code Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load CType(Master, AreaTrabalho).AlteraTitulo = "Projectos" Us...
{ "language": "en", "url": "https://stackoverflow.com/questions/373022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What does FastCGI: comm with server mean? I'm getting this error in a PHP (Drupal) application: (104)Connection reset by peer: FastCGI: comm with server "/opt/php-5.2.5/bin/php-cgi" aborted: read failed It is often followed by this error: FastCGI: incomplete headers (0 bytes) received from server "/opt/php-5.2.5/b...
{ "language": "en", "url": "https://stackoverflow.com/questions/373027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Which settings should be thoroughly evaluated in SQL Server? I am not a DBA by any means, but being a web developer means that I will have to install, setup, and administer databases. In the past, I have just followed the default installation for SQL Server. Over time, I have grown smarter and learned that default i...
{ "language": "en", "url": "https://stackoverflow.com/questions/373028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How To Properly Create Domain using Zend Framework? I asked this question a while back but now I'm looking to implement an actual separation between my database access layer and the domain layer. I am also going to be working to move business logic into the domain where it belongs and out of the controller scripts. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/373054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: SqlBulkInsert - How to set Fire Triggers, Check Constraints? I'm performing a bulk insert with an ADO.NET 2.0 SqlBulkCopy object from a C# method into a MS SQL 2005 database, using a database user with limited permissions. When I try to run the operation, I get the error message: Bulk copy failed. User does not ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/373057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Implement a readonly (immutable) object interface in C# My goal is to make sure that in most scenarios objects are used via a "read-only interface" that is a subset of the full interface. * *As an example, if I were using C++, I would just return a const object. *In C#, if I could achieve this with interfaces, I...
{ "language": "en", "url": "https://stackoverflow.com/questions/373064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: List all the classes that currently exist I'm creating a simple API that creates typed classes based on JSON data that has a mandatory 'type' field defined in it. It uses this string to define a new type, add the fields in the JSON object, instantiate it, and then populate the fields on the instance. What I want to...
{ "language": "en", "url": "https://stackoverflow.com/questions/373067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What advice are you giving your Web user community about the IE security issue? Perhaps not directly programming related, but definitely product / commercially related. And I can't find a dupe, so I thought I would ask. I have had a bit of trouble trying to figure out what best to say to people who have called and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/373071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How Can I Best Guess the Encoding when the BOM (Byte Order Mark) is Missing? My program has to read files that use various encodings. They may be ANSI, UTF-8 or UTF-16 (big or little endian). When the BOM (Byte Order Mark) is there, I have no problem. I know if the file is UTF-8 or UTF-16 BE or LE. I wanted to assu...
{ "language": "en", "url": "https://stackoverflow.com/questions/373081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Scaling out SQL Server for the web (Single Writer Multiple Readers) Has anyone had any experience scaling out SQL Server in a multi reader single writer fashion. If not can anyone suggest a suitable alternative for a read intensive web application, that they have experience with A: It depends on probably 2 things:...
{ "language": "en", "url": "https://stackoverflow.com/questions/373082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How many address fields would you use for a UK database? Address records are probably used in most database, but I've seen a number of slightly different sets of fields used to store them. The number of fields seems to vary from 3-7, and sometimes all fields are simple labelled address1..addressN, other times given ...
{ "language": "en", "url": "https://stackoverflow.com/questions/373084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Catching 302 FOUND in JavaScript I use jQuery to make an AJAX POST request to my server, which can return HTTP response with status 302. Then JavaScript just sends GET request to this URL, while I'd like to redirect user to URL in this response. Is this possible? A: I don't think so. The W3C says that HTTP redirect...
{ "language": "en", "url": "https://stackoverflow.com/questions/373087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Purpose of "consider_all_requests_local" in config/environments/development.rb? What is the purpose of this Rails config setting... config.action_controller.consider_all_requests_local = true It's set to true by default in config/environments/development.rb. Thanks, Ethan A: At development level we set: consider_...
{ "language": "en", "url": "https://stackoverflow.com/questions/373089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "102" }
Q: SQL Server View showing outdated / wrong data after changing underlying dependencies We have a View (call it X) that is the base view called by 2 other views(call them Y and Z). Today we made a change to view X, after that view Y and Z started bringing back data that was incorrect. When we were in Management Studio ...
{ "language": "en", "url": "https://stackoverflow.com/questions/373093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What's the "average" requests per second for a production web application? I have no frame of reference in terms of what's considered "fast"; I'd always wondered this but have never found a straight answer... A: Not sure anyone is still interested, but this information was posted about Twitter (and here too): The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/373098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "157" }
Q: Best way for multi-language sites virtual Directories I have a site that will ultimately support 4 languages and 2 countries (US & Canada, English and Spanish) I'm wondering what's the best way to set up the directory structure? Right now, I have a root site called site.com: This will take you to a page where you c...
{ "language": "en", "url": "https://stackoverflow.com/questions/373106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to design a database schema to support tagging with categories? I am trying to so something like Database Design for Tagging, except each of my tags are grouped into categories. For example, let's say I have a database about vehicles. Let's say we actually don't know very much about vehicles, so we can't specif...
{ "language": "en", "url": "https://stackoverflow.com/questions/373126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: darcs help breaks my shell I have just installed darcs 2.1.2.2. When I type darcs help, sth less-like shows up. When I dismiss it with q it goes away but I don't get prompt and can't execute any commands. C-c doesn't work either. I am using bash on gentoo. A: I have no idea what darcs is, but when bash fails to ret...
{ "language": "en", "url": "https://stackoverflow.com/questions/373134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What techniques can be used to speed up C++ compilation times? What techniques can be used to speed up C++ compilation times? This question came up in some comments to Stack Overflow question C++ programming style, and I'm interested to hear what ideas there are. I've seen a related question, Why does C++ compilatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/373142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "290" }
Q: What are the best packages for decoding/encoding MIME headers (base64)? I am trying to encode/decode MIME headers in Ruby. A: Ruby has Base64 methods in core, just do require "base64" and use Base64.decode64 and Base64.encode64. For quoted-printable, you could use the following code here. A: If the mime content ...
{ "language": "en", "url": "https://stackoverflow.com/questions/373149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you implement constructor injection in a factory? When you're using a factory pattern, how do you inject dependencies into constructors at runtime? I'm building Foos with different formats - boolean, array, freetext, matrix, etc. That format list will grow as we find different uses for Foo. Here's my basic ...
{ "language": "en", "url": "https://stackoverflow.com/questions/373153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the safest way to empty a directory in *nix? I'm scared that one day, I'm going to put a space or miss out something in the command I currently use: rm -rf ./* Is there a safer way of emptying the current directory's contents? A: The safest way is to sit on your hands before pressing Enter. That aside, you...
{ "language": "en", "url": "https://stackoverflow.com/questions/373156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I pass a reference to a function, with parameters? Possible Duplicate: How can I pre-set arguments in JavaScript function call? (Partial Function Application) I need to able to pass a reference to a function with a given set of parameters. Here is an example of passing a reference without parameters: var ...
{ "language": "en", "url": "https://stackoverflow.com/questions/373157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "95" }
Q: Can you toggle grouping in a Crystal Report? Is it possible to have a report which has grouping on the underlying data but for which you can disable the grouping via a button or something on the report? Basically I want to have a "Summary Report" which is grouped, but then be able to view the detail beneath when req...
{ "language": "en", "url": "https://stackoverflow.com/questions/373168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: I would like to move an element to the left using loop I bet I've got elementary question, but I couldn't solve it for two nights. I've got 1 "ul" element and I just want it to move any amount of pixels every e.g. 2 sec to the left. I want him to move like this step by step and then come back to the original positi...
{ "language": "en", "url": "https://stackoverflow.com/questions/373182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mathematical function differentiation with C#? I see that I can declare a function with (say) public double Function(double parameter) but what if I do want to take the derivative of that function? A: If you're thinking of symbolic manipulation of formulae then you're better off doing your derivations in languages...
{ "language": "en", "url": "https://stackoverflow.com/questions/373186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }