text
string
meta
dict
Q: Can you modify CPU registers from within VS2008 IDE? Was just wondering if there was a way to edit the CPU registers (i.e. EAX, EBX, ECX, etc) or flags (OV, UP, erc) from within the Visual Studio IDE. I know you can view them using the Registers pane (ctrl-shift-G) and you can cycle through them with TAB or ENTER, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Monitoring a folder for new files in Windows What is the best way to go about monitoring a folder to see when an image file has been added to it? Files are added approximately once a minute and the naming goes like this... image0001.jpg, image0002.jpg, image0003.jpg etc. I need to know when a file has been written t...
{ "language": "en", "url": "https://stackoverflow.com/questions/244941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: JIT ramp up time for .NET web services How do I overcome JIT compilation ramp-up time for infrequently used web service methods in my .NET enterprise solution? Some of my infrequently used business processes rely upon 5-6 web internal web service calls. Each "JIT" can add 2-3 seconds per call adding roughly 10-15 se...
{ "language": "en", "url": "https://stackoverflow.com/questions/244949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Restricting IFRAME access in PHP I am creating a small web page using PHP that will be accessed as an IFRAME from a couple of sites. I'm wanting to restrict access to this site to work ONLY within the "approved" sites, and not other sites or accessed directly. Does anyone have any suggestions? Is this even possib...
{ "language": "en", "url": "https://stackoverflow.com/questions/244952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Serialize a nullable int I have a class with a nullable int? datatype set to serialize as an xml element. Is there any way to set it up so the xml serializer will not serialize the element if the value is null? I've tried to add the [System.Xml.Serialization.XmlElement(IsNullable=false)] attribute, but I get a ru...
{ "language": "en", "url": "https://stackoverflow.com/questions/244953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: Coalescing regular expressions in PHP Suppose I have the following two strings containing regular expressions. How do I coalesce them? More specifically, I want to have the two expressions as alternatives. $a = '# /[a-z] #i'; $b = '/ Moo /x'; $c = preg_magic_coalesce('|', $a, $b); // Desired result should be equival...
{ "language": "en", "url": "https://stackoverflow.com/questions/244959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to physically obtain all the versions of an Assembly stored in GAC? I have 3 versions of the same assembly in the GAC (Global Assembly Cache), but i physically need a specific version, when going into the framework folder i.e. c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\ the assembly located in the folder is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/244976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Error Installing iPhone App on Device I set up all my certificates and keys today and am trying to run my project on my iPhone. I'm encountering this strange error: Your mobile device has encountered an unexpected error (0xE800003A) during the install phase: Verifying application Poking around the Apple Developer ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Best approach to perform a CMMI Physical Configuration Audit? The organization I currently work for an organization that is moving into the whole CMMI world of documenting everything. I was assigned (along with one other individual) the title of Configuration Manager. Congratulations to me right. Part of the duties...
{ "language": "en", "url": "https://stackoverflow.com/questions/244996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Setting underlining of menu-hotkeys by API (windows) By default Windows (XP) shows the underlined hotkeys only, when ALT is pressed. This can be changed in display-properties in the subdialog "Effects" so, that the hotkeys are always underlined How can it be changed programmatically? Which API-call or registry-setti...
{ "language": "en", "url": "https://stackoverflow.com/questions/245012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: 400: BadRequest with .Net Mass Downloader 1.5.0.1 Has anybody else had trouble with getting the .Net Framework source code? Google doesn't have anything to say about this error message, and neither does the CodePlex issue tracker. Here is the command I'm using to get the source code for the modules that make up msc...
{ "language": "en", "url": "https://stackoverflow.com/questions/245019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why doesn't User.IsInRole work in this context? ...I want to Show the 'delete' button when user is an admin, and show the 'add item' button when user is a contributor: <!-- More code above --> <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" /> <asp:TemplateFi...
{ "language": "en", "url": "https://stackoverflow.com/questions/245027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What do you use to develop for PowerShell? I don't see a Visual Studio plugin for it (although I didn't look that hard, so I might have missed it), and searches turn up random third-party solutions, but is there something that comes with PowerShell or something that plugs into Visual Studio? A: Visual Studio templa...
{ "language": "en", "url": "https://stackoverflow.com/questions/245043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Add close button (red x) to a .NET ToolTip I'm looking for a way to add a close button to a .NET ToolTip object similar to the one the NotifyIcon has. I'm using the tooltip as a message balloon called programatically with the Show() method. That works fine but there is no onclick event or easy way to close the toolt...
{ "language": "en", "url": "https://stackoverflow.com/questions/245045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do you get the all properties of a class and its base classes (up the hierarchy) with Reflection? (C#) So what I have right now is something like this: PropertyInfo[] info = obj.GetType().GetProperties(BindingFlags.Public); where obj is some object. The problem is some of the properties I want aren't in obj.Get...
{ "language": "en", "url": "https://stackoverflow.com/questions/245055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Best way test for XPath existence in an XML file? Lately I've been using XPathDocument and XNavigator to parse an XML file for a given XPath and attribute. It's been working very well, when I know in advance what the XPath is. Sometimes though, the XPath will be one of several possible XPath values, and I'd like to...
{ "language": "en", "url": "https://stackoverflow.com/questions/245058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What's the difference between JavaScript and Java? What's the difference between JavaScript and Java? A: They are independent languages with unrelated lineages. Brendan Eich created Javascript originally at Netscape. It was initially called Mocha. The choice of Javascript as a name was a nod, if you will, to the th...
{ "language": "en", "url": "https://stackoverflow.com/questions/245062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Shell script to find bigrams I'm making a shell script to find bigrams, which works, sort of. #tokenise words tr -sc 'a-zA-z0-9.' '\012' < $1 > out1 #create 2nd list offset by 1 word tail -n+2 out1 > out2 #paste list together paste out1 out2 #clean up rm out1 out2 The only problem is that it pairs words from the e...
{ "language": "en", "url": "https://stackoverflow.com/questions/245082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Upgrading Google Application Engine program to use unicode I have a simple Google App Engine app, that I wrote using ordinary strings. I realize I want to make it handle unicode. Are there any gotchas with this? I'm thinking of all the strings that I currently already have in the live database. (From real users who ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: NHibernate many-to-one mappings updating unchanged table I have a situation where I have two entities that share a primary key (Transaction and TransactionDetail). I have them mapped using many-to-one relationship from Transaction to TransactionDetail and from TransactionDetail to Transaction. Transaction detail hol...
{ "language": "en", "url": "https://stackoverflow.com/questions/245102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ascertaining a shutdown is closing my application Is it possible in .NET to ascertain whether my application is closing due to Windows being given a shutdown command (as opposed to any old application closing) in order to either write out some temporary cache files or even block the shutdown long enough to prompt fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/245111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Strategic Advice: Upgrading the Design of a Web App I have an ASP.NET web site dedicated to reporting on PBX extension stats. It comprises many report pages, with HTML generated almost purely by code-behind (setting a Label control's Text property instead of using Response.Write), using un-parameterised string lite...
{ "language": "en", "url": "https://stackoverflow.com/questions/245120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: A library to convert ANSI escapes (terminal formatting/color codes) to HTML I'm looking for a code library that converts ANSI escape sequences into HTML color, via plain tags or CSS. For example, something that would convert this: ESC[00mESC[01;34mbinESC[00m ESC[01;34mcodeESC[00m ESC[01;31mdropbox-lnx.x86-0.6.404.t...
{ "language": "en", "url": "https://stackoverflow.com/questions/245121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "92" }
Q: Setting OnLoad event for newly opened window in IE6 I need to set the onload attribute for a newly popped-up window. The following code works for Firefox: <a onclick="printwindow=window.open('www.google.com');printwindow.document.body.onload=self.print();return false;" href='www.google.com'> However, when I try thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/245124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I get the functionality of svn:externals in a read-only fashion? svn:externals can be great for sucking in central libraries or IP into a project, so that they can be kept in one location accessible for all. But if I'm asking people to external tags of common IP (so it doesn't change on them) it opens the po...
{ "language": "en", "url": "https://stackoverflow.com/questions/245149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: default namespace scope warning (1084) in Flex script file I have an MXML file, which references an external script file for all its event handlers: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script source="LoginExample.as" /> <mx:B...
{ "language": "en", "url": "https://stackoverflow.com/questions/245155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to select dvorak layout in Solaris 10 Java Desktop I am learning to use the Dvorak keyboad layout, but I am not good enough to enter passwords yet, so I need to be able to switch back to qwerty occasionally. In KDE this works very well, Windows fudges this in a way I can live with for the little time I spend on...
{ "language": "en", "url": "https://stackoverflow.com/questions/245163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Linq-to-SQL ToDictionary() How do I properly convert two columns from SQL (2008) using Linq into a Dictionary (for caching)? I currently loop through the IQueryable b/c I can't get the ToDictionary method to work. Any ideas? This works: var query = from p in db.Table select p; Dictionary<string, string>...
{ "language": "en", "url": "https://stackoverflow.com/questions/245168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "87" }
Q: Can VS.Net Unit Test be run outside the IDE? Is there a way you can run your UnitTest project against a compiled DLL outside of the IDE? Basically we have testing procedures to validate code before moving into production. I would not want to run the tests inside the IDE. I would want to have the compiled code read...
{ "language": "en", "url": "https://stackoverflow.com/questions/245176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .NET: From String to Object I read some properties from an xml file, amongst which is a string that refers to an llblgen object for example 'article'. For now I have set up a rather long Select Case myString Case "article" return New ArticleEntity() Etc. which is getting rather ugly as it gets longer and lon...
{ "language": "en", "url": "https://stackoverflow.com/questions/245178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using variable in a LIMIT clause in MySQL I am writing a stored procedure where I have an input parameter called my_size that is an INTEGER. I want to be able to use it in a LIMIT clause in a SELECT statement. Apparently this is not supported, is there a way to work around this? # I want something like: SELECT * FRO...
{ "language": "en", "url": "https://stackoverflow.com/questions/245180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: How to check the content of an uploaded file without relying on its extension? How do you go about verifying the type of an uploaded file reliably without using the extension? I'm guessing that you have to examine the header / read some of the bytes, but I really have no idea how to go about it. Im using c# and asp....
{ "language": "en", "url": "https://stackoverflow.com/questions/245183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What are "first-class" objects? When are objects or something else said to be "first-class" in a given programming language, and why? In what way do they differ from languages where they are not? When one says "everything is an object" (like in Python), do they indeed mean that "everything is first-class"? A: IMO t...
{ "language": "en", "url": "https://stackoverflow.com/questions/245192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "251" }
Q: Retrieving records from MySQL in Java I'm building an application in Java to retrieve data from MySQL database. After executing a query I get a ResultSet and do the following to extract records: while (rs.next()) { for (int column = 1; column <= rm.getColumnCount(); column++) { ro...
{ "language": "en", "url": "https://stackoverflow.com/questions/245199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: wcftestclient.exe - Editing the default configuration WCFTestClient tool doesn't seem to work if the size of maxNameTableCharCount is greater than default value (16384). Is there any way to modify the settings of the config file generated by this tool, BEFORE the tool generates it? I can modify the config file conte...
{ "language": "en", "url": "https://stackoverflow.com/questions/245222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: CRC checks for files I'm working with a small FAT16 filesystem, and I want to generate CRC values for indidual XML files which store configuration information. In case the data changes or is corrupted, I want to be able to check the CRC to determine that the file is still in it's original state. The question is, how...
{ "language": "en", "url": "https://stackoverflow.com/questions/245223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Which library should I use to write an XLS from Linux / Python? I'd love a good native Python library to write XLS, but it doesn't seem to exist. Happily, Jython does. So I'm trying to decide between jexcelapi and Apache HSSF: http://www.andykhan.com/jexcelapi/tutorial.html#writing http://poi.apache.org/hssf/quick-...
{ "language": "en", "url": "https://stackoverflow.com/questions/245225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Controlling ffdshow from .Net ffdshow has this awesome little API for controlling playback of video files. It allows you to change subtitles, fast forward, get the name of the file playing, etc... Its implemented as a windows message loop that accepts user messages and posts data back using WM_COPYDATA. I would like...
{ "language": "en", "url": "https://stackoverflow.com/questions/245232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: jsp:forward in Java without using JSP tag? Is there a pure-Java equivalent to <jsp:forward page="..." /> that I can use within a <% ... %> block? For example, I currently have a JSP page something like this: <% String errorMessage = SomeClass.getInstance().doSomething(); if (errorMessage != null) { s...
{ "language": "en", "url": "https://stackoverflow.com/questions/245236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Running Django with FastCGI or with mod_python which would you recommend? which is faster, reliable? apache mod_python or nginx/lighttpd FastCGI? A: lighttpd with FastCGI will be nominally faster, but really the time it takes to run your python code and any database hits it does is going to absolutely dwarf any per...
{ "language": "en", "url": "https://stackoverflow.com/questions/245237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: jQuery ancestors using jQuery objects I'd like to check ancestry using two jQuery objects. They don't have IDs, and are only going to be available as jQuery objects (or DOM nodes if you called get()). jQuery's is() only works with expressions, so this code would be ideal but will not work: var someDiv = $('#div'); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Create file with given size in Java Is there an efficient way to create a file with a given size in Java? In C it can be done with ftruncate (see that answer). Most people would just write n dummy bytes into the file, but there must be a faster way. I'm thinking of ftruncate and also of Sparse files… A: Since Java...
{ "language": "en", "url": "https://stackoverflow.com/questions/245251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: How do you upload SQL Server databases to shared hosting environments? We have a common problem of moving our development SQL 2005 database onto shared web servers at website hosting companies. Ideally we would like a system that transfers the database structure and data as an exact replica. This would be commonly a...
{ "language": "en", "url": "https://stackoverflow.com/questions/245252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Subversion vs CVS I've used both SVN and CVS a little bit, but will need to choose one for a new project I will be starting. Can anyone who has used both extensively please offer some pros and cons and which they think is better? Best learning resources would be appreciated too. This will be for a small project, ju...
{ "language": "en", "url": "https://stackoverflow.com/questions/245290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Best way to size containers in Flex to obey ONLY parent containers' explicit dimensions I've been running into this problem with Flex for nearly a year, and each time I work up a quick hack solution that works for the time being. I'd like to see if anyone has a better idea. Here are the conditions of a problem: |--...
{ "language": "en", "url": "https://stackoverflow.com/questions/245292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I get the name of a function or method from within a Python function or method? I feel like I should know this, but I haven't been able to figure it out... I want to get the name of a method--which happens to be an integration test--from inside it so it can print out some diagnostic text. I can, of course, j...
{ "language": "en", "url": "https://stackoverflow.com/questions/245304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: What C# 4.0 features can be used while still targeting the .NET 3.5 runtime? With C# 3.0 you could use many of its features (object initializers, var variables, lambda expressions) while still targeting .NET 2.0 or 3.0. What new C# 4.0 features can be used while still targeting the .NET 2.0, 3.0 or 3.5 runtimes? A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/245306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Subversion Repository Error This one has me scratching my head. I'm running Subversion 1.3.1 (r19032) on Ubuntu. All was well until recently when I tried to run svnadmin verify prior to a dump. This is the error message: svnadmin: Invalid diff stream: insn 0 cannot be decoded I have looked around for an explanat...
{ "language": "en", "url": "https://stackoverflow.com/questions/245308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Google Analytics Domain Tracking API _link() method Has anyone else had any problems using google's Domain Tracking API, I am specifically talking about the _link() method. The documentation is here The example provided shows that the _link() method should be used in the onclick event like this: <a href="http://www....
{ "language": "en", "url": "https://stackoverflow.com/questions/245317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C#4 dynamic keyword - why not? After reading many of the replies to this thread, I see that many of those who dislike it cite the potential for abuse of the new keyword. My question is, what sort of abuse? How could this be abused so badly as to make people vehemently dislike it? Is it just about purism? Or is there...
{ "language": "en", "url": "https://stackoverflow.com/questions/245318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Can't Activate Rake (> 0.0.0)? Ok, this is very weird. I'm trying to do a database migration, and all of a sudden, I'm getting these errors: [C:\source\fe]: rake db:migrate --trace (in C:/source/fe) ** Invoke db:migrate (first_time) ** Invoke setup (first_time) ** Invoke gems:install (first_time) ** Invoke gems:set...
{ "language": "en", "url": "https://stackoverflow.com/questions/245334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I branch in SVN and have it branch my svn:external folders as well? I'm using tortoise svn in Windows. How can I branch in SVN and have it branch my svn:external folders as well? A: When you create a branch within Subversion you are simply creating a cheap copy of the trunk, branch, or tag that you are bran...
{ "language": "en", "url": "https://stackoverflow.com/questions/245337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Hyperlinks In Sharepoint Webpart I've been working on a SharePoint project and I have gone the route of loading User Controls through a custom web part. I have several web controls where I need to dynamically generate hyperlinks (in a loop from a database) that will call certain functions of the User Control when cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/245338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Excel built-in dialogs Does anybody know how to call the import data built-in dialog excel from a macro (vba)? I've tried Application.Dialogs.Item(...).Show but I can´t find the right dialog. Please help. Thanks in advance. A: The closest I can find using the dialog system is: Application.Dialogs(xlDialogImportText...
{ "language": "en", "url": "https://stackoverflow.com/questions/245342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: IQueryable vs IEnumerable with Lambda, which to choose? I do more and more exercise with Lambda but I do not figure out why sometime example use .AsQueryable(); that use the IQueryable and sometime it omit the .AsQueryable(); and use the IEnumerable. I have read the MSDN but I do no see how "executing an expression ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Regex to match sloppy fractions / mixed numbers I have a series of text that contains mixed numbers (ie: a whole part and a fractional part). The problem is that the text is full of human-coded sloppiness: * *The whole part may or may not exist (ex: "10") *The fractional part may or may not exist (ex: "1/3") *T...
{ "language": "en", "url": "https://stackoverflow.com/questions/245345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to stretch the image size in iphone UIImage or UIImageView I'd like to show an image in an iPhone app, but the image I'm using is too big. I'd like to scale it to fit the iPhone screen, I can't find any class to handle it. A: UIImageView* view = [[UIImageView alloc] initWithImage: [UIImage imageNamed: @"your_i...
{ "language": "en", "url": "https://stackoverflow.com/questions/245349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Indexing into a String in C# as an L-Value I have the following intentionally trivial function: void ReplaceSome(ref string text) { StringBuilder sb = new StringBuilder(text); sb[5] = 'a'; text = sb.ToString(); } It appears to be inefficient to convert this to a StringBuilder to index into and replace s...
{ "language": "en", "url": "https://stackoverflow.com/questions/245352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where & How Castle Windsor sets up logging facility I'm fairly new to Castle Windsor and am looking into the in's and out's of the logging facility. It seems fairly impressive but the only thing i can't work out is where Windsor sets the Logger property on my classes. As in the following code will set Logger to the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I tell if my page is set as the user's homepage? Is there any way I can detect when my page has been set as the user's homepage in their browser? I'm most interested in something in javascript, but I'd be happy to hear about other approaches as well. Edit: I'm not looking for anything sneaky. I'm wondering ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I get an array of repeated characters from a string using LINQ? If I have the following string: string s = "abcdefghab"; Then how do I get a string (or char[]) that has just the characters that are repeated in the original string using C# and LINQ. In my example I want to end up with "ab". Although not neces...
{ "language": "en", "url": "https://stackoverflow.com/questions/245369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Interact with a running Flash process? Is it possible to write a program that interacts with a running instance of Flash? In recent versions of Java, there is a notion of "attaching" your own process to a running JVM. By writing some somewhat ugly code using Reflection and the like, you can dig around, grab a refere...
{ "language": "en", "url": "https://stackoverflow.com/questions/245374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Help! Visual Studio 2008 just stopped stepping during debugging! Big problem. I'm not sure what it was that I did, but it seems that I can no longer debug into functions. It happens in no particular place, just all throughout the code. I set a breakpoint, and then try to "step over" in order to go to the next like...
{ "language": "en", "url": "https://stackoverflow.com/questions/245386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: NSApplication and -applicationDidFinishLaunching: I have an application where I have a main.m that returns NSApplicationMain(argc, (const char **) argv);. I want to run code on -applicationDidFinishLaunching:, but I just dont see how to do it. Can anyone help or have an example? Thanks! -Jason A: The application...
{ "language": "en", "url": "https://stackoverflow.com/questions/245390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Hidden features of Windows batch files What are some of the lesser know, but important and useful features of Windows batch files? Guidelines: * *One feature per answer *Give both a short description of the feature and an example, not just a link to documentation *Limit answers to native funtionality, i.e., doe...
{ "language": "en", "url": "https://stackoverflow.com/questions/245395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "232" }
Q: How do I get the properties of an object using reflection? I know I can do this foreach (PropertyInfo property in myobject.GetType().GetProperties()) { if (property.DeclaringType.ToString() == myobject.GetType().ToString()) { // only have my object properties here // and not parent of my o...
{ "language": "en", "url": "https://stackoverflow.com/questions/245401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I delete/remove a shell function? I have done this: $ z() { echo 'hello world'; } How do I get rid of it? A: In Zsh: unfunction z That's another (arguably better) name for unhash -f z or unset -f z and is consistent with the rest of the family of: * *unset *unhash *unalias *unlimit *unsetopt When in...
{ "language": "en", "url": "https://stackoverflow.com/questions/245406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "194" }
Q: ASP.NET -- How to populate a TreeView control with XML data response from a ASHX handler I have an ASHX handler that returns an XML response (FileStructureXML.ashx). Now I need to get the XML response from the ASHX handler and use it as a data source for my ASPX page. If I point the XMLDataSource to a static XML fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/245418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: dimensions of loaded swf's stage Here's the situation - I've got a shell that loads an external .swf. Now, that .swf is 800x600, but it's an animation piece, and there are elements that extends off the stage. When I load the .swf into the shell and call its width attribute, it returns 1200 - because it's including t...
{ "language": "en", "url": "https://stackoverflow.com/questions/245420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What's the best way to check for errors before leaving a row in a DataGridView As far as I can tell, the best way to do this is do it in the DataTable.RowChanging event. But what if I want to cancel the action? There is no EventArgs.Cancel option... A: From the DataTable.RowChanging event handler, you can throw an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does XUL (specifically firefox) statusbar positioning work? When I go to create my status bar overlay, I note that I can include a position attribute. I want to be able to dynamically change this attribute. Near as I can tell, just using JavaScript to find the element and change the position attribute doesn't mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/245422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Add DataSource Property to a Custom WinForms Control I want to add complex databinding to my custom winforms control, so I can do the following: myControl.DisplayMember = "Name"; myControl.ValueMember = "Name"; myControl.DataSource = new List<someObject>(); Does anyone know what interfaces, etc. have to be implemen...
{ "language": "en", "url": "https://stackoverflow.com/questions/245441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I draw text at an angle using python's PIL? Using Python I want to be able to draw text at different angles using PIL. For example, imagine you were drawing the number around the face of a clock. The number 3 would appear as expected whereas 12 would we drawn rotated counter-clockwise 90 degrees. Therefore, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Refactor this recursive method? I'm pretty new to the idea of recursion and this is actually my first attempt at writing a recursive method. I tried to implement a recursive function Max that passes an array, along with a variable that holds the array's size in order to print the largest element. It works, but it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Get the ASP.NET form name I'm looking for a way to get the name of the main HTML form so I can submit it from JavaScript. The reason I can just set the name of the form is because the JavaScript is on a User Control that could get added to many different sites with different form names. Thanks. A: I'm not totally s...
{ "language": "en", "url": "https://stackoverflow.com/questions/245456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: cx_Oracle & Connecting to Oracle DB Remotely How do you connect to a remote server via IP address in the manner that TOAD, SqlDeveloper, are able to connect to databases with just the ip address, username, SID and password? Whenever I try to specify and IP address, it seems to be taking it locally. In other words, h...
{ "language": "en", "url": "https://stackoverflow.com/questions/245465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How do I create a generic std::vector destructor? Having a vector containing pointers to objects then using the clear function doesn't call the destructors for the objects in the vector. I made a function to do this manually but I don't know how to make this a generic function for any kind of objects that might be i...
{ "language": "en", "url": "https://stackoverflow.com/questions/245475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: asp.net mvc post to different views in same form I have form area in my view. If I click button A, I want to submit to /Books/1 and if I click button B, I want to submit to /Books/2 How do I achieve this with MVC? A: <form id="form1" name="form1" action="/Books/" method="get"> <input type="text" name="search" value...
{ "language": "en", "url": "https://stackoverflow.com/questions/245482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best resource for learning about prefetching a buffer in C on Intel/AMD 64 bit I am interested in mastering prefetch-related functions such as _mm_prefetch(...) so when I perform operations that loop over arrays, the memory bandwidth is fully utilized. What are the best resources for learning about this? I am doing...
{ "language": "en", "url": "https://stackoverflow.com/questions/245503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do you display styles in a HTML textarea I am trying to add different styles within a textarea eg bold, different colors etc WYSIWYG editors (eg tinyMCE) used in web pages typically do this but I am having trouble working out how they do it. You cannot do this: alt text http://www.yart.com.au/test/html.gif So ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/245507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Algorithm to tell if two arrays have identical members What's the best algorithm for comparing two arrays to see if they have the same members? Assume there are no duplicates, the members can be in any order, and that neither is sorted. compare( [a, b, c, d], [b, a, d, c] ) ==> true compare( [a, b, e], ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Checking files for errors I have lots of files in different formats (mostly pdf files) and I need to check if they can be opened without errors and get a list of those that are broken. Other than opening them all separately is there a way to find out which won't open / are corrupt? A: Not really, no. Because there...
{ "language": "en", "url": "https://stackoverflow.com/questions/245526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How does a website build popularity? So, my question is how do people get the word out that their website or blog exists? Do blogger invest in ads? Is is just through word of mouth? Or searching Google? I'm just curious how does a website build it's popularity. Do you just put your website up on the web and hope peo...
{ "language": "en", "url": "https://stackoverflow.com/questions/245528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best practices for managing several specialized versions of one app I have a web application that has many faces and so far I've implemented this through creating themes. A theme is a set of html, css and images to be used with the common back end. Things are laid out like so: code/ themes/theme1 themes/theme2 And...
{ "language": "en", "url": "https://stackoverflow.com/questions/245532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Algorithm to find if two sets intersect Let's say I have two arrays: int ArrayA[] = {5, 17, 150, 230, 285}; int ArrayB[] = {7, 11, 57, 110, 230, 250}; Both arrays are sorted and can be any size. I am looking for an efficient algorithm to find if the arrays contain any duplicated elements between them. I just want ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What's a good analogy to explain the concept of wicked problems? Most developers understand the concept of wicked problems. What's a good analogy to use when explaining this concept to project managers? A: If you want an analogy, I would go with the timeline of NASA. Still technical based, but you do not need any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: .net Compact Framework 4.0 Will their be a new release of the compact framework with VS2010 and .net 4.0 and if so what new features will it include? WPF? linq to SQL? etc A: Visual Studio 2010 only supports developing for windows phone 7. This is a silver light based framework, it does not support win forms or n...
{ "language": "en", "url": "https://stackoverflow.com/questions/245566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Security with QueryString values in Asp.net MVC How do you properly ensure that a user isnt tampering with querystring values or action url values? For example, you might have a Delete Comment action on your CommentController which takes a CommentID. The action url might look like /Comments/Delete/3 to delete the co...
{ "language": "en", "url": "https://stackoverflow.com/questions/245569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: D Templates: Coolest Hack What is the coolest somewhat practical metaprogramming hack you've done or seen done in the D programming language? Somewhat practical means excluding, for example, the compile-time raytracer. A: An arbitrary precision type It generates ASM code at compile time (before the compiler does) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Why can you have a column named ORDER in DB2? In DB2, you can name a column ORDER and write SQL like SELECT ORDER FROM tblWHATEVER ORDER BY ORDER without even needing to put any special characters around the column name. This is causing me pain that I won't get into, but my question is: why do databases allow the...
{ "language": "en", "url": "https://stackoverflow.com/questions/245592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Drill down charts in ASP.NET I'm trying to get a set of reports running in an (VB) ASP.NET project and as part of that I'd like to display some charts visualising the data. I'm able to get charts generated, and have used Flotr, Plotr, Google Charts, and some CSS techniques at various times as I've experimented with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/245597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using a Single system() Call to Execute Multiple Commands in C In an information security lab I'm working on, I've been tasked with executing multiple commands with a single call to "system()" (written in C, running on Fedora). What is the syntax that will allow me to execute more than command through system()? (T...
{ "language": "en", "url": "https://stackoverflow.com/questions/245600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How is Generic Covariance & Contra-variance Implemented in C# 4.0? I didn't attend PDC 2008, but I heard some news that C# 4.0 is announced to support Generic covariance and contra-variance. That is, List<string> can be assigned to List<object>. How could that be? In Jon Skeet's book C# in Depth, it is explained why...
{ "language": "en", "url": "https://stackoverflow.com/questions/245607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "107" }
Q: What to do about @p LINQtoSQL parameters? What is @p anyhow? Okay still fighting with doing some SqlCacheDependecy in my Asp.net MVC application I got this piece of code from Microsoft to cache LINQtoSQL, basically what it does is it gets the SqlCommand text from the LINQ query and executes that via the System.Data....
{ "language": "en", "url": "https://stackoverflow.com/questions/245614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Howto initialise char array style string in constructor I have a class which I'm serialising to send over a unix socket and it has to have a string which I've stored as a char array. Can I initialise it in the constructor differently to how I've done it here? typedef struct SerialFunctionStatus_t { SerialFuncti...
{ "language": "en", "url": "https://stackoverflow.com/questions/245619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Detecting CPU architecture (32bit / 64bit ) in scons? Are there any 'standard' plugins for detecting the CPU architecture in scons? BTW, this question was asked already here in a more general form... just wondering if anyone has already taken the time to incorporate this information into scons. A: Using i386 is r...
{ "language": "en", "url": "https://stackoverflow.com/questions/245624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C++ Binary Search Tree Recursive search function template <class T> bool BST<T>::search(const T& x, int& len) const { return search(BT<T>::root, x); } template <class T> bool BST<T>::search(struct Node<T>*& root, const T& x) { if (root == NULL) return false; else { if (root->data ==...
{ "language": "en", "url": "https://stackoverflow.com/questions/245628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Ajax using Prototype.js in OFBiz I need to make an Ajax call inside OFBiz framework using prototype.js. I am doing that from a .ftl file. I am confused about how to handle the server side - through Java event or Java service? What is the best practice? And also I am having problems making the framework recognize the...
{ "language": "en", "url": "https://stackoverflow.com/questions/245634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to parse, persist and retrieve a string with tags separated by spaces? My database consists of 3 tables (one for storing all items, one for the tags, and one for the relation between the two): Table: Post Columns: PostID, Name, Desc Table: Tag Columns: TagID, Name Table: PostTag Columns: PostID, TagID What is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/245654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: 2D Cel-Shading in JavaFX I am writing a pretty simple 2D game in JavaFX, and although its only in preview release at the moment, I am looking to try to implement (even basically) some sort of Cel-Shading onto my game objects. Does anyone know if there are reference implementations of cel-shading out there that I cou...
{ "language": "en", "url": "https://stackoverflow.com/questions/245655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }