text
stringlengths
8
267k
meta
dict
Q: Why does the c# compiler emit Activator.CreateInstance when calling new in with a generic type with a new() constraint? When you have code like the following: static T GenericConstruct<T>() where T : new() { return new T(); } The C# compiler insists on emitting a call to Activator.CreateInstance, which is cons...
{ "language": "en", "url": "https://stackoverflow.com/questions/367577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Regarding Image paths of a page using master page If the Master Page and child aspx page are in different folders, when the aspx page is served, whether image paths are relative to the location of child page or the Master page? A: The child page. Consider using the "~/" in your path which points to the application ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generating random text strings of a given pattern I need to generate random text strings of a particular format. Would like some ideas so that I can code it up in Python. The format is <8 digit number><15 character string>. A: #!/usr/bin/python import random import string digits = "".join( [random.choice(string....
{ "language": "en", "url": "https://stackoverflow.com/questions/367586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Jquery: My class does not function during second call I am new to jQuery.just learn and use it for 3 weeks until now. I have written a class to organize stuff. I call my method with more than 2 events,but the event does not work during my trigger of the second event. there's nothing wrong with the selector. I think ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I get the list of button using watin? How can I use Watin to get the list of available button on a website? How do the watinTestRecorder do it? A: IE ie = new IE("www.example.com/pagewithbuttons.html"); ButtonCollection buttons = ie.Buttons; If you want to filter out in visible buttons, use: ButtonCollectio...
{ "language": "en", "url": "https://stackoverflow.com/questions/367603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: T-Shirt flash designer Anybody know what flash component is this site using : http://www.comboutique.asia/shop/design_your_own_t_shirt.html? It looks neat and feature rich. I've tried http://www.harboarts.com/shirtdesigner/ but it doesn't really nice compared to the above. Thank you. A: If I check the sourcecode of...
{ "language": "en", "url": "https://stackoverflow.com/questions/367604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the best pattern for WPF events? Hey, i'm extending some WPF controls, and need to implement some custom events. I've read around about the 'event' keyword and method groups, but im not sure how to implement this in code. Would anyone be able to provide a simple example of a custom event/handler/etc? Thanks!...
{ "language": "en", "url": "https://stackoverflow.com/questions/367607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does LINQ Support Composable "OR Queries"? In another posting: Does Linq-To-Sql support composable queries there was discussion on how to compose/concat where clauses dynamically. This appears to be done with an "AND" (i.e. the first where clause and the second where clause are joined by an AND). What I am wonderi...
{ "language": "en", "url": "https://stackoverflow.com/questions/367617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I fix: InvalidOperationException upon Session timeout in Ajax WebService call We are invoking Asp.Net ajax web service from the client side. So the JavaScript functions have calls like: // The function to alter the server side state object and set the selected node for the case tree. function JSMethod(caseId,...
{ "language": "en", "url": "https://stackoverflow.com/questions/367623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I fix "The expression of type List needs unchecked conversion...'? In the Java snippet: SyndFeedInput fr = new SyndFeedInput(); SyndFeed sf = fr.build(new XmlReader(myInputStream)); List<SyndEntry> entries = sf.getEntries(); the last line generates the warning "The expression of type List needs unchecked co...
{ "language": "en", "url": "https://stackoverflow.com/questions/367626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "153" }
Q: What part of LINQ to SQL's provider model makes it impossible to extend it to support third party (read: Non-Microsoft) databases? There were supposedly some classes in the LINQ to SQL provider model that were sealed--but I never really figured out exactly which classes need to be 'unsealed' in order to use it. Hypo...
{ "language": "en", "url": "https://stackoverflow.com/questions/367627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are all the common undefined behaviours that a C++ programmer should know about? What are all the common undefined behaviours that a C++ programmer should know about? Say, like: a[i] = i++; A: Assigning to a constant after stripping constness using const_cast<>: const int i = 10; int *p = const_cast<int*>(...
{ "language": "en", "url": "https://stackoverflow.com/questions/367633", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "200" }
Q: Difference between User Control and Custom Control? What are the differences between User Control and Custom Control in ASP.NET A: AFAIK, user controls are controls that you can create out of existing controls and can be part of the project and have a designer surface for you to drag/drop. Custom controls are gener...
{ "language": "en", "url": "https://stackoverflow.com/questions/367640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Where is the path set for Request.AppRelativeCurrentExecutionFilePath I need to know the path for Request.AppRelativeCurrentExecutionFilePath. It gives the wrong file path when I retrieve any requests. A: it gets the virtual path of the application root and makes it relative by using the tilde (~) notation for the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Disable character echo on Java network connection I have a Solaris daemon written in Java6. Clients can connect to it using a telnet style interface. They telnet to a particular port, and I read lines of input and act on them. At one point in I need to prompt the user to enter a password, and while they're entering ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: String extraction Currently I am working very basic game using the C++ environment. The game used to be a school project but now that I am done with that programming class, I wanted to expand my skills and put some more flourish on this old assignment. I have already made a lot of changes that I am pleased with. I h...
{ "language": "en", "url": "https://stackoverflow.com/questions/367656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Fast FEM Solvers What are the fast solvers for FEM equations? I would prefer open source implementation, but if there is a commercial implementation, then I won't mind paying for it. A: Code Aster is an open source FE code. code aster The pre- and post-processing is usually done with Salome - both originate from E...
{ "language": "en", "url": "https://stackoverflow.com/questions/367683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Get Data from OpenGL glReadPixels(using Pyglet) I'm using Pyglet(and OpenGL) in Python on an application, I'm trying to use glReadPixels to get the RGBA values for a set of pixels. It's my understanding that OpenGL returns the data as packed integers, since that's how they are stored on the hardware. However for o...
{ "language": "en", "url": "https://stackoverflow.com/questions/367684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I get the substed drive letter in Perl? I need to get substed drive letter in Perl. Could anyone kindly help me? $ENV{SYSTEMDRIVE} does not work; it gives me real logical drive letter, not the substed one. A: Are you looking for Win32::FileOp? A: perl -e 'use Cwd; print( substr(getcwd(),10,1 )) ' # prints ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the easiest way to figure out who wrote/edited this line of code? This obviously requires the source file to be under source control. I would ideally like a tool which works under the IDE (Eclipse, Visual Studio, etc) - but an external tool would be nice, too. Obviously, it is possible manually go through pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/367703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I parse command line arguments in Java? What is a good way of parsing command line arguments in Java? A: Take a look at the Commons CLI project, lots of good stuff in there. A: Yeap. I think you're looking for something like this: http://commons.apache.org/cli The Apache Commons CLI library provides an API...
{ "language": "en", "url": "https://stackoverflow.com/questions/367706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "672" }
Q: Thoughts about using Silverlight In Desktop Apps? To summarize, as we all know, a) Silverlight is expected to be hosted by a browser, and runs in an isolated sandbox so that there won’t be any security issues * *Silverlight don’t have direct access to the file system, other than the isolated storage area *There...
{ "language": "en", "url": "https://stackoverflow.com/questions/367707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: jQuery And Drupal page load I would like to execute the jQuery $(document).ready() in a drupal site. While i know that i can just stick it in the index page , this is really messy and a hack. What i want to know is where is the correct location to put this, it would also need to be theme specific as i dont want all...
{ "language": "en", "url": "https://stackoverflow.com/questions/367709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the best collation to use for MySQL with PHP? I'm wondering if there is a "best" choice for collation in MySQL for a general website where you aren't 100% sure of what will be entered? I understand that all the encodings should be the same, such as MySQL, Apache, the HTML and anything inside PHP. In the past...
{ "language": "en", "url": "https://stackoverflow.com/questions/367711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "792" }
Q: Helper functions in Cocoa What is the standard way of incorporating helper/utility functions in Obj-C classes? I.e. General purpose functions which are used throughout the application and called by more than 1 class. Can an Obj-C method exist outside of a class, or does it need to be a C function for it to have this...
{ "language": "en", "url": "https://stackoverflow.com/questions/367724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How do you create an Interface between two projects, not referenced How can two classes in separate projects communicate between one another? If ClassA references ClassB I can access methods of ClassB in ClassA... How can I make use of Interfaces to access methods of ClassA in ClassB? Indeed do the classes even need...
{ "language": "en", "url": "https://stackoverflow.com/questions/367726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to change XML Attribute How can I change an attribute of an element in an XML file, using C#? A: Mike; Everytime I need to modify an XML document I work it this way: //Here is the variable with which you assign a new value to the attribute string newValue = string.Empty; XmlDocument xmlDoc = new XmlDocume...
{ "language": "en", "url": "https://stackoverflow.com/questions/367730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: Can Windows Web Server 2008 be used to host games? I'm currently using a linux server, we run a couple of web sites of it, PHP apps with MySQL, the usual. Since the server is privately owned by some friends and myself (we do have it hosted at a professional datacenter though), from time to time we also use it to hos...
{ "language": "en", "url": "https://stackoverflow.com/questions/367737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to set max return result for many-to-one I have a Product Class which has a one to many relationship to a Price class. So a product can have multiple prices. I need to query the db to get me 10 products which have Price.amount < $2. In this case its to populate a UI with 10 items in a page. so i writ the followi...
{ "language": "en", "url": "https://stackoverflow.com/questions/367739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating a .DMG I want to create a dmg file for my Mac project. Can someone please tell me how to do this? This being my first Mac project, I do not have any idea how to proceed. I also want to give the user an option of running the app on start-up. How do I do this? Thanks. P.S. I also want to add a custom license ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Trouble adding onclick handler to hyperlink tag inside listitem Trying to add an onclick handler to my tabs, and can't seem to get the DOM selection right. Can you guys help? <div id="tabstrip"> <ul> <li id="a" class="selected"><a href="#">A</a></li> <li id="b"><a href="#">B</a></li> <li id="...
{ "language": "en", "url": "https://stackoverflow.com/questions/367752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to determine whether a DLL is a managed assembly or native (prevent loading a native dll)? Original title: How can I prevent loading a native dll from a .NET app? Background: My C# application includes a plugin framework and generic plugin loader. The plugin loader enumerates the application directory in order t...
{ "language": "en", "url": "https://stackoverflow.com/questions/367761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How do you substring a MERGEFIELD in Word? This one has me puzzled. It seemed like an easy task, but the solution eludes me: - How do you substring a merge field in a Word template used for mail merging? For example, I have something like {MERGEFIELD barcodevalue} and I want to extract the first 6 characters as it i...
{ "language": "en", "url": "https://stackoverflow.com/questions/367762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to detect if a function is called as constructor? Given a function: function x(arg) { return 30; } You can call it two ways: result = x(4); result = new x(4); The first returns 30, the second returns an object. How can you detect which way the function was called inside the function itself? Whatever your solut...
{ "language": "en", "url": "https://stackoverflow.com/questions/367768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "121" }
Q: How to download page for jad file at servlet? I have a java me application and now I want to place that application at the server. I want to write the download page with servlet. I mean when the user keys in the servlet url and hit to that servlet, my jad file will send to the phone(user no need to click to download...
{ "language": "en", "url": "https://stackoverflow.com/questions/367781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Prevent browser caching of AJAX call result It looks like if I load dynamic content using $.get(), the result is cached in browser. Adding some random string in QueryString seems to solve this issue (I use new Date().toString()), but this feels like a hack. Is there any other way to achieve this? Or, if unique stri...
{ "language": "en", "url": "https://stackoverflow.com/questions/367786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "287" }
Q: Custom IVR action in Asterisk Can you someone please point in me in a direction, sample code or an online resource to accomplish the following: Requirement: I would like to write a simple IVR menu option that will run a script (Bash or Python). For example, phone the Asterisk machine and request to restart a servic...
{ "language": "en", "url": "https://stackoverflow.com/questions/367789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: System.ArgumentException illegal characters in path I am using Path.Combine, and one of the strings contain a Unicode characters. I get {System.ArgumentException} exception; illegal characters in path. According to MSDN filepath/name can have unicode characters. Why do I get this exception? Edit: Here is the code: P...
{ "language": "en", "url": "https://stackoverflow.com/questions/367797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: redistributing and using the CS.exe compiler (C#) for my application We are currently building an application which needs to compile C# code. Can we redistribute csc.exe in our package. I thought that it comes with the .Net framework installation but from looking in Microsoft Web site I see that there is a differenc...
{ "language": "en", "url": "https://stackoverflow.com/questions/367814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: In postgresql: How do I create a simple counter which I can reset? I want to achieve the following: ID | Counter ------------ 0 | 343 1 | 8344 Now say that I want to update counter for ID 1,,, what is the easiest way to do it? Do I use sequences? do I simply read the value and update? Is there any special type fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/367817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: VB.NET Predicate Array Find How would I convert the following to a VB.NET predicate using Array.Find? Private Function FindCulture(ByVal Code As String) As Globalization.CultureInfo ' Dim AllCultures As Globalization.CultureInfo() = Globalization.CultureInfo.GetCultures(Globalization.CultureTypes.AllCultures...
{ "language": "en", "url": "https://stackoverflow.com/questions/367818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: enum-int casting: operator or function In the external code that I am using there is enum: enum En {VALUE_A, VALUE_B, VALUE_C}; In another external code that I am using there are 3 #define directives: #define ValA 5 #define ValB 6 #define ValC 7 Many times I have int X which is equal to ValA or ValB or ValC, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/367819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Linq to SQL Nested IN FROM query Can anyone tell me how to write a nested SQL query like SELECT * FROM X WHERE X.ID IN (SELECT Y.XID FROM Y WHERE .....) in LINQ? A: You could try: var yIds = from y in dataContext.Y where ... select y.XId; var query = from x in dataContext.X where...
{ "language": "en", "url": "https://stackoverflow.com/questions/367823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Using Win32 API in Qt OSE project It is a messy question, hopefully you can figure out what I want :) What is the best way to use Win32 functionality in a Qt Open Source Edition project? Currently I have included the necessary Windows SDK libraries and include directories to qmake project file by hand. It works fine...
{ "language": "en", "url": "https://stackoverflow.com/questions/367824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to map a related table to an inherited entity (table-per-hierarchy)? i've got this tables in my database. alt text http://img166.imageshack.us/img166/3133/testdbschemafy5.png With Entity Framework i would like to have something like that: alt text http://img166.imageshack.us/img166/5721/testdbschemaefdv5.png I'v...
{ "language": "en", "url": "https://stackoverflow.com/questions/367828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Model Warnings in ASP.NET MVC I'm currently using the ModelStateDictionary in asp.net mvc to hold validation errors and pass then back to the user. Being able to check if the whole model is valid with ModelState.IsValid is particularly. However, a current application I'm working on has a need to be able to report wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/367846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is wrong with this simple CSS in IE? There is a div that has inner content, a div with a border that's inside a div. Somehow, this div is expanded to encompass the next div. It blows my mind. <div style="background: yellow;"> <div> <div style="border: 1px solid black; background: green">green background...
{ "language": "en", "url": "https://stackoverflow.com/questions/367847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Stored Procedure, can you help me? Below is my stored procedure. I want use stored procedure select all row of date from tbl_member and insert 2 table. But it's not work. Some one can help me? Create PROCEDURE sp_test AS BEGIN SET NOCOUNT ON; Declare @A Varchar(255), @B Varchar(255), @C Varchar(255), @D int...
{ "language": "en", "url": "https://stackoverflow.com/questions/367853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.Net PagingBulletedList Extender For ASP.Net GridView Does any one know of a control that i can use with a ASP.Net gridview that provides the functionality of the ASP.Net Ajax Control PagingBulletedList. I want to provide the users with a easier way to access the data in the grid. It should ideally work in the sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/367859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java regexp for file filtering I would like to build a regexp in Java that would be passed in a FilenameFilter to filter the files in a dir. The problem is that I can't get the hang of the regexp "mind model" :) This is the regexp that I came up with to select the files that I would like to exclude ((ABC|XYZ))+\w*T...
{ "language": "en", "url": "https://stackoverflow.com/questions/367862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Find records from one table which don't exist in another I've got the following two tables (in MySQL): Phone_book +----+------+--------------+ | id | name | phone_number | +----+------+--------------+ | 1 | John | 111111111111 | +----+------+--------------+ | 2 | Jane | 222222222222 | +----+------+--------------+ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "385" }
Q: Securing certain parts of an application If someone logs on to my application this user contains a dictionary with certain permissions. ex: module.view.workspace = true module.view.reporting = false ... Then we know to what parts of the application the user has access. What I want to know is how we can appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/367870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I test my iphone application on iPhone device before submittimg it to Apple Store? How can I test my iphone application on iPhone device before submittimg it to Apple Store? A: You need to join the iPhone Developer Program. This will give you a digital certificate that you can use to sign your application a...
{ "language": "en", "url": "https://stackoverflow.com/questions/367872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the difference between Debug and Release in Visual Studio? Possible duplicate Debug Visual Studio Release in .NET What is the difference between Debug and Release in Visual Studio? A: If you go through project compile options and compare them, you'd see what are the differences. Assuming the question is...
{ "language": "en", "url": "https://stackoverflow.com/questions/367884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "122" }
Q: Session level exception I am having an page. I need to capture the exception which is thrown due to time out.. Is there any exception message like System.Applicationexception A: You can use Application_Error event in Global.asax.cs: protected void Application_Error(object sender, EventArgs e) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Generated equals in Webservice Stub All the generated webservice-stubs from our backend have an equals-method similar to this one: private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof PropertyData)) return false; PropertyData other = (P...
{ "language": "en", "url": "https://stackoverflow.com/questions/367905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: OpenGL: inaccurate color? I'm trying to follow the directions from this page: http://www.opengl.org/resources/faq/technical/color.htm regarding rendering primitives with a unique color I've checked the number of bits for every color and the result was 8 for each. When calling: glColor3ui(0x80000000, 0, 0xFF000000);...
{ "language": "en", "url": "https://stackoverflow.com/questions/367907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Free DNS server for Windows XP/Vista/Win7? I'm currently developing a security solution that should work across domains and as such I need a small private dns server to add various entries to. I could alter the hosts file to achieve the same result but since the hosts file doesn't support wildcard chars I will have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: What is the state of a TCP socket after remote closed? Say I have accepted() a connection to my server (that runs on a Solaris) and the client has closed the connection. What is the state of the socket (in netstat categories) of the socket on the server side before I close() it on the server side? Is it BOUND? A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/367914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Use a dll from a c++ program. (borland c++ builder and in general) I'm trying to use a dll, namely libcurl, with my program, but, it's not linking. Libcurl comes with .h files that I can include (takes care of dllimport), but then I guess I must specify which dll to actually use when linking somehow... How do I do t...
{ "language": "en", "url": "https://stackoverflow.com/questions/367926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Windows Batch File - ENABLEDELAYEDEXPANSION query Having read an existing post on stackoverflow and done some reading around on the net. I thought it was time to post my question before I lost too much hair! I have the following code within a batch file which I double click to run, under Windows XP SP3: SETLOCAL ENA...
{ "language": "en", "url": "https://stackoverflow.com/questions/367934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java GUI Creating Components I hope it is correct term-wise to say that components in a GUI is like JButton, JPanel, JTextField, all that good stuff. I want to create a text field that takes in an integer. Then a submit button can be pressed and based on the integer that was inputted, create that many textfields in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: srand((unsigned)(time(NULL))); (rand())/(RAND_MAX/2) - 1 C# equivalent What is the c# equivalent of the following c++: srand((unsigned)(time(NULL))); weight=(double)(rand())/(RAND_MAX/2) - 1; A: The paramaterless constructor for Random uses "a time-dependent default seed value" so all you need is: Random rnd = new...
{ "language": "en", "url": "https://stackoverflow.com/questions/367947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Escaping out of the Find and Replace box in Visual Studio 2008 I'm in Visual Studio 2008, and I'm editing a CSS file. I use ctrl+f a lot to find stuff around the file. Once I find something, I'm used to using the Esc key get out of the find window and back into the editor. I'd swear this is how it works when I'm...
{ "language": "en", "url": "https://stackoverflow.com/questions/367956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Programmatically download a file from plumtree knowledge directory I am new to plumtree and I am trying to get to know the Plumtree object model. I am trying download a file from the plumtree knowledge directory programmatically. This is the code I am using: IRemoteSession session = RemoteSessionFactory.GetExplicit...
{ "language": "en", "url": "https://stackoverflow.com/questions/367961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Printing HUGE PDF batches in order Sorry if this is a little off-topic for regular stackoverflow questions, but we're tearing our hair out on this one. We've got a batch of about 3500 3-page PDFs to print (all ok so far) the problem we've got is that it's vital they print in a specific order (ascending by filename)...
{ "language": "en", "url": "https://stackoverflow.com/questions/367962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to generate a signed PDF w/o green checkmark I'm signing PDF's using iText. I'm including a graphic in the signature. This works, but the green checkmark (or yellow question mark) that shows when the document is verified interferes with the graphic I inserted, making the end result look ugly. It either shows up ...
{ "language": "en", "url": "https://stackoverflow.com/questions/367965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to intercept debugging information ( Debugview style ) in C#? For testing purposes I'm planning to put together a little app that will listen for a particular event coming from an application and interact with it at that point. Given that we're at a point in the testing process where changing the application co...
{ "language": "en", "url": "https://stackoverflow.com/questions/367966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: libtool adding extra 'U' to .so file names I have a project built with autotools, divided into two folders; the first one, lib, creates some libraries, and the second one, tools, links against them. The build fails because libtool renames the libraries as follows while relinking: mylib.1.0.0 -> mylib.1.0.0U After...
{ "language": "en", "url": "https://stackoverflow.com/questions/367969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to clear last line in the Windows command line? Is there a function, that clears last line in command prompt? I dont mean "cls" - it clears the whole sreen, I want to delete just the last line. e.g. I am searching for a file in a folder and its subfolders and I want to print to cmd current folder - but I want to...
{ "language": "en", "url": "https://stackoverflow.com/questions/367971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: MSSQLServer 2008 in virtual pc What are your experiences with running SQL server in a virtual pc? Currently we have an sql2008 instance running in a virtual machine. Both CPU's hit the roof the moment a query is executed. what are your experiences and what do you suggest in this matter? A: I've had some serious per...
{ "language": "en", "url": "https://stackoverflow.com/questions/367980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What C++ HTTP frameworks are available? What C++ HTTP frameworks are available that will help in adding HTTP/SOAP serving support to an application? A: You could also look at: http://pocoproject.org/ A: Well, gSOAP of course. :) http://www.cs.fsu.edu/~engelen/soap.html A: NEW! Answer to an old question: Now there...
{ "language": "en", "url": "https://stackoverflow.com/questions/367984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the processing overhead of length() in REXX? How does the processing overhead of the length() function in REXX change with the length of the string? Update: I'm using: * *uni-REXX (R) Version 297t *Open-REXX (TM) Copyright (C) iX Corporation 1989-2002. All rights reserved. A: It depends entirely on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/367986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to test a COM-exposed assembly from .NET? I have a .NET assembly which I have exposed to COM via a tlb file, and an installer which registers the tlb. I have manually checked that the installer works correctly and that COM clients can access the library. So far, so good... However, I am trying to put ...
{ "language": "en", "url": "https://stackoverflow.com/questions/368001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Network usage top/htop on Linux Is there a htop/top on Linux where I get to sort processes by network usage? A: ntop or nagios           A: iptraf is my favorite. It has a nice ncurses interface, and options for filtering, etc. A: jnettop is another candidate. edit: it only shows the streams, not the owner proc...
{ "language": "en", "url": "https://stackoverflow.com/questions/368002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "289" }
Q: How can I reorder an mbox file chronologically? I have a single spool mbox file that was created with evolution, containing a selection of emails that I wish to print. My problem is that the emails are not placed into the mbox file chronologically. I would like to know the best way to place order the files from firs...
{ "language": "en", "url": "https://stackoverflow.com/questions/368003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: C# Can I add values to a listbox with a backgroundwork thread? I want my background worker to add items to a list box, it appears to do so when debugging but the listbox doesn't show the values. I suspect this is something to do with adding items whilst inside the background worker thread, do I need to add these to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/368006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: WPF - How do i insert my proxy credentials in WebBrowser Control I'm using a webbrowser control in WPF to show a virtual earth map, but because I'm developing behind a proxy of my company, every time I try to see the map, I have to insert my credentials. I would like to insert them automatically in the c# code, ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/368010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C identifier limits How to call a name-mangled symbol from C? module.name:version void* function(TypeSig); // Type of the function I'd want to be able to use codepaths written in my language in C. The function calling convention is about the same. It's just that I must mangle in the version and the module path ins...
{ "language": "en", "url": "https://stackoverflow.com/questions/368011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Awake from sleep event on the iPhone? Is there any way to detect if the iPhone wakes up from sleep while you're app is running? Eg: your app is running, the user locks the screen (or the screen auto locks) and some time later the user unlocks the screen and up pops your app. Is there some way to get an event at that...
{ "language": "en", "url": "https://stackoverflow.com/questions/368014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to do multiline search and replace with a script? I'm trying to replace every multiline import inside a Python source file.. So, the source goes like from XXX import ( AAA, BBB, ) from YYY import ( CCC, DDD, EEE, ... ) ...other instructions... and I'd like to get something like from XXX import...
{ "language": "en", "url": "https://stackoverflow.com/questions/368018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: mysql range index I have very simple select like this: SELECT * FROM table WHERE column1 IN (5, 20, 30); on column1 is seted index, after explaining query is index used, all looks to be ok. but if there are more than three values in range, like this: SELECT * FROM table WHERE column1 IN (5, 20, 30, 40)...
{ "language": "en", "url": "https://stackoverflow.com/questions/368020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iPhone simulator and applicationWillTerminate() When my app is run in the iPhone simulator, the delegate method - (void)applicationWillTerminate:(UIApplication *)application is only called the first time I hit the iPhone simulator's home button. After the home button is pressed and the app is launched again, hittin...
{ "language": "en", "url": "https://stackoverflow.com/questions/368021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Which one is better: DMG or PackageMaker Here's my requirement: 1. I want my installable to have a custom license agreement 2. run another package as part of the installation 3. let the user have an option of running the app on start-up What should I use, create a dmg or use PackageMaker available with xcode? Are th...
{ "language": "en", "url": "https://stackoverflow.com/questions/368022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to write a console-application with windows on a terminal in Ruby? I want to write a simple chat-client in Ruby for the terminal. The Problem is, that I need two separate "windows", one for the chatlog and another for the input prompt. I dont have a clue how to do this. I watched (n)curses and some other ruby-li...
{ "language": "en", "url": "https://stackoverflow.com/questions/368032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Wicket: How to implement an IDataProvider/LoadableDetachableModel for indexed lists What's the best way to implement an IDataProvider and a LoadableDetachable in Wicket for an indexed list? Suppose I have a Customer who has a list of Adresses. class Customer { List<Adress> adresses; } Now I want to implement a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/368033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to insert Header and Footer in .vm file I have a .vm (Velocity) file which is run to generate a DOC file. I want to have a very simple header and footer in this resultant DOC file. How can I write code in .vm file for this. I do not want to include header and footer files as external files. I want simple code in...
{ "language": "en", "url": "https://stackoverflow.com/questions/368036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL Server 2005 - closing sleeping connections I seem to have an app on my Dev server that has lots of open connections (they should be there, but some bad data layer was used to open them, that forgot to close them). I just want them closed so I can keep other apps running on the server. How can I force all the con...
{ "language": "en", "url": "https://stackoverflow.com/questions/368039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to code a spinner for waiting processes in a Batch file? I would like to show the user with a spinner, that something is done in background but do not know how this works in a batchfile. Does anyone have a clue? A: If you don't mind the screen clearing...try this: @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION SET ...
{ "language": "en", "url": "https://stackoverflow.com/questions/368041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Add a field in ACCESS with a default value I'd like to insert a new field with a Default value using Visual C++ Code. I have wrote this: CADODatabase pDB; String strConnessione = _T("Provider=Microsoft.Jet.OLEDB.4.0;""Data Source="); strConnessione = strConnessione + "MioDatabase.mdb"; pDB.SetConnectionString(strCon...
{ "language": "en", "url": "https://stackoverflow.com/questions/368049", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Making a virtual package available via sys.modules Say I have a package "mylibrary". I want to make "mylibrary.config" available for import, either as a dynamically created module, or a module imported from an entirely different place that would then basically be "mounted" inside the "mylibrary" namespace. I.e., I d...
{ "language": "en", "url": "https://stackoverflow.com/questions/368057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Create provisioning profile in iphone application How can i build provisioning profile for deploying an iPhone application? A: Agree with above, but here is a the gist of it. * *Register with Apple as an iPhone developer. *Give them 100 bucks to get your entrance into the club that can deploy apps onto phones. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/368062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to implement undo/redo of files mapped in a treeview Can anyone give an idea of how should I implement undo/redo of cutting/copying/pasting of files (dirs, subdirs) mapped in a treeview in C#? It would be great to have some code samples. A: Consider implementing Command pattern (GoF): * *Put your actions log...
{ "language": "en", "url": "https://stackoverflow.com/questions/368073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: JQuery AJAX Return Link Not Working I have a problem in integrating PHP and JQuery: My main file is MyFile.html and the AJAX call file is ajax.php. The ajax.php function returns links to myFile.html as <a href Link.php?action=Function ></a> (i.e echo " <a href Link.php?action=Delete";) When I click the returned li...
{ "language": "en", "url": "https://stackoverflow.com/questions/368074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I embed a win32 DLL in a .NET assembly, and make calls into it using P/Invoke? I'm writing a C# wrapper for a third-party native library, which we have as a DLL. I would like to be able to distribute a single DLL for the new assembly. Is it possible for me to embed the win32 DLL in my .NET DLL, and still make ...
{ "language": "en", "url": "https://stackoverflow.com/questions/368080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: ClearCase time and query This config-spec show the files I need: element -dir * '{version(/main/LATEST) && !version(SLT-T)}' element -file * '{version(/main/LATEST) && !version(SLT)}' Now I need to see how the source looked at some point in the future, so I do this: time 01-Nov-2008 element -dir * '{version(/main/L...
{ "language": "en", "url": "https://stackoverflow.com/questions/368086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Hyper-V Shutdown fails - error 32768 I'm in the process of attempting to automate Hyper-V for our dev\test lab. I downloaded the PSHyperV pack, most of the scripts work however when I attempt to shutdown the machine it fails with the error code 32768. I also tried the script off Ben's blog. However this also failed...
{ "language": "en", "url": "https://stackoverflow.com/questions/368091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: System.currentTimeMillis() vs. new Date() vs. Calendar.getInstance().getTime() In Java, what are the performance and resource implications of using System.currentTimeMillis() vs. new Date() vs. Calendar.getInstance().getTime() As I understand it, System.currentTimeMillis() is the most efficient. However, in m...
{ "language": "en", "url": "https://stackoverflow.com/questions/368094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "260" }
Q: ASP.NET MVC & Ajax Control Toolkit One of the things I like about coding "old skool" (web forms) is the AJAX Control Toolkit. I saw on the Microsoft Storefront video 14, Rob Conery uses the TextboxWatermark control. When I downloaded the code though, I couldn't find any reference to the Watermark control or any othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/368098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Symbol SDK - Get Device Serial Number Has anyone done any development with the Symbol Device SDK? I want to get the Device Serial Number and write it to a value in the registry. Does the Symbol SDK get you the facility of getting the Device Serial Number? If so, do you know what the class is called as there are qu...
{ "language": "en", "url": "https://stackoverflow.com/questions/368101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }