text
stringlengths
8
267k
meta
dict
Q: why are assignments in conditions bad? I am using NetBeans for PHP 6.5. In my code I frequently use the following type of command: if (($row = $db->get_row($sql))) { return $row->folder; } else { return FALSE; } Netbeans tells me that I should not be using assignments in the IF statement. Wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/317259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: List of two different Types in C# I'm currently having a problem with a ShoppingCart for my customer. He wants to be able to add Text between the CartItems so I was wondering if there is some way to still only have one List. My solution would be to have two lists, one of type IList that gets iterated over when calcu...
{ "language": "en", "url": "https://stackoverflow.com/questions/317279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Optimize Group By in LINQ to Entities I have this query in LINQ to Entities. var query = (from s in db.ForumStatsSet where s.LogDate >= date1 && s.LogDate <= date2 group s by new { s.Topic.topicID, s.Topic.subject, s.Topic.Forum.forumName, s.Topic.datum, s.Topic.Foru...
{ "language": "en", "url": "https://stackoverflow.com/questions/317281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Creating custom server control to accept user input I am trying to build a server control that, depending on a "QuestionTypeId" display either a text box, date picker or Yes-No radio buttons. I have my control displaying how I want it to, but when the submit button is pressed on the form, the text box, date picker ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: VS 2008 Team System crash on opening solution VS 2008 crashes whilst opening a solution file when it reaches the stage of "Loading project files 'Solution Items'". Is there any way of either stopping the virtual folder of solution items from opening or a workaround for this? The solution is coming from TFS 2005 and...
{ "language": "en", "url": "https://stackoverflow.com/questions/317292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Don't show iPhone keyboard for a particular textbox in web page? Is there any setting using which the iPhone keyboard won't appear for a particular textbox in web page? May be some css kind of setting? A: you just make the input field as readonly="true"/ readonly mode so that keyboard wont appear!! A: Do you want ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: chmod syntax in FTP-Client on all subdirectories Which ftp client or which syntax allows easy chmod for sub-directories? A: LFTP allows for recursive CHMOD if the client allows it. You can accomplish this by logging in with LFTP from a Unix/Linux CLI and then run the following: chmod -R 0755 /www/directory/* You c...
{ "language": "en", "url": "https://stackoverflow.com/questions/317302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Unwanted clipping in WrapPanel I need to create a ListBox with the WrapPanel ItemsTemplate. My item is displayed as a card with small top "toolbar" that is displaying dynamically on mouse over. [ dyn. toolbar ] [ card ] Everything is running well except the first line. I need to have cards very close eac...
{ "language": "en", "url": "https://stackoverflow.com/questions/317306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I create multidimensional arrays in Perl? I am a bit new to Perl, but here is what I want to do: my @array2d; while(<FILE>){ push(@array2d[$i], $_); } It doesn't compile since @array2d[$i] is not an array but a scalar value. How should I declare @array2d as an array of array? Of course, I have no idea of...
{ "language": "en", "url": "https://stackoverflow.com/questions/317310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Obtaining an NSDecimalNumber from a locale specific string? I have some string s that is locale specific (eg, 0.01 or 0,01). I want to convert this string to a NSDecimalNumber. From the examples I've seen thus far on the interwebs, this is accomplished by using an NSNumberFormatter a la: NSString *s = @"0.07"; NS...
{ "language": "en", "url": "https://stackoverflow.com/questions/317311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: ASP.NET MVC Relative Paths In my applications, I often have to use relative paths. For example, when I reference JQuery, I usually do so like this: <script type="text/javascript" src="../Scripts/jquery-1.2.6.js"></script> Now that I'm making the transition to MVC, I need to account for the different paths a page mi...
{ "language": "en", "url": "https://stackoverflow.com/questions/317315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "102" }
Q: Optimized SQL for tree structures How would you get tree-structured data from a database with the best performance? For example, say you have a folder-hierarchy in a database. Where the folder-database-row has ID, Name and ParentID columns. Would you use a special algorithm to get all the data at once, minimizing th...
{ "language": "en", "url": "https://stackoverflow.com/questions/317322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: IPC between .NET and Java client applications I must get two different client application talk without any kind of broker or server. What is the best method for IPC beween two process, Java and .NET? It must able to be work in multi-user termainl server, so no socket please. I wish that it is lightweight and simple,...
{ "language": "en", "url": "https://stackoverflow.com/questions/317327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why can I not return a List if asked for a List? I understand that, if S is a child class of T, then a List<S> is not a child of List<T>. Fine. But interfaces have a different paradigm: if Foo implements IFoo, then why is a List<Foo> not (an example of) a List<IFoo>? As there can be no actual class IFoo, does this m...
{ "language": "en", "url": "https://stackoverflow.com/questions/317335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you pull first 100 characters of a string in PHP I am looking for a way to pull the first 100 characters from a string variable to put in another variable for printing. Is there a function that can do this easily? For example: $string1 = "I am looking for a way to pull the first 100 characters from a string...
{ "language": "en", "url": "https://stackoverflow.com/questions/317336", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "105" }
Q: Axis2 WSDL2Java : missing no-arg operation in generated stub I've got in my webservice a simple public boolean isAlive() service. I defined it in my WSDL : <wsdl:types> <xsd:element name="isAliveResponse" type="xsd:boolean"> </xsd:element> </wsdl:types> <wsdl:message name="isAliveResponse"> <wsdl:part el...
{ "language": "en", "url": "https://stackoverflow.com/questions/317362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Comprehensive methods of viewing memory usage on Solaris On Linux, the "top" command shows a detailed but high level overview of your memory usage, showing: Total Memory, Used Memory, Free Memory, Buffer Usage, Cache Usage, Swap size and Swap Usage. My question is, what commands are available to show these memory us...
{ "language": "en", "url": "https://stackoverflow.com/questions/317364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Newbie Python question about strings with parameters: "%%s"? I'm trying to figure out what the following line does exactly - specifically the %%s part? cursor.execute('INSERT INTO mastertickets (%s, %s) VALUES (%%s, %%s)'%sourcedest, (self.tkt.id, n)) Any good mini-tutorial about string formatting and inserting var...
{ "language": "en", "url": "https://stackoverflow.com/questions/317368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SQL if statement in where clause for searching database I'm creating a stored procedure to return search results where some of the parameters are optional. I want an "if statement" in my where clause but can't get it working. The where clause should filter by only the non-null parameters. Here's the sp ALTER PROCEDU...
{ "language": "en", "url": "https://stackoverflow.com/questions/317377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: jQuery Rebinding a hover event (helper) When the page is done loading I call a function which puts the hover event on $('a.tooltip'). When I want to unbind this event I do the following: $('a.tooltip').unbind('mouseover mouseout'); That works! However when I want rebind the hover event and I call the functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/317378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: New to MVC | Data in a view from different sources OK, So i have been watching some MVC vids and reading some bits. I am new to the entire MVC pattern, and until now have been happily wrapped up in the web forms world! Like with so many demos it all seems great and I'm sure I'll have lots I dont understand as I move...
{ "language": "en", "url": "https://stackoverflow.com/questions/317381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Jquery Rest communication with WCF 3.5 I'm testing the basics for exchanging rest messages between a asp.net mvc site and a WCF 3.5 service. The service is built using the template found in the WCF REST Starter Kit found on codeplex. I would like to exchange json messages using jquery. The REST Singleton service is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is process forking in PHP / Apache a good idea? I'm writing a simple application in PHP which needs to occasionally carry out a fairly intensive set of MySQL updates. I don't particularly want this to cause a delay for the user, so I'm wondering about using pcntl_fork(). I'm not sure how this really works though: w...
{ "language": "en", "url": "https://stackoverflow.com/questions/317392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Do i need to dispose of this Image instance? I'm making a simple Image Debugger Visualizer. Code is below. I'm not sure if i need to manually dispose of the Image instance? Because i'm making a windows Form window and the PictureBox inside that contains my dynamic image .. do i need to add some special code when the...
{ "language": "en", "url": "https://stackoverflow.com/questions/317400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get Element value with minidom with Python I am creating a GUI frontend for the Eve Online API in Python. I have successfully pulled the XML data from their server. I am trying to grab the value from a node called "name": from xml.dom.minidom import parse dom = parse("C:\\eve.xml") name = dom.getElementsByTagName('n...
{ "language": "en", "url": "https://stackoverflow.com/questions/317413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "126" }
Q: How to debug .pc files? I am using emacs + gdb to debug a bunch of .c files in unix -- and it always worked well. But some of the projects I work in also have a bunch of .pc (Pro*C/C++) files. These files generate .c and .i related files after compilation. But during runtime I am able only to see the .i files in gdb...
{ "language": "en", "url": "https://stackoverflow.com/questions/317417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASP.NET linkbutton raising onBeforeUnload event twice I've posted this here, but thought it might deserve a question on its own. What I'm trying to do is show a dialog box that asks the user if he/she wants to leave the page if there are unsaved changes. That all works fine. But the problem is described below: Has a...
{ "language": "en", "url": "https://stackoverflow.com/questions/317423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to test for an empty SQL result in ASP I am running a query from ASP using a MySQL database, I want to create a variable (ssResult) based on the result with a person's name (fullname), if the record does not exist I want to assign the text 'N/A' to the variable, code below, I currently use a function getOther fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/317424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: javascript in masterpages ASP.NET 2.0 I am trying to set up a masterpage that contains a javascript popup subroutine that can be used in multiple web pages. The popup already works in a single page environment. I now want to migrate it to a master page. Any ideas will be greatly appreciated. I already searched this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mirroring vs. Log Shipping in Sql Server 2005 I'm interested in hearing people's thoughts about the pros and cons of database mirroring vs. log shipping in this scenario: we need to setup a database backup situation wherein there is exactly one secondary server that need not automatically pick up when the primary fa...
{ "language": "en", "url": "https://stackoverflow.com/questions/317438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to sum data in one column based on the same month in another column using macros I am using macros in excel 2007 for my work. I am working with many data and I need to sum data from 2 or more rows in the same coloumn according to the same month. However the month column is expressed as date. for example, i have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why override operator()? In the Boost Signals library, they are overloading the () operator. Is this a convention in C++? For callbacks, etc.? I have seen this in code of a co-worker (who happens to be a big Boost fan). Of all the Boost goodness out there, this has only led to confusion for me. Any insight as to the...
{ "language": "en", "url": "https://stackoverflow.com/questions/317450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "79" }
Q: Is there C# look-alike for Linux? Is there C# look-alike for Linux? What about a compiler? A: If you don't want to use Mono, I think Java may be your closest alternative. A: Look-alike? I am assuming you mean a similar language? You could always just use C# with Mono, a multi-platform port of the .Net framework A...
{ "language": "en", "url": "https://stackoverflow.com/questions/317456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: I need high performance data redundancy over IP I have a database that I need to provide redundancy for. It is Codebase, but using a typical SQL database uses too much CPU, and having the DB offsite causes too much latency in my process. I need a viable solution for providing data redundancy with an offsite loca...
{ "language": "en", "url": "https://stackoverflow.com/questions/317457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Some help understanding "yield" In my everlasting quest to suck less I'm trying to understand the "yield" statement, but I keep encountering the same error. The body of [someMethod] cannot be an iterator block because 'System.Collections.Generic.List< AClass>' is not an iterator interface type. This is the code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: How to resize a container div to the total height of its children? I have a container element which I need to resize as its contents change. It contains 2 absolutely positioned divs which can both change height. If I don't specify the height of the container then anything after the container disappears under the con...
{ "language": "en", "url": "https://stackoverflow.com/questions/317472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What does your team do to stand out? Where I work, we have small teams of 2 - 5 people. As a dev lead, what are some things that you've implemented which makes your team stand out from the others? Meaning, it makes the others teams say, "that's cool" or "why didn't we think of that". Just some thinking out of the...
{ "language": "en", "url": "https://stackoverflow.com/questions/317493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why does setting a property on an enumerated object not work? I know a lot about C# but this one is stumping me and Google isn't helping. I have an IEnumerable range of objects. I want to set a property on the first one. I do so, but when I enumerate over the range of objects after the modification, I don't see my...
{ "language": "en", "url": "https://stackoverflow.com/questions/317527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Python: packing an ip address as a ctype.c_ulong() for use with DLL given the following code: import ctypes ip="192.168.1.1" thisdll = ctypes.cdll['aDLL'] thisdll.functionThatExpectsAnIP(ip) how can I correctly pack this for a DLL that expects it as a c_ulong datatype? I've tried using: ip_netFrmt = socket.in...
{ "language": "en", "url": "https://stackoverflow.com/questions/317531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Creating web forms from a database schema I'm wondering if there are any applications, preferably freeware, that can take a database configuration, and, with as little hassle as possible, create web forms for inserting data easily. I'm finding it hard to express exactly what it is I'm after. Maybe I can talk a bit ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I add records to a DataGridView in VB.Net? How do I add new record to DataGridView control in VB.Net? I don't use dataset or database binding. I have a small form with 3 fields and when the user clicks OK they should be added to the DataGridView control as a new row. A: If you want to add the row to the end ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: how to watch a File System for change I'm doing a project in a course at my university on distributed systems. I'm planning on creating something similar to Dropbox ( getdropbox.com ), but with some sort of non-centralized peer-to-peer twist to it. For this i need some method of detecting change in a directory struc...
{ "language": "en", "url": "https://stackoverflow.com/questions/317571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Oracle - Select where field has lowercase characters I have a table, users, in an Oracle 9.2.0.6 database. Two of the fields are varchar - last_name and first_name. When rows are inserted into this table, the first name and last name fields are supposed to be in all upper case, but somehow some values in these two ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Looking for network link speed determination algorithm I'm looking for the best way to interpret the standard (well, standardish) Ethernet PHY registers, to determine the speed that an Ethernet link is actually running at. (e.g. 10/100/1000 and full/half-duplex) I daresay that this is to be found in the source of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/317580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CSS navigation? The navigation on the left menu in the below site uses CSS for mouseover links.PVH When I take the code of the navigation and make it separate page. Then the mouseover links are not working. What could be the reason? Test A: Probably... <script src="menu_1b.js" type="text/javascript"> </script> <scr...
{ "language": "en", "url": "https://stackoverflow.com/questions/317587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you iterate through custom keys in web.config? is it possible to create my own custom keys in the asp.net web.config file and iterate through them with C#? How do you do both (where do I put the key? what format?)? I have an application for an intranet that does certain things based upon the IP address of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Javascript access to spell checker on browsers Is it possible to get access to the spell checker that is incorporated in browsers for text areas from Javascript? I would like to be able to control spell checking from withing my code. Most browsers (apart from IE) seem to have some kind of a spell checker built in to...
{ "language": "en", "url": "https://stackoverflow.com/questions/317598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What is the best format to use when creating a mail list for use in a Word 2007? I'm writing a web app (Java) which allows users to select contacts. The contacts details can be downloaded (currently in CSV format) and used to perform a mail merge in Word 2007. I would like to use a format which is a bit more 'robust...
{ "language": "en", "url": "https://stackoverflow.com/questions/317602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mix of Arabic and English causes problems in JTextArea (Java) I have a JTextArea which displays HTML of an Arabic web page. So it's essentially a mix of English and Arabic. In the JTextArea, with columns set to 30, certain text just disappears instead of wrapping properly. The weird thing is that if I copy the invis...
{ "language": "en", "url": "https://stackoverflow.com/questions/317605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to do a WHERE...IN... clause in LinqToSql? How can I select multiple elements using a WHERE...IN... type of clause as in select * from orders where orderid in (1, 4, 5) in LinqToSql? I'd prefer not to have a lambda expression since they scare me. A: LINQ has "Contains" which is like "IN" but expressed the othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/317606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET MVC return a different view I have a view which contains a form, the form posts and the data gets processed etc, then I want to return the view Index, so return view("Index"); however this will then complain about my ViewData not existing, I get the feeling that the controller code under Index() isn't being ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: How can I assemble bits into a long to create a unique ID? I would like to write a utility that will provide me with a relatively unique ID in Java. Something pretty simple, like x bits from timestamp + y bits from random number. So, how would I implement the following method: long getUniqueID() { long timestam...
{ "language": "en", "url": "https://stackoverflow.com/questions/317617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What Are The Implications of Dropping Windows 98 Support? Up to now in my application, I've been supporting all flavors of Windows from Windows 98 to Windows NT/2000 to XP to Vista. But because of adding Unicode in my next version, support of Windows 98 would still be possible, but very difficult. I know there are s...
{ "language": "en", "url": "https://stackoverflow.com/questions/317618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is yield useful outside of LINQ? When ever I think I can use the yield keyword, I take a step back and look at how it will impact my project. I always end up returning a collection instead of yeilding because I feel the overhead of maintaining the state of the yeilding method doesn't buy me much. In almost all cases...
{ "language": "en", "url": "https://stackoverflow.com/questions/317619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: VB.NET Controls inside of a DataGridView Row on a Windows Form I have a ComboBox inside of a cell of a DataGridView Row on a Windows form. I need the following to happen: * *click on the ComboBox *pick a value *recalculate a total & display inside of a lable that is sitting outside of the DataGridView. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Most efficient algorithm for mesh-level, optimal occlusion culling? I am new to culling. On a first glance, it seems that most occlusion culling algorithms are object-level, not examining single meshes, which would be practical for game rendering. What I am looking for is an algorithm that culls all meshes within a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: phpmyadmin - save file to disk when i point my browser to http://localhost/phpmyadmin, instead of showing me its front page, it comes up with save as dialog. I'm running: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 Server I've reinstalled both apache2 and php5. After re-install i don't have httpd.conf file, how can i ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to centralize and secure connection strings? What is the best way to centralize and secure the connections strings used by applications? In my environment we have many internal applications. Each application requires one or more connection strings in order to access the database. We have a go...
{ "language": "en", "url": "https://stackoverflow.com/questions/317631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Silverlight: is there a way to allow a user to open a file from isolated storage? I'd like to allow a user to open files in their own client applications via Silverlight. I'd like this to work similarly to WebDAV, in the sense that they could read/write the file back into Silverlight's isolated storage... Is it poss...
{ "language": "en", "url": "https://stackoverflow.com/questions/317644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using the EstimatedSize value inside a program uninstall key to correctly display the program size in the Add/Remove Programs list I've attempted to use the EstimatedSize value during creation of an uninstaller registry key for an app I've developed, unfortunately the value I specify does not appear in the Add/Remov...
{ "language": "en", "url": "https://stackoverflow.com/questions/317647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Custom Controls with Blend I'm building custom control for my Silverlight 2 app. It's in one SL class project, and it contains two files: * *MyControl class, inherited from Control, with few DepedencyProperties *themes/generic.xaml, with visual elements (ControlTemplate), states for VSM and transitions I...
{ "language": "en", "url": "https://stackoverflow.com/questions/317648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to make svn diff produce file that patch would apply, when svn cp or svn mv was used? The scenario is: * *svn cp or mv some file *modify that file *svn diff > mypatch On other machine (same working copy, but no changes): *Try to apply mypatch. *Fail -> tries to modify unexistant file. How can I make ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: C#: Ask User for a Password which is then stored in a SecureString In the small application that I'm currently developing for a customer I need to ask the user for his windows login username, password and domain and then use those with System.Diagnostics.Process.Start to start an application. I have a textbox with U...
{ "language": "en", "url": "https://stackoverflow.com/questions/317652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: jQuery Cross-Browser Performance Issues I am wrapping up a project in which I used jQuery for the first time. I loved working with the library, and thought I understood one of the benefits was cross-browser compatibility. I had an unpleasant surprise waiting for me when I began testing the site in IE6 and IE7 becaus...
{ "language": "en", "url": "https://stackoverflow.com/questions/317676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does Visual Studio stall while debugging? Sometimes, while I am debugging a c# application, I will hit a break point and when I try to continue, step or step into, it just does nothing. The yellow line highlighting the current line goes away, but it never reaches the next line. The app is still frozen like I a...
{ "language": "en", "url": "https://stackoverflow.com/questions/317678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is preferred option for assignment and formatting? Which one is recommended considering readability, memory usage, other reasons? 1. String strSomething1 = someObject.getSomeProperties1(); strSomething1 = doSomeValidation(strSomething1); String strSomething2 = someObject.getSomeProperties2(); strSomething2 = d...
{ "language": "en", "url": "https://stackoverflow.com/questions/317679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Determining the results count of ViewData Hi I have a view with several User Controls and I pass ViewData to all of them, I would like to know how you would determine the element count by specifying the string key. I understand that you cannot use comparison to an integer because ViewData is an object but I have it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I inject a property value into a Spring Bean which was configured using annotations? I have a bunch of Spring beans which are picked up from the classpath via annotations, e.g. @Repository("personDao") public class PersonDaoImpl extends AbstractDaoImpl implements PersonDao { // Implementation omitted } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "307" }
Q: How to get position of element How can I retrieve the position of the current Para? <xsl:template match="Para"> <xsl:variable name="PositionInDocument" select="What do I do here?" /> </xsl:template> This is the xml document: <QuestionStem>Question </QuestionStem> <Para>This is my paragraph question.</Para> <Par...
{ "language": "en", "url": "https://stackoverflow.com/questions/317701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C++ Namespace question I am working on some code written by a co-worker who no longer works with the company, and I have found the following code: (which I have cut down below) namespace NsA { namespace NsB { namespace NsC { namespace { class A { /*etc*/ }; class B { /*etc*/ }; } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Is a dynamic sql stored procedure a bad thing for lots of records? I have a table with almost 800,000 records and I am currently using dynamic sql to generate the query on the back end. The front end is a search page which takes about 20 parameters and depending on if a parameter was chosen, it adds an " AND ..." t...
{ "language": "en", "url": "https://stackoverflow.com/questions/317725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: CUDA or FPGA for special purpose 3D graphics computations? I am developing a product with heavy 3D graphics computations, to a large extent closest point and range searches. Some hardware optimization would be useful. While I know little about this, my boss (who has no software experience) advocates FPGA (because it...
{ "language": "en", "url": "https://stackoverflow.com/questions/317731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: trying to capture javac output in bash shell I'm trying to redirect the java compiler output to a file. I thought it's supposed to be: javac file.java > log.txt or something. Instead, I see all the output on the terminal and nothing in log.txt! Also, if I want to log errors too, do I do javac file.java 2>&1 > log....
{ "language": "en", "url": "https://stackoverflow.com/questions/317733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Use Label or DrawString in UserControl I am writing my own control that will contain a panel with text, images and other media. What is the best way to render the text and images. The control may contain long texts and many images. Should I add the text as labels and images as PictureBox or should I use the DrawStri...
{ "language": "en", "url": "https://stackoverflow.com/questions/317736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: prolog recursively find largest node Just a simple binary tree and i want to find the the largest node. example tree: t(t(t(nil,1,nil),2,t(nil,3,nil)),4,t(t(t(nil,8,nil),5,nil),6,t(nil,7,nil))) int L(t,max) { if(t=null) return max; if(max<t.root) max = t.root; LN(t,max); RN(t,max); return max; } L(tree,tree.root); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I select the position of a following sibling I need to select the position of a following sibling via XSL. This is not working: <xsl:variable name="nextAnswerListItemPos" select="following-sibling::*[local-name() = 'AnswerListItem'][position()]" /> A: <xsl:variable name="nextAnswerListItemPos" select="count...
{ "language": "en", "url": "https://stackoverflow.com/questions/317741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SSRS report fit in PDF What is the best way to make the SSRS reporr fit in to PDF page. A: Next time please indicate what version of SSRS you are working with... If you are careful to design your canvas to certain constraints your should be fine. Typically the PDF is going to emulate a 8.5" by 11" piece of paper - ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Passing master page form data to another webform I have a master page with one form on it. It is a search form which must always be visible. When the button of that form is clicked I want the form data to be sent to search.aspx. The problem is, I don't know how. I cannot set the form action to search.aspx, because a...
{ "language": "en", "url": "https://stackoverflow.com/questions/317749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is the indexer on my .NET component not always accessible from VBScript? I have a .NET assembly which I am accessing from VBScript (classic ASP) via COM interop. One class has an indexer (a.k.a. default property) which I got working from VBScript by adding the following attribute to the indexer: [DispId(0)]. It ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to get Url Hash (#) from server side I know on client side (javascript) you can use windows.location.hash but could not find anyway to access from the server side. I'm using asp.net. A: [RFC 2396][1] section 4.1: When a URI reference is used to perform a retrieval action on the identified resource, the optiona...
{ "language": "en", "url": "https://stackoverflow.com/questions/317760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "143" }
Q: What is a cvs new-born file? I get this error during checkout: cvs checkout: warning: new-born file.java has disappeared cvs [checkout aborted]: cannot make directory : No such file or directory cvs status: cannot rewrite CVS/Entries.Backup: Permission denied I'm sure I have the proper permissions to this folder an...
{ "language": "en", "url": "https://stackoverflow.com/questions/317762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Synchronisable CRM System I need to develop a CRM system which will allow users to have a local copy of the DB which can then be synched with the main server system. The idea is that a sales team can travel to non-internet enabled areas and still operate with relatively up to date information and then synch up when ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MySQL efficient "select id else insert" query I have a MySQL table consisting of: CREATE TABLE `url_list` ( `id` int(10) unsigned NOT NULL auto_increment, `crc32` int(10) unsigned NOT NULL, `url` varchar(512) NOT NULL, PRIMARY KEY (`id`), KEY `crc32` (`crc32`) ); When inserting data into a related table ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to find words within a range in a TreeSet using regular expressions (java) I am iterating though a TreeSet and printing it out: while (it.hasNext()) { System.out.println(it.next()); } output: after explorers giant hoping internet into . . . virtual world However, I would like to only print out those strings...
{ "language": "en", "url": "https://stackoverflow.com/questions/317784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is SSL really worth it? I'm wondering if I should add an SSL layer between my server and client. I'm not handling any confidential data, but there is a very small chance someone might want to hack transmissions in order to gain intelligence (this is a game by the way). Now the amounts of data to be processed are con...
{ "language": "en", "url": "https://stackoverflow.com/questions/317788", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Reg-Free COM not working for me I am trying to see if Reg-Free COM is something we can use in our web application to ease deployment of legacy COM components. However, before I get onto looking into things like using it for Interop situations, I can't get a simple test to work. Here's what I have done :- 1) Create a...
{ "language": "en", "url": "https://stackoverflow.com/questions/317794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Win32: Write to file without buffering? I need to create a new file handle so that any write operations to that handle get written to disk immediately. Extra info: The handle will be the inherited STDOUT of a child process, so I need any output from that process to immediately be written to disk. Studying the Creat...
{ "language": "en", "url": "https://stackoverflow.com/questions/317801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: ASP.NET Session/Cache + multi-core processor server I have a multi-core server hosting my asp.net solution. In the past with dual-core, etc. you had to modify your app to NOT use in-proc session state, etc. Is this still the case if its a dual core? Also, does server cache play a part in this? I have had no issues...
{ "language": "en", "url": "https://stackoverflow.com/questions/317803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why are there no byte or short literals in Java? I can create a literal long by appending an L to the value; why can't I create a literal short or byte in some similar way? Why do I need to use an int literal with a cast? And if the answer is "Because there was no short literal in C", then why are there no short lit...
{ "language": "en", "url": "https://stackoverflow.com/questions/317816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Update with changing set value How can we write an update sql statement that would update records and the 'set' value changes every time? For example: If we have records like this SomeNumber SomeV CurCode WhatCodeShouldBe 200802754 432 B08 B09 200802754 432 B08 B09 200802754 432 B08 B09 200808388 714 64B C00 2008041...
{ "language": "en", "url": "https://stackoverflow.com/questions/317822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Type Conversion in C# I'm trying to make a generic method for type conversions which gets an object and the type of object to be cast. By using Convert.ChangeType() I can do what I want, but it takes too much time on run time. What is the best method to make a generic class like I want. My old code looks like that;...
{ "language": "en", "url": "https://stackoverflow.com/questions/317825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I tell if a variable in xslt is greater than another Each of these variables has an integer value. But this syntax is not valid for some reason: <xsl:when test="$nextAnswerListItemPos < $nextQuestionStemPos" > A: Also, in XSLT 2.0, you can use the operators "gt" (greater than), "lt" (less than), and "eq" (...
{ "language": "en", "url": "https://stackoverflow.com/questions/317828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: PHP equivalent of friend or internal Is there some equivalent of "friend" or "internal" in php? If not, is there any pattern to follow to achieve this behavior? Edit: Sorry, but standard Php isn't what I'm looking for. I'm looking for something along the lines of what ringmaster did. I have classes which are doing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: For Monitoring JVMs with JMX, is it better to use build your own tool or use something like JConsole I am currently tasked with developing a tool to use JMX to monitor JVMs for things like, but not limited too, memory usage, heap size, thread count. The desired tool is one that can display many graphs for each jvm ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I open a Finder sidebar folder via AppleScript? I have a bash script which will be run on a Mac via ssh. The script requires a particular network drive to already be mounted. On the Mac, I mount this drive by opening a folder "JPLemme" on that drive in Finder. This mounts the drive until the Mac goes to sleep...
{ "language": "en", "url": "https://stackoverflow.com/questions/317857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Collection type for representing a hierarchial structure in .Net 3.5 I been experimenting with the different methods for representing a hierarchical structures in memory that would allow for simple and efficient transversal both up and down to discover ancestor and descendant relationships. Does anyone have any sug...
{ "language": "en", "url": "https://stackoverflow.com/questions/317860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Polymorphic factory / getInstance() in Java I'm aiming to create a set of objects, each of which has a unique identifier. If an object already exists with that identifier, I want to use the existing object. Otherwise I want to create a new one. I'm trying not to use the word Singleton, because I know it's a dirty wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/317869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Existing LINQ extension method similar to Parallel.For? Possible Duplicate: LINQ equivalent of foreach for IEnumerable<T> The linq extension methods for ienumerable are very handy ... but not that useful if all you want to do is apply some computation to each item in the enumeration without returning anything. S...
{ "language": "en", "url": "https://stackoverflow.com/questions/317874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Crontab revision control? I've got a few dozen Linux machines running cron and I'd like to put the crontabs in some sort of revision control system. For source control I use Mercurial (hg), so that'd be ideal, but if there's some other system that is better suited to this task I'd consider it. One aspect which is s...
{ "language": "en", "url": "https://stackoverflow.com/questions/317878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Authentication Error when accessing Sharepoint list via web service I wrote a windows service a few months ago that would ping a Sharepoint list using _vti_bin/lists.asmx function GetListItemChanges. It was working fine until a few weeks ago when my company upgraded our Sharepoint instance to SP1. Now whenever my s...
{ "language": "en", "url": "https://stackoverflow.com/questions/317879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }