text
stringlengths
8
267k
meta
dict
Q: How to get StructureMap to return a specific instance for a requested type I want to register a specific instance of an object for a type in structuremap, how can I do that? For example, When I do: var myObj = ObjectFactory.GetInstance(typeof(MyAbstractClass)); i would like it to return a previously constructed con...
{ "language": "en", "url": "https://stackoverflow.com/questions/372041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Difference between abstract class and interface in Python What is the difference between abstract class and interface in Python? A: What you'll see sometimes is the following: class Abstract1: """Some description that tells you it's abstract, often listing the methods you're expected to supply.""" def ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "631" }
Q: How can evaluate an expression stored as a string in F# I want to do something sort of like this: let x = 5 let y = 10 let expr = Console.ReadLine() expr Where one might type "x+y" in the console to store in expr. How does one evaluate a statement like this in F#? Ultimately, I want a user to be able to enter exp...
{ "language": "en", "url": "https://stackoverflow.com/questions/372043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to a write a Criteria query with multiple joins involved I'm trying to code the following HQL query using the Criteria API: var userList = _session .CreateQuery("select u from User u where u.Role.ID=3 and u.Customer.ID=:cID") .SetInt32("cID", 1) .List<User>(); (3 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Tables vs CSS for positioning and design Duplicate: Tables instead of DIVs and Why not use tables for layout in HTML? I am working on building a web app using ASP .NET MVC (needs to run on IE 7, FF 3.0), does it matter if I were to use tables rather than css for positioning and design? As a developer I haven't had...
{ "language": "en", "url": "https://stackoverflow.com/questions/372050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can anyone give me a little explanatory example about InsertOnSubmit and InsertAllOnSubmit I am trying to understand difference between those two and really need a explanatory simple example for them. Thanks in advance.. A: Theres a good Q&A about this on the MSDN forums. Most interesting bit: InsertAllOnSubmit() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Reliable way to see process-specific perf statistics on an IIS6 app pool In perfmon in Windows Server 2003, there are counter objects to get per-process processor time and memory working set statistics. The only problem is that in an environment with multiple application pools, there is no way to reliably identify t...
{ "language": "en", "url": "https://stackoverflow.com/questions/372080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: In SQL Server 2005, is there an easy way to "copy" permissions on an object from one user/role to another? I asked another question about roles and permissions, which mostly served to reveal my ignorance. One of the other outcomes was the advice that one should generally stay away from mucking with permissions for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Newbie issue with LINQ in vb.net Here is the single line from one of my functions to test if any objects in my array have a given property with a matching value Return ((From tag In DataCache.Tags Where (tag.FldTag = strtagname) Select tag).Count = 1) WHERE.... DataCache.Tags is an array of custom objects strtagna...
{ "language": "en", "url": "https://stackoverflow.com/questions/372087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Changing terminalinterface command after showing it on qt/kdelibs app I have this terminal on my qt/kde application KLibFactory* factory = KLibLoader::self()->factory("libkonsolepart"); KParts::Part* p = static_cast<KParts::Part*> (factory->create(this,"terminal",QStringList() << "terminal")); assert(p); TerminalInt...
{ "language": "en", "url": "https://stackoverflow.com/questions/372094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: UTF in Python Regex I'm aware that Python 3 fixes a lot of UTF issues, I am not however able to use Python 3, I am using 2.5.1 I'm trying to regex a document but the document has UTF hyphens in it – rather than -. Python can't match these and if I put them in the regex it throws a wobbly. How can I force Python to u...
{ "language": "en", "url": "https://stackoverflow.com/questions/372102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What's the point of strspn? At work today we were trying to come up with any reason you would use strspn. I searched google code to see if it's ever been implemented in a useful way and came up blank. I just can't imagine a situation in which I would really need to know the length of the first segment of a string th...
{ "language": "en", "url": "https://stackoverflow.com/questions/372105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Serializing objects as BLOBs in Oracle I have a HashMap that I am serializing and deserializing to an Oracle db, in a BLOB data type field. I want to perform a query, using this field. Example, the application will make a new HashMap, and have some key-value pairs. I want to query the db to see if a HashMap with th...
{ "language": "en", "url": "https://stackoverflow.com/questions/372114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best way to write a wrapper function that runs commands and logs their exit code I currently use this function to wrap executing commands and logging their execution, and return code, and exiting in case of a non-zero return code. However this is problematic as apparently, it does double interpolation, m...
{ "language": "en", "url": "https://stackoverflow.com/questions/372116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Why do you subdivide into maven-modules for in-house projects? We have this constant discussion in our project as to the granularity of our maven modules. We have come to agree that there may be differences in the needs of a framework (like spring) and an in-house application that is always deployed monolithically. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: T-SQL: Comparing Two Tables - Records that don't exist in second table If UNION ALL is an addition in T-SQL. What is the equivalent of subtraction? For example, if I have a table PEOPLE and a table EMPLOYEES. And I know if I remove EMPLOYEES records from PEOPLE I will be left with my companies CONTRACTORS. Is there...
{ "language": "en", "url": "https://stackoverflow.com/questions/372126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: C# COM DLL: do I use Regasm, or Regsvr32? I am building a C# ActiveX DLL... do I use REGASM or REGSVR32 to register it? How do I register the 64-bit interface vs the 32-bit interface? A: You need to use regasm.exe to register both the 32 bit and 64 bit interfaces I believe you need to run each of the regasm.exe's i...
{ "language": "en", "url": "https://stackoverflow.com/questions/372140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Regex to find an integer within a string I'd like to use regex with Java. What I want to do is find the first integer in a string. Example: String = "the 14 dogs ate 12 bones" Would return 14. String = "djakld;asjl14ajdka;sdj" Would also return 14. This is what I have so far. Pattern intsOnly = Pattern.compile("\...
{ "language": "en", "url": "https://stackoverflow.com/questions/372148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: IIS file download hangs/timeouts - sc-win32-status = 64 Any thoughts on why I might be getting tons of "hangs" when trying to download a file via HTTP, based on the following? * *Server is IIS 6 *File being downloaded is a binary file, rather than a web page *Several clients hang, including TrueUpdate and FlexN...
{ "language": "en", "url": "https://stackoverflow.com/questions/372149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: FindControl in a RoleGroup in a LoginView I can't seem to find a control in a login view. The aspx is: <asp:LoginView ID="SuperUserLV" runat="server"> <RoleGroups> <asp:RoleGroup Roles="SuperUser"> <ContentTemplate> <asp:CheckBox ID="Active" runa...
{ "language": "en", "url": "https://stackoverflow.com/questions/372158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Do you ever need to specify 'javascript:' in an onclick? AFAIK, you never need to specify the protocol in an onclick: onclick="javascript:myFunction()" Bad onclick="myFunction()" Good Today I noticed in this article on Google Anallytics that they are using it: <a href="http://www.example.com" onClick="javascript: pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/372159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Best way to redirect image requests to a different webserver? I am trying to reduce the load on my webservers by adding an "Image server" (a dedicated server for handling image requests), and redirecting all requests for .gif,.jpg,.png etc., to it. My question is, what is the best way to handle the redirection? * ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Any idea how to resolve a BDE error $251e? Here's the situation: A user of our program suddenly started receiving an error from the Borland Database Engine (BDE) when attempting to start the application. The error message says that it was unable to initialize the BDE and gives error code $251e. User is on BDE 5.2....
{ "language": "en", "url": "https://stackoverflow.com/questions/372175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Simple Active Record Implementation in .NET 2.0+ I'm looking for a very simple example of active record in .NET (code samples to be honest) A: David Hayden does such a good job explaining it that I wouldn't want to duplicate his work: * *Domain-Driven Design Using Active Record in .NET
{ "language": "en", "url": "https://stackoverflow.com/questions/372176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I read a "drive label" or "volume name" in .NET? Can you show sample code for reading a drive label or volume name in .NET? I get the sense this requires WMI, but I am loathe to "drop-down" into WMI because it is like dropping down into a string-based SQL query in the sense that certain objects may not exist...
{ "language": "en", "url": "https://stackoverflow.com/questions/372186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Best way for interprocess communication in C++ I have two processes one will query other for data.There will be huge amount of queries in a limited time (10000 per second) and data (>100 mb) will be transferred per second.Type of data will be an integral type(double,int) My question is in which way to connect this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Why in JavaScript is a function considered both a constructor and an object? I have been doing a lot of research on this lately, but have yet to get a really good solid answer. I read somewhere that a new Function() object is created when the JavaScript engine comes across a function statement, which would lead me t...
{ "language": "en", "url": "https://stackoverflow.com/questions/372202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Template Architecture with CGI I have a web page that needs to display a sqlite database. Right now i am creating the entire page dynamically through CGI. However, I would rather have one html file and just populate a table within the file with the database content. What is the best method to do that? I am limited t...
{ "language": "en", "url": "https://stackoverflow.com/questions/372203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Differences between Excel 2003 and 2007 from a VSTO perspective What are some of the major differences to be aware of when developing Addins or Document level customizations for excel 2003/2007? A: A couple items: VSTO 2SE - can be used for both Excel 2003 and Excel 2007 addins. (requires code-access security on i...
{ "language": "en", "url": "https://stackoverflow.com/questions/372217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Insert Subversion revision number in Xcode I would like to insert the current Subversion revision number (as reported by svnversion) into my Xcode project. I managed to insert the revision number into the Info.plist in the $PROJECT_DIR, but this is not a good solution, since the file is versioned. I tried to insert ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: .NET Processing spawning issues I have an executable that runs instantly from a command prompt, but does not appear to ever return when spawned using System.Diagnostics.Process: Basicly, I'm writing a .NET library wrapper around the Accurev CLI interface, so each method call spawns the CLI process to execute a comma...
{ "language": "en", "url": "https://stackoverflow.com/questions/372220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: div/CSS question regarding width and padding I'm having some trouble with this code: CSS: div#header { width: 100%; background-color: #252525; padding: 10px 0px 10px 15px; position: relative; } div#login { float: right; position: absolute; right: 10px; top: 5px; } HTML: <div id="he...
{ "language": "en", "url": "https://stackoverflow.com/questions/372224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Software to simplify displaying build status on a big visible monitor for team? I had a little bit of budget left at year end and I wanted to start a little skunk works project to display build status what everyone was working on (our team is aobut 10 folks all told). I am thinking to buy a 47" LCD HD TV and drive i...
{ "language": "en", "url": "https://stackoverflow.com/questions/372227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best practice for graceful replace of read-only SQL Server database I have a read-only database that has cached information which is used to display pages on the site. There are processes that run to generate the database, and those run on a different server. When I need to update the live database, I restore this d...
{ "language": "en", "url": "https://stackoverflow.com/questions/372230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Forcing a UNION on an OR for optimization in SQL Server 2000 How can I get a query which uses an OR in the WHERE clause to split itself into two queries with a UNION during compilation? If I manually rewrite it, the query using the UNION is 100x faster than the single query, because it can effectively use different...
{ "language": "en", "url": "https://stackoverflow.com/questions/372246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Generics, arrays, and the ClassCastException I think there must be something subtle going on here that I don't know about. Consider the following: public class Foo<T> { private T[] a = (T[]) new Object[5]; public Foo() { // Add some elements to a } public T[] getA() { return a; } } Suppose that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Best place to place Domain objects in an ASP.NET MVC App? I'm just starting my first project in ASP.NET MVC. In my webforms experience, I would usually have a separate project dedicated to my domain layer. In here, I would have my Domain specific objects along with my NHibernate mapping files and some business logic...
{ "language": "en", "url": "https://stackoverflow.com/questions/372254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Java passphrase encryption I'm trying to learn how to do passphrase-based encryption with Java. I'm finding several examples online, but none (yet) on Stack Overflow. The examples are a little light on explanation for me, particularly regarding algorithm selection. There seems to be a lot of passing strings aroun...
{ "language": "en", "url": "https://stackoverflow.com/questions/372268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Exception Handling in C#: Multple Try/Catches vs. One Is it good practice to have more than one try{} catch{} statement per method? A: If you know the type of Exceptions that could occur beforehand, you can have a single try and catch each of those exceptions, should you want to handle them differently. For exampl...
{ "language": "en", "url": "https://stackoverflow.com/questions/372282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I disable ms query's auto wrapping of column aliases with quotes in excel 2007? I'm working on a sheet that accesses a legacy data source via MS Query. I'm trying to alias some of the ridiculously ugly column names but the data source doesn't support wrapping alias names with quotes. Since excel is automatica...
{ "language": "en", "url": "https://stackoverflow.com/questions/372285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I turn off automatic updates in Aptana Studio for Eclipse? I installed Aptana Studio plugins for Eclipse and now Eclipse startup is slower than ever because Aptana Studio always checks for updates at startup -- and it's really slow! How do I turn off auto updates in Aptana? A: Window->Preferences, find the...
{ "language": "en", "url": "https://stackoverflow.com/questions/372287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can VS2008 Testrunner run MbUnit tests or not? Ok, so I keep seeing how VS2008 has this nice unit test display and I can see people running NUnit tests within it on Dimecasts.net and this article seems to imply that MbUnit v3 should have support for using visual studio's test runner. And yet I can't get it to recog...
{ "language": "en", "url": "https://stackoverflow.com/questions/372291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there a way to get notification of date change in c#? Is there a way to get notification of date change in c#? I have a requirement where I have to do something when the system date is changed. I found that SystemsEvent.TimeChanged is an event you can hook into, however it is only fired only when user has changed...
{ "language": "en", "url": "https://stackoverflow.com/questions/372309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Using OOP for combining lots of functions (sort of namespace) in PHP? I am working with PHP and I am wondering how bad practise it is to combine lots of functions into a class. I am aware of it's not the purpose of classes, but the reason why I would do this is to provide a namespace. How big impact does it make to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I get list of properties in an object in Actionscript? I have a dataprovider and a filterfunction for my array that's assigned to my dataprovider. How can I get a list of the properties that are in each row of the dataprovider (item.data) as it gets passed to the filterfunction? For instance, if my object co...
{ "language": "en", "url": "https://stackoverflow.com/questions/372317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Best practice for SVN tags? Should I use them as separate releases? Do I check them back into trunk or branches? Is this all in the red book and I've just wasted your time? A: Most people I know who are still on SVN tag their trunk (or current production branch) right before every release. A: I prefer following st...
{ "language": "en", "url": "https://stackoverflow.com/questions/372321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Radio buttons not checked in jQuery I have this line of code for page load: if ($("input").is(':checked')) { and it works fine when the radio button input is checked. However, I want the opposite. Something along the lines of if ($("input").not(.is(':checked'))) { so that my if statement runs when none of the r...
{ "language": "en", "url": "https://stackoverflow.com/questions/372325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: ASP.Net unable to see shared folder I've written a new application in a network I haven't worked in before, and am running into a problem. If I have the following C# code: FileStream fs = File.Create(@"\\MyServer\MyShare\testing.txt"); fs.Close(); In a console application, this code executes correctly. In an ASP.Ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/372326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ruby/Rails and Sharepoint Web Services I'm trying to consume Sharepoint webservices with ruby. I've basically given up trying to authenticate with NTLM and temporarily changed the Sharepoint server to use basic authentication. I've been successful getting a WSDL using soap4r but still cannot authenticate when atte...
{ "language": "en", "url": "https://stackoverflow.com/questions/372327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How would someone download a website from Google Cache? A friend accidentally deleted his forum database. Which wouldn't normally be a huge issue, except for the fact that he neglected to perform backups. 2 years of content is just plain gone. Obviously, he's learned his lesson. The good news, however, is that Googl...
{ "language": "en", "url": "https://stackoverflow.com/questions/372330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I find the primary key columns of a table using ado.net? Is there a pure .net way to do this reliably? The solutions I keep finding either require guessing or they have a solution that is specific to a database provider. Usually querying some internal system table to get this information. A: Each DataTable...
{ "language": "en", "url": "https://stackoverflow.com/questions/372334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Gadzooks! Architectures abound! Looking for an embedded processor/controller taxonomy I am looking for a taxonomy of embedded processors. Which processors belong to which families? Who decends from whom? Does anyone here know of a simple article that describes it? A: The Common Microcontrollers page on Wikipedia ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/372347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: String Immutability Does string immutability work by statement, or by strings within a statement? For example, I understand that the following code will allocate two strings on the heap. string s = "hello "; s += "world!"; "hello" will remain on the heap until garbage collected; and s now references "hello world!"...
{ "language": "en", "url": "https://stackoverflow.com/questions/372354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Merging vcproj files - SCM's hell Merging project/solution files is a well-known disaster among developers/SCM admins performing merges in their source control. Take, for example, a common scenario: development is done on a project/solution in two different branches. When time comes to merge back into a main develo...
{ "language": "en", "url": "https://stackoverflow.com/questions/372357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: .net 2.0 sp1 on Windows 98 I've been searching around for this and cannot seem to find a solid answer. I know the 2.0 version of the .net framework is supported in Windows98, but does that include SP1? A: It seems that the Microsoft .NET Framework Version 2.0 Redistributable Package (x86) supports Windows 98: Su...
{ "language": "en", "url": "https://stackoverflow.com/questions/372360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Set timeout for xmlrpclib.ServerProxy I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the r...
{ "language": "en", "url": "https://stackoverflow.com/questions/372365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How can I split a string into chunks of two characters each in Perl? How do I take a string in Perl and split it up into an array with entries two characters long each? I attempted this: @array = split(/../, $string); but did not get the expected results. Ultimately I want to turn something like this F53CBBA476 in...
{ "language": "en", "url": "https://stackoverflow.com/questions/372370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How to call extension methods using Eval in a databound control I have a simple extension method on the int type so I can do the following: string timeLength = 61.ToTime() // timeLength will be "1:01" This works great in code, but I want to use this extension method in a Repeater Template. When databinding I want t...
{ "language": "en", "url": "https://stackoverflow.com/questions/372382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: WCF Service in ASP.NET Compat Mode - What is the Simplest Way to Pass Username/Password I have a web service (WCF or ASMX doesn't matter)... I have made a Console application, right-clicked, added service referrence. So far, so good. However, I cannot for the life of me pass "security" credentials across to my servi...
{ "language": "en", "url": "https://stackoverflow.com/questions/372383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MySQL SELECT LAST_INSERT_ID() for compound key. Is it possible? Can I get the LAST INSERT ID() for a compound key in MySQL? A: Yes. You can't have multiple auto-increment fields in a single table. CREATE TABLE foo ( id1 int(11) NOT NULL auto_increment, id2 int(11) NOT NULL default '0', PRIMARY KEY (id1, id2...
{ "language": "en", "url": "https://stackoverflow.com/questions/372388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to automatically sort a QTreeWidget column? I'm using a QTreeWidget to display some simple items. I've set the list sortable by .setSortingEnabled(true) calling. In this way, the list is sorted only when the user press the title column, and not automatically whenever new item is inserted. Is there a way to force...
{ "language": "en", "url": "https://stackoverflow.com/questions/372391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Looking for a .NET "text" editor control My boss is looking for a .NET text control to build a custom editor on. Here’s what we need it to do: * *Supports embedded tables, with easily editing (like Word tables). *Supports different text styles (font, size, color, background, etc). *Ability to programmatically s...
{ "language": "en", "url": "https://stackoverflow.com/questions/372395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do you do many to many table outer joins? I have 3 tables, foo, foo2bar, and bar. foo2bar is a many to many map between foo and bar. Here are the contents. select * from foo +------+ | fid | +------+ | 1 | | 2 | | 3 | | 4 | +------+ select * from foo2bar +------+------+ | fid | bid | +------+--...
{ "language": "en", "url": "https://stackoverflow.com/questions/372399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Performance of dynamic SQL vs stored procedures on Oracle There's lots of information about how cached execution plans in SQL Server eliminate much if not most of the performance advantage of stored procedures over dynamic sql. However, I have not found much about whether the same is true for Oracle databases. Does ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Code is only executing in the debugger - MS Visual C# I'm using Microsoft Visual C# 2008 Express Edition. (And I apologize - this is more of a MS Vis C# usability question than a strict programming question...) I wrote a little program. when I run it in MS VC# with the debugger, all is well. When I use the "click...
{ "language": "en", "url": "https://stackoverflow.com/questions/372409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hitting a default RSS or ATOM Path from WCF, Client Only I'm trying to write a simple WCF Wrapper to load a SyndicationFeed as a client. Contract [ServiceContract] public interface IFeedService { [OperationContract] [WebGet(UriTemplate="")] SyndicationFeed GetFeed(); } Usage using (var cf = new WebChann...
{ "language": "en", "url": "https://stackoverflow.com/questions/372412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: c++ expected primary expression I'm working on a very simple game (essentially an ice sliding puzzle), for now the whole things in one file and the only level is completely blank of any form of obstacle. It throws up a few errors. My current annoyance is an expected primary expression error, can anyone tell me how t...
{ "language": "en", "url": "https://stackoverflow.com/questions/372428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery autocomplete - How to handle extra data? I'm struggling with the following problem. I use the jQuery autocomplete plugin to get a list of suggested values from the server. The list would look like this: Username1|UserId1 Username2|UserId2 So if I start typing "U", a list of "Username1" and "Username2" pops ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Set table cell color from database I'm overthinking this. I have colors stored in a database table, and I want to set the background of specific cells in a table to those colors. In other words: <table> <tr> <td ???set color here???> ...content... </td> <td ???next color here?...
{ "language": "en", "url": "https://stackoverflow.com/questions/372446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Header in gmail for thread hinting Is there a way to aid gmail in making threads? We are currently using same Subjects to do this, but that really uglyfies the subject a lot. A: There are a couple of mail headers that other mail clients use to help threading - not sure if gmail supports them. The first is the sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/372449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Populate a vector from integers in a char * char *values = " 3 1 4 15"; vector<int> array; I want to populate the array with the values, 3,1,4,15 Is there a slick way to do it with the stl copy algorithm? A: Indeed there is: std::istringstream iss(values); std::copy(std::istream_iterator<int>(iss), ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Reverse SSH tunnel monitor I've setup a reverse ssh tunnel, using PuTTY, to allow me to VNC into a home computer without having to enable NAT port forwarding. Works great, no problem. I would like to set the tunnel up as a "persistent service" that will connect on boot up and reconnect when dropped. PS. this is on...
{ "language": "en", "url": "https://stackoverflow.com/questions/372462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Protecting online static content How would I only allow users authenticated via Python code to access certain files on the server? For instance, say I have /static/book.txt which I want to protect. When a user accesses /some/path/that/validates/him, a Python script deems him worthy of accessing /static/book.txt and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Crystal Reports datasource in Visual Studio Using Visual Studio 2005 with default install of Crystal Reports. When I create a report, Crystal asks for the database, and I give it my development db. In the app, I create a DataTable and pass it to the report, which is then handed to the CR Viewer. At runtime, neither ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can entire page be developed out of ajax in asp.net 3.5? My requirement is to develop a page with 4 sections, which cannot have a postback. Section 1. Content which can be changed on user click Section 2. List of users viewing the page online (Auto update when user leaves or visits the page ) Section 3. Chat for th...
{ "language": "en", "url": "https://stackoverflow.com/questions/372475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I programmatically check memory use in a fairly portable way? (C/C++) I'm writing cross platform C++ code (Windows, Mac). Is there a way to check how much memory is in use by the current process? A very contrived snippet to illustrate: unsigned long m0 = GetMemoryInUse(); char *p = new char[ random_number ]; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How can I search Git branches for a file or directory? In Git, how could I search for a file or directory by path across a number of branches? I've written something in a branch, but I don't remember which one. Now I need to find it. Clarification: I'm looking for a file which I created on one of my branches. I'd...
{ "language": "en", "url": "https://stackoverflow.com/questions/372506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "417" }
Q: What is the object oriented programming computing overhead cost? I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine m...
{ "language": "en", "url": "https://stackoverflow.com/questions/372511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rhinomocks 3.5 for dummies...ie me I'm trying to use Rhinomocks 3.5 and the new lambda notation to mock some tests. I've read this, but have so many more questions. Are there any complete examples out there, especially for a MVC type of architecture? For example what is the best way to mock this. public voi...
{ "language": "en", "url": "https://stackoverflow.com/questions/372531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: UITextField in landscape orientation For the life of me I can't figure out how I'm supposed to set the UITextField to display the text vertically (landscape mode) instead of horizontally (portrait mode). The keyboard shows up properly, but when the keys are pressed the text is entered in the wrong orientation. Here ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ITextSharp and putting rich text in a specific position I have created a pdf document using Adobe LiveCycle. The problem I am facing is that I need to add some formatted text in a specific position on the document. How can I do that? overContent.BeginText(); overContent.SetTextMatrix(10, 400); overConten...
{ "language": "en", "url": "https://stackoverflow.com/questions/372542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where do Java and .NET string literals reside? A recent question about string literals in .NET caught my eye. I know that string literals are interned so that different strings with the same value refer to the same object. I also know that a string can be interned at runtime: string now = DateTime.Now.ToString().Int...
{ "language": "en", "url": "https://stackoverflow.com/questions/372547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: What specific features of LabVIEW are frustrating to you? Please bear with me: this isn't a language debate or a flame. It's a real request for opinions. Occasionally, I have to help educate a traditional text coder in how to think in LabVIEW (LV). Often during this process, I get to hear about how LV sucks. Rare...
{ "language": "en", "url": "https://stackoverflow.com/questions/372557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Server Side Cookie Injection I have an app that is a combination of asp/asp.net, and both sides depend on the same cookies (they are in the same domain). There are some values in the cookies that I don't want going to the client anymore due to security concerns. What I was hoping to accomplish is to take out these...
{ "language": "en", "url": "https://stackoverflow.com/questions/372561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Subversion protocol performance I'm just getting started/familar with Subversion and was wondering which protocol gives the best performance file:// or svn://, when accessing a Subversion repository over the network? If we don't use the svn:// protocol, will be missing out on any features that we couldn't mitgate u...
{ "language": "en", "url": "https://stackoverflow.com/questions/372569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to block the UI thread from another thread or force a form to run within the UI thread A requirement for my application is if it looses database connectivity then it must pop up a big modal "No Connection. Try again later" dialog blocking all user interaction until such time that connectivity is regained. I ach...
{ "language": "en", "url": "https://stackoverflow.com/questions/372572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How does one create a MarkupExtension with non-string parameters? I am working on a Custom MarkupExtension within a WPF application. Every documented example I have seen uses string parameters from XAML to construct the new object. Is it possible to use a non-string parameter? In other words, how can I do somethin...
{ "language": "en", "url": "https://stackoverflow.com/questions/372578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is "array" marked as a reserved word in Visual-C++? Visual Studio syntax highlighting colors this word blue as if it were a keyword or reserved word. I tried searching online for it but the word "array" throws the search off, I get mostly pages explaining what an array is. What is it used for? A: It's not a res...
{ "language": "en", "url": "https://stackoverflow.com/questions/372580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Trouble accessing MSWord ActiveDocument When I try to programmatically access a Word object model, I get an error saying no document is active. This appears to be because I am loading the document as not visible using Word automation, and I have to keep it invisible. How would I code the open macro so that it does ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Automated Exception Handling I was wondering if something exists (in Java world) able to take an snapshot of the JVM current state with the following features: * *Do it while an exception is being thrown. *Capture local variables, method's arguments, etc. *Put it in a handy file which can be used to extract or ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: C# DateTime: What "date" to use when I'm using just the "time"? I'm using a DateTime in C# to display times. What date portion does everyone use when constructing a time? E.g. the following is not valid because there is no zero-th month or zero-th day: // 4:37:58 PM DateTime time = new DateTime(0, 0, 0, 16, 47, 58);...
{ "language": "en", "url": "https://stackoverflow.com/questions/372601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: HTML Input Box - Disable what is the code to disable an INPUT text box for HTML? Thanks A: <input type="text" disabled="disabled" /> See the W3C HTML Specification on the input tag for more information. A: You can Use both disabled or readonly attribute of input . Using disable attribute will omit that value at ...
{ "language": "en", "url": "https://stackoverflow.com/questions/372604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: MDI Pros & Cons I have inherited a application framework from the previous developer where I now work. This framework utilizes multiple parent/child relationships. In many instances parent/parent/child occur. I asked why he WASN'T using MDI and he stated that years ago, when he had started, MDI had major shortcom...
{ "language": "en", "url": "https://stackoverflow.com/questions/372622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Pattern suggestions needed (Hibernate + Guice) I'm looking for suggestions on how to inject runtime dependencies into JPA entities retrieved from Hibernate. My problem is essentially this: I have a number of different subclasses of a Transaction object. Each Transaction subclass has different behavior when it is exe...
{ "language": "en", "url": "https://stackoverflow.com/questions/372631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Dynamically loading a class file with a non default package and no nested folders I am writing a curriculum project for students new to Java. It has a folder structure as so. myjar.jar solutions/my/really/long/package/MySolution.class I got it so the jar can load all classes in the solutions/my/really/long/package/...
{ "language": "en", "url": "https://stackoverflow.com/questions/372639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Problems importing SQL script from Oracle 9i to Oracle 10g express I am currently running into a problem when trying to import an Oracle 9i SQL script into my local Oracle 10g Express database. I am trying to import the DDL from the 9i database to the 10g express database. I keep getting "Not compatible - Your expor...
{ "language": "en", "url": "https://stackoverflow.com/questions/372643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the Ruby Gotchas a newbie should be warned about? I have recently learned the Ruby programming language, and all in all it is a good language. But I was quite surprised to see that it was not as simple as I had expected. More precisely, the "rule of least-surprise" did not seem very respected to me (of co...
{ "language": "en", "url": "https://stackoverflow.com/questions/372652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "109" }
Q: Using two css files in the same html file Is it possible to use 2 CSS classes that have the same name for the selectors, etc. in the same HTML file? If so, how do you differentiate between the two when styling elements? A: Yes this is possible, simply include two css files in the HEAD section of the document. Any s...
{ "language": "en", "url": "https://stackoverflow.com/questions/372655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Two 'self-updating' properties in WPF MVVM Considering you have an MVVM Architecture in WPF like Josh Smith's examples How would you implement two properties 'synced' that update eachother? I have a Price property, and a PriceVatInclusive property in my model. -When the Price changes, I want to see the Vat inclusiv...
{ "language": "en", "url": "https://stackoverflow.com/questions/372660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to implement paging using a HTML table? I have an html table which i bind data dynamically on the server side in C#.. The problem is that I have a search button that calls a search on the DB(in a search method on the server side) based on the information from the client page. this search method loads the info fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/372664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }