qid
stringlengths
13
35
query
stringlengths
12
186k
answer_pids
sequencelengths
1
214
dataset
stringclasses
12 values
stackoverflow_Query_1711
Select ..... where .... OR | Is there a way to select data where any one of multiple conditions occur on the same field? Example: I would typically write a statement such as: ``` select * from TABLE where field = 1 or field = 2 or field = 3 ``` Is there a way to instead say something like: ``` select * from TABLE where field = 1 || 2 || 3 ``` Any help is appreciated.
[ "stackoverflow_Passage_6479", "stackoverflow_Passage_6480", "stackoverflow_Passage_6481", "stackoverflow_Passage_6482", "stackoverflow_Passage_6483", "stackoverflow_Passage_6488", "stackoverflow_Passage_9224", "stackoverflow_Passage_1016483" ]
stackoverflow
stackoverflow_Query_676
What is the best way to draw skinnable "buttons" in a video game? | I'm looking for ideas on how to draw a skinnable "button" in a game application. If I use a fixed sprite non-vector image for the button background, then I can't size the button easily. If I write code to draw a resizable button (like Windows buttons are drawn), then the programmer has to get involved -- and it makes skinning difficult. Another option is to break the button into 9 smaller images (3x3) and stretch them all -- kindof like rounded corners are done in HTML. Is there another "easier" way? What's the best approach?
[ "stackoverflow_Passage_2287", "stackoverflow_Passage_8552", "stackoverflow_Passage_10011", "stackoverflow_Passage_12417" ]
stackoverflow
stackoverflow_Query_64
Programmatically launch IE Mobile favorites screen | Is there any way to launch IE Mobile's "Favorites" screen directly by specifying any command line parameter?
[ "stackoverflow_Passage_410", "stackoverflow_Passage_8243", "stackoverflow_Passage_50559" ]
stackoverflow
stackoverflow_Query_138
How to make subdomain user accounts in a webapp | I am looking to allow users to control of subdomain of an app I am toying with, much like Basecamp where it is `customusername.seework.com`. What is required on the `DNS` end to allow these to be created dynamically and be available instantly. And how do you recommend dealing with this in the logic of the site? `Htaccess` rule to lookup the subdomain in the `DB`?
[ "stackoverflow_Passage_334", "stackoverflow_Passage_335", "stackoverflow_Passage_341", "stackoverflow_Passage_1231", "stackoverflow_Passage_12761" ]
stackoverflow
stackoverflow_Query_468
Why should I learn Lisp? | I really feel that I should learn [Lisp](http://en.wikipedia.org/wiki/Lisp_(programming_language)) and there are plenty of good resources out there to help me do it. I'm not put off by the complicated syntax, but where in "traditional commercial programming" would I find places it would make sense to use it instead of a procedural language. Is there a commercial killer-app out there that's been written in Lisp ?
[ "stackoverflow_Passage_1454", "stackoverflow_Passage_1455", "stackoverflow_Passage_1456", "stackoverflow_Passage_1458", "stackoverflow_Passage_1459", "stackoverflow_Passage_1462", "stackoverflow_Passage_2809", "stackoverflow_Passage_2842", "stackoverflow_Passage_2846", "stackoverflow_Passage_2898", "stackoverflow_Passage_2908", "stackoverflow_Passage_4754", "stackoverflow_Passage_6391", "stackoverflow_Passage_6430", "stackoverflow_Passage_8197", "stackoverflow_Passage_8198", "stackoverflow_Passage_8199", "stackoverflow_Passage_8207", "stackoverflow_Passage_8803", "stackoverflow_Passage_9798", "stackoverflow_Passage_9801", "stackoverflow_Passage_9928", "stackoverflow_Passage_10696", "stackoverflow_Passage_10873", "stackoverflow_Passage_11474", "stackoverflow_Passage_11480", "stackoverflow_Passage_11488", "stackoverflow_Passage_11554", "stackoverflow_Passage_13224", "stackoverflow_Passage_97885" ]
stackoverflow
stackoverflow_Query_120
How do I fix 'Unprocessed view path found' error with ExceptionNotifier plugin in rails 2.1? | After upgrading a rails 1.2 website to 2.1, the [ExceptionNotifier plugin](http://agilewebdevelopment.com/plugins/exception_notifier) no longer works, complaining about this error: > > ActionView::TemplateFinder::InvalidViewPath: Unprocessed view path > found: > "/path/to/appname/vendor/plugins/exception\_notification/lib/../views". > Set your view paths with #append\_view\_path, #prepend\_view\_path, or #view\_paths=. > > > What causes it and how do I fix it?
[ "stackoverflow_Passage_282", "stackoverflow_Passage_10909", "stackoverflow_Passage_11504" ]
stackoverflow
stackoverflow_Query_1292
Productivity gains of using CASE tools for development | I was using a CASE called [MAGIC](http://www.magicsoftware.com/) for a system I'm developing, I've never used this kind of tool before and at first sight I liked, a month later I had a lot of the application generated, I felt very productive and ... I would say ... satisfied. In some way a felt uncomfortable, cause, there is no code and everything I was used to, but in the other hand I could speed up my developing. The fact is that eventually I returned to use C# because I find it more flexible to develop, I can make unit testing, use CVS, I have access to more resources and basically I had "all the control". I felt that this tool didn't give me confidence and I thought that later in the project I could not manage it due to its forced established rules of development. And also a lot of things like sending emails, using my own controls, and other things had their complication, it seemed that at some point it was not going to be as easy as initially I thought and as initially the product claims. This reminds me a very nice article called "[No Silver Bullet](http://www.virtualschool.edu/mon/SoftwareEngineering/BrooksNoSilverBullet.html)". This CASE had its advantages but on the other hand it doesn't have resources you can consult and actually the license and certification are very expensive. For me another dissapointing thing is that because of its simplistic approach for development I felt scared on first hand cause of my unexperience on these kind of tools and second cause I thought that if I continued using it maybe it would have turned to be a complex monster that I could not manage later in the project. I think it's good to use these kind of solutions to speed up things but I wonder, why aren't these programs as popular as VS.Net, J2EE, Ruby, Python, etc. if they claim to enhance productivity better than the tools I've pointed?
[ "stackoverflow_Passage_4749", "stackoverflow_Passage_4750", "stackoverflow_Passage_4858", "stackoverflow_Passage_6498", "stackoverflow_Passage_8710" ]
stackoverflow
stackoverflow_Query_1449
Building Standalone Applications in JavaScript | With the increased power of JavaScript frameworks like YUI, JQuery, and Prototype, and debugging tools like Firebug, doing an application entirely in browser-side JavaScript looks like a great way to make simple applications like puzzle games and specialized calculators. Is there any downside to this other than exposing your source code? How should you handle data storage for this kind of program? Edit: yes, Gears and cookies can be used for local storage, but you can't easily get access to files and other objects the user already has around. You also can't save data to a file for a user without having them invoke some browser feature like printing to PDF or saving page as a file.
[ "stackoverflow_Passage_5333", "stackoverflow_Passage_5341", "stackoverflow_Passage_5347", "stackoverflow_Passage_5349", "stackoverflow_Passage_5359", "stackoverflow_Passage_5368", "stackoverflow_Passage_5380", "stackoverflow_Passage_5395", "stackoverflow_Passage_5911", "stackoverflow_Passage_8932", "stackoverflow_Passage_9034", "stackoverflow_Passage_10157", "stackoverflow_Passage_11236", "stackoverflow_Passage_12864", "stackoverflow_Passage_13167" ]
stackoverflow
stackoverflow_Query_145
Catching SQL Injection and other Malicious Web Requests | I am looking for a tool that can detect malicious requests (such as obvious SQL injection gets or posts) and will immediately ban the IP address of the requester/add to a blacklist. I am aware that in an ideal world our code should be able to handle such requests and treat them accordingly, but there is a lot of value in such a tool even when the site is safe from these kinds of attacks, as it can lead to saving bandwidth, preventing bloat of analytics, etc. Ideally, I'm looking for a cross-platform (`LAMP/.NET`) solution that sits at a higher level than the technology stack; perhaps at the web-server or hardware level. I'm not sure if this exists, though. Either way, I'd like to hear the community's feedback so that I can see what my options might be with regard to implementation and approach.
[ "stackoverflow_Passage_366", "stackoverflow_Passage_372", "stackoverflow_Passage_375", "stackoverflow_Passage_378", "stackoverflow_Passage_389", "stackoverflow_Passage_719", "stackoverflow_Passage_9980", "stackoverflow_Passage_489505" ]
stackoverflow
stackoverflow_Query_14
Best way to allow plugins for a PHP application | I am starting a new web application in PHP and this time around I want to create something that people can extend by using a plugin interface. How does one go about writing 'hooks' into their code so that plugins can attach to specific events?
[ "stackoverflow_Passage_24", "stackoverflow_Passage_25", "stackoverflow_Passage_54", "stackoverflow_Passage_77", "stackoverflow_Passage_10309", "stackoverflow_Passage_10314", "stackoverflow_Passage_10722", "stackoverflow_Passage_12306", "stackoverflow_Passage_305351" ]
stackoverflow
stackoverflow_Query_1966
Executing JavaScript from Flex: Is this javascript function dangerous? | I have a flex application that needs the ability to generate and execute JavaScript. When I say this, I mean I need to execute raw JavaScript that I create in my Flex application (not just an existing JavaScript method) I am currently doing this by exposing the following JavaScript method: ``` function doScript(js){ eval(js);} ``` I can then do something like this in Flex (note: I am doing something more substantial then an alert box in the real Flex app): ``` ExternalInterface.call("doScript","alert('foo')); ``` My question is does this impose any security risk, I am assuming it's not since the Flex and JasvaScript all run client side... Is there a better way to do this?
[ "stackoverflow_Passage_7476", "stackoverflow_Passage_7499", "stackoverflow_Passage_7505", "stackoverflow_Passage_7532", "stackoverflow_Passage_9525", "stackoverflow_Passage_9795", "stackoverflow_Passage_799362" ]
stackoverflow
stackoverflow_Query_1205
Why was the Profile provider not built into Web Apps? | If you create an ASP.NET web file project you have direct access to the Profile information in the web.config file. If you convert that to a Web App and have been using ProfileCommon etc. then you have to jump through a whole bunch of hoops to get your web app to work. Why wasn't the Profile provider built into the ASP.NET web app projects like it was with the web file projects?
[ "stackoverflow_Passage_4314", "stackoverflow_Passage_8564", "stackoverflow_Passage_11991" ]
stackoverflow
stackoverflow_Query_471
MOSS SSP Issue - Failed database logons from deleted SSP | We've been having some issues with a SharePoint instance in a test environment. Thankfully this is not production ;) The problems started when the disk with the SQL Server databases and search index ran out of space. Following this, the search service would not run and search settings in the SSP were not accessible. Reclaiming the disk space did not resolve the issue. So rather than restoring the VM, we decided to try to fix the issue. We created a new SSP and changed the association of all services to the new SSP. The old SSP and it's databases were then deleted. Search results for PDF files are no longer appearing, but the search works fine otherwise. MySites also works OK. Following the implementation of this change, these problems occur: > > 1) An audit failure message started appearing in the application event log, for 'DOMAIN\SPMOSSSvc' which is the MOSS farm account. > > > ``` Event Type: Failure Audit Event Source: MSSQLSERVER Event Category: (4) Event ID: 18456 Date: 8/5/2008 Time: 3:55:19 PM User: DOMAIN\SPMOSSSvc Computer: dastest01 Description: Login failed for user 'DOMAIN\SPMOSSSvc'. [CLIENT: <local machine>] ``` > > 2) SQL Server profiler is showing queries from SharePoint that reference the old > (deleted) SSP database. > > > So... * Where would these references to DOMAIN\SPMOSSSvc and the old SSP database exist? * Is there a way to 'completely' remove the SSP from the server, and re-create? The option to delete was not available (greyed out) when a single SSP is in place.
[ "stackoverflow_Passage_1666", "stackoverflow_Passage_2248", "stackoverflow_Passage_10429", "stackoverflow_Passage_11025" ]
stackoverflow
stackoverflow_Query_1134
Inheritance and Polymorphism - Ease of use vs Purity | In a project our team is using object lists to perform mass operations on sets of data that should all be processed in a similar way. In particular, different objects would ideally act the same, which would be very easily achieved with polymorphism. The problem I have with it is that inheritance implies the *is a* relationship, rather than the *has a* relationship. For example, several objects *have a* damage counter, but to make this easy to use in an object list, polymorphism could be used - except that would imply an *is a* relationship which wouldn't be true. (A person *is not a* damage counter.) The only solution I can think of is to have a member of the class return the proper object type when implicitly casted instead of relying on inheritance. Would it be better to forgo the *is a* / *has a* ideal in exchange for ease of programming? Edit: To be more specific, I am using C++, so using polymorphism would allow the different objects to "act the same" in the sense that the derived classes could reside within a single list and be operated upon by a virtual function of the base class. The use of an interface (or imitating them via inheritance) seems like a solution I would be willing to use.
[ "stackoverflow_Passage_4000", "stackoverflow_Passage_4001", "stackoverflow_Passage_4002", "stackoverflow_Passage_4003", "stackoverflow_Passage_4005", "stackoverflow_Passage_4006", "stackoverflow_Passage_4011", "stackoverflow_Passage_4037", "stackoverflow_Passage_8448", "stackoverflow_Passage_9941", "stackoverflow_Passage_13026" ]
stackoverflow
stackoverflow_Query_1204
Windows/C++: How do I determine the share name associated with a shared drive? | Let's say I have a drive such as **C:\**, and I want to find out if it's shared and what it's share name (e.g. **C$**) is. To find out if it's shared, I can use [NetShareCheck](https://learn.microsoft.com/en-us/windows/desktop/api/Lmshare/nf-lmshare-netsharecheck). How do I then map the drive to its share name? I thought that [NetShareGetInfo](https://learn.microsoft.com/en-us/windows/desktop/api/Lmshare/nf-lmshare-netsharegetinfo) would do it, but it looks like that takes the share name, not the local drive name, as an input.
[ "stackoverflow_Passage_4312", "stackoverflow_Passage_4329", "stackoverflow_Passage_4458", "stackoverflow_Passage_8563" ]
stackoverflow
stackoverflow_Query_43
Upgrading SQL Server 6.5 | Yes, I know. The existence of a running copy of `SQL Server 6.5` in 2008 is absurd. That stipulated, what is the best way to migrate from `6.5` to `2005`? Is there any direct path? Most of the documentation I've found deals with upgrading `6.5` to `7`. Should I forget about the native `SQL Server` upgrade utilities, script out all of the objects and data, and try to recreate from scratch? I was going to attempt the upgrade this weekend, but server issues pushed it back till next. So, any ideas would be welcomed during the course of the week. *Update. This is how I ended up doing it:* * Back up the database in question and Master on `6.5`. * Execute `SQL Server 2000`'s `instcat.sql` against `6.5`'s Master. This allows `SQL Server 2000`'s OLEDB provider to connect to `6.5`. * Use `SQL Server 2000`'s standalone `"Import and Export Data"` to create a DTS package, using `OLEDB` to connect to 6.5. This successfully copied all `6.5`'s tables to a new `2005` database (also using `OLEDB`). * Use `6.5`'s Enterprise Manager to script out all of the database's indexes and triggers to a .sql file. * Execute that .sql file against the new copy of the database, in 2005's Management Studio. * Use 6.5's Enterprise Manager to script out all of the stored procedures. * Execute that `.sql` file against the `2005` database. Several dozen sprocs had issues making them incompatible with `2005`. Mainly `non-ANSI joins` and `quoted identifier issues`. * Corrected all of those issues and re-executed the `.sql` file. * Recreated the `6.5`'s logins in `2005` and gave them appropriate permissions. There was a bit of rinse/repeat when correcting the stored procedures (there were hundreds of them to correct), but the upgrade went great otherwise. Being able to use Management Studio instead of `Query Analyzer` and `Enterprise Manager 6.5` is such an amazing difference. A few report queries that took 20-30 seconds on the `6.5 database` are now running in 1-2 seconds, without any modification, new indexes, or anything. I didn't expect that kind of immediate improvement.
[ "stackoverflow_Passage_74", "stackoverflow_Passage_197", "stackoverflow_Passage_254", "stackoverflow_Passage_258", "stackoverflow_Passage_269" ]
stackoverflow
stackoverflow_Query_692
User authentication on Resin webserver | I'm currently tasked with replacing an `Apache` + `Resin` Java web server with a `Resin-only` configuration. Currently in our apache setup, we use .htaccess and a small user database to provide passwording at a directory level. Does anyone know the equivalent setup when using just `Resin` as the web server?
[ "stackoverflow_Passage_2281", "stackoverflow_Passage_7229" ]
stackoverflow
stackoverflow_Query_131
Ensuring that Exceptions are always caught | Exceptions in C++ don't need to be caught (no compile time errors) by the calling function. So it's up to the developer's judgment whether to catch them using try/catch (unlike in Java). Is there a way one can ensure that the exceptions thrown are always caught using try/catch by the calling function?
[ "stackoverflow_Passage_312", "stackoverflow_Passage_412", "stackoverflow_Passage_415", "stackoverflow_Passage_423", "stackoverflow_Passage_533", "stackoverflow_Passage_1108", "stackoverflow_Passage_10671", "stackoverflow_Passage_732815" ]
stackoverflow
stackoverflow_Query_460
How do you create your own moniker (URL Protocol) on Windows systems? | How do you create your own custom moniker (or URL Protocol) on Windows systems? Examples: * http: * mailto: * service:
[ "stackoverflow_Passage_1421", "stackoverflow_Passage_1424", "stackoverflow_Passage_4649", "stackoverflow_Passage_8975" ]
stackoverflow
stackoverflow_Query_507
Upload form does not work in Firefox 3 with Mac OS X? | Today, I ran into this weird problem with a user using Mac OS X. This user always had a failed upload. The form uses a regular "input type=file". The user could upload using any browser except Firefox 3 on his Mac. Only this particular user was seeing this error. Obviously, the problem is only with this one particular user.
[ "stackoverflow_Passage_1540", "stackoverflow_Passage_1546", "stackoverflow_Passage_5088" ]
stackoverflow
stackoverflow_Query_247
Auto Generate Database Diagram MySQL | I'm tired of opening Dia and creating a database diagram at the beginning of every project. Is there a tool out there that will let me select specific tables and then create a database diagram for me based on a MySQL database? Preferably it would allow me to edit the diagram afterward since none of the foreign keys are set... Here is what I am picturing diagram-wise (please excuse the horrible data design, I didn't design it. Let's focus on the diagram concept and not on the actual data it represents for this example ;) ): ![diagram](https://i.stack.imgur.com/lxvlR.jpg) [see full size diagram](https://i.stack.imgur.com/ZnN2O.png)
[ "stackoverflow_Passage_672", "stackoverflow_Passage_673", "stackoverflow_Passage_684", "stackoverflow_Passage_2494", "stackoverflow_Passage_10568", "stackoverflow_Passage_12530", "stackoverflow_Passage_12752", "stackoverflow_Passage_56616", "stackoverflow_Passage_57532", "stackoverflow_Passage_154235", "stackoverflow_Passage_188484", "stackoverflow_Passage_219666", "stackoverflow_Passage_451564", "stackoverflow_Passage_484797", "stackoverflow_Passage_506132" ]
stackoverflow
stackoverflow_Query_924
Visual Studio 2008 Window layout annoyance | I'm having a weird issue with Visual Studio 2008. Every time I fire it up, the solution explorer is about an inch wide. It's like it can't remember it's layout settings. Every un-docked window is in the position I place it. But if I dock a window, it's position is saved, but it's size will be reset to very-narrow (around an inch) when I load. I've never come across this before and it's pretty annoying. Any ideas? The things I've tried: * Saving, then reloading settings via Import/Export. * Resetting all environment settings via Import/Export. * Window -> Reset Window layout. * Comination of rebooting after changing the above. * Installed SP1. No improvement none of which changed the behaviour of docked windows. (Also, definitely no other instances running..) I do run two monitors, but I've had this setup on three different workstations and this is the first time I've come across it.
[ "stackoverflow_Passage_3169", "stackoverflow_Passage_3172", "stackoverflow_Passage_3177", "stackoverflow_Passage_8071" ]
stackoverflow
stackoverflow_Query_1059
How big would such a database be? | I'm trying to figure out how big a certain database would be (it hasn't been created yet). I know how many rows and what the tables will be. Is there a feature in Oracle that will tell me the size of such a theoretical database? Is there a known math formula I can use? I know there is a feature to determine the size of an existing database, but I want to know how big it will be before I create it.
[ "stackoverflow_Passage_3720", "stackoverflow_Passage_3740", "stackoverflow_Passage_3741", "stackoverflow_Passage_3766", "stackoverflow_Passage_4866", "stackoverflow_Passage_8320" ]
stackoverflow
stackoverflow_Query_897
C# 3.0 auto-properties — useful or not? | *Note: This was posted when I was starting out C#. With 2014 knowledge, I can truly say that auto-properties are among the best things that ever happened to the C# language.* I am used to create my properties in C# using a private and a public field: ``` private string title; public string Title { get { return title; } set { title = value; } } ``` Now, with [.NET](http://en.wikipedia.org/wiki/.NET_Framework) 3.0, we got auto-properties: ``` public string Title { get; set; } ``` I know this is more a philosophical/subjective questions, but is there any reason to use these auto-properties except from saving five lines of code for each field? My personal gripe is that those properties are hiding stuff from me, and I am not a big fan of black magic. In fact, the hidden private field does not even show up in the debugger, which is OK given the fact that the get/set functions do nothing. But when I want to actually implement some getter/setter logic, I have to use the private/public pair anyway. I see the benefit that I save a lot of code (one vs six lines) without losing the ability to change the getter/setter logic later, but then again I can already do that by simply declaring a public field "Public string Title" without the need of the { get; set; } block, thus even saving more code. So, what am I missing here? Why would anyone actually want to use auto-properties?
[ "stackoverflow_Passage_3067", "stackoverflow_Passage_3068", "stackoverflow_Passage_3069", "stackoverflow_Passage_3070", "stackoverflow_Passage_3085", "stackoverflow_Passage_3107", "stackoverflow_Passage_3150", "stackoverflow_Passage_4863", "stackoverflow_Passage_4865", "stackoverflow_Passage_4875", "stackoverflow_Passage_7148", "stackoverflow_Passage_8007", "stackoverflow_Passage_8422", "stackoverflow_Passage_8772", "stackoverflow_Passage_9440", "stackoverflow_Passage_10959", "stackoverflow_Passage_11532", "stackoverflow_Passage_11533" ]
stackoverflow
stackoverflow_Query_764
Printing from a .NET Service | I am working on a project right now that involves receiving a message from another application, formatting the contents of that message, and sending it to a printer. The technology of choice is C# windows service. The output could be called a report, I suppose, but a reporting engine is not necessary. A simple templating engine, like StringTemplate, or even XSLT outputting HTML would be fine. The problem I'm having is finding a free way to print this kind of output from a service. Since it *seems* that it will work, I'm working on a prototype using Microsoft's RDLC, populating a local report and then rendering it as an image to a memory stream, which I will then print. Issues with that are: * Multi-page printing will be a big headache. * Still have to use PrintDocument to print the memory stream, which is unsupported in a Windows Service (though it may work - haven't gotten that far with the prototype yet) * If the data coming across changes, I have to change the dataset and the class that the data is being deserialized into. bad bad bad. Has anyone had to do anything remotely like this? Any advice? I already posted a question about printing HTML without user input, and after wasting about 3 days on that, I have come to the conclusion that it cannot be done, at least not with any freely available tool. All help is appreciated. EDIT: We are on version 2.0 of the .NET framework.
[ "stackoverflow_Passage_2554", "stackoverflow_Passage_2578", "stackoverflow_Passage_2582", "stackoverflow_Passage_2606", "stackoverflow_Passage_2627", "stackoverflow_Passage_7766", "stackoverflow_Passage_10942", "stackoverflow_Passage_10944", "stackoverflow_Passage_10945", "stackoverflow_Passage_11146", "stackoverflow_Passage_12483", "stackoverflow_Passage_12639" ]
stackoverflow
stackoverflow_Query_1970
List of macOS text editors and code editors | I searched for this and found [Maudite's](https://stackoverflow.com/users/1632/maudite) question about [text editors](https://stackoverflow.com/questions/14155/text-editors#14203) but they were all for Windows. As you have no doubt guessed, I am trying to find out if there are any text/code editors for the Mac besides what I know of. I'll edit my post to include editors listed. ### Free 1. [Textwrangler](http://www.barebones.com/products/textwrangler/) 2. [Xcode](https://developer.apple.com/xcode/) 3. [Mac Vim](https://github.com/macvim-dev/macvim) 4. [Aquamacs](http://aquamacs.org/) and closer to the original [EMacs](http://homepage.mac.com/zenitani/emacs-e.html) 5. [JEdit](http://www.jedit.org/) 6. [Editra](http://editra.org/) 7. [Eclipse](https://www.eclipse.org/) 8. [NetBeans](https://netbeans.org/kb/articles/mac.html) 9. [Kod](http://kodapp.com/) 10. [TextMate2](https://github.com/textmate/textmate#readme) - GPL 11. [Brackets](http://brackets.io/) 12. [Atom.io](https://atom.io/) ### Commercial 1. [Textmate](https://macromates.com/) 2. [BBEdit](http://www.barebones.com/products/bbedit/) 3. [SubEthaEdit](http://www.codingmonkeys.de/subethaedit/) 4. [Coda](http://www.panic.com/coda/) 5. [Sublime Text 2](http://www.sublimetext.com/2) 6. [Smultron](http://smultron.sourceforge.net/) 7. [WebStorm](http://www.jetbrains.com/webstorm/) 8. [Peppermint](http://osxpeppermint.com) ### Articles related to the subject 1. [Faceoff, which is the best text editor ever?](http://mac360.com/index.php/mac360/comments/faceoff_which_is_the_best_text_editor_ever/) 2. [Maceditors.com, mac editors features compared](http://maceditors.com) Thank you everybody that has added suggestions.
[ "stackoverflow_Passage_7478", "stackoverflow_Passage_7483", "stackoverflow_Passage_7484", "stackoverflow_Passage_7486", "stackoverflow_Passage_7487", "stackoverflow_Passage_7488", "stackoverflow_Passage_7489", "stackoverflow_Passage_7490", "stackoverflow_Passage_7491", "stackoverflow_Passage_7495", "stackoverflow_Passage_7498", "stackoverflow_Passage_7536", "stackoverflow_Passage_7590", "stackoverflow_Passage_7600", "stackoverflow_Passage_8517", "stackoverflow_Passage_8678", "stackoverflow_Passage_9510", "stackoverflow_Passage_9806", "stackoverflow_Passage_9811", "stackoverflow_Passage_9829", "stackoverflow_Passage_10140", "stackoverflow_Passage_10148", "stackoverflow_Passage_10150", "stackoverflow_Passage_10151", "stackoverflow_Passage_11082", "stackoverflow_Passage_11311", "stackoverflow_Passage_11581", "stackoverflow_Passage_11596", "stackoverflow_Passage_11748", "stackoverflow_Passage_12001", "stackoverflow_Passage_13212", "stackoverflow_Passage_22611", "stackoverflow_Passage_22612", "stackoverflow_Passage_32983", "stackoverflow_Passage_42084", "stackoverflow_Passage_44406", "stackoverflow_Passage_98897", "stackoverflow_Passage_109438", "stackoverflow_Passage_141808", "stackoverflow_Passage_164433" ]
stackoverflow
stackoverflow_Query_1375
Why are there so few modal-editors that aren't vi*? | Pretty much every other editor that isn't a vi descendant (vim, cream, vi-emu) seems to use the emacs shortcuts (`ctrl`+`w` to delete back a word and so on)
[ "stackoverflow_Passage_5020", "stackoverflow_Passage_5021", "stackoverflow_Passage_5060", "stackoverflow_Passage_5078", "stackoverflow_Passage_5374", "stackoverflow_Passage_8437", "stackoverflow_Passage_8835", "stackoverflow_Passage_11590", "stackoverflow_Passage_11595", "stackoverflow_Passage_11864", "stackoverflow_Passage_13273", "stackoverflow_Passage_13413", "stackoverflow_Passage_349839", "stackoverflow_Passage_482512", "stackoverflow_Passage_1016575" ]
stackoverflow
stackoverflow_Query_1839
How to make a tree in C++? | How do I make a tree data structure in C++ that uses iterators instead of pointers? I couldn't find anything in the STL that can do this. What I would like to do is to be able to create and manipulate trees like this: ``` #include <iostream> #include <tree> using namespace std; int main() { tree<int> myTree; tree<int>::iterator i = myTree.root(); *i = 42; tree<int>::iterator j = i.add_child(); *j = 777; j = j.parent(); if (i == myTree.root() && i == j) cout << "i and j are both pointing to the root\n"; return 0; } ``` --- Thank you, tree.hh seems to be just what I was looking for. > > If this is for gaining the benefit of > a data-structure holding arbitrary > index types, optimized for searching > and good at insertion then consider > using a map. > > > A map is an associative container that > has performance guarantees identical > to those of a tree: logarithmic > searching, logarithmic insertion, > logarithmic deletion, linear space. > Internally they are often implemented > as red-black trees, although that is > not a guarantee. Still, as an STL user > all you should care about is the > performance guarantees of the STL > algorithms and data-structures. > Whether they're implemented as trees > or little green men shouldn't matter > to you. > > > I'm not sure if a map is what I need, but thanks for the info. I will remember to use maps whenever possible instead of implementing trees.
[ "stackoverflow_Passage_6982", "stackoverflow_Passage_6993", "stackoverflow_Passage_9355" ]
stackoverflow
stackoverflow_Query_638
PHP4 to PHP5 Migration | What are some good steps to follow for a smooth migration from PHP4 to PHP5. What are some types of code that are likely to break?
[ "stackoverflow_Passage_2048", "stackoverflow_Passage_2051", "stackoverflow_Passage_2056", "stackoverflow_Passage_6611", "stackoverflow_Passage_7438" ]
stackoverflow
stackoverflow_Query_1460
Setting an ASP.NET Master Page at runtime | I'm working on a site which needs to be able to support two or more looks, changable at runtime. I'd hoped to be able to handle the change with a CSS switch, but it looks like I'll need to use a different masterpage for each design. So, what's the best way to set the masterpage at runtime? Page.MasterPageFile can only be set in the Page.OnPreInit event. It looks like the solutions are to make all my pages inherit from a common base which handles the PreInit event, or to use an HttpModule which does that. Any advice?
[ "stackoverflow_Passage_5381", "stackoverflow_Passage_5384", "stackoverflow_Passage_5385", "stackoverflow_Passage_5401", "stackoverflow_Passage_8935", "stackoverflow_Passage_11919", "stackoverflow_Passage_356222" ]
stackoverflow
stackoverflow_Query_411
Graph serialization | I'm looking for a simple algorithm to 'serialize' a directed graph. In particular I've got a set of files with interdependencies on their execution order, and I want to find the correct order at compile time. I know it must be a fairly common thing to do - compilers do it all the time - but my google-fu has been weak today. What's the 'go-to' algorithm for this?
[ "stackoverflow_Passage_1259", "stackoverflow_Passage_1262", "stackoverflow_Passage_1390", "stackoverflow_Passage_4576", "stackoverflow_Passage_11760" ]
stackoverflow
stackoverflow_Query_1412
How best to use File Version and Assembly Version? | In .NET there are two version numbers available when building a project, File Version and Assembly Version. How are you using these numbers? Keeping them the same? Auto-incrementing one, but manually changing the other? Also what about the `AssemblyInformationalVersion` attribute? I'd found this support Microsoft Knowledge Base (KB) article that provided some help: [How to use Assembly Version and Assembly File Version](http://support.microsoft.com/kb/556041).
[ "stackoverflow_Passage_5182", "stackoverflow_Passage_5190", "stackoverflow_Passage_5206", "stackoverflow_Passage_5207", "stackoverflow_Passage_5248", "stackoverflow_Passage_8885", "stackoverflow_Passage_12841", "stackoverflow_Passage_12842" ]
stackoverflow
stackoverflow_Query_1937
Audio player on Windows Mobile | I'm trying to develop specialized audio player for windows mobile devices (Professional ones). And I've ran into the problem an once. There no compressed audio APIs on WM or I was unable to found house in documentation. Yes there are WM6 Sound API but it cannot even pause playback or seek to specified position. There are allways Windows Media Player on WM device but I've not found it APIs documentation. So the question is: Is there simple way to play, pause, forward, rewind, getting playback position and getting audio file length on *compressed* audio of several popular formats? Any library? platform APIs? Anything?
[ "stackoverflow_Passage_7690", "stackoverflow_Passage_8055", "stackoverflow_Passage_9737" ]
stackoverflow
stackoverflow_Query_1546
C# Include Derived Control in Toolbox | This is in reference to my other question [Auto Clearing Textbox](https://stackoverflow.com/questions/16110/c-auto-clearing-winform-textbox). If I choose to derive a new TextBox control from TextBox instead of implement a user control just containing my Textbox, how would I include that in the toolbox.
[ "stackoverflow_Passage_5715", "stackoverflow_Passage_5724", "stackoverflow_Passage_9041" ]
stackoverflow
stackoverflow_Query_1910
Being as DRY as possible in a Ruby on Rails App | I'm currently using the awesome attachment-fu plugin for a Rails app, but as a novice developer, I've never encountered a scenario like the one I've found myself in. Essentially, I'm using the attachment-fu plugin on two levels. 1. Is for user avatars in the user class. 2. Is to allow file attachments (***PDFs***, etc) in a messaging system. My question is what the best use practice would be in these situations to remain ***DRY***, clear, and consistent. Clearly it would make no sense to define and execute the plugin in both classes, but there's something deeply strange to me (possibly unfounded) about just going ahead and setting it all up in the godly Application class. Is there something in between, or is the parent class the way to go? Thanks!
[ "stackoverflow_Passage_7262", "stackoverflow_Passage_7272", "stackoverflow_Passage_9452", "stackoverflow_Passage_10164", "stackoverflow_Passage_10168", "stackoverflow_Passage_10205", "stackoverflow_Passage_11758" ]
stackoverflow
stackoverflow_Query_433
How do I retrieve my MySQL username and password? | I lost my MySQL username and password. How do I retrieve it?
[ "stackoverflow_Passage_1333", "stackoverflow_Passage_1345", "stackoverflow_Passage_4375", "stackoverflow_Passage_124363", "stackoverflow_Passage_536111", "stackoverflow_Passage_604737", "stackoverflow_Passage_662177", "stackoverflow_Passage_690844", "stackoverflow_Passage_922678", "stackoverflow_Passage_963624", "stackoverflow_Passage_1016618" ]
stackoverflow
stackoverflow_Query_866
Calling Table-Valued SQL Functions From .NET | Scalar-valued functions can be called from .NET as follows: ``` SqlCommand cmd = new SqlCommand("testFunction", sqlConn); //testFunction is scalar cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("retVal", SqlDbType.Int); cmd.Parameters["retVal"].Direction = ParameterDirection.ReturnValue; cmd.ExecuteScalar(); int aFunctionResult = (int)cmd.Parameters["retVal"].Value; ``` I also know that table-valued functions can be called in a similar fashion, for example: ``` String query = "select * from testFunction(param1,...)"; //testFunction is table-valued SqlCommand cmd = new SqlCommand(query, sqlConn); SqlDataAdapter adapter = new SqlDataAdapter(cmd); adapter.Fill(tbl); ``` My question is, can table-valued functions be called as stored procedures, like scalar-valued functions can? (e.g., replicate my first code snippet with a table-valued function being called and getting the returned table through a ReturnValue parameter).
[ "stackoverflow_Passage_2924", "stackoverflow_Passage_7949" ]
stackoverflow
stackoverflow_Query_1242
If you have a Java application that is consuming CPU when it isn't doing anything, how do you determine what it is doing? | I am calling a vendor's Java API, and on some servers it appears that the JVM goes into a low priority polling loop after logging into the API (CPU at 100% usage). The same app on other servers does not exhibit this behavior. This happens on WebSphere and Tomcat. The environment is tricky to set up so it is difficult to try to do something like profiling within Eclipse. Is there a way to profile (or some other method of inspecting) an existing Java app running in Tomcat to find out what methods are being executed while it's in this spinwait kind of state? The app is only executing one method when it gets in this state (vendor's method). Vendor can't replicate the behavior (of course). --- Update: Using JConsole I was able to determine who was running and what they were doing. It took me a few hours to then figure out why it was doing it. The problem ended up being that the vendor's API jar that was being used did not match exactly to the the database configuration that it was using. It was defaulting to having tracing and performance monitoring enabled on the servers that had the slight mis-match in configuration. I used a different jar and all is well. So thanks, Joshua, for your answer. JConsole was extremely easy to setup and use to monitor an existing application. @Cringe - I did some experimenting with some of the options you suggested. I had some problems with getting JProfiler set up, it looks good (but pricey). Going forward I went ahead and added the Eclipse Profiler plugin and I'll be looking over the different open source profilers to compare functionality.
[ "stackoverflow_Passage_4460", "stackoverflow_Passage_4485", "stackoverflow_Passage_4570", "stackoverflow_Passage_5994", "stackoverflow_Passage_7152", "stackoverflow_Passage_7189", "stackoverflow_Passage_7908", "stackoverflow_Passage_8618", "stackoverflow_Passage_10802" ]
stackoverflow
stackoverflow_Query_1080
How to parse XML using vba | I work in VBA, and want to parse a string eg ``` <PointN xsi:type='typens:PointN' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema'> <X>24.365</X> <Y>78.63</Y> </PointN> ``` and get the X & Y values into two separate integer variables. I'm a newbie when it comes to XML, since I'm stuck in VB6 and VBA, because of the field I work in. How do I do this?
[ "stackoverflow_Passage_3822", "stackoverflow_Passage_3841", "stackoverflow_Passage_8356", "stackoverflow_Passage_13335", "stackoverflow_Passage_68475", "stackoverflow_Passage_545320", "stackoverflow_Passage_549378", "stackoverflow_Passage_654238", "stackoverflow_Passage_805913" ]
stackoverflow
stackoverflow_Query_1851
Detecting audio silence in WAV files using C# | I'm tasked with building a .NET client app to detect silence in a WAV files. Is this possible with the built-in Windows APIs? Or alternately, any good libraries out there to help with this?
[ "stackoverflow_Passage_7036", "stackoverflow_Passage_7041", "stackoverflow_Passage_7048", "stackoverflow_Passage_8483", "stackoverflow_Passage_9373", "stackoverflow_Passage_12789", "stackoverflow_Passage_419720", "stackoverflow_Passage_904019", "stackoverflow_Passage_1016670" ]
stackoverflow
stackoverflow_Query_338
Mapping values from two array in Ruby | I'm wondering if there's a way to do what I can do below with Python, in Ruby: ``` sum = reduce(lambda x, y: x + y, map(lambda x, y: x * y, weights, data)) ``` I have two arrays of equal sizes with the weights and data but I can't seem to find a function similar to map in Ruby, reduce I have working.
[ "stackoverflow_Passage_1002", "stackoverflow_Passage_1004", "stackoverflow_Passage_1292", "stackoverflow_Passage_1293", "stackoverflow_Passage_4269", "stackoverflow_Passage_53063", "stackoverflow_Passage_409361" ]
stackoverflow
stackoverflow_Query_1125
Browse for a directory in C# | How can I present a control to the user that allows him/her to select a directory? There doesn't seem to be any native .net controls which do this?
[ "stackoverflow_Passage_3971", "stackoverflow_Passage_3975", "stackoverflow_Passage_3980", "stackoverflow_Passage_8426", "stackoverflow_Passage_113871", "stackoverflow_Passage_668365", "stackoverflow_Passage_978336" ]
stackoverflow
stackoverflow_Query_973
How to return a page of results from SQL? | Many applications have grids that display data from a database table one page at a time. Many of them also let the user pick the number of records per page, sort by any column, and navigate back and forth through the results. What's a good algorithm to implement this pattern without bringing the entire table to the client and then filtering the data on the client. How do you bring just the records you want to display to the user? Does LINQ simplify the solution?
[ "stackoverflow_Passage_3375", "stackoverflow_Passage_3376", "stackoverflow_Passage_3387", "stackoverflow_Passage_3404", "stackoverflow_Passage_4398", "stackoverflow_Passage_4407", "stackoverflow_Passage_8178", "stackoverflow_Passage_9686", "stackoverflow_Passage_379804" ]
stackoverflow
stackoverflow_Query_1351
How to load plugins in .NET? | I'd like to provide some way of creating dynamically loadable plugins in my software. Typical way to do this is using the [LoadLibrary](http://msdn.microsoft.com/en-us/library/ms684175(VS.85).aspx) WinAPI function to load a dll and calling [GetProcAddress](http://msdn.microsoft.com/en-us/library/ms683212(VS.85).aspx) to get an pointer to a function inside that dll. My question is how do I dynamically load a plugin in C#/.Net application?
[ "stackoverflow_Passage_4963", "stackoverflow_Passage_4964", "stackoverflow_Passage_4970", "stackoverflow_Passage_4974", "stackoverflow_Passage_5289", "stackoverflow_Passage_8789", "stackoverflow_Passage_9614", "stackoverflow_Passage_263478", "stackoverflow_Passage_1016645" ]
stackoverflow
stackoverflow_Query_262
How do I split a delimited string so I can access individual items? | Using SQL Server, how do I split a string so I can access item x? Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which should return "John"?
[ "stackoverflow_Passage_728", "stackoverflow_Passage_735", "stackoverflow_Passage_740", "stackoverflow_Passage_742", "stackoverflow_Passage_744", "stackoverflow_Passage_754", "stackoverflow_Passage_2656", "stackoverflow_Passage_11231", "stackoverflow_Passage_127126", "stackoverflow_Passage_204743", "stackoverflow_Passage_270099", "stackoverflow_Passage_272411", "stackoverflow_Passage_284492", "stackoverflow_Passage_289652", "stackoverflow_Passage_328190", "stackoverflow_Passage_349719", "stackoverflow_Passage_383415", "stackoverflow_Passage_386689", "stackoverflow_Passage_412525", "stackoverflow_Passage_441333", "stackoverflow_Passage_459080", "stackoverflow_Passage_498997", "stackoverflow_Passage_501435", "stackoverflow_Passage_528578", "stackoverflow_Passage_538291", "stackoverflow_Passage_542804", "stackoverflow_Passage_549542", "stackoverflow_Passage_561154", "stackoverflow_Passage_655082", "stackoverflow_Passage_658166", "stackoverflow_Passage_685556", "stackoverflow_Passage_755811", "stackoverflow_Passage_757599", "stackoverflow_Passage_795393", "stackoverflow_Passage_904395", "stackoverflow_Passage_942147", "stackoverflow_Passage_967745", "stackoverflow_Passage_972204", "stackoverflow_Passage_979264", "stackoverflow_Passage_1014359", "stackoverflow_Passage_1016426", "stackoverflow_Passage_1016533", "stackoverflow_Passage_1016622", "stackoverflow_Passage_1016673" ]
stackoverflow
stackoverflow_Query_257
What's the best online payment processing solution? | Should be available to non-U.S. companies, easy to setup, reliable, cheap, customizable, etc. What are your experiences?
[ "stackoverflow_Passage_703", "stackoverflow_Passage_706", "stackoverflow_Passage_708", "stackoverflow_Passage_710", "stackoverflow_Passage_718", "stackoverflow_Passage_720", "stackoverflow_Passage_722", "stackoverflow_Passage_749", "stackoverflow_Passage_10456", "stackoverflow_Passage_10490", "stackoverflow_Passage_11063", "stackoverflow_Passage_12279", "stackoverflow_Passage_12472", "stackoverflow_Passage_12473" ]
stackoverflow
stackoverflow_Query_1568
How do you configure VS2008 to only open one webserver in a solution with multiple projects? | Starting with 2005, VS started this behavior of when starting debugging session it spawns up a webserver for every project in a solution. I have a solution with 15 projects so it takes a while and is a waste of resources. Is there a way to configure it differently besides just using IIS?
[ "stackoverflow_Passage_5823", "stackoverflow_Passage_5825", "stackoverflow_Passage_9071", "stackoverflow_Passage_12806", "stackoverflow_Passage_12941", "stackoverflow_Passage_55795" ]
stackoverflow
stackoverflow_Query_1090
How to host a WPF form in a MFC application | I'm looking for any resources on hosting a WPF form within an existing MFC application. Can anyone point me in the right direction on how to do this?
[ "stackoverflow_Passage_3853", "stackoverflow_Passage_8369" ]
stackoverflow
stackoverflow_Query_1557
Fonts on the Web | The collection of fonts available to a web developer is depressingly limited. I remember reading long ago about TrueDoc, as a way of shipping fonts alongside a website - but it seems to have languished. Has anybody used this, or something similar? Is it supported by enough browsers? Am I missing a good solution? Note that a responsible web developer does not use fonts that are only available on Windows (and *especially* ones that are only available on Vista), nor do they use a technology that isn't supported by at least the majority of browsers. --- **Update:** As several people have pointed out, there's nothing wrong with providing a list of fallback fonts for people who don't have the specific font you use. I do in fact always do this, and didn't mean to suggest that this was wrong. While my question was badly phrased, what I meant was that a designer should not make too many assumptions about what the client will have available. You should plan for how all users will see your site, not just for people using your own preferred setup.
[ "stackoverflow_Passage_5767", "stackoverflow_Passage_5769", "stackoverflow_Passage_5770", "stackoverflow_Passage_5854", "stackoverflow_Passage_5893", "stackoverflow_Passage_5897", "stackoverflow_Passage_6577", "stackoverflow_Passage_6616", "stackoverflow_Passage_8264", "stackoverflow_Passage_9056", "stackoverflow_Passage_138494" ]
stackoverflow
stackoverflow_Query_141
Regex: To pull out a sub-string between two tags in a string | I have a file in the following format: ``` Data Data Data [Start] Data I want [End] Data ``` I'd like to grab the `Data I want` from between the `[Start]` and `[End]` tags using a Regex. Can anyone show me how this might be done?
[ "stackoverflow_Passage_345", "stackoverflow_Passage_347", "stackoverflow_Passage_349", "stackoverflow_Passage_1242", "stackoverflow_Passage_6740", "stackoverflow_Passage_9786", "stackoverflow_Passage_12208", "stackoverflow_Passage_232055", "stackoverflow_Passage_355912", "stackoverflow_Passage_507392" ]
stackoverflow
stackoverflow_Query_1671
Privatizing a BlogEngine.Net Installation | I have a blogengine.net install that requires privatization. I'm doing research work at the moment, but I have to keep my blog/journal private until certain conditions are met. How can I privatize my blogEngine.net install so that readers must log in to read my posts?
[ "stackoverflow_Passage_6273", "stackoverflow_Passage_9500", "stackoverflow_Passage_10906", "stackoverflow_Passage_11147", "stackoverflow_Passage_11704", "stackoverflow_Passage_142083" ]
stackoverflow
stackoverflow_Query_995
HowTo Disable WebBrowser 'Click Sound' in your app only | The 'click sound' in question is actually a system wide preference, so I only want it to be disabled when my application has focus and then re-enable when the application closes/loses focus. Originally, I wanted to ask this question here on stackoverflow, but I was not yet in the beta. So, after googling for the answer and finding only a little bit of information on it I came up with the following and decided to post it here now that I'm in the beta. ``` using System; using Microsoft.Win32; namespace HowTo { class WebClickSound { /// <summary> /// Enables or disables the web browser navigating click sound. /// </summary> public static bool Enabled { get { RegistryKey key = Registry.CurrentUser.OpenSubKey(@"AppEvents\Schemes\Apps\Explorer\Navigating\.Current"); string keyValue = (string)key.GetValue(null); return String.IsNullOrEmpty(keyValue) == false && keyValue != "\"\""; } set { string keyValue; if (value) { keyValue = "%SystemRoot%\\Media\\"; if (Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor > 0) { // XP keyValue += "Windows XP Start.wav"; } else if (Environment.OSVersion.Version.Major == 6) { // Vista keyValue += "Windows Navigation Start.wav"; } else { // Don't know the file name so I won't be able to re-enable it return; } } else { keyValue = "\"\""; } // Open and set the key that points to the file RegistryKey key = Registry.CurrentUser.OpenSubKey(@"AppEvents\Schemes\Apps\Explorer\Navigating\.Current", true); key.SetValue(null, keyValue, RegistryValueKind.ExpandString); isEnabled = value; } } } } ``` Then in the main form we use the above code in these 3 events: * Activated * Deactivated * FormClosing ``` private void Form1_Activated(object sender, EventArgs e) { // Disable the sound when the program has focus WebClickSound.Enabled = false; } private void Form1_Deactivate(object sender, EventArgs e) { // Enable the sound when the program is out of focus WebClickSound.Enabled = true; } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { // Enable the sound on app exit WebClickSound.Enabled = true; } ``` The one problem I see currently is if the program crashes they won't have the click sound until they re-launch my application, but they wouldn't know to do that. What do you guys think? Is this a good solution? What improvements can be made?
[ "stackoverflow_Passage_3475", "stackoverflow_Passage_3477", "stackoverflow_Passage_8223", "stackoverflow_Passage_39715", "stackoverflow_Passage_41433", "stackoverflow_Passage_341253" ]
stackoverflow
stackoverflow_Query_1498
Using Visual Studio to develop for C++ for Unix | Does anyone have battle stories to share trying to use Visual Studio to develop applications for Unix? And I'm not talking using .NET with a Mono or Wine virtual platform running beneath. Our company has about 20 developers all running Windows XP/Vista and developing primarily for Linux & Solaris. Until recently we all logged into a main Linux server and modified/built code the good old fashioned way: Emacs, Vi, dtpad - take your pick. Then someone said, "hey - we're living in the Dark Ages, we should be using an IDE". So we tried out a few and decided that Visual Studio was the only one that would meet our performance needs (yes, I'm sure that IDE X is a very nice IDE, but we chose VS). The problem is, how do you setup your environment to have the files available locally to VS, but also available to a build server? We settled with writing a Visual Studio plugin - it writes our files locally and to the build server whenever we hit "Save" and we have a bit fat "sync" button that we can push when our files change on the server side (for when we update to the latest files from our source control server). The plugin also uses Visual Studio's external build system feature that ultimately just ssh's into the build server and calls our local "make" utility (which is Boost Build v2 - has great dependency checking, but is *really* slow to start as a result i.e. 30-60 seconds to begin). The results are piped back into Visual Studio so the developer can click on the error and be taken to the appropriate line of code (quite slick actually). The build server uses GCC and cross-compiles all of our Solaris builds. But even after we've done all this, I can't help but sigh whenever I start to write code in Visual Studio. I click a file, start typing, and VS chugs to catch up with me. Is there anything more annoying than having to stop and wait for your tools? Are the benefits worth the frustration? Thoughts, stories, help?
[ "stackoverflow_Passage_5517", "stackoverflow_Passage_5530", "stackoverflow_Passage_5533", "stackoverflow_Passage_5541", "stackoverflow_Passage_5762", "stackoverflow_Passage_11092", "stackoverflow_Passage_11093", "stackoverflow_Passage_11359", "stackoverflow_Passage_11361", "stackoverflow_Passage_12062", "stackoverflow_Passage_12644", "stackoverflow_Passage_13042", "stackoverflow_Passage_507865" ]
stackoverflow
stackoverflow_Query_175
What is the best way to copy a database? | When I want to make a copy of a database, I always create a new empty database, and then restore a backup of the existing database into it. However, I'm wondering if this is really the least error-prone, least complicated, and most efficient way to do this?
[ "stackoverflow_Passage_457", "stackoverflow_Passage_465", "stackoverflow_Passage_502", "stackoverflow_Passage_507", "stackoverflow_Passage_1792", "stackoverflow_Passage_11871" ]
stackoverflow
stackoverflow_Query_1931
Is there a way to make a constructor only visible to a parent class in C#? | I have a collection of classes that inherit from an abstract class I created. I'd like to use the abstract class as a factory for creating instances of concrete implementations of my abstract class. Is there any way to hide a constructor from all code except a parent class. I'd like to do this basically ``` public abstract class AbstractClass { public static AbstractClass MakeAbstractClass(string args) { if (args == "a") return new ConcreteClassA(); if (args == "b") return new ConcreteClassB(); } } public class ConcreteClassA : AbstractClass { } public class ConcreteClassB : AbstractClass { } ``` But I want to prevent anyone from directly instantiating the 2 concrete classes. I want to ensure that only the MakeAbstractClass() method can instantiate the base classes. Is there any way to do this? **UPDATE** I don't need to access any specific methods of ConcreteClassA or B from outside of the Abstract class. I only need the public methods my Abstract class provides. I don't really need to prevent the Concrete classes from being instantiated, I'm just trying to avoid it since they provide no new public interfaces, just different implementations of some very specific things internal to the abstract class. To me, the simplest solution is to [make child classes as samjudson mentioned](https://stackoverflow.com/questions/20185/is-there-a-way-to-make-a-constructor-only-visible-to-a-parent-class-in-c#20200). I'd like to avoid this however since it would make my abstract class' file a lot bigger than I'd like it to be. I'd rather keep classes split out over a few files for organization. I guess there's no easy solution to this...
[ "stackoverflow_Passage_7348", "stackoverflow_Passage_7349", "stackoverflow_Passage_7360", "stackoverflow_Passage_7374", "stackoverflow_Passage_7378", "stackoverflow_Passage_7386", "stackoverflow_Passage_7399", "stackoverflow_Passage_7931", "stackoverflow_Passage_9471", "stackoverflow_Passage_9640" ]
stackoverflow
stackoverflow_Query_1863
Content Management system recommendations | Management is thinking of changing out Content Management Systems. What do you use/recommend? 1. What UCM solution is your company using? 2. How big is your company? 3. Are you happy with the implementation? Current setup: 1. The company I work for uses `Oracle ECM` (formerly Stellent UCM). 2. We have somewhere over 10,000 employees across Australia, New Zealand and Indonesia. 3. It works! Having worked with the system for a while now. I can see where the initial implementation went wrong. Its 3 years later and it is *Rewrite Time!* (Three year itch?)
[ "stackoverflow_Passage_7087", "stackoverflow_Passage_7093", "stackoverflow_Passage_8085", "stackoverflow_Passage_9745", "stackoverflow_Passage_10683", "stackoverflow_Passage_10685", "stackoverflow_Passage_10686", "stackoverflow_Passage_11012", "stackoverflow_Passage_11013", "stackoverflow_Passage_11014", "stackoverflow_Passage_11401", "stackoverflow_Passage_11402", "stackoverflow_Passage_43152", "stackoverflow_Passage_53097" ]
stackoverflow
stackoverflow_Query_493
What are good regular expressions? | I have worked for 5 years mainly in java desktop applications accessing Oracle databases and I have never used regular expressions. Now I enter Stack Overflow and I see a lot of questions about them; I feel like I missed something. For what do you use regular expressions? P.S. sorry for my bad english
[ "stackoverflow_Passage_1500", "stackoverflow_Passage_1501", "stackoverflow_Passage_1505", "stackoverflow_Passage_1509", "stackoverflow_Passage_4971", "stackoverflow_Passage_5445", "stackoverflow_Passage_5446", "stackoverflow_Passage_8061", "stackoverflow_Passage_8063", "stackoverflow_Passage_12692" ]
stackoverflow
stackoverflow_Query_118
How do you get sudo access for a file inside the vi text editor? | Often while editing config files, I'll open one with vi and then when I go to save it realize that I didn't type ``` sudo vi filename ``` Is there any way to give vi sudo privileges to save the file? I seem to recall seeing something about this while looking up some stuff about vi a while ago, but now I can't find it.
[ "stackoverflow_Passage_276", "stackoverflow_Passage_277", "stackoverflow_Passage_298", "stackoverflow_Passage_852", "stackoverflow_Passage_2973", "stackoverflow_Passage_8864", "stackoverflow_Passage_10247", "stackoverflow_Passage_10664", "stackoverflow_Passage_12025", "stackoverflow_Passage_13055", "stackoverflow_Passage_234377" ]
stackoverflow
stackoverflow_Query_490
LINQ to SQL strings to enums | LINQ to SQL allows table mappings to automatically convert back and forth to Enums by specifying the type for the column - this works for strings or integers. Is there a way to make the conversion case insensitive or add a custom mapping class or extenstion method into the mix so that I can specify what the string should look like in more detail. Reasons for doing so might be in order to supply a nicer naming convention inside some new funky C# code in a system where the data schema is already set (and is being relied upon by some legacy apps) so the actual text in the database can't be changed.
[ "stackoverflow_Passage_1547", "stackoverflow_Passage_5097" ]
stackoverflow
stackoverflow_Query_629
Faster way to find duplicates conditioned by time | In a machine with AIX without `PERL` I need to filter records that will be considered duplicated if they have the same id and if they were registered between a period of four hours. I implemented this filter using `AWK` and work pretty well but I need a solution much faster: ``` # Generar lista de Duplicados awk 'BEGIN { FS="," } /OK/ { old[$8] = f[$8]; f[$8] = mktime($4, $3, $2, $5, $6, $7); x[$8]++; } /OK/ && x[$8]>1 && f[$8]-old[$8] Any suggestions? Are there ways to improve the environment (preloading the file or someting like that)? The input file is already sorted. With the corrections suggested by [jj33](https://stackoverflow.com/questions/6475/faster-way-to-find-duplicates-conditioned-by-time#6869) I made a new version with better treatment of dates, still maintaining a low profile for incorporating more operations: awk 'BEGIN { FS=","; SECSPERMINUTE=60; SECSPERHOUR=3600; SECSPERDAY=86400; split("0 31 59 90 120 151 181 212 243 273 304 334", DAYSTOMONTH, " "); split("0 366 731 1096 1461 1827 2192 2557 2922 3288 3653 4018 4383 4749 5114 5479 5844 6210 6575 6940 7305", DAYSTOYEAR, " "); } /OK/ { old[$8] = f[$8]; f[$8] = mktime($4, $3, $2, $5, $6, $7); x[$8]++; } /OK/ && x[$8]>1 && f[$8]-old[$8] 2 ) && ( ((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0) ) ) { d2m = d2m + 1; } d2y = DAYSTOYEAR[ y - 1999 ]; return ss + (mm*SECSPERMINUTE) + (hh*SECSPEROUR) + (d*SECSPERDAY) + (d2m*SECSPERDAY) + (d2y*SECSPERDAY); } ' ```
[ "stackoverflow_Passage_2145", "stackoverflow_Passage_2165", "stackoverflow_Passage_2212", "stackoverflow_Passage_2273", "stackoverflow_Passage_2468", "stackoverflow_Passage_10910" ]
stackoverflow
stackoverflow_Query_1939
ILMerge and Web Resources | We're attemtping to merge our DLL's into one for deployment, thus ILMerge. Almost everything seems to work great. We have a couple web controls that use `ClientScript.RegisterClientScriptResource` and these are 404-ing after the merge (These worked before the merge). For example one of our controls would look like ``` namespace Company.WebControls { public class ControlA: CompositeControl, INamingContainer { protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); this.Page.ClientScript.RegisterClientScriptResource(typeof(ControlA), "Company.WebControls.ControlA.js"); } } } ``` It would be located in Project WebControls, assembly Company.WebControls. Underneath would be ControlA.cs and ControlA.js. ControlA.js is marked as an embedded resource. In the AssemblyInfo.cs I include the following: ``` [assembly: System.Web.UI.WebResource("Company.WebControls.ControlA.js", "application/x-javascript")] ``` After this is merged into CompanyA.dll, what is the proper way to reference this web resource? The ILMerge command line is as follows (from the bin directory after the build): `"C:\Program Files\Microsoft\ILMerge\ILMerge.exe" /keyfile:../../CompanySK.snk /wildcards:True /copyattrs:True /out:Company.dll Company.*.dll`
[ "stackoverflow_Passage_7422", "stackoverflow_Passage_9497", "stackoverflow_Passage_292025" ]
stackoverflow
stackoverflow_Query_1703
Default Internet connection on Dual LAN Workstation | I know this is not programming directly, but it's regarding a development workstation I'm setting up. I've got a Windows Server 2003 machine that needs to be on two LAN segments at the same time. One of them is a 10.17.x.x LAN and the other is 10.16.x.x The problem is that I don't want to be using up the bandwidth on the 10.16.x.x network for internet traffic, etc (this network is basically only for internal stuff, though it does have internet access) so I would like the system to use the 10.17.x.x connection for anything that is external to the LAN (and for anything on 10.17.x.x of course, and to only use the 10.16.x.x connection for things that are on *that* specific LAN. I've tried looking into the windows "route" command but it's fairly confusing and won't seem to let me delete routes tha tI believe are interfering with what I want it to do. Is there a better way of doing this? Any good software for segmenting your LAN access?
[ "stackoverflow_Passage_6451", "stackoverflow_Passage_6453", "stackoverflow_Passage_9218" ]
stackoverflow
stackoverflow_Query_743
Capture MouseDown event for .NET TextBox | Is there any way to capture the MouseDown even from the .NET 2.0 TextBox control? I know the inherited Control class has the event, but it's not exposed in TextBox. Is there a way to override the event handler? I also tried the OpenNETCF TextBox2 control which does have the MouseDown event exposed, but no matter what I do, it doesn't fire the handler. Any suggestions? --- > > What kind of crazy mobile device do > you have that has a mouse? :) > > > Yes, windows mobile does not have an actual mouse, but you are mistaken that Windows Mobile .NET do not support the Mouse events. A click or move on the screen is still considered a "Mouse" event. It was done this way so that code could port over from full Windows easily. And this is not a Windows Mobile specific issue. The TextBox control on Windows does not have native mouse events either. I just happened to be using Windows Mobile in this case. Edit: And on a side note...as Windows Mobile is built of the WindowsCE core which is often used for embedded desktop systems and Slim Terminal Services clients or "WinTerms" it has support for a hardware mouse and has for a long time. Most devices just don't have the ports to plug one in. --- > > According to the .Net Framework, the > MouseDown Event Handler on a TextBox > is supported. What happens when you > try to run the code? > > > Actually, that's only there because it inherits it from "Control", as does *every* other Form control. It is, however, overridden (and changed to private I believe) in the TextBox class. So it will not show up in IntelliSense in Visual Studio. However, you actually can write the code: ``` textBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.textBox1_MouseDown); ``` and it will compile and run just fine, the only problem is that textBox1\_MouseDown() will not be fired when you tap the TextBox control. I assume this is because of the Event being overridden internally. I don't even want to change what's happening on the event internally, I just want to add my own event handler to that event so I can fire some custom code as you could with any other event.
[ "stackoverflow_Passage_2488", "stackoverflow_Passage_2492", "stackoverflow_Passage_2498", "stackoverflow_Passage_7692", "stackoverflow_Passage_10469", "stackoverflow_Passage_12584" ]
stackoverflow
stackoverflow_Query_229
How to filter and combine 2 datasets in C# | I am building a web page to show a customer what software they purchased and to give them a link to download said software. Unfortunately, the data on what was purchased and the download information are in separate databases so I can't just take care of it with joins in an SQL query. The common item is SKU. I'll be pulling a list of SKUs from the customer purchases database and on the download table is a comma delineated list of SKUs associated with that download. My intention, at the moment, is to create from this one datatable to populate a `GridView`. Any suggestions on how to do this efficiently would be appreciated. If it helps, I can pretty easily pull back the data as a `DataSet` or a `DataReader`, if either one would be better for this purpose.
[ "stackoverflow_Passage_621", "stackoverflow_Passage_631", "stackoverflow_Passage_635" ]
stackoverflow
stackoverflow_Query_39
Annotating YouTube videos programmatically | I want to be able to display a normal YouTube video with overlaid annotations, consisting of coloured rectangles for each frame. The only requirement is that this should be done programmatically. YouTube has annotations now, but require you to use their front end to create them by hand. I want to be able to generate them. What's the best way of doing this? Some ideas: > > 1. Build your own Flash player (ew?) > 2. Somehow draw over the YouTube Flash player. Will this work? > 3. Reverse engineer & hijack YouTube's annotation system. Either messing with the local files or redirecting its attempt to download > the annotations. (using Greasemonkey? Firefox plugin?) > > > Idea that doesn't count: > > download the video > > >
[ "stackoverflow_Passage_2256", "stackoverflow_Passage_9854", "stackoverflow_Passage_10507" ]
stackoverflow
stackoverflow_Query_1000
Unit test execution speed (how many tests per second?) | What kind of execution rate do you aim for with your unit tests (# test per second)? How long is too long for an individual unit test? I'd be interested in knowing if people have any specific thresholds for determining whether their tests are too slow, or is it just when the friction of a long running test suite gets the better of you? Finally, when you do decide the tests need to run faster, what techniques do you use to speed up your tests? *Note: integration tests are obviously a different matter again. We are strictly talking unit tests that need to be run as frequently as possible.* --- **Response roundup:** Thanks for the great responses so far. Most advice seems to be don't worry about the speed -- concentrate on quality and just selectively run them if they are too slow. Answers with specific numbers have included aiming for <10ms up to 0.5 and 1 second per test, or just keeping the entire suite of commonly run tests under 10 seconds. Not sure whether it's right to mark one as an "accepted answer" when they're all helpful :)
[ "stackoverflow_Passage_3488", "stackoverflow_Passage_3489", "stackoverflow_Passage_3491", "stackoverflow_Passage_3494", "stackoverflow_Passage_3498", "stackoverflow_Passage_3582", "stackoverflow_Passage_8231", "stackoverflow_Passage_11428", "stackoverflow_Passage_11433", "stackoverflow_Passage_11457", "stackoverflow_Passage_109652" ]
stackoverflow
stackoverflow_Query_663
Developing addins for World of Warcraft - Getting started? | As a long time World of Warcraft player, and a passionate developer I have decided that I would like to combine the two and set about developing some addins. Not only to improve my gameplay experience but as a great opportunity to learn something new. Does anyone have any advice on how to go about starting out? Is there an IDE one can use? How does one go about testing? Are there any ready made libraries available? Or would I get a better learning experience by ignoring the libraries and building from scratch? How do I oneshot Hogger? Would love to hear your advice, experiences and views.
[ "stackoverflow_Passage_2162", "stackoverflow_Passage_2169", "stackoverflow_Passage_6857", "stackoverflow_Passage_9023", "stackoverflow_Passage_9670" ]
stackoverflow
stackoverflow_Query_1226
How is the HTML on this site so clean? | I work with C# at work but dislike how with webforms it spews out a lot of JavaScript not including the many lines for viewstate that it creates. That's why I like coding with PHP as I have full control. But I was just wondering how this sites HTML is so clean and elegant? Does using MVC have something to do with it? I see that JQuery is used but surely you still use asp:required validators? If you do, where is all the hideous code that it normally produces? And if they arent using required field validators, why not? Surely it's quicker to develop in than using JQuery? One of the main reasons I code my personal sites in PHP was due to the more elegant HTML that it produces but if I can produce code like this site then I will go full time .net!
[ "stackoverflow_Passage_4388", "stackoverflow_Passage_4391", "stackoverflow_Passage_4396", "stackoverflow_Passage_4397", "stackoverflow_Passage_8596" ]
stackoverflow
stackoverflow_Query_1
Why did the width collapse in the percentage width child element in an absolutely positioned parent on Internet Explorer 7? | I have an absolutely positioned `div` containing several children, one of which is a relatively positioned `div`. When I use a `percentage-based width` on the child `div`, it collapses to `0 width` on IE7, but not on Firefox or Safari. If I use `pixel width`, it works. If the parent is relatively positioned, the percentage width on the child works. 1. Is there something I'm missing here? 2. Is there an easy fix for this besides the `pixel-based width` on the child? 3. Is there an area of the CSS specification that covers this?
[ "stackoverflow_Passage_8", "stackoverflow_Passage_31", "stackoverflow_Passage_544", "stackoverflow_Passage_9198", "stackoverflow_Passage_12219", "stackoverflow_Passage_25327", "stackoverflow_Passage_1016424" ]
stackoverflow
stackoverflow_Query_1086
XPATHS and Default Namespaces | What is the story behind XPath and support for namespaces? Did XPath as a specification precede namespaces? If I have a document where elements have been given a default namespace: ``` <foo xmlns="uri" /> ``` It appears as though some of the XPath processor libraries won't recognize `//foo` because of the namespace whereas others will. The option my team has thought about is to add a namespace prefix using regular expressions to the XPath (you can add a namespace prefix via XmlNameTable) but this seems brittle since XPath is such a flexible language when it comes to node tests. Is there a standard that applies to this? My approach is a bit hackish but it seems to work fine; I remove the `xmlns` declaration with a search/replace and then apply XPath. ``` string readyForXpath = Regex.Replace(xmldocument, "xmlns=\".+\"", String.Empty ); ``` Is that a fair approach or has anyone solved this differently?
[ "stackoverflow_Passage_3831", "stackoverflow_Passage_3834", "stackoverflow_Passage_5781", "stackoverflow_Passage_10793", "stackoverflow_Passage_11398", "stackoverflow_Passage_960471" ]
stackoverflow
stackoverflow_Query_1594
Validation Patterns for Custom XML Documents | I have a web application that generates a medium sized XML dataset to be consumed by a third party. I thought it would be a good idea to provide some form of schema document for the XML that I generate so I pasted the XML into Visual Studio and got it to generate an XSD. The annoying thing is that my XML doesn't validate to the XSD that was generated! Is it better to roll your own XSD? What about different schema docs like DTDs, Relax NG, or Schematron? The key is that I would like to be able to validate my document using C#. What are your XML validation strategies?
[ "stackoverflow_Passage_5948", "stackoverflow_Passage_5985" ]
stackoverflow
stackoverflow_Query_1104
Clearing Page Cache in ASP.NET | For my blog I am wanting to use the Output Cache to save a cached version of a perticular post for around 10 minutes, and thats fine... ``` <%@OutputCache Duration="600" VaryByParam="*" %> ``` However, if someone posts a comment, I want to clear the cache so that the page is refreshed and the comment can be seen. How do I do this in ASP.Net C#?
[ "stackoverflow_Passage_3905", "stackoverflow_Passage_3911", "stackoverflow_Passage_3921", "stackoverflow_Passage_8405", "stackoverflow_Passage_11688", "stackoverflow_Passage_12982", "stackoverflow_Passage_13377", "stackoverflow_Passage_43309", "stackoverflow_Passage_85250" ]
stackoverflow
stackoverflow_Query_330
Convert integers to written numbers | Is there an efficient method of converting an integer into the written numbers, for example: ``` string Written = IntegerToWritten(21); ``` would return "Twenty One". Is there any way of doing this that doesn't involve a massive look-up table?
[ "stackoverflow_Passage_967", "stackoverflow_Passage_973", "stackoverflow_Passage_981", "stackoverflow_Passage_3266", "stackoverflow_Passage_131224", "stackoverflow_Passage_213350", "stackoverflow_Passage_550425", "stackoverflow_Passage_600885", "stackoverflow_Passage_628530", "stackoverflow_Passage_675887", "stackoverflow_Passage_787285", "stackoverflow_Passage_872915" ]
stackoverflow
stackoverflow_Query_1561
How to get only directory name from SaveFileDialog.FileName | What would be the easiest way to separate the directory name from the file name when dealing with `SaveFileDialog.FileName` in C#?
[ "stackoverflow_Passage_5791", "stackoverflow_Passage_5792", "stackoverflow_Passage_5793", "stackoverflow_Passage_5794", "stackoverflow_Passage_9062" ]
stackoverflow
stackoverflow_Query_765
Center text output from Graphics.DrawString() | I'm using the .NETCF (Windows Mobile) `Graphics` class and the `DrawString()` method to render a single character to the screen. The problem is that I can't seem to get it centred properly. No matter what I set for the Y coordinate of the location of the string render, it always comes out lower than that and the larger the text size the greater the Y offset. For example, at text size 12, the offset is about 4, but at 32 the offset is about 10. I want the character to vertically take up most of the rectangle it's being drawn in and be centred horizontally. Here's my basic code. `this` is referencing the user control it's being drawn in. ``` Graphics g = this.CreateGraphics(); float padx = ((float)this.Size.Width) * (0.05F); float pady = ((float)this.Size.Height) * (0.05F); float width = ((float)this.Size.Width) - 2 * padx; float height = ((float)this.Size.Height) - 2 * pady; float emSize = height; g.DrawString(letter, new Font(FontFamily.GenericSansSerif, emSize, FontStyle.Regular), new SolidBrush(Color.Black), padx, pady); ``` Yes, I know there is the label control that I could use instead and set the centring with that, but I actually do need to do this manually with the `Graphics` class.
[ "stackoverflow_Passage_2556", "stackoverflow_Passage_2558", "stackoverflow_Passage_2569", "stackoverflow_Passage_2580", "stackoverflow_Passage_7763", "stackoverflow_Passage_8111", "stackoverflow_Passage_11020" ]
stackoverflow
stackoverflow_Query_1828
How do I do an Upsert Into Table? | I have a view that has a list of jobs in it, with data like who they're assigned to and the stage they are in. I need to write a stored procedure that returns how many jobs each person has at each stage. So far I have this (simplified): ``` DECLARE @ResultTable table ( StaffName nvarchar(100), Stage1Count int, Stage2Count int ) INSERT INTO @ResultTable (StaffName, Stage1Count) SELECT StaffName, COUNT(*) FROM ViewJob WHERE InStage1 = 1 GROUP BY StaffName INSERT INTO @ResultTable (StaffName, Stage2Count) SELECT StaffName, COUNT(*) FROM ViewJob WHERE InStage2 = 1 GROUP BY StaffName ``` The problem with that is that the rows don't combine. So if a staff member has jobs in stage1 and stage2 there's two rows in @ResultTable. What I would really like to do is to update the row if one exists for the staff member and insert a new row if one doesn't exist. Does anyone know how to do this, or can suggest a different approach? I would really like to avoid using cursors to iterate on the list of users (but that's my fall back option). I'm using SQL Server 2005. **Edit: @Lee:** Unfortunately the InStage1 = 1 was a simplification. It's really more like WHERE DateStarted IS NOT NULL and DateFinished IS NULL. **Edit: @BCS:** I like the idea of doing an insert of all the staff first so I just have to do an update every time. But I'm struggling to get those UPDATE statements correct.
[ "stackoverflow_Passage_6943", "stackoverflow_Passage_6944", "stackoverflow_Passage_6945", "stackoverflow_Passage_6948", "stackoverflow_Passage_6951", "stackoverflow_Passage_6977", "stackoverflow_Passage_9344" ]
stackoverflow
stackoverflow_Query_1972
Image UriSource and Data Binding | I'm trying to bind a list of custom objects to a WPF Image like this: ``` <Image> <Image.Source> <BitmapImage UriSource="{Binding Path=ImagePath}" /> </Image.Source> </Image> ``` But it doesn't work. This is the error I'm getting: *"Property 'UriSource' or property 'StreamSource' must be set."* What am I missing?
[ "stackoverflow_Passage_7515", "stackoverflow_Passage_7534", "stackoverflow_Passage_7573", "stackoverflow_Passage_9536", "stackoverflow_Passage_12228", "stackoverflow_Passage_257019", "stackoverflow_Passage_376975" ]
stackoverflow
stackoverflow_Query_1892
Huge Web App With Memory Leak in IE 6 | I have a huge web app that is having issues with memory leak in IE 6. Fixing a memory leak in a 5 line code sample that demonstrates the problem is easy. But if I have a very huge application, where should a start from?
[ "stackoverflow_Passage_7195", "stackoverflow_Passage_7198", "stackoverflow_Passage_9425", "stackoverflow_Passage_157963" ]
stackoverflow
stackoverflow_Query_1788
Why do we need entity objects? | I really need to see some honest, thoughtful debate on the merits of the currently accepted ***enterprise application*** design paradigm. I am not convinced that entity objects should exist. By entity objects I mean the typical things we tend to build for our applications, like "Person", "Account", "Order", etc. My current design philosophy is this: * All database access must be accomplished via stored procedures. * Whenever you need data, call a stored procedure and iterate over a SqlDataReader or the rows in a DataTable (Note: I have also built enterprise applications with Java EE, java folks please substitute the equvalent for my .NET examples) I am not anti-OO. I write lots of classes for different purposes, just not entities. I will admit that a large portion of the classes I write are static helper classes. I am not building toys. I'm talking about large, high volume transactional applications deployed across multiple machines. Web applications, windows services, web services, b2b interaction, you name it. I have used OR Mappers. I have written a few. I have used the Java EE stack, CSLA, and a few other equivalents. I have not only used them but actively developed and maintained these applications in production environments. I have come to the battle-tested conclusion that entity objects are getting in our way, and our lives would be *so* much easier without them. Consider this simple example: you get a support call about a certain page in your application that is not working correctly, maybe one of the fields is not being persisted like it should be. With my model, the developer assigned to find the problem opens *exactly 3 files*. An ASPX, an ASPX.CS and a SQL file with the stored procedure. The problem, which might be a missing parameter to the stored procedure call, takes minutes to solve. But with any entity model, you will invariably fire up the debugger, start stepping through code, and you may end up with 15-20 files open in Visual Studio. By the time you step down to the bottom of the stack, you forgot where you started. We can only keep so many things in our heads at one time. Software is incredibly complex without adding any unnecessary layers. Development complexity and troubleshooting are just one side of my gripe. Now let's talk about scalability. Do developers realize that each and every time they write or modify any code that interacts with the database, they need to do a throrough analysis of the exact impact on the database? And not just the development copy, I mean a mimic of production, so you can see that the additional column you now require for your object just invalidated the current query plan and a report that was running in 1 second will now take 2 minutes, just because you added a single column to the select list? And it turns out that the index you now require is so big that the DBA is going to have to modify the physical layout of your files? If you let people get too far away from the physical data store with an abstraction, they will create havoc with an application that needs to scale. I am not a zealot. I can be convinced if I am wrong, and maybe I am, since there is such a strong push towards Linq to Sql, ADO.NET EF, Hibernate, Java EE, etc. Please think through your responses, if I am missing something I really want to know what it is, and why I should change my thinking. ***[Edit]*** It looks like this question is suddenly active again, so now that we have the new comment feature I have commented directly on several answers. Thanks for the replies, I think this is a healthy discussion. I probably should have been more clear that I am talking about enterprise applications. I really can't comment on, say, a game that's running on someone's desktop, or a mobile app. One thing I have to put up here at the top in response to several similar answers: orthogonality and separation of concerns often get cited as reasons to go entity/ORM. Stored procedures, to me, are the best example of separation of concerns that I can think of. If you disallow all other access to the database, other than via stored procedures, you could in theory redesign your entire data model and not break any code, so long as you maintained the inputs and outputs of the stored procedures. They are a perfect example of programming by contract (just so long as you avoid "select \*" and document the result sets). Ask someone who's been in the industry for a long time and has worked with long-lived applications: how many application and UI layers have come and gone while a database has lived on? How hard is it to tune and refactor a database when there are 4 or 5 different persistence layers generating SQL to get at the data? You can't change anything! ORMs or any code that generates SQL ***lock your database in stone***.
[ "stackoverflow_Passage_6760", "stackoverflow_Passage_6801", "stackoverflow_Passage_6805", "stackoverflow_Passage_6808", "stackoverflow_Passage_6814", "stackoverflow_Passage_6819", "stackoverflow_Passage_6831", "stackoverflow_Passage_6832", "stackoverflow_Passage_6835", "stackoverflow_Passage_6843", "stackoverflow_Passage_6846", "stackoverflow_Passage_6854", "stackoverflow_Passage_6856", "stackoverflow_Passage_7712", "stackoverflow_Passage_7714", "stackoverflow_Passage_9702", "stackoverflow_Passage_9703", "stackoverflow_Passage_9705", "stackoverflow_Passage_9706", "stackoverflow_Passage_9707", "stackoverflow_Passage_10503", "stackoverflow_Passage_11149", "stackoverflow_Passage_11150", "stackoverflow_Passage_11312", "stackoverflow_Passage_11331", "stackoverflow_Passage_11364", "stackoverflow_Passage_11365", "stackoverflow_Passage_11510", "stackoverflow_Passage_11512", "stackoverflow_Passage_11586", "stackoverflow_Passage_11653", "stackoverflow_Passage_11654", "stackoverflow_Passage_11955", "stackoverflow_Passage_12096", "stackoverflow_Passage_12144", "stackoverflow_Passage_12656", "stackoverflow_Passage_12716", "stackoverflow_Passage_13443", "stackoverflow_Passage_185159", "stackoverflow_Passage_433336", "stackoverflow_Passage_748340" ]
stackoverflow
stackoverflow_Query_1308
Resources on wordpress theme-development | What are the best resources for Wordpress theme-development? I am currently in the phase of starting my own blog, and don't want to use one of the many free themes. I already have a theme for my website, so I want to read about best-practices. Any advice on how to get started would be very welcome :) --- I have now created my theme (wohoo!), and thought I should summarize the best resources I found. Lets see.. **Resources:** * [ThemeTation's three-part guide to create a wordpress-theme from scratch](http://themetation.com/2008/07/14/how-to-create-wordpress-themes-from-scratch-part-1/) * [Nettuts.com's guide: How to Create a Wordpress Theme from Scratch](https://code.tutsplus.com/articles/how-to-create-a-wordpress-theme-from-scratch--net-706) Didn't actually use this, it's a quite new article, but anyway - it's great. It will get a follow-up in the next few days too.. * [Wordpress.org's own guide on templates](http://codex.wordpress.org/Theme_Development) Definatly a must-read for everyone new to wordpress-designing.. * ["The loop"](http://codex.wordpress.org/The_Loop) Essential knowledge, also a must-read * [Directory of all the template tags](http://codex.wordpress.org/Template_Tags) Used by wordpress to actually output blog-content.. **Inspiration:** * Smashing Magazine's lists: [first](http://www.smashingmagazine.com/2008/01/08/100-excellent-free-high-quality-wordpress-themes/), [one more](http://www.smashingmagazine.com/2007/02/09/83-beautiful-wordpress-themes-you-probably-havent-seen/), [yet another one](http://www.smashingmagazine.com/2008/08/25/30-free-high-quality-wordpress-themes/) * [Wordpress.org's theme-directory](http://wordpress.org/extend/themes/)
[ "stackoverflow_Passage_4761", "stackoverflow_Passage_4762", "stackoverflow_Passage_4765", "stackoverflow_Passage_4776", "stackoverflow_Passage_8715", "stackoverflow_Passage_12037", "stackoverflow_Passage_12542", "stackoverflow_Passage_12544", "stackoverflow_Passage_12550", "stackoverflow_Passage_13092", "stackoverflow_Passage_13467", "stackoverflow_Passage_42320" ]
stackoverflow
stackoverflow_Query_1723
Automating WSDL.exe in a Custom Build | I have a web application written in C# that consumes several internal web services. We have a development tier, a testing tier, and a production tier. Also, we use the `WSDL.exe` command to generate a `Proxies.cs` file for a given tier's web services. When we are ready to deploy our code up the stack from development to test or test to production, we need to run the `WSDL.exe` command to point to the appropriate version of the web services. Is there a generally accepted way to automate this?
[ "stackoverflow_Passage_6546", "stackoverflow_Passage_7970", "stackoverflow_Passage_9241" ]
stackoverflow
stackoverflow_Query_611
E-mail Notifications | In a .net system I'm building, there is a need for automated e-mail notifications. These should be editable by an admin. What's the easiest way to do this? SQL table and WYSIWIG for editing? --- The queue is a great idea. I've been throwing around that type of process for awhile with my old company.
[ "stackoverflow_Passage_1936", "stackoverflow_Passage_1937", "stackoverflow_Passage_1944", "stackoverflow_Passage_2395", "stackoverflow_Passage_2397", "stackoverflow_Passage_6207" ]
stackoverflow
stackoverflow_Query_1280
Python version of PHP's stripslashes | I wrote a piece of code to convert PHP's striplashes into valid Python [backslash] escapes: ``` cleaned = stringwithslashes cleaned = cleaned.replace('\\n', '\n') cleaned = cleaned.replace('\\r', '\n') cleaned = cleaned.replace('\\', '') ``` How can I condense it?
[ "stackoverflow_Passage_4652", "stackoverflow_Passage_4709", "stackoverflow_Passage_4718", "stackoverflow_Passage_4722", "stackoverflow_Passage_427111" ]
stackoverflow
stackoverflow_Query_1782
Best practice for integrating TDD with web application development? | Unit testing and ASP.NET web applications are an ambiguous point in my group. More often than not, good testing practices fall through the cracks and web applications end up going live for several years with no tests. The cause of this pain point generally revolves around the hassle of writing UI automation mid-development. How do you or your organization integrate best TDD practices with web application development?
[ "stackoverflow_Passage_6741", "stackoverflow_Passage_6746", "stackoverflow_Passage_6798", "stackoverflow_Passage_8445", "stackoverflow_Passage_9315", "stackoverflow_Passage_10797", "stackoverflow_Passage_11160", "stackoverflow_Passage_12722" ]
stackoverflow
stackoverflow_Query_217
LINQ on the .NET 2.0 Runtime | Can a LINQ enabled app run on a machine that only has the .NET 2.0 runtime installed? In theory, LINQ is nothing more than syntactic sugar, and the resulting IL code should look the same as it would have in .NET 2.0. How can I write LINQ without using the .NET 3.5 libraries? Will it run on .NET 2.0?
[ "stackoverflow_Passage_589", "stackoverflow_Passage_590", "stackoverflow_Passage_591", "stackoverflow_Passage_592", "stackoverflow_Passage_2146", "stackoverflow_Passage_10991", "stackoverflow_Passage_11640", "stackoverflow_Passage_12264", "stackoverflow_Passage_54872" ]
stackoverflow
stackoverflow_Query_1039
How to encourage someone to learn programming? | I have a friend that has a little bit of a holiday coming up and they want ideas on what they should do during the holiday, I plan to suggest programming to them, what are the pros and cons that I need to mention? I'll add to the list below as people reply, I apologise if I duplicate any entries. **Pros I have so far** 1. Minimal money requirement (they already have a computer) 2. Will help them to think in new ways 3. (Rob Cooper) Great challenge, every day really is a fresh challenge in some way, shape or form. Not many jobs can truly offer that. 4. (Rob Cooper) I like the way it makes me think.. I look at EVERYTHING more logically as my skills improve.. This helps with general living as well as programming. 5. (Rob Cooper) Money is/can be pretty good. 6. (Rob Cooper) Its a pretty portable trade.. With collaboration tech as it is, you can pretty much work anywhere in the world so long as you have an Internet connection. 7. (Rob Cooper) It's an exciting industry to work in, theres massive amounts of tech to work and play with! 8. (Quarrelsome) Jetpacks. Programming is Technology and the more time we spend with technology the closer we get to having Jetpacks. (*Teifion: This is a really cool analogy!*) 9. (Saj) Profitable way of Exercising Brain Muscles. 10. (Saj) It makes you look brilliant to some audience. 11. (Saj) Makes you tech-smart. 12. (Saj) Makes you eligible to the future world. 13. (Saj) It's easy, fun, not in a math way.. 14. (kiwiBastard) If the person likes problem solving then programming is no better example. 15. (kiwiBastard) Brilliant sense of achivement when you can interact with something you have designed and coded 16. (kiwiBastard) Great way to meet chicks/chaps - erm, maybe not that one (*Teifion: I dunno where you do programming but I want to come visit some time*) 17. (epatel) Learning how to program is like learning spell casting at Hogwarts . The computer will be your servant forever... **Cons I have so far** 1. Can be frustrating when it's not working 2. Not physical exercise 3. (Rob Cooper) There are a lot of people doing it just for the money. They have no love for the craft and just appear lazy, annoying and sometimes it can really grind my gears seeing an industry and workforce I enjoy so much being diluted with crap. Which can often reflect badly on all of us. 4. (Rob Cooper) Not so sure about the initial cost.. Yeah you can get started with Java or something at low cost, but for me, locally, the vast demand is for .NET developers, which can be costly getting up and running with. However, this is rapidly/has not becoming the case with the amount of work put in by MS with releasing pretty damn good Express editions of their main development product line. 5. (Rob Cooper) Its a lifelong career.. I truly feel you never really become a "master" by nature of the industry, you stop for 1-2 years. You're behind the times.. Some people do not like the pace. 6. (Rob Cooper) Some geeks can be hard to work with.. While I think the general geek movement is really changing for the better, you will always have the classic "I am more intelligent than you" geeks that can really just be a pain in the ass for all! 7. (Saj) Can cause virtual damage. 8. (Saj) Can make one throw their computer away. 9. (Saj) Can make one only virtually available to the world.
[ "stackoverflow_Passage_3647", "stackoverflow_Passage_3649", "stackoverflow_Passage_3650", "stackoverflow_Passage_3651", "stackoverflow_Passage_3661", "stackoverflow_Passage_3820", "stackoverflow_Passage_3826", "stackoverflow_Passage_3829", "stackoverflow_Passage_8289" ]
stackoverflow
stackoverflow_Query_365
Can you access the windows registry from Adobe Air? | (y/N) Edit: Read-only access is fine.
[ "stackoverflow_Passage_1494", "stackoverflow_Passage_1497", "stackoverflow_Passage_1585", "stackoverflow_Passage_1591", "stackoverflow_Passage_5559", "stackoverflow_Passage_12317", "stackoverflow_Passage_85695", "stackoverflow_Passage_378517" ]
stackoverflow
stackoverflow_Query_1560
How to redirect siteA to siteB with A or CNAME records | I have 2 hosts and I would like to point a subdomain on host one to a subdomain on host two: ``` subdomain.hostone.com --> subdomain.hosttwo.com ``` I added a CNAME record to host one that points to subdomain.hosttwo.com but all I get is a '**400 Bad Request**' Error. Can anyone see what I'm doing wrong?
[ "stackoverflow_Passage_5786", "stackoverflow_Passage_5788", "stackoverflow_Passage_5789", "stackoverflow_Passage_5795", "stackoverflow_Passage_5796", "stackoverflow_Passage_5950", "stackoverflow_Passage_9061", "stackoverflow_Passage_33039" ]
stackoverflow
stackoverflow_Query_1025
Best way to store a database password in a startup script / config file? | So our web server apps need to connect to the database, and some other apps have startup scripts that execute at boot time. What's the best way to store the name/password for these applications, in terms of * security, e.g. perhaps we don't want sysadmins to know the database password * maintainability, e.g. making the configuration easy to change when the password changes, etc. both windows and linux solutions appreciated!
[ "stackoverflow_Passage_3587", "stackoverflow_Passage_3589", "stackoverflow_Passage_3597", "stackoverflow_Passage_3598", "stackoverflow_Passage_3604", "stackoverflow_Passage_3622", "stackoverflow_Passage_8279", "stackoverflow_Passage_13387" ]
stackoverflow
stackoverflow_Query_539
Telligent's Community Server | The company I work for is wanting to add blog functionality to our website and they were looking to spend an awful amount of money to have some crap being built on top of a CMS they purchased (sitecore). I pointed them to Telligent's Community Server and we had a sales like meeting today to get the Marketing folks on board. My question is if anyone has had issues working with Community Server, skinning it and extending it? I wanted to explain a bit why I am thinking Community Server, the company is wanting multiple blogs with multiple authors. I want to be out of the admin part of this as much as possible and didn't think there were too many engines that having multiple blogs didn't mean db work. I also like the other functionality that Community Server provides and think the company will find it useful, particularly the media section as right now we have some really shotty way of dealing with whitepapers and stuff. edit: We are actually using the Sitecore blog module for a single blog on our intranet (which is actually what the CMS is serving). Some reasoning for why I don't like it for our public site are they are on different servers, it doesn't support multiple authors, there is no built in syndication, it is a little flimsy feeling to me from looking at the source and I personally think the other features of Community Server make its price tag worth it. another edit: Need to stick to .net software that run on sql server in my company's case, but I don't mind seeing recommendations for others. ExpressionEngine looks promising, will try it out on my personal box.
[ "stackoverflow_Passage_1661", "stackoverflow_Passage_1662", "stackoverflow_Passage_1670", "stackoverflow_Passage_1676", "stackoverflow_Passage_5461", "stackoverflow_Passage_8684", "stackoverflow_Passage_10381", "stackoverflow_Passage_11238", "stackoverflow_Passage_11530" ]
stackoverflow
stackoverflow_Query_1473
Which scripting language to support in an existing codebase? | I'm looking at adding scripting functionality to an existing codebase and am weighing up the pros/cons of various packages. Lua is probably the most obvious choice, but I was wondering if people have any other suggestions based on their experience. Scripts will be triggered upon certain events and may stay resident for a period of time. For example upon startup a script may define several options which the program presents to the user as a number of buttons. Upon selecting one of these buttons the program will notify the script where further events may occur. These are the only real requirements; 1. Must be a cross-platform library that is compilable from source 2. Scripts must be able to call registered code-side functions 3. Code must be able to call script-side functions 4. Be used within a C/C++ codebase.
[ "stackoverflow_Passage_5432", "stackoverflow_Passage_5435", "stackoverflow_Passage_5475", "stackoverflow_Passage_5476", "stackoverflow_Passage_5548", "stackoverflow_Passage_5553", "stackoverflow_Passage_7682", "stackoverflow_Passage_8967", "stackoverflow_Passage_10388", "stackoverflow_Passage_10687" ]
stackoverflow
stackoverflow_Query_1793
How to display "12 minutes ago" etc in a PHP webpage? | Can anyone tell me how I can display a status message like "12 seconds ago" or "5 minutes ago" etc in a web page?
[ "stackoverflow_Passage_6773", "stackoverflow_Passage_9307", "stackoverflow_Passage_307607", "stackoverflow_Passage_460552" ]
stackoverflow
stackoverflow_Query_1478
SQL Server 2008 vs 2005 Linq integration | Linq To SQL or Entity framework both integrate nicely with SQL Server 2005. The SQL Server 2008 spec sheet promises even better integration - but I can't see it. What are some examples of what you can do Linq-wise when talking to a 2008 server that you can't when talking to SQL Server 2005?
[ "stackoverflow_Passage_5466", "stackoverflow_Passage_5472", "stackoverflow_Passage_10820", "stackoverflow_Passage_10821", "stackoverflow_Passage_17019" ]
stackoverflow
stackoverflow_Query_6
Filling a DataSet or a DataTable from a LINQ query result set | How do you expose a LINQ query as an ASMX web service? Usually, from the business tier, I can return a typed `DataSet` or a `DataTable` which can be serialized for transport over ASMX. How can I do the same for a LINQ query? Is there a way to populate a typed `DataSet` or a `DataTable` via a LINQ query? ``` public static MyDataTable CallMySproc() { string conn = "..."; MyDatabaseDataContext db = new MyDatabaseDataContext(conn); MyDataTable dt = new MyDataTable(); // execute a sproc via LINQ var query = from dr in db.MySproc().AsEnumerable select dr; // copy LINQ query resultset into a DataTable -this does not work ! dt = query.CopyToDataTable(); return dt; } ``` How could I put the result set of a LINQ query into a `DataSet` or a `DataTable`? Alternatively, can the LINQ query be serializable so that I can expose it as an ASMX web service?
[ "stackoverflow_Passage_29", "stackoverflow_Passage_1777", "stackoverflow_Passage_4244", "stackoverflow_Passage_4250", "stackoverflow_Passage_8540", "stackoverflow_Passage_11870", "stackoverflow_Passage_974167", "stackoverflow_Passage_1016556" ]
stackoverflow
stackoverflow_Query_929
WPF: How to style or disable the default ContextMenu of a TextBox | Apparantly when users right-click in our WPF application, and they use the Windows Classic theme, the default ContextMenu of the TextBox (which contains Copy, Cut and Paste) has a black background. I know this works well: ``` <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <TextBox ContextMenu="{x:Null}"/> </Page> ``` But this doesn't work: ``` <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Page.Resources> <Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBox}"> <Setter Property="ContextMenu" Value="{x:Null}"/> </Style> </Page.Resources> <TextBox/> </Page> ``` Does anyone know how to style or disable the default ContextMenu for all TextBoxes in WPF?
[ "stackoverflow_Passage_3271", "stackoverflow_Passage_3276", "stackoverflow_Passage_3286", "stackoverflow_Passage_13209", "stackoverflow_Passage_13566", "stackoverflow_Passage_36295", "stackoverflow_Passage_1016465" ]
stackoverflow
stackoverflow_Query_323
What are the best practices for using Extension Methods in .Net? | I have seen these being used every which way, and have been accused of using them the wrong way (though in that case, I was using them that way to demonstrate a [point](http://blog.gadodia.net/extension-methods-in-vbnet-and-c/)). So, what do you think are the best practices for employing Extension Methods? Should development teams create a library of extension methods and deploy them across various projects? Should there be a collection of common extension methods in the form of an open source project? *Update: have decided to create an organization wide extension methods library*
[ "stackoverflow_Passage_949", "stackoverflow_Passage_951", "stackoverflow_Passage_1409", "stackoverflow_Passage_1755", "stackoverflow_Passage_4564", "stackoverflow_Passage_337869" ]
stackoverflow
stackoverflow_Query_890
How print Flex components in FireFox3? | Thanks to FireFox's buggy implementation of ActiveX components (it really should take an image of them when printing) Flex components (in our case charts) don't print in FX. They print fine in IE7, even IE6. We need these charts to print, but they also have dynamic content. I don't really want to draw them again as images when the user prints - the Flex component should do it. We've found a [potential workaround](http://www.anychart.com/blog/2007/09/23/solving-problem-with-printing-flash-content-in-firefox-browser/), but unfortunately it doesn't work in FireFox3 (in FireFox2 it sort-of works, but not well enough). Anyone know a workaround?
[ "stackoverflow_Passage_5813", "stackoverflow_Passage_8217", "stackoverflow_Passage_9068" ]
stackoverflow
stackoverflow_Query_601
How do you handle huge if-conditions? | It's something that's bugged me in every language I've used, I have an if statement but the conditional part has so many checks that I have to split it over multiple lines, use a nested if statement or just accept that it's ugly and move on with my life. Are there any other methods that you've found that might be of use to me and anybody else that's hit the same problem? Example, all on one line: ``` if (var1 = true && var2 = true && var2 = true && var3 = true && var4 = true && var5 = true && var6 = true) { ``` Example, multi-line: ``` if (var1 = true && var2 = true && var2 = true && var3 = true && var4 = true && var5 = true && var6 = true) { ``` Example-nested: ``` if (var1 = true && var2 = true && var2 = true && var3 = true) { if (var4 = true && var5 = true && var6 = true) { ```
[ "stackoverflow_Passage_1893", "stackoverflow_Passage_1894", "stackoverflow_Passage_1895", "stackoverflow_Passage_1896", "stackoverflow_Passage_1898", "stackoverflow_Passage_1900", "stackoverflow_Passage_1903", "stackoverflow_Passage_1905", "stackoverflow_Passage_1907", "stackoverflow_Passage_1908", "stackoverflow_Passage_1909", "stackoverflow_Passage_1912", "stackoverflow_Passage_1918", "stackoverflow_Passage_1924", "stackoverflow_Passage_1928", "stackoverflow_Passage_4908", "stackoverflow_Passage_4918", "stackoverflow_Passage_4946", "stackoverflow_Passage_6134", "stackoverflow_Passage_11058", "stackoverflow_Passage_13336", "stackoverflow_Passage_860781" ]
stackoverflow
stackoverflow_Query_1997
Find broken symlinks with Python | If I call `os.stat()` on a broken `symlink`, python throws an `OSError` exception. This makes it useful for finding them. However, there are a few other reasons that `os.stat()` might throw a similar exception. Is there a more precise way of detecting broken `symlinks` with Python under Linux?
[ "stackoverflow_Passage_7608", "stackoverflow_Passage_7610", "stackoverflow_Passage_7612", "stackoverflow_Passage_7615", "stackoverflow_Passage_8148", "stackoverflow_Passage_9771", "stackoverflow_Passage_613759", "stackoverflow_Passage_794088" ]
stackoverflow
stackoverflow_Query_1954
JavaScript Profiler in IE | Does anyone know a tool for Profiling JavaScript in IE? List available: * [IE8](http://blogs.msdn.com/ie/archive/2008/09/11/introducing-the-ie8-developer-tools-jscript-profiler.aspx) (Internet Explorer 8 only) * [JavaScript Profiler](http://www.whitefrost.com/documents/html/technical/dhtml/jsprof.html) * [YUI!](http://developer.yahoo.com/yui/profiler/)
[ "stackoverflow_Passage_7424", "stackoverflow_Passage_7426", "stackoverflow_Passage_7725", "stackoverflow_Passage_8038", "stackoverflow_Passage_8527", "stackoverflow_Passage_13157", "stackoverflow_Passage_13279" ]
stackoverflow