text
stringlengths
8
267k
meta
dict
Q: Disabling 'paste' in a jTextfield I have an app that is written in Swing, awt. I want to prevent users from pasting values into the textfields. is there any way to do this without using action listeners? A: The best way is to remove action associated with CTRL+V keystroke in components ActionMap. A: You can just c...
{ "language": "en", "url": "https://stackoverflow.com/questions/316673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C#: How do you go upon constructing a multi-lined string during design time? How would I accomplish displaying a line as the one below in a console window by writing it into a variable during design time then just calling Console.WriteLine(sDescription) to display it? Options: -t Descrip...
{ "language": "en", "url": "https://stackoverflow.com/questions/316674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Parsing a byte stream to a struct/class I have a byte stream I need parsed into a struct, and I also need to be able to parse the struct back to a byte stream. Below is an example of what I want where I've used BitConverter to parse the values. I hope there is a more efficient way of doing this, because my structs a...
{ "language": "en", "url": "https://stackoverflow.com/questions/316682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I extract java exe to jar I have an exe that I know was written in java. I understand that java programs can be made into an exe and there are tools to convert jar files to exe but is it possible to convert back? AFAIK jar files can be run on any platform that can run java and I would like to use a windows c...
{ "language": "en", "url": "https://stackoverflow.com/questions/316701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is a double really unsuitable for money? I always tell in c# a variable of type double is not suitable for money. All weird things could happen. But I can't seem to create an example to demonstrate some of these issues. Can anyone provide such an example? (edit; this post was originally tagged C#; some replies refer...
{ "language": "en", "url": "https://stackoverflow.com/questions/316727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: Resources for graph structure? I have a problem related to graph. I am not a computer science grad hence needed a some quick intro on what is graph and were can i read about graph and how to solve graph related problem in c++ or in general. A: Please see Graph problems in the Stony Brook Algorithm Repository, and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: PHP bug with converting object to arrays I had this question earlier and it was concluded it was a bug in 5.2.5. Well, it's still broken in 5.2.6, at least for me: Please let me know if it is broken or works for you: $obj = new stdClass(); $obj->{"foo"} = "bar"; $obj->{"0"} = "zero"; $arr = (array)$obj; //foo -- b...
{ "language": "en", "url": "https://stackoverflow.com/questions/316747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can the iPhone only use an SQLite database? Can the iPhone use other databases besides SQLite, like MySQL? A: The iPhone can only use SQLite as a database, directly on the device. This means there is no MySQL server inside the iPhone. But you can, and are free to have (your own) MySQL Back-end server, to which iPho...
{ "language": "en", "url": "https://stackoverflow.com/questions/316755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: UK Vat change from 17.5 to 15% - How will this affect your code? The UK VAT system is changing from 17.5% to 15%. What strategies have you used in your code to store the VAT, and how will the change affect your applications. Do you store a history of vats so you can calculate old prices, or are old invoices stored i...
{ "language": "en", "url": "https://stackoverflow.com/questions/316757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to launch multiple Java programs with one configuration on separate consoles (with Eclipse) I'm working with a Java program that has multiple components (with Eclipse & Ant at the moment). Is there some way to start multiple programs with one launch configuration? I have an Ant target that does the job (launche...
{ "language": "en", "url": "https://stackoverflow.com/questions/316761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: smb.conf file location on different flavors of Solaris Ok I am a total beginner with the Solaris Operating system and I need to install and configure samba on 3 boxes each has a different version of Solaris (8,9,10). What I want to know location of samba configuration file i.e., smb.conf files in each version? So fa...
{ "language": "en", "url": "https://stackoverflow.com/questions/316773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Schema for a multilanguage database I'm developing a multilanguage software. As far as the application code goes, localizability is not an issue. We can use language specific resources and have all kinds of tools that work well with them. But what is the best approach in defining a multilanguage database schema? Let...
{ "language": "en", "url": "https://stackoverflow.com/questions/316780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "274" }
Q: How to build query string with Javascript Just wondering if there is anything built-in to Javascript that can take a Form and return the query parameters, eg: "var1=value&var2=value2&arr[]=foo&arr[]=bar..." I've been wondering this for years. A: If you don't want to use a library, this should cover most/all of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "247" }
Q: Dynamic Id's in JSF/Seam Got a little problem with a Seam application I'm working on and I was wondering if anyone knows a way round it. I've got a form in my application that uses AJAX to show certain input boxes depending on an item in a dropdown box. The code works fine except for setting the ID's in my input b...
{ "language": "en", "url": "https://stackoverflow.com/questions/316790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Best way to embed flash in html There are too many method for embedding flash in html, which way is the best? Requirements are: * *Cross-browser support *Support for alternative content (if flash is not supported by the browser) *Possibility to require a specific version of the flash player I have been readin...
{ "language": "en", "url": "https://stackoverflow.com/questions/316807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to reclaim image real estate in ListView? Env.: VS 2008, .NET 2.0, WinForms I have a listview in Tile mode. Some items have an associated image. Some don't. The contents (listview items) is often renewed when user clicks some controls. When this happens, it sometimes appears that none of the new items have image...
{ "language": "en", "url": "https://stackoverflow.com/questions/316808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Top 5 time-consuming SQL queries in Oracle How can I find poor performing SQL queries in Oracle? Oracle maintains statistics on shared SQL area and contains one row per SQL string(v$sqlarea). But how can we identify which one of them are badly performing? A: You could take the average buffer gets per execution duri...
{ "language": "en", "url": "https://stackoverflow.com/questions/316812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: How can I launch the default media player from a .NET application? I need to launch a media file from a URL from within my c# .NET application. Is there any way to do this natively in .NET? I don't need an embedded player, I just need the default player to launch. I have tried System.Diagnostics.Process.Start("File...
{ "language": "en", "url": "https://stackoverflow.com/questions/316820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C++/Qt vs Adobe AIR I have to choose a platform for our product. I have to decide between The Qt Framework and Adobe's AIR. I am well versed with Qt as I have worked for the last two years. I looked up at the Adobe's site but all the info about flex, flash, ability to coding in HTML/ActionScript is overwhelming and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Table and Index size in SQL Server Can we have a SQL query which will basically help in viewing table and index sizes in SQl Server. How SQL server maintains memory usage for tables/indexes? A: The exec sp_spaceused without parameter shows the summary for the whole database. The foreachtable solution generates one...
{ "language": "en", "url": "https://stackoverflow.com/questions/316831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "100" }
Q: the way to Post or Get the input data to a site in iphone application is it possible to Post or Get the input data to a site by using objective C in iphone application,for example in HTML create a form it collect the input data from user and post to the server site A: Take a look at ASIHTTP http://allseeing-i.com/A...
{ "language": "en", "url": "https://stackoverflow.com/questions/316833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make this site browser independent I got this page, and have some problems with ie < 7 and opera 7.11 This is what i hoped to be the layout in all browsers, and these are the IE ones instead: ie 5.5 and ie 6.0. the xhtml is quite simple: print "<div id=\"page\"> <div id=\"header\"> <ul id=\"nav\"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Semantic representation of a chart I'm recoding an old site that contains a chart similar to this: alt text http://dl.getdropbox.com/u/240752/rental-chart.gif How would this chart be represented with pure HTML? I'm loathed to just include it as an image. I'm thinking a table, just replaced with an image, or perhaps ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Getting basic-auth username in php How can I access the apache basic-auth username in a PHP script? A: Check what you have in $_SERVER (print_r($_SERVER)), sometimes $_SERVER['PHP_AUTH_USER'] is not available. If you have value for $_SERVER["HTTP_AUTHORIZATION"], you may use: if (isset($_SERVER["HTTP_AUTHORIZATION"...
{ "language": "en", "url": "https://stackoverflow.com/questions/316847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Finding the last occurrence of a word I have the following string: <SEM>electric</SEM> cu <SEM>hello</SEM> rent <SEM>is<I>love</I>, <PARTITION />mind I want to find the last "SEM" start tag before the "PARTITION" tag. not the SEM end tag but the start tag. The result should be: <SEM>is <Im>love</Im>, <PARTITION /> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: List of PDOStatement::bindParam data_type parameters Is there a list describing all of the data_type parameters you can use in PDOStatement::bindParam() ? If none, what do you commonly use, and for what type of field ? According to PHP manual: data_type Explicit data type for the parameter using the PDO::PARAM_* con...
{ "language": "en", "url": "https://stackoverflow.com/questions/316861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: is it possible to create DLL for both win32 console and MFC GUI is it possible to develop DLL for both win32 console and MFC GUI. If yes please explain. What i want to do is to create dll that contains certain API's for both win32 console and MFC GUI. A: Yes - native dlls are structured in exactly the same way when...
{ "language": "en", "url": "https://stackoverflow.com/questions/316864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Ping a site in Python? How do I ping a website or IP address with Python? A: It's hard to say what your question is, but there are some alternatives. If you mean to literally execute a request using the ICMP ping protocol, you can get an ICMP library and execute the ping request directly. Google "Python ICMP" to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "91" }
Q: Create an internet-explorer plugin I'm having troubles finding resources on the net on how to create a plugin for IE (6 & 7). Do you happen to know good sites/tutorials on this subject? BTW, here's why I want to do this: we have a web app here that's linked with another; i.e. when on a certain page, you could launch...
{ "language": "en", "url": "https://stackoverflow.com/questions/316874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using JavaScript in mobile web application I need to use JavaScript in a form for mobile web application. I need some information about it, related to browser compatibility as well as way to use JavaScript in mobile web applications (syntax). A: It's a nightmare. It's like working with web-browsers in the 90's but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Handling Callbacks I have a method in an objective-C class. It has 2 callback functions written in C. The class pointer i.e. self is passed to these functions as void *. In the C functions I create a pointer of type class and assign the void * parameter. The first callback function executes successfully. But the voi...
{ "language": "en", "url": "https://stackoverflow.com/questions/316879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: ASP.NET MVC passing an ID in an ActionLink to the controller I can't seem to retrieve an ID I'm sending in a html.ActionLink in my controller, here is what I'm trying to do <li> <%= Html.ActionLink("Modify Villa", "Modify", "Villa", new { @id = "1" })%></li> public ActionResult Modify(string ID) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "102" }
Q: How do I find the lockholder (reader) of my ReaderWriterLock in windbg I've got a dump of a .Net process that has hung due to a deadlock (the gui thread is no longer responding, and my logs show that some threads have stopped responding). I have taken a snapshot and am now looking through it in windbg, and all threa...
{ "language": "en", "url": "https://stackoverflow.com/questions/316894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: TDD and ADO.NET Entity Framework I've been playing with ADO.NET Entity Framework lately, and I find that it suits my needs for a project I'm developing. I also find cool its non-invasive nature. After generating a data model from an existing database you are faced with the task of integrating the generated model and...
{ "language": "en", "url": "https://stackoverflow.com/questions/316897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: JavaScript Banner changing I want to change the behavior of a JavaScript used to display a banner, coming from a central source. Today I include a script-tag inline in code, like this: <script type="text/javascript" src="http://banner.com/b?id=1234"></script> But what that returns is code which uses document.write,...
{ "language": "en", "url": "https://stackoverflow.com/questions/316899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Drag'n'drop one or more mails from Outlook to C# WPF application I'm working on a windows client written in WPF with C# on .Net 3.5 Sp1, where a requirement is that data from emails received by clients can be stored in the database. Right now the easiest way to handle this is to copy and paste the text, subject, con...
{ "language": "en", "url": "https://stackoverflow.com/questions/316900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How to check if I can create a file in a specific folder I need to know if I can create a file in a specific folder, but there are too many things to check such as permissions, duplicate files, etc. I'm looking for something like File.CanCreate(@"C:\myfolder\myfile.aaa"), but haven't found such a method. The only t...
{ "language": "en", "url": "https://stackoverflow.com/questions/316903", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Why are ASP.NET pages so much slower on localhost than on the production server The title pretty much sums it up, and I'm sure there's a perfectly valid explanation, but it seems extremly odd that loading pages(after they're compiled) on my local computer seems to take forever, when the same code is blistering fast ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I specifiy a generic collection as restriction in a generic method Aloha I have a method with (pseudo) signature: public static T Parse<T>(string datadictionary) where T : List<U> This doesn't build. How can I restrict the in the method to accept only generic List<> objects (which should of cource not cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/316911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to use CONTAINSTABLE to search for "word1" in column1 AND "word2" in column2 We used to have a search, that checks two columns for some words. Both columns must contain some words provided, so we use AND ... no doubts FULLTEXT INDEX is used on the columns. The select is more or less like this: SELECT ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WPF Best Practice for DataEntry Window i`m currently playing around with WPF and now i wonder what would be the layout for a typical dataentry window (20+ textboxes and stuff). atm i`m using a grid object like this (basic sample) <Grid Margin="2,2,2,2"> <Grid.ColumnDefinitions> <ColumnDefinit...
{ "language": "en", "url": "https://stackoverflow.com/questions/316921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: RouteValueDictionary overridden by context If you have a route: routes.MapRoute("search", "{controller}/{action}/{filter1}/{filter2}/{filter3}", _ New With {.filter1 = "", .filter2 = "", .filter3 = ""}) then in a view satisfied by the route pattern with a url of /member/search/dev/phil/hoy, when you attempt to cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/316924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to define CellPadding in GridView in ASP.NET * *I autoformat a GridView in ASP.NET. *It looks nice but the headers all run together like this: idfirstNamelastNameage *I set CellPadding="5" but it does nothing. How can I set the cell padding of the headers and all cells? A D D E N D U M : Thanks Andrew, I fix...
{ "language": "en", "url": "https://stackoverflow.com/questions/316931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Changing an assembly's manifest without re-building In .NET, is there a tool or some other method which would allow us to modify an assembly's manifest, without having to modify the AssemblyInfo and re-build the assembly? A: You can use MT.exe. It ships with the SDK. There is a good explanation of how to use it her...
{ "language": "en", "url": "https://stackoverflow.com/questions/316937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: StackOverflowException loading XsltCompiledTransform i have some big xslt crashing iis (StackOverflowException) when loading an XslCompiledTransform while the old (deprecated) XslTransform works fine. Is there some known issue with big templates? Strangely enough, the same XslCompiledTransform loads successfully in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Threaded loading (waiting) screen I'm looking for a generic method to implement a wait screen during long operations. I have used threading a few times before, but I have the feeling that I implemented it either very poorly, or with way too much hassle (and copy/pasting - the horror!). I want to keep this as generic...
{ "language": "en", "url": "https://stackoverflow.com/questions/316940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: jQuery/JavaScript - performance-issue when having a lot of small .js-Files? i've got a site with a lot of referenced .js-Files; those are rather small files, but I want to keep my methods separated by topic/functionality. Is it better to keep all the methods in one .js-File or is it no problem to have many (~ 20 - 3...
{ "language": "en", "url": "https://stackoverflow.com/questions/316944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Casting a TWebBrowser as a TWinControl Can anyone tell me why the second cast fails to compile in Delphi 7? var WebBrowser: TWebBrowser; begin WebBrowser := TWebBrowser.Create(Self); TWinControl(WebBrowser).Parent := Self; (WebBrowser as TWinControl).Parent := Self; // fail here end Parent in TWebBrowser is...
{ "language": "en", "url": "https://stackoverflow.com/questions/316949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a standard way to name a function which reads from a stream but does not advance the pointer? I can only think of Peek() and ReadNoAdvance() atm, but I wonder if there are better or standard options. Thanks. A: I've seen ReadAhead(), but I think Peek() is more standard. A: peek is the standard name, prese...
{ "language": "en", "url": "https://stackoverflow.com/questions/316965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Efficient Way To Query Nested Data I have need to select a number of 'master' rows from a table, also returning for each result a number of detail rows from another table. What is a good way of achieving this without multiple queries (one for the master rows and one per result to get the detail rows). For example, w...
{ "language": "en", "url": "https://stackoverflow.com/questions/316967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Paste MS Excel data to SQL Server I have a bunch of rows in Excel that I want to paste into a new table in MS SQL. Is there a simple way ? A: If you have SQL Server Management Studio, you can just Copy from Excel and Paste into the table in Management Studio, using your mouse. Just * *Go to the table you want t...
{ "language": "en", "url": "https://stackoverflow.com/questions/316978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: What's better for DSL: TCL or Lisp? What's better for DSL: TCL or Lisp? What can you say about Java(C#)-TCL binding versus Lisp(Scheme)? What DSL tool is applicable for .Net development? (excepting Microsoft DSL tools) A: If it's a choice between TCL and LISP I'd go for TCL every time. Partly because I'm familiar...
{ "language": "en", "url": "https://stackoverflow.com/questions/316979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best practice for outputting a variable which may or may not contain anything in PHP? I am developing an application and want to display a form that will be filled in if editing the form, but will not be if the form will be a new entry. I believe the least verbose way of doing this is to have just one f...
{ "language": "en", "url": "https://stackoverflow.com/questions/316988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using font resources for graphical languages in Java 1.4 I have the following issue using java 1.4 I try to display a very simple HTML document in a JTextPane that contains chinese characters. If the locale used when launching the java virtual machine is user.language=zh and user.country=CN the graphical characters ...
{ "language": "en", "url": "https://stackoverflow.com/questions/316989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Question about g++ generated code Dear g++ hackers, I have the following question. When some data of an object is overwritten by a faulty program, why does the program eventually fail on destruction of that object with a double free error? How does it know if the data is corrupted or not? And why does it cause doubl...
{ "language": "en", "url": "https://stackoverflow.com/questions/316995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Auto-increment in Oracle without using a trigger What are the other ways of achieving auto-increment in oracle other than use of triggers? A: As far as I can recall from my Oracle days, you can't achieve Auto Increment columns without using TRIGGER. Any solutions out there to make auto increment column involves TRI...
{ "language": "en", "url": "https://stackoverflow.com/questions/317001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How can I rename a ini file in Inno Setup? I have this in my installer and I need to change the name of the ini file. [INI] Filename: {app}\bin\old.ini; Section: Data; Key: key; String: Value; If I just change the filename it will create another ini file and I'll lose the data. Is there some easy way to rename this...
{ "language": "en", "url": "https://stackoverflow.com/questions/317002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Default route for all extreme situations In my routing I would like to have something like not found route handler. For example I have created one mapping like routes.MapRoute( "default", "{controller}/{action}/{id}", new { controller = "Home", action =...
{ "language": "en", "url": "https://stackoverflow.com/questions/317005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET Configuration Folder Security Login Issues * *I used the ASP.NET Configuration wizard to set up a web user. *I then denied access to anonymous users on a folder. *This works locally. *However, when I upload my webiste to my hosting provider, when checking the login it says that it can't "access the SQL ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SOAPUI: Validate response against xsd schema file How can I validate a SOAP response against an XSD file that defines the response schema. the web service I'm calling has an XMLDocument as input and output, so can't use WSDL for response schema validation. A: I case you still need this (valid for SOAP UI version 2....
{ "language": "en", "url": "https://stackoverflow.com/questions/317017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can I use Extension Methods to implement an Interface? I would like a class to implement an interface, I do not want to change the original class (that would add undesired dependecies). I know I could inherit from the class and make it's child implement these methods, but then I am faced with a problem how to conver...
{ "language": "en", "url": "https://stackoverflow.com/questions/317026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Object Oriented MySQL Statements, PHP So far i have got the code below which works lovely when trying an update, delete or select statement. However I run into problems when I try to use an insert. If someone could point me in the correct direction i would be grateful. private function escape($value) { if(get_ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/317029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How capture event for browser closing in web applications? When a web application running and on close the browser window then which event raise? A: onunload is the event raised when closing the browser window. How ever this event isn't fired only when closing the browser, that's just one case. A: The web browser...
{ "language": "en", "url": "https://stackoverflow.com/questions/317042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why doesn't your company contribute back to open source? Contributing to open source can have many forms: working with issue trackers, patches, further development, documenting, funding, etc. Assuming your company uses open source projects, what is the single most important reason why you're not contributing back to...
{ "language": "en", "url": "https://stackoverflow.com/questions/317046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Random Number Generator: Class level or Method level? When using a Random Number Generator, which is the better way to use it for greater randomness of the new value: * *Have a method that instantiates a new instance of the RNG each time and then returns a value? *Have an instance of the RNG at the class level, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Regular expression for extracting tag attributes I'm trying to extract the attributes of a anchor tag (<a>). So far I have this expression: (?<name>\b\w+\b)\s*=\s*("(?<value>[^"]*)"|'(?<value>[^']*)'|(?<value>[^"'<> \s]+)\s*)+ which works for strings like <a href="test.html" class="xyz"> and (single quotes) <a hre...
{ "language": "en", "url": "https://stackoverflow.com/questions/317053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: How to convert from Parent to Child? I have a class in my domain model called JobPlan this class is stored / retrieved via ORM and used on various places. I am creating a view that shows a treelist of this class and the treelist needs this class to implement certain interface (the interface comes from a 3rd party...
{ "language": "en", "url": "https://stackoverflow.com/questions/317058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Optimizing iPhone Application Launch Time As anyone with an iPhone knows, some applications launch quickly, while others take several seconds. What are the best techniques for ensuring an iPhone app launches and becomes usable in a snappy manner? A: I use lots of external resources, so I use Lazy loading to get up ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: SharePoint - Custom Dataview - Link Rendering Issues I have a custom SharePoint page with several dataviews. The dataviews essentially filter documents matching a certain criteria from a document library and display a link to the document along with some other meta data. The problem I have is that when a document ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/317067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Javascript: how do I determine if a link targets the same domain as the page it resides on? For the purposes of tracking non-HTML documents via google analytics, I need the mentioned algorithm. It should: * *not hard-code the domain *ignore the protocol (i.e. http/https) *not worry about the presence/absence of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I find out which process is locking a file using .NET? I've seen several of answers about using Handle or Process Monitor, but I would like to be able to find out in my own code (C#) which process is locking a file. I have a nasty feeling that I'm going to have to spelunk around in the win32 API, but if anyon...
{ "language": "en", "url": "https://stackoverflow.com/questions/317071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "183" }
Q: Best strategy to get coding prepared for unit testing I have a solution that is missing a lot of code coverage. I need to refactor this code to decouple to begin to create unit tests. What is the best strategy? I am first thinking that I should push to decouple business logic from data access from businessobjects...
{ "language": "en", "url": "https://stackoverflow.com/questions/317074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Comparing .Net Version instance using CompareTo does not work as expected The Version class in .Net does not implement the CompareTo interface as I would expect, it seems to handle the compare alphanumerically instead of comparing the four numbers. Maybe not a bug, but a 'feature'. Can anyone shine a light on why th...
{ "language": "en", "url": "https://stackoverflow.com/questions/317084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Do you have data how Alfresco Community behaves with many users connected? (100>) My company is going to use Alfresco as a intranet. I think it's not fastest application and wonder if it can work with few hundred users expected. Do you have any experience using it with such or larger group? A: I work for Alfresco, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: boost lambda for_each / transform puzzle Does anybody know why vector<int> test(10); int a=0; for_each(test.begin(),test.end(),(_1+=var(a),++var(a))); for_each(test.begin(),test.end(),(cout << _1 << " ")); cout << "\n" Gives : "0 1 2 3 4 5 6 7 8 9" but transform(test.begin(),test.end(),test.begin(),...
{ "language": "en", "url": "https://stackoverflow.com/questions/317087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to optimize access of this Data? I have a table which consists of 200 Companies Stock prices for 5 years. This is one large table which consists of Company Name, Stock Open, High, Low, Close, Date I am now required to do some processing on the same and also let users [up to 10] access this database to fetch repo...
{ "language": "en", "url": "https://stackoverflow.com/questions/317089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I add options to a DropDownList using jQuery? As the question says, how do I add a new option to a DropDownList using jQuery? Thanks A: Add item to list in the begining $("#ddlList").prepend('<option selected="selected" value="0"> Select </option>'); Add item to list in the end $('<option value="6">Java Scr...
{ "language": "en", "url": "https://stackoverflow.com/questions/317095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "301" }
Q: Determine the source DataContext for a Linq to Sql query In my application I have several DataContexts that connects to different databases with different schemas. In a custom user control I display the results of the query and let the user edit them, and when the user edits the data I want to persist the changes to...
{ "language": "en", "url": "https://stackoverflow.com/questions/317114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is a cool wallpaper or background (if any) for a Main Application Window? Does the opening Window enhance an application's attractiveness? Should it be a picture or bland Blue and White? A: Use the default OS theme colors. Anything else will be attractive to certain groups of people, and ugly to others (who w...
{ "language": "en", "url": "https://stackoverflow.com/questions/317118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CVSROOT environment How to set the CVSROOT environment variable in WinCVS? A: The simple answer is: You don't need to. The CVSROOT environment variable is terribly overrated. CVS(NT) will only use it if all other methods of determining the repository connection string have been exhausted. People often assume that i...
{ "language": "en", "url": "https://stackoverflow.com/questions/317127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to build up an XML document in .NET? There seem to be many options to create an XML document in .NET. What's the best approach? A: If you simply need to generate XML (no parsing or editing needed) the fastest way to do this is using an XmlWriter (It's more elegant and faster than your second ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/317134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Get dimensions of JPEG in C++ I need to get the image dimensions of a JPEG in C++. I'm looking for either a fairly simple way to do it or a smallish library that provides that functionality. I'm working in C++ on OpenVMS, so any external libraries may have to be adapted to compile on our systems - so please don't po...
{ "language": "en", "url": "https://stackoverflow.com/questions/317140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: NHibernate Many-to-many I have a legacy database and I am trying to create a NHibernate DAL. I have a problem with a mapping on Many-To-Many table. The Database tables: * *studio_Subscribers *studio_Groups (contains a IList of Subscribers) *studio_Subscribers_Groups - Many-To-Many table with primary keys The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Best resource for memory footprint analysis for winforms app . So we have a winforms app that in the task manager should anywhere from 250 - 450 MB of memory. We are trying to figure out the best place to focus on to reduce memory footprint. what is the best place to start? A: I would suggest profiling so you ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/317156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Object Oriented design for PHP application For our school project, we are tasked to define a design document describing the architecture of a PHP application. We are free te decide what to include in the document. Our professor suggested, lots of (UML) diagrams. He also asked us to consider class diagrams, but with...
{ "language": "en", "url": "https://stackoverflow.com/questions/317167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I change HTML attribute names with jQuery? I would like to change all the names of the attributes where class="testingCase" throughout all my whole html document. e.g. Change: <a class="testingCase" href="#" title="name of testing case">Blabla</a> <a class="testingCase" href="#" title="name of another testin...
{ "language": "en", "url": "https://stackoverflow.com/questions/317170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: What replaces .htaccess on IIS/ASP.NET sites? On Apache/PHP sites if I want to put a senstive file within my website folders, I put a .htaccess file in that folder so users can't download the sensitive file. Is there a similar practice for IIS/ASP.NET sites, i.e. if I have a shared hosting account and don't have acc...
{ "language": "en", "url": "https://stackoverflow.com/questions/317175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to performance test nested Sybase stored procedures? I am looking for any tool which will allow the performance testing/tuning of Sybase nested stored procedures. There are many tools around and of course Sybase's own for performance tuning and testing SQL but none of these can handle nested stored procedures (i...
{ "language": "en", "url": "https://stackoverflow.com/questions/317176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sql 2008 exceptionally slow in Vista 64 Our database server is a SQL 2008 server. My colleagues all have XP service 2 installed with Sql 2008 Management studio and they have absolutely no performance issues. I however am running Vista x64 (Ultimate) and when I open the 2008 Management studio it's impossibly slow. It...
{ "language": "en", "url": "https://stackoverflow.com/questions/317183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# USING keyword - when and when not to use it? I'd like to know when i should and shouldn't be wrapping things in a USING block. From what I understand, the compiler translates it into a try/finally, where the finally calls Dispose() on the object. I always use a USING around database connections and file access, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/317184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Using dates in the "where" clause of HQL query I am using the SQLite database and have the following persistent class (simplified): public class Project { public virtual int Id { get; set; } public virtual DateTime StartDate { get; set; } } which is mapped to this table in the database: CREATE TABLE project...
{ "language": "en", "url": "https://stackoverflow.com/questions/317190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Find a localized file In my asp.net app a user can upload several localized images (of buttons) . For example, he will upload 'send.gif', 'send.fr.gif', 'send.en-UK,gif; etc.. When a visitor is coming to his page, I need to pick up the right file based on the visitor's locale. Is there an api (or simple way) to fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/317191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Marking latest news as ... "new" On some websites or forums I usually go to, entries that I havn't read yet are marked as "new". I would like to implement this feature on a website I have developed (with news being posted from time to time) -- php/mySQL. How is this usually done ? Does it require using a cookie reme...
{ "language": "en", "url": "https://stackoverflow.com/questions/317194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Performing Interactive queries in MySQL (mainly from the GUI) I mainly use the MySQL GUI tools. This allows me to easily see the results in a table as well as to quick edits and bookmark frequently run queries. This suits my needs far better than the command line. I remember when I used to do this on Oracle DBs year...
{ "language": "en", "url": "https://stackoverflow.com/questions/317198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: string interning memory where is a good resource on string interning . . how do i know if my app is a good candidate for string interning to help with memory footprint? A: Interning is done automatically by the runtime. http://msdn.microsoft.com/en-us/library/system.string.isinterned.aspx
{ "language": "en", "url": "https://stackoverflow.com/questions/317204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I develop a Web based application in ASP.NET 3.5 that can be viewed on an iPhone 3G? I want to develop a mobile web application using asp.net 3.5 that can be viewed on an iPhone but there is no longer a template in VS2008 to enable mobile development. Can this be done ? A: the iphone uses the "regular" versi...
{ "language": "en", "url": "https://stackoverflow.com/questions/317221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET MVC Form Post <form action="/Villa/Add" method="post"> <table> <tr> <td> Name: </td> <td> <%= Html.TextBox("name") %> <%= Html.ValidationMessage("Name") %> </td> </tr> <tr> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Query to get time consuming sql statements in SQL Server How can we get information regarding poorly performing sqls(taking too much time for execution) Does MS SQL server maintains tables/views (Similar to v$sql in Oracle) for storing sql queries. A: I Use the SQL Profiler to collect statistic data wich I then can...
{ "language": "en", "url": "https://stackoverflow.com/questions/317242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Printing from the web at client side How can we print using print document so that we can control the printer paper size? * *It must be controlled after web hosting is done without the print dialog popup or javascript popup. *It should print on the client's printer after webhosting without the print dialog opti...
{ "language": "en", "url": "https://stackoverflow.com/questions/317256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: why not partial class to build the ViewModel in MVVM pattern? Why not use partial class to build the ViewModel? Since the definition of viewmodel classes have some definition of the data classes of datamodel, why not try to reduce some work, extending or making partial classes of the datamodel, completing them with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/317258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }