text
stringlengths
8
267k
meta
dict
Q: NT Kernel Programming I would like to know where to get started, or how possible it is to hook into, or patch the windows kernel(XP and up). I am specifically interested in software like McAfee Entercept, or certain antivirus scanners that patch the kernel. I would like to know how feasable it is for a startup to cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/177804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does .Net do clever connection management like PHP? During an ASP.NET page load I'm opening and closing multiple System.Data.SqlClient.SqlConnections inside multiple controls contained in the page. I thought it would be a good idea instead to create a "pool" of connections and when opening a connection check to see ...
{ "language": "en", "url": "https://stackoverflow.com/questions/177814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: POST multiple parameters I am changing a GET to a POST. Currently I have .jsp?id=a,b,c,d. When changing this to a post I am still sitting the id parameter a,b,c,d . This is not working for me. Can I submit a comma separated list to a post parameter? A: Set to have your parameter deliver multiple values by naming it...
{ "language": "en", "url": "https://stackoverflow.com/questions/177815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Cheap / free "Look and Feel" frameworks for web applications Usually I'm fortunate enough to work with really good designers. They take care of the look and feel for all of the web applications / sites I build. In the past when I've done cheap or free work for people for projects I'm interested in, I've used a templ...
{ "language": "en", "url": "https://stackoverflow.com/questions/177818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: When developing a website with visual studio, how do I improve the build time? I have a lot of classes in the App_Code directory could this be a problem? Would it build faster if it was in a separate library? Any other tips? A: There's a decent article here. Items listed there are: * *Do not disable batch compila...
{ "language": "en", "url": "https://stackoverflow.com/questions/177826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get random data using Generics One of our unit tests is to populate properties within our business objects with random data. These properties are of different intrinsic types and therefore we would like to use the power of generics to return data of the type you pass in. Something along the lines of: public static T...
{ "language": "en", "url": "https://stackoverflow.com/questions/177835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: A doubt with the ICloneable interface in petshop 4.0? In the 'DBUtility' project of Petshop 4.0,the abstract class SqlHelper has a method 'GetCachedParameters': public static SqlParameter[] GetCachedParameters(string cacheKey) { SqlParameter[] cachedParms = (SqlParameter[])parmCache[cacheKey]; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/177836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I trap Ctrl+C (SIGINT) in a C# console app? I would like to be able to trap Ctrl+C in a C# console application so that I can carry out some cleanups before exiting. What is the best way of doing this? A: This question is very similar to: Capture console exit C# Here is how I solved this problem, and dealt w...
{ "language": "en", "url": "https://stackoverflow.com/questions/177856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "273" }
Q: Questions about exporting and importing flatfiles (txt, csv) in SQL Server 2005 * *What's the best delimiter to use when exporting data? *What's the best way to work with NULL data if you have an INT field in the table? A: I'm not sure what the asker (nice name, :JPnoui38f) is trying to do. Sql Server manageme...
{ "language": "en", "url": "https://stackoverflow.com/questions/177860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Firefox cuts files, whose name contains spaces, in a Struts application I am using the next class (simplified for the sake of understandability) to download images in a struts web application. It is working fine in every browser but firefox, which cuts names containing spaces. That it is to say: file with spaces.pd...
{ "language": "en", "url": "https://stackoverflow.com/questions/177863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How do I copy the data of an element with jQuery? I need to copy data values from one element to another, but jQuery's clone() method doesn't clone the data. And I can't iterate over the data either: element.data().each because data() is a function and not a jQuery object. It seems I have to keep a separate list of...
{ "language": "en", "url": "https://stackoverflow.com/questions/177867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Counting items of each priority level in an IBM MQ Series Queue I have an IBM WebSphere MQ queue (running on Windows) containing many items of varying priority. I currently get a total depth count using mqQueue.CurrentDepth but I'd like to get a count of the number of items of each priority level within the queue. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/177874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I include a servlet in a jsp page? is it possible to include a servlet in a jsp page? if so how? A: You can't include it (via one of the JSP directives), but you can chain to it. There's a great example over at JGuru. See this article. A: You can also use the Jakarta IO Tag Library to include the content...
{ "language": "en", "url": "https://stackoverflow.com/questions/177883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Looking for something similar to offsetof() for non-POD types I'm looking for a way to obtain offsets of data members of a C++ class which is of non-POD nature. Here's why: I'd like to store data in HDF5 format, which seems most suited for my kind of material (numerical simulation output), but it is perhaps a rathe...
{ "language": "en", "url": "https://stackoverflow.com/questions/177885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What does WISC (stack) mean? LAMP is a well-known acronym for the software/technology bundle/stack representing Linux, Apache, MySQL, PHP. There are a few passing references on the Web that use the acronym WISC to speak of the other (supposedly Microsoft-centric) software/technology bundle/stack in contrast to LAMP....
{ "language": "en", "url": "https://stackoverflow.com/questions/177901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "115" }
Q: How to avoid an anemic domain layer and still have rich validation and business rules If you have a domain object, and you want to do something useful and central to that domain object's responsibility like ensure it is valid, you sometimes need to access the state of related objects in order to perform this validat...
{ "language": "en", "url": "https://stackoverflow.com/questions/177905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Detailed information from QObject::connect Is there a way to get a detailed failure information from QObjet::connect in case of its failure? Returned boolean value doesn't give any information about reason of failure. I wish exception were so widely used in C++ as they are in Java. A: In addition to the other answe...
{ "language": "en", "url": "https://stackoverflow.com/questions/177906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Accessing python egg's own metadata I've produced a python egg using setuptools and would like to access it's metadata at runtime. I currently got working this: import pkg_resources dist = pkg_resources.get_distribution("my_project") print(dist.version) but this would probably work incorrectly if I had multiple ver...
{ "language": "en", "url": "https://stackoverflow.com/questions/177910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to set focus in WPF page reload? I've got a WPF browser-like application with a few pages. When I switch between pages, I'd like to set the keyboard focus. When a page is loaded the first time, this works by calling Control.Focus() in the constructor. But when I switch between pages this does not work anymore - ...
{ "language": "en", "url": "https://stackoverflow.com/questions/177911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is a good design for a query "layer" for Java JPA In JPA the Entities are nice annotated Plain Old Java Objects. But I have not found a good way to interact with them and the database. In my current app, my basic design is always to have a sequence based id as primary key so I usually have to look up entities b...
{ "language": "en", "url": "https://stackoverflow.com/questions/177927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Users not showing up in Sharepoint Audiences We are running MOSS 2007 with profiles coming from our active directory. One feature we use is "Audiences" which get compiled based on specific AD groups. We have problems with very few of the accounts where they do not get included in the audience. We have for example AD...
{ "language": "en", "url": "https://stackoverflow.com/questions/177929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to Implement Ocean Surface Effect Using OpenGL ES 1.1? I'm working on an iPhone game that takes place on the ocean surface. Can someone recommend some sample code or tutorials for implementing waves or ripples in OpenGL? As I write this, iPhone only supports OpenGL ES 1.1, so there is no support for shaders or ...
{ "language": "en", "url": "https://stackoverflow.com/questions/177935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to define multiple elements in XML Schema with the same name and different attribute value allowed? I would like to create XML Schema for this chunk of xml, I would like to restrict the values of "name" attribute, so that in output document on and only one instance of day is allowed for each week day: <a> <day...
{ "language": "en", "url": "https://stackoverflow.com/questions/177945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Webdav windows server 2008 not allowing doc files to save I have setup web dav on windows server 2008. It seems to work fine but will not allow me to save a word document to the dir but it will allow a text file to be saved. Any ideas? Thanks, Alex A: Found answer at: http://learn.iis.net/page.aspx/350/installing-a...
{ "language": "en", "url": "https://stackoverflow.com/questions/177953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the best way to convert an int or null to boolean value in an SQL query? What is the best way to convert an int or null to boolean value in an SQL query, such that: * *Any non-null value is TRUE in the results *Any null value is FALSE in the results A: To my knowledge (correct me if I'm wrong), there i...
{ "language": "en", "url": "https://stackoverflow.com/questions/177956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Compiling in c++ with mysql, pthreads and gtk Have someone ever done this before??? I am trying to use MinGW to compile a program using the MySQL libraries. I keep getting the message that the function 'rint' is redefined. Ok it's true that the function is in both files config-win.h, from MySQL and math.h from the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/177960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET 2.0 Membership database? I have an application database and an aspnetdb database (generated from the ASP.Net 2.0 framework). I have restored both database from production onto my development environment but I am unable to log on with any of the users credentials that work on production. So my question is is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/177964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Displaying path/version information for a loaded COM object? I've got some code that uses the Component Categories manager to load all of the classes that implement a particular category. Is there an easy way to get a description, path and version information from the loaded DLL or EXE? A: When the object is loaded...
{ "language": "en", "url": "https://stackoverflow.com/questions/177965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multidimensional Repeating Data Control Excuse my title if it's confusing, but I don't know how else to describe this, except in the long explanation below: I would like to create a multidimensional, templated, data bound, repeating ASP.NET control, with paging and sorting. I.e. You specify how many columns and row...
{ "language": "en", "url": "https://stackoverflow.com/questions/177968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a way to get DateTime value from timestamp type column? I need a select from table which does not have column that tells when row was inserted, only timestamp column (values like: 0x0000000000530278). Some data was imported to the table yesterday and now I need to find out what exactly was imported :( Is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/177970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How can I make email go to a local folder during testing? How can I test sending email from my application without flooding my inbox? Is there a way to tell IIS/ASP.NET how to deliver email to a local folder for inspection? A: Yes there is a way. You can alter web.config like this so that when you send email it...
{ "language": "en", "url": "https://stackoverflow.com/questions/177974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Downloading document from internal server externally This a bit of strange one.... We have an internal web app that runs on server (A) and a document repository that runs on server (B). I have simple link on a page and I want to enable the user to download a document(From IIS Server (A)). However this document does...
{ "language": "en", "url": "https://stackoverflow.com/questions/177989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get rectangular multiple selection behavior in Comtl32.dll ListView Possible Duplicate: ListView multiple selection behavior? The ListView in Comtl32.dll v6.0 does multiple selection (when using Shift key) as follows (x means selected) 00xxxx xxxxxx xxxx00 Earlier versions of ListView do it as follows : ...
{ "language": "en", "url": "https://stackoverflow.com/questions/177993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: WSGI Middleware recommendations I have heard that there is lots of interesting and useful WSGI middleware around. However, I am not sure which ones (apart from the ones that are part of pylons) are useful and stable. What is your favourite WSGI middleware? A: WSGI.org has a fairly comprehensive list of WSGI Middle...
{ "language": "en", "url": "https://stackoverflow.com/questions/178001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Simulating <%#Bind(...) %> ASP.Net: In code-behind I can simulate <%# Eval("Property")%> with a call to DataBinder.Eval(myObject,"Property"); How do I simulate a call to <%# Bind("Property")%> ? many thanks A: DataBinder.GetPropertyValue(myObject,"Property")
{ "language": "en", "url": "https://stackoverflow.com/questions/178005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Different results selecting HTML elements with XPath in Firefox and Internet Explorer I'm trying to select a specific HTML element in a document, for firefox i just use: xpathobj = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); which works fine. However when I tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/178016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I embed a Google map into a Flash website? I would like to include a Google map in a Flash site I am building. I would like to retain as much of the zoom, print, copy/send url, direction functionality as is practically possible. Please could somebody advise the best way to do this? Thanks. A: See Google Maps...
{ "language": "en", "url": "https://stackoverflow.com/questions/178020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why is "null" present in C# and Java? We noticed that lots of bugs in our software developed in C# (or Java) cause a NullReferenceException. Is there a reason why "null" has even been included in the language? After all, if there were no "null", I would have no bug, right? In other words, what feature in the languag...
{ "language": "en", "url": "https://stackoverflow.com/questions/178026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "77" }
Q: How do you disable the CPU window in Delphi 7 When stepping a program in Delphi 7, the CPU window sometimes pops up and then steps through that instructions. I find this an annoyance as I wish to only step Pascal Code. Does anyone know how to disable this CPU pop-up? I would not be sorry if this window never ever ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: DDD and Asynchronous Repositories We're working on a rich client (written in Flex) that is connected to a Java backend, using both RMI and JMS. I was thinking about implementing the client in a DDD fashion so that it has Repositories for the CRUD operations on the domain objects. The problem is however that all back...
{ "language": "en", "url": "https://stackoverflow.com/questions/178070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Porting windows manual-reset event to Linux? Is there any easier solution in porting a windows manual-reset event to pthread, than a pthread conditional-variable + pthread mutex + a flag if event is set or unset? A: You can easy implement manual-reset events with pipes: event is in triggered state -> there is somet...
{ "language": "en", "url": "https://stackoverflow.com/questions/178114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Functions vs Stored Procedures Let's say I have to implement a piece of T-SQL code that must return a table as result. I can implement a table-valued function or else a stored procedure that returns a set of rows. What should I use? In short, what I want to know is: Which are the main differences between functions ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "92" }
Q: Transfer Dependency Property value of a UserControl to a Control inside it I have a UserControl (Composite control) that can be shown as the following pseudo XAML code: <UserControl> <DockPanel> <TextBox /> <Button /> </DockPanel> </UserControl> I use this custom control in a bunch of places and style s...
{ "language": "en", "url": "https://stackoverflow.com/questions/178135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to Pass an Object Method as a Parameter in Delphi, and then Call It? I fear this is probably a bit of a dummy question, but it has me pretty stumped. I'm looking for the simplest way possible to pass a method of an object into a procedure, so that the procedure can call the object's method (e.g. after a timeout,...
{ "language": "en", "url": "https://stackoverflow.com/questions/178138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to create an automatically managed "last update" field with Microsoft Access Originally I thought to ask if there would be an easy way to provide an automatically managed last update field with MS Access. After some googling I found following approach: Private Sub Form_Dirty(Cancel As Integer) Me.Last_Update...
{ "language": "en", "url": "https://stackoverflow.com/questions/178144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I verify if a Windows Service is running I have an application in C# (2.0 running on XP embedded) that is communicating with a 'watchdog' that is implemented as a Windows Service. When the device boots, this service typically takes some time to start. I'd like to check, from my code, if the service is runnin...
{ "language": "en", "url": "https://stackoverflow.com/questions/178147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "201" }
Q: Reading the Exchange server time via MAPI I'd like to calculate the age of the messages in an Exchange mailbox to make sure they sit there for at least a minute before our program (C++, MAPI) processes them. This way the spam filter we use should have enough time to do its job. Because the time on the PC where our p...
{ "language": "en", "url": "https://stackoverflow.com/questions/178173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: OO Design: Multiple persistance design for a ruby class I am designing a class for log entries of my mail server. I have parsed the log entries and created the class hierarchy. Now I need to save the in memory representation to the disk. I need to save it to multiple destinations like mysql and disk files. I am at a...
{ "language": "en", "url": "https://stackoverflow.com/questions/178187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Bitfields in C# So, bitfields. Specifically, large bitfields. I understand how to manipulate individual values in a bitfield, but how would I go about doing this on a large set, such as say: uint[] bitfield = new uint[4] { 0x0080000, 0x00FA3020, 0x00C8000, 0x0FF00D0 }; The specific problem I'm having is doing left ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: In ASP.NET MVC I encounter an incorrect type error when rendering a page with the correct typed object I am developing an application using MVC Preview 5. I have used typed views. After setting debug="false", I have found that I am receiving errors of the form: "The model item passed into the dictionary is of ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/178194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Python: can I have a list with named indices? In PHP I can name my array indices so that I may have something like: $shows = Array(0 => Array('id' => 1, 'name' => 'Sesame Street'), 1 => Array('id' => 2, 'name' => 'Dora The Explorer')); Is this possible in Python? A: Yes, a = {"id": 1, "name":"Sesam...
{ "language": "en", "url": "https://stackoverflow.com/questions/178199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: IP subnet verification in JSP I have the following JSP code, that protects my web page and displays it only to know IP's String ip_h = request.getRemoteAddr(); String host_h = request.getRemoteHost(); String iplist[] = new String[1]; iplist[0] = "127.0.0.1"; iplist[1] = "10.217.106.248"; int count = iplis...
{ "language": "en", "url": "https://stackoverflow.com/questions/178200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Business Object DAL design When designing business objects I have tried several different methods of writing the data access layer. Some have worked out better than others but I have always felt there must be a "better" way. I would really just like to see the different ways people have handled the DAL in differen...
{ "language": "en", "url": "https://stackoverflow.com/questions/178203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: User configurable security in multi-tenant ASP.NET website We are building a multi-tenant website in ASP.NET, and we must let each customer configure their own security model. They must be able to define their own roles, and put users in those roles. What is the best way to do this? There are tons of simple exampl...
{ "language": "en", "url": "https://stackoverflow.com/questions/178210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: log4j vs logback We are using log4j behind a selfmade wrapper. We plan to use much more features of it now. Should we update to logback ? (I mean the framework not a facade like SLF4J) A: Should you? Yes. Why? Log4J has essentially been deprecated by Logback. Is it urgent? Maybe not. Is it painless? Probably, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "171" }
Q: Casting in Informix In Informix, how can I cast a char(8) type into a money type, so that I can compare it to another money type? Using "tblAid.amt::money as aid_amt" did not work. Using "(tblAid.amt * 1) AS aid_amt" did not work. A: try this --> select (disb_amt::NUMERIC) disb_amt from tmp_kygrants; You may be a...
{ "language": "en", "url": "https://stackoverflow.com/questions/178216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best Practices : Where to place required files I'm working with a number of 'helper' classes, which affectively have a bunch of static functions which allow the controllers and actions have access to chunks of shared functionality. Problem is that these files have been used as a dumping ground for any functionality ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How else can one present an architecture document besides as a series of views? Most, if not all architecture documents I've seen (and developed) have been presented as a series of views (Logical, Physical, Use-case etc). Is this the preferred layout? What other styles are there? A: Since it's complex, it's hard ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: credential cache Does anyone know how to use the credential cache or network credential to get the user's personal info from the Active Directory using C# or VB? I need to get personal info such as name, telephone ID and so on. A: See the System.DirectoryServices class documentation. A: DirectorySearcher ds = new ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best Practice: include( or A: It's better the most times to include javascript and css files because that way the browser is able to cache the javascript/css file. That way the file is only loaded once by the browser even if you include the file in several other pages. But this is only true if you set an appropria...
{ "language": "en", "url": "https://stackoverflow.com/questions/178247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to implement Querystring authentication I’m developing a website of a client and they are sending out newsletters to their customers (through the website administration interface) The newsletters are personal to each of the subscribed recipients/customers. Each recipient/ customer is also a user with a username...
{ "language": "en", "url": "https://stackoverflow.com/questions/178251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ServiceProvider, cache etc. done with generics without cast I'm talking about c# 3.5 3.0. I know how to do it when cache or ServiceProvider can have only one instance for the whole application. In this case ServiceProvider can look like this public static class Service<T> { public static T Value {get; set;} } a...
{ "language": "en", "url": "https://stackoverflow.com/questions/178255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to avoid syntax-highlighting for large files in vim? Huge files take forever to load and work with in vim, due to syntax-highlighting. I'm looking for a way to limit size of highlighted files, such that files larger than (say) 10MB will be colorless. A: I haven't tried it myself, but the LargeFile plugin seems ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: What should be OO and what shouldn't? I've read a lot of people saying that some things shouldn't be written in an object orientated style - as a person learning the OO style coming from a C background, what do they mean by this? What shouldn't be OO, why do some things fit this design better, and how do we know whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/178262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: JavaScript bookmarklet to delete all cookies within a given domain I am testing a web app that writes cookies to subdomain.thisdomain.com and several subfolders within that. I'm looking for JavaScript that I can put into a bookmarklet that will delete all cookies under that subdomain, regardless of the folder in whi...
{ "language": "en", "url": "https://stackoverflow.com/questions/178263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Sqlite on an embedded system I have a database file that is generated on a PC using Sqlite. This file is then transferred to an ARM7 based embedded system without an operating system. The embedded system must access this database, but does not need to update it. I have been trying to get sqlite3 small enough for t...
{ "language": "en", "url": "https://stackoverflow.com/questions/178264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What is the most hard to understand piece of C++ code you know? Today at work we came across the following code (some of you might recognize it): #define GET_VAL( val, type ) \ { \ ASSERT( ( pIP + sizeof(type) ) <= pMethodEnd ); \ val = ( *((type ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178265", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Test a site in Mac Firefox I need to test a site with a dynamic menu in Mac Firefox, but I'm running in Windows. A simple browsershot.com test won't help; I need to actually use the site. How can I acquire a method of doing Mac emulation without physically having a Mac? Is there some kind of remote VM product out th...
{ "language": "en", "url": "https://stackoverflow.com/questions/178279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I find character positions in ANTLR 2? I have a simple grammar, and have produced a pair of c# classes using antlr 2.7.7. When the parser finds an error with a token, it throws an exception; I want to find out how many characters into a parsed stream the token came. How do I do that? A: It's been a long ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/178289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: asp.net : IIS Service Unavailable When I attempt to update the code on a IIS webserver by replacing the old code with my new code, I receive 503 Service Unavailable replys when attempting to access any of the replaced pages on the server. What is the cause of this failure and what steps can I take to correct such ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Paver 0.8.1 compatibility with python 2.6 Does anyone manage to bootstrap its development area using paver with python 2.6 ? I have install python 2.6, install paver with easy_install-2.6, everything looks fine. But when I try to launch the bootstrap method it raises an urllib2.HTTPError (: HTTP Error 404: Not Found...
{ "language": "en", "url": "https://stackoverflow.com/questions/178300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to deterimine whether .Net DLL is used in a GUI app or web service? How do I determine in a .Net DLL whether it's running in a Windows GUI application or web service? I've got a low level class which is being shared between two applications and need to disable message boxes when it's used in a web service. The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SQL Server Storage of Data: 4 gb Raw, how much in SQL Server? I have a SQL Server 2005 database and I have 4 GB of text files that I need to import into it. The question is, if these 4 GB of text files are 1.2 GB when they are zipped, how big would the database be if they are imported? Does SQL Server shrink data by...
{ "language": "en", "url": "https://stackoverflow.com/questions/178307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do you validate your URL variables? When you're passing variables through your site using GET requests, do you validate (regular expressions, filters, etc.) them before you use them? Say you have the URL http://www.example.com/i=45&p=custform. You know that "i" will always be an integer and "p" will always contain o...
{ "language": "en", "url": "https://stackoverflow.com/questions/178320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I check if an element is hidden in jQuery? How do I toggle the visibility of an element using .hide(), .show(), or .toggle()? How do I test if an element is visible or hidden? A: There are too many methods to check for hidden elements. This is the best choice (I just recommended you): Using jQuery, make an...
{ "language": "en", "url": "https://stackoverflow.com/questions/178325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8551" }
Q: Sizing an MFC Window I have an MFC app which I have been working on for a few weeks now, I want to manually set the dimensions of the main frame when it is loaded, can someone give me a hand with this, specifically where to put the code as well? Thanks! A: Find your screen size with .. CRect rect; SystemParametersI...
{ "language": "en", "url": "https://stackoverflow.com/questions/178326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: In PHP (>= 5.0), is passing by reference faster? In PHP, function parameters can be passed by reference by prepending an ampersand to the parameter in the function declaration, like so: function foo(&$bar) { // ... } Now, I am aware that this is not designed to improve performance, but to allow functions to cha...
{ "language": "en", "url": "https://stackoverflow.com/questions/178328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: Multiple Inheritance in C# Since multiple inheritance is bad (it makes the source more complicated) C# does not provide such a pattern directly. But sometimes it would be helpful to have this ability. For instance I'm able to implement the missing multiple inheritance pattern using interfaces and three classes like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "249" }
Q: Why is distributed source control considered harder? It seems rather common (around here, at least) for people to recommend SVN to newcomers to source control because it's "easier" than one of the distributed options. As a very casual user of SVN before switching to Git for many of my projects, I found this to be no...
{ "language": "en", "url": "https://stackoverflow.com/questions/178341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: What happens when I edit web.config? I need to edit the web.config file on a live Sharepoint environment, but I'm unsure what will happen if I do (I want to output custom errors). Will this cause the IIS6 worker process to recycle? Will active users lose their session state because of this? Or can I safely edit the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "87" }
Q: Unable to start debug in Visual Studio 2005 My "Start debugging" button and element menu are greyed out... but only on one of my projects (an ASP.NET website). I have no idea what I have done to disable it. I already checked everything in the Property page of both the solution and project. I even compared it to anot...
{ "language": "en", "url": "https://stackoverflow.com/questions/178351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: When does a DropDownList retain the value from postback at the SelectedIndexChanged Event Handler To Clarify to all this problem absolutely does not stem from rebinding of the controls and the value does not remain the initial value after binding. I have a DropDownList on an aspx page which is being used in multiple...
{ "language": "en", "url": "https://stackoverflow.com/questions/178389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Form Elements in ASP.NET Master Pages and Content Pages OK, another road bump in my current project. I have never had form elements in both my master and content pages, I tend to have all the forms in the content where relevant. In the current project however, we have a page where they want both. A login form at the...
{ "language": "en", "url": "https://stackoverflow.com/questions/178396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Under an MVC framework, which directory structure would be expected by other developers? Generally, MVC frameeworks have a structure that looks something like: /models /views /controllers /utils However, in a web application suite, I've decided that clumping all models, views, and controllers together probably woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/178398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can MySql 5.0 have a view of a table located on another server Can MySql 5.0 views use tables that are located on another server? What is the syntax for creating such a view? A: Federated Tables: http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html This allows a table to be remotely accessed as if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Select all child elements except the first Say I have the following: <ul> <li>First item</li> <li>Second item</li> <li>Third item</li> </ul> How would I select all the child elements after the first one using jQuery? So I can achieve something like: <ul> <li>First item</li> <li class="something">Second item</...
{ "language": "en", "url": "https://stackoverflow.com/questions/178407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: What is the best way to solve an Objective-C namespace collision? Objective-C has no namespaces; it's much like C, everything is within one global namespace. Common practice is to prefix classes with initials, e.g. if you are working at IBM, you could prefix them with "IBM"; if you work for Microsoft, you could use ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "178" }
Q: Properly using file Designer Files in ASP.NET Web Sites I need to get existing web pages into an existing ASP.NET web site project in Visual Studio 2008. I simply tried to drag and drop the whole file folder content into the Visual Studio Solution Explorer or even to copy them into the web site folder. Both ways, Vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/178444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Getting selected members from multiselect list view ctrl I have a list view control which at the moment only allows one item to be selected. I then read this via the following code: void CApp::OnNMClickList1(NMHDR *pNMHDR, LRESULT *pResult) { int nSelected = (m_List.GetSelectionMark()); ... However, now I want ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the proper way to rethrow an exception in C#? Is it better to do this: try { ... } catch (Exception ex) { ... throw; } Or this: try { ... } catch (Exception ex) { ... throw ex; } Do they do the same thing? Is one better than the other? A: You should always use "throw;" to rethrow t...
{ "language": "en", "url": "https://stackoverflow.com/questions/178456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "529" }
Q: Python, unit-testing and mocking imports I am in a project where we are starting refactoring some massive code base. One problem that immediately sprang up is that each file imports a lot of other files. How do I in an elegant way mock this in my unit test without having to alter the actual code so I can start to wr...
{ "language": "en", "url": "https://stackoverflow.com/questions/178458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Setting up local server with PHP I'm trying to setup an Apache/PHP/Postgresql server locally on my machine. I'm using Windows vista business 32bit. I tried to install everything manually (one thing at a time, apache, postgresql and php (all the latest stable releases)) and after I get everything up and running. When...
{ "language": "en", "url": "https://stackoverflow.com/questions/178462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I create a keyboard hook with a different thread in C#? I'm creating a low level keyboard hook in c# using SetWindowsHookEx, question is how can I make the on keyboard event function run on a thread other from the main thread? Also I currently don't have a thread other then the main thread, so how can I creat...
{ "language": "en", "url": "https://stackoverflow.com/questions/178470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LINQ query to WebControl.Controls I have three TextBox controls on the page <asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" OnTextChanged="TextBox_TextChanged" TabIndex="1"> <asp:TextBox ID="TextBox2" runat="server" AutoPostBack="True" OnTextChanged="TextBox_TextChanged" TabIndex="2"> <...
{ "language": "en", "url": "https://stackoverflow.com/questions/178473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PreparedStatement IN clause alternatives? What are the best workarounds for using a SQL IN clause with instances of java.sql.PreparedStatement, which is not supported for multiple values due to SQL injection attack security issues: One ? placeholder represents one value, rather than a list of values. Consider the fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/178479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "383" }
Q: Pathing in a non-geographic environment For a school project, I need to create a way to create personnalized queries based on end-user choices. Since the user can choose basically any fields from any combination of tables, I need to find a way to map the tables in order to make a join and not have extraneous data (T...
{ "language": "en", "url": "https://stackoverflow.com/questions/178482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What does the C# operator => mean? Answers to a recent post (Any chances to imitate times() Ruby method in C#?) use the => operator in the usage examples. What does this operator do? I can't locate it in my C# book, and it is hard to search for symbols like this online. (I couldn't find it.) A: A lambda expressi...
{ "language": "en", "url": "https://stackoverflow.com/questions/178516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Where should assets go in a CodeIgniter project? I'm just starting with CodeIgniter, and I am not sure where things such as css, js, and images should go. Outside the whole system folder seems ok, but that means everything is seperate. Inside means the filepaths are longer, and I'm worried that it might mess things ...
{ "language": "en", "url": "https://stackoverflow.com/questions/178519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Most useful .NET utility classes developers tend to reinvent rather than reuse I recently read this Phil Haack post (The Most Useful .NET Utility Classes Developers Tend To Reinvent Rather Than Reuse) from last year, and thought I'd see if anyone has any additions to the list. A: * *Using DebuggerDisplay attribute...
{ "language": "en", "url": "https://stackoverflow.com/questions/178524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: PHP/PDO and SQL Server connection and i18n issues In our web-app we use PHP5.2.6 + PDO to connect to a SQL Server 2005 database and store Russian texts. Database collation is Cyrillic_General_CI_AS, table collation is Cyrillic_General_CI_AS, column type is NVARCHAR(MAX). We tried connecting to a database using two f...
{ "language": "en", "url": "https://stackoverflow.com/questions/178530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }