text
stringlengths
8
267k
meta
dict
Q: Kohana events, where to place them I'm trying to understand the event system of Kohana. The only thing i don't understand is, where to place the Event::add code. It should be in a place where it is executed before any events are fired. Or am I missing something? What i want to achieve is to construct a class that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I group slices in my Crystal Report pie chart? I am trying to display a pie chart that shows sales by company. However there are a lot of companies that only have a tiny sales which makes the pie chart look rubbish. Is there a way to group companies like this into a single "Other" category? A: Chart Exper...
{ "language": "en", "url": "https://stackoverflow.com/questions/352406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to declare variables A colleague of mine and I have been discussing how to declare variables in a function. Let's say you have a class called TStrings (using Delphi for the sake of explanation) that has at least one abstract method and a descendant class called TStringList which obviously implements the abstract...
{ "language": "en", "url": "https://stackoverflow.com/questions/352408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# single project organization I am reorganizing my source files into a single solution with a single project, due to various reasons: * *a paranoic configured antivirus software; *Advices on partitioning code through .NET assemblies *Control component dependencies to gain clean architecture *Benefit from the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: what is the difference between stringstream clear and str I just wanted to know what's the difference between clear() and str(""); For example: stringstream ss("Stack Overflow"); ss.clear(); ss.str(""); I wanted to know the underlying technical difference. A: void clear ( iostate state = goodbit ) //clears and s...
{ "language": "en", "url": "https://stackoverflow.com/questions/352420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: general-purpose binary protocols I'm trying to find a suitable protocol middleware for my next distributed application. I've found several specifications in the last few days and was wondering if I missed an important one? It should be a binary protocol, support RPCs and optionally have open-source implementations i...
{ "language": "en", "url": "https://stackoverflow.com/questions/352433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Base conversion of arbitrary sized numbers (PHP) I have a long "binary string" like the output of PHPs pack function. How can I convert this value to base62 (0-9a-zA-Z)? The built in maths functions overflow with such long inputs, and BCmath doesn't have a base_convert function, or anything that specific. I would al...
{ "language": "en", "url": "https://stackoverflow.com/questions/352434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: php and sql query failing I have this code http://www.nomorepasting.com/getpaste.php?pasteid=22580 which is part of a small ajax application. I would like to know a better, more efficient way to assign $query, instead of copying the sql each time with a different query or a bunch of if clauses. Basically the query...
{ "language": "en", "url": "https://stackoverflow.com/questions/352452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Are there any good movie/film APIs out there? Working on a movie website and would love to find an API that I could use to get information about different movies. I code in PHP but I'm assuming this would probably return XML. A: I can recommend themoviedb.org. We have been using their API in an open source movie ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Tiger/Lines or shapefiles of USA states and cities? i've been asked to generate some demographic reports (crime rates, birth/deaths, etc) based on state and cities for the USA. I have all the demographic data (provided by our client) but can't seem to find any places which have the boundaries (read: LAT/LONG's) of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/352458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Sharing data between remote locations I'm currently estimating how to best share data between offices at different geographical locations. My current preference is for using SQL Server Merge Replication and have a main database and handful of subscribers. The system will also need to allow a few work sites to work d...
{ "language": "en", "url": "https://stackoverflow.com/questions/352462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Parsing JSON using JQuery I have a JSON as follows { columns : [RULE_ID,COUNTRY_CODE], RULE_ID : [1,2,3,7,9,101,102,103,104,105,106,4,5,100,30], COUNTRY_CODE : [US,US,CA,US,FR,GB,GB,UM,AF,AF,AL,CA,US,US,US] } I need to retrive the column names from the columns entry and then use it to search the re...
{ "language": "en", "url": "https://stackoverflow.com/questions/352463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I style a file input field in Firefox? I am currently doing the front end for a site with looooads of forms, all styled up and looking pretty in IE, but I've just noticed that in Firefox the file input fields aren't responding to any of my styles, all the other types of input fields are fine. I've checked it...
{ "language": "en", "url": "https://stackoverflow.com/questions/352467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Websites for the iPhone - but what about other platforms? I recently did the Chris Coyier tutorial from the css-tricks.com weblog #38: Basics & Tips on Designing for the iPhone. Needless to say I got very excited and suggested to a guy that I do some code monkey work for that we could now offer iPhone websites to hi...
{ "language": "en", "url": "https://stackoverflow.com/questions/352468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I create an immutable Class? I am working on creating an immutable class. I have marked all the properties as read-only. I have a list of items in the class. Although if the property is read-only the list can be modified. Exposing the IEnumerable of the list makes it immutable. I wanted to know what is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/352471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "126" }
Q: Project assembly references between team members I was curiious to know what type of structures you use for your project references? Where I work the developers have a shared folder called AssemblyCache (\\MACHINENAME\AssemblyCache) which is mapped to an R:\ via GPO in Windows 2008 AD (tied to the Developers AD grou...
{ "language": "en", "url": "https://stackoverflow.com/questions/352472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What (not) to declare when implementing an interface with an abstract class? I have an interface A, for which I have to supply a few different implementations. However, those implementations share some helper methods, so I moved those methods to an abstract base class. Interface A { void doX(); } abstract Class...
{ "language": "en", "url": "https://stackoverflow.com/questions/352474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Capitalize a string Does anyone know of a really simple way of capitalizing just the first letter of a string, regardless of the capitalization of the rest of the string? For example: asimpletest -> Asimpletest aSimpleTest -> ASimpleTest I would like to be able to do all string lengths as well. A: s = s[0].upper()...
{ "language": "en", "url": "https://stackoverflow.com/questions/352478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: Delphi warning - W1002 Symbol 'FileSetDate' is specific to a platform When I compile my application under Delphi 2006 I get the following warning [Pascal Warning]- W1002 Symbol 'FileSetDate' is specific to a platform What must I do to suppress this warning? The code MyLastError:= FileSetDate( Files[ i ].Handle, Da...
{ "language": "en", "url": "https://stackoverflow.com/questions/352479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: SQL query for master-detail Master table contains ID and PersonName. Course table contains ID, CourseName. Detail table contains ID, MasterID, CourseID, StartDate,EndDate I want to create report that shows list of persons (PersonName) and the only last course they took (so every person is listed only once): PersonNa...
{ "language": "en", "url": "https://stackoverflow.com/questions/352503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .NET assemblies and DLL rebasing According to this article rebasing is not necessary for .NET assemblies due to JIT compilation of the code. The article states: "JIT-compiled code does not have a rebasing problem since the addresses are generated at run time based on where the code is placed in memory. Also, MSIL i...
{ "language": "en", "url": "https://stackoverflow.com/questions/352519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Adding an OnException attribute using PostSharp I am adventuring into some AOP and it seems with .NET PostSharp is the way to go. I want to do some simple logging to the db when an exception occurs. However I am finding it difficult to find any real solid examples of using PostSharp beyond the basics. I tried the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/352527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: /usr/bin/env questions regarding shebang line pecularities Questions: * *What does the kernel do if you stick a shell-script into the shebang line? *How does the Kernel know which interpreter to launch? Explanation: I recently wanted to write a wrapper around /usr/bin/env because my CGI Environment does not a...
{ "language": "en", "url": "https://stackoverflow.com/questions/352532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Visual Studio 2008;: adding a webreference Aloha I have a VS2008 solution to which I want to add a webservice reference. I enter an url like 'http://192.168.100.87:7001/wsdl/IMySOAPWebService'. The Add Web Reference dialog starts looking then throws me this error: There was an error downloading 'http://192.168.1...
{ "language": "en", "url": "https://stackoverflow.com/questions/352535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to link MemCached server together? I'm looking into using MemCached for a web application I am developing and after researching MemCached over the past few days, I have come across a question I could not find the answer to. How do you link Memcached server together or how do you replicate data between MemCached ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Extending builtin classes in python How can I extend a builtin class in python? I would like to add a method to the str class. I've done some searching but all I'm finding is older posts, I'm hoping someone knows of something newer. A: Assuming that you can not change builtin classes. To simulate a "class reopening...
{ "language": "en", "url": "https://stackoverflow.com/questions/352537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Setup error codes on IIS 6.0 I want the IIS server to return HTTP 304 (Not Modified) when a particular file is accessed. How can I set this up? A: AFAIK, it isn't possible to do this (in IIS). There are a few criteria that have to be met for this code to be sent out: * *Client must have cached copy of page. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to create an XPS document? I'd like to create an XPS document for storing and printing. What is the easiest way to create an XPS document (for example with a simple grid with some data inside) in my program, and to pass it around? A: If you are working in .NET (v2 or later), you can very easily generate a valid...
{ "language": "en", "url": "https://stackoverflow.com/questions/352540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Delphi Win API CreateTimerQueueTimer threads and thread safe FormatDateTime crashes This is a bit of a long question, but here we go. There is a version of FormatDateTime that is said to be thread safe in that you use GetLocaleFormatSettings(3081, FormatSettings); to get a value and then you can use it like so; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I make a thread wait until a file is created? I need a thread to wait until a file is exist or created. I have the following code so far: while(!receivedDataFile.isFileExists("receiveddata.txt")) { try { Thead.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I copy a record, changing only the id? My table has a large number of columns. I have a command to copy some data - think of it as cloning a product - but as the columns may change in the future, I would like to only select everything from the table and only change the value of one column without having to r...
{ "language": "en", "url": "https://stackoverflow.com/questions/352552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: View over multiple tables containing same columns I have four tables containing exactly the same columns, and want to create a view over all four so I can query them together. Is this possible? (for tedious reasons I cannot/am not permitted to combine them, which would make this irrelevant!) A: It is difficult to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/352569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Safari: event bubbling across iframes If the user does a "onmousedown" inside a iframe, drags outside the iframe and hovers over elements that have a "onmouseover" attached to them - safari does not fire this event. I have a slightly unconventional drag n drop setup. The items that can be "dragged" are inside a ifra...
{ "language": "en", "url": "https://stackoverflow.com/questions/352579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to use enums with JPA I have an existing database of a film rental system. Each film has a has a rating attribute. In SQL they used a constraint to limit the allowed values of this attribute. CONSTRAINT film_rating_check CHECK ((((((((rating)::text = ''::text) OR ((rating)::text = 'G'::text)) OR ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: "Unknown web method" error after Server.Transfer I use System.Web.Services.WebMethodAttribute to make a public static method of an ASP.NET page callable from a client-side script: test.aspx.cs [System.Web.Services.WebMethod] public static string GetResult() { return "result"; } test.aspx <asp:ScriptManager ID="...
{ "language": "en", "url": "https://stackoverflow.com/questions/352592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Finding performance bottlenecks in a classic asp/sql server website I've got an old classic asp/sql server app which is constantly throwing 500 errors/timeouts even though the load is not massive. Some of the DB queries are pretty intensive but nothing that should be causing it to fall over. Are there any good piece...
{ "language": "en", "url": "https://stackoverflow.com/questions/352597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Setting up Visual Studio windows I've set up Visual Studio 2008, exactly as I want it with one screen (got dual monitors) used only for coding and the other setup with multiple tab groups, each containing different tabs, like one group contains the output, error list and todo list tabs, another group has tabs for th...
{ "language": "en", "url": "https://stackoverflow.com/questions/352598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I make eclipse's autoformatter ignore a section of code? i remember there being a way of marking a section of code in eclipse (special comment or annotation?) which made the autoformatter ignore that section. Or I may have drempt this... Used mainly when I have strings which wrap onto several lines and i don...
{ "language": "en", "url": "https://stackoverflow.com/questions/352599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: How to run MSVC++ 6.0 off a USB drive as a portable app Without using any third party program to do this (i.e. without VMware ThinApp, U3 or MojoPac etc.) How to move MSVC++ 6.0 from from its install on C: over to a USB drive? So that it can be used on different PCs with no admin rights and without installing anythi...
{ "language": "en", "url": "https://stackoverflow.com/questions/352600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to trace T-SQL function calls I'm trying to debug a rather complicated formula evaluator written in T-SQL UDFs (don't ask) that recursively (but indirectly through an intermediate function) calls itself, blah, blah. And, of course, we have a bug. Now, using PRINT statements (that can then be read from ADO.NET by...
{ "language": "en", "url": "https://stackoverflow.com/questions/352605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How to get Maven to run war:exploded but not war:war I have a Maven pom that uses <packaging>war</packaging>. But actually, I don't want build the war-file, I just want all the dependent jars collected and a full deployment directory created. So I'm running the war:exploded goal to generate the deploy directory: <p...
{ "language": "en", "url": "https://stackoverflow.com/questions/352612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Vertical Table in a web page I want to switch between vertical and horizontal table layout for same data. Although it is possible to do it by making applying the same CSS for the first column for the vertical layout as the css applied for the header row for the Horizontal layout. Is there is any way where we can mak...
{ "language": "en", "url": "https://stackoverflow.com/questions/352614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should every single object have an interface and all objects loosely coupled? From what I have read best practice is to have classes based on an interface and loosely couple the objects, in order to help code re-use and unit test. Is this correct and is it a rule that should always be followed? The reason I ask is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: How do I seamlessly compress the data I post to a form using C# and IIS? I have to interface with a slightly archaic system that doesn't use webservices. In order to send data to this system, I need to post an XML document into a form on the other system's website. This XML document can get very large so I would lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/352623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Declaring Presenters and Views I'm making a WPF application that is comprised of Screens (Presenter + View). I want to be able to declare these screens in a config file or SQL database. I have been trying to come up with a good solution I've given up and am asking how some of you design this sort of thing? I've been...
{ "language": "en", "url": "https://stackoverflow.com/questions/352632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: configure ip alias and route, deal with network unavailable I need to write a script to set ip address/mask/broadcast as an alias on eth0:0 plus set the default gateway. This solution works: ifconfig eth0:0 <ip> netmask <mask> up ip route replace default via <ip> but sometimes the second call gets an error "network...
{ "language": "en", "url": "https://stackoverflow.com/questions/352633", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Getting the output of a Thread What do you think is the best way for obtaining the results of the work of a thread? Imagine a Thread which does some calculations, how do you warn the main program the calculations are done? You could poll every X milliseconds for some public variable called "job finished" or somethin...
{ "language": "en", "url": "https://stackoverflow.com/questions/352638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Troubleshooting: Assembly resolution for a managed dll from a MS-Word VSTO Add-in I have an MS-Word VSTO Document with a code-behind dll named WordDocument1.dll Project folder D:\Work\Seven\WordAutomation\ContentControls\WordDocument1\bin\Debug I've copied some custom code into a MyAppExecs folder under that. The DL...
{ "language": "en", "url": "https://stackoverflow.com/questions/352641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I set globals to JSLint to ignore for a whole set of files? I'd like to run JSLint4Java as part of my build process. I have about 1000 JS files in a library, and don't really want to add a /*globals foo, bar, baz */ header to each of them -- especially since many of them are from an external library (Dojo)...
{ "language": "en", "url": "https://stackoverflow.com/questions/352646", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Could not find default endpoint element I've added a proxy to a webservice to a VS2008/.NET 3.5 solution. When constructing the client .NET throws this error: Could not find default endpoint element that references contract 'IMySOAPWebService' in the ServiceModel client configuration section. This might be because ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "388" }
Q: Entity Framework, Compiled Queries and IIS I am using Entity Framework with my website. To improve performance, I have started to use compiled queries wherever I can, either directly with CompiledQuery.Compile or using ESQL. The performance now is fantastic, that's it, once the queries are compiled. Compiling them ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Weighted random selection with and without replacement Recently I needed to do weighted random selection of elements from a list, both with and without replacement. While there are well known and good algorithms for unweighted selection, and some for weighted selection without replacement (such as modifications of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/352670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Whats the best way to update a single record via SQL and obtain the id of the record that was updated? (Java/MSSQL) I know I can update a single record like this - but then how to I get access to the id of the record that was updated? (I'm using MSSQL so I can't use Oracles RowId) update myTable set myCol = 'foo' w...
{ "language": "en", "url": "https://stackoverflow.com/questions/352673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating GUIDs with a set Prefix i wonder if there is a way to generate valid GUIDs/UUIDs where the first (or any part) part is a user-selected prefix. I.e., the GUID has the format AAAAAAAA-BBBB-CCCC-DDDD-DDDDDDDDDDDD, and I want to set any part to a pre-defined value (ideally the AAA's). The goal is to have GUIDs ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I connect iPhone and web service and get XML data? I know how to connect to web server using an iPhone but now I have to connect the iPhone to a web service. I don't know how to do it and there is no demo or class available online. Does anyone have any ideas? A: In my opinion, you have two options : * *U...
{ "language": "en", "url": "https://stackoverflow.com/questions/352676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Invalid URI for Localhost We have a website/webservice running on one of our servers. We hit that webservice once a day with a scheduled .bat scipt. Just recently the scheduled task started to fail. The log shows "Invalid URI: The hostname could not be parsed." When we're logged into the server we can reach the webs...
{ "language": "en", "url": "https://stackoverflow.com/questions/352684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I revert a git-svn branch to SVN HEAD? I have a local git repository which tracks a remote SVN repository via git svn. I have made and committed some changes in the local git repository, but now I'd like to create a branch that reflects SVN HEAD in order to make some changes to the code as it stands in SVN, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/352692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: static concepts class Trial { static int i; int getI() { return i;} void setI(int value) { i = value;} } public class ttest { public static void main(String args[]) { Trial t1 = new Trial(); t1.setI(10); System.out.println(t1.getI()); Trial t2 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Pass URL as get parameter? I'm trying to pass u url as parameter to a get method. I defined a route that accepts a {*url} parameter so I can send "/" characters without it separating my parameter. As soon as there is a ":" in the url (like in http: or localhost:3857 for example), the method never gets hit. The Html....
{ "language": "en", "url": "https://stackoverflow.com/questions/352694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: best way to run multi-threaded nunit tests I currently trying to find a solution, how to ensure that a test fails if an exception occurs in a thread which is spawn by the test method. I DON'T want to start a discussion about more than one thread in a unit test. => "unit test".Replace("unit","integration"); I already...
{ "language": "en", "url": "https://stackoverflow.com/questions/352695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I find a complete list of extensions installed in VS2008? I want that list, because if something horrible happens, and I'll have to reinstall Visual Studio - I'll need this list, so that I can recreate the same development environment. This also makes it hard to search for updates - I can not see the versions...
{ "language": "en", "url": "https://stackoverflow.com/questions/352699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Integrating Hudson with MS Test? Is it possible to integrate Hudson with MS Test? I am setting up a smaller CI server on my development machine with Hudson right now, just so that I can have some statistics (ie. FxCop and compiler warnings). Of course, it would also be nice if it could just run my unit tests and pre...
{ "language": "en", "url": "https://stackoverflow.com/questions/352703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Is it true that using "this." before the parameters in c# uses more memory? than just to call the parameter as it is? A: If you mean fields, then no. The compiler injects "this" (ldarg.0) whether you use it explicitly (this.foo) or implicitly (foo). It does, however, take 5 more characters in your source code... so...
{ "language": "en", "url": "https://stackoverflow.com/questions/352720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Sql Server 2005 - manage concurrency on tables I've got in an ASP.NET application this process : * *Start a connection *Start a transaction *Insert into a table "LoadData" a lot of values with the SqlBulkCopy class with a column that contains a specific LoadId. *Call a stored procedure that : * *read the ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/352722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Signal and slot connection in .ui I have started to play a little with Qt 4. And then I have come across a problem with the Qt Designer. In the Signal/Slots editor I can only setup the connections that are listed there, and not all the slots are listed. If I try to add it manualy in the .ui file, the connection woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/352740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Post large data in C# I have the following scenario * *Have a web browser control which uses the Navigate method to call a web page. I have the need to post a large number of elements via FORM POST. The number of elements can be either 40-100 elements. Is it advisable to encode this and send it via the the Navi...
{ "language": "en", "url": "https://stackoverflow.com/questions/352747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: undo redo with an auto delete mechanism My application is developped in C++ using Qt and is using signals and slots. Let's say I have the following classes (pseudo-C++ code) : class Ball { Color m_Color; int m_Size; }; class Player { public: setBall(Ball* pBall) { if (pBall != m_pBall) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to access to parent widget on qt? I have an inherited QTreeWidget (called PackList) class and its parent is a KXmlGuiWindow. How can I access to the parent's slots? I've tried getParent()->mySlot() from the QTreeWidget class but I've got error: no matching function for call to 'PackList::mySlot()' Does anybod...
{ "language": "en", "url": "https://stackoverflow.com/questions/352758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: PHP Flush: How Often and Best Practices I just finished reading this post: https://developer.yahoo.com/performance/rules.html#flush and have already implemented a flush after the top portion of my page loads (head, css, top banner/search/nav). Is there any performance hit in flushing? Is there such a thing as doing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Best Resource for Character Encodings I'm searching for a document (not printed) that explains in details, but still simply, the subject of character encoding. A: A great overview from the Programmer's perspective is: The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and C...
{ "language": "en", "url": "https://stackoverflow.com/questions/352761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to animate rotating cube in C#? I would like to do something like this: a rotating cube on a form. I don't want to use any external library or dll, just pure .NET 3.5 (without directx). And a cube build with lines only. Could you please tell me how to do this? I don't want to use external libraries because I don...
{ "language": "en", "url": "https://stackoverflow.com/questions/352771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Java EBNF? Does anyone know of an accurate source for an (E)BNF for the Java language? Preferably, it would be from an authorative source, e.g. Sun. Thanks. A: i believe the 3rd edition is the latest: JLS 3rd edition A: First google result :) Though I can't speak for how up-to-date it might be. A: I'm not sure wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/352774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: AS400 library/file (member) JDBC query Using JDBC (with jt400 driver / connection, naming=system) I'm running these SQL statements: "CREATE ALIAS QTEMP/SOURCETEMP FOR " + library + "/" + file + " (" + member + ")" "SELECT SRCDTA FROM QTEMP/SOURCETEMP" "DROP ALIAS QTEMP/SOURCETEMP" This works. However, when the mem...
{ "language": "en", "url": "https://stackoverflow.com/questions/352777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When to catch java.lang.Error? In what situations should one catch java.lang.Error on an application? A: Very rarely. I'd say only at the top level of a thread in order to ATTEMPT to issue a message with the reason for a thread dying. If you are in a framework that does this sort of thing for you, leave it to the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/352780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "122" }
Q: How to use MigLayout? I read some information about Java layout managers and the recommendation was MigLayout. My problem is, that I didn't found any tutorial or easy step-by-step documentation. So I want to know how this all works, but I don't know how. A: Bombe is right... and wrong. I find this whitepaper tends ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: How do you track database changes in source control? We use SQL Server 2000/2005 and Vault or SVN on most of our projects. I haven't found a decent solution for capturing database schema/proc changes in either source control system. Our current solution is quite cumbersome and difficult to enforce (script out the ob...
{ "language": "en", "url": "https://stackoverflow.com/questions/352785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Type inference to unification problem Has anyone an idea how the type inference problem E > hd (cons 1 nil) : α0 with the typing environment E={ hd : list(α1 ) → α1 , cons : α2 → list(α2 ) → list(α2 ), nil : list(α3 ), 1 : ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: With XSLT/XPath, how can I match any element in the null namespace? <xsl:template match="foo"> matches the foo element in the null namespace. <xsl:template match="*"> matches any element in any namespace. I tried: xmlns:null="" ... <xsl:template match="null:*"> but it's illegal to declare a prefix for the null na...
{ "language": "en", "url": "https://stackoverflow.com/questions/352790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Pointers to learn how to use DTrace When I asked for tools to profile Rails apps, someone pointed at DTrace. Since I work on MacOSX stations and deploy on OpenSolaris, it is a valid way to go. But I have little knowledge of DTrace. Besides the usual suspect, Sun DTrace page and the avaliable info there, is there any...
{ "language": "en", "url": "https://stackoverflow.com/questions/352806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Is it possible to export spatial data from Sql Server 2008 in gml2 format? Sql Server 2008 supports spatial data with new geometry and geography UDT's. They both support AsGml() method to serialize data in gml format. However they serialize data into GML3 format. Is there any way to tell it to serialize data into GM...
{ "language": "en", "url": "https://stackoverflow.com/questions/352814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's a possible justification for not wrapping long argument lists? (StyleCop SA1115) I'm stuck in a battle between ReSharper and StyleCop, and I'd like to let ReSharper win, but I want to hear the arguments in favour of StyleCop before I do that. When I'm writing long argument lists ReSharper sensibly chops the p...
{ "language": "en", "url": "https://stackoverflow.com/questions/352821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there any library/framework for undo/redo changes of rows in database? May be my title is not clear. I am looking for some kind of version control on database tables, like subversion does on files, like wiki does. I want to trace the changes log. I want to extract and run the diff in reverse. (undo like a "svn me...
{ "language": "en", "url": "https://stackoverflow.com/questions/352832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Daily Build and SQL Server Changes I am about to try and automate a daily build, which will involve database changes, code generation, and of course a build, commit, and later on a deployment. At the moment, each developer on the team includes their structure and data changes for the DB in two files respectively, e...
{ "language": "en", "url": "https://stackoverflow.com/questions/352835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add file extensions based on file type on Linux/Unix? This is a question regarding Unix shell scripting (any shell), but any other "standard" scripting language solution would also be appreciated: I have a directory full of files where the filenames are hash values like this: fd73d0cf8ee68073dce270cf7e770b97 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How to create a DHTML menu? I need to create a DHTML menu with the specified features, but I can't figure out how to do it. Here's what I need: All items are layed out horizontally. If they would be wider than the screen, two little arrows appear on the right side of the menu that allow to scroll it. Something like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: VSS 6.0 to TFS Migration Our team is migrating from VSS 6.0 to TFS 2008 to be used for source control purposes. I am wondering if anyone has any experience with this migration. In particular, we are interested in preserving the history of files in source control, as well as any other potential gotchas. A: Do you ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/352841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I prevent Windows from catching my Perl exceptions? I have this Perl software that is supposed to run 24/7. It keeps open a connection to an IMAP server, checks for new mail and then classifies new messages. Now I have a user that is hibernating his XP laptop every once in a while. When this happens, the con...
{ "language": "en", "url": "https://stackoverflow.com/questions/352870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Highlight all references to X? The Eclipse IDE has a neat little feature that I really miss in Visual Studio. If I place the cursor on a variable or method name, the IDE will automatically highlight all references to it in the current document within the relevant scope. I can't seem to find an option to turn on simi...
{ "language": "en", "url": "https://stackoverflow.com/questions/352875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Converting unicode for MySQL and JSON I have some HTML that was inserted into a MySQL database from a CSV file, which in turn was exported from an access MDB file. The MDB file was exported as Unicode, and indeed is Unicode. I am however unsure as what encoding the MySQL database has. When I try to echo out html sto...
{ "language": "en", "url": "https://stackoverflow.com/questions/352883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dependency injection in C++ This is also a question that I asked in a comment in one of Miško Hevery's google talks that was dealing with dependency injection but it got buried in the comments. I wonder how can the factory / builder step of wiring the dependencies together can work in C++. I.e. we have a class A tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/352885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Large data - storage and query We have a huge data of about 300 million records, which will get updated every 3-6 months.We need to query this data(continously, real time) to get some information.What are the options - a RDBMS(mysql) , or some other option like Hadoop.Which will be better? A: 300M records is well w...
{ "language": "en", "url": "https://stackoverflow.com/questions/352895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Exception Handling Is Structured Exception Handling bad? What is the right way to handle exceptions? EDIT: Exception Handling in .NET using C#. I usually have a set of specific exception classes (DivideByZeroException, ArrayTypeMismatchException) and don't have a generic "catch (Exception ex)". The thinking behind t...
{ "language": "en", "url": "https://stackoverflow.com/questions/352899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you approach intermittent bugs? Scenario You've got several bug reports all showing the same problem. They're all cryptic with similar tales of how the problem occurred. You follow the steps but it doesn't reliably reproduce the problem. After some investigation and web searching, you suspect what might be go...
{ "language": "en", "url": "https://stackoverflow.com/questions/352906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: tomcat application missing displayname I have a little project with some jsp deployed on an Tomcat 5.5. Recently the Servlets which are also deployed with the jsp files (one war archive) stopped working. I also checked out a previous version from my svn which should work. What I noticed that the displayname (I use a...
{ "language": "en", "url": "https://stackoverflow.com/questions/352925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: LINQ across multiple databases I've got two tables that need to be joined via LINQ, but they live in different databases. Right now I'm returning the results of one table, then looping through and retrieving the results of the other, which as you can guess isn't terribly efficient. Is there any way to get them into ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: How do I use NSScanner to parse a tab delimited string in Cocoa? I have a web service which returns tab delimited data (see sample below). I need to parse this into an array or similar so I can create a navigation view of it. I've managed to perform the web request and could parse an XML file, but my knowledge of Ob...
{ "language": "en", "url": "https://stackoverflow.com/questions/352952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Future.get() and InterruptedException Asynchronous threading Im using asynchronous threading in my application WITH httpClient. I make a call using the Future Api like so mStrResults = (String) rssFuture.get(); this call attempts to retrieve an html string returned from my Callable httpClient call() method. What ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# equivalent of C++ mem_fun? I'd like to do something like the following in C#: class Container { //... public void ForEach(Action method) { foreach (MyClass myObj in sequence) myObj.method(); } } //... containerObj.ForEach(MyClass.Method); In C++ I would use so...
{ "language": "en", "url": "https://stackoverflow.com/questions/352958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Subversion and using IIS for ASP.NET development I'm a total newbie to SVN and haven't been able to find an answer for the following situation. I have an ASP .NET 2.0 web app that I am developing. I am using my local IIS as the development web server (i.e. not the Visual Studio web development server). My developmen...
{ "language": "en", "url": "https://stackoverflow.com/questions/352968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Clean document roles in a Doc Library I have been developing an event handler to clean up the RolesAssignments of the new item of a document library in MOSS. I’ve searched for a method that could clean all the RolesAssignments efficiently, although the best way I found seams to be loop through the RolesAssignments ...
{ "language": "en", "url": "https://stackoverflow.com/questions/352980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }