text
stringlengths
8
267k
meta
dict
Q: Why am I getting a buffer overrun error with this line of code? I only have 1 line of code, and this is: pcrecpp::RE re("abc"); inside a function OnBnClickedButtonGo(). And this function fails in Release mode, but it works OK in debug mode. (I am using Visual Studio 8 on Windows XP.) The error message is: A buffer ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What pre-engineering do you do to ensure data compatibility for future versions of your app? I am doing some significant refactoring and feature-adding on a project, and have just broken backwards compatibility with my data. I did it by creating a bunch of subclasses from the class that I used to house my data in, a...
{ "language": "en", "url": "https://stackoverflow.com/questions/390391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java: Adding a User Interface to a program If I have Java program and I need to alter it to an interface and include icons, is there any easy I can do this and is there a good application that can help me to do it ? or do I have to code it in myself? A: Nop, /me thinks ur need 1337 mad Java programin' skillz! Tran...
{ "language": "en", "url": "https://stackoverflow.com/questions/390394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: winsock missing data c++ win32 I am writing an application that needs to send data over a network. I have the application completed but there is a problem with sending the data. Every time I send a piece of data, it is cut off after 4 characters and the rest is garbage. The application is a remote keylogger I am wri...
{ "language": "en", "url": "https://stackoverflow.com/questions/390400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Posting xml with ServerXMLHTTP timeout I'm working on two websites. One is an existing classic asp site which posts xml to a new asp.net (.net 3.5) website. The classic asp site is using msxml's serverxmlhttp object in vbscript to send this xml over. The whole thing works until I make a seemingly unrelated change...
{ "language": "en", "url": "https://stackoverflow.com/questions/390402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you debug Mako templates? So far I've found it impossible to produce usable tracebacks when Mako templates aren't coded correctly. Is there any way to debug templates besides iterating for every line of code? A: Mako actually provides a VERY nice way to track down errors in a template: from mako import excep...
{ "language": "en", "url": "https://stackoverflow.com/questions/390409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Contract based Programming Can someone explain the concepts that Spec# might be moving into C# 4.0, regarding Code Contracts? * *What are code contracts (Looks to be a compile time checking pattern) *should I be excited about this? *Am I correct in assuming that we move what would be runtime checks to compile t...
{ "language": "en", "url": "https://stackoverflow.com/questions/390411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Create a query dynamically Hi I need to create a query in MSAccess 2003 through code (a.k.a. VB) -- how can I accomplish this? A: Thanks for this answer and the small piece of code. If somebody needs to define the datatypes for the variables used, use this: Dim strsql As Variant Dim qdf As QueryDef A: Dim...
{ "language": "en", "url": "https://stackoverflow.com/questions/390420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Xml tool to test xml data I'm in a project that loads a lot of XML from web services and I need to send the correct one and get the one I am expecting, a part that run the web app in Debug mode and add a breakpoint after getting the XML String, what can I have as a free plugin or even a trial program to let me see w...
{ "language": "en", "url": "https://stackoverflow.com/questions/390428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can EXEC master..xp_cmdshell be used on a set of data? I have a single windows shell command I'd like to run (via EXEC master..xp_cmdshell) once for each row in a table. I'm using information from various fields to build the command output. I'm relativity new to writing T-SQL programs (as opposed to individual quer...
{ "language": "en", "url": "https://stackoverflow.com/questions/390448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: determining java memory usage Hmmm. Is there a primer anywhere on memory usage in Java? I would have thought Sun or IBM would have had a good article on the subject but I can't find anything that looks really solid. I'm interested in knowing two things: * *at runtime, figuring out how much memory the classes in m...
{ "language": "en", "url": "https://stackoverflow.com/questions/390449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: issuing hard drive commands with java Does anyone know of a way to issue commands to a hard drive within Java? Does Java even support this kind of hardware interaction? For example, if I have a SCSI hard drive that I would like to inquiry, is there a pre-existing Java method to do this, or would I have to write my o...
{ "language": "en", "url": "https://stackoverflow.com/questions/390463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to post a file to an image hosting service in .NET? Scenario: localhost receives the current HttpRequest with 3 hidden inputs and a posted file. I must then forward this form data to an external image host and get the response. A: See the System.Net.WebClient and related classes. You can use them to create a r...
{ "language": "en", "url": "https://stackoverflow.com/questions/390472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: asp mysql variables testing problem I have a problem that just started happening after I reinstalled my website's server. In the past I could do do this: Code: <% set msgSet = conn.execute("select * from base_scroller where scroller_num = 1" %> check if it's not empty or anything else Code: <% if msgSet("scroller...
{ "language": "en", "url": "https://stackoverflow.com/questions/390475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: System V Msg Queues on Linux don't work as expected I have the following application which replicates an issue I'm having in a larger application with system v message queues. basically, the main function generates a key, then creates a message queue with msgget(). Then 3 forks are spawned, each with a different id....
{ "language": "en", "url": "https://stackoverflow.com/questions/390476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is while (true) with break bad programming practice? I often use this code pattern: while(true) { //do something if(<some condition>) { break; } } Another programmer told me that this was bad practice and that I should replace it with the more standard: while(!<some condition>) { //do...
{ "language": "en", "url": "https://stackoverflow.com/questions/390481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "78" }
Q: JRE on Android This might sound like a stupid question, but google didn't help me. Is there a JRE available for Android? If so which version is it? Are there any major features missing? If not does that mean all java apps need to be recompiled for Dalvik to work on the Android? Update; Will there ever be JRE availa...
{ "language": "en", "url": "https://stackoverflow.com/questions/390482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Zend Framework: is there a way to access the element name from within a custom validator? I'm writing a custom validator that will validate against multiple other form element values. In my form, I call my custom validator like this: $textFieldOne = new Zend_Form_Element_Text('textFieldOne'); $textFieldOne->setAllow...
{ "language": "en", "url": "https://stackoverflow.com/questions/390484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add item to the beginning of List? I want to add a "Select One" option to a drop down list bound to a List<T>. Once I query for the List<T>, how do I add my initial Item, not part of the data source, as the FIRST element in that List<T> ? I have: // populate ti from data List<MyTypeItem> ti =...
{ "language": "en", "url": "https://stackoverflow.com/questions/390491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "512" }
Q: Add a time-field formated like MM:SS (MySQL) I want to add a new time-field to a an existing MySQL-table that is formated like this "MM:SS". The field is supposed to hold duration-data. What is the correct MySQL syntax to do this? Couldn't find anything that covers this on the MySQL-site. A: Why not just use an INT...
{ "language": "en", "url": "https://stackoverflow.com/questions/390512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: System.Drawing in Windows or ASP.NET services According to MSDN, it is not a particularly good idea to use classes within the System.Drawing namespace in a Windows Service or ASP.NET Service. Now I am developing a class library which might need to access this particular namespace (for measuring fonts) but it cannot ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Aggregate functions in WHERE clause in SQLite Simply put, I have a table with, among other things, a column for timestamps. I want to get the row with the most recent (i.e. greatest value) timestamp. Currently I'm doing this: SELECT * FROM table ORDER BY timestamp DESC LIMIT 1 But I'd much rather do something like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Adding a subview below my UITableView I'm experimenting with programmatically adding a subview below my UITableView. I'm using a map curl sample from Erica Sadun's book in order to test to see if the view below my UITableView is indeed the view I'm adding. However, when the UITableView curls up, the view color of th...
{ "language": "en", "url": "https://stackoverflow.com/questions/390551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Upgrading SQL Server 2005 Express to SP3 I'm trying to install SQL Server 2005 Express SP3 on two of my machines. When I try to do this I get this error message: "None of the selected features can be installed or upgraded. Setup cannot proceed since no effective change is being made to the machine. To continue, clic...
{ "language": "en", "url": "https://stackoverflow.com/questions/390554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is my IEnumerable using yield return slower to iterate then List I have been testing out the yield return statement with some of the code I have been writing. I have two methods: public static IEnumerable<String> MyYieldCollection { get { wrapper.RunCommand("Fetch First From Water_M...
{ "language": "en", "url": "https://stackoverflow.com/questions/390565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Form level event for when data is changed on a form Well basically I am working on an MSAccess application and on the form where administrators will view and edit user data I want to be able to call an event with the old and new values of a field whenever it is changed. This function will add a record into the audi...
{ "language": "en", "url": "https://stackoverflow.com/questions/390567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP Class Scope I am fairly new to PHP. What is the best way to control access to a class throughout a PHP application and where is the best place to store these classes that will need to be accessed throughout the entire application? Example; I have a user class that is created on during the login process, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Creating instance of type without default constructor in C# using reflection Take the following class as an example: class Sometype { int someValue; public Sometype(int someValue) { this.someValue = someValue; } } I then want to create an instance of this type using reflection: Type t = typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "105" }
Q: Looking for alternative Collaborative Developing Environments I'm interested in Collaborative Developing and I was wondering if there are alternative solutions than using UNA (example video) from N-Brain. Free would be even better, but I guess that's not an option which such technology. PS: The main future I'm looki...
{ "language": "en", "url": "https://stackoverflow.com/questions/390580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Custom Binding of multiple fileds in Custom DataGridViewColumn(WinForms) I have a question regarding a data binding(of multiple properties) for custom DataGridViewColumn. Here is a schema of what controls that I have, and I need to make it bindable with DataGridView datasource. Any ideas or a link to an article dis...
{ "language": "en", "url": "https://stackoverflow.com/questions/390584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# setting property values through reflection with attributes I am trying to build an object through an attribute on a classes property that specifies a column in a supplied data row that is the value of the property, as below: [StoredDataValue("guid")] public string Guid { get; protected set; } [Stored...
{ "language": "en", "url": "https://stackoverflow.com/questions/390594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Best way to retrieve the connection string for IBATIS.NET from the web.config I have an web application where I have a requirement to encrypt and store the connection string in the web.config. What is the best way to retrieve this and use this connection string with IBATIS.NET instead of storing the connection str...
{ "language": "en", "url": "https://stackoverflow.com/questions/390595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: WinForm Controls for .NET Compact Framework I'm looking to invest in a UI control toolkit for a Compact Framework 3.5 project for Windows Mobile 5 and later. All I can find is the Resco MobileForms Toolkit (http://www.resco.net/developer/mobileformstoolkit/overview.aspx). I have two questions... Are there any other ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .NET Newsletter Application Are there any newsletter applications written in .NET available as open source software? Thanks. A: Check on CodePlex they're some interesting projects like: * *Web Newsletter Application for .NET 2.0 *SPNewsletter *XZ Mailings
{ "language": "en", "url": "https://stackoverflow.com/questions/390599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Emacs M-x commands for invoking "GUI-style" menus Question: How could I find out the M-x equivalent commands for doing GUI-based operations in Emacs, in those cases where my Emacs-variant uses OS-specific desktop functionality? Background: Conventional understanding states that everything in Emacs is a command, and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Detail question on REST URLs This is one of those little detail (and possibly religious) questions. Let's assume we're constructing a REST architecture, and for definiteness lets assume the service needs three parameters, x, y, and z. Reading the various works about REST, it would seem that this should be expresse...
{ "language": "en", "url": "https://stackoverflow.com/questions/390604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: While vs. Do While I've seen both the blocks of code in use several different times, personally I have always used the first but my question is: is there a functional difference, and if there is what is it? while (condition is true ) { // do something } do { // do something } while ( condition is true); I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery and ASP.NET AJAX Can we combine both jQuery and ASP.NET AJAX in an ASP Web Application? A: Yes. For caveats and potential work-arounds, see: Any downsides to using ASP.Net AJAX and JQuery together A: Considering that JQuery is intended to ship with Visual Studio, I'd say most definitely. And, of course, I'm...
{ "language": "en", "url": "https://stackoverflow.com/questions/390611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Implementation of finally in C++ Is this a good way to implement a Finally-like behavior in standard C++? (Without special pointers) class Exception : public Exception { public: virtual bool isException() { return true; } }; class NoException : public Exception { public: bool isException() { return false; }...
{ "language": "en", "url": "https://stackoverflow.com/questions/390615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Verifying protected abstract methods are called using Moq Suppose I have the following class: public class TestBase { public bool runMethod1 { get; set; } public void BaseMethod() { if (runMethod1) ChildMethod1(); else ChildMethod2(); } protected abstract void ChildMethod1(); prot...
{ "language": "en", "url": "https://stackoverflow.com/questions/390632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: binary format, bitwise operations exist? eg. <<16#7F, 16#FF>> bsl 1 In erlang, there are bitwise operations to operate on integers, for example: 1&gt 127 bsl 1. 254 there is also the ability to pack integers into a sequence of bytes &lt&lt 16#7F, 16#FF &gt&gt is it possible, or are there any operators or BIFs that...
{ "language": "en", "url": "https://stackoverflow.com/questions/390641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: ToString vs. ToString() in VB.NET What is the difference between using ToString and ToString() in VB.NET? A: Nothing. VB.NET allows you exclude the parentheses on any method that doesn't take in an argument. A: The existing answer is wholly correct but does not cover when ToString is used as a Method. This is es...
{ "language": "en", "url": "https://stackoverflow.com/questions/390648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Why such a disparity in pricing between Windows and Linux hosting services I'm a .Net developer for pay, but I have my personal web site hosted on a LAMP stack with a shared hosting provider. I've been looking for a while to switching to a Windows with .Net hosting provider, but what really turns me off is the pric...
{ "language": "en", "url": "https://stackoverflow.com/questions/390649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.Net application slow to load - VS2008 This is my set up on a stage server compiled my web application published website copied the output directory from my machine to stage server created domain account created virtual site on a static IP website runs under domain account created impersonate set too true as wind...
{ "language": "en", "url": "https://stackoverflow.com/questions/390659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: as3 tween - how do i keep from images with drop shadows going straight black? I am using AS3 to create a tween affect between multiple images that have a drop shadow around them - it works great, except after 3+ tweens the drop shadow starts getting darker and darker - that makes sense, but not really want i want to...
{ "language": "en", "url": "https://stackoverflow.com/questions/390675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Convert OpenSSL public key into NSS one How do I convert public key generated by OpenSSL into one NSS would understand? I've generated key with OpenSSL, exported it into pkcs12 format, imported it into NSS database and then extract public key with McCoy utility. And it was different to my great surprise. That is pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/390677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does anyone beside me just NOT get ASP.NET MVC? I've been fiddling with ASP.NET MVC since the CTP, and I like a lot of things they did, but there are things I just don't get. For example, I downloaded beta1, and I'm putting together a little personal site/resume/blog with it. Here is a snippet from the ViewSinglePos...
{ "language": "en", "url": "https://stackoverflow.com/questions/390693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "141" }
Q: MySQLi prepared statements and REPLACE INTO I have to following code: http://www.nomorepasting.com/getpaste.php?pasteid=22987 If PHPSESSID is not already in the table the REPLACE INTO query works just fine, however if PHPSESSID exists the call to execute succeeds but sqlstate is set to 'HY000' which isn't very helpf...
{ "language": "en", "url": "https://stackoverflow.com/questions/390702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the purpose of the expression "new String(...)" in Java? While looking at online code samples, I have sometimes come across an assignment of a String constant to a String object via the use of the new operator. For example: String s; ... s = new String("Hello World"); This, of course, compared to s = "Hello...
{ "language": "en", "url": "https://stackoverflow.com/questions/390703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "78" }
Q: web.config in nested folder I am trying to install an app inside of another web app. I have my .aspx pages and some code that I was putting into the main app's app_code folder. I've added my own web.config file for my connection string and such but I think there's a conflict. So my question is a two parter. First, w...
{ "language": "en", "url": "https://stackoverflow.com/questions/390723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How does NSMutableData work? I have one problem to work with NSMutableData. I defined one NSMutableData *receivedData, and tried to copy several NSData* data to the receivedData. I just called [receivedData appendData:data], but appears the data is not copied: .... NSLog(@"get data! Received %d bytes of data",[data...
{ "language": "en", "url": "https://stackoverflow.com/questions/390725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to Initiate a Vonage call using a Hyperlink I'm just finishing a web page for our sales guy to quickly go through a list of contacts. Is it possible to initiate a call from our Vonage line via a Hyperlink? They offer an application called "Click-2-Call" but I hope it's possible to initiate it using only a Hyper...
{ "language": "en", "url": "https://stackoverflow.com/questions/390727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Database schema design I'm quite new to database design and have some questions about best practices and would really like to learn. I am designing a database schema, I have a good idea of the requirements and now its a matter of getting it into black and white. In this pseudo-database-layout, I have a table of cust...
{ "language": "en", "url": "https://stackoverflow.com/questions/390730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: how do we call a c function from an sql script how do we call a C function from an SQL script? int get_next_fbill_b2kId_seq_num(b2kIdType seq_val,bankIdPtrType bank_id) { validate_dc_alias(dcAlias); tbaDateType sysDate; tbaGetSystemDateTime(sysDate,NULL,NULL); /* returns in TBA date format */ sysDat...
{ "language": "en", "url": "https://stackoverflow.com/questions/390731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Open a file with an external application on Java How do you open a file from a java application when you do not know which application the file is associated with. Also, because I'm using Java, I'd prefer a platform independent solution. A: File file Desktop.getDesktop().open( file ); Since Java 1.6 Previous to th...
{ "language": "en", "url": "https://stackoverflow.com/questions/390736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Messaging, Queues and ESB's - I know where I want to be but not how to get there To cut a long story short, I am working on a project where we are rewriting a large web application for all the usual reasons. The main aim of the rewrite is to separate this large single application running on single server into many s...
{ "language": "en", "url": "https://stackoverflow.com/questions/390740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: removing whitespaces in ActionScript 2 variables let's say that I have an XML file containing this : <description><![CDATA[ <h2>lorem ipsum</h2> <p>some text</p> ]]></description> that I want to get and parse in ActionScript 2 as HTML text, and setting some CSS before displaying it. Problem is, Flash takes ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should one always keep a reference to a running Thread object in C#? Or is it okay to do something like this: new Thread( new ThreadStart( delegate { DoSomething(); } ) ).Start(); ? I seem to recall that under such a scenario, the Thread object would be garbage collected, but the underlying OS thread would continue...
{ "language": "en", "url": "https://stackoverflow.com/questions/390753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How can I search and replace in a PDF document using Perl? Does anyone know of a free Perl program (command line preferable), module, or anyway to search and replace text in a PDF file without using it like an editor. Basically I want to write a program (in Perl preferably) to automate replacing certain words (e.g. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you typically import data from a spreadsheet to multiple database columns? For whatever reason, I have a lot of clients that have existing data that's stored in spreadsheets. Often there are hundreds, if not thousands of items in each spreadsheet, and asking the client to manually enter them through a website...
{ "language": "en", "url": "https://stackoverflow.com/questions/390784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: keep a formless application from closing for a keyboard hook I am working on a c++ win32 program that involves a keyboard hook. The application is a win32 project with no user interface whatsoever. I need to keep the application from closing without using causing the hook to not work or use up a bunch of system reso...
{ "language": "en", "url": "https://stackoverflow.com/questions/390789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Set format of data read through serial port? while reading a data through the serial port.I want to know that the data which is coming through the port in which format it is ? wheathr ASCII, Decimal or Hexa or in Bytes it is, plz any boby give the hint A: Use a terminal program like HyperTerminal or TeraTerm to se...
{ "language": "en", "url": "https://stackoverflow.com/questions/390792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Are comments necessary for a programming language? After some stupid musings about Klingon languages, that came from this post I began a silly hobby project creating a Klingon programming language that compiles to Lua byte-code. During the initial language design phase I looked up information about Klingon programme...
{ "language": "en", "url": "https://stackoverflow.com/questions/390797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Custom calling convention for P/Invoke and C# I have a business case whereby I need to be able to specify my own calling convention when using P/Invoke. Specifically, I have a legacy dll which uses a non-standard ABI, and I need to able to specify the calling convention for each function. For example, one function ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a way to do object (with its attributes) serializing to xml? Create a class (call it FormElement). That class should have some properties like the metadata they have with data elements (name, sequence number, value—which is just a string, etc). This class has as attributes of type Validation Application Bl...
{ "language": "en", "url": "https://stackoverflow.com/questions/390800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sort TreeView Automatically Upon Adding Nodes Is there an easy way to add nodes to a WinForms .NET TreeView control where the new nodes being added are inserted at the correct index so the entire list of nodes is sorted alphabetically? Pretty much having the same result as TreeView.Sort(). I have a TreeView that con...
{ "language": "en", "url": "https://stackoverflow.com/questions/390802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: MySQL autogenerate statistics fram data I have a Table containig Dates, Distances, and TimeForDistance... Is there any way to Calculate the average per month velocity using MySQL Statements? Any Help would really be appreciated! A: I think you're looking for something like this: SELECT YEAR(my_date) as my_y...
{ "language": "en", "url": "https://stackoverflow.com/questions/390814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Refactoring; creating pseudo-primitives for your application domain How would you refactor this, keeping in mind that you have dozens more of such measurements to represent? It's kind of like changing an int to short or long or byte. Generic unit<T>? Implicit type conversion by via operator overloading? ToType() pat...
{ "language": "en", "url": "https://stackoverflow.com/questions/390819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Exporting Excel cell data to database via Excel macro? Can I create a macro written in C# for Excel that allows me to export a cell's data to a SQL Server or Access database? Basically, I'd like to create a button in Excel that saves the data in certain cells to a database. Can this be done? Instead of creating a U...
{ "language": "en", "url": "https://stackoverflow.com/questions/390829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I help junior members gain confidence in their ability to refactor code? I wanted to see what folks thought were the best way to help junior members gain confidence in their ability to refactor code. I find that often junior developers simply follow the existing patterns and sense an aversion to break anyth...
{ "language": "en", "url": "https://stackoverflow.com/questions/390834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: WPF - DispatcherUnhandledException does not seem to work I started a new WPF project in VS2008 and then added some code to trap DispatcherUnhandledException. Then I added a throw exception to Window1 but the error is not trapped by the handler. Why? public App() { this.DispatcherUnhandledException += ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: To inetd or not to inetd... when should I use inetd for my network server program? Can anyone give a concise set of real-world considerations that would drive the choice of whether or not to use inetd to manage a program that acts as a network server? (If inetd is used, I think it alters the requirements around netw...
{ "language": "en", "url": "https://stackoverflow.com/questions/390847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is there any built-in way to get the length of an iterable in python? For example, files, in Python, are iterable - they iterate over the lines in the file. I want to count the number of lines. One quick way is to do this: lines = len(list(open(fname))) However, this loads the whole file into memory (at once). Thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/390852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "83" }
Q: Access control to web service This is what I wish to achieve: My ASP.NET web service is hosted on a server called //service. I want to control access to the web service by server and by application as well. What I mean here is if I have two ASP.NET web applications (app1 and app2) hosted on a server called //web1 an...
{ "language": "en", "url": "https://stackoverflow.com/questions/390853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WiX generated MSI is not compressed I use WiX3 to generate MSI installation package. I have specified comression flag on in both the <Package> and <Media> elements: <Package InstallerVersion="200" Compressed="yes"/> <Media Id="1" Cabinet="MySetup.cab" EmbedCab="yes" CompressionLevel="high" /> but the resulting MSI...
{ "language": "en", "url": "https://stackoverflow.com/questions/390860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Best way to run a background task in ASP.Net web app and also get feedback? I am thinking on the following approach but not sure if its the best way out: step1 (server side): A TaskMangaer class creates a new thread and start a task. step2 (server side): Store taskManager object reference into the cache for future r...
{ "language": "en", "url": "https://stackoverflow.com/questions/390863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Wrapping text inside a bound field in SPGridView I am displaying some text in a column inside an SPGridView. The text happens to be more than a hunderd character long, and as a result, the webpart becomes too wide. I tried setting BoundField.ItemStyle.Wrap to true, and I also tried BoundField.ControlStyle.Width and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Calling Application Methods from a wx Frame Class I'm starting out with wxPython and have been working my way through every tutorial and example I can get my hands on. I've run into a slight problem, however, and it has to do with the wx.App versus the wx.Frame and which should contain specific methods. Just about...
{ "language": "en", "url": "https://stackoverflow.com/questions/390867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Xcode window positions when switching from dual to single monitor When I'm working at home I plug my MacBook in to my 20" monitor as a second (right side) monitor. I do all my editing in Xcode on the larger monitor, and leave the menu bar, debugging and documentation on the laptop's monitor. The problem is when I d...
{ "language": "en", "url": "https://stackoverflow.com/questions/390884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Functions and Procedures in SQL Server What is the difference between a Function and a Procedure in SQL Server? A: You can embed functions in SQL statements just like you would any native SQL funcion like COALESCE, CONVERT, etc. Procs can return a value, but the values that an be returned are limited. For example...
{ "language": "en", "url": "https://stackoverflow.com/questions/390889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to debug parameterized SQL query I use C# to make connection to a db and then a Ad hoc SQL to get data. This simple SQL query is very convenient to debug since I can log the SQL query string. If I use parametrized SQL query command, is there any way to log sql query string for debug purpose? A: I think this is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What should the repository contain? I am trying to set up a Continuous Integration process. For my various build tasks(compiling, testing, documentation etc.)I need to have tools that perform these tasks(csc, NUnit, NDoc etc.). My question is should these tools too go into my source control repository? Why I think ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Installing Ruby 1.8.7 (and other stuff) manually I don't want to rely on the one-click installer any more, and I want to learn how to install Ruby manually. Is there a resource for this? A: Well, if you're on a Mac I'd recommend MacPorts. There's a good post on it here that's still valid. If you're on Windows and...
{ "language": "en", "url": "https://stackoverflow.com/questions/390897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Can't operator == be applied to generic types in C#? According to the documentation of the == operator in MSDN, For predefined value types, the equality operator (==) returns true if the values of its operands are equal, false otherwise. For reference types other than string, == returns true if its two o...
{ "language": "en", "url": "https://stackoverflow.com/questions/390900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "395" }
Q: How to detect installed Anti-Spyware applications on XP using WMI I need to get information about the spyware installed on a client machine using WMI? Is this possible? A: I found this code sample on a danish site Udvikleren.dk, i hope it's useful to you. Can also be used to find anti-virus by replacing "AntiSpywar...
{ "language": "en", "url": "https://stackoverflow.com/questions/390908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In Excel automation, how to gracefully handle invalid file format error upon file opening? I'm trying to open a Microsoft Excel file in a C# program using the 'excelApp.Workbooks.Open()' method. As it happens, if the format of the file is invalid, this method causes an error message box to be displayed. I, however, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Testing Data Access Persist Methods Just wondering if anyone has any ideas on how to test ones data access methods. I have found testing retrieval data access methods is much easier because i can just mock out the ExecuteReader and return a populated dataTable.CreateDataReader(). By doing this I can test to see if m...
{ "language": "en", "url": "https://stackoverflow.com/questions/390921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What message is processed during the process of minimize or maximize of a window? I want to self-draw the title bar of a window with MFC. So I override the OnNcPaint() method of CMainFrame. Everything seems alright, until I click the item in the control menu to make it minimize or maximize. During the minizing or ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/390923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: asp.net mvc authorization using roles I'm creating an asp.net mvc application that has the concept of users. Each user is able to edit their own profile. For instance: * *PersonID=1 can edit their profile by going to http://localhost/person/edit/1 *PersonID=2 can edit their profile by going to http://localho...
{ "language": "en", "url": "https://stackoverflow.com/questions/390930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Declaring Variable Types in PHP? I was trying to get my Netbeans to autocomplete with PHP, and I learned that this code is valid in PHP: function blah(Bur $bur) {} A couple of questions: * *Does this actually impose any limits on what type of variable I can pass to the blah method? *If this is just to help the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: How to do private comms between private apps over network? It's basically one app that is installed on multiple PC's, each install maintaining it's own database which is sync'd with other's as & when they are up (connected to the same network) at the same time. I've tested this using simple socket connections and cu...
{ "language": "en", "url": "https://stackoverflow.com/questions/390944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Identify a table with maximum rows in Oracle I have a set of tables in Oracle and I would like to identify the table that contains the maximum number of rows. So if, A has 200 rows, B has 345 rows and C has 120 rows I want to be able to identify table B. Is there a simple query I can run to achieve this? Edit: There...
{ "language": "en", "url": "https://stackoverflow.com/questions/390945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: MySQL failover using MySQL Proxy I'm looking at implementing a failover mechanism for a MySQL database using MySQL Proxy (http://forge.mysql.com/wiki/MySQL_Proxy) My proposed setup is as follows: One active MySQL server and one passive MySQL with two way replication enabled between the both of them. MySQL Proxy is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/390958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: WPF design question involving treeview I have a hierarchy that looks like this - Factory>machines>components>controls where ">" can be read as "contains a list of". This fits very nicely into a TreeView using HierarchicalDataTemplates. Now say I want to add checkboxes to the tree, so that the user can create "views...
{ "language": "en", "url": "https://stackoverflow.com/questions/390975", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to read/store unicode with STL strings and streams I need to modify my program to accept Unicode, which may come from any of UTF-8 and the various UTF-16 and UTF-32 encodings. I don't really know much about Unicode (though I've read Joel Spolsky's article and the Wikipedia page). Right now I'm using an std::ist...
{ "language": "en", "url": "https://stackoverflow.com/questions/390977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: JavaScript parser in Python There is a JavaScript parser at least in C and Java (Mozilla), in JavaScript (Mozilla again) and Ruby. Is there any currently out there for Python? I don't need a JavaScript interpreter, per se, just a parser that's up to ECMA-262 standards. A quick google search revealed no immediate ans...
{ "language": "en", "url": "https://stackoverflow.com/questions/390992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: uploading a file to a website with ruby/rails I am building a rails app to test our flagship product (also web based). The problem is that part of the testing requires using the production app's web interface to upload files. So what i need to do is have the rails app upload these files to the production applicati...
{ "language": "en", "url": "https://stackoverflow.com/questions/390993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: When virtual doesn't work I have a weird error in my C++ classes at the moment. I have an ActiveX wrapper class (as part of wxWidgets) that i added a new virtual function to. I have another class that inherits from the ActiveX one (wxIEHtmlWin) however the ActiveX class always calls its own function instead of the o...
{ "language": "en", "url": "https://stackoverflow.com/questions/390997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I trim date in PLSQL? I have a date variable as 24-dec-08. I want only the 08 component from it. How do I do it in a select statement? e.g.: select db||sysdate --(this is the component where I want only 08 from the date) from gct; A: The easiest way is to use the to_char function this way: to_char(sysdate...
{ "language": "en", "url": "https://stackoverflow.com/questions/391000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Draw Text Over Video in Managed DirectX with C# How can I draw text Over Video in Managed DirectX with C#? A: You need one more component, DirectShow.Net. Since you're referring to MDX, I assume you're still using MDX v1.1, as 2.0 Beta is discontinued and has expired by August 2008. Also, I would assume you know ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/391002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }