text
stringlengths
8
267k
meta
dict
Q: How do I enable push-notification for IMAP (Gmail) using Python imaplib? Is there a way to monitor a gmail account using imaplib without polling gmail each time I want to see if there is new mail. Or in other words, I just want the script to be notified of a new message so I can process it right away instead of any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Thread was being aborted when exporting to excel? I have a DataTable which is bound to a GridView. I also have a button that when clicked exports the DataTable to an Excel file. However, the following error is occuring: ErrMsg = "Thread was being aborted." Here is part of the code where the error is being thrown: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can you make Visual Studio 2005 provide command line arguments for your startup program? For testing purposes, is there some place in the Visual Studio IDE where you can specify the command line parameters that you want sent to your startup project when it's launched from the IDE? Thanks in advance for all your help...
{ "language": "en", "url": "https://stackoverflow.com/questions/421203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: CSS Performance issues What are the aspects of style sheets (CSS) that can lead to poor performance of web sites? Anything that can really choke up the CPU? thanks in advance. Sesh A: IE expressions can be a killer if over used. They're reevaluated each and every time the rule is applied. A: CSS? Not so much it'...
{ "language": "en", "url": "https://stackoverflow.com/questions/421205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: In Python, how I do use subprocess instead of os.system? I have a Python script that calls an executable program with various arguments (in this example, it is 'sqlpubwiz.exe' which is the "Microsoft SQL Server Database Publishing Wizard"): import os sqlpubwiz = r'"C:\Program Files\Microsoft SQL Server\90\Tools\Pub...
{ "language": "en", "url": "https://stackoverflow.com/questions/421206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Running unexported .dll functions with python This may seem like a weird question, but I would like to know how I can run a function in a .dll from a memory 'signature'. I don't understand much about how it actually works, but I needed it badly. Its a way of running unexported functions from within a .dll, if you kn...
{ "language": "en", "url": "https://stackoverflow.com/questions/421223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why can't I install the SQLite gem? I'm try to install the SQLite gem on a Fedora 9 Linux box with Ruby 1.8.6, Rails 2.2.2, gem 1.3, and sqlite-3.5.9. Here's the command I'm running and its results: sudo gem install sqlite3-ruby Building native extensions. This could take a while... ERROR: Error installing sqlite3...
{ "language": "en", "url": "https://stackoverflow.com/questions/421225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: SQL to search and replace in mySQL In the process of fixing a poorly imported database with issues caused by using the wrong database encoding, or something like that. Anyways, coming back to my question, in order to fix this issues I'm using a query of this form: UPDATE table_name SET field_name = replace(field_...
{ "language": "en", "url": "https://stackoverflow.com/questions/421227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: JQuery resizable with a knob I am using jQuery-ui Resizable - and i want to use a knob instead of the borders (my knob is a button in the bottom right). I see that in options I have a KnobHandles, that I have to set to true. Where do I set my handle? I tried to set it in the handles option but it is not working. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I find the case-insensitive unique elements of two arrays in Perl? I have three arrays. * *@array1 containing filenames *@array2 containing filenames *@unique which I want to contain the unique items I use the following code to compare the two arrays and output a third array that contains the unique f...
{ "language": "en", "url": "https://stackoverflow.com/questions/421232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Convert MYSQL_TIME data type to char * or C++ string I am using the MySQL C API within a C++ application. I have a column in my result set that is of the type MYSQL_TIME (part of mysql.h). Is there a way to convert MYSQL_TIME to a char* or to a C++ string? A: I figured it out: fprintf(stdout, " %04d-%02d-%02d %02d...
{ "language": "en", "url": "https://stackoverflow.com/questions/421234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: FlowPanel Vertical Scroll I have a flowpanel that I'm dynamically adding usercontrols to. I want it to keep adding them and use a vertical scroll bar. It instead wraps them to the top and places a horizontal scroll bar. I'm sure I'm just missing something, but how do I get it to do vertical scrolling? A: I figur...
{ "language": "en", "url": "https://stackoverflow.com/questions/421247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I login and download a file from a https web page from Java? I have to login into a https web page and download a file using Java. I know all the URLs beforehand: baseURL = // a https URL; urlMap = new HashMap<String, URL>(); urlMap.put("login", new URL(baseURL, "exec.asp?login=username&pass=XPTO")); urlMap.p...
{ "language": "en", "url": "https://stackoverflow.com/questions/421251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SSO-plus-SSL and Shibboleth: What options for sites with numerous virtual hosts? Background: Customer X is a low-budget non-profit outfit that nonetheless has a lot of activity configured on virtual hosts, and the virtual hosts multiply very frequently. Customer X also has a lot of users and is interested in getting...
{ "language": "en", "url": "https://stackoverflow.com/questions/421254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I use a C# keyword as a property name? Using asp.net MVC I'd like to do this inside a view: <%= Html.TextBox("textbox1", null, new { class="class1" }) %> This statement does not compile because class is keyword in C#. I'd like to know how I can escape the property names such that this compiles. It is possibl...
{ "language": "en", "url": "https://stackoverflow.com/questions/421257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: How do you organise CSS in your project? One of the most challenging thing I have felt while working on (complex) web application is the organizing the CSS.Here are the different approaches we have tried on multiple projects. 1: Have a different stylesheet for every web page/module. Obviously we were very new to web...
{ "language": "en", "url": "https://stackoverflow.com/questions/421258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Different execution plan when executing statement directly and from stored procedure While developing a new query at work I wrote it and profiled it in SQL Query Analyzer. The query was performing really good without any table scans but when I encapsulated it within a stored procedure the performance was horrible. W...
{ "language": "en", "url": "https://stackoverflow.com/questions/421275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I get Resharper to ignore the Designer file when navigating to a class? In Resharper, if you ctrl-click the name of a class to naviate to its definition and that has a designer fie, Resharper will ask if I want to go to the X.cs or X.Designer.cs because the class is partial. Does anyone know how to disable th...
{ "language": "en", "url": "https://stackoverflow.com/questions/421278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Should I combine two similar tables into one? In my database I currently have two tables that are almost identical except for one field. For a quick explanation, with my project, each year businesses submit to me a list of suppliers that they sale to, and also purchase things from. Since this is done on an annual ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I find the caller of a method using stacktrace or reflection? I need to find the caller of a method. Is it possible using stacktrace or reflection? A: /** * Get the method name for a depth in call stack. <br /> * Utility function * @param depth depth in the call stack (0 means curre...
{ "language": "en", "url": "https://stackoverflow.com/questions/421280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "435" }
Q: What make g++ include GLIBCXX_3.4.9? I compiled 2 different binaries on the same GNU/Linux server using g++ version 4.2.3. The first one uses: GLIBC_2.0 GLIBC_2.2 GLIBC_2.1 GLIBCXX_3.4 GLIBC_2.1.3 The second one uses: GLIBC_2.0 GLIBC_2.2 GLIBC_2.1 GLIBCXX_3.4.9 GLIBCXX_3.4 GLIBC_2.1.3 Why the second binary uses GL...
{ "language": "en", "url": "https://stackoverflow.com/questions/421282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What are the best prebuilt libraries for doing Web Crawling in Python I need to crawl and store locally for future analysis the contents of a finite list of websites. I basically want to slurp in all pages and follow all internal links to get the entire publicly available site. Are there existing free libraries to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Vista Parental Controls causing Socket Exception? I got a strange bug report the other day and was hoping someone might be able to help me figure out the culprit. I've got a plug-in that uses the Facebook API to make calls from a desktop client program. A user reports that when he turns on Vista's Parental Controls,...
{ "language": "en", "url": "https://stackoverflow.com/questions/421289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Benefits/Disadvantages of using XSL to render entire web pages I am in the preliminary stages of planning a project with a client to redo their current website. I took a look at their current site to see what issues they are currently dealing with and upon inspection I noticed that every page is being rendered entir...
{ "language": "en", "url": "https://stackoverflow.com/questions/421297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: .net remoting to invoke Speech Server workflow in non-local application domain I am implementing a Microsoft Speech Server application built on windows workflow foundation. The app manages other sub apps - users call in and the manager loads the assembly containing the correct application and invokes the workflow. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/421306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: TS_ACT_VALUE Calculation in Project Server I am trying to use c# to create timesheet entries in Project Server and running across a problem with saving the number of hours for the timesheet line on a certain day. If I look at the dataset, there is a property for TS_ACT_VALUE. If I use 1 hour it shows 60000. Does an...
{ "language": "en", "url": "https://stackoverflow.com/questions/421309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: List ordering from SQL call I have a List being returned from a daoTemplate.query() call, using a rowMapper. The SQL does an order by on a column, happens to be a date column, order by asc when I use the List, am I always guaranteed that the list will be in the order dictated by the sql. can I depend that the first ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Need help with an AJAX workflow Sorry I couldn't be more descriptive with the title, I will elaborate fully below: I have a web application that I want to implement some AJAX functionality into. Currently, it is running ASP.NET 3.5 with VB.NET codebehind. My current "problem" is I want to dynamically be able to po...
{ "language": "en", "url": "https://stackoverflow.com/questions/421326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LINQ 2 SQL, Wrong SQL Generation I have a DB table with the following structure: Id int (identity) Company string Cluster string BU string Department string SalesPoint string The following LINQ query: var chEntities = from a in dataContext.CompanyHierarchies ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java- How can you set a pane's background with an image? I'm wondering if there is any way to set a JPanel's background to an image instead of just a colour. Thanks and I'm working on dr. java A: One option is to extend JPanel as they do here. There's another (simpler) example using the same basic technique on Jav...
{ "language": "en", "url": "https://stackoverflow.com/questions/421337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: date insertion algorithm I have a List, it has Foo objects, and each Foo has a start date, and an end date. I want to insert a new Foo object, which has its own start and end date. I want the elements in the list to update their start and end dates accordingly, when the new Foo object is inserted, and for the new Fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/421339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: SVN 'Unexpected end of svndiff input' error I'm having a problem with svn, where running 'svn up' produces the following error: svn: Unexpected end of svndiff input Ironically, running 'svnadmin verify repository_path' also returns the same error. It happens on existing working copies and brand new working copies t...
{ "language": "en", "url": "https://stackoverflow.com/questions/421345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Access Non-Public members of a GridViewCommandEventArgs object I have a gridview on my aspx page set up the OnRowCommand event using a series of ASP.NET LinkButton object to handle the logic using the CommandName property. I need to access the GridViewRow.RowIndex to retrieve values from the selected row and notice...
{ "language": "en", "url": "https://stackoverflow.com/questions/421350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: asp:ImageButton is not firing in an asp.net UpdatePanel? I have an asp:ImageButton that is supposed to popup a save dialog when clicked. When I put it outside the UpdatePanel, it works fine, but when I put it inside the UpdatePanel, the dialog does not popup. A: Response.Write often doesn't work inside of UpdatePa...
{ "language": "en", "url": "https://stackoverflow.com/questions/421353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: .NET WebBrowser control with Adobe SVG Viewer I'm having problems with SVG files loading in a .NET 2.0 WebBrowser control. If I create a new WinForms application project, drag a WebBrowser control and a button onto the Form1.cs design surface, and add a line to the button's on-click handler to set the Url property ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to safely update a file that has many readers and one writer? I have a set of files. The set of files is read-only off a NTFS share, thus can have many readers. Each file is updated occasionally by one writer that has write access. How do I ensure that: * *If the write fails, that the previous file is still ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What happens if you go to a GET style url with a POST request? Let's say I have a page called display.php and the user is viewing display.php?page=3. I want to allow the user to do an action like voting via a POST request and then bring them back to the page they were on. So, If I do a POST request to display.php?pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/421378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Server - Using a column alias in a subquery I have the following query which works fine with MySQL but refuses to work with SQL server: SELECT table1.someField AS theField, COUNT(table2.someField) / (SELECT COUNT(someField) FROM table1 WHERE someField = theField), FROM table1 LEFT JOIN table2 ON table1.s...
{ "language": "en", "url": "https://stackoverflow.com/questions/421379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are some best practices to support multiple resolutions in a web application? What are some best practices on enabling a web application to support multiple resolutions? Specifically resolutions that are wide-screen vs. normal aspect ratio. It doesn't seem like there is an easy answer - other than simply suppo...
{ "language": "en", "url": "https://stackoverflow.com/questions/421380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Swing buttons don't react immediately! How can I change that? I've built a form with Netbeans's visual editor. When I press one of the buttons it should do the following : * *set it to disabled *perform a task that takes some time *when the task finishes the button will be enabled again However, the following...
{ "language": "en", "url": "https://stackoverflow.com/questions/421381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Performing Form Validation with an Access 2003 ADP project I'm developing an Access 2003 Database that uses a MS SQLServer backend. I'm trying to do Form Validation and am experiencing some problems. * *ValidationRule for each field seems to be ignored *I can't figure out what event I should override to enforce ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is this thread.abort() normal and safe? I created a custom autocomplete control, when the user press a key it queries the database server (using Remoting) on another thread. When the user types very fast, the program must cancel the previously executing request/thread. I previously implemented it as AsyncCallback...
{ "language": "en", "url": "https://stackoverflow.com/questions/421389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Is there a way to create and return new variables from a method in C#? Basically like using the out keyword. But the problem is with the out keyword, you still have to declare a variable outside the method call, like: double result; Double.TryParse ( "76", out result ); where as I want something like: Double.TryPar...
{ "language": "en", "url": "https://stackoverflow.com/questions/421391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting data into a Windows Workflow instance We're currently building a system that abstracts all kinds of technical details about web services from some other systems. It's a bit like an Enterprise Bus, but it does a little more. We decided to use Windows Workflow to handle the requests. As soon as we figure out w...
{ "language": "en", "url": "https://stackoverflow.com/questions/421398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Building a rudimentary accounting app I'm building a simple accounting app to be used for personal finance. A user might keep track of purchases, upcoming bills, recurring deposits, etc. It will be verrrrry simple. Two questions: 1) Any advice I should keep in mind? Obviously, I'll use transactions where appropriate...
{ "language": "en", "url": "https://stackoverflow.com/questions/421405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to set the locale for a process launched by CreateProcess() When launching a process with CreateProcessW(), is it possible to have the process created with a different MBCP locale/codepage then the one that is configured as the system-wide default code page? In the target process, this should have the same effec...
{ "language": "en", "url": "https://stackoverflow.com/questions/421409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Good choice for a lightweight checksum algorithm? I find myself needing to generate a checksum for a string of data, for consistency purposes. The broad idea is that the client can regenerate the checksum based on the payload it recieves and thus detect any corruption that took place in transit. I am vaguely aware...
{ "language": "en", "url": "https://stackoverflow.com/questions/421419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Finding running instances in a running JVM I'm wondering if it's possible to get a handle on running instances of a given class. The particular issue that triggered this was an application that doesn't exit nicely because of a number of running threads. Yes, I know you can daemonize the theads, and they won't then ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: TreeView Update I have a treeview control on an aspx page. The data comes from database and I bind it to treeview control programmatically. (Parent-Child relationship in database of course) Well and I added a textbox which I use to add new child under the selected node and it works also good but so as to see the new...
{ "language": "en", "url": "https://stackoverflow.com/questions/421437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why is > conditional split in SSIS package returning >= result? update: (DateTime != DT_DBTIMESTAMP ?!) I have an SSIS data flow conditional split transformation that is returning a >= result when it should be returning a > result. From the beginning... My SSIS package executes a SQL task that stores a max(date) fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/421448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Anonymous users in Rails -- security considerations? I'm looking at implementing some form of anonymous user system in Rails. I need to let people do things (creating records, looking at what they've created, etc), without actually creating an account. Once they create an account, everything persists without risk of...
{ "language": "en", "url": "https://stackoverflow.com/questions/421458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: trying to find a javascript dropdown control I'm looking for a dropdown similar to the openid site-select dropdown on the stackoverflow login page: (source: codinghorror.com) ... and for now I'd rather not sit down and write one myself. I'm looking for one written for inclusion in plain html/javascript (php code),...
{ "language": "en", "url": "https://stackoverflow.com/questions/421459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Should I use NSDecimalNumber to deal with money? As I started coding my first app I used NSNumber for money values without thinking twice. Then I thought that maybe c types were enough to deal with my values. Yet, I was advised in the iPhone SDK forum to use NSDecimalNumber, because of its excellent rounding capabil...
{ "language": "en", "url": "https://stackoverflow.com/questions/421463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Exposing events from .NET to COM recently I have been encountering problems with exposing events from .NET to COM. I have been successful with this example (conceptually taken from http://blogs.msdn.com/andreww/archive/2008/10/13/exposing-events-from-managed-add-in-objects.aspx): // The delegate type for our custom ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: "Pin" a class to the selected radio button? I'm trying to add a class to the selected radio input and then remove that class when another radio of the same type is selected The radio buttons have the class 'radio_button' but i can't get the class to change with the below code. jQuery(".radio_button").livequery('c...
{ "language": "en", "url": "https://stackoverflow.com/questions/421486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: To upload an excel file as a clob Could some one give an idea about how to convert an excel file into a CLOB in oracle through JDBC. I would like to know how to covert excel file into a String using API available as part of JDK and the conversion from string to clob should be straight forward. Thanks in advance. If ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the storage capacity of a Mnesia database? Some places state 2GB period. Some places state it depends up the number of nodes. A: Quite large if your question is "what's the storage capacity of an mnesia database made up of a huge number of disc_only_copies tables" - you're largely limited by available disk ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: sql help: how can I add quantities together? Basically this code below returns the right information, but I need to add the quantities together to bring back one record. Is there any way of doing this? select category.category_name, (equipment.total_stock-equipment.stock_out) AS Current_Stock, equipment.stock_out fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/421509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to write c# service that I can also run as a winforms program? I have a windows service written in C# that acts as a proxy for a bunch of network devices to the back end database. For testing and also to add a simulation layer to test the back end I would like to have a GUI for the test operator to be able run t...
{ "language": "en", "url": "https://stackoverflow.com/questions/421516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is there a way to enable / disable constraints in db2 v7? I have to copy tables from an Oracle database to a db2 v7 one, and in order to do this (avoiding millions of drops and creates) I'd like to know if db2 has a feature like Oracle to enable / disable constraints temporarily without dropping them. Thanks in adva...
{ "language": "en", "url": "https://stackoverflow.com/questions/421518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is endian conversion required for wchar_t data? In C/C++, if a multi-byte wide character (wchar_t) value is transmitted from a big-endian system to a little-endian system (or vice-versa), will it come out the same value on the other side? Or will the bytes need to be swapped? A: Endian conversion is not sufficient...
{ "language": "en", "url": "https://stackoverflow.com/questions/421530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Rails: submitting a form with multiple objects I'm creating a Rails application, and I've hit a bit of a snag. I want a "create new record for DataType1" form that not only creates a new row for DataType1, but also inserts up to four new rows for DataType2. I know all about fields_for, but my problem is that I need ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Does the Garbage Collector destroy temporarily unreferenced objects during async calls in .NET? Imagine that I will make an async call in .NET, i.e. HttpWebRequest.BeginGetResponse, and the HttpWebRequest object isn't referenced at a broader scope. Will the Garbage Collector destroy it and cause problems? Example co...
{ "language": "en", "url": "https://stackoverflow.com/questions/421547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What security benefits are provided by using stored procedures to access data? I have seen some guidance which recommends that you secure a database by layering all data access through stored procedures. I know that for SQL Server, you can secure tables, and even columns against CRUD operations. For example: --/...
{ "language": "en", "url": "https://stackoverflow.com/questions/421553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Is a glossy or matte LCD screen better for long coding sessions? I'm looking at getting a new LCD monitor, but I'm concerned that a glossy monitor might cause more eye strain after a long day of work. I typically spend a lot of time in front of my monitor, so eye strain is definitely something I have thought about. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: What does this VB6 variable declaration do? I just found this in some old code, and I'm not sure what it means. Dim sTemp As String * 1 What is the * 1 at the end? Thanks! A: It means that the variable is a string of exactly one character in length. Essentially, a fixed-length string. A: It's a fixed length str...
{ "language": "en", "url": "https://stackoverflow.com/questions/421561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using up arrow in Visual Studio IntelliSense to select the last item Anyone knows if this is possible? I tried it in vs 2005 and 2008 and it doesn't do that. IMO this would be a very useful feature when I know I want to select the last item or an item that's closer to the end of the IntelliSense list. A: It's not p...
{ "language": "en", "url": "https://stackoverflow.com/questions/421563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a way to return a dotNetObject value from a custom 3ds Max plugin? I have a custom plugin for 3ds Max that interfaces with some managed code on the back end. In some circumstances, I'd like to forward along a managed object to MAXScript for direct interaction, i.e. return a wrapped object from one of my fun...
{ "language": "en", "url": "https://stackoverflow.com/questions/421566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you put a gradient background on ASP.NET menu items? The boss wants the master page's menu to look nicer. I generated my gradient file with one of the tools available on the net, no problem there.. I tried to make a CSS class for each menu item but when I use the background-image directive and the style buil...
{ "language": "en", "url": "https://stackoverflow.com/questions/421570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best way to extract a subvector from a vector? Suppose I have a std::vector (let's call it myVec) of size N. What's the simplest way to construct a new vector consisting of a copy of elements X through Y, where 0 <= X <= Y <= N-1? For example, myVec [100000] through myVec [100999] in a vector of size 150000. If th...
{ "language": "en", "url": "https://stackoverflow.com/questions/421573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "376" }
Q: Silverlight: Binding a child controls property to a property in a user control If I have a user control defined: public partial class MainFooter : UserControl { public System.Windows.Media.Color BkColor; } and it's xaml: <UserControl x:Class="Test.MainFooter"> <Grid x:Name="LayoutRoot"> <Rectangle x...
{ "language": "en", "url": "https://stackoverflow.com/questions/421581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: 3ds max object to opengl I am trying to assemble a scene in opengl, using already made objects. The problem is that the object are in .max format and have no external textures. How could I import my objects in opengl, without retexturing them. I am thinking about exporting them to 3ds and using a 3ds file loader. Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/421600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Removing rows from QTreeWidget (qt programming) what's the best way to remove a row (QTreeWidgetItem) from a QTreeWidget? The QTreeWidget content has been set by: myQTreeWidget->insertTopLevelItems(0, items); // items = QList<QTreeWidgetItem*> then I remove an item from my QList "items" and I try to clear/reset the...
{ "language": "en", "url": "https://stackoverflow.com/questions/421604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Very, very large C# floating-point numbers I am doing some population modeling (for fun, mostly to play with the concepts of Carrying Capacity and the Logistics Function). The model works with multiple planets (about 100,000 of them, right now). When the population reaches carrying capacity on one planet, the inhabi...
{ "language": "en", "url": "https://stackoverflow.com/questions/421612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I strip punctuation from a string? For the hope-to-have-an-answer-in-30-seconds part of this question, I'm specifically looking for C# But in the general case, what's the best way to strip punctuation in any language? I should add: Ideally, the solutions won't require you to enumerate all the possible punctu...
{ "language": "en", "url": "https://stackoverflow.com/questions/421616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: Python script to list users and groups I'm attempting to code a script that outputs each user and their group on their own line like so: user1 group1 user2 group1 user3 group2 ... user10 group6 etc. I'm writing up a script in python for this but was wondering how SO might do this. p.s. Take a whack at it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Help with regex in javascript I have this sample text, which is retrieved from the class name on an html element: rich-message err-test1 erroractive rich-message err-test2 erroractive rich-message erroractive err-test1 err-test2 rich-message erroractive I am trying to match the "test1"/"test2" data in each of these...
{ "language": "en", "url": "https://stackoverflow.com/questions/421619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to copy a few chars from a char[] to a char* in C? Yo! I'm trying to copy a few chars from a char[] to a char*. I just want the chars from index 6 to (message length - 9). Maybe the code example will explain my problem more: char buffer[512] = "GET /testfile.htm HTTP/1.0"; char* filename; // I want *filename to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the best resource for learning (N)ASM? I've been wanting to learn assembly for a while now, and although I've tried a few times before, I haven't really been able to get past "Hello, world". Are there any good introductory tutorials to assembly (preferably using NASM, as I use Windows and Linux)? I do have a...
{ "language": "en", "url": "https://stackoverflow.com/questions/421631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Organizing a Visual Studio Solution with "Solution Folders" When setting up a Visual Studio .NET solution with many projects, do you find "Solution Folders" useful? What are the drawbacks? My original thought was that using Solution Folders can be useful to logically organize like projects within a solution. Howev...
{ "language": "en", "url": "https://stackoverflow.com/questions/421641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do I stop execution in GDB without a breakpoint? How do I stop a GDB execution without a breakpoint? A: Start a shell, find the process ID using ps and send it SIGSTOP or SIGINT by using the kill command (e.g. kill -INT pid). A: Just type BREAK without any arguments. Break, when called without any arguments, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/421655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: XML Deserialization - convert attribute value into class automatically (.net) (vb.net/c#/etc) I am having trouble figuring out how to do a bit of deserialization magic. Currently the standard deserialization works fine, including the enums, but now I want to convert an attribute into a class. Oh! what was I thinki...
{ "language": "en", "url": "https://stackoverflow.com/questions/421660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is a lightweight way to monitor a network adapter in Java? I want to be able to detect when a computer connects to a network. The environment is Java 5 under Windows. A: I think your choices are to either use some JNI library (though I'm not familiar with one offhand and that would tend to be platform specifi...
{ "language": "en", "url": "https://stackoverflow.com/questions/421662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Animating Tab Bar page switching I'm quite confused with the whole animation stuff in iPhone SDK. I tried to study throught the SDK documentation, this website or tried googling it out without success. I'm unable to get my scenario work. * *I have single XIB file, with tab bar and a 4 tabs. *In a special event i...
{ "language": "en", "url": "https://stackoverflow.com/questions/421683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's your favorite JS/CSS drop down menu? Looking to implement one on a website, just curious what everyone else has used and what kind of experiences they've had EDIT I'm also not a huge fan, but the client is insistant and for this case they can click on the "hoverable" part and then get to the same pages in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/421708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Convert asp.net project pages from Windows-1251 to Utf-8 I can do that file-by-file with Save As Encoding in Visual Studio, but I'd like to make this in one click. Is it possible? A: I know, some will start bashing on me: download a smalltalk IDE (such as ST/X), open a workspace, type in: 'yourDirectoryHere' asFile...
{ "language": "en", "url": "https://stackoverflow.com/questions/421709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the best strategy to diagnose/determine what is causing mixed-content warnings in your web application? Is there some sort of profiling tool available? View source and search/replace? A: Although the message is usually a problem in IE, loading the page in Firefox with Firebug will let you see what is going ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: help access 2007 sql tables? does anyone know where on access 2007 a function where i can access my sql database? i need it to create reports. thanks A: Create an ODBC connection. In Microsoft Access, go to the File menu and select Get External Data and choose Link Tables... from the resulting menu. A: As well as...
{ "language": "en", "url": "https://stackoverflow.com/questions/421714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Implementing sort/page feature when using POCOs with ASP.net Data Controls I am not a big fan of datasets so I use POCO to return data. I have achieved paging and sorting using custom methods that I create for a POCO type that work on page size and give me a set of the complete POCO collection at a time, I use metho...
{ "language": "en", "url": "https://stackoverflow.com/questions/421720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Templates or css skins for the asp.net membership login control? I want to style the asp.net membership login control and I am too lazy to handcraft a professional looking one. I couldn't find ready made css styles for the login control. Are there any available on the web? A: The easiest thing to do would be extend...
{ "language": "en", "url": "https://stackoverflow.com/questions/421731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can SQL Server Replication include the source dbid in the replicated data? Let's say I have DatabaseA with TableA, which has these fields: Id, Name. In another database, DatabaseB, I have TableA which has these fields: DatabaseId, Id, Name. Is it possible to setup a replication publication that will send: DatabaseA...
{ "language": "en", "url": "https://stackoverflow.com/questions/421739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the best way to count results in GQL? I figure one way to do a count is like this: foo = db.GqlQuery("SELECT * FROM bar WHERE baz = 'baz') my_count = foo.count() What I don't like is my count will be limited to 1000 max and my query will probably be slow. Anyone out there with a workaround? I have one in m...
{ "language": "en", "url": "https://stackoverflow.com/questions/421751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: regular expression to match comma-formatted numbers with decimals I have this regular expression: ^\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$ however it is failing when i have an amount such as this: 41022095.6 anything I am missing? A: Your regular expression expects either no decimal point, or a decimal point foll...
{ "language": "en", "url": "https://stackoverflow.com/questions/421757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What programming language is this? <{if $ishtml == true}><font face="Verdana, Arial, Helvetica" size="2"><{$contentshtml}> <BR><BR> <{if $settings[t_enhistory] == 1}> <fieldset style="margin-bottom: 6px; color: #333333;FONT: 11px Verdana, Tahoma;PADDING:3px;"> <legend><{$language[tickethistory]}></legend> <{fore...
{ "language": "en", "url": "https://stackoverflow.com/questions/421763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is WPF on Linux (already) possible? I love programming with .NET, especially C# 3.0, .NET 3.5 and WPF. But what I especially like is that with Mono .NET is really platform-independent. Now I heard about the Olive Project in Mono. I couldn't find some kind of Beta. Does it already work? Have any of you made any expe...
{ "language": "en", "url": "https://stackoverflow.com/questions/421764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: How can a bash script know the directory it is installed in when it is sourced with . operator? What I'd like to do is to include settings from a file into my current interactive bash shell like this: $ . /path/to/some/dir/.settings The problem is that the .settings script also needs to use the "." operator to inclu...
{ "language": "en", "url": "https://stackoverflow.com/questions/421772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to populate UpdatePanel in Repeater in ASPX (not code-behind)? I have a Repeater which displays a list of items (in a grid-like/table view). When a user clicks an item, I display an UpdatePanel under this item with additional information relevant to the item (similar to Accordion control). I know how to populate...
{ "language": "en", "url": "https://stackoverflow.com/questions/421773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: asp.net site default document in subfolder My default document is in subfolder not in root how can i make it default in asp.net 2.0 website. Tried iis7 default document setting to '/pages/default.aspx' '~/pages/default.aspx' but it didn't work. A: You don't need to create a dummy Default.aspx page. In your Global.a...
{ "language": "en", "url": "https://stackoverflow.com/questions/421778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Simple/elegant way to do object to object transformation in Java? I have to take over and improve/finish some code that transforms Java objects from a third party library into internal objects. Currently this is done through a big if-else statement along the lines of: if (obj instanceOf X) { //code to initialize...
{ "language": "en", "url": "https://stackoverflow.com/questions/421782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to create a dynamic ASP:ImageMap I want to create an ASP:ImageMap with a dynamic number of hot spots. I tried the code below, but it complains about having a repeater nested inside an image map. Any ideas on how to do this? <asp:ImageMap ID="imgMap" runat="server" ImageUrl="~/circles.png" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/421789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }