text
stringlengths
8
267k
meta
dict
Q: In C++ You Can Have a Pointer to a Function, Can you also have a pointer to a class? I'm not talking about a pointer to an instance, I want a pointer to a class itself. A: No. A pointer is the address of something in the memory of the computer at run-time. A class is just a set of instructions to the compiler. A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/285886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: php: writing files I want to create a file on the webserver dynamically in PHP. First I create a directory to store the file. THIS WORKS // create the users directory and index page $dirToCreate = "..".$_SESSION['s_USER_URL']; mkdir($dirToCreate, 0777, TRUE); // create the directory for the user Now I want to creat...
{ "language": "en", "url": "https://stackoverflow.com/questions/285889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: numeric(38,0) as primary key column; good, bad, who cares? On my current project, I came across our master DB script. Taking a closer look at it, I noticed that all of our original primary keys have a data type of numeric(38,0) We are currently running SQL Server 2005 as our primary DB platform. For a little context...
{ "language": "en", "url": "https://stackoverflow.com/questions/285899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to automate the tasks for releasing open-source-software? Everyone managing open-source-software runs into the problem, that with the time the process of releasing a new version gets more and more work. You have to tag the release in your version-control, create the distributions (that should be easy with automa...
{ "language": "en", "url": "https://stackoverflow.com/questions/285904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Am I missing something, or do varargs break Arrays.asList? private void activateRecords(long[] stuff) { ... api.activateRecords(Arrays.asList(specIdsToActivate)); } Shouldn't this call to Arrays.asList return a list of Longs? Instead it is returning a List<long[]> public static <T> List<T> asList(T... ...
{ "language": "en", "url": "https://stackoverflow.com/questions/285928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using Regex Plus Function in Python to Encode and Substitute I'm trying to substitute something in a string in python and am having some trouble. Here's what I'd like to do. For a given comment in my posting: "here are some great sites that i will do cool things with! https://stackoverflow.com/it's a pig & http://go...
{ "language": "en", "url": "https://stackoverflow.com/questions/285931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you apply Scrum to maintenance and legacy code improvements? As the title suggest... How can I apply a scrum process to anything that doesn't work on new code and can be estimated to some degree? How can I apply a scrum process to maintenance and emergency fixes (which can take from 5 minutes to 2 weeks to fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/285933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Is it possible to insert a row but only if a value does not already exist? Is it possible to insert a row, but only if one of the values already in the table does not exist? I'm creating a Tell A Friend with referral points for an ecommerce system, where I need to insert the friend's email into the database table, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/285937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Decomposing HTML to link text and target Given an HTML link like <a href="urltxt" class="someclass" close="true">texttxt</a> how can I isolate the url and the text? Updates I'm using Beautiful Soup, and am unable to figure out how to do that. I did soup = BeautifulSoup.BeautifulSoup(urllib.urlopen(url)) links =...
{ "language": "en", "url": "https://stackoverflow.com/questions/285938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Using NHibernate with output parameters Does anyone know if NHibernate supports returning output parameters from stored procedures? I've had a search in the documentation but can't really find anything that confirms either way. A: I was facing the same problem. NHibernate does not let you use stored procedures in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/285952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Java - get the newest file in a directory? Does anybody have a snippet of Java that can return the newest file in a directory (or knowledge of a library that simplifies this sort of thing)? A: The following code returns the last modified file or folder: public static File getLastModified(String directoryFilePath) {...
{ "language": "en", "url": "https://stackoverflow.com/questions/285955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: How to avoid, that URL.equals needs access to the internet in Java? The equals() method of the URL class in the Java class library makes a DNS request to get the IP for the hostname, to check the two IP's for equality. This happens even for URLs that are created from the same String. Is there a way to avoid this int...
{ "language": "en", "url": "https://stackoverflow.com/questions/285960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I renew an SSL certificate for several years in IIS? The renewal wizard doesn't seem to ask for a renewal period. A: I think the Cerficate Supplier sets the renewal period. So it depends on the type of Cert you buy (or the setup of your certification service). A: The expiration date of the certificate you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/285971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Parsing XML Files by constructing an Object Model I've always preferred using XSD.exe/VS.Net to generate schema, generate classes off the schema, deserialize xml file into object tree to parse an XML file. [Well, most of my requirements thus far have made this a perfect choice]. I've a crib though: The class names ...
{ "language": "en", "url": "https://stackoverflow.com/questions/285972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Parse HTML via XPath In .Net, I found this great library, HtmlAgilityPack that allows you to easily parse non-well-formed HTML using XPath. I've used this for a couple years in my .Net sites, but I've had to settle for more painful libraries for my Python, Ruby and other projects. Is anyone aware of similar libra...
{ "language": "en", "url": "https://stackoverflow.com/questions/285990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Developing WPF app - any way to optimize .NET install? I'd love to use WPF for a consumer app. However, some real world tests are not very encouraging. On several high-end computers I've tested, the .NET 3.5 installation has taken 15-20 mins to complete. I've seen reports online mentioning 50 mins. When Vista market...
{ "language": "en", "url": "https://stackoverflow.com/questions/285997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Permission Denied errors with Visual Studio 2008 under Vista I've taken the plunge and upgraded (or maybe downgraded?!) from WinXP to Vista. Everything appeared to be working ok except that when I fired up my machine this morning and opened my C# application in Visual Studio I got a few "Load of property 'OutputPath...
{ "language": "en", "url": "https://stackoverflow.com/questions/285999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hidden features of mod_rewrite There seem to be a decent number of mod_rewrite threads floating around lately with a bit of confusion over how certain aspects of it work. As a result I've compiled a few notes on common functionality, and perhaps a few annoying nuances. What other features / common issues have you ru...
{ "language": "en", "url": "https://stackoverflow.com/questions/286004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "118" }
Q: How to tune Tomcat 5.5 JVM Memory settings without using the configuration program I need to configure Tomcat memory settings as part of a larger installation, so manually configuring tomcat with the configuration app after the fact is out of the question. I thought I could just throw the JVM memory settings into th...
{ "language": "en", "url": "https://stackoverflow.com/questions/286007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: LDAP & Active Directory results missing fields for some results When querying with LDAP against our Active Directory structure to look up user accounts, some records (but not all) are missing certain key fields, specifically memberOf and userAccountControl (which has a bit flag that indicates whether the account is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Detecting if YouTube is blocked by company / ISP We have YouTube videos on a site and want to detect if it is likely that they will not be able to view them due to (mostly likely) company policy or otherwise. We have two sites: 1) Flex / Flash 2) HTML I think with Flex I can attempt to download http://youtube.com/cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/286021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Paged table with ASP.NET MVC and AJAX I'm looking for good patterns for implementing a paged table of results in ASP.NET MVC with sorting, filtering, and paging provided via AJAX. It seems to me that I should have my controller actions provide only the data and not mark up to maintain the separation of concerns -- ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Sharing types in WCF using VS 2008 not working I am trying to share DTO's from my datalayer assembly between the client and WCF service. This works using svcutil, but doesn't work when using VS2008. VS2008 generates it's own DTO objects whereas svcutil uses the shared data type. The svcutil parameters I used are: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get record counts for all tables in MySQL database Is there a way to get the count of rows in all tables in a MySQL database without running a SELECT count() on each table? A: There's a bit of a hack/workaround to this estimate problem. Auto_Increment - for some reason this returns a much more accurate row count fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/286039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "422" }
Q: Reading Excel in .NET, how to get specific rows? I have got the following code from here to read an Excel file using C# .NET: string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Book1.xls;Extended Properties=""Excel 8.0;HDR=YES;"""; DbProviderFactory factory = DbProviderFactories.GetFactory("Sys...
{ "language": "en", "url": "https://stackoverflow.com/questions/286044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Chosing a suitable table size for a Hash If I have a key set of 1000, what is a suitable size for my Hash table, and how is that determined? A: It depends on the load factor (the "percent full" point where the table will increase its size and re-distribute its elements). If you know you have exactly 1000 entries, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What do I need to change to allow my IIS7 ASP.Net 3.5 application to create an event source and log events to Windows EventLog? ASP.Net 3.5 running under IIS 7 doesn't seem to allow this out of the box. if (!EventLog.SourceExists("MyAppLog")) EventLog.CreateEventSource("MyAppLog", "Application");...
{ "language": "en", "url": "https://stackoverflow.com/questions/286060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Decimal place issues with floats and decimal.Decimal I seem to be losing a lot of precision with floats. For example I need to solve a matrix: 4.0x -2.0y 1.0z =11.0 1.0x +5.0y -3.0z =-6.0 2.0x +2.0y +5.0z =7.0 This is the code I use to import the matrix from a text file: f = open('gauss.dat') lines = f.readlines()...
{ "language": "en", "url": "https://stackoverflow.com/questions/286061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Increase the maximum zoom level of a Google map How would I go about creating a Google map that allows the user to zoom beyond the default zoom levels for the map? Would I have to create a new map type that has a greater maximum zoom? Are there any tutorials out there that show how to do this? A: Check out the do...
{ "language": "en", "url": "https://stackoverflow.com/questions/286062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I keep 2 scratch Databases in sync My question is a lot like this one. However I'm on MySQL and I'm looking for the "lowest tech" solution that I can find. The situation is that I have 2 databases that should have the same data in them but they are updated primarily when they are not able to contact each oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/286076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: BizTalk publish net.tcp WCF service Is anybody familiar with setting up WCF-nettcp adapters for BTS? When I create a WCF-netTcp adapter for a Receive location, I am unsure how/when BTS will open up port 808 to listen on the address URI specified. It appears to only happen if I restart the entire BizTalk application....
{ "language": "en", "url": "https://stackoverflow.com/questions/286077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Service Unavailable in IIS When I access a wrong call to a sql server data into my application in classical ASP I get this message in my entire site: Service Unavailable. It stopped. My site is in a remote host. Don´t know what to do. What can I tell to the "support team" of them to fix that? A: If you check out Ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/286081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Subversion does not remember my user/password I've installed Subversion on Ubuntu following the guide Installation of Subversion on Ubuntu, with Apache, SSL, and BasicAuth.. It works, and I was able commit and create different repositories, but somehow, from time to time (sometimes minutes), when trying to do a comm...
{ "language": "en", "url": "https://stackoverflow.com/questions/286085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Stack Overflow Exploit in C The question is actually about stack overflows in C. I have an assigment that I can not get done for the life of me, I've looked at everything in the gdb and I just cant figure it. The question is the following: int i,n; void confused() { printf("who called me"); exit(0); } voi...
{ "language": "en", "url": "https://stackoverflow.com/questions/286090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is there a good alternative to SQL*PLUS for Oracle? I am not a fan of using SQL*PLUS as an interface to Oracle. I usually use yasql, but it hasn't been updated since 2005 and can do with some improvements. A quick Google search shows yasql and SQLPal. I am using linux, so SQLPal is not an option. Are there any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Asserting that a method is called exactly one time I want to assert that a method is called exactly one time. I'm using RhinoMocks 3.5. Here's what I thought would work: [Test] public void just_once() { var key = "id_of_something"; var source = MockRepository.GenerateStub<ISomeDataSource>(); source.Expe...
{ "language": "en", "url": "https://stackoverflow.com/questions/286093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Passing a value with struct type into a function in C typedef struct { nat id; char *data; } element_struct; typedef element_struct * element; void push(element e, queue s) { nat lt = s->length; if (lt == max_length - 1) { printf("Error in push: Queue is full...
{ "language": "en", "url": "https://stackoverflow.com/questions/286096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Resolving 'Environment.SpecialFolder.Personal' when Folder Redirection is active Our Windows Forms application by default saves data files in a user's 'My Documents' folder (on XP) or 'Documents' folder (on Vista). We look up this location by calling: Environment.GetFolderPath( Environment.SpecialFolder.Personal ) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Regex - Find Content of div by id with nested divs Before anybody asks, I am not doing any kind of screenscraping. I'm trying to parse an html string to find a div with a certain id. I cannot for the life of me get this to work. The following expression worked in one instance, but not in another. I'm not sure if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to synchronize C & C++ libraries with minimal performance penalty? I have a C library with numerous math routines for dealing with vectors, matrices, quaternions and so on. It needs to remain in C because I often use it for embedded work and as a Lua extension. In addition, I have C++ class wrappers to allow for...
{ "language": "en", "url": "https://stackoverflow.com/questions/286105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Looking for a configurable pretty printer for C# code I work on a team with about 10 developers. Some of the developers have very exacting formatting needs. I would like to find a pretty printer that I could configure to these specifications and then add to the build processes. In this way no matter how badly other ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to read a line from file? I have to read a txt file with lines formated like this: 1: (G, 2), (F, 3) 2: (G, 2), (F, 3) 3: (F, 4), (G, 5) 4: (F, 4), (G, 5) 5: (F, 6), (c, w) 6: (p, f), (G, 7) 7: (G, 7), (G, 7) w: (c, w), (c, w) Each line will feed a struct with its data (the 5 numbers or letters in it). What's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I test ModelState? How can I test Controller.ViewData.ModelState? I would prefer to do it without any mock framework. A: You don't have to use a Mock if you're using the Repository Pattern for your data, of course. Some examples: http://www.singingeels.com/Articles/Test_Driven_Development_with_ASPNET_MVC....
{ "language": "en", "url": "https://stackoverflow.com/questions/286124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Getting a Partial View's HTML from inside of the controller I have developed a simple mechanism for my mvc website to pull in html via jquery which then populates a specified div. All is well and it looks cool. My problem is that i'm now creating html markup inside of my controller (Which is very easy to do in VB.n...
{ "language": "en", "url": "https://stackoverflow.com/questions/286132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Remove blank attributes from an Object in Javascript How do I remove all attributes which are undefined or null in a JavaScript object? (Question is similar to this one for Arrays) A: ES10/ES2019 examples A simple one-liner (returning a new object). let o = Object.fromEntries(Object.entries(obj).filter(([_, v]) => ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "483" }
Q: Disable button after submit I'm trying to disable a button when a user submits a payment form and the code to post the form is causing a double post in firefox. This problem does not occur when the code is removed, and does not occur in any browser other than firefox. Any idea how to prevent the double post here? S...
{ "language": "en", "url": "https://stackoverflow.com/questions/286149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to split a web address So I'm using python to do some parsing of web pages and I want to split the full web address into two parts. Say I have the address http://www.stackoverflow.com/questions/ask. I would need the protocol and domain (e.g. http://www.stackoverflow.com) and the path (e.g. /questions/ask). I fig...
{ "language": "en", "url": "https://stackoverflow.com/questions/286150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I see if an element in an int array is empty? example: I want to see if array[5] holds a value or is empty. A: There is no such thing as an "empty" element in a Java array. If the array's length is at least six, then element 5 exists and it has a value. If you have not assigned anything else to that locatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/286161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I still use DDD, TDD in BizTalk? I just started getting into BizTalk at work and would love to keep using everything I've learned about DDD, TDD, etc. Is this even possible or am I always going to have to use the Visio like editors when creating things like pipelines and orchestrations? A: You can certainly...
{ "language": "en", "url": "https://stackoverflow.com/questions/286174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I limit tree nodes from being dragged from their current node in flex 3? So I have a flex tree component with a xmllistcollection as it's data provider. I would like to be able to rearrange the leaves and branches in the tree by drag and drop. I want to limit the drop area to the current level of the item bei...
{ "language": "en", "url": "https://stackoverflow.com/questions/286179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Alternative to StyleCop for Visual Studio? I like StyleCop's static code analysis and rules enforcement. However, it is severely lacking in several key departments. * *Adding new rules isn't officially supported and from what I hear pretty difficult. *Automatic "fixing" of trivial rules violations would be ni...
{ "language": "en", "url": "https://stackoverflow.com/questions/286180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How to capture a serial port that disappears because the usb cable gets unplugged I have a c# winforms program and it opens up a serial port. The problem happens when the end user unplugs the usb cable and then the device disappears. After this the program will crash and want to report the error to microsoft. Is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/286184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Separating code from DB functionality I'm developing an object-oriented PHP website right now and am trying to determine the best way to abstract database functionality from the rest of the system. Right now, I've got a DB class that manages all the connections and queries that the system uses (it's pretty much an i...
{ "language": "en", "url": "https://stackoverflow.com/questions/286187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Importance of closing SQLConnection objects when using the SQLDataReader object My present contract engagement is at a large E-Commerce company. Their code base which has origins going back to .Net 1.0 has caught me by surprise to contain many issues that raise the level of smell beyond the last crap I took. That n...
{ "language": "en", "url": "https://stackoverflow.com/questions/286190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Join statement, but need to only get data based on WHERE table column is empty I have this query statement and want to only get records that has a certain column empty (volunteers_2009.venue_id) Table is volunteers_2009, column I am looking to see if it is empty: venue_id Here is the current query: SELECT volunteers...
{ "language": "en", "url": "https://stackoverflow.com/questions/286191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Useful new .net(3.0,4.0) technology features Previously it was .net 2.0 which is the big change in .net developement. many developers are working mostly on this. Presently microsoft has introduced .net 3.0 and yet its next version .net 4.0. So the next version is going to be major change in .net development. I have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Are socket connections faster than http on Blackberry? I'm writing an app for Blackberry that was originally implemented in standard J2ME. The network connection was done using Connector.open("socket://...:80/...") instead of http:// Now, I've implemented the connection using both methods, and it seems like some ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/286206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to get a Phone Number from an Address Book Contact (iphone sdk) I am showing an addressbook view to the user and letting them click on a contact and select a phone number. If they select a phone number, I want to get the phone number as an integer and the contact's name as an NSString. I've tried doing it with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What could cause "Connection Interrupted" on LocalHost when debugging in ASP.NET I'm trying to run a freshly created ASP.NET Website using C#, however when I do so it launches FireFox and attempts to connect to http://localhost:1295/WebSite1/Default.aspx (for example), but after about 10-15 seconds it displays a "Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/286219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: New features you would like to avail in ASP.NET MVC What are the new features you would like to avail in ASP.NET MVC in the future releases? I Would say 1) A separate view engine for ASP.NET MVC instead of current WebForm view engine. 2) Asynchronous Controller Actions. 3) Subcontrollers / Partial Requests. A: y...
{ "language": "en", "url": "https://stackoverflow.com/questions/286227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to read a mailing list as RSS I'm subscribed in a mailing list that I use only as reference for developing and I'm trying to read it with my RSS client but the mailing list doesn't provide the RSS. So I thought it should be a way to convert the mailing list to a RSS I was trying to find some php class to install...
{ "language": "en", "url": "https://stackoverflow.com/questions/286232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: WF ThrowActivities and custom error messages? is it possible to throw a custom error message to a ThrowActivity, in windows workflow foundation? eg. Imagine i want to throw this exception, in my WF :- CutomException("This is my custom error message", myNumber, myObect); cheers :) A: Maybe I do not understand your ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a time when && (AndAlso) does not matter over & (And) If I am evaluating two variables and not two method calls does it matter weather I use "&&" or "&" //some logic that sets bool values boolean X = true; boolean Y = true; if (X & Y){ // perform some operation } if (X && Y){ // perform some operat...
{ "language": "en", "url": "https://stackoverflow.com/questions/286250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Alternate Java GUI Frameworks I am making a small game number game in Java (Nim) in OS X and was thinking about trying to make the GUI interface of the game using something other than Swing. I looked at SWT, but I read somewhere that SWT has some problems with OS X. I also looked at GTK+ bindings for Java, but I am ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Borland Dev Studio 2006 Turbo C++ Explorer compile issue G'day everyone I'm a newbie to C++ and even more so to Borland Turbo C++ Explorer. I've just encountered this compile error. Any clues as to how to fix it? [C++ Error] comsvcs.h(3209): E2015 Ambiguity between 'ITransaction' and 'Oledb::ITransaction' [C++ Erro...
{ "language": "en", "url": "https://stackoverflow.com/questions/286253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Logging status of application to console window I am currently refactoring an application that prints its status to the console window. At the moment I am doing something like this: Console.Write("Print some status.....") //some code Console.WriteLine("Done!") Now while this works fine, all the logic is hidden...
{ "language": "en", "url": "https://stackoverflow.com/questions/286257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Import com.apple.com.dnssd package I'm trying to compile and run a sample bonjour program apple provides in the BonjourSDK found here: http://developer.apple.com/networking/bonjour/index.html The program is called SimpleChat.java. However, whenever I attempt to compile the program I get this error: "SimpleChat.java:...
{ "language": "en", "url": "https://stackoverflow.com/questions/286264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unicode and network communication I am planning on developing a windows based client app and a platform agnostic server app. The client app basically sends messages to the server app. Client app can send messages in English or in other languages. Should I be using UNICODE for encoding messages in my client app? What...
{ "language": "en", "url": "https://stackoverflow.com/questions/286266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to password protect streaming videos with php What is the best way to password protect quicktime streaming videos using php/.htaccess. They are being streamed using rtsp, but I can use other formats if necessary. I know how to do authentication with php, but I'm not sure how to setup authentication so that will ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: OnActionExecuting(FilterExecutingContext) doesn't exist in System.Web.Mvc anymore? In preview 5 I was overriding the OnActionExecuting in my custom controller class, but now for some reason in beta it is giving me an error saying the parameter FilterExecutingContext doesn't exist? protected override void OnActi...
{ "language": "en", "url": "https://stackoverflow.com/questions/286273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Direct3D Geometry: Rotation Matrix from Two Vectors Given two 3D vectors A and B, I need to derive a rotation matrix which rotates from A to B. This is what I came up with: * *Derive cosine from acos(A . B) *Derive sine from asin(|A x B| / (|A| * |B|)) *Use A x B as axis of rotation *Use matrix given near the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Gray out image with CSS? What's the best way (if any) to make an image appear "grayed out" with CSS (i.e., without loading a separate, grayed out version of the image)? My context is that I have rows in a table that all have buttons in the right most cell and some rows need to look lighter than others. So I can make...
{ "language": "en", "url": "https://stackoverflow.com/questions/286275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "214" }
Q: How can I make cookies in my Flash application? How can I make cookies in my Flash application using ActionScript 2.0? A: You would need to use JavaScript to work with cookies. You can do so from ActionScript using the ExternalInterface API. A: If you just need local storage and don't have a specific need for cook...
{ "language": "en", "url": "https://stackoverflow.com/questions/286282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: TinyMCE Draws Okay, But Won't Let Me Type In It. In FF, Buttons Have Error: Component returned failure code: 0x80004005 In previous applications, I was able to get TinyMCE to work just fine. But in this web app, I get the rich editor to show up okay, but for some reason I cannot type into the rich editor field and w...
{ "language": "en", "url": "https://stackoverflow.com/questions/286285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Windows Mobile 5 SDK Button Control I'm a fairly novice programmer working on my first Windows Mobile application. I see that there is no button control available for my program. I've never created a custom control before, and I understand that is the only way that I can get a button for my application (it is a re...
{ "language": "en", "url": "https://stackoverflow.com/questions/286286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Written a resharper plugin that modifies the TextControl? Resharper claims to eat it's own dogfood, specifically, they claim that many of the features of Resharper are written ontop of R# (OpenAPI). I'm writing a simple plugin to fix up comments of the current document of a selection. When this plugin is run, it t...
{ "language": "en", "url": "https://stackoverflow.com/questions/286296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Javascript error handling with try .. catch .. finally I have a suspicion that I'm using the finally block incorrectly, and that I don't understand the fundamentals of its purpose... function myFunc() { try { if (true) { throw "An error"; } } catch (e) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: For our next project I would like to get into some AJAX to improve the user interface. Guidelines and advice? Our team is experienced in web development (tomcat/Oracle) but not with AJAX on our existing projects. This is new technology for us, so I want to introduce this carefully and correctly. What should I look ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Clearbox Radius attributes through SQL statement? I authenticate users through Radius, and I have the option to assign Radius attributes through SQL statements, but I can't for the life of me find any documentation on this. Anyone know the proper syntax? A: Okay, I figured it out, and for anyone else who ends up ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/286316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I emulate PUT/DELETE for Rails and GWT? I would like to make my application somewhat REST compliant. I am using Rails on the backend and GWT on the frontend. I would like to do updates and deletes. I realize I can do something like mydomain.com/:id/delete (GET) and accomplish the same thing. However, as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: I want to create a form in SharePoint that allows the booking of time on a timetable Hello, I am currently working on the student association's website. The student's association owns a couple of rooms and we want to build an online form which allows a student to book the room for a specific time, and we want to hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/286331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I remove the borders of a UITableView? I have subclassed the UITableView control, and the style is grouped, but I do not need the cell separators. I tried setting my table view's separatorStyle to none, but it doesn't work. Can any one help me out? A: To remove the border of a table view write this line: s...
{ "language": "en", "url": "https://stackoverflow.com/questions/286332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: how to click on a button in the iphone application and link to a website i am developing a iphone application in a view-based project,(not navigation) however i would like to click on a button in that application and able to link to a website,anyone can give me some hint how to make the view being transistion A: Se...
{ "language": "en", "url": "https://stackoverflow.com/questions/286333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Finding head and tail events in SQL Server (Optimisation) I have a table of events, I need to find all tail events of type 1 and all head events of type 1. So, for the set of events in this order [1, 1], 3, 1 ,4, 5, [1,1,1] the brackets denote head and tail events of type 1. This is much better illustrated in SQL:...
{ "language": "en", "url": "https://stackoverflow.com/questions/286334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WCF Duplex Service and TCP Port Exhaustion I am trying to wrap my head around this. I am making a business specific messaging application, it is going to connect between 5000 and 10,000 machines back to our datacenter via WCF (no vpns, all over the net). It is mainly for alerts and I need to be able to send message...
{ "language": "en", "url": "https://stackoverflow.com/questions/286354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Nod32 causing LocalHost (ASP.NET Development Server) "Connection Interrupted" Problem I'm quoting myself on a previous question I asked to further explain: "I'm trying to run a freshly created ASP.NET Website using C#, however when I do so it launches FireFox and attempts to connect to http://localhost:1295/WebSite1...
{ "language": "en", "url": "https://stackoverflow.com/questions/286356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: silverlight 2 binding data to transforms? I am working on creating a tag cloud in Silverlight 2 and trying to bind data from a List collection to a Scale transform on a TextBlock. When running this I get an AG_E_PARSER_BAD_PROPERTY_VALUE error. Is it possible to data bind values to transforms in Silverlight 2? If n...
{ "language": "en", "url": "https://stackoverflow.com/questions/286366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Word Automation in C#- Creating Tables in Word I have a C# application which will open a word document and then replace some of the predefined bookmarks with the data which i have like Name,Class etc.. It is all are just string values .Now I want to render a Table with dynamic number of rows to the word document.I...
{ "language": "en", "url": "https://stackoverflow.com/questions/286371", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: unable to post a https WebRequest in .net? Hi i am encountering problems trying to post a WebRequest under Https. i received the following errors 1.-The underlying connection was closed: Unable to connect to the remote server. 2.-the operation TimeOut 3-The underlying connection was closed: Could not establish secu...
{ "language": "en", "url": "https://stackoverflow.com/questions/286375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Code in any language (.NET preffered) to edit and create settings for PPPoE connections in Windows XP Pretty all in question... I'm looking for batch script, code or library which allows to edit and create settings for PPPoE connections in windows when hardware and infrastructure is already present. Also I'm looking...
{ "language": "en", "url": "https://stackoverflow.com/questions/286385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Checking if an application is still running from a batch file? How to use batch file to check if an application still running or not? If the application still running, this process will loop again and again. Else, there will be error message. Thank you very much A: in windows you kan use pstools pslist to check if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/286392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a way to define a List<> of two elements string array? I want to build two-dimentional array of strings where length of one dimention is 2. Similar to this string[,] array = new string[,] { {"a", "b"}, {"c", "d"}, {"e", "f"}, {"g", "h"} } Doing List<string[]> list = new List<string[]>(); l...
{ "language": "en", "url": "https://stackoverflow.com/questions/286399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Two Computers Finding Each Other over Internet Given two computers attached to the Internet that know nothing about each other before hand, is it possible for one computer to be able to broadcast a message so that the second computer could receive it and respond? I know UDP broadcast exsits, but I believe that those...
{ "language": "en", "url": "https://stackoverflow.com/questions/286401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Initializing struct, using an array I have a couple of array's: const string a_strs[] = {"cr=1", "ag=2", "gnd=U", "prl=12", "av=123", "sz=345", "rc=6", "pc=12345"}; const string b_strs[] = {"cr=2", "sz=345", "ag=10", "gnd=M", "prl=11", "rc=6", "cp=34", "cv=54", "av=654", "ct=77", "pc=12345"}; which i then need to p...
{ "language": "en", "url": "https://stackoverflow.com/questions/286402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Problem with applet loading on Mac OS x 10.4 I have been working on web application which includes java applet. My app is working fine on PC with different browsers like IE and Firefox. The web application hosted on Linux (Ubuntu). I had problem on Mac with Firefox. I was unable to load the applet. This is the error...
{ "language": "en", "url": "https://stackoverflow.com/questions/286418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to build a dmg Mac OS X file (on a non-Mac platform)? Is it possible to build a .dmg file (for distributing apps) from a non-Mac platform? And if yes, how? A: It does seem possible to create DMG files with some third party tools. A quick google search reveals at least a few commercial tools: * *TransMac *M...
{ "language": "en", "url": "https://stackoverflow.com/questions/286419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Finding an interesting frame in a video Does anyone know of an algorithm that I could use to find an "interesting" representative thumbnail for a video? I have say 30 bitmaps and I would like to choose the most representative one as the video thumbnail. The obvious first step would be eliminate all black frames. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/286422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: JavaScript: closing window from iframe I have a page P1 loading from site S1 which contains an iframe. That iframe loads a page P2 from another site S2. At some point P2 would like to close the browser window, which contains P1 loaded from S1. Of course, since P2 is loaded from another site, it can't just do parent....
{ "language": "en", "url": "https://stackoverflow.com/questions/286426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Calculating permutations in F# Inspired by this question and answer, how do I create a generic permutations algorithm in F#? Google doesn't give any useful answers to this. EDIT: I provide my best answer below, but I suspect that Tomas's is better (certainly shorter!) A: you can also write something like this: let...
{ "language": "en", "url": "https://stackoverflow.com/questions/286427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Signing a Windows application given a .SPC file? My client wants to sign the application code. He gave me an .spc file for signing a .NET desktop application. How should I use it within the app? Thanks A: http://ellisweb.net/2008/08/signing-code-using-pvk-and-spc-files/ A: Got a simple option.Install your spc file...
{ "language": "en", "url": "https://stackoverflow.com/questions/286429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }