text
string
meta
dict
Q: how to uppercase date and month first letter of ToLongDateString() result in es-mx Culture? currently i obtain the below result from the following C# line of code when in es-MX Culture Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-mx"); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Makefile problem with conditional used in define used in commands part of a rule I have a section of makefile that has this sort of structure: bob: ifdef DEBUG @echo running endif @echo chug chug chug ifdef DEBUG @echo done endif bobit: @echo "before" @make bob @echo "after" I'm simpli...
{ "language": "en", "url": "https://stackoverflow.com/questions/228567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: NoClassDefFoundError without a class name I'm not quite sure if this is specific to Sun Java Systems Application Server but there are occasions where I run into a NoClassDefFoundError where the class in question, the one not found, is not mentioned in the error. Does anyone know what conditions would lead to a NoC...
{ "language": "en", "url": "https://stackoverflow.com/questions/228572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: HTML/CSS designs for mundane text-heavy content I am tasked with updating a family of web sites that promote scientific conferences that cater to a niche scientific field. The sites are currently written with some modest CSS layout for the shared common page template structure, but the details of each page are a mi...
{ "language": "en", "url": "https://stackoverflow.com/questions/228574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How secure is this authentication model? I have a user account 'member center' that shows all of a customer's subscriptions and memberships that they have with my company. This is at https://secure.1.example/membercenter/. I have another site which is the actual member site. This is at http://www.2.example/. ( each ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I get a helper method in a utility class to use its callers logger in log4net? I have an executable that depending on the command line switch supplied looks something like: Program.cs - namespace DiskSpaceReporting { class Program { static void Main(string[] args) { if(args...
{ "language": "en", "url": "https://stackoverflow.com/questions/228578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hooking into Windows File Copy I want to write my own file copy program that will run when the user chooses 'Paste' / (Ctrl+V) in Windows Explorer. Some programs like CopyHandler and SuperCopier are doing this. But I don't know how. Please help. A: The project catchcopy used by Ultracopier and Supercopier, provide ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the best method for getting a database connection/object into a function in PHP? A couple of the options are: $connection = {my db connection/object}; function PassedIn($connection) { ... } function PassedByReference(&$connection) { ... } function UsingGlobal() { global $connection; ... } So, pas...
{ "language": "en", "url": "https://stackoverflow.com/questions/228590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: In ADO.Net Data Services how do I check if an entity is already in the context? I have an ADO.Net Data Service that I am using to do a data import. There are a number of entities that are linked to by most entities. To do that during import I create those entities first, save them and then use .SetLink(EntityImpor...
{ "language": "en", "url": "https://stackoverflow.com/questions/228595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Converting XML-RPC to JSON in JavaScript Can anyone recommend a lightweight JavaScript XML-RPC library? After researching this a while ago, I couldn't find anything I was comfortable with, so I kinda ended up writing my own. However, maybe that was stupid, as there must be something suitable out there!? My own pseud...
{ "language": "en", "url": "https://stackoverflow.com/questions/228598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can you propose a more elegant way to 'tokenize' c# code for html formatting? (This question about refactoring F# code got me one down vote, but also some interesting and useful answers. And 62 F# questions out of the 32,000+ on SO seems pitiful, so I'm going to take the risk of more disapproval!) I was trying to po...
{ "language": "en", "url": "https://stackoverflow.com/questions/228605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: JSP Custom Tag Library vs JSP2 Tag Files Can anybody explain the idea behind JSP custom tag libraries and the JSP 2 tag files? Are they just different ways to do the same thing? How do they compare? What are their pros and cons, and which is better? A: I <3 tag files, but that lead developer of JSTL is smoking crac...
{ "language": "en", "url": "https://stackoverflow.com/questions/228607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I write a Java function that returns a typed instance of 'this' and works when extended? This is a bit of a lazyweb question but you get the rep so :-) I have a Java class that returns instances of itself to allow chaining (e.g. ClassObject.doStuff().doStuff()) For instance: public class Chainer { public...
{ "language": "en", "url": "https://stackoverflow.com/questions/228614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I clear the console in BOTH Windows and Linux using C++ I need a cross platform solution for clearing the console in both Linux and Windows written in C++. Are there any functions in doing this? Also make note that I don't want the end-user programmer to have to change any code in my program to get it to clea...
{ "language": "en", "url": "https://stackoverflow.com/questions/228617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Garbage Collection in C++ -- why? I keep hearing people complaining that C++ doesn't have garbage collection. I also hear that the C++ Standards Committee is looking at adding it to the language. I'm afraid I just don't see the point to it... using RAII with smart pointers eliminates the need for it, right? My only ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Summing up all nodes This may be a simple fix - but I'm trying to sum together all the nodes (Size property from the Node class) on the binary search tree. Below in my BST class I have the following so far, but it returns 0: private long sum(Node<T> thisNode) { if (thisNode.Left == null && thisNode.R...
{ "language": "en", "url": "https://stackoverflow.com/questions/228623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python debugger: Stepping into a function that you have called interactively Python is quite cool, but unfortunately, its debugger is not as good as perl -d. One thing that I do very commonly when experimenting with code is to call a function from within the debugger, and step into that function, like so: # NOTE T...
{ "language": "en", "url": "https://stackoverflow.com/questions/228642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: How do you list the currently available objects in the current scope in ruby? I'm new to ruby and I'm playing around with the IRB. I found that I can list methods of an object using the ".methods" method, and that self.methods sort of give me what I want (similar to Python's dir(builtins)?), but how can I find the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/228648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: A "regex for words" (semantic replacement) - any example syntax and libraries? I'm looking for syntatic examples or common techniques for doing regular expression style transformations on words instead of characters, given a procedural language. For example, to trace copying, one would want to create a document wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/228658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the simplest way to continuously sample from the line-in using C# I want to continuously sample from my PC's audio line in using C# (then process that data). What is the best way to do the sampling? A: You can do some (basic) audio capture using the open source NAudio .NET Audio Library. Have a look at the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Embedding Vimeo videos in Flex/flash Is it possible to embed a Vimeo video in Flex? When I try to embed this link in a <mx:SWFLoader/> , it doesn't come up as anything. A: The best I could do was this. Using the Vimeo Api to show img and linking img to video. <?xml version="1.0" encoding="utf-8"?> <mx:Application x...
{ "language": "en", "url": "https://stackoverflow.com/questions/228669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP Access Control System I am part of a team creating a web application using PHP and MySQL. The application will have multiple users with different roles. The application will also be used in a geographically distributed manner. Accordingly we need to create an access control system that operates at the following ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to select and highlight a window in another application? I would like to send some keystrokes from a C++ program into another window. For that reason I would like to have the user select the target window similar to how it is done in the Spy++ utility that comes with Visual Studio (drag a crosshair cursor over t...
{ "language": "en", "url": "https://stackoverflow.com/questions/228675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Loading More than 1 CSV File at a Time How does one import CSV files via Excel VBA in a set, in groups or in multiple individual files, rather than one at a time? A: I am a bit puzzled in that most versions of Excel will open .csv files with out any problems. strPath = "C:\Docs\" strFile = Dir(strPath & "*.csv") D...
{ "language": "en", "url": "https://stackoverflow.com/questions/228680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to declare a structure in a header that is to be used by multiple files in c? If I have a source.c file with a struct: struct a { int i; struct b { int j; } }; How can this struct be used in another file (i.e. func.c)? Should I create a new header file, declare the struct there and include ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "138" }
Q: How to get hex string from signed integer Say I have the classic 4-byte signed integer, and I want something like print hex(-1) to give me something like 0xffffffff In reality, the above gives me -0x1. I'm dawdling about in some lower level language, and python commandline is quick n easy. So.. is there a way to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Weird many to many and one to many relationship I know I'm gonna get down votes, but I have to make sure if this is logical or not. I have three tables A, B, C. B is a table used to make a many-many relationship between A and C. But the thing is that A and C are also related directly in a 1-many relationship A custo...
{ "language": "en", "url": "https://stackoverflow.com/questions/228705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How could I insert a bitmap or other image objects in a CListCtrl in MFC? I want to list the thumbnails of a set of photos in a listctrl. But the only way to achieve this is to use the setImageList method to bind a image list to the CListCtrl object and insert items like this: InsertItem (int nItem, LPCTSTR lpszitem...
{ "language": "en", "url": "https://stackoverflow.com/questions/228711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: which are the best best tutorials, books, software to start and manage a .net Agile Project with No Experience which are the best tutorials, books, software and practices to start and manage a new .net based Development Project in an Agile way with no experience with it. which methodology is easier to adopt XP|Scru...
{ "language": "en", "url": "https://stackoverflow.com/questions/228721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Silverlight Logging framework and/or best practices Now that Silverlight 2 has finally shipped. I'm wondering if anyone has put together any logging frameworks for it, maybe something like enterprise library logging or log4net? I'm interesting in something that can perform tracing client side and also log messages t...
{ "language": "en", "url": "https://stackoverflow.com/questions/228723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Crystal Report in VB.net Im creating a report using crystal report in vb.net. The report contained a crosstab which I have 3 data: 1. Dealer - row field 2. Month - column 3. Quantity Sales - summarize field How can I arrange this by ascending order based on the Quantity Sales - summarize field? thanks A: Depending...
{ "language": "en", "url": "https://stackoverflow.com/questions/228724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dynamically Set the Height of Two floated DIVS The coding is done using VS2008 There are two divs in my page namely "dvLeftContent" and "dvRightContent". I cannot statically set the height of the pages since "dvRightContent" have variable heights on various pages (Master Pages are used here) Is there a client side f...
{ "language": "en", "url": "https://stackoverflow.com/questions/228726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Installing PHP, Apache 2.2.10 on Windows Vista I am trying to get PHP working on my vista home machine but I am getting weird problems. First I had file permission problems for which I disabled Vista's UAC. Now I can't get the PHP interpreter working. I have made all the necessary changes following some tutorial but...
{ "language": "en", "url": "https://stackoverflow.com/questions/228728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I iterate through a string in Python? As an example, lets say I wanted to list the frequency of each letter of the alphabet in a string. What would be the easiest way to do it? This is an example of what I'm thinking of... the question is how to make allTheLetters equal to said letters without something like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: CUDA bindings for .net? I know that there are a lot of CUDA language bindings, such as PyCUDA, but are there any good bindings for .Net? The only one I've seen is this one, but I'd like to know if there are any others. A: Here's another library: http://sourceforge.net/projects/brahma-fx/ Edit: I've been looking at ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: How to package tagfiles in a jar? How can I package tagfiles in a jar so it can be reused across multiple projects?
{ "language": "en", "url": "https://stackoverflow.com/questions/228755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Application_Start works fine on workstation, is not called when deployed I have an application that works great on my development workstation but fails when the application is deployed to the live environment. It seems that Application_Start is not being called in the live environment. A: I was able to fix it by r...
{ "language": "en", "url": "https://stackoverflow.com/questions/228770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: .NET Web Service & BackgroundWorker threads I'm trying to do some async stuff in a webservice method. Let say I have the following API call: http://www.example.com/api.asmx and the method is called GetProducts(). I this GetProducts methods, I do some stuff (eg. get data from database) then just before i return the r...
{ "language": "en", "url": "https://stackoverflow.com/questions/228775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: CONFUSED -- c++ 3rd party library, new to c++ (mingw32, windows xp) Hello, I am attempting to migrate from Java to c++. I am confused and frustrated about finding, installing, and compiling non-standard c++ libraries. in Java it's so convenient they stuffed every functionality and documentation ever needed in java's...
{ "language": "en", "url": "https://stackoverflow.com/questions/228781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Managing website 'event' database How should I manage tables that refer to site 'events'. i.e. certain activities a user has done on a website that I use for tracking. I want to be able to do all kinds of datamining and correlation between different activities of users and what they have done. Today alone I added 10...
{ "language": "en", "url": "https://stackoverflow.com/questions/228782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What are the rules about using an underscore in a C++ identifier? It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background, you'll probably use m_foo. I've also seen myFoo oc...
{ "language": "en", "url": "https://stackoverflow.com/questions/228783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1033" }
Q: double in .net If I have the following code (this was written in .NET) double i = 0.1 + 0.1 + 0.1; Why doesn't i equal 0.3? Any ideas? A: You need to read up on floating point numbers. Many decimal numbers don't have an exact representation in binary so they won't be an exact match. That's why in comparisons, you...
{ "language": "en", "url": "https://stackoverflow.com/questions/228795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Algorithm: Odometer / Brute force I want to write a odometer-like method in a C#-style-language, but not just using 0-9 for characters, but any set of characters. It will act like a brute-force application, more or less. If I pass in a char-array of characters from 0 to J, and set length to 5, I want results like 00...
{ "language": "en", "url": "https://stackoverflow.com/questions/228796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to view output .mp files from Functional MetaPost I'm interested in using Functional MetaPost on Mac OS X: http://cryp.to/funcmp/ I'm looking for a tutorial like: http://haskell.org/haskellwiki/Haskell_in_5_steps but for a trivial FuncMP example, i.e. using GHC, I can compile something simple such as: import FMP...
{ "language": "en", "url": "https://stackoverflow.com/questions/228811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Creating stored procedure on the fly. What are the risks/problems? I am thinking about creating stored procedures on the fly. ie running CREATE PROCEDURE... when the (web) application is running. What are the risks or problems that it can cause? * *I know that the database account needs to have the extra privil...
{ "language": "en", "url": "https://stackoverflow.com/questions/228812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: install ASP.NET + SQL Express in a script I need a little help on this subject. I have a Web application written in ASP.NET plus I have the .bak file of the SQL Express database, my question is: How can I install this in a simple click and go way in the client? how can I write a script that will create a new databas...
{ "language": "en", "url": "https://stackoverflow.com/questions/228814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Handling uncaught exceptions in C# console application I'm currently writing a server that hosts several modules. The server runs each module in a separate AppDomain. What I want to achieve is exception isolation, i.e. when one module throws an exception I don't want whole process to terminate, just this specific Ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/228817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Shutdown IPhone when an application hangs My application hangs. Pressing the home button doesn't return to the springboard anymore. Additionally pressing the power button for 10 seconds doesn't turn the iphone off at all. Is there any way to force a shutdown? A: To force shutdown the iPhone 3G, just press down the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Best practice javascript and multilanguage what is the best practice for multilanguage website using DOM Manipulating with javascript? I build some dynamic parts of the website using javascript. My first thought was using an array with the text strings and the language code as index. Is this a good idea? A: When I'...
{ "language": "en", "url": "https://stackoverflow.com/questions/228835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: Best way to share iphone and mac code between projects I realise that the view/controller stuff will be different between Mac and IPhone apps but the model code may well be similar/the same. So whats the best way to organise a project(s) so that the model code is/can be shared? * *Copy/paste - just duplicate it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to create Raw socket in Android? Has anybody tried creating RawSocket in Android and have succeeded ? A: I havent actually created any raw sockets in Android but the java.net and javax.net packages shold do what you need, java.net package overview javax.net package overview A: So far as I'm aware access to raw...
{ "language": "en", "url": "https://stackoverflow.com/questions/228851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: how do you run a c program in cmd I've opened the cmd in windows and I've created a directory by using md command. After that I've opened a text file via notepad <name>, wrote my program and gave .c extention while saving the file. How can I compile and run my C program to get an output? I've also other programs in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: JSP-tags with static output I am considering creating some JSP-tags that will always give the same output. For example: <foo:bar>baz</foo:bar> Will always output: <div class="bar">baz</div> Is there any way to get a JSP-tag to behave just like static output in the generated servlet? For example: out.write("<div cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/228863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I sort a DataSet before doing a DataBind? I have data coming from the database in the form of a DataSet. I then set it as the DataSource of a grid control before doing a DataBind(). I want to sort the DataSet/DataTable on one column. The column is to complex to sort in the database but I was hoping I could s...
{ "language": "en", "url": "https://stackoverflow.com/questions/228875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I specify that library X must be linked statically? I have a piece of software which is linked against several libraries. They all exists in a dynamic (.so) and a static (.a) version. By default, when using g++ it chooses the dynamic version of the libraries and that's fine with me. However, one of them abs...
{ "language": "en", "url": "https://stackoverflow.com/questions/228881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What hardware (config) and software (os version/app version) is recommended for developing for ASP.NET/ColdFusion and MS SQL Server? We are a small company and would like to know the best possible (and affordable) hardware and software configuration we ought to be using for our development environment. At this momen...
{ "language": "en", "url": "https://stackoverflow.com/questions/228883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is list::size() really O(n)? Recently, I noticed some people mentioning that std::list::size() has a linear complexity. According to some sources, this is in fact implementation dependent as the standard doesn't say what the complexity has to be. The comment in this blog entry says: Actually, it depends on which ST...
{ "language": "en", "url": "https://stackoverflow.com/questions/228908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: What to cache when 99.9% of your data changes frequently? Okay I know I asked about this before, and the answer was basically cache data that doesn't change often. Well what does one do when at least 99.9% of the data changes? In my project the only tables that doesn't get updated or won't get updated frequently wou...
{ "language": "en", "url": "https://stackoverflow.com/questions/228909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: SQLite parameter substitution problem Using SQLite3 with Python 2.5, I'm trying to iterate through a list and pull the weight of an item from the database based on the item's name. I tried using the "?" parameter substitution suggested to prevent SQL injections but it doesn't work. For example, when I use: for item ...
{ "language": "en", "url": "https://stackoverflow.com/questions/228912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Finding browser local time in ASP.NET How do you find out the local time of the user browsing your website in ASP.NET? A: Create a hidden input control to get the value back at the server on the next page postback. It will need to be populated it in the onload event for the page with the value of a new Date objec...
{ "language": "en", "url": "https://stackoverflow.com/questions/228926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: HttpWebRequest to SSL fails I'm using this code, to make a request to a given URL: private static string GetWebRequestContent(string url) { string sid = String.Empty; HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url); req.KeepAlive = false; using (HttpWebResponse res = (HttpWebResponse)req.Ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/228931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a way reformat code in FlashDevelop? Is there a way to reformat code, i.e. force correct indentation in FlashDevelop as you can do with CTRL-SHIFT-F in Eclipse? A: Since FlashDevelop 4 there is a reformater included: press Ctrl+Shift+2 A: This plugin for FlashDevelop worked for me: http://www.flashdevelop...
{ "language": "en", "url": "https://stackoverflow.com/questions/228934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Please can someone give me a simple example of how to use System.Monitor in C#? I find System.Monitor very confusing, although I understand threading, locks, deadlocks, race conditions, dining philosophers and all that jazz. Normally I use a ManualResetEvent() to do inter-thread co-ordination, but I know that that'...
{ "language": "en", "url": "https://stackoverflow.com/questions/228945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Invalid postback or callback argument. Event validation is enabled using '' I am getting the following error when I post back a page from the client-side. I have JavaScript code that modifies an asp:ListBox on the client side. How do we fix this? Error details below: Server Error in '/XXX' Application. -----------...
{ "language": "en", "url": "https://stackoverflow.com/questions/228969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "251" }
Q: How can I reduce duplication in constants? I have this Perl script with many defined constants of configuration files. For example: use constant { LOG_DIR => "/var/log/", LOG_FILENAME => "/var/log/file1.log", LOG4PERL_CONF_FILE => "/etc/app1/log4pe...
{ "language": "en", "url": "https://stackoverflow.com/questions/228978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Requiring gem for acts_as_taggable in rails I'm trying to get tags working in my rails application and want to use acts_as_taggable. Firstly I followed the instructions I found in Rails Recipies (a free sample bit online) that used the acts_as_taggable plugin. However, I then found this site which seems to have a ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/228985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does byteArray have a length of 22 instead of 20? We try to convert from string to Byte[] using the following Java code: String source = "0123456789"; byte[] byteArray = source.getBytes("UTF-16"); We get a byte array of length 22 bytes, we are not sure where this padding comes from. How do I get an array of len...
{ "language": "en", "url": "https://stackoverflow.com/questions/228987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Configurable processor implemented on FPGA board For a university mid-term project I have to design a configurable processor, to write the code in VHDL and then synthesize it on a Spartan 3E FPGA board from Digilent. I'm a beginner so could you point me to some information about configurable processors, to some idea...
{ "language": "en", "url": "https://stackoverflow.com/questions/228989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is an SSH tunnel through Citrix Client possible? I know it is not strictly a programmer question, on the other hand, I would really like to be able to do a simple svn up on the production servers, which would save us a lot of hassle. Or production servers are within a corporate network, and access is only allowed th...
{ "language": "en", "url": "https://stackoverflow.com/questions/228992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: ASP.MVC Beta Install Problems I've just downloaded the ASP.MVC MSI package, but the installation fails with the "There is a problem with this Windows Installer Package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor." message. I see that other people t...
{ "language": "en", "url": "https://stackoverflow.com/questions/228997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to close the opened file? I opened a csv file and copy the contents. I activated an excel file and have the copied contents from csv file pasted into excel file. Now, how do I close the csv file programmatically? A: This should do it .. Workbooks("MYCSV_File.CSV").Close SaveChanges:=False
{ "language": "en", "url": "https://stackoverflow.com/questions/229004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Stop Mod_Rewrite execution on matching RewriteCond I am running the free version of Helicon ISAPI Rewrite on IIS and have several sites running through the same set of rewrite rules. Up 'til now this has been fine as all the rules have applied to all the sites. I have recently added a new site which I don't want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/229007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I get a call stack listing in Perl? Is there a way I can access (for printout) a list of sub + module to arbitrary depth of sub-calls preceding a current position in a Perl script? I need to make changes to some Perl modules (.pm's). The workflow is initiated from a web-page thru a cgi-script, passing input...
{ "language": "en", "url": "https://stackoverflow.com/questions/229009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: jQuery resize not working at FireFox, Chrome and Safari $("#dvMyDIV").bind("resize", function(){ alert("Resized"); }); or $("#dvMyDIV").resize(function(){ alert("Resized"); }); The questions * *Why is this not working at FireFox, Chrome and Safari? *Can this be considered a jQuery bug since the resize ...
{ "language": "en", "url": "https://stackoverflow.com/questions/229010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Aynchronous web server calls in Silverlight and maximum HTTP connections I've read that Silverlight 2.0 imposes by design an asynchronous model when communicating with the web server. I haven't had a chance to experiment with Silverlight, but I assume that it uses a thread-pool to manage threads like in the .NET Fra...
{ "language": "en", "url": "https://stackoverflow.com/questions/229011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Getting absolute path of a file How can I convert a relative path to an absolute path in C on Unix? Is there a convenient system function for this? On Windows there is a GetFullPathName function that does the job, but I didn't find something similar on Unix... A: Try realpath() in stdlib.h char filename[] = "../../...
{ "language": "en", "url": "https://stackoverflow.com/questions/229012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Encoding conversion in java Is there any free java library which I can use to convert string in one encoding to other encoding, something like iconv? I'm using Java version 1.3. A: You don't need a library beyond the standard one - just use Charset. (You can just use the String constructors and getBytes methods, bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/229015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Display the OSX Command symbol key in a JLabel We want to show a hint for a JList that the user can select multiple items with the platform dependent key for multiselect. However I have not found any way to show the OS X COMMAND symbol in a JLabel, which means the symbol that's printed on the apple keyboard on the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/229021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I stress test a web form file upload? I need to test a web form that takes a file upload. The filesize in each upload will be about 10 MB. I want to test if the server can handle over 100 simultaneous uploads, and still remain responsive for the rest of the site. Repeated form submissions from our office will...
{ "language": "en", "url": "https://stackoverflow.com/questions/229031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: why shrink a sqlserver 2005 database? What are the advantages and disadvantages of shrinking a database? Are there any performance implications? A: * *Advantage: less disk space used *Disadvantage: more likely to run out of space That's basically it - a shrunk DB with no free space will need to be 'grown' in or...
{ "language": "en", "url": "https://stackoverflow.com/questions/229052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Interpret \n within irb or script/console When using something like object.methods.sort.to_yaml I'd like to have irb interpret the \n characters rather than print them. I currently get the following output: --- \n- "&"\n- "*"\n- +\n- "-"\n- "<<"\n- <=>\n ... What I'd like is something similar to this: --- - "&" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/229058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to convey bad news to clients? How to convey a bad news to the client? A: With an emphasis on the solutions you propose to address the bad news. We will not be able to have a moon controlling functionality in our system (due to ...) but we can and will deliver the weather changing module which is almos...
{ "language": "en", "url": "https://stackoverflow.com/questions/229067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Dead code detection in legacy C/C++ project How would you go about dead code detection in C/C++ code? I have a pretty large code base to work with and at least 10-15% is dead code. Is there any Unix based tool to identify this areas? Some pieces of code still use a lot of preprocessor, can automated process handle t...
{ "language": "en", "url": "https://stackoverflow.com/questions/229069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: SQL Server reporting services how to show all values of a particular field in a text box ??? ie. for eg. when u run the SP, u'll be getting 3 rows. and i want to show the (eg.empname) in a textbox each value separated by a comma. (ram, john, sita). A: I had this problem the other day. If you are using SQL 2005 yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/229071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I convert a string of the form %programfiles%\directory\tool.exe to a useable Filename in C#/.net? I have an application which takes a string value of the form %programfiles%\directory\tool.exe from its application config file. I want to make this into a useable filename so that I can call System.Diagnostics...
{ "language": "en", "url": "https://stackoverflow.com/questions/229073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to use VisualSVN with a solution shared between VS 2005 and VS 2008? After looking at other questions related to sharing solutions between VS 2005 and VS 2008 it seems that the way to go is to have two solution files (one for VS 2005 and one for VS 2008). However, if the solution is under source control (Visua...
{ "language": "en", "url": "https://stackoverflow.com/questions/229076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Regex error: 'Warning: ereg() [function.ereg]: REG_ERANGE' in PHP The code below gives me this mysterious error, and i cannot fathom it. I am new to regular expressions and so am consequently stumped. The regular expression should be validating any international phone number. Any help would be much appreciated. func...
{ "language": "en", "url": "https://stackoverflow.com/questions/229078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Class methods as event handlers in JavaScript? Is there a best-practice or common way in JavaScript to have class members as event handlers? Consider the following simple example: <head> <script language="javascript" type="text/javascript"> ClickCounter = function(buttonId) { this._clickCoun...
{ "language": "en", "url": "https://stackoverflow.com/questions/229080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Apache MOD_REWRITE Domain Level Cookie I need to deal with Affiliate Tracking on our website. In our .htaccess we have: RewriteCond %{QUERY_STRING} affiliate=(.*) RewriteRule ^(.*)$ $1? [NC,R,L,co=AFFID:%1:%{HTTP:Host}:7200:/] Which creates a COOKIE called AFFID with the value of the URL Parameter affiliate. But t...
{ "language": "en", "url": "https://stackoverflow.com/questions/229100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java implementations of the Prototype Pattern What implementations of the Prototype Pattern exist on the Java platform? A prototype pattern is a creational design pattern used in software development when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects....
{ "language": "en", "url": "https://stackoverflow.com/questions/229112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: XamlParseException: Attribute in custom control missing, but it's defined! I sometimes get the following exception for a custom control of mine: XamlParseException occurred Unknown attribute Points in element SectionClickableArea [Line: 10 Position 16] The stack trace: {System.Windows.Markup.XamlParseException: Unkn...
{ "language": "en", "url": "https://stackoverflow.com/questions/229117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: java: what are the best techniques for communicating with a batch server? I've a WEB application (with pure Java servlet) that have some heavy computational work, with database access, that can be done in asynchronous mode. I'm planning to use a dedicated server to execute such batch jobs and I'm wondering which too...
{ "language": "en", "url": "https://stackoverflow.com/questions/229131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: url rewrite in IIS This question is related to another question which I asked yesterday! List all links in web site I think renaming all the .html files to .asp and changing the links is not good for SEP purposes. Some one told me that isapi plug-in can be used to redirect(301) all .html files to .asp files. Can a...
{ "language": "en", "url": "https://stackoverflow.com/questions/229137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the alternatives for meld (graphical diff tool) on OSX I mostly develop on Linux and meld is indispensable for me. However, when I'm on the road I use a MacBook (leopard) and I want to use the same set of tools as on my main development box, meld being one of them. Although you shoud be able to install meld...
{ "language": "en", "url": "https://stackoverflow.com/questions/229142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: Comparing hibernate-mapped dates? How can i map a date from a java object to a database with Hibernate? I try different approaches, but i am not happy with them. Why? Let me explain my issue. I have the following class [1] including the main method i invoke and with the following mapping [2]. The issue about this ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/229143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: CSS "valign" Positioning <div> <h1>Title</h1> <table> ... </table> </div> Now, the <h1> has a margin: 0; so it is at the top of the div. The height of the div is 300px. However I'd like the table to be placed at the bottom of the div, eg. valign="bottom" but for the whole table. A: Here is what Remy Sharp suggest...
{ "language": "en", "url": "https://stackoverflow.com/questions/229153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: app.config configSections custom settings can not find schema information I am just learning about app.config in respect of creating custom sections. I have that part working, it compiles and gets the information out as required but I get warnings about it could not find the schema information. I have done a bit of...
{ "language": "en", "url": "https://stackoverflow.com/questions/229155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: What is Perl's equivalent to PHP's print_r()? I find print_r in PHP extremely useful, but wonder if there is anything remotely equivalent in Perl? A: As usually with Perl, you might prefer alternative solutions to the venerable Data::Dumper: * *Data::Dump::Streamer has a terser output than Data::Dumper, and can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/229168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: When does Hibernate read from second-level cache and when from DB? As far as I know Hibernate let's you configure entities and collections to be stored in a second-level cache. When does Hibernate try to read these cached entities from the second-level cache and when does it hit the DB? Does Hibernate only read fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/229173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NULL in MySQL (Performance & Storage) What exactly does null do performance and storage (space) wise in MySQL? For example: TINYINT: 1 Byte TINYINT w/NULL 1 byte + somehow stores NULL? A: I would agree with Bill Karwin, although I would add these MySQL tips. Number 11 addresses this specifically: First of all, as...
{ "language": "en", "url": "https://stackoverflow.com/questions/229179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "88" }