text
stringlengths
8
267k
meta
dict
Q: Regular Expression, numbers? I made a code that translate strings to match each word from the array 0ne to the array two and its showing the right results. But how to let the compiler take the number in the string and print it out as it is, ummmm see the code i wrote class Program { public static string...
{ "language": "en", "url": "https://stackoverflow.com/questions/347463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is required to send messages via USSD? I'm trying to get started with USSD. I'm familiar with other forms of SMS. Ultimately i want to use USSD as part of a real-time payment platform. Thanks. A: Vumi is the name of a free opensource server that runs USSD app's for you. Indeed, you need to know which country y...
{ "language": "en", "url": "https://stackoverflow.com/questions/347465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Is there any way to change the index of menu items in a SharePoint menu? When the "New" menu item on a Document Library expands the default seems to be to list the document templates for that list and the "New folder" as the final element (if "New folder" has not been disabled). I have added a new custom menu item ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: foreach or Repeater - which is better? I'm building a website in ASP.Net, using MVC, and need to list a set of results. Both of the following work as I want them to but I'm wondering which is faster, cleaner and/or better - or if another option entirely would be more appropriate? Note: ViewData.Model is of type IEnu...
{ "language": "en", "url": "https://stackoverflow.com/questions/347472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Can I use Python to intercept global keystrokes in KDE? I want to make a simple app, ideally in Python, that would run in the background on KDE, listening to all keystrokes being done by the user, so that the app goes to the foreground if a specific combination of keys is pressed. Is that doable? Can anyone point me...
{ "language": "en", "url": "https://stackoverflow.com/questions/347475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Internet Explorer matrix transformation filter issue As one of my hobby projects, I'm developing an image effects plugin for jQuery. It's supposed to allow you to apply a few basic effects to an image, and does this by using the canvas HTML element or Internet Explorer filters, which ever are supported. A demo page ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Differences in reload behavior between FF and IE In Firefox a Reload seems to reload everything while on IE the Refresh reloads just the HTML part of the current page. In IE you need to press Ctrl-F5 for a complete reload. Why this difference and is it somewhere an article explaining this difference more thoroughly...
{ "language": "en", "url": "https://stackoverflow.com/questions/347482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do I need one or two Unique Key Indexes for this table? I'm trying to create a Users table that only has OpenId registrations, exactly like StackOverflow. I'm storing in the table * *OpenId Identifier (their login name) *Alias (which is the display name to show to the public) *Some other openId stuff So... I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Saving OpenId fields to a database - what are their types/lengths? I'm wanting to save some OpenId fields to a database table, such as * *OpenId identifier *Full Name *Alias *Email *etc.. is there a place that summerizes the datatypes and lengths for all the common schema fields? I know there are custom one...
{ "language": "en", "url": "https://stackoverflow.com/questions/347486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Watching dynamic array variables values in Xcode I've got the dynamic array of pointers to structure. struct item { unsigned long code; //1 - 2^32 unsigned short date; //0 - (13*365+4-31)+1 unsigned char place; //1 - 200 unsigned short amount; //0 - 10000 unsigned short price; //0 - ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Emitting headers from a tiny Python web-framework I am writing a web-framework for Python, of which the goal is to be as "small" as possible (currently under 100 lines of code).. You can see the current code on github Basically it's written to be as simple to use as possible. An example "Hello World" like site: from...
{ "language": "en", "url": "https://stackoverflow.com/questions/347497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Counting number of operations for brute force approaches I'm a junior student and I had a course called The Design and Analysis of Algorithms. The course is cool but the instructor is not. I don't understand the brute force and how to count the number of operations and how to count the time complexity (worst, best, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why does the inner exception reach the ThreadException handler and not the actual thrown exception? I'm seeing some wierd behaviour when throwing exceptions and catching them in the Application.ThreadException event handler. Basically whats happening in the sample below is that an exception is thrown in the DoWork e...
{ "language": "en", "url": "https://stackoverflow.com/questions/347502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Providing RSS and Atom feeds? Do we need both or has RSS won? I want to provide some RSS feed(s) for my site. Is it worth providing Atom feeds? or is Atom the more common feed? Is there a winner? BTW, this relates to programming because I'm required to program the feed which we will provide (or use some open source ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Developing apps for Near Field Communication (NFC) Please point me to a toolkit i can use to build Near Field Communication apps. thanks A: You can use the Contactless Communication API for Java. A: In order to get started you most often need to get the hardware. Such as NXP, ACS, Omnikey etc. Then you can purchas...
{ "language": "en", "url": "https://stackoverflow.com/questions/347507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: "Node cannot be inserted at the specified point in the hierarchy" I am doing JavaScript Scaffold-like thing. And, code below is showing table. It works normal for all of them, and not for only one table I am getting - in the centring of processing on the third row - I get exception "Node cannot be inserted at the sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/347510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Fake "click" to activate an onclick method I have an element with an onclick method. I would like to activate that method (or: fake a click on this element) within another function. Is this possible? A: Once you have selected an element you can call click() document.getElementById('link').click(); see: https://dev...
{ "language": "en", "url": "https://stackoverflow.com/questions/347512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: UpdateModel prefix - ASP.NET MVC I'm having trouble with TryUpdateModel(). My form fields are named with a prefix but I am using - as my separator and not the default dot. <input type="text" id="Record-Title" name="Record-Title" /> When I try to update the model it does not get updated. If i change the name attribu...
{ "language": "en", "url": "https://stackoverflow.com/questions/347524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Using scripts in a master page with ASP.NET MVC I'm fairly new to ASP.NET MVC, and I'm having a little trouble with scripts... in particular, I want to use jQuery in most pages, so it makes sense to put it in the master page. However, if I do (from my ~/Views/Shared/Site.Master): <script src="../../Scripts/jquery-1....
{ "language": "en", "url": "https://stackoverflow.com/questions/347528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "69" }
Q: WorkFlow designer support with a class library I need to add Workflows to an existing solution, which already contains a class library and a web site. If I add the workflows to the class library, where they fit logically, I have no designer support. If I create them in a separate project, I tend to have circular d...
{ "language": "en", "url": "https://stackoverflow.com/questions/347529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to RowTest with MSTest? I know that MSTest doesn't support RowTest and similar tests. What do MSTests users do? How is it possible to live without RowTest support? I've seen DataDriven test features but sounds like too much overhead, is there any 3rd party patch or tool which allow me to do RowTest similar test...
{ "language": "en", "url": "https://stackoverflow.com/questions/347535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: Rounding float to the nearest factor? I have a small math problem I am trying to solve Given a number x and resolution y, I need to find the next x' with the required resolution. e.g. x = 1.002 y = 0.1 x'= 1.1 x = 0.348 y = 0.1 x'= 0.4 x = 0.50 y = 1 x'= 1 x = 0.32 y = 0.05 x'= 0.35 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: FIle format of eclipse workspace files Is there a (good) documentation about the format of the eclipse workspace files (.location, x.tree, ...)? I need this to programatically create a workspace for automated builds. Unfortunately I have to do this job from a .NET program, so I can't use any Eclipse classes to do th...
{ "language": "en", "url": "https://stackoverflow.com/questions/347546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What tool to use to draw file tree diagram Given a file tree - a directory with directories in it etc, how would you write a script to create a diagram of the file-tree as a graphic file that I can embed in a word processor document. I prefer vector (SVG, EPS, EMF...) files. The tool must run on Windows, but prefer...
{ "language": "en", "url": "https://stackoverflow.com/questions/347551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "114" }
Q: javafx 1.0 alignment and layout With the JavaFX 1.0 release I am trying to layout some SwingButton instances in a HBox such that they are aligned to the right. A lot of the tutorials on the net (admittedly pre 1.0 release) talk about layout classes (FlowPanel et. al) which dont seem to be in this release. Whats the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Visual Studio 2008 + embedded web server on Windows Vista OS: Windows Vista Business SP1 IDE: Visual Studio 2008 SP1 Question: when I create a new web application in VS 2008 and start it, the embedded web server from VS 2008 launches on one port (say 50140). Then the browser (IE7) automatically launches with address...
{ "language": "en", "url": "https://stackoverflow.com/questions/347558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: may gcc be installed, but g++ does not work? I have a problem with simple c++ programs... I would like to install a program, but always have the error like "c++ compiler is unable to create executables"... Now I tried to compile a simple "hello world" program, but I get errors as I would if I compile a c++ program ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best 2D graphics library for Windows Mobile? The title speaks for itself... I've tried to find another question like it but must have missed it if it exists. I'm looking for anything, from a core library replacing GAPI to a .net wrapper... It's for building a nice UI so no 3D needed... A: The System.Dra...
{ "language": "en", "url": "https://stackoverflow.com/questions/347571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I refresh a table view after returning from a "detail view?" I'm new to iPhone and Apple development and working on my first application. It simple with only a TableView and a "detail view" when an item in a table is selected. What I want to do is change the background color of the cell in the TableView based...
{ "language": "en", "url": "https://stackoverflow.com/questions/347572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How do I get nose to discover dynamically-generated testcases? This is a follow-up to a previous question of mine. In the previous question, methods were explored to implement what was essentially the same test over an entire family of functions, ensuring testing did not stop at the first function that failed. My pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/347574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to check if a computer is responding from C# What is the easiest way to check if a computer is alive and responding (say in ping/NetBios)? I'd like a deterministic method that I can time-limit. One solution is simple access the share (File.GetDirectories(@"\compname")) in a separate thread, and kill the thread i...
{ "language": "en", "url": "https://stackoverflow.com/questions/347575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Smarty Plugin for Eclipse Europa Are there any good Eclipse plugins for creating smarty templates? I am using Europa with PDT on Ubuntu (though I doubt the OS will make a difference for this). I found SmartyPDT, but it did not seem to install properly and some of the discussions on it seemed to suggest it was for an...
{ "language": "en", "url": "https://stackoverflow.com/questions/347580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the best way to store a Delphi set in a dataset? The title pretty much says it all. I'm using a TClientDataset to store an array of objects, and one of the objects has a member defined as a set of an enumerated type. As I understand it, Delphi sets are bitfields whose size can vary from 1 to 32 bytes dependi...
{ "language": "en", "url": "https://stackoverflow.com/questions/347592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to test fluent-NHibernate's PersistenceSpecification.VerifyTheMappings with lists and relational objects? How would you test this scenario? I've just started looking into NHibernate and having my first bash at TDD. So far I've really enjoyed it and have been using fluent-Nhibernate for my mapping of the classes....
{ "language": "en", "url": "https://stackoverflow.com/questions/347602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Application Frameworks - Buy, Build, or Assimilate? I was curious as to what other shops are doing regarding base application frameworks? I look at an application framework as being able to provide additional or extended functionality to improve the quality of applications built from it. There are a variety of out ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Storing WPF Image Resources For a WPF application which will need 10 - 20 small icons and images for illustrative purposes, is storing these in the assembly as embedded resources the right way to go? If so, how do I specify in XAML that an Image control should load the image from an embedded resource? A: * *Visual...
{ "language": "en", "url": "https://stackoverflow.com/questions/347614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "453" }
Q: How to write out the contents of a string to XML without the codes...? I have a string that has angle brackets in it like this: <element1>my text here</element1> The string literally looks like this when I write it to console or my dataGridView or anywhere else. However, I'm trying to write this as part of an XML ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where are all my inodes being used? How do I find out which directories are responsible for chewing up all my inodes? Ultimately the root directory will be responsible for the largest number of inodes, so I'm not sure exactly what sort of answer I want.. Basically, I'm running out of available inodes and need to fin...
{ "language": "en", "url": "https://stackoverflow.com/questions/347620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: How to transform rows to columns I have a simple problem when querying the SQL Server 2005 database. I have tables called Customer and Products (1->M). One customer has most 2 products. Instead of output as CustomerName, ProductName ... I like to output as CustomerName, Product1Name, Product2Name ... Could anybody ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Minimum specs for XAMPP server on Vista What do you recommend as minimum specs for a Windows laptop running Vista, an IDE, and Apache, MySQL, and PHP? A: 2 GB ram Pentium Core 2 Duo Thats it A: If a laptop is running Vista well (2GB and a decent video card) it will have no trouble with XAMP. For development, Apach...
{ "language": "en", "url": "https://stackoverflow.com/questions/347625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: mod_python.publisher always gives content type 'text/plain' I've just set up mod python with apache and I'm trying to get a simple script to work, but what happens is it publishes all my html as plain text when I load the page. I figured this is a problem with mod_python.publisher, The handler I set it too. I searc...
{ "language": "en", "url": "https://stackoverflow.com/questions/347632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Determining the TCP port number to which client got bound I create a TCP socket without bothering about the port number to bind to [socket.sin_port = 0]. However later on if I want to print the port number of client how do I do that? The client C application (on Linux) creates many clients which get connected to ser...
{ "language": "en", "url": "https://stackoverflow.com/questions/347636", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Excel cell formatting by ASP.NET I have a problem. One of the datatable colums value is a string value '001200' for example. When the Excel document creats the value became '1200'. How can I keep a data format as is? I'm working with ASP.NET 1.1. The part of the code is: private void lnkExport_Click( object sender, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Migration From Datatable to Linq to Sql In past I use dynamic sql and datatable to get data from database. Such as : Public shared function GetUsersByUsername(byval username as string) as datatable dim strSQL as string="select * from Users where Username= " & username return dbClass.datatable(strSQL) end functi...
{ "language": "en", "url": "https://stackoverflow.com/questions/347643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I list the missing dates from an array of non-continuous dates in Java? I have a table of data sorted by date, from which a user can select a set of data by supplying a start and end date. The data itself is non-continuous, in that I don't have data for weekends and public holidays. I would like to be able ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: dd.mm.yyyy hh:mm format in Sql Server I looked at SQL Server dateformat codes but I couldn't find dd.mm.yyyy hh:mm format in the list. German Date Format(Code is 4) works for me but it doesn't contain hh:mm. Does someone know this format's code? A: Assuming your column is named [datefield] CONVERT(varchar,[datefie...
{ "language": "en", "url": "https://stackoverflow.com/questions/347659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET MVC and REST URI's How would I handle something like the below uri using ASP.NET MVC's routing capability: http://localhost/users/{username}/bookmarks/ - GET http://localhost/users/{username}/bookmark/{bookmarkid} - PUT Which lists the bookmarks for the user in {username}. Thanks A: You can use the [Accept...
{ "language": "en", "url": "https://stackoverflow.com/questions/347661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to use embedded c within Shoes? (ruby-serialport) Is it possible to use something like: require 'serialport.o' with Shoes? serialport.o is compiled c code as a ruby extension. When I attempt to run the following code in shoes, I see no visible output to the screen and shoes crashes on OS X. Thank you CODE: req...
{ "language": "en", "url": "https://stackoverflow.com/questions/347664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: List.Add seems to be duplicating entries. What's wrong? I have a class like this: public class myClass { public List<myOtherClass> anewlist = new List<myOtherClass>; public void addToList(myOtherClass tmp) { anewList.Add(tmp); } } So I call "addToList" a hundred times, each adding a unique item to the...
{ "language": "en", "url": "https://stackoverflow.com/questions/347675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: iPhone TrustStore CA certificates Does any of you have a clue how to alter the contents of Security.framework/TrustStore.sqlite3. It seems as if the iPhone uses it to store trusted CA certificates. I really want my iPod touch to trust my custom certificate. Beside that, does anyone of you know an app (win32) to edi...
{ "language": "en", "url": "https://stackoverflow.com/questions/347690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Emacs, tramp, plink problem on XP The target machine is running Ububtu server 8.04. Here's the tramp output: tramp: Opening connection for nungu@ip.ip.ip.ip using nil...<br> tramp: Waiting for prompts from remote shell<br> tramp: Waiting 60s for prompt from remote shell<br> tramp: Sending password<br> tramp: Found r...
{ "language": "en", "url": "https://stackoverflow.com/questions/347693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I automatically export a WAR after Java build in Eclipse? I have a J2EE project in Eclipse 3.2 and at the end of every build I want to automatically create and deploy a WAR file. At the moment I have to do this by hand which is 5 or 6 mouse-cliks and it would be nice to automate it. I know I can do this with...
{ "language": "en", "url": "https://stackoverflow.com/questions/347698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Need to get specific indexes out of a PHP array I made an array in PHP which holds a bucnh of unix timestamps. I'm trying to make a function that will return an array containing the indexes of the 3 largest numbers in that array. For instance, if the largest numbers are located at indexes 3,5 and 8 And if the larges...
{ "language": "en", "url": "https://stackoverflow.com/questions/347703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Trusted subsystem on a single tier Imagine a .NET application designed using a Layered architecture. Is it possible to use something like the trusted subsystem pattern when deploying all layers of an application to the same machine? Is this design insecure by default? A: It depends on how you're using the system an...
{ "language": "en", "url": "https://stackoverflow.com/questions/347719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I apply a perspective transform to a UIView? I'm looking to perform a perspective transform on a UIView (such as seen in coverflow) Does anyonew know if this is possible? I've investigated using CALayer and have run through all the pragmatic programmer Core Animation podcasts, but I'm still no clearer on how...
{ "language": "en", "url": "https://stackoverflow.com/questions/347721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "199" }
Q: How can I capture KeyDown event on a WPF Page or UserControl object? I have a Page with a UserControl on it. If the user presses Esc while anywhere on Page I want to handle. I thought this would be as easy as hooking up the PreviewKeyDown event, testing for the Esc key, and then handling it. However, when I placed...
{ "language": "en", "url": "https://stackoverflow.com/questions/347724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Gauss-Legendre Algorithm in python I need some help calculating Pi. I am trying to write a python program that will calculate Pi to X digits. I have tried several from the python mailing list, and it is to slow for my use. I have read about the Gauss-Legendre Algorithm, and I have tried porting it to Python with no...
{ "language": "en", "url": "https://stackoverflow.com/questions/347734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to get file list from a Debian package using eptlib libraries? Simple question: I have loaded an Apt package record with libept. There is a method to get file list? It should sound like record.GetFileList(); and it should return a vector string like the output of dpkg -L packagename A: The libept main devel...
{ "language": "en", "url": "https://stackoverflow.com/questions/347736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Build does not catch errors in the View in asp.net mvc Why don't we get compile errors on inline code errors in asp.net mvc views f.eks <h1><%= ViewData.Model.Title.Tostrig() %></h1> The code above will build just fine. Wrong spelling in webform controls will give you an error so I can't see why this isn't supporte...
{ "language": "en", "url": "https://stackoverflow.com/questions/347741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: IDebugControl::WaitForEvent works once then returns E_HANDLE I'm trying to make a small tool that makes use of the Debugger Engine API, but I'm having very limited success. I can get my IDebugClient and IDebugControl instances, and from there I am able to attach into an already running user process. I then enter a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Javascript / Flex communication use case [need advice] I have a web page with a flex component, the flex component is responsible for creating an image from user inputs. Once an image is ready the user enter some more information in the HTML form and click on the send form button. When this button is clicked, javasc...
{ "language": "en", "url": "https://stackoverflow.com/questions/347765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET MVC Url Routing Do I need a separate controller for the below? http://localhost/bookmarks --> bookmarks controller http://localhost/bookmark/{bookmarkid} --> bookmark controller Is there any way I can combine them both into one controller? I want to keep the uri's the same i.e. bookmark singular indicating ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Changing an element's ID with jQuery I need to change an element's ID using jQuery. Apparently these don't work: jQuery(this).prev("li").attr("id")="newid" jQuery(this).prev("li")="newid" I found out that I can make it happen with the following code: jQuery(this).prev("li")show(function() { this.id="newid"; }...
{ "language": "en", "url": "https://stackoverflow.com/questions/347798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "350" }
Q: Automatic file transfer from HTML I'm building a web application that guides my users through the configuration and installation of an application. It builds a set of configuration files dynamically, then sends them in an archive (.ZIP file) along with an installer for the application. The web page is generated fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/347804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: AKS Primes algorithm in Python A few years ago, it was proven that PRIMES is in P. Are there any algorithms implementing their primality test in Python? I wanted to run some benchmarks with a naive generator and see for myself how fast it is. I'd implement it myself, but I don't understand the paper enough yet to do...
{ "language": "en", "url": "https://stackoverflow.com/questions/347811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: How to test django caching? Is there a way to be sure that a page is coming from cache on a production server and on the development server as well? The solution shouldn't involve caching middleware because not every project uses them. Though the solution itself might be a middleware. Just checking if the data is st...
{ "language": "en", "url": "https://stackoverflow.com/questions/347812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Using Moq to determine if a method is called It is my understanding that I can test that a method call will occur if I call a higher level method, i.e.: public abstract class SomeClass() { public void SomeMehod() { SomeOtherMethod(); } internal abstract void SomeOtherMethod(); } I want ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "163" }
Q: Big MySQL Tables I'm working on a problem that requires caching paginated "search" results: Paginating very large datasets The search works as follows: given an item_id, I find the matching item_ids and their rank. I'm willing to concede not showing my users any results past, say, 500. After 500, I'm going to assu...
{ "language": "en", "url": "https://stackoverflow.com/questions/347837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: getUrl without opening window AS2 How do you call a URL from ActionScript 2 without opening a new window ? I've tried "getUrl" and various methods of "LoadVars". A: var loader = new LoadVars(); loader.load("http://example.com/yourscript");
{ "language": "en", "url": "https://stackoverflow.com/questions/347847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is this MySQL query the best idea? The project I'm working on has two type of accounts, "people" and "companies". I hold a single "users" table with all the accounts and just the basic info needed for login (email, pass, etc), and two other tables "user_profiles" (regular people) and "company_profiles" (companies) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Zend_Form: how to check 2 fields are identical I have created a form to add a user to a database and make user available for login. Now I have two password fields (the second is for validation of the first). How can I add a validator for this kind of validation to zend_form? This is my code for the two password fiel...
{ "language": "en", "url": "https://stackoverflow.com/questions/347856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Where can I download the latest ngen.exe? I am using ngen.exe (the .Net Native Image Generator) version 2.0.50727.312. Is this the latest version? If not, where can I download the latest version? This page on msdn does not appear to have a link to a download. If it matters, I need ngen.exe for .Net Framework 3.5. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/347857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to detect when laptop power cable has been disconnected? For the umpteenth time my laptop just shut down in the middle of my game because my power cable had disconnected without me noticing it. Now I want to write a little C# program that detects when my power cable disconnects and then emits a nice long System ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: D2009 VCL unit that won't compile I found a bug in Delphi 2009's implementation of TFields and wrote a quick patch. I copied DB.pas to my projects folder and added it to the project's file list, but now I can't get it to compile. The first two error messages don't even make any sense when I go to the indicated pla...
{ "language": "en", "url": "https://stackoverflow.com/questions/347871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Use cookies without sending them back to the server I need a way to stash some data that is global to the browser. If I open a new window with a URL from my app, e.g. via a bookmark, I need to access some data that was created in another window and never sent to the server. As far as I can tell the only thing that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to mask bytes in ARM assembly? i have got an 32bit (hexadecimal)word 0xaabbccdd and have to swap the 2. and the 3. byte. in the end it should look like 0xaaccbbdd how can i "mask" the 2nd and the 3rd byte to first load them up to register r1 and r2 and the swap them.. i also know that i have to work with lsl and...
{ "language": "en", "url": "https://stackoverflow.com/questions/347889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Libraries required for GDI in Mono using xsp Here is the situation. I am creating some graphics (using GDI+) on an asp page running under mono xsp. This works great in my development environment as my development environment is running under a GUI, however when I try running it on a GUI-less server, it fails (I am...
{ "language": "en", "url": "https://stackoverflow.com/questions/347895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to check if file exists on FTP before FtpWebRequest I need to use FtpWebRequest to put a file in a FTP directory. Before the upload, I would first like to know if this file exists. What method or property should I use to check if this file exists? A: FtpWebRequest (nor any other class in .NET) does not have an...
{ "language": "en", "url": "https://stackoverflow.com/questions/347897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: Pitfalls for converting a .net 1.1 solution to .net 2.0 In this question superwiren asks about the pitfalls for converting a .net 2.0 solution to .net 3.5. What about .net 1.1 to .net 2.0? Is 2.0 fully backwards compatible with 1.1? A: I think its depends on your code, the best option is to perform a trial run an...
{ "language": "en", "url": "https://stackoverflow.com/questions/347905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a c# library for wrapping multiple SCM provider's APIs? The project I'm working on requires access to the users source control. To do this we are wrapping the Perforce API and the Subversion API ( using P4.NET and SubversionSharp respectively ). We would like to support as many as we can depending on user ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: set an iframe source without loading new content Is there any way to set the src attribute of an iframe without the iframe generating an http request? If not, is there a way to format the request headers before the request is sent? edit: I just need the src to match the path of a cookie, but I don't ever want that c...
{ "language": "en", "url": "https://stackoverflow.com/questions/347917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there an ASP.Net MVC view engine that supports JavaScript views? I would like to generate some JavaScript on the server side in ASP.Net MVC. Is there a view engine that supports this? Ideally I would like to be able to get JavaScript from an url like: http://myapp/controller/action.js I've looked at the MonoRai...
{ "language": "en", "url": "https://stackoverflow.com/questions/347918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What do 1.#INF00, -1.#IND00 and -1.#IND mean? I'm messing around with some C code using floats, and I'm getting 1.#INF00, -1.#IND00 and -1.#IND when I try to print floats in the screen. What does those values mean? I believe that 1.#INF00 means positive infinity, but what about -1.#IND00 and -1.#IND? I also saw some...
{ "language": "en", "url": "https://stackoverflow.com/questions/347920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "73" }
Q: Using asp.net membership with sqlite or other provider? Does anyone have any examples of using Sqlite with ASP.NET membership? I am building a small "drop-in" type web application and don't want to rely on an SQL database for storing user credentials, etc. Sqlite seems like a good option, and I have been impressed...
{ "language": "en", "url": "https://stackoverflow.com/questions/347945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What real life examples of security by obscurity have you seen/worked with? Bonus points for explaining how you improved it. A: Some people like to make their javascript difficult to read (and therefore hack) by using obfuscation. Google is among the users of this technique. At the simplest level, they change the v...
{ "language": "en", "url": "https://stackoverflow.com/questions/347948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to convert a std::string to const char* or char* How can I convert an std::string to a char* or a const char*? A: char* result = strcpy((char*)malloc(str.length()+1), str.c_str()); A: Use the .c_str() method for const char *. You can use &mystring[0] to get a char * pointer, but there are a couple of gotcha's...
{ "language": "en", "url": "https://stackoverflow.com/questions/347949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1054" }
Q: Simple anonymous pipes - what wrapper model you use? (WinAPI, C++) I have two running processes in Windows, and each process has a pipe to the other. I want to serialize a complicated class and transmit it from one process to the other. I already have the serialization procedure worked out, and I understand that the...
{ "language": "en", "url": "https://stackoverflow.com/questions/347951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I do a script to catch strings as input and open them on a firefox document? How can I do a script to catch strings as input and open them on a Firefox document? Each link would go to a different window or tab. Any ideas would be much appreciated. I just want to be able to take some links and open them. For ...
{ "language": "en", "url": "https://stackoverflow.com/questions/347954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Calling fcsh from PHP script My question is whether or not Flex's fcsh can be called from within a PHP script. Here is the background: I have been created a simple process that creates a simple quiz/tutorial by converting a text file into a .mxml file and compiling to a .swf file using the mxmlc compiler. This wor...
{ "language": "en", "url": "https://stackoverflow.com/questions/347969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to keep a programming course interesting? I guess, the following is a standard problem on every school or university: It is Your job to teach programming. Unfortunately, some of the students are semi-professionals and have years of experience while others do not even know the basic concepts, e.g. the concept "ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/347994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Envelope Algorithm Optimization -- Best Place to Put a Circle I have to solve the following problem in an optimal way. Input data is: * *N points in a plane given as a (x, y) pair of integer coordinates *M points in the same plane given as a (x, y) pair of integer coordinates representing the center of a circle....
{ "language": "en", "url": "https://stackoverflow.com/questions/348005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to Increase heap size in Java ME? Is there any way to increase the heap size for Java ME on a device? I'm developing an application for a Nokia N95, but am bumping into memory issues when I try to do image processing of larger images. The phone has plenty of heap space available, but seems to restrict the amou...
{ "language": "en", "url": "https://stackoverflow.com/questions/348018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Counting Results in an Array By means of a regular expression and Greasemonkey I have an array of results that looks like: choice1, choice2, choice3, choice3, choice1, etc.. My question is how do I tally up the choices so I know how many times choice1 is in the array, choice2 is in the array, etc. if I do not know e...
{ "language": "en", "url": "https://stackoverflow.com/questions/348021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the way to implement Save / Load functionality? I'm trying to implement a Load / Save function for a Windows Forms application. I've got following components: * *A tree view *A couple of list views *A couple of text boxes *A couple of objects (which holds a big dictionarylist) I want to implement a wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/348022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: sprintf access violation I have a problem with the following code: for(i = 0;(i - 1)< n;i++) { char* b; sprintf(b, "%d", i); } It compiles fine but when I run it it give me the infamous "0XC0000005 Access Violation" error. I have tried setting b to NULL, "", "0", 0 and a bunch of other stuff but then I get the "0XC...
{ "language": "en", "url": "https://stackoverflow.com/questions/348037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: iPhone and OpenCV I know that OpenCV was ported to Mac OS X, however I did not find any info about a port to the iPhone. I am not a Mac developer, so that I do not know whether a Mac OS X port is enough for the iPhone. Does anyone know better than me? A: OpenCV does indeed work on the iphone. Use the configure s...
{ "language": "en", "url": "https://stackoverflow.com/questions/348040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "97" }
Q: What could justify the complexity of Plone? Plone is very complex. Zope2, Zope3, Five, ZCML, ZODB, ZEO, a whole bunch of acronyms and abbreviations. It's hard to begin and the current state seems to be undecided. It is mainly based on Zope2, but incorporates Zope3 via Five. And there are XML config files everywhere....
{ "language": "en", "url": "https://stackoverflow.com/questions/348044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Unity Application Block, inherited injection I am having a problem using the Unity Application Block, I have created a base class called Composition. Each Composition contains a IUnityContainer, when i create the top level object UniversalComposition i want to initialize it with a UnityContainer. Any object that...
{ "language": "en", "url": "https://stackoverflow.com/questions/348046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating static library for iPhone There's an open source library that I would like to use for my iPhone app. The library is written in C and compiles with Makefiles. I would like to use a static library. If I add the .a file to my project dependencies, it works well with the simulator, but it doesn't link when ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/348051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Serialise to YAML using XStream in Java Is there a YAML driver for the Java XStream package? I'm already using XStream to serialise/deserialise both XML and JSON. I'd like to be able to do the same with YAML. A: To parse a YAML document you can use this chain: YAML -> SnakeYAML -> Java -> Your Application (-> XStre...
{ "language": "en", "url": "https://stackoverflow.com/questions/348052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }