text
stringlengths
8
267k
meta
dict
Q: Physics of a snooker game Anyone can point me to any info regarding physics of a snooker game, if possible more about the ball collisions? I would like to make a game and I need some help about the physics. A: There's a book online about this, "Amateur Physics for the Amateur Pool Player" by Ron Shepard (PDF Link) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why can't strings be mutable in Java and .NET? Why is it that they decided to make String immutable in Java and .NET (and some other languages)? Why didn't they make it mutable? A: String is not a primitive type, yet you normally want to use it with value semantics, i.e. like a value. A value is something you can t...
{ "language": "en", "url": "https://stackoverflow.com/questions/93091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "204" }
Q: Windsor Container: Registering things in Code vs Xml From what I've read about Windsor/Microkernel it is in theory possible to do everything that you can do using xml files with code. As a matter of fact - and please correct me if I'm wrong - it seems like the major contribution of the Windsor layer is to add xml ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is Object-Oriented Modeling different from Object-Oriented Programming? What is the difference between Object-Oriented Modeling and Object-Oriented Programming? I overheard a conversation on my subway train this morning and it seems that these things are different. Aren't they? A: Object-Oriented Modeling refers to...
{ "language": "en", "url": "https://stackoverflow.com/questions/93097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Handling the data in an IN clause, with SQL parameters? We all know that prepared statements are one of the best way of fending of SQL injection attacks. What is the best way of creating a prepared statement with an "IN" clause. Is there an easy way to do this with an unspecified number of values? Take the follow...
{ "language": "en", "url": "https://stackoverflow.com/questions/93100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What's the best way to determine if a character is a letter in VB6? Need a function that takes a character as a parameter and returns true if it is a letter. A: Seanyboy's IsCharAlphaA answer is close. The best method is to use the W version like so: Private Declare Function IsCharAlphaW Lib "user32" (ByVal cChar A...
{ "language": "en", "url": "https://stackoverflow.com/questions/93105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: MySQL Error 1153 - Got a packet bigger than 'max_allowed_packet' bytes I'm importing a MySQL dump and getting the following error. $ mysql foo < foo.sql ERROR 1153 (08S01) at line 96: Got a packet bigger than 'max_allowed_packet' bytes Apparently there are attachments in the database, which makes for very large in...
{ "language": "en", "url": "https://stackoverflow.com/questions/93128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "516" }
Q: How to design a rule engine? I'm supposed to create a simple rule engine in C#. Any leads on how I can proceed?. It's a minimalistic rule engine, and would use SQL server as the back end. Do we have any general blueprint or design patterns that generally apply to rule engines? What kind of .Net technologies can I us...
{ "language": "en", "url": "https://stackoverflow.com/questions/93147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: SQL Server post-join rowcount underestimate The Query Optimizer is estimating that the results of a join will have only one row, when the actual number of rows is 2000. This is causing later joins on the dataset to have an estimated result of one row, when some of them go as high as 30,000. With a count of 1, the QO...
{ "language": "en", "url": "https://stackoverflow.com/questions/93150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Easy way to set CurrentCulture for the entire application? In a .net 2 winforms application, what's a good way to set the culture for the entire application? Setting CurrentThread.CurrentCulture for every new thread is repetitive and error-prone. Ideally I'd like to set it when the app starts and forget about it. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/93153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to protect yourself against shell DLLs loaded into your process? When you use a standard Windows "file open" dialog using GetOpenFileName(), the shell will load various DLLs that it requires to display the file list, including custom ones. In my application, I found that the DLL that TortoiseCVS uses to draw ove...
{ "language": "en", "url": "https://stackoverflow.com/questions/93154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Editing Autogenerated DMBL file for WCF Service In our project we have a standard auto-generated designer.cs file, linked to a DBML file, that contains all our object classes that map onto our database tables. We want to pass these objects directly through a WCF Service and so they need decorating with the [DataCont...
{ "language": "en", "url": "https://stackoverflow.com/questions/93159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Obtaining client IP address in WCF 3.0 Apparently you can easily obtain a client IP address in WCF 3.5 but not in WCF 3.0. Anyone know how? A: It turns out you can, so long as (a) your service is being hosted in a Web Service (obviously) and (b) you enable AspNetCompatibility mode, as follows: <system.serviceM...
{ "language": "en", "url": "https://stackoverflow.com/questions/93162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: Non-breaking non-space in HTML I have a bowling web application that allows pretty detailed frame-by-frame information entry. One thing it allows is tracking which pins were knocked down on each ball. To display this information, I make it look like a rack of pins: o o o o o o o o o o Images are used to repr...
{ "language": "en", "url": "https://stackoverflow.com/questions/93171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Modifying JVM parameters at runtime Does someone know if it is possible to modify the JVM settings at runtime (e.g. -dname=value)? I need this little trick to run my Java stored procedure (oracle 10g). A: Assuming you mean system properties (-D...; -d picks data model) System.setProperty(...) may do what you want. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93177", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the difference between Subclipse Get Contents and Get Revision? When using the Eclipse->Team->Show History view, what's the difference between using Subclipse "Get Contents" and "Get Revision" options on a revision of a file? Is there any way to see what svn commands Subclipse is issuing behind the scenes? A...
{ "language": "en", "url": "https://stackoverflow.com/questions/93183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can I automatically 'Generate Scripts' in a SQL Server 2005 task? I'd like to automatically generate database scripts on a regular basis. Is this possible. A: To generate script for an object you have to pass up to six parameters: exec proc_genscript @ServerName = 'Server Name', @DBName = 'Database Name',...
{ "language": "en", "url": "https://stackoverflow.com/questions/93208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you mock params when testing a Rails model's setter? Given the code from the Complex Form part III how would you go about testing the virtual attribute? def new_task_attributes=(task_attributes) task_attributes.each do |attributes| tasks.build(attributes) end end I am currently trying to te...
{ "language": "en", "url": "https://stackoverflow.com/questions/93214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I find out what triggered the TRACKER_ID rule in spamassassin? I recently received an email from my girlfriend that spamassassin marked as spam, mostly because spamassassin detected a tracker ID... except there wasn't one. I'd like to know what triggered it, so that I can report a sensible bug. A: How abou...
{ "language": "en", "url": "https://stackoverflow.com/questions/93222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Debugging Eclipse Application Problem: Launches repeatedly I'm having a problem debugging an Eclipse Application from Eclipse. When I launch the Debug Configuration, the Eclipse Application starts up and then stops repeatedly. It shows the splash screen and then disappears. This is the farthest it gets before res...
{ "language": "en", "url": "https://stackoverflow.com/questions/93231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: A free tool to check C/C++ source code against a set of coding standards? It looks quite easy to find such a tool for Java (Checkstyle, JCSC), but I can't seem to find one for C/C++. I am not looking for a lint-like static code analyzer, I only would like to check against coding standards like variable naming, capit...
{ "language": "en", "url": "https://stackoverflow.com/questions/93260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "159" }
Q: In the COFF file format, what is the significance of the relocation information section? I am reading about COFF file formats, which is commonly used to create an executable file format (it has some variants also). While reading, I came across the relocation section of the format. How is this relocation section use...
{ "language": "en", "url": "https://stackoverflow.com/questions/93261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I drop a foreign key in SQL Server? I have created a foreign key (in SQL Server) by: alter table company add CountryID varchar(3); alter table company add constraint Company_CountryID_FK foreign key(CountryID) references Country; I then run this query: alter table company drop column CountryID; and I get t...
{ "language": "en", "url": "https://stackoverflow.com/questions/93264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "231" }
Q: Min-width in MSIE 6 What is the definitive way to mimic the CSS property min-width in Internet Explorer 6? Is it better not to try? A: foo { min-width: 100px } // for everyone * html foo { width: 100px } // just for IE (or serve a separate stylesheet to IE using conditional comments) A: You could use an ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/93274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What Does ActiveRecord::MultiparameterAssignmentErrors Mean? I have a rails form with a datetime_select field. When I try to submit the form, I get the following exception: ActiveRecord::MultiparameterAssignmentErrors in WidgetsController#update 1 error(s) on assignment of multiparameter attributes If it's a valid...
{ "language": "en", "url": "https://stackoverflow.com/questions/93277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to create a fast PHP library? For our online game, we have written tons of PHP classes and functions grouped by theme in files and then folders. In the end, we have now all our backend code (logic & DB access layers) in a set of files that we call libs and we include our libs in our GUI (web pages, presentation ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best Java Obfuscation Application For Size Reduction An important part of mobile development, especially when you are talking about mobile games, is dealing with the application size restrictions. Some devices enforce their own size limits, while all the carriers have their own size requirements for applications to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Stack overflow from .NET code in IIS, but not in Winforms So I have a nasty stack overflow I have been trying to track down / solve for the past 8 hours or so, and I'm at the point where i think i need advice. The details: Interestingly enough this code runs fine when called in the context of our regular winforms ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Newbie wants to create a PDF reader for ipod touch - what's the best approach? I want to make a small app that displays a PDF, presenting zoom-able single pages with a previous-next page function. A: Based on the gradually evolving Apple policy of rejecting application submissions that duplicate functionality alrea...
{ "language": "en", "url": "https://stackoverflow.com/questions/93297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Does IBM WebSphere MQ support a 64 bit client on windows? I'm porting a C++ 32 bit application to 64 bit on windows. The application is a client of IBM WebSphere MQ. It uses the MQ client API. Now, as the port progresses, I'm trying to find a 64 bit client. So far, no luck. Does anyone here happen to know if where I...
{ "language": "en", "url": "https://stackoverflow.com/questions/93313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I initialize Zend_Form_Element_Select with a config array? I tried: $form->addElement( 'select', 'salutation', array( 'required' => true, 'options' => array( 'Mr.' => 'Mr.', 'Mrs.' => 'Mrs.', 'Ms.' => 'Ms.', ), ) ); Then I print_r(...
{ "language": "en", "url": "https://stackoverflow.com/questions/93329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WSDL Generator for C# Does anyone know of a good tool to generate the WSDL for a service contract written in C# (i.e. set of methods that are tagged as "[OperationContract]" using WCF)? All the tools I've found work the other way around: create code stubs from a WSDL. I don't want to have to hand-jam a WSDL file. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Create many constrained, random permutation of a list I need to make a random list of permutations. The elements can be anything but assume that they are the integers 0 through x-1. I want to make y lists, each containing z elements. The rules are that no list may contain the same element twice and that over all ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I set a timeout against a BufferedReader based upon a URLConnection in Java? I want to read the contents of a URL but don't want to "hang" if the URL is unresponsive. I've created a BufferedReader using the URL... URL theURL = new URL(url); URLConnection urlConn = theURL.openConnection(); urlConn.setDoOutpu...
{ "language": "en", "url": "https://stackoverflow.com/questions/93357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Can I generate a Flex web and Air desktop app from the same source code? I'm new to Air. I've got an existing Flex 2 application which I'm considering bringing into Flexbuilder 3. My question is can I use the same base application (and source code) to make the Air version, or would I have to maintain to separate c...
{ "language": "en", "url": "https://stackoverflow.com/questions/93359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Can I serve a ClickOnce application with Apache? We're testing our ClickOnce deployed application internally on IIS (Internet Information Services), but we're wondering if we can deploy it to the wider internet using Apache on Linux so we can make use of our existing external website host. If so, is there anything e...
{ "language": "en", "url": "https://stackoverflow.com/questions/93361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: OSX Security Framework NameAndPassword sample application I am investigating security plugins using SFAuthorizationPluginView under Mac OSX and as a first step looking at the NameAndPassword sample application. The app builds OK but I cannot get it to authenticate. So does anyone have any experience of SFAuthorizati...
{ "language": "en", "url": "https://stackoverflow.com/questions/93387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: test attribute in JSTL tag I saw some code like the following in a JSP <c:if test="<%=request.isUserInRole(RoleEnum.USER.getCode())%>"> <li>user</li> </c:if> My confusion is over the "=" that appears in the value of the test attribute. My understanding was that anything included within <%= %> is printed to the...
{ "language": "en", "url": "https://stackoverflow.com/questions/93408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Maximizing an Emacs frame to just one monitor with elisp I use maxframe.el to maximize my Emacs frames. It works great on all three major platforms, except on my dual-head Mac setup (Macbook Pro 15-inch laptop with 23-inch monitor). When maximizing an Emacs frame, the frame expands to fill the width of both monitor...
{ "language": "en", "url": "https://stackoverflow.com/questions/93415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do you query object collections in Java (Criteria/SQL-like)? Suppose you have a collection of a few hundred in-memory objects and you need to query this List to return objects matching some SQL or Criteria like query. For example, you might have a List of Car objects and you want to return all cars made during t...
{ "language": "en", "url": "https://stackoverflow.com/questions/93417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Reading an ASCII file with FileChannel and ByteArrays I have the following code: String inputFile = "somefile.txt"; FileInputStream in = new FileInputStream(inputFile); FileChannel ch = in.getChannel(); ByteBuffer buf = ByteBuffer.allocateDirect(BUFSIZE); // BUFSIZE = 256 /*...
{ "language": "en", "url": "https://stackoverflow.com/questions/93423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Add RSS to any website? Is there any website/service which will enable me to add RSS subscription to any website? This is for my company I work. We have a website which displays company related news. These news are supplied by an external agency and they gets updated to our database automatically. Our website picks ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does AES (128 or 256) encryption expand the data? If so, by how much? I would like to add AES encryption to a software product, but am concerned by increasing the size of the data. I am guessing that the data does increase in size, and then I'll have to add a compression algorithm to compensate. A: AES does not exp...
{ "language": "en", "url": "https://stackoverflow.com/questions/93451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Assembly names and versions What is considered as best practice when it comes to assemblies and releases? I would like to be able to reference multiple versions of the same library - solution contains multiple projects that depend on different versions of a commonutils.dll library we build ourselves. As all dependen...
{ "language": "en", "url": "https://stackoverflow.com/questions/93455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Practical Alternative for Windows Scheduled Tasks (small shop) I work in a very small shop (2 people), and since I started a few months back we have been relying on Windows Scheduled tasks. Finally, I've decided I've had enough grief with some of its inabilities such as * *No logs that I can find except on a dom...
{ "language": "en", "url": "https://stackoverflow.com/questions/93460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: SQL Server Express DB is 'in recovery' - how to detect / know when it is when an SQL Server Express DB is 'in recovery', you are unable to connect using SQL Authentication. Is there a simple way of determining the stat of the DB prior to connecting to it? (Using .Net) A: SELECT DATABASEPROPERTYEX ('master', 'STATU...
{ "language": "en", "url": "https://stackoverflow.com/questions/93462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Call .NET objects/dlls across virtual sites Site 1 has dll's for x amount of object and data calls. Can Site 2 (a separate .net web app) call the objects/dll's of Site 1 ? A: This may be more semantics: You can't call an object of another process. You can however potentially instantiate a class within a dll as lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/93468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: DateTimePicker: pick both date and time Is it possible to use DateTimePicker (Winforms) to pick both date and time (in the dropdown)? How do you change the custom display of the picked value? Also, is it possible to enable the user to type the date/time manually? A: It is best to use two DateTimePickers for the Job...
{ "language": "en", "url": "https://stackoverflow.com/questions/93472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "159" }
Q: Classical ASP in IIS 6.0 not scaling The IIS 6.0 is serving my Classical ASP pages in a serial fashion (one at a time) The #2 request will be handled by the web server only when the #1 request ends. If the #1 request takes a little longer, the #2 request will have to wait for the #1 ends to starts being handled by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Persisting Checkbox State Across Postbacks I have a web form that binds a DataGrid to a, normally, different data source on each postback. I have a static CheckBox column that is always present to the left of the autogenerated columns. I achieve a TabControl effect with a horizontal Menu control above the grid, wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/93482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to verify existence of a table with a given ID in a word doc in C# VSTO 3 I want to check for the existence of a table with a given ID in a word document in C# (VS 2008) Visual Studio Tools for Office (version 3). Obviously I can iterate through the document's Tables collection and check every ID, but this seems...
{ "language": "en", "url": "https://stackoverflow.com/questions/93506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Counter inside xsl:for-each loop How to get a counter inside xsl:for-each loop that would reflect the number of current element processed. For example my source XML is <books> <book> <title>The Unbearable Lightness of Being </title> </book> <book> <title>Narcissus and Goldmund</title> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "95" }
Q: How can I add an HyperLink in TRichEdit using Delphi How can I add an HyperLink in a TRichEdit (using Delphi). I need to have something like: "This is my text, click here to do something." A: According to this article on delphi.about.com Unfortunately, Delphi's implementation of the RichEdit control leaves out a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is a Y-combinator? A Y-combinator is a computer science concept from the “functional” side of things. Most programmers don't know much at all about combinators, if they've even heard about them. * *What is a Y-combinator? *How do combinators work? *What are they good for? *Are they useful in procedural la...
{ "language": "en", "url": "https://stackoverflow.com/questions/93526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "432" }
Q: What is the difference between Views and Materialized Views in Oracle? What is the difference between Views and Materialized Views in Oracle? A: A view uses a query to pull data from the underlying tables. A materialized view is a table on disk that contains the result set of a query. Materialized views are primari...
{ "language": "en", "url": "https://stackoverflow.com/questions/93539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "419" }
Q: Baseline snaplines in custom Winforms controls I have a custom user control with a textbox on it and I'd like to expose the baseline (of the text in the textbox) snapline outside of the custom control. I know that you create a designer (inherited from ControlDesigner) and override SnapLines to get access to the sna...
{ "language": "en", "url": "https://stackoverflow.com/questions/93541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: How do you detect dialup, broadband or wireless Internet connections in C++ for Windows? I have an installation program (just a regular C++ MFC program, not Windows Installer based) that needs to set some registry values based on the type of Internet connection: broadband, dialup, and/or wireless. Right now this in...
{ "language": "en", "url": "https://stackoverflow.com/questions/93545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to encode the filename parameter of Content-Disposition header in HTTP? Web applications that want to force a resource to be downloaded rather than directly rendered in a Web browser issue a Content-Disposition header in the HTTP response of the form: Content-Disposition: attachment; filename=FILENAME The filena...
{ "language": "en", "url": "https://stackoverflow.com/questions/93551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "610" }
Q: Are POD types always aligned? For example, if I declare a long variable, can I assume it will always be aligned on a "sizeof(long)" boundary? Microsoft Visual C++ online help says so, but is it standard behavior? some more info: a. It is possible to explicitely create a misaligned integer (*bar): char foo[5] int * ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: symbian application as background process is it possible to create java application that will work as background process on symbian smartphones? A: You can approximate it but J2ME (the version of java on mobile phones) may not be the right technology to do this. * *starting a MIDlet (a Java application for mobil...
{ "language": "en", "url": "https://stackoverflow.com/questions/93570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Accessing a resource file from a filesystem plugin on SymbianOS I cannot use the Resource File API from within a file system plugin due to a PlatSec issue: *PlatSec* ERROR - Capability check failed - Can't load filesystemplugin.PXT because it links to bafl.dll which has the following capabilities missing: TCB My u...
{ "language": "en", "url": "https://stackoverflow.com/questions/93578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Want to write to a file, but may have potentially multiple writers at once, need to lock In a asp.net web application, I want to write to a file. This function will first get data from the database, and then write out the flat file. What can I do to make sure only 1 write occurs, and once the write occurrs, the oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/93583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is FileStream lazy-loaded in .NET? I have a question about using streams in .NET to load files from disk. I am trying to pinpoint a performance problem and want to be sure it's where I think it is. Dim provider1 As New MD5CryptoServiceProvider Dim stream1 As FileStream stream1 = New FileStream(FileName, FileMode.O...
{ "language": "en", "url": "https://stackoverflow.com/questions/93590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I use IntelliJ to auto-complete method parameters? A feature in Eclipse that I really miss is how you can auto-complete method parameters with currently in-scope variables. This feature will, with a single key combo (ctrl+space) fill in all method parameters. As long as my variables were named similarly to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: Do you generate code? If so, what do you use and what do you generate? I've used MyGeneration, and I love it for generating code that uses Data Access Applicaiton Blocks from Microsoft for my Data Access Layer, and keeping my database concepts in sync with the domain I am modeling. Although, it took a steeper than ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Floating div's in list items (ul, li) I have a list with two <div>s in every <li> and I want to float them one next to the other and I want the <li> to take the whole availabe space. How do I do it? <html> <head> <title></title> <style type="text/css"> body { } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CakePHP View including other views I have a CakePHP application that in some moment will show a view with product media (pictures or videos) I want to know if, there is someway to include another view that threats the video or threats the pictures, depending on a flag. I want to use those "small views" to several ot...
{ "language": "en", "url": "https://stackoverflow.com/questions/93632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How to determine WPF SelectedItem for a window I have a WPF app with many list based controls in a window, which all are bound to different CollectionViews. At the window level is there a way to get the current selected item for the currently in focus list based control? I know I can do this with some fairly trivia...
{ "language": "en", "url": "https://stackoverflow.com/questions/93638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do download accelerators work? We require all requests for downloads to have a valid login (non-http) and we generate transaction tickets for each download. If you were to go to one of the download links and attempt to "replay" the transaction, we use HTTP codes to forward you to get a new transaction ticket. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/93642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Apply stroke to a textblock in WPF How do you apply stroke (outline around text) to a textblock in xaml in WPF? A: Below is my more idiomatically WPF, full-featured take on this. It supports pretty much everything you'd expect, including: * *all font related properties including stretch and style *text alignmen...
{ "language": "en", "url": "https://stackoverflow.com/questions/93650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: Inserting a string of form "GUID1, GUID2, GUID3 ..." into an IN statement in TSQL I've got a stored procedure in my database, that looks like this ALTER PROCEDURE [dbo].[GetCountingAnalysisResults] @RespondentFilters varchar AS BEGIN @RespondentFilters = '''8ec94bed-fed6-4627-8d45-21619331d82a, 114c61f2-8935-4...
{ "language": "en", "url": "https://stackoverflow.com/questions/93653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a .NET/C# wrapper for SQLite? I'd sort of like to use SQLite from within C#.Net, but I can't seem to find an appropriate library. Is there one? An official one? Are there other ways to use SQLite than with a wrapper? A: I'd definitely go with System.Data.SQLite (as previously mentioned: http://sqlite.phxso...
{ "language": "en", "url": "https://stackoverflow.com/questions/93654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "271" }
Q: Stripping Invalid XML characters in Java I have an XML file that's the output from a database. I'm using the Java SAX parser to parse the XML and output it in a different format. The XML contains some invalid characters and the parser is throwing errors like 'Invalid Unicode character (0x5)' Is there a good way to...
{ "language": "en", "url": "https://stackoverflow.com/questions/93655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Any Yahoo YUI validation framework that I can implement in asp.net MVC? Has anyone seen a Yahoo YUI validation framework that I could implement into asp.net MVC? I've seen a jQuery one but I want to work wit YUI. A: It's not quite as spiffy (IMO) as jQuery, but here's a yazaar validation framework. A: It's worth ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: 7-Zip command-line switch Is there a 7-Zip command-line switch that prevents the filenames from echoing to the screen as they are added to the archive? A: Not built in, but if you add <7z command here> 2>&1 NUL to the end of your command-line, it will redirect all the output into the null device and stops it echo...
{ "language": "en", "url": "https://stackoverflow.com/questions/93672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Which Javascript engine would you embed in your application? I want to embed Javascript in a hobby game engine of mine. Now that we have the 5th generation of Javascript engines out (all blazing fast) I'm curious what engine would you choose to embed in a C++ framework (that includes actual ease of embeding it)? No...
{ "language": "en", "url": "https://stackoverflow.com/questions/93692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: Best cross-browser method to capture CTRL+S with JQuery? My users would like to be able to hit Ctrl+S to save a form. Is there a good cross-browser way of capturing the Ctrl+S key combination and submit my form? App is built on Drupal, so jQuery is available. A: I combined a few options to support FireFox, IE and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "175" }
Q: What is the .NET equivalent of PHP var_dump? I remember seeing a while ago that there is some method in maybe the Reflection namespace that would recursively run ToString() on all of an object's properties and format it nicely for display. Yes, I know everything I could want will be accessible through the debugger...
{ "language": "en", "url": "https://stackoverflow.com/questions/93699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How do I visualise clusters of users? I have an application in which users interact with each-other. I want to visualize these interactions so that I can determine whether clusters of users exist (within which interactions are more frequent). I've assigned a 2D point to each user (where each coordinate is between 0...
{ "language": "en", "url": "https://stackoverflow.com/questions/93705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to disable browser postback warning dialog I have an asp.net application that runs exclusively on IE7 (internal web site). When a user needs to enter data, I pop up a child window with a form. When the form closes, it calls javascript:window.opener.location.reload(true) so that the new data will display on the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/93708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the easiest non-memory intensive way to output XML from Python? Basically, something similar to System.Xml.XmlWriter - A streaming XML Writer that doesn't incur much of a memory overhead. So that rules out xml.dom and xml.dom.minidom. Suggestions? A: I think I have your poison : http://sourceforge.net/projec...
{ "language": "en", "url": "https://stackoverflow.com/questions/93710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Windows Form with Resizing Frame and no Title Bar? How can I hide the title bar from a Windows Form but still have a Resizing Frame? A: Set the ControlBox property of the form to False, and the Text property to empty string. The form will open with no perceivable (to the user) title bar, but they will be able to re...
{ "language": "en", "url": "https://stackoverflow.com/questions/93716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: UML aggregation when interfaces are used How do I represent an aggregation relation between two classes in UML, such that each class has a link to the other class's interface, not the implementing class? E.g. I have a class Foo that implements iFoo, and Bar that implements iBar. Foo should have a member variable of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I import eclipse JDT classes in a project I want to do the following imports in a class. import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.core.compiler.CharOperation; import org.eclipse.jdt.core.compiler.IProblem; import org.eclipse.jdt.internal.compiler.ClassFile; import org.eclipse.jdt.int...
{ "language": "en", "url": "https://stackoverflow.com/questions/93728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Get Accordian Selected Index in ASP.Net C# Im working on an ASP.Net app with c#. I am stuck on a problem with an accoridian. My accordian correctly displays data from a datasource which in this case in some text and then a list of images. On each accordians content there are the images to be displayed and then a bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/93743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Most common C# bitwise operations on enums For the life of me, I can't remember how to set, delete, toggle or test a bit in a bitfield. Either I'm unsure or I mix them up because I rarely need these. So a "bit-cheat-sheet" would be nice to have. For example: flags = flags | FlagsEnum.Bit4; // Set bit 4. or if ((f...
{ "language": "en", "url": "https://stackoverflow.com/questions/93744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "216" }
Q: Close mootools Rokbox through Javascript I am using the mootools based Rokbox plugin, on one of my sites, and I can't figure out how to close it with javascript. I triggered the click event on the close button, but that did not work. I found the code in the rokbox source that is used to add the click listener this.c...
{ "language": "en", "url": "https://stackoverflow.com/questions/93767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: EEFileLoadException when using C# classes in C++(win32 app) For deployment reasons, I am trying to use IJW to wrap a C# assembly in C++ instead of using a COM Callable Wrapper. I've done it on other projects, but on this one, I am getting an EEFileLoadException. Any help would be appreciated! Managed C++ wrapper ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Why is my programmatically created user missing from the Welcome screen? I have a program that creates a Windows user account using the NetUserAdd() API which is suggested by Microsoft. The user is created successfully, and I can log in as that user. However, on Windows XP, the newly-created user is missing from th...
{ "language": "en", "url": "https://stackoverflow.com/questions/93771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does the ActiveRecord pattern differ from the Domain Object or Data Mapper pattern? I was looking at DataMapper, which appeared at first glance to use the ActiveRecord ORM pattern. Other people said that it uses the DataMapper and/or the Domain Object pattern. What is the difference between those patterns? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: MySQL Trigger & Stored Procedure Replication Ok,I'm running a setup with a single master and a number of slaves. All writes go through the master and are replicated down to the slaves which are used strictly for reads. Now I have a stored procedure (not function) which is called by a trigger on an insert. According...
{ "language": "en", "url": "https://stackoverflow.com/questions/93790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Are there many users of PRADO out there? After making some comments, I've been inspired to get some feedback on the PHP MVC framework PRADO. I've been using it for over a year now and I've very much enjoyed working with it, however I notice that throughout Stack Overflow, it doesn't seem to rate a mention when symfo...
{ "language": "en", "url": "https://stackoverflow.com/questions/93791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Infragistics WebTextEdit - Setting value in Javascript function I'm currently using the Infragistics component set for .Net 2.0, Visual Studio 2005 and C#. I have the following chunk of javascript code (text and other variables are declared elsewhere): ***alert(box[select].value); text.value(box[select].value); ale...
{ "language": "en", "url": "https://stackoverflow.com/questions/93799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I maintain consistent DB schema accross 18 databases (sql server)? We have 18 databases that should have identical schemas, but don't. In certain scenarios, a table was added to one, but not the rest. Or, certain stored procedures were required in a handful of databases, but not the others. Or, our DBA fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/93804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: WinForm - draw resizing frame using a single-pixel border In a Windows Form with a Resizing Frame, the frame border draws with a raised 3-D look. I'd like it to draw with a flat single pixel border in a color of my choosing. Is this possible without having to owner draw the whole form? A: You could try something li...
{ "language": "en", "url": "https://stackoverflow.com/questions/93811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do you chat online for work purposes? I've worked with folks who are chatting online with their peers, constantly batting around ideas. I've also worked with folks who adamantly refuse and think it's a waste of time. Are online live chatting forums of particular use to you? Why or why not? Internal to your company,...
{ "language": "en", "url": "https://stackoverflow.com/questions/93816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: .NET Framework method to quickly build directories Is there a quick way to join paths like the Join-Path function in Powershell? For example, I have two parts of a path "C:\foo" and a subdirectory "bar". Join-Path will join these and take care of the backslash delimiters. Is there a built-in method for this in .N...
{ "language": "en", "url": "https://stackoverflow.com/questions/93821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does one load a URL from a .NET client application What is the preferred way to open a URL from a thick client application on Windows using C# and the .NET framework? I want it to use the default browser. A: The following code surely works: Process.Start("http://www.yoururl.com/Blah.aspx"); It opens the defau...
{ "language": "en", "url": "https://stackoverflow.com/questions/93832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When is multi-threading not a good idea? I was recently working on an application that sent and received messages over Ethernet and Serial. I was then tasked to add the monitoring of DIO discretes. I throught, "No reason to interrupt the main thread which is involved in message processing, I'll just create ...
{ "language": "en", "url": "https://stackoverflow.com/questions/93834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Bit manipulation and output in Java If you have binary strings (literally String objects that contain only 1's and 0's), how would you output them as bits into a file? This is for a text compressor I was working on; it's still bugging me, and it'd be nice to finally get it working. Thanks! A: Easiest is to simply t...
{ "language": "en", "url": "https://stackoverflow.com/questions/93839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }