text
stringlengths
8
267k
meta
dict
Q: Why do we use arrays instead of other data structures? As I was programming, I haven't seen an instance where an array is better for storing information than another form thereof. I had indeed figured the added "features" in programming languages had improved upon this and by that replaced them. I see now that they...
{ "language": "en", "url": "https://stackoverflow.com/questions/392397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "214" }
Q: How to decide whether I should use AIR or Titanium I may want to create a RIA but am wondering, whether Adobe AIR or Titanium is the way to go. Do you think the open source version will last longer? Will it be better in anyway? A: Just in case anyone comes back to this post, I'll add my 2 cents. Titanium has come a...
{ "language": "en", "url": "https://stackoverflow.com/questions/392414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How would a loaded library function call a symbol in the main application? When loaded a shared library is opened via the function dlopen(), is there a way for it to call functions in main program? A: Yes, If you provide your library a pointer to that function, I'm sure the library will be able to run/execute the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Pixel Programming continued I have got a byte array of pixels in BGR order and I want to create an image out of it in C#. Can anyone offer code or advice? A: Something to the effect of (not-tested) private Bitmap createImage(int width, int height, byte[] image) { int index = 0; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why doesn't the XmlSerializer need the type to be marked [Serializable]? In C#, if I want to serialize an instance with XmlSerializer, the object's type doesn't have to be marked with [Serializable] attribute. However, for other serialization approaches, such as DataContractSerializer, needs the class be marked as [...
{ "language": "en", "url": "https://stackoverflow.com/questions/392431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Passing variables with jQuery i'm relatively new to jquery and javascript and am trying to pass a unique id (number) into a flickr search function (jquery.flickr-1.0-js) like so, (number is the variable where i'm storing the unique id) <script type="text/javascript" src="javascripts/jquery.flickr-1.0.js"></script> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's available for livecoding music? I recently found out about livecoding where someone will program something on the fly to make music. Apparently there are special languages and libraries for this sort of thing. So I'd like to know if anyone has any experience with it and if they have any languages, libraries o...
{ "language": "en", "url": "https://stackoverflow.com/questions/392449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: About constructors/destructors and new/delete operators in C++ for custom objects Suppose I have a Linked List I created myself. It has its own destructor, which frees the memory. This Linked List does not overload new or delete. Now, I'm trying to create an array of said linked lists (open hashing, if I understand ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I do base64 encoding on iOS? I'd like to do base64 encoding and decoding, but I could not find any support from the iPhone SDK. How can I do base64 encoding and decoding with or without a library? A: In mvds's excellent improvement, there are two problems. Change code to this: raw = tmpbuf; inp = 0; outbuf[o...
{ "language": "en", "url": "https://stackoverflow.com/questions/392464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "235" }
Q: How do I add an existing directory tree to a project in Visual Studio? The issue is simple really. Instead of creating folders in Visual Studio, I create a directory structure for my project on the file system. How do I include all the folders and files in a project, keeping the structure? If I "Add Existing File" o...
{ "language": "en", "url": "https://stackoverflow.com/questions/392473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "907" }
Q: Hosting: why does the number of MySQL databases matter? Ok, maybe I'm missing something here but I'm looking at various PHP hosting options and I see things like "10 MySQL databases", or 25 or even unlimited. Now I've worked on sites with an Oracle backend that have 10,000+ concurrent users and we've had... one data...
{ "language": "en", "url": "https://stackoverflow.com/questions/392492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Problem of SQLite3::SQLException: SQL logic error or missing database SQLite3::SQLException: SQL logic error or missing database error when do insert, update and delete operation to tables from browser( that means the create, update and destroy action is failed but the show action is fine ), the same operation i...
{ "language": "en", "url": "https://stackoverflow.com/questions/392493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I avoid this blocking situation in .NET 3.0 / WinForms / SQLServer 2005? Application 1 - * *Opens a SqlConnection and a SqlTransaction against a SQLServer 2005 database *Inserts a record into Table1 *Does not commit or roll-back the SqlTransaction - intentially keeping this alive to demonstrate / descri...
{ "language": "en", "url": "https://stackoverflow.com/questions/392501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LogParser dropping log entries I'm importing IIS logfiles into a SQL database but for some reason not every entry makes it into the database. For instance if the logfile has 1,000,000 entries logparser does say that it processed 1,000,000 entries but if I do a SELECT COUNT(*) in the database I don't have 1,000,000 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: In Windows Mobile (5/6) SDK, where did windns.h go? According to http://msdn.microsoft.com/en-us/library/aa916070.aspx (DnsQuery_W), DNS query libraries are available on Windows Mobile / CE developers for versions 5.0 onwards. Yet, "#include " gives nasty "file not found" errors. What gives? Strangely enough "dnsapi...
{ "language": "en", "url": "https://stackoverflow.com/questions/392507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using 64 bit OS for .Net development in VS My development machine ( 32 bit Windows XP) runs excruciatingly slow when I am doing .Net development in Visual Studio 2008, thanks to the installation of Resharper. So I am thinking about switching my development machine to 64 bit Windows XP. Not sure whether such a switc...
{ "language": "en", "url": "https://stackoverflow.com/questions/392510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can something be initializable? I've created an interface called Initializable, but according to Dictionary.com this is not a word. Searching Google only gives about 30k results and they are mostly API references. Is there another word to describe something that can be initialized (which is a word)? Edit: Thanks for...
{ "language": "en", "url": "https://stackoverflow.com/questions/392513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to download file using web service in C#? How to download a file via web service ? And how the client application accept this? I write down the code as below in the client app, it throws an exception "Access Denied" wsDownload.wsDownloadFile downFile = new wsDownload.wsDownloadFile(); byte[] file = downFile.D...
{ "language": "en", "url": "https://stackoverflow.com/questions/392539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adding parameters for a program at launch I'm currently trying to make a small application that performs different duties. Right now I have a console app pop up and ask what I want to do, but sometimes I would rather just launch it with something like MyApp.exe -printdocuments or some such thing. Are there any tuto...
{ "language": "en", "url": "https://stackoverflow.com/questions/392540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Find if an audio is currently playing I need to find out if my program is currently playing any audio and in case it does, I want to stop the previous audio and start a new playback. The property kAudioSessionProperty_OtherAudioIsPlaying always returns a 0 (probably only checks whether iPod music is playing) There's...
{ "language": "en", "url": "https://stackoverflow.com/questions/392542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Pole display problem in c# I used pole display(E POS) in my POS c# application.I have two major problem in that, 1. I can't clear the display perfectly. 2. I can't set the cursor position. I used some dirty tricks to do these.But I am not satisfied with that code.The following code i used. Code :- class PoleDi...
{ "language": "en", "url": "https://stackoverflow.com/questions/392550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: OFBiz Work Effort Calendar customization I am customizing the calendar in the Work Effort application where I have to limit the number of fields displayed while adding a new event (event type - EVENT). I modified the EditWorkEffort form in the WorkEffortForms.xml to ignore the fields which I don't want to display. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/392557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: FireFox script tag error While adding some very basic script tags I found a wierd "bug" in firefox (as well as IE) I added these two lines of code to my .htm page <script type="text/javascript" src="js/jquery.js" /> <script type="text/javascript" src="js/jquery.corner.js" /> To me as well as opera and chrome they l...
{ "language": "en", "url": "https://stackoverflow.com/questions/392561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What should I propose for a reusable code library organization? My organization has begun slowly repurposing itself to a less product-oriented business model and more contract-oriented business model over the last year or two. During the past year, I was shifted into the new contracting business to help put out fir...
{ "language": "en", "url": "https://stackoverflow.com/questions/392587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I add non-column specific parameters to a C# table adapter? I'm using a TableAdapter for the first time and adding a custom query to it, and I'm getting stuck on adding some search parameters to my query, here's what I've got: SELECT * FROM Orders WHERE (id_order = @id_order) OR (IsFor LIKE '%@...
{ "language": "en", "url": "https://stackoverflow.com/questions/392592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Concurrent User Sessions - Why Don't We See More Of It? This is something of a rant, as well as a question. There are some sites, like Facebook, where you would only want to be logged into one account at a time. But everything from blogging sites to email always force you to logout before you can login to another a...
{ "language": "en", "url": "https://stackoverflow.com/questions/392594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SELECT FOR UPDATE for locked queries I'm using MySql 5.x and in my environment, I have a table with the name CALLS. Table CALLS has a column status which takes an enum {inprogress, completed}. I want reads/updates of the table to be row-locked, so: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; SET AUTOCOMMIT = 0; SE...
{ "language": "en", "url": "https://stackoverflow.com/questions/392609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Setting up a development environment INSIDE a virtual machine Heres the problem. I use around three different machines for development. My partner is using two. We have to go through the same freaking set up procedure on all five machines to get to work. Working with a php project here, so: Install and configure, PD...
{ "language": "en", "url": "https://stackoverflow.com/questions/392616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Good language to develop a game server in? I was just wondering what language would be a good choice for developing a game server to support a large (thousands) number of users? I dabbled in python, but realized that it would just be too much trouble since it doesn't spawn threads across cores (meaning an 8 core ser...
{ "language": "en", "url": "https://stackoverflow.com/questions/392624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Lost XML file declaration using DataSet.WriteXml(Stream) I had a Dataset with some data in it. When I tried to write this DataSet into a file, everything was OK. But When I tried to write it into a MemoryStream, the XML file declaration was lost. The code looks like: DataSet dSet = new DataSet(); //load schema, fill...
{ "language": "en", "url": "https://stackoverflow.com/questions/392626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to prevent PHP's file_get_contents( ) one of my php page returns data like this: <?php //... echo "json string"; ?> but someone else use file_get_contents() to get my data and use in other website. can anybody tell me what can i do to prevent such thing happen. i consider if i can get the request's domain ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Website Image Formats: Choosing the right format for the right task When designing a website, what do you consider the best image format to use for a particular task? I always find myself in a dilemma when trying to figure out what format to use for a specific task...like for example, should I use .jpg all round? o...
{ "language": "en", "url": "https://stackoverflow.com/questions/392635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: When will SQLServer 2005 fail to do insert / update AND ALSO WILL NOT "throw" an exception? After running a insert or update query against a SQLServer 2005 database, under what scenario (if at all) can this happen - SQLServer 2005 does not perform or fails to perform the insert / update, AND ALSO DOES NOT "THROW" AN...
{ "language": "en", "url": "https://stackoverflow.com/questions/392637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I use a variable in the replacement side of the Perl substitution operator? I would like to do the following: $find = "start (.*) end"; $replace = "foo \1 bar"; $var = "start middle end"; $var =~ s/$find/$replace/; I would expect $var to contain "foo middle bar", but it does not work. Neither does: $replac...
{ "language": "en", "url": "https://stackoverflow.com/questions/392643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Is it possible to use .png images for WiX bitmaps I am using 2 500K bitmaps in to display images on my WiX dialogs. They dramatically increase the size of the installation package, and what is worse - it looks there's no way to package them as a part of a .cab file since they're <binary>-es in the WiX terms. So, I t...
{ "language": "en", "url": "https://stackoverflow.com/questions/392654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: MD5 Hashing in Delphi 2009 In borland delphi 7 and even in delphi 2007 everything worked, but in delphi 2009 it just returns the wrong hash! I use wcrypt2 script (http://pastebin.com/m2f015cfd) Just have a look: string : "123456" hash: Delphi 7 : "e10adc3949ba59abbe56e057f20f883e" - real hash. Delphi 2007 : "e10adc...
{ "language": "en", "url": "https://stackoverflow.com/questions/392657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: jQuery ajax calling javascript function I am using jQuery and Ajax. My MainFile has the following code: <html> <head> <script src="Myscript.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $.ajax({ type: 'POST', ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Simple Scenario, How to Incorporate Tell Don't Ask? I'm trying to model a basic scenario involving a Person and a Seat. A Person has a Status property: Sitting or Standing. A seat has a Seated property that specifies the Person that is currently sitting in it. Also, a Seat is special in that it only "accepts" certai...
{ "language": "en", "url": "https://stackoverflow.com/questions/392668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Five Questions regarding the use of C# / VisualStudio 2005 I've some questions .. and I really need your help. * *I have an application. First I display a splash screen, a form, and this splash would call another form. Problem: When the splash form is displayed, if I then open another application on the top of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PopupWindow in jQuery I am in need of a popupwindow with the option of a radio button. I have tested with Impromtu. Is any easy made Popupwindow plugin available? My plugin should work in Internet Explorer, Mozilla and Google Chrome. What would some sample code be? A: jqModal is great and easy-to-use for building M...
{ "language": "en", "url": "https://stackoverflow.com/questions/392698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Difference between shadowing and overriding in C#? What's difference between shadowing and overriding a method in C#? A: I think the main difference is that with shadowing, you're essentially reusing the name, and just ignoring the superclass use. With overriding, you're changing the implementation, but not the ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/392721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "110" }
Q: How to make a color from a number I have a function that returns a float from 0 to 255. I would like to make a gradient in red color from this, but I need a string in "#FFFFFF" format. Is there a function for that? A: def rgbtohex(r,g,b): return "#%02X%02X%02X" % (r,g,b) A: You could use: "#%02X0000" % x
{ "language": "en", "url": "https://stackoverflow.com/questions/392728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: NHibernate Transactions in Open View per Session - suggested practices? Cleaning up some transactional logic and wondered how other people were handling it. Ayende's recommendation seems to be to handle transactions at the service boundary. This is a ASP.NET web app though, so it hasn't got a clear cut service bound...
{ "language": "en", "url": "https://stackoverflow.com/questions/392730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I get the free space of a phone's MMC flash card I want to get the size and free space of a phone's memory card via USB connection from a PC. I use PC suite connection. This isn't a mobile application; it's a desktop application. All I do is to open a connection between the application and the mobile, then ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Haskell, Lisp, and verbosity For those of you experienced in both Haskell and some flavor of Lisp, I'm curious how "pleasant" (to use a horrid term) it is to write code in Haskell vs. Lisp. Some background: I'm learning Haskell now, having earlier worked with Scheme and CL (and a little foray into Clojure). Traditio...
{ "language": "en", "url": "https://stackoverflow.com/questions/392733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "104" }
Q: Xcode: Adjusting indentation of auto-generated braces? Code auto-generated by Xcode seems to have the opening brace on the same line by default: @interface Controller : NSObject { } I'd like the opening brace on a line of its own, like this: @interface Controller : NSObject { } This applies in general to any me...
{ "language": "en", "url": "https://stackoverflow.com/questions/392749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: How to do it in mysql: If id=idold THEN UPDATE status=1 I would like to compare two tables and then update if some logic is true, In pseudo code: SELECT * FROM users, usersold IF users.id=usersold.id THEN UPDATE users.status=1; Is there a way to do it in MySQL? A: UPDATE users u SET status = 1 WHERE EXISTS (SELECT...
{ "language": "en", "url": "https://stackoverflow.com/questions/392750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Force use of CDATA in XML-schema I am creating an xml schema, and I want to make sure that the values in all the elements are CDATA elements. Is there a way to force this using XML-schema? A: As I recall XML Schema works on the XML Infoset, meaning with the XML document after it is parsed, entities are resolved, wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/392770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to show syntax errors in an eclipse editor plugin How can I indicate syntax errors (e.g. an illegal sequence of tokens) in an eclipse editor plugin just like in the eclipse Java editor, i.e. by red wriggly underlines, a red marker on the scrollbar that you can jump to, and an explanatory message when you hover o...
{ "language": "en", "url": "https://stackoverflow.com/questions/392775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there an alternative to Maven for .NET/Windows Forms projects? What is used instead of Maven for C# Windows Forms projects? We have developers all over the world and are trying to come up with some dependency management system that is clean simple and fast. A: It seems like there has been some work done in this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: How to process two forms in one view? I have two completely different forms in one template. How to process them in one view? How can I distinguish which of the forms was submitted? How can I use prefix to acomplish that? Or maybe it's better to write separate views? regards chriss A: Personally, I'd use one view t...
{ "language": "en", "url": "https://stackoverflow.com/questions/392784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: XMPP and Android Possible Duplicate: Android and XMPP: Currently available solutions I am trying to build a small XMPP client in Android. Any ideas on what library I can use? I have tried using the Smack API, but there are some issues with it, which makes it not practical. A: it's already been implemented. take ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Unload COM dll from .Net program We have a .Net application from which a C++ COM component is being instantiated. We load the COM component from a child form window. There is a common resource that is being edited by the .Net application, which inturn is being used by the COM dll to start up. When the following se...
{ "language": "en", "url": "https://stackoverflow.com/questions/392786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: problem with splash screen - C# - VS2005 I have an application. First I display a splash screen, a form, and this splash would call another form. Problem: When the splash form is displayed, if I then open another application on the top of the splash, and then minimize this newly opened application window, the spla...
{ "language": "en", "url": "https://stackoverflow.com/questions/392787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Are you taking up Perl and what got you into it? I got into Perl years ago and always found it a fun and expressive language to work with. I found that programming in Perl makes me quite productive thanks to its low overhead and the outstanding amount of ready-made solutions to common problems on CPAN. If you're new...
{ "language": "en", "url": "https://stackoverflow.com/questions/392789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Showing flash above content I have a page with a tutorial (http://www.poromenos.org/tutorials/bittorrent/download), but the site layout obscures the flash player, which is too wide. Is there a way to show the flash above the content through the z-order (or something else, lightbox-y)? A: You could place IFrame with...
{ "language": "en", "url": "https://stackoverflow.com/questions/392790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Protecting licensing implementation in C++ What ways are there to protect licensing enforcement mechanisms in C/C++? I know of: * *Using macros (but that make the code difficult to maintain) *Linking statically *Obfuscating symbol names Other methods I am not sure about: * *Using C++ templates *Using inli...
{ "language": "en", "url": "https://stackoverflow.com/questions/392791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hosting WCF Service on a partial trust host I'm trying to deploy my WCF web service to a free host to test it, but it gives me the following error: The Binding with name WSDualHttpBinding failed validation because the Binding type System.ServiceModel.WSDualHttpBinding is not supported in partial trust. Consider usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/392794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: cross-site XmlHttpRequest in Firefox? I understand (I think) that XmlHttpRequest objects adhere to the "same-domain" policy. However, I want to create a simple (POC) local html file that downloads XML from a web server and does something with it (let's start with a simple "alert()"). Is it possible at all? Do I need...
{ "language": "en", "url": "https://stackoverflow.com/questions/392796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I draw a badge on my Dock icon using Cocoa? How do I add a badge to the Dock icon for my app using Cocoa? Is there any roughly "standardized" way to do this? (I'm referring to the kind of badges that show up in Mail, iChat etc. to indicate the number of unread messages and the like.) Cocoa Touch does provide...
{ "language": "en", "url": "https://stackoverflow.com/questions/392797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Which one do you prefer for Searching/Reporting DataTable or DTO or Domain Class? The project currently I am working in requires a lot of searhing/filtering pages. For example I have a comlex search page to get Issues by data,category,unit,... Issue Domain Class is complex and contains lots of value objects and chil...
{ "language": "en", "url": "https://stackoverflow.com/questions/392806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Degrafa color changer <degrafa:LinearGradientFill id="bluedream"> <degrafa:GradientStop color="#6ab5d0"/> <degrafa:GradientStop color="#388aae"/> </degrafa:LinearGradientFill> <degrafa:GeometryComposition graphicsTarget="{[bgCanvas]}"> <degrafa:RoundedRectangle id="color_preset" fill="{bluedream}"/> </d...
{ "language": "en", "url": "https://stackoverflow.com/questions/392808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What packages should I install with Cygwin to make it not bloated but also have everything I would need as a developer? Normally, I run Linux in a VM, however, most of my VMs are on an external HDD and I might or might not have one with me. I figure Cygwin would be a good alternative for lightweight functionality wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/392812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: refresh and save excel file via c# I use this code to open refresh save and close excel file: Application excelFile = new Application(); Workbook theWorkbook = excelFile.Workbooks._Open(Environment.CurrentDirectory + "/WebGate", 0, false, 5, System.Reflection.Missing.Value, System.Reflection.Missing.V...
{ "language": "en", "url": "https://stackoverflow.com/questions/392818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I disable the toolstripitems on BindingNavigator? I want to enable or disable the toolstripitems on the bindingnavigator programmatically. When I try to set the toolStripitem's enable property, it does not change. It does not give any exception but the value of Enable property does not change. What did I miss...
{ "language": "en", "url": "https://stackoverflow.com/questions/392825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Two different windows forms in C# I am new to C# and .NET programming. I want to design an application that opens up with a small login screen and when user presses the "Login" button, my program should close the login form and pass to a new form. How can I achieve this simple process? Thanks. A: This could be a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/392832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Simplest way to allow posting to a Rails site using MarsEdit/Ecto/etc? I have a simple site, using restful_authentication and a simple model for the posts. I would like to use MarsEdit (or something like Ecto) to post/edit content. How would I go about this? The XML-RPC system is rather bewildering - there's a lot o...
{ "language": "en", "url": "https://stackoverflow.com/questions/392833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to convert .NET DateTimeOffset into Sql2008 DateTimeOffset I'm not sure how to correctly format a .NET DateTimeOffset variable, as a string, for SqlServer 2008 to correct parse the value. currently, if I provide the default .ToString() value from a normal DateTimeOffset value, it errors. Here is a sample .ToStri...
{ "language": "en", "url": "https://stackoverflow.com/questions/392839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: IPhone development on a hacked IPhone You knows that IPhone in other country like China mainland always be hacked when it buy from reseller. Can I develop custom app by official SDK on a hacked IPhone ? A: Yes, you can use Xcode to develop and debug your app on a jailbroken iPhone. You don't even need to pay the $9...
{ "language": "en", "url": "https://stackoverflow.com/questions/392845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C# linear algebra library Is there stable linear algebra (more specifically, vectors, matrices, multidimensional arrays and basic operations on them) library for C#? Search yielded a few open source libraries which are either not updated for couple of years or are in an early beta stage - and Centerspace NMath. Whi...
{ "language": "en", "url": "https://stackoverflow.com/questions/392857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Generate a stack overflow How to create the condition of stack overflow in GNU/linux? A: I'd recommend reading the phrack magazine article "Smashing the stack for fun and profit". It also contains sample code. A: There are code samples in the Wikipedia article. Why you'd want to cause one is beyond me... A: You j...
{ "language": "en", "url": "https://stackoverflow.com/questions/392859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Splash Screen waiting until thread finishes I still have a problem with the splash screen. I don't want to use the property SC.TopMost=true. Now my application scenario is as follows: in progeram.cs: [STAThread] static void Main() { new SplashScreen(_tempAL);// where _tempAL is an arrayList Application.Run(n...
{ "language": "en", "url": "https://stackoverflow.com/questions/392864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: FAST ESP vs Google Search Appliance for development Which of the two provides a better API for developing on top of? Although there is a virtual Google Search Appliance available for download, no such equivalent is present for FAST. So looking to developers with experience in either of these products to give suggest...
{ "language": "en", "url": "https://stackoverflow.com/questions/392870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best framework for desktop applets to begin with? I would like to make a simple desktop application to learn this kind of thing. What language would you recommend for beginner? Would you recommend using framework for beginners? I'm experienced only in javascript and little bit of PHP. What do you say a...
{ "language": "en", "url": "https://stackoverflow.com/questions/392879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do I have use the prefix N in the "insert into" statement for unicode? Like: insert into table (col) values (N'multilingual unicode strings') I'm using SQL Server 2008 and I already use nVarChar as the column data type. A: Yes, you do if you have unicode characters in the strings. From books online (http://msdn....
{ "language": "en", "url": "https://stackoverflow.com/questions/392916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to calculate password complexity Some applications (or websites) compute a password's complexity as you type. They typically display a red bar which turns orange, then green, then even greener as your password gets longer, and contains more classes of characters (e.g., lowercase, uppercase, punctuation, digits)....
{ "language": "en", "url": "https://stackoverflow.com/questions/392928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: One function with varying return types ... possible with Generics? I have a few procedures, for simplicity sake, look like the following: public string FetchValueAsString(string key) public int FetchValueAsInteger(string key) public bool FetchValueAsBoolean(string key) public DateTime FetchValueAsDateTime(string key...
{ "language": "en", "url": "https://stackoverflow.com/questions/392931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I use the conditional (ternary) operator? I've always wondered how to write the "A ? B : C" syntax in a C++ compatible language. I think it works something like: (Pseudo code) If A > B C = A Else C = B Will any veteran C++ programmer please help me out? A: It works like this: (condition) ? true-clause...
{ "language": "en", "url": "https://stackoverflow.com/questions/392932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: How to get the device name in C#? How can I get my device name (using WinCE) in C# code ? It gives me only "WindowsCE" how can i get the type on name of the device ? (ex. symbol or datalogic or mio...) A: I was able to retrieve the device name on Windows CE 5 using System.Net.Dns.GetHostName() Hope this helps. Ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/392960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are the most effective ways to use Lua with C#? From my understanding, Lua is an embeddable scripting language that can execute methods on objects. What are the pitfalls to avoid? Is is it feasible to use Lua as an interpreter and execute methods in an web environment or as a rule engine? A: Lua scripting is...
{ "language": "en", "url": "https://stackoverflow.com/questions/392979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is Symfony a better choice than Zend for a web development shop (10+) because it is a full stack framework? My team at work is considering to use a framework for developing web sites and applications. Some of the seniors are convinced we should use the Zend Framework because it is easier to pick-and-choose the featu...
{ "language": "en", "url": "https://stackoverflow.com/questions/392980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I convert string to double in C++? How can I convert string to double in C++? I want a function that returns 0 when the string is not numerical. A: If it is a c-string (null-terminated array of type char), you can do something like: #include <stdlib.h> char str[] = "3.14159"; double num = atof(str); If it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Ragel - validate a String while Input Assume we want to validate user input, while user is typing in a JTextField. For validating the user input, I wonder if I could use Ragel. Assume the input should follow this example regex: [a-z]{2,5}ABC[0-9]+ How can I do this with ragel? Can anybody give a short example how ...
{ "language": "en", "url": "https://stackoverflow.com/questions/392983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .Net Matrix Is there a standard .Net matrix class? I cannot find it if there is. If not, why not? It sounds like something people would need very frequently. Are there any non-standard libs you could recommend? A: The XNA Framework has a Matrix structure. I'm not aware of any part of the main framework that has a M...
{ "language": "en", "url": "https://stackoverflow.com/questions/393005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: maximal element in an array in Java (Collections.max() for integer arrays int[]) Is there anything like Collections.max which finds the maximal value in an array for regular arrays in the standard java runtime library? A: If you have an array of Objects you can use Collections.max(Arrays.asList(array)); If you ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/393017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Do you plan on using the Factor programming language? Do you plan on using Factor? Have you looked at it? Checked it out. Do you understand stack oriented programming? http://www.youtube.com/watch?v=f_0QlhYlS8g A: Factor looks interesting, but it badly needs more introductory tutorials and articles. A: I intend t...
{ "language": "en", "url": "https://stackoverflow.com/questions/393026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Yacc Problem: Make Data available in next Non Terminal I want to make some variables I generate in b available in c: a : b c { ...some code...} A simple example: b : X { int result = 0; } | Y { int result = 1; } so I can, later on in c say: c : D { printf(result + 1); } | E { printf(result + 2); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/393041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Length of generator output Python provides a nice method for getting length of an eager iterable, len(x) that is. But I couldn't find anything similar for lazy iterables represented by generator comprehensions and functions. Of course, it is not hard to write something like: def iterlen(x): n = 0 try: while ...
{ "language": "en", "url": "https://stackoverflow.com/questions/393053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "164" }
Q: How to I create my own primitive data type in .NET? How do I create my own primitive? For example an integer that has a range of to 1-10. EDIT: This came from a task on Rosetta Code. Defining Primitive Data Types: Demonstrate how to define a type that behaves like an integer but has a lowest valid value of 1 and a...
{ "language": "en", "url": "https://stackoverflow.com/questions/393061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Yacc: Code after each non-terminal Is there a way to execute code after each Terminal? So that something like this is possible: a : B { code } C { some code } Any help would really be appreciated! A: The example you gave should work as is. A: You are right. I some how didn't get that C is $3 after inserting the c...
{ "language": "en", "url": "https://stackoverflow.com/questions/393104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you run a binary file that neither Windows nor Cygwin can execute? I haven't loaded up a VM of Linux yet (I have OpenSUSE on a VM on my machine), but whenever I run the executable under Cygwin, I get the error message "cannot execute binary file". Windows (PowerShell) tells me that it can't find the command t...
{ "language": "en", "url": "https://stackoverflow.com/questions/393105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Figure out the focused control I'm trying to add a CSS class to the Control that will get the focus, once a page is rendered. While the SetFocus() method of the Page class lets me set the Control, there is no corresponding GetFocus() method. According to the .Net sources, the information is stored in the private mem...
{ "language": "en", "url": "https://stackoverflow.com/questions/393110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to understand successful login based on received cookie? While developing a C# application (my first C# app.): * *gets login information from the user (id, pass), *opens a new HttpWebRequest connection to a ASP.NET web page *tries to login to this page with the obtained [id,pass] tuple. If login i...
{ "language": "en", "url": "https://stackoverflow.com/questions/393118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Regular Expression to extract label-value pairs in Java I have a file containing several lines similar to: Name: Peter Address: St. Serrano número 12, España Country: Spain And I need to extract the address using a regular expression, taking into account that it can contain dots, special characters (ñ, ç), áéíóú......
{ "language": "en", "url": "https://stackoverflow.com/questions/393121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Modal dialog box which opens new page using jQuery I see lot of example opening popup with jquery but don't see anything that will let me open new page in popup(modal dialog box). Any help is appreciated. What i am trying to do is when click on item it will open item description page in model dialog box calling an u...
{ "language": "en", "url": "https://stackoverflow.com/questions/393123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Method works in console but not in the controller? SORRY:: I forgot that params[:user_id] does not exist in the controller, using current_user.id ! I wrote a method that returns an array of place values for user bids, e.g., [2, 8, 10]. In the Rails console it works fine, but the instance variable from the controlle...
{ "language": "en", "url": "https://stackoverflow.com/questions/393129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the easiest way to create an array of structs? What's the easiest way to create an array of structs in Cocoa? A: If you want to use an NSArray you'll need to box up your structs. You can use the NSValue class to encode them. Something like this to encode: struct foo { int bar; }; struct foo foobar; foob...
{ "language": "en", "url": "https://stackoverflow.com/questions/393151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Why foreach statements accept objects that implement the 'Collection' pattern instead of accept only objects that implement IEnumerable? Many people ask me why, and I don`t have a good answer for them. Obviously there is a good reason. Does anyone know it? I searched here and found this question. It explains how it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/393152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Dynamic linking with smalltalk objects I plan about implementing a dynamic linking into my smalltalk dialect. The problem is about getting message passing to work with dynamic linking. Message passing itself is as simple as this: message with a selector is sent to the object, the object picks up a method matching wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/393154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to disable click sound in WebBrowser Control I use Javascript to click a link in the webbrowser control. But I don't want to hear IE's "click" sound. Is there any way to do this? P.S. * *I don't want to change system settings. *I've seen this one (HowTo Disable WebBrowser 'Click Sound' in your app only) bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/393166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }