text
stringlengths
8
267k
meta
dict
Q: What does `{0:X2}` mean in this code sample? In the below code sample, what does {0:X2} mean? This is from the reflection section of the MCTS Application Development Foundation book (covering dynamic code, etc.). foreach(Byte b in body.GetILAsBodyArray()) { Console.Write("{0:X2}", b); } A: This uses the same forma...
{ "language": "en", "url": "https://stackoverflow.com/questions/405233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: On Linux SCHED_FIFO and SCHED_RR I'm writing a a very small daemon that must remain responsive even when a system is under severe stress. I'm looking at the differences between SCHED_FIFO and SCHED_RR in regards to scheduling, as well as trying to determine a sensible priority. Which scheduler would be appropriate f...
{ "language": "en", "url": "https://stackoverflow.com/questions/405246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Any way to synchronise a "Sent" folder between a desktop emailer and an online service? I have gradually abandonned my offline emailer and switched to an online one, but I still use it to regularly collect my received emails and archive them. Is there something that would also allow me to collect the mails originaly...
{ "language": "en", "url": "https://stackoverflow.com/questions/405247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET Local Development Setup I would like to start learning ASP.NET on a for-fun project. I'm hoping to setup a local server to do my development on, but I don't want to pollute my user account with a webserver, database, and developer tools. I'm using Vista Home Premium as my desktop OS. Is it possible to setup ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Many instances of a class I am trying to write a life simulation in python with a variety of animals. It is impossible to name each instance of the classes I am going to use because I have no way of knowing how many there will be. So, my question: How can I automatically give a name to an object? I was thinking of c...
{ "language": "en", "url": "https://stackoverflow.com/questions/405282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SQL Server "AFTER INSERT" trigger doesn't see the just-inserted row Consider this trigger: ALTER TRIGGER myTrigger ON someTable AFTER INSERT AS BEGIN DELETE FROM someTable WHERE ISNUMERIC(someField) = 1 END I've got a table, someTable, and I'm trying to prevent people from inserting bad records. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Creating interactive reports in PDF I want to create reports that can be drilled down by the readers - but the reports have to be PDF. I have two options: * *Link from the PDF to an online report tool *Make the reports themselves interactive I like #2... I believe I can do this with Adobe AIR (Flex, Flash + Ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/405311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I make jQuery modify only one div, instead of all divs of the same class? Each page of my site has 10 (almost) identical divs, varying only in the text within. When a certain part of a div is clicked, I want a different part of that div to be modified. I'm using this code: $(document).ready(function(){ $(".n...
{ "language": "en", "url": "https://stackoverflow.com/questions/405320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should I unit test methods which are inherited from super class? I'm currently writing an implementation of a JDBC driver (yes, you read that correctly) in a TDD manner and while I have only finished class stubs at this point and only some minor functionality, it just occured to me that since Statement is a supercla...
{ "language": "en", "url": "https://stackoverflow.com/questions/405333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Why is accessing a static method from a non-static method bad? Netbeans tells me it's bad to access a static method from a non static method. Why is this bad? "Accessing static method getInstance" is the warning: import java.util.Calendar; public class Clock { // Instance fields private Calendar time; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405336", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How Can I Write Zend Framework URLs That Have Anchor Tags In The Body? Using the standard MVC set up in Zend Framework, I want to be able to display pages that have anchors throughout. Right now I'm just adding a meaningless parameter with the '#anchor' that I want inside the .phtml file. <?= $this->url(array( '...
{ "language": "en", "url": "https://stackoverflow.com/questions/405338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Mysql connection pooling question: is it worth it? I recall hearing that the connection process in mysql was designed to be very fast compared to other RDBMSes, and that therefore using a library that provides connection pooling (SQLAlchemy) won't actually help you that much if you enable the connection pool. Does a...
{ "language": "en", "url": "https://stackoverflow.com/questions/405352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Should I check for DB constraints in code or should I catch exceptions thrown by DB I have an application that saves data into a table called Jobs. The Jobs table has a column called Name which has a UNIQUE constraint. The Name column is not PRIMARY KEY. I wonder if I should check for duplicate entries myself before...
{ "language": "en", "url": "https://stackoverflow.com/questions/405359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Whats up with static memory in java? This question is for the java language in particular. I understand that there is a static protion of memory set aside for all static code. My question is how is this static memory filled? Is a static object put into static memory at import, or at first reference? Also, do the sam...
{ "language": "en", "url": "https://stackoverflow.com/questions/405364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Python source code collection Does anyone know anywhere there's a wide collection of Python source code on the net with decent documentation? If so, can someone post it up here? A: I am not sure what you meant by "source code"? Source code of Python libraries or code examples and recipes? Well the link to Python ST...
{ "language": "en", "url": "https://stackoverflow.com/questions/405374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I connect a database to a website so that the user can access the database and make changes to it? I am trying to make a website that allows the user to make changes to their individual mysql database. The website is written in PHP. How do I connect one of the web pages to a database? Any advice would be appr...
{ "language": "en", "url": "https://stackoverflow.com/questions/405375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is 'unverifiable code' and why is it bad? I am designing a helper method that does lazy loading of certain objects for me, calling it looks like this: public override EDC2_ORM.Customer Customer { get { return LazyLoader.Get<EDC2_ORM.Customer>( CustomerId, _customerDao, ()=>base.Customer, (x)=>Cu...
{ "language": "en", "url": "https://stackoverflow.com/questions/405379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How Should I store values in DB from multiple text boxes I have 14 text boxes on application, in that user will enter single digit numbers. My task is to retrieve and save the values of all 14 text boxes into DB... I am facing a problem in passing a string for all text boxes. Could anybody help me out in writing som...
{ "language": "en", "url": "https://stackoverflow.com/questions/405393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using Routing without MVC: authentication form Now I'm trying to work with System.Web.Routing. All is just fine, but I can't understand how to make form authentication work with url routing (return url, redirection, etc). Google says nothing. Help! :) UPD: I forgot - I don't use MVC. That's the problem. How to use ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is your convention for specifying complex SQL queries in Rails? I am fairly new to Rails and I was curious as to some of the conventions experts are using when they need to construct a very complex SQL query that contains many conditions. Specifically, keeping the code readable and maintainable. There are a co...
{ "language": "en", "url": "https://stackoverflow.com/questions/405400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Use Jquery Selectors on $.AJAX loaded HTML? I have $.ajax({ url: identity, success: function(data) { ProcessIdentityServer(data) } }); When 'data' is returned, is there a way to run selectors against it without adding it into the DOM. So for example, how can I get all the href values of any LINK tags contained ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: Can you grab or delete between parentheses in vi/vim? Given this line of code in C: printf("%3.0f\t%6.1f\n", fahr, ((5.0/9.0) * (fahr-32))); Is there a way to delete or yank from the first bold parenthesis to its matching parenthesis? I thought about df), but that only will get you to just after the 9.0. Is there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "151" }
Q: How to declare an array of floats as a class variable in Objective-C when the dimension is undefined at the class instantiation time? In Java, it would look like this: class Foo { float[] array; } Foo instance = new Foo(); instance.array = new float[10]; A: Here's another way to do it. Create a NSMutableArray o...
{ "language": "en", "url": "https://stackoverflow.com/questions/405426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I overload a C# method by specific instances of a generic type Coming from a C++ background, I've run into a snag with overloading based on a specific instance of a generic type. The following doesn't work since only once instance of the code for the Foo<T> class is ever generated, so inside the Method, the...
{ "language": "en", "url": "https://stackoverflow.com/questions/405429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the simplest way to create and call dynamically a class method in C++? I want to fill a map with class name and method, a unique identifier and a pointer to the method. typedef std::map<std::string, std::string, std::string, int> actions_type; typedef actions_type::iterator actions_iterator; actions_type ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/405432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Compression Algorithm for Encoding Word Lists I'm am looking for specific suggestions or references to an algorithm and/or data structures for encoding a list of words into what would effectively would turn out to be a spell checking dictionary. The objectives of this scheme would result in a very high compression r...
{ "language": "en", "url": "https://stackoverflow.com/questions/405433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do I connect to my mysql databases, which I used heidsql to make, from a website? I am using heidisql to create my mysql databases. How do i connect to those databases from the website I'm using. I need to be able to change the databases from the website. I am writing the website in php and writing the program ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can my .NET Web Services be considered as a RESTful interface? Happy New Year. I have a bunch of SOAP Web Services. They all have an HTTP POST and GET interfaces along with the SOAP interface. I believe POST and GET are offered by default when building SOAP Web Services in .NET/Visual Studio. These methods either: (...
{ "language": "en", "url": "https://stackoverflow.com/questions/405470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET Datagrid HTML Output (Display) Currently I am binding a dataset with a datagrid. ds = query.ExecuteReadQuery("select PollQuestionText as 'Survey Question', PollAnswer1Text as 'Selection 1', PollAnswer2Text as 'Selection 2', PollAnswer3Text as 'Selection 3', PollEnabled 'Status' from tbl_pollquestions"...
{ "language": "en", "url": "https://stackoverflow.com/questions/405478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best practices when applying conditional formatting in data bound controls? I have a Repeater contol bound to a custom object (an EntitySpaces query) and have noticed there are a couple of ways to conditionally format the values being displayed. 1) From my aspx I can call a method in my code-behind and pass through...
{ "language": "en", "url": "https://stackoverflow.com/questions/405480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python update object from dictionary Is there a built-in function/operator I could use to unpack values from a dictionary and assign it into instance variables? This is what I intend to do: c = MyClass() c.foo = 123 c.bar = 123 # c.foo == 123 and c.bar == 123 d = {'bar': 456} c.update(d) # c.foo == 123 and c.bar...
{ "language": "en", "url": "https://stackoverflow.com/questions/405489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Choosing ISAM rather than SQL Many developers seem to be either intimidated or a bit overwhelmed when an application design requires both procedural code and a substantial database. In most cases, "database" means an RDBMS with an SQL interface. Yet it seems to me that many of the techniques for addressing the "impe...
{ "language": "en", "url": "https://stackoverflow.com/questions/405491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is it possible to setup a shared folder for DLLs with relative pathing in Visual Studio 2008? I am using Team Foundation as source control for a solution with eight C# projects. In order to enforce decoupling and stability, I have only enabled dependencies between the project and their tests. What I would like to d...
{ "language": "en", "url": "https://stackoverflow.com/questions/405493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create HTML output without a) databinding or b) using Response.Write? Kind of related to my other question - I've only ever used HTMLControls with runat="server" and WebControls grudgingly, preferring to have control over the markup that gets generated (including the ids of the elements, etc.). What's your su...
{ "language": "en", "url": "https://stackoverflow.com/questions/405508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Hiding implementation details on an email templating system written in Python I am writing an application where one of the features is to allow the user to write an email template using Markdown syntax. Besides formatting, the user must be able to use placeholders for a couple of variables that would get replaced at...
{ "language": "en", "url": "https://stackoverflow.com/questions/405509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: If all in list == something Using Python 2.6, is there a way to check if all the items of a sequence equals a given value, in one statement? [pseudocode] my_sequence = (2,5,7,82,35) if all the values in (type(i) for i in my_sequence) == int: do() Instead of, say: my_sequence = (2,5,7,82,35) all_int = True for...
{ "language": "en", "url": "https://stackoverflow.com/questions/405516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: How can I deal with too Many Mock Expectations in unit tests? I am writing unit tests for my presentation class in MVP pattern.But I am having trouble to write mock setup code. I have a presenter and when presenter's Load method called I want to test view should load class properties, table fields, data types,set p...
{ "language": "en", "url": "https://stackoverflow.com/questions/405518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Windows Installer database inspection? Does anybody know of a tool that allow me to inspect what files an installer just added to a system after it ran? Its sounds like this should be something that should exist. A: A quick googling came up with Total Uninstall. A: Unless it's too late you could use a tool such ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Confused about accessing struct members via a pointer I'm new to C, and am confused by results I'm getting when referencing a member of a struct via a pointer. See the following code for an example. What's happening when I reference tst->number the first time? What fundamental thing am I missing here? #include <s...
{ "language": "en", "url": "https://stackoverflow.com/questions/405537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is a cyclic data structure good for? I was just reading through "Learning Python" by Mark Lutz and came across this code sample: >>> L = ['grail'] >>> L.append(L) >>> L ['grail', [...]] It was identified as a cyclic data structure. So I was wondering, and here is my question: What is a 'cyclic data structure...
{ "language": "en", "url": "https://stackoverflow.com/questions/405540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: C# - are all Enum constants? Are all Enum enumerations constants? Do they get converted to their value at compile-time, or at run-time? A: Enum values are constants, they cannot change. Their values are fixed at compile time. A: They are constant. Yes, compile time. Reference: http://msdn.microsoft.com/en-us/libra...
{ "language": "en", "url": "https://stackoverflow.com/questions/405548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to get t4 files to build in visual studio? When I build my c# solution the .tt files will not create the .cs file outputs. But if I right click the .tt files one at a time in solution explorer and select "Run Custom Tool" the .cs is generated, so the build tool setting is correct. What do I do to get the overall...
{ "language": "en", "url": "https://stackoverflow.com/questions/405560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Help with checkbox and database please i want help im a begginer I have a form with checkboxes. Each have a value when the checkboxes are checked it's value is added to the sum... I want to save the checkboxes that are checked into a database. <script type="text/javascript"> function checkTotal() { docum...
{ "language": "en", "url": "https://stackoverflow.com/questions/405574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a supported CodePlex license that restrict using the source for commercial? I have been reading through the CodePlex supported open source licenses, i couldn't quite understand everything, What i am looking for is a License that restrict the use of my source code commercialy. is there one? Thanks A: Why do...
{ "language": "en", "url": "https://stackoverflow.com/questions/405581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Using an IN clause with MySQL with stated values I'm trying to write a query that updates rows in a table if a certain column has a value in a list I'm providing: UPDATE MY_TABLE SET COL1 = 'xyz' WHERE COL2 IN ('x', 'y', 'z'); I'm getting a syntax error, but I know that this should be possible. It's essentially a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/405583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What RESTful API would you use for a turn-based game server? How would you model a turn-based game server as a RESTful API? For example, a chess server, where you could play a game of chess against another client of the same API. You would need some way of requesting and negotiating a game with the other client, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/405588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Detecting that a ThreadPool WorkItem has completed/waiting for completion For whatever reason, ThreadPool's QueueWorkItem doesn't return an IAsyncResult or some other handle to the work item, which would allow to wait until it's completed. There are RegisterWait... methods, but you have to pass a WaitHandle and crea...
{ "language": "en", "url": "https://stackoverflow.com/questions/405600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Accepting File Argument in Python (from Send To context menu) I'm going to start of by noting that I have next to no python experience. alt text http://www.aquate.us/u/9986423875612301299.jpg As you may know, by simply dropping a shortcut in the Send To folder on your Windows PC, you can allow a program to take a fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/405612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: insert two values from an mysql table into another table using a python program I'm having a small problem with a Python program (below) that I'm writing. I want to insert two values from a MySQL table into another table from a Python program. The two fields are priority and product and I have selected them from th...
{ "language": "en", "url": "https://stackoverflow.com/questions/405617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Convert string to int and test success in C# How can you check whether a string is convertible to an int? Let's say we have data like "House", "50", "Dog", "45.99", I want to know whether I should just use the string or use the parsed int value instead. In JavaScript we had this parseInt() function. If the string co...
{ "language": "en", "url": "https://stackoverflow.com/questions/405619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Flow Based Programming I have been doing a little reading on Flow Based Programming over the last few days. There is a wiki which provides further detail. And wikipedia has a good overview on it too. My first thought was, "Great another proponent of lego-land pretend programming" - a concept harking back to the l...
{ "language": "en", "url": "https://stackoverflow.com/questions/405627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Adding some custom session variables to a JavaScript object I currently have a custom session handler class which simply builds on php's session functionality (and ties in some mySQL tables). I have a wide variety of session variables that best suits my application (primarily kept on the server side). Although I am ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405636", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Methods for interacting with a Pervasive SQL database I'm in the process of developing a web interface to a service business management application that uses a Pervasive SQL database to store information (not my choice, by the way). At the moment, I'm using the official Pervasive SqlClient implementation with a cust...
{ "language": "en", "url": "https://stackoverflow.com/questions/405640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Implementing IAsyncResult explicitly I am generally wary of implementing interfaces partially. However, IAsyncResult is a bit of a special case, given that it supports several quite different usage patterns. How often do you use/see used the AsyncState/AsyncCallback pattern, as opposed to just calling EndInvoke, usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/405647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Passing arguments with wildcards to a Python script I want to do something like this: c:\data\> python myscript.py *.csv and pass all of the .csv files in the directory to my python script (such that sys.argv contains ["file1.csv", "file2.csv"], etc.) But sys.argv just receives ["*.csv"] indicating that the wildca...
{ "language": "en", "url": "https://stackoverflow.com/questions/405652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to draw 3D mathematical models in .NET? What 3D engine would best suitable to do this effectively? I recently faced a problem of presenting the output of simple genetic algorithm that looks for extremes of 2 argument function f(x1,x2) . I would like to be able to use x1 as x, x2 as y and f as z and to draw point...
{ "language": "en", "url": "https://stackoverflow.com/questions/405666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What would you do if you coded a C++/OO cross-platform framework and realize its laying on your disk for too much due to no time? This project started as a development platform because i wanted to be able to write games for mobile devices, but also being able to run and debug the code on my desktop machine too (ie, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Django tag cloud plugin Is there a good Django app out there that can take a list of tags and their frequencies of occurrence and render a tag cloud for them? A: Django-tagging has helpers for generating tag clouds. A: A little self-promotion never hurt anybody, right? http://dburke.info/blog/logarithmic-tag-clou...
{ "language": "en", "url": "https://stackoverflow.com/questions/405675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Oracle: how to use updateXML to update multiple nodes in a document? I can write: update my_table set xml = updateXML(xml, '/a/b', '1') where document_id = 123 Now what if in the same update query I also want to set /a/c to 2 (in addition /a/b to 1)? I am tempted to write: update my_table set xml = updateXML(x...
{ "language": "en", "url": "https://stackoverflow.com/questions/405679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP/MySQL with encoding problems I am having trouble with PHP regarding encoding. I have a JavaScript/jQuery HTML5 page interact with my PHP script using $.post. However, PHP is facing a weird problem, probably related to encoding. When I write htmlentities("í") I expect PHP to output &iacute;. However, instead it...
{ "language": "en", "url": "https://stackoverflow.com/questions/405684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: In Subversion can I be a user other than my login name? I'd like to know how to get Subversion to change the name that my changes appear under. I'm just starting to use Subversion. I'm currently using it to version control code on an XP laptop where I'm always logged in under my wife's name. I'd like the subversion ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "266" }
Q: How to generate the random default "gravatars" like on Stack Overflow? How does Stack Overflow auto-generate the gravatars for those users who do not upload a picture or who have not created a Gravatar icon? Where do these random avatars come from, and how can I generate them for my own site? A: The 'random' colo...
{ "language": "en", "url": "https://stackoverflow.com/questions/405717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: Modifying Microsoft Outlook contacts from Python I have written a few Python tools in the past to extract data from my Outlook contacts. Now, I am trying to modify my Outlook Contacts. I am finding that my changes are being noted by Outlook, but they aren't sticking. I seem to be updating some cache, but not the rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/405724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Project source or published DLL's? When reusing code (for example, a Util library you created), do you add its project to your solution or use a compiled/published DLL from the Util library? A: If an assembly is mature, not likely to change or I'm fairly certain I won't need to step into it I would reference the DL...
{ "language": "en", "url": "https://stackoverflow.com/questions/405740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: parsing HTML on the iPhone Can anyone recommend a C or Objective-C library for HTML parsing? It needs to handle messy HTML code that won't quite validate. Does such a library exist, or am I better off just trying to use regular expressions? A: I found using hpple quite useful to parse messy HTML. Hpple project is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: What's the difference for using CALayer and UIView when do iPhone game development? For iPhone game development, seems there are very like functions using CALayer and UIView, we can implement our spirit using CALayer or UIView , and animations are usable for them too. But for coding, there are many difference betwe...
{ "language": "en", "url": "https://stackoverflow.com/questions/405751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Typed FP: Tuple Arguments and Curriable Arguments In statically typed functional programming languages, like Standard ML, F#, OCaml and Haskell, a function will usually be written with the parameters separated from each other and from the function name simply by whitespace: let add a b = a + b The type here bei...
{ "language": "en", "url": "https://stackoverflow.com/questions/405761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Delphi IDE - CodeRush visual "connectors" alternative I used to work in Delphi 6, and got very used to having CodeRush's various helpful IDE additions. Many are now in the IDE itself, or I've managed to replace with something else, but the one feature I REGULARLY find myself wishing I had in Delphi 2007 still, is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/405764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to use libxml with unicode xmlchar? Is it possible to use libxml with unicode? For example the xmlParseDoc function takes an xmlChar xmlChar has the following definition: typedef unsigned char xmlChar; I would like for libxml to interpret all as 2 byte chars. I have a feeling that the following woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/405766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why are compilers so stupid? I always wonder why compilers can't figure out simple things that are obvious to the human eye. They do lots of simple optimizations, but never something even a little bit complex. For example, this code takes about 6 seconds on my computer to print the value zero (using java 1.6): int x...
{ "language": "en", "url": "https://stackoverflow.com/questions/405770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Is there any Cocos2d based open-source iPhone game exist? I want to study Cocos2d, seems it's a good framework for iPhone game programming. So is there any Cocos2d based open-source iPhone game exist? A: The place to ask this is on cocos2d google group. I believe there are several games and game demos available to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: 64bit upgrade for .NET Whats the best resource to look at for when migrating dotnet applications from 32bit to 64bit. SIMILAR QUESTION Are there any considerations needed to be taken running your .net program on x64 vs x86? A: * *This MSDN article is useful. *This blog has some good .NET 64-bit information. *Ru...
{ "language": "en", "url": "https://stackoverflow.com/questions/405776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PDO query problem I am updating some code from the old mysql_* functions to PDO. It connects without a problem, runs the query without a problem, but the resultset is empty. PDO::query() is supposed to return a PDOStatement object, yet I am getting true in return. No errors are reported. Here is my code: try { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Base tag messing with bookmark links I have a Joomla site which uses mod_rewrite to create pretty urls. http://www.example.com/resources/newsletter However this created a problem. Including images like this: src="images/pic.jpg", it would then look for a file at: http://www.example.com/resources/newsletter/images/p...
{ "language": "en", "url": "https://stackoverflow.com/questions/405786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MySQL versus SQL Server Express Performance Comparison I have a somewhat complex query with roughly 100K rows. The query runs in 13 seconds in SQL Server Express (run on my dev box) The same query with the same indexing and tables takes over 15+ minutes to run on MySQL 5.1 (run on my production box - much more power...
{ "language": "en", "url": "https://stackoverflow.com/questions/405795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How would I do a proper fadein for dynamic content refreshing with jquery? I have a .txt file that I need to include into a page, that gets dynamically updated every 5 seconds, so I need to refresh it via ajax, so that the updated content can be seen without refreshing the page. I want to do it so it fades into the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Large amount of data - what is the best way to send them? we have this scenario: A server which contains needed data and client component which these data wants. On the server are stored 2 types of data: - some information - just a couple of strings basically - binary data We have a problem with getting binary dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/405800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can I access the visual voicemail files on the iphone thru the SDK? I would like to access the visual voicemail files that are stored on an iphone. Are there ways to access these files through the SDK? Does anybody have any experience in working with these files? I am assuming that they are files that are downloa...
{ "language": "en", "url": "https://stackoverflow.com/questions/405808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .NET Rectangular Arrays: how to access in a loop? Basically you have two ways for doing this: for (int x = 0; x < UPPER_X; x++) for (int y = 0; y < UPPER_Y; y++) { arr1[x, y] = get_value(); arr2[y, x] = get_value(); } The only difference is what variable to change in the inner lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/405810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: silverlight...hyperlinkbutton to file using relative path I am trying to use a hyperlinkbutton in silverlight to enable the user to download a word document. I don't care if a file save as box appears or if the word doc opens in a new browser. I get the error "cannot navigate to locations relative to a page." I'v...
{ "language": "en", "url": "https://stackoverflow.com/questions/405812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Quick Java Question: Instantiating a given class only from another? My problem is thus: I need a way to ensure only one given class can instantiate another. I don't want to have to make the other a nested inner class or something dumb like that. How do I do this? I forget offhand. A: A private static inner class...
{ "language": "en", "url": "https://stackoverflow.com/questions/405826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Not set or empty string -- which is better for if it ends up displaying "none" to the user? I am wondering if you use unset variables, empty strings (or 0's), or "None" to determine if a variable is "None"? The case I'm thinking of is, I'm retrieving something from the database, but find that the value is not set fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/405842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using svn with Textmate Coming from IDEs with full-blown svn support such as Eclipse and Netbeans, I'm wondering what is the recommended way to use svn with Textmate? Is it all manual, ie using the command line, or are there features that allow you to diff/checkin/merge/etc in Textmate itself? A: There is a plugin ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405850", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Insufficient privileges when creating a trigger for a table in another schema When I try to create a trigger in schema A for a table located in schema B, I get an ora error : insufficient privileges. What privileges do I need? A: If you are creating the trigger in your schema, you'll need the CREATE TRIGGER privi...
{ "language": "en", "url": "https://stackoverflow.com/questions/405889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Issues with FastCGI and links containing index.php? versus index.php On a Windows 2003 server running IIS 6.0 and FastCGI with an ExpressionEngine-powered website, I've encountered an issue where links containing index.php fail unless a question mark is added. The basic issue is that if a link points to "index.php/...
{ "language": "en", "url": "https://stackoverflow.com/questions/405894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Zend_Form - Array based elements? Using Zend_Form, how would I create form elements like this: <input type="text" name="element[1]" value="" /> <input type="text" name="element[2]" value="" /> // etc... A: You can either use subforms: $form = new Zend_Form(); $subForm = new Zend_Form_SubForm(); $subForm->addEleme...
{ "language": "en", "url": "https://stackoverflow.com/questions/405897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Ideas on making a javascript object name unique in ASP.Net? I've created an ASP.Net user control that will get placed more than once inside of web page. In this control I've defined a javascript object such as: function MyObject( options ) { this.x = options.x; } MyObject.prototype.someFunction=function someFunct...
{ "language": "en", "url": "https://stackoverflow.com/questions/405901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NULL vs Empty when dealing with user input Yes, another NULL vs empty string question. I agree with the idea that NULL means not set, while empty string means "a value that is empty". Here's my problem: If the default value for a column is NULL, how do I allow the user to enter that NULL. Let's say a new user is cre...
{ "language": "en", "url": "https://stackoverflow.com/questions/405909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Get the id of inserted row using C# I have a query to insert a row into a table, which has a field called ID, which is populated using an AUTO_INCREMENT on the column. I need to get this value for the next bit of functionality, but when I run the following, it always returns 0 even though the actual value is not 0: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: WPF - setting HorizontalAlignment= Stretch to Textbox in StackPanel Why doesn't a textbox stretch to fill space in a stackpanel? Is this by design? In a grid, the textbox stretches as expected. A: Kent's answer seems right. To still force override the StackPanel behavior, I think you'd need to dynamically compute-...
{ "language": "en", "url": "https://stackoverflow.com/questions/405935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Comparisons of Ajax libraries Can anyone point to a good unified comparison of various AJAX libraries? I've read about a dozen different ones, I'm about to start a project, and I'm just not confident I've explored the space of possibilities yet. PLEASE NOTE I'm not asking for "I think XXX is great" -- I'm looking f...
{ "language": "en", "url": "https://stackoverflow.com/questions/405936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: With so much system resources available, how sure are you your code is tuned? With CPUs being increasingly faster, hard disks spinning, bits flying around so quickly, network speeds increasing as well, it's not that simple to tell bad code from good code like it used to be. I remember a time when you could optimize ...
{ "language": "en", "url": "https://stackoverflow.com/questions/405944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is a RESTful way of monitoring a REST resource for changes? If there is a REST resource that I want to monitor for changes or modifications from other clients, what is the best (and most RESTful) way of doing so? One idea I've had for doing so is by providing specific resources that will keep the connection ope...
{ "language": "en", "url": "https://stackoverflow.com/questions/405950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Generating UML from C++ code? Is there a tool that can parse C++ files within a project and generate UML from it? A: Here are a few options: Step-by-Step Guide to Reverse Engineering Code into UML Diagrams with Microsoft Visio 2000 - http://msdn.microsoft.com/en-us/library/aa140255(office.10).aspx BoUML - http://bo...
{ "language": "en", "url": "https://stackoverflow.com/questions/405953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "130" }
Q: How can you change the highlighted text color for a WPF TextBox? The WPF TextBox natively makes use of the System Highlight color for painting the background of selected text. I would like to override this and make it consistent since it varies by OS/user theme. For ListBoxItems, there is a neat trick (see below) w...
{ "language": "en", "url": "https://stackoverflow.com/questions/405967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What is meant by htmlencode and urlencode? Possible Duplicate: Difference between Url Encode and HTML encode What does HTMLEncode mean and how do I use it? What does URLEncode mean and how is it different from HTMLEncode?
{ "language": "en", "url": "https://stackoverflow.com/questions/405994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Embedding Lua in OCaml Could you, please, give a code snippet showing how to use Lua embedded in OCaml? A simple example could be a "Hello, World" variant. Have OCaml prompt the user for a name. Then pass that name to a Lua function. Have Lua print a greeting and return the length of the name. Then have OCaml pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/405995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Call cmake from make to create Makefiles? I am using cmake to build my project. For UNIX, I would like to type make from my project's root directory, and have cmake invoked to create the proper Makefiles (if they don't exist yet) and then build my project. I would like the cmake "internal" files (object files, cma...
{ "language": "en", "url": "https://stackoverflow.com/questions/406004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Passing Pointer To An Array Of Arrays Through Function There is a pointer-to-an-Array of Arrays i.e. NameList in the code. I want the contents of each of the Arrays in the Pointer(NameList) to get printed one by one. The below code is not able do the task. Pls. help. int Data1[] = {10,10}; int Data2[] = {20,20};...
{ "language": "en", "url": "https://stackoverflow.com/questions/406010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to reduce the startup time for a typical iPhone app? To be clear, this is for a normal iPhone application, and not a game. I've read around the web a few times some developers mentioning that they were working hard to improve/reduce the startup time of their applications, but never with any good background infor...
{ "language": "en", "url": "https://stackoverflow.com/questions/406015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }