text
stringlengths
8
267k
meta
dict
Q: JAVA Swing GUI Components howto RTL view? How can i make my Java Swing GUI Components [Right To Left] for Arabic language from NetBeans Desktop Application? A: Don't you just have to use: Component.setComponentOrientation( ComponentOrientation.RIGHT_TO_LEFT ) I believe that the swing components all already have su...
{ "language": "en", "url": "https://stackoverflow.com/questions/354745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I get the number of records that reference a particular foreign key in Django? I'm working on a blog application in Django. Naturally, I have models set up such that there are Posts and Comments, and a particular Post may have many Comments; thus, Post is a ForeignKey in the Comments model. Given a Post obje...
{ "language": "en", "url": "https://stackoverflow.com/questions/354755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Common MySQL fields and their appropriate data types I am setting up a very small MySQL database that stores, first name, last name, email and phone number and am struggling to find the 'perfect' datatype for each field. I know there is no such thing as a perfect answer, but there must be some sort of common convent...
{ "language": "en", "url": "https://stackoverflow.com/questions/354763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "122" }
Q: Example sql for logging exceptions to database using exception handling application block Can anyone provide (or point me to) example sql code for logging exceptions using Enterprise Library Exception Handling Application Block (EHAB)? ie I'd like standard CREATE TABLE and CREATE PROCEDURE statements for the structu...
{ "language": "en", "url": "https://stackoverflow.com/questions/354764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Create a html wysiwyg editor for editing email templates The (web based) software I am working on needs a way for users to be able to customize an email template. I'm familiar with TinyMCE et al. web based wysiwyg editors. However they strive to produce valid (x)html markup, with heavy use of style sheets. All of wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/354769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What would make a callback request hang? I am working on a project that uses the asp.net ajax control toolkit and all my callback requests are hanging till the request times out. When I step through the code all my code executes then the hanging occures. Right now I am looking for possible reasons why this might hap...
{ "language": "en", "url": "https://stackoverflow.com/questions/354774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Where can I find a Good Sample ASP.NET Database Driven Web Application? I would like to learn the best practices to employ when creating a database driven web-application. I prefer to learn from examples. What is a good sample application that I can download and run to learn this: I am looking for: * *Should be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/354775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Using a DetailsView in ASP.Net when using an ObjectDataSource or a SqlDataSource How do you use a DetailsView control in Asp.NET? * *How do you change the labels to something other than the database field name? *How do you hide some of the fields from the user? (which you need to query for because they are the i...
{ "language": "en", "url": "https://stackoverflow.com/questions/354782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I access the SMS messages in a Windows Mobile device I'm searching for a code that will alow access to the SMS messages stored in a Pocket PC device with Windows Mobile so I can download/backup them to a Windows PC. Anyone knows how to do this? A: You might start by looking at the documentation, on how to b...
{ "language": "en", "url": "https://stackoverflow.com/questions/354792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: DetailsView and Parent-Child tables - inserting rows When you have parent-child tables and you wish to use a DetailsView to edit the data how do you do it using a SqlDataSource? For example, if you have a Person and an Employee table (where an employee is the child table and the Person is parent table - an employee ...
{ "language": "en", "url": "https://stackoverflow.com/questions/354794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the best way to get a return value out of an asyncExec in Eclipse? I am writing Eclipse plugins, and frequently have a situation where a running Job needs to pause for a short while, run something asynchronously on the UI thread, and resume. So my code usually looks something like: Display display = Display.g...
{ "language": "en", "url": "https://stackoverflow.com/questions/354796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Images and a dynamic layout I'm working on a website with a em-based layout (so it can stretch and compress gracefully when users increase or decrease font size). This site has a header that should be displayed across all pages. I have a "header" div in all pages, and the site-wide css file includes the code: #hea...
{ "language": "en", "url": "https://stackoverflow.com/questions/354799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Flex Localization: refresh DataProvider values I have a ToggleButtonBar with a DataProvider setup like this: <mx:ToggleButtonBar itemClick="clickHandler(event);" selectedIndex="0"> <mx:dataProvider> <mx:String>{resourceManager.getString('dashboard','daily')}</mx:String> <mx:String>{resourceMan...
{ "language": "en", "url": "https://stackoverflow.com/questions/354811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Packing Javascripts - Is it worth it? If a packed Javascript saves 20kb off the download size, but takes a perfomance hit to unpack, then are there any benefits, besides obfuscating the code? I've made this a community wiki because it may be open to some discussion. A: Packed javascript code generally does not take...
{ "language": "en", "url": "https://stackoverflow.com/questions/354814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Must all registered domains have domain name servers assigned to them? If I just want to know if a domain name is reserved; is it sufficient to use this command and see if any domain name servers turn up, in which case it's reserved? host -t NS example.com It's a lot faster than visiting http://www.internic.net/who...
{ "language": "en", "url": "https://stackoverflow.com/questions/354835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: UnityContainer, child container injection I am pretty new to the Unity Application Block and am a little stuck trying to implement the following. I have a parent and child container. When i resolve a new instance of the child container i want to inject a new UnityContainer into the constructor using the CreateChil...
{ "language": "en", "url": "https://stackoverflow.com/questions/354836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's Up with Logging in Java? Why one would use one of the following packages instead of the other? * *Java Logging *Commons Logging *Log4j *SLF4j *Logback A: In chronological order of api apperance (as far as I know): * *Log4j because most everybody uses it (in my experience) *Commons Logging because...
{ "language": "en", "url": "https://stackoverflow.com/questions/354837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "118" }
Q: Convert US date format to ANSI SQL date format (YYYY-mm-dd) I want to convert user-submitted date format (mm/dd/yyyy) to a MySQL date format (YYYY-mm-dd). Submission is via a simple PHP form direc tto MySQL database. A: $mysql_date = date('Y-m-d H:i:s', strtotime($user_date)); A: An alternative method as of PH...
{ "language": "en", "url": "https://stackoverflow.com/questions/354838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Adobe Flex/AIR: Scrolling a sub-component, not the whole window I'm developing an application with Adobe Flex and AIR, and I've been banging my head against the wall trying to figure out how to solve a scrolling issue. The basic structure of my main application window (simplified greatly) is this: <?xml version="1.0...
{ "language": "en", "url": "https://stackoverflow.com/questions/354840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Converting XAML ObjectDataProvider to C# I would like to create my ObjectDataProvider in my C# code behind rather than my XAML. I was wondering how to change this XAML into equivalent C#. The XAML was generated by Microsoft Expression Blend 2, so the d: namespace can be ignored safely. <ObjectDataProvider x:Key="Foo...
{ "language": "en", "url": "https://stackoverflow.com/questions/354842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What constitutes an expensive method or resource? It is mentioned fairly often that exceptions are expensive, and various methods in .NET are expensive, too. What exactly constitutes an expensive method in .NET? Is it the time taken for the method to process? E.G. I got the response stream of a webpage using the Web...
{ "language": "en", "url": "https://stackoverflow.com/questions/354845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Regex to Find Second Char is Alpha Followed by 1 numeral Regex to Find Second Char is Alpha up to 5 Alpha Followed by 1 numeral. Thanks A: I was not successful in implementing any of the solutions above, probably my poor explanation of need. I did solve it in code not using Regex. Thanks to everyone who took the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/354853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Anyone here have any experience using gcj's CNI for java external libraries? I've been interested in doing some work on a desktop application for while now and my most proficient language is Java. Due to wanting to be able to compile down to a native executable, does anyone have any experience they would like to sha...
{ "language": "en", "url": "https://stackoverflow.com/questions/354854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Swing JButton: Icon above Text How can I create a JButton in Swing with the icon above the text? A: just do this: button.setVerticalTextPosition(SwingConstants.BOTTOM); button.setHorizontalTextPosition(SwingConstants.CENTER);
{ "language": "en", "url": "https://stackoverflow.com/questions/354866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How do I use DMProcessConfigXML to provision my Windows Mobile device? I want to create a C# program to provision Windows Mobile devices. I have found MSDN documentation on a function called DMProcessConfigXML, but no instructions on how to use this function. How can I use this function in my Windows Mobile app? I s...
{ "language": "en", "url": "https://stackoverflow.com/questions/354869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Displaying foreign key relationships in Oracle 9i Is there a command in oracle 9i that displays the foreign keys of a table and also the table that those foreign keys reference? I was searching, did not find anything but i found an equivalent command that works with MySql which is SHOW CREATE TABLE Is there an equi...
{ "language": "en", "url": "https://stackoverflow.com/questions/354870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Reversing a linked list in Java, recursively I have been working on a Java project for a class for a while now. It is an implementation of a linked list (here called AddressList, containing simple nodes called ListNode). The catch is that everything would have to be done with recursive algorithms. I was able to do e...
{ "language": "en", "url": "https://stackoverflow.com/questions/354875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "107" }
Q: Alternatives for returning multiple values from a Python function The canonical way to return multiple values in languages that support it is often tupling. Option: Using a tuple Consider this trivial example: def f(x): y0 = x + 1 y1 = x * 3 y2 = y0 ** y3 return (y0, y1, y2) However, this quickly gets probl...
{ "language": "en", "url": "https://stackoverflow.com/questions/354883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1215" }
Q: Are there any situations where a side effect on a "get" or "calculate" operation is legitimate? I've just finished a six hour debugging session for a weird UI effect where I found that my favorite framework's implementation of an interface function called "getVisibleRegion" disabled some UI feature (and apparently f...
{ "language": "en", "url": "https://stackoverflow.com/questions/354886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Firefox won't display an image! This is very interesting to me... This image displays perfectly well in Safari, but not at all in Firefox! Here's the relevant code: <div id="ad"> <p>Advertisment</p> <img src="/ADS/fakead1.gif" /> </div> With CSS: #ad{color: #666;} #ad p{ font-size: .5em; text-align...
{ "language": "en", "url": "https://stackoverflow.com/questions/354888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# FileSystemWatcher does not catch a Perforce revert C# FileSystemWatcher does not catch a Perforce revert. It works fine when the same file is modified. This causes a problem because the revert changes the file, but FileSystemWatcher does not get notified. How do you watch for a Perforce revert? Thank you. A: In ...
{ "language": "en", "url": "https://stackoverflow.com/questions/354891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Use "references" for multiple items of same type So I'm teaching myself Ruby on Rails, with a PHP background. I've written a sloppy, proof-of-concept PHP application called "2NDP." I want to re-create this in Ruby on Rails (but more basic, more clean, and with a better interface), so I can learn some of the basics. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/354900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Open in Explorer How do you open a path in explorer by code in c++. I googled and couldn't find any thing but systems commands to do this, however, i dont want it to block or show the console window. A: You probably are looking for the ShellExecute() function in shellapi.h. It is called with an "action verb", a pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/354902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is there a difference between foreach and map? Ok this is more of a computer science question, than a question based on a particular language, but is there a difference between a map operation and a foreach operation? Or are they simply different names for the same thing? A: In short, foreach is for applying an ope...
{ "language": "en", "url": "https://stackoverflow.com/questions/354909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "242" }
Q: Asp.Net MVC routing: best way to have a single element in the URL? I will take the example of the SO site. To go to the list of questions, the url is www.stackoverflow.com/questions. Behind the scene, this goes to a controller (whose name is unknown) and to one of its actions. Let's say that this is controller=home ...
{ "language": "en", "url": "https://stackoverflow.com/questions/354927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Strange problem about conversion between GDI+ to GDI: Bitmap and HBitmap I want to convert gdi+ Bitmap into gdi object HBitmap. I am using the following method: Bitmap* img = new Bitmap(XXX); // lots of codes... HBITMAP temp; Color color; img->GetHBITMAP(color, &temp); the img object is d...
{ "language": "en", "url": "https://stackoverflow.com/questions/354933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Flex - 2032: Stream Error in IE only I get a 2032 stream error from Flash in response to POST requests that return "201 Created" in IE (Firefox works fine). Since Flash doesn't provide access to the HTTP status I can't tell that it has actually succeeded. The request is being made with HTTPService. Any suggestions...
{ "language": "en", "url": "https://stackoverflow.com/questions/354936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Should Class Helpers be used in developing new code? Delphi 8 introduced Class Helpers for the purposes of mapping the VCL/RTL to the .NET object hierarchy. They allow injecting methods into an existing class without overriding the the class or modifying the original. Later versions of Delphi found class helpers i...
{ "language": "en", "url": "https://stackoverflow.com/questions/354940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to get more ways of interrogating my data source from subsonic In the below link, Linq-To-Sql produces a range of methods to get data back based on various real-world needs (e.g. recent topics, etc). How can I get Subsonic to produce me a set of classes which would interrogate and return data back from my data s...
{ "language": "en", "url": "https://stackoverflow.com/questions/354941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can you bind the selected item in a listbox to a separate object in WPF? If I have two objects, one being the list of items, and the other having a property storing the selected item of the other list, is it possible to update the selected item through binding in WPF? Lets say I have these two data structures: publi...
{ "language": "en", "url": "https://stackoverflow.com/questions/354942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Most effective way to grab a table name in the following string What would be the most effective way to grab the schema + table name in this scenario: SELECT [t0].[Id], [t0].[CODE] AS [arg0], [t0].[DESC] AS [arg1] FROM [SchemaName].[TableName] AS [t0] WHERE ([t0].[Id] <> @p0) The outcome needs to be: "SchemaName.Tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/354945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I make Quartus II compile faster I'm using Altera Quartus 2 to do a custom 8 bit processor and it takes forever to compile on my laptop. I'm only using simulations and making my processor in schematic (block diagram) and VHDL. Right now it takes around 10 minutes to compile, which is a pain since I'm more on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/354962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: In Java, when should I use "Object o" instead of generics? For example, I could write either of these: class example <T> { ... public void insert (T data) { ... } } or class example { ... public void insert (Object o) { ... } } Is there a signficant difference betw...
{ "language": "en", "url": "https://stackoverflow.com/questions/354967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Why doesn't the SQL standard provide a way of specifying FDs other than superkeys? It seems to me there are other functional dependencies you may wish to declare (other than superkeys of course), but SQL provides no easy way to do so. Why is this? A: I don't know first-hand the answer as to "why" the SQL committee ...
{ "language": "en", "url": "https://stackoverflow.com/questions/354972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I tell ActiveScaffold to always show the search form in a list view? The ActiveScaffold list view has a search form that is loaded via ajax when a user click the search link. I'd prefer to have the form show by default when a user opens a list page. I've figured out a way to trigger the ajax call when the pag...
{ "language": "en", "url": "https://stackoverflow.com/questions/354976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Massive CROSS JOIN in SQL Server 2005 I'm porting a process which creates a MASSIVE CROSS JOIN of two tables. The resulting table contains 15m records (looks like the process makes a 30m cross join with a 2600 row table and a 12000 row table and then does some grouping which must split it in half). The rows are re...
{ "language": "en", "url": "https://stackoverflow.com/questions/354981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ADO.NET Entity : getting data from 3 tables I have following table structure: Table: Plant PlantID: Primary Key PlantName: String Table: Party PartyID: Primary Key PartyName: String PlantID: link to Plant table Table: Customer PartyID: Primary Key, link to Party CustomerCode: String I'd like to have Custo...
{ "language": "en", "url": "https://stackoverflow.com/questions/354993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: how do I create a dump file from my subversion hosting account? I have my SVN repository hosted somewhere. I want to move to somebody else. How can I create a dump of my repository so I can import it into my new host? This is all I keep seeing: svnadmin dump /path/to/repos > repos.dump My repository is hosted, s...
{ "language": "en", "url": "https://stackoverflow.com/questions/354994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I stop execution going into a UserControls PageLoad Method? I have a MasterPage, with my Usercontrol inside a div. I can set visible=false to the UserControl and to the containing div, and this works fine. But the Page_Load of the UserControl is always hit. Is this by design, or am I missing how to stop page ...
{ "language": "en", "url": "https://stackoverflow.com/questions/354998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I create a certain control using Windows Forms in Visual C++? I am new to using Windows Forms in C++ (and just in general), and I am not exactly sure of the name or if it's even possible to do. Currently I am currently working on a school project in which we must make a program for an imaginary bookstore. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/355006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jQuery event to detect when element position changes I would like to know if there is a jQuery event that I can use to determine when a particular DIV's top property has changed. For instance, I have invisible content above a DIV. When that content becomes visible, the DIV is shifted down. I would like to capture th...
{ "language": "en", "url": "https://stackoverflow.com/questions/355015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Automatically terminating non essential threads in C# I have an object in C# on which I need to execute a method on a regular basis. I would like this method to be executed only when other people are using my object, as soon as people stop using my object I would like this background operation to stop. So here is a...
{ "language": "en", "url": "https://stackoverflow.com/questions/355019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Formatting double as string in C# I have a Double which could have a value from around 0.000001 to 1,000,000,000.000 I wish to format this number as a string but conditionally depending on its size. So if it's very small I want to format it with something like: String.Format("{0:.000000000}", number); if it's not t...
{ "language": "en", "url": "https://stackoverflow.com/questions/355020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is SQLite thread safe under this situation? I require database access operations from several threads, through a singleton object, which holds a database connection. I read from SQLite3's website, saying that 'an sqlite3 structure could only be used in the same thread that called sqlite3_open() to create it. You cou...
{ "language": "en", "url": "https://stackoverflow.com/questions/355025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is it possible to avoid a wakeup-waiting race using only POSIX semaphores? Is it benign? I'd like to use POSIX semaphores to manage atomic get and put from a file representing a queue. I want the flexibility of having something named in the filesystem, so that completely unrelated processes can share a queue. I th...
{ "language": "en", "url": "https://stackoverflow.com/questions/355030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I represent a many to many relationship to the same table/entity in hibernate? Is that possible? I mean, can both ends of the many to many relationship point to the same table? A: I'm not sure how you'd do it without enormous, horrible redundancy. The standard way to handle a many-to-many relationship betw...
{ "language": "en", "url": "https://stackoverflow.com/questions/355031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you create optional associations in Linq-To-Sql classes? I am trying to creating an optional association between a couple of tables. I have one table called Invoice. The Invoice table has a FK reference to the Customer table through the CustomerId field. The Invoice table also has a not enforced FK referen...
{ "language": "en", "url": "https://stackoverflow.com/questions/355032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JSF RichFaces and a dual slider I see in richfaces that there is a single slider, wondering if anyone has created a dual slider like in Scriptaculous for it. Is there any concerns in mixing JSF, Richfaces and Scriptaculous in an application? A: I can't answer your question with precision, but here's what I know. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/355038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I escape an ampersand in a javascript string so that the page will validate strict? I am trying to pass a dataString to to an ajax call using JQuery. In the call, I construct the get parameters and then send them to the php page on the receiving end. The trouble is that the data string has ampersands in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/355043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How do you store a trie in a relational database? I have a prefix trie. What is the recommended schema for representing this structure in a relational database? I need substring matching to remain efficient. A: How about the Materialized Path design? CREATE TABLE trie ( path VARCHAR(<maxdepth>) PRIMARY KEY, .....
{ "language": "en", "url": "https://stackoverflow.com/questions/355051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: What is the best approach to binding commands in a ViewModel to elements in the View? Anyone who has tried to implement RoutedCommands in WPF using M-V-VM has undoubtedly run into issues. Commands (non-UI commands that is) should be implemented in the ViewModel. For instance if I needed to save a CustomerViewModel t...
{ "language": "en", "url": "https://stackoverflow.com/questions/355053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C# vs Java generics I have heard that the Java implementation of Generics is not as good as the C# implementation. In that the syntax looks similar, what is it that is substandard about the Java implementation, or is it a religious point of view? A: The difference comes down to a design decision by Microsoft and Su...
{ "language": "en", "url": "https://stackoverflow.com/questions/355060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "133" }
Q: Is there a string math evaluator in .NET? If I have a string with a valid math expression such as: String s = "1 + 2 * 7"; Is there a built in library/function in .NET that will parse and evaluate that expression for me and return the result? In this case 15. A: Strange that this famous and old question has not an...
{ "language": "en", "url": "https://stackoverflow.com/questions/355062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "105" }
Q: how to debug vb6 richtextbox not showing unicode (chinese) properly I have a simple vb6 editor type application which has a richtextbox as the editor page. It allows users to key in stuff and the store it into a file which will keep all the text in RTF stored as CDATA in xml. When you load back the file, it will rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/355073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET MVC - How to explain it? I am trying to teach ASP.NET MVC to students (undergrads) that have been studying ASP.NET for the last 8 weeks (I know that doesn't sound like much time, but the class is 4 hours per day, 5 days per week with Labs, Quizzes, Exams, and Wrestles). I haven't gotten the question yet...bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/355082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Adding Controls using Javascript and get Their Value from codebehind I wanna add server controls by using javascript. The main purpose of why I want is to add controls without any postback and get them in code-behind. A: You can check the Request.Form collection for all form values (client side controls) on the ser...
{ "language": "en", "url": "https://stackoverflow.com/questions/355083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WPF Xaml Custom Styling Selected Item Style in a ListBox I have a ListBox that scrolls images horizontally. I have the following XAML I used blend to create it. It originally had a x:Key on the Style TaregetType line, MSDN said to remove it, as I was getting errors on that. Now I'm getting this error: Error 3 Ope...
{ "language": "en", "url": "https://stackoverflow.com/questions/355084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How should I do an equality test for 80bit IEEE floating point? related to: * *comparing ieee floats and doubles for equality *Should we compare floating point numbers for equality against a relative error *Most effective way for float and double comparison However with regard to 80 bit IEEE floats (see section...
{ "language": "en", "url": "https://stackoverflow.com/questions/355087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Difference between StringBuilder and StringBuffer What is the main difference between StringBuffer and StringBuilder? Is there any performance issues when deciding on any one of these? A: First lets see the similarities: Both StringBuilder and StringBuffer are mutable. That means you can change the content of them,...
{ "language": "en", "url": "https://stackoverflow.com/questions/355089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1721" }
Q: MySQL - The 'optimise' function? I have noticed in phpMyAdmin you can click 'optimise' on tables, and it runs: OPTIMIZE TABLE table_name What does this actually do? Should I have some cron job running daily that runs OPTIMIZE TABLE on my tables? Thank you A: From InformIT An optimized table structure is differe...
{ "language": "en", "url": "https://stackoverflow.com/questions/355098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I extract Word documents from data recovered from USB device? I have been able to copy the raw data from an otherwise inaccessible USB drive into a monolithic file of about 250MB. Somewhere in that blob of bytes are about 40 Word documents. * *Where do I find documentation about the internal structure of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/355099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Oracle linux front end Is there any Oracle database ( around version 10 ) front end that we can use in Linux, free or open source? I am currently using Ubuntu 8.10 and if possible I just want it to need the thin JDBC to connect to oracle and not the whole (huge) client of oracle installed in it. A: I use Oracle SQL...
{ "language": "en", "url": "https://stackoverflow.com/questions/355102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET MVC Views - Can I use code-behind I am new to MVC and I notice that the view pages can look pretty nasty with all the intermixed script tags. Does it make sense to generate the HTML in a method in the view code-behind and then just insert the string result of the method as a single bit of script? For example...
{ "language": "en", "url": "https://stackoverflow.com/questions/355106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: mssql handles line returns rather awkwardly Here is the problem: for your reference: database entries 1,2 and 3 are made using jython 2.2.1 using jdbc1.2. database entry 4 is made using vb the old to be replace program using odbc. We have found that if I copy and paste both jython and vb MailBody entries to wordpa...
{ "language": "en", "url": "https://stackoverflow.com/questions/355135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does this "width: auto" style work as an inline style in both browsers but break when moved to an external stylesheet only in IE? I have an INPUT element that is defaulting to "width: 100%". This causes it to push other elements next to it down onto the next line. To fix this temporarily I added an inline styl...
{ "language": "en", "url": "https://stackoverflow.com/questions/355139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's quicker at resolving, DataSet.Tables or Dictionary I am creating a mock database for import export tests (of the algorithm reading and writing complex data structures to our database, not just to test IO operations), and am trying to decide whether to use a DataSet to store the mock tables (by table name) in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/355141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Dependency Injection while dynamic assembly loading i have a winforms applicatoin that has a lot of implementations of IOrderDataLoader. Other teams are starting to build their own new implementations of IOrderDataLoader. So we switched our app to look in a directories of Dlls and load all classes that implement I...
{ "language": "en", "url": "https://stackoverflow.com/questions/355145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Limits you hit when sending lots of email from your server What kind of practical issues are there concerning sending tons of e-mail from a server? Will the likelihood of that e-mail being received be just the same as if it had been sent from g-mail or a personal e-mail account if I for example just blindly call the...
{ "language": "en", "url": "https://stackoverflow.com/questions/355151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Where is the "AJAX-enabled WCF Service"? I have installed Visual Studio 2008 and patch it with SP1. However, I cannot find the "AJAX-enabled WCF Service" in my New Project dialog. Does any more patches should be added to make the "AJAX-enabled WCF Service" template appear? A: http://msdn.microsoft.com/en-us/library...
{ "language": "en", "url": "https://stackoverflow.com/questions/355153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# Excel footer problem I am creating a C# windows application to create an Excel 2003 sheet. There is a requirement to add to the footer: Page 1 of 4. I currently have it so it puts "Page: &[Page] of &[Pages]" into the footer of the excel sheet. When I open up the created document and look at the footer I see "Pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/355155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to remove the ".svc" extension in RESTful WCF service? In my knowledge, the RESTful WCF still has ".svc" in its URL. For example, if the service interface is like [OperationContract] [WebGet(UriTemplate = "/Value/{value}")] string GetDataStr(string value); The access URI is like "http://machinename/Service.svc/...
{ "language": "en", "url": "https://stackoverflow.com/questions/355165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: How are Anonymous inner classes used in Java? What is the use of anonymous classes in Java? Can we say that usage of anonymous class is one of the advantages of Java? A: You use it in situations where you need to create a class for a specific purpose inside another function, e.g., as a listener, as a runnable (to s...
{ "language": "en", "url": "https://stackoverflow.com/questions/355167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "320" }
Q: Proper way to exit iPhone application? I am programming an iPhone app, and I need to force it to exit due to certain user actions. After cleaning up memory the app allocated, what's the appropriate method to call to terminate the application? A: Your ApplicationDelegate gets notified of intentional quitting by the...
{ "language": "en", "url": "https://stackoverflow.com/questions/355168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "289" }
Q: Refer to a html List item object properly in javascript for Event Registration I would like to know how I can refer to a list item object if I had for example the following html list <div id="subdiv_2"> <div id="subdiv_3"> <ul> <li><a href="">Item1</a></li> <li><a href="">Item2</a></li> <li><...
{ "language": "en", "url": "https://stackoverflow.com/questions/355171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to design an immutable object with complex initialization I'm learning about DDD, and have come across the statement that "value-objects" should be immutable. I understand that this means that the objects state should not change after it has been created. This is kind of a new way of thinking for me, but it make...
{ "language": "en", "url": "https://stackoverflow.com/questions/355172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Looping problem with flash audio At my client's request I have placed a song on her website, set to run on loop using flash. The swf is tucked inside of a table in her sidebar navigation. For some reason the swf doubles, then triples, etc. at the end of each play. I'm using Dreamweaver and Flash and have tried diff...
{ "language": "en", "url": "https://stackoverflow.com/questions/355178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Permission Denied When using XMLHttpRequest.Open cross browser access I am trying to access XMLHTTPRequest.open Method I have even included netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); but still its not working. I am using javascript and HTML to access the WebService. Any Help would b...
{ "language": "en", "url": "https://stackoverflow.com/questions/355185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Turn a N-Ary B-Spline into a sequence of Quadratic or Cubic B-Splines I am doing some TTF work for MOSA (the correlating body between all the C# operating systems). Me and Colin Burn are currently working on getting some TTF code working (less me these days :) - he made a lot of progress). In any case, the TTF spec ...
{ "language": "en", "url": "https://stackoverflow.com/questions/355192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which port we can use to run IIS other than 80? IIS does not work when I start applications like Skype since it also uses port 80. Which port can I use to run IIS other than 80? (8080 does not work) A: Port 8080 might have been used by another process in your computer. Do netstat in command prompt to find out which...
{ "language": "en", "url": "https://stackoverflow.com/questions/355196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: MySQL replication: temporarily prevent specific SQL statements replicating to the slaves? I want to connect and execute one (or sometimes several) SQL statements, and NOT have those replicated to the slaves. I have no replicate-do or replicate-ignore configs, so I can't use some non-replicated database to send the c...
{ "language": "en", "url": "https://stackoverflow.com/questions/355202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: method: => :delete not working and :confirm option ignored After returning to an old Rails project I found none of the destroy/delete links worked and clicking cancel on the confirmation popup would still submit the link. Example of my code is: <%= link_to 'Delete', admin_user_path(@user), :confirm => 'Are you sure?...
{ "language": "en", "url": "https://stackoverflow.com/questions/355212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Should I default my website to www.foo or not? Notice how the default domain for stackoverflow is http://stackoverflow.com and if you try to goto http://www.stackoverflow.com it bounces you to http://stackoverflow.com ? What is the reason for this? Not the tech reason (as in the http code, etc) but why would the sit...
{ "language": "en", "url": "https://stackoverflow.com/questions/355217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Defining const values in C I have a C project where all code is organized in *.c/*.h file pairs, and I need to define a constant value in one file, which will be however also be used in other files. How should I declare and define this value? Should it be as static const ... in the *.h file? As extern const ... in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/355220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: rake undefined exitstatus in nil:Nilclass I am trying to run rake on a new machine (original machine works fine) . . after running my this i get an error saying . . rake aborted undefined method exitstatus for nil:nilClass any suggestions for how i could see whats going on here? A: Start with rake --trace A: I fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/355228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a way to change several textbox's readonly attribute programatically Is there a way to change several textbox's readonly attribute programatically in .net. A: Assuming your textboxes all begin with the same prefix and exist in the page controls collection: string commonTextBoxPrefix = "txt"; foreach (Contr...
{ "language": "en", "url": "https://stackoverflow.com/questions/355248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why must const members be initialized in the constructor initializer rather than in its body? Why must class members declared as const be initialized in the constructor initializer list rather than in the constructor body? What is the difference between the two? A: In C++, an object is considered fully initialised ...
{ "language": "en", "url": "https://stackoverflow.com/questions/355258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: Difference between and ? Every time I have to add a handler or module for ASP.NET with IIS7, the instructions always tell me to incorporate it into two sections: system.web and system.webserver. <system.web> <httpHandlers> </httpHandlers> <httpModules> </httpModules> </system.web> And this: <system...
{ "language": "en", "url": "https://stackoverflow.com/questions/355261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "209" }
Q: How can I set Perl's inclusion path for modules for a CGI script? I’ve got several Perl modules installed on my hosting machine in ~/perl, how do I add them to Perl module path? Setting PERL5LIB or unshifting the paths to @INC surely works, but the environment variable does not help when running as a CGI script and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/355267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Downloading the gzip file and Uncompressing to retrieve Content using IPHONE SDK on iphone and ipod touch devices I had the following questions related to downloading the file from the server. a) Is it possible to download directly the GZIP (Compressed)file to the iphone device using IPHONE SDK. b) If the compressed...
{ "language": "en", "url": "https://stackoverflow.com/questions/355280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Logging user actions on ASP.NET site? What I want is system which is logging methods called by users and their returning values if they have. For example a user logs in and he/she is surfing on my web app. then naturally he/she clicks on somethings and so he/she fires up some event method whatever then my log system...
{ "language": "en", "url": "https://stackoverflow.com/questions/355282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }