text
stringlengths
8
267k
meta
dict
Q: How can I clear event subscriptions in C#? Take the following C# class: c1 { event EventHandler someEvent; } If there are a lot of subscriptions to c1's someEvent event and I want to clear them all, what is the best way to achieve this? Also consider that subscriptions to this event could be/are lambdas/anonymous ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "151" }
Q: Can I assign a global hotkey to an Adobe AIR app? Is it possible to assign a global hotkey to a specific feature in an Adobe AIR app, i.e. the app feature responds to the hotkey whether the app is active or not (it must be running of course, but only in the system tray). A: I don't this it's possible with Adobe AIR...
{ "language": "en", "url": "https://stackoverflow.com/questions/153581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to iterate over a timespan after days, hours, weeks and months? How do I iterate over a timespan after days, hours, weeks or months? Something like: for date in foo(from_date, to_date, delta=HOURS): print date Where foo is a function, returning an iterator. I've been looking at the calendar module, but that...
{ "language": "en", "url": "https://stackoverflow.com/questions/153584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: SQL sub-query problem with grouping, average In MS Transact SQL, let's say I have a table (Orders) like this: Order Date Order Total Customer # 09/30/2008 8.00 1 09/15/2008 6.00 1 09/01/2008 9.50 1 09/01/2008 1.45 2 09/16/2008 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I determine the intersection point of two lines in GDI+? I'm using .NET to make an application with a drawing surface, similar to Visio. The UI connects two objects on the screen with Graphics.DrawLine. This simple implementation works fine, but as the surface gets more complex, I need a more robust way to re...
{ "language": "en", "url": "https://stackoverflow.com/questions/153592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Programmatically access a Microsoft Project (MPP) file from C# What are my options for programmatically accessing a Microsoft Project file? What are the pros and cons of each approach? I will basically need to import all data from the file into another data structure. Using the Office Interop assembies is low on the...
{ "language": "en", "url": "https://stackoverflow.com/questions/153593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Efficient way of logging to txt file from a console program What would be the most efficient way of recording to a log (.txt) from a console program on C# and .NET 2.2? My program loops multiple times always outputting different data based on what the user wants, so I'm searching for the most efficient way to achiev...
{ "language": "en", "url": "https://stackoverflow.com/questions/153596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Unknown Column In Where Clause I have a simple query: SELECT u_name AS user_name FROM users WHERE user_name = "john"; I get Unknown Column 'user_name' in where clause. Can I not refer to 'user_name' in other parts of the statement even after select 'u_name as user_name'? A: Your defined alias are not welcomed by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "149" }
Q: Create MSBuild custom task to modify C# code *before* compile I want to create a custom MSBuild task that changes my .cs files before they are compiled by csc.exe (but, of course, that doesn't modify them in place - I don't want actual source files touched). I am aware of PostSharp and other AOP frameworks for .NET...
{ "language": "en", "url": "https://stackoverflow.com/questions/153602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: MPI or Sockets? I'm working on a loosely coupled cluster for some data processing. The network code and processing code is in place, but we are evaluating different methodologies in our approach. Right now, as we should be, we are I/O bound on performance issues, and we're trying to decrease that bottleneck. Obvious...
{ "language": "en", "url": "https://stackoverflow.com/questions/153616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How can I write a scheduler application in .NET? How can I write a scheduler application in C# .NET? A: You could also try Quartz.Net. A: It all depends on your requirements: * *If you have access to a database you use a table as a queue and a service to poll the queue at regular intervals. *If your applicatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/153617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can you get the "real" HttpContext within an ASP.NET MVC application? Unfortunately, I need to do this. I'm using ELMAH for my error log. Before I route to my error.aspx view, I have to grab the default ELMAH error log so I can log the exception. You used to be able to use Elmah.ErrorLog.Default However, th...
{ "language": "en", "url": "https://stackoverflow.com/questions/153630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Natural Sort in MySQL Is there an elegant way to have performant, natural sorting in a MySQL database? For example if I have this data set: * *Final Fantasy *Final Fantasy 4 *Final Fantasy 10 *Final Fantasy 12 *Final Fantasy 12: Chains of Promathia *Final Fantasy Adventure *Final Fantasy Origins *Final Fan...
{ "language": "en", "url": "https://stackoverflow.com/questions/153633", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "97" }
Q: Updating UI After Asynchronous WebMethod Calls Greetings! I have a WebService that contains a WebMethod that does some work and returns a boolean value. The work that it does may or may not take some time, so I'd like to call it asynchronously. [WebService(Namespace = "http://tempuri.com/")] [WebServiceBinding(Conf...
{ "language": "en", "url": "https://stackoverflow.com/questions/153639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why do you need $ when accessing array and hash elements in Perl? Since arrays and hashes can only contain scalars in Perl, why do you have to use the $ to tell the interpreter that the value is a scalar when accessing array or hash elements? In other words, assuming you have an array @myarray and a hash %myhash, wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/153644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Automating Word Mailmerge not working as expected I'm having a problem with some mail merge code that is supposed to produce letters within our application. I'm aware that this code is a bit rough at the moment, but we're in the "Get something working" phase before we tidy it up. Now the way this is supposed to work...
{ "language": "en", "url": "https://stackoverflow.com/questions/153666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: GUIDs in a C++ Linux GCC app I've got a bunch of servers running this Linux app. I'd like for them to be able to generate a GUID with a low probability of collision. I'm sure I could just pull 128 bytes out of /dev/urandom and that would probably be fine, but is there a simple & easy way to generate a GUID that is...
{ "language": "en", "url": "https://stackoverflow.com/questions/153676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: 7-Zip (7za.dll) .NET wrapper Is there some code or a library that lets me control the 7-Zip unpacking functionality from C# code? A: There is a project on CodePlex, SevenZipSharp. I haven't tried it yet, but it looks promising.
{ "language": "en", "url": "https://stackoverflow.com/questions/153678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Managing Window Z-Order Like Photoshop CS So I've got an application whose window behavior I would like to behave more like Photoshop CS. In Photoshop CS, the document windows always stay behind the tool windows, but are still top level windows. For MDI child windows, since the document window is actually a child, y...
{ "language": "en", "url": "https://stackoverflow.com/questions/153685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Modelling Related Objects I'm designing an application which deals with two sets of data - Users and Areas. The data is read from files produced by a third party. I have a User class and an Area class, and the data is read into a Users array and an Areas array (or other appropriate memory structure, depending on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/153689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: change default collation in phpmyadmin It seems to me that phpMyAdmin imports tables by default with collation latin1_swedish_ci, how i change this? A: know this is an old post. But the way i changed the default charset through phpMyAdmin was: phpMyadmin main page > Variables tab (Server variables and settings) > s...
{ "language": "en", "url": "https://stackoverflow.com/questions/153706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Inheriting from protected classes in C+++ Suppose I have the following declaration: class Over1 { protected: class Under1 { }; }; I know that I could do the following: class Over2 : public Over1 { protected: class Under2 : public Under1 { }; }; But is there a way to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Creating music visualizer So how does someone create a music visualizer? I've looked on Google but I haven't really found anything that talks about the actual programming; mostly just links to plug-ins or visualizing applications. I use iTunes but I realize that I need Xcode to program for that (I'm currently deploy...
{ "language": "en", "url": "https://stackoverflow.com/questions/153712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Verify email in Java Is there any way to verify in Java code that an e-mail address is valid. By valid, I don't just mean that it's in the correct format (someone@domain.subdomain), but that's it's a real active e-mail address. I'm almost certain that there's no 100% reliable way to do this, because such a technique...
{ "language": "en", "url": "https://stackoverflow.com/questions/153716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: What alternatives are there to Google App Engine? What alternatives are there to GAE, given that I already have a good bit of code working that I would like to keep. In other words, I'm digging python. However, my use case is more of a low number of requests, higher CPU usage type use case, and I'm worried that I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: How to round a number to n decimal places in Java What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations. I also...
{ "language": "en", "url": "https://stackoverflow.com/questions/153724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1438" }
Q: Validation Block vs Nhibernate.Validator I am looking for validation framework and while I am already using NHibernate I am thinking of using NHibernate.validator from contrib project however I also look at MS Validation Block which seem to be robust but i am not yet get into detail of each one yet so I wonder has a...
{ "language": "en", "url": "https://stackoverflow.com/questions/153731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I break up high-cpu requests on Google App Engine? To give an example of the kind of request that I can't figure out what else to do for: The application is a bowling score/stat tracker. When someone enters their scores in advanced mode, a number of stats are calculated, as well as their score. The data is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are RFC's? I think there are a lot of people out there unaware of RFC's (Request for Comments). I know what they are at a logical level, but can anybody give a good description for a new developer? Also, sharing some resources on how to use and read them would be nice. A: From http://linux.about.com/cs/linux1...
{ "language": "en", "url": "https://stackoverflow.com/questions/153735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Vector and Layer Data Structure I'm working with some code that is confusing me and I'm wondering if I'm just not grokking the data structures. The data I'm working with utilizes vectors and layers. I believe a vector is just a row of data but I'm not sure. Any information you could provide or point me to about the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to inject Javascript in WebBrowser control? I've tried this: string newScript = textBox1.Text; HtmlElement head = browserCtrl.Document.GetElementsByTagName("head")[0]; HtmlElement scriptEl = browserCtrl.Document.CreateElement("script"); lblStatus.Text = scriptEl.GetType().ToString(); scriptEl.SetAttribute("type"...
{ "language": "en", "url": "https://stackoverflow.com/questions/153748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: jQuery Datepicker with text input that doesn't allow user input How do I use the jQuery Datepicker with a textbox input: $("#my_txtbox").datepicker({ // options }); that doesn't allow the user to input random text in the textbox. I want the Datepicker to pop up when the textbox gains focus or the user clicks on i...
{ "language": "en", "url": "https://stackoverflow.com/questions/153759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "146" }
Q: How do I convert an Illustrator file to a path for WPF Our graphics person uses Adobe Illustrator and we'd like to use her images inside our WPF application as paths. Is there a way to do this? A: You can go from AI to SVG to XAML. * *From Adobe Illustrator: File -> Save As -> *.SVG. * *SVG "Profile 1.1" see...
{ "language": "en", "url": "https://stackoverflow.com/questions/153762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to see the schema of a db2 table (file) As in subject... is there a way of looking at an empty table schema without inserting any rows and issuing a SELECT? A: SELECT * FROM SYSIBM.SYSCOLUMNS WHERE TBNAME = 'tablename'; A: Are you looking for DESCRIBE? db2 describe tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/153769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the preferred way to redirect a request in Pylons without losing form data? I'm trying to redirect/forward a Pylons request. The problem with using redirect_to is that form data gets dropped. I need to keep the POST form data intact as well as all request headers. Is there a simple way to do this? A: Rece...
{ "language": "en", "url": "https://stackoverflow.com/questions/153773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Wcf and Interfaces as Parameters i have a library with some entities that share the same interface. clients and service share this assembly. now i wonder if there is a way to have this Interface-type as Parameter in my service contracts so that i can use the same method for all classes implementing the interface. th...
{ "language": "en", "url": "https://stackoverflow.com/questions/153775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I call a javascript function from inside a method? I am inside of... public class bgchange : IMapServerDropDownBoxAction { void IServerAction.ServerAction(ToolbarItemInfo info) { Some code... and after "some code" I want to trigger [WebMethod] public static void DoSome() { } Which triggers so...
{ "language": "en", "url": "https://stackoverflow.com/questions/153776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: File Sharing API or Framework in OS X 10.5.* Is there any programming interface or CLI for changing network or file sharing settings in OS X Leopard? A: It is called dscl (Directory Service command line utility).
{ "language": "en", "url": "https://stackoverflow.com/questions/153781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Dropdown controls in ASP.NET 2.0 I am using a codebehind page in ASP.NET to perform a SQL query. The query is loaded into a string, the connection is established (To Oracle), and we get it started by having the connection perform .ExecuteReader into a OleDBDataReader (We'll call it DataRead). I'll try to hammer ou...
{ "language": "en", "url": "https://stackoverflow.com/questions/153782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Printing images on multi-page SSRS RDLC report does not work I am working on an application that loads a generic list of objects into an RDLC report, which is then rendered on the client machine using the WebForms ReportViewer Control. It renders fine and exports fine, but if I try to print it, it spools maybe 500k ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: From objects to tables using activerecord I'm getting some objects from an external library and I need to store those objects in a database. Is there a way to create the tables and relationships starting from the objects, or I have to dig into them and create migrations and models by hand? Thanks! Roberto A: Even i...
{ "language": "en", "url": "https://stackoverflow.com/questions/153795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Find controls on sharepoint master page I'm trying to loop through all the controls on a sharepoint page, for the purposes of testing i just want to output the control ID this is the code i'm using Public Shared Sub SubstituteValues3(ByVal CurrentPage As Page, ByRef s As StringBuilder) 'Page() '- MasterPage ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Concatenate RTF files in PHP (REGEX) I've got a script that takes a user uploaded RTF document and merges in some person data into the letter (name, address, etc), and does this for multiple people. I merge the letter contents, then combine that with the next merge letter contents, for all people records. Affectivel...
{ "language": "en", "url": "https://stackoverflow.com/questions/153801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Last Modified of Folders How does Windows determine the last modified date of a folder? A: According to MSDN, the last modification timestamp is stored per directory: * *If you create two new folders on an NTFS partition called D:\NTFS1 and D:\NTFS2, both the created and modified date and time are the same. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Subversion - is trunk really the best place for the main development? In SVN, trunk is the recommended place for the main development and I use this convention for all of my projects. However, this means that trunk is sometimes unstable, or even broken. This happens for instance when * *I commit something by mist...
{ "language": "en", "url": "https://stackoverflow.com/questions/153812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How should I store a GUID in Oracle? I am coming from the SQL server world where we had uniqueidentifier. Is there an equivalent in oracle? This column will be frequently queried so performance is the key. I am generating the GUID in .Net and will be passing it to Oracle. For a couple reasons it cannot be generated ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: How can I apply mathematical function to MySQL query? I've got the following query to determine how many votes a story has received: SELECT s_id, s_title, s_time, (s_time-now()) AS s_timediff, ( (SELECT COUNT(*) FROM s_ups WHERE stories.q_id=s_ups.s_id) - (SELECT COUNT(*) FROM s_downs WHERE stories.s_id=s_downs....
{ "language": "en", "url": "https://stackoverflow.com/questions/153825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What do you use for validation against XML schema? When I want to validate my XML docuemnts against a schema in my server-side Java, I use the built-in JRE Xerces implementation and javax.xml.validation.Schema. It works fine, but when validation fails, Xerces gives error messages that are very close to useless, for...
{ "language": "en", "url": "https://stackoverflow.com/questions/153835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Saving MFC Model as SQLite database I am playing with a CAD application using MFC. I was thinking it would be nice to save the document (model) as an SQLite database. Advantages: * *I avoid file format changes (SQLite takes care of that) *Free query engine *Undo stack is simplified (table name, column name, new...
{ "language": "en", "url": "https://stackoverflow.com/questions/153838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WCF is not binding to the correct IP address We have a WCF service deployed on a Windows 2003 server that is exhibiting some problems. The configuration is using wsHttpBinding and we are specifying the IP address. The services is being hosted by a Windows Service. When we start the service up, most of the time it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: [] brackets in sql statements What do the brackets do in a sql statement? For example, in the statement: insert into table1 ([columnname1], columnname2) values (val1, val2) Also, what does it do if the table name is in brackets? A: They are meant to escape reserved keywords or invalid column identifiers. CREATE T...
{ "language": "en", "url": "https://stackoverflow.com/questions/153861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How should I split large and bloated classes into smaller ones? I have a large 'Manager' class which I think is doing too much but I am unsure on how to divide it into more logical units. Generally speaking the class basically consists of the following methods: class FooBarManager { GetFooEntities(); AddFooEnt...
{ "language": "en", "url": "https://stackoverflow.com/questions/153863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is a Pointer? See: Understanding Pointers In many C flavoured languages, and some older languages like Fortran, one can use Pointers. As someone who has only really programmed in basic, javascript, and actionscript, can you explain to me what a Pointer is, and what it is most useful for? Thanks! A: This wikip...
{ "language": "en", "url": "https://stackoverflow.com/questions/153874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is the difference between ManualResetEvent and AutoResetEvent in .NET? I have read the documentation on this and I think I understand. An AutoResetEvent resets when the code passes through event.WaitOne(), but a ManualResetEvent does not. Is this correct? A: Yes. It's like the difference between a tollbooth an...
{ "language": "en", "url": "https://stackoverflow.com/questions/153877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "575" }
Q: How do I add a multiline REG_SZ string to the registry from the command line? As part of a build setup on a windows machine I need to add a registry entry and I'd like to do it from a simple batch file. The entry is for a third party app so the format is fixed. The entry takes the form of a REG_SZ string but needs t...
{ "language": "en", "url": "https://stackoverflow.com/questions/153879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: When would you NOT want to use memcached in a Ruby on Rails app? Assuming a MySQL datastore, when would you NOT want to use memcached in a Ruby on Rails app? A: Memcache is a strong distributed cache, but isn't any faster than local caching for some content. Caching should allow you to avoid bottlenecks, which is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Printing leading 0's in C I'm trying to find a good way to print leading 0, such as 01001 for a ZIP Code. While the number would be stored as 1001, what is a good way to do it? I thought of using either case statements or if to figure out how many digits the number is and then convert it to an char array with extra ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "401" }
Q: Why is my JavaScript function sometimes "not defined"? I call my JavaScript function. Why do I sometimes get the error 'myFunction is not defined' when it is defined? For example. I'll occasionally get 'copyArray is not defined' even in this example: function copyArray( pa ) { var la = []; for (var i=0; i < ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: How to get list of keys from ASP.NET session state backed by SQL server? I'm looking for a good way to visualize ASP.NET session state data stored in SQL server, preferably without creating a throwaway .aspx page. Is there a good way to get a list of the keys (and serialized data, if possible) directly from SQL serv...
{ "language": "en", "url": "https://stackoverflow.com/questions/153912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: php + unixODBC + DB2 + DESCRIBE = token not valid? Code I am trying to run: $query = "DESCRIBE TABLE TABLENAME"; $result = odbc_exec($h, $query); The result: PHP Warning: odbc_exec(): SQL error: [unixODBC][IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0104 - Token TABLENAME was not valid. Valid tokens: INTO., S...
{ "language": "en", "url": "https://stackoverflow.com/questions/153920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can I see TFS file history with labels? We currently are using both Visual Source Safe and Team Foundation Server at work (VSS for old projects, TFS for current or new projects). We have always used Labels in source control for each build. In VSS if you chose to see a file history you could include labels. In TFS ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: How do I reference the calling dom element in a jquery ajax success function? I'm trying to modify the class of an element if an ajax call based on that element is successful <script type='text/javascript'> $("#a.toggle").click(function(e){ $.ajax({ url: '/changeItem.php', dataType: 'json', ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What causes Visual Studio 2008 SP1 to crash when switch to Design View of a WPF application After developing a WPF application without Source Control, I decided to add the solution to TFS. After doing so whenever I opened the main window.xaml file in Design View Visual Studio would disappear and the following event ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Is SQL syntax case sensitive? Is SQL case sensitive? I've used MySQL and SQL Server which both seem to be case insensitive. Is this always the case? Does the standard define case-sensitivity? A: No. MySQL is not case sensitive, and neither is the SQL standard. It's just common practice to write the commands uppe...
{ "language": "en", "url": "https://stackoverflow.com/questions/153944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "228" }
Q: Open source .net windows form based controls like: gantt chart, calendar and scheduler Is there any open source or free .net ui toolkit containing at least one of the following controls: *gantt chart (ms project like) *calendar (google calendar like or ms outlook 2003, 2007 like) *scheduler (outlook 2007 like) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: GLIBC: debugging memory leaks: how to interpret output of mtrace() I’m trying to debug a memory leak problem. I’m using mtrace() to get a malloc/free/realloc trace. I’ve ran my prog and have now a huge log file. So far so good. But I have problems interpreting the file. Look at these lines: @ /usr/java/ibm-java2-x86...
{ "language": "en", "url": "https://stackoverflow.com/questions/153953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Python GUI Application redistribution I need to develop a small-medium sized desktop GUI application, preferably with Python as a language of choice because of time constraints. What GUI library choices do I have which allow me to redistribute my application standalone, assuming that the users don't have a working P...
{ "language": "en", "url": "https://stackoverflow.com/questions/153956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Viewing a MOSS 2007 page as another user would see it - without logging in as that user In Moss 2007 you have the ability to set the target audience for each individual web part within a page. Is there a way to preview how the page will look to another user without logging in as that user? What I am looking for is...
{ "language": "en", "url": "https://stackoverflow.com/questions/153961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Encapsulating an algorithm into a class I'm wondering how (un)common it is to encapsulate an algorithm into a class? More concretely, instead of having a number of separate functions that forward common parameters between each other: void f(int common1, int param1, int *out1); void g(int common1, int common2, int pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/153974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Creating an instance of a nested Java class in ColdFusion I’m trying to create an instance of: java.awt.geom.Point2D.Double in ColdFusion. Point2D.Double is a nested class inside of the abstract class Point2D. I have tried to instantiate the class using: <cfset PointClass = createObject("java", "java.awt.geom.Point...
{ "language": "en", "url": "https://stackoverflow.com/questions/153975", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Are there any better command prompts for Windows? For some reason the Windows command prompt is "special" in that you have to go to a properties dialog to resize it horizontally rather than just dragging the corner of the window like every other app. Unsurprisingly this feature made it into P-P-P-Powershell as well ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How can I copy data records between two instances of an SQLServer database I need to copy some records from our SQLServer 2005 test server to our live server. It's a flat lookup table, so no foreign keys or other referential integrity to worry about. I could key-in the records again on the live server, but this is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: How do I get the scroll position / range from a wx.TextCtrl control in wxPython I have a little logging app (written in wxPython) that receives data from a bit of kit we're developing, and I want to display the text in a scrolling window. As it stands I'm using a wx.TextCtrl for the text display, but I'm having some...
{ "language": "en", "url": "https://stackoverflow.com/questions/153989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Generic type args which specificy the extending class? I want to have a class which implements an interface, which specifies the specific subclass as a parameter. public abstract Task implements TaskStatus<Task> { TaskStatus<T> listener; protected complete() { // ugly, unsafe cast callback.complete(...
{ "language": "en", "url": "https://stackoverflow.com/questions/153994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Respecting XP themes when designing WinForms UI How do you deal with the different XP themes when designing a WinForms UI? Do you avoid hard coded color values or just accept that your UI will not look good on non standard themes? For instance, I have a light blue gradient panel that looks good against the standard ...
{ "language": "en", "url": "https://stackoverflow.com/questions/153996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Passing in a text to a javascript function that may have a single quote I have a link that I dynamically create which looks something like the following: <a onclick="Edit('value from a text column here')" href="javascript:void(null);">Edit</a> with the Edit function then taking the passed in value and putting it in...
{ "language": "en", "url": "https://stackoverflow.com/questions/154004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to show article link and sub-feed link in an RSS feed? I'm working on some RSS feeds for a custom task system we have. The main feed will show a list of tasks assigned to the current user. The link attribute for each task returned points to the web page for that task. However, tasks themselves have an RSS fee...
{ "language": "en", "url": "https://stackoverflow.com/questions/154008", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why won't Django auto-escape my A: You need to mark the values as | safe I think (I'm guessing that you're filling in the value from the database here(?)): {{ value|safe }} Could you post a sample of the template? Might make it easier to see what's wrong [Edit] ..or are you saying that you want it to escape the va...
{ "language": "en", "url": "https://stackoverflow.com/questions/154013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .NET equivalent to Java thread groups? I'm trying to monitor the states of a group of threads in a Microsoft.NET application written in C#. I'd like to be able to also monitor any child threads spawned by the original threads. In Java, you can assign threads to a thread group, and their children will also belong to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/154016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: In a java regex, how can I get a character class e.g. [a-z] to match a - minus sign? Pattern pattern = Pattern.compile("^[a-z]+$"); String string = "abc-def"; assertTrue( pattern.matcher(string).matches() ); // obviously fails Is it possible to have the character class match a "-" ? A: Escape the minus sign [a-z\\...
{ "language": "en", "url": "https://stackoverflow.com/questions/154031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to turn on FastParse option in SSIS? The book that I purchased to help with my SSIS understanding seems to have glossed over this, and I wanted to know exactly what is the method to turn on FastParse in SSIS? A: To set fast parse (from here) * *Right-click the Flat File source or Data Conversion transformati...
{ "language": "en", "url": "https://stackoverflow.com/questions/154041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Spring-MVC Problem using @Controller on controller implementing an interface I'm using spring 2.5 and annotations to configure my spring-mvc web context. Unfortunately, I am unable to get the following to work. I'm not sure if this is a bug (seems like it) or if there is a basic misunderstanding on how the annotat...
{ "language": "en", "url": "https://stackoverflow.com/questions/154042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How do I check for an empty/undefined/null string in JavaScript? Is there a string.Empty in JavaScript, or is it just a case of checking for ""? A: All these answers are nice. But I cannot be sure that variable is a string, doesn't contain only spaces (this is important for me), and can contain '0' (string). My ver...
{ "language": "en", "url": "https://stackoverflow.com/questions/154059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3823" }
Q: Overriding namespaces in gSOAP I am using gSOAP as a Web Service toolkit and have generated the stub and proxy classes through soapcpp2 from multiple WSDLs all at once. Thus all the namespace bindings are in a single .nsmap file. Now the problem is that all the namespace bindings are being sent with all the metho...
{ "language": "en", "url": "https://stackoverflow.com/questions/154060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to filter a report object when saving through FileDialog in MS Access I am attempting to save an rtf file using FileDialog and would like to filter using a where clause. This is what I have: Set dlgSave = FileDialog(msoFileDialogSaveAs) With dlgSave .Title = "Provide the place to save this file" .ButtonName ...
{ "language": "en", "url": "https://stackoverflow.com/questions/154064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using the "start" command with parameters passed to the started program I have a Virtual Machine in Virtual PC 2007. To start it from the desktop, I have the following command in a batch file: "c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc "MY-PC" -launch But that leaves a dos prompt on the host machine...
{ "language": "en", "url": "https://stackoverflow.com/questions/154075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "255" }
Q: Why do my files need dos2unix? only in eclipse though When I open a file in eclipse it shows with the improper line spacing showing an extra line break between every line. When I open the file with notepad or wordpad it doesn't show these extra line breaks that only eclipse shows. How do I get eclipse to read these ...
{ "language": "en", "url": "https://stackoverflow.com/questions/154078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the formula for alpha blending for a number of pixels? I have a number of RGBA pixels, each of them has an alpha component. So I have a list of pixels: (p0 p1 p2 p3 p4 ... pn) where p_0_ is the front pixel and p_n_ is the farthest (at the back). The last (or any) pixel is not necessary opaque, so the resulti...
{ "language": "en", "url": "https://stackoverflow.com/questions/154079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Mute Windows Volume using C# Anyone know how to programmatically mute the Windows XP Volume using C#? A: What you can use for Windows Vista/7 and probably 8 too: You can use NAudio. Download the latest version. Extract the DLLs and reference the DLL NAudio in your C# project. Then add the following code to iterate ...
{ "language": "en", "url": "https://stackoverflow.com/questions/154089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What's in your .emacs? I've switched computers a few times recently, and somewhere along the way I lost my .emacs. I'm trying to build it up again, but while I'm at it, I thought I'd pick up other good configurations that other people use. So, if you use Emacs, what's in your .emacs? Mine is pretty barren right now...
{ "language": "en", "url": "https://stackoverflow.com/questions/154097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Sharing application preferences across multiple projects We have a fairly large .NET solution with multiple executable projects (winforms and command line programs). Currently each of these projects has its own app.config that contains connection strings, mail server settings and the like. As you can imagine it's no...
{ "language": "en", "url": "https://stackoverflow.com/questions/154101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Custom Compiler Warnings When using the ObsoleteAtribute in .Net it gives you compiler warnings telling you that the object/method/property is obsolete and somthing else should be used. I'm currently working on a project that requires a lot of refactoring an ex-employees code. I want to write a custom attribute that...
{ "language": "en", "url": "https://stackoverflow.com/questions/154109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "134" }
Q: C# Potential Interview Question…Too hard? Without running this code, identify which Foo method will be called: class A { public void Foo( int n ) { Console.WriteLine( "A::Foo" ); } } class B : A { /* note that A::Foo and B::Foo are not related at all */ public void Foo( double n ) { Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/154112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Can an ASP.NET ASPX Page be Processed From a Source that is not the File System? Is there a way to execute a full ASPX source file where the page source is from a string/database/resource and not a file on the file system? It's straightfoward to render dynamic content/images/etc using HTTP Handlers and Modules and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/154117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Got .PNG file. Want embeddded icon resource displayed as icon on form title bar This was an interview question. Given Visual Studio 2008 and an icon saved as a .PNG file, they required the image as an embedded resource and to be used as the icon within the title bar of a form. I'm looking for what would have been th...
{ "language": "en", "url": "https://stackoverflow.com/questions/154119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Typical pitfalls of cross-browser compatibility What are the most common browser compatibility issues across the major desktop browsers? No dups please. Up-vote problems you've run into. I'm hoping for the list to self-sort. "IE sux" is not a pitfall, but a call for down-vote. [Edit] Yes, I know it's a poll - I'm no...
{ "language": "en", "url": "https://stackoverflow.com/questions/154132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why use apparently meaningless do-while and if-else statements in macros? In many C/C++ macros I'm seeing the code of the macro wrapped in what seems like a meaningless do while loop. Here are examples. #define FOO(X) do { f(X); g(X); } while (0) #define FOO(X) if (1) { f(X); g(X); } else I can't see what the do w...
{ "language": "en", "url": "https://stackoverflow.com/questions/154136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "905" }
Q: Changing embedded google videos src I'm trying to recreate the functionality on Google Video where you can access certain parts of a video by putting #1h1m1m in the URL. So I have an embedded Google Video and links to the right that I want to link to at certain times in that video. I can do this with a page refresh ...
{ "language": "en", "url": "https://stackoverflow.com/questions/154148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Developer Machine Justification Looking for good techniques to justify "great than normal" machine for developers. The company I work for buys the same underpowered $500 dollar systems for everyone, and looking for ways to prove ROI or arguments to use. Sorry, I didn't say this in the initial question, the stack i...
{ "language": "en", "url": "https://stackoverflow.com/questions/154159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Detect virtualized OS from an application? I need to detect whether my application is running within a virtualized OS instance or not. I've found an article with some useful information on the topic. The same article appears in multiple places, I'm unsure of the original source. VMware implements a particular invali...
{ "language": "en", "url": "https://stackoverflow.com/questions/154163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }