text
stringlengths
8
267k
meta
dict
Q: Is there a cleaner syntax for applying an operation to each element of a sequence? int z = 1; double result = Math.Log(z); //works However trying to do the same thing with an array of numbers doesn't work: int[] z = new [] {1,2,3,4}; double[] result = Math.Log(z); //Syntax 1 - error CS1503: Ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/396521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to programatically 'login' a user based on 'remember me' cookie when using j2ee container authentication? i'm using form based authntication in my WAR. i want to implement a 'remember me' cookie so: 1) how can i intercept the authentication before user is redirected to the form? 2) say i checked the cookie and i...
{ "language": "en", "url": "https://stackoverflow.com/questions/396543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Popular Vim alternatives? Are there any Vi clones that are still in wide use today (besides Viper mode in Emacs ;)), other than Vim? If so, what are the pros/cons to using it instead of Vim? A: Kate (KDE Advanced Text Editor?) has a Vi editing mode. A: It's not strictly a clone, but real live no-kidding vi is avai...
{ "language": "en", "url": "https://stackoverflow.com/questions/396545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: NS_ERROR_XPC_BAD_CONVERT_JS I'm getting this error after trying to "appendChild" to an element that was just created (in for loop). What does this error mean? I suppose it's not possible to append sth. to an element that doesn't really exist in DOM. How do I fix it? "innerHTML" works, but I don't think it's really c...
{ "language": "en", "url": "https://stackoverflow.com/questions/396547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Delphi object persistence, what is the best way I have developed application for drawing some shapes (lines mostly) , now i need to be able to store sketch to a file, I know that delphi has build in routines for object persistence, but I have never used it. Can someone tell me can object persistence be used if i ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/396550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: preg_match_all() [function.preg-match-all]: Unknown modifier ']' Using a few different patterns but they each come up with this error - so what's wrong? My shortest one to diagnose is: $pattern = "<img([^>]*[^/])>"; preg_match_all($pattern, $subject, $matches); Thanks A: A single slash is the default delimiter, wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/396557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Google Friend Connect - Logged in user profile info I am trying to implement Google Friend Connect. Is it possible to obtain the email address of the logged in user? If so how? A: Nope. Google doesn't let you have this information for the obvious reason that they don't want you to spam their users. If you need it...
{ "language": "en", "url": "https://stackoverflow.com/questions/396560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Good *free* markov modeling tools? I would like to use Markov models for some architecture simulations, but don't have a budget to buy anything like, eg, SHARPE. Does anyone know of a freeware tool, either platform-independent or available for Mac OS/X A: Maybe You can try this with GNU Octave
{ "language": "en", "url": "https://stackoverflow.com/questions/396561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a standard way to do an fopen with a Unicode string file path? Is there a standard way to do an fopen with a Unicode string file path? A: This is a matter of your current locale. On my system, which is Unicode-enabled, file paths will be in Unicode. I'm able to detect this by means of the locale command: $...
{ "language": "en", "url": "https://stackoverflow.com/questions/396567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: SQL in an e-mail app I would like to be able to perform SQL queries on my e-mail inbox. With the output, I can make graphs about how much e-mails I send or receive for example. I want to analyze my performance and what keeps me busy. My mailbox seems like a good place to start. I'm using Gmail on-line, and Thunderb...
{ "language": "en", "url": "https://stackoverflow.com/questions/396568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Simpler-than-JBoss way to have POJO RPC in Java with container session management Currently, I only know a way of doing RPC for POJOs in Java, and is with the very complex EJB/JBoss solution. Is there any better way of providing a similar functionality with a thiner layer (within or without a Java EE container), us...
{ "language": "en", "url": "https://stackoverflow.com/questions/396569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I create cells or grids in C++ for a randomized maze? I'm trying to create a randomized maze in C++, but I can't start because I don't know how to create grids or cells. How could I create it? And I also want to create it using ASCII characters. how can i store it in array? (can any one give a sample code an...
{ "language": "en", "url": "https://stackoverflow.com/questions/396579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to make Firefox extension auto install in nav bar? I'm working on a Firefox extension. I'd like to make it auto-install in the far right position on the nav bar when a user installs it. As it stands, a user has to go to View > Toolbars > Customize... and drag the extension to the nav bar once it's installed. I'd...
{ "language": "en", "url": "https://stackoverflow.com/questions/396580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: XSL That Returns the XML unchanged I am looking for a XSL snippet that simply returns the XML unaltered. It sounds trivial but I can't seem to find an example anywhere on the web. Any help out there? A: In order to copy the complete XML document, it is necessary to have a template that matches the root. This might...
{ "language": "en", "url": "https://stackoverflow.com/questions/396586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: IBM.Data.DB2 Can I develop a windows application using .NET framework and IBM.Data.DB2 provider to access a DB2 database running on OS/390? Thanks in advance. A: IBM guard (or, more precisely, allows their customers to guard) their mainframe DB2 access very closely. I suspect this has something to do with ensuring ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL .Net Provider 5.2 does not show up in Data Source dialog of VS 2008 Express I have installed MySQL .NET data provider 5.2 (through it's installer) but I could not see the MySQL data provider in Data Source dialog of Database Explorer. I am using VS 2008 Express edition. Do you have any clues ? Regards, Jatan ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Force PHP to error on non-declared variables? In objects? Is there any way to force PHP to blow up (error, whatever) if I misspell a variable name? What about if I'm using an instance of a class and I spell the name of a variable wrong? [I know that I should just get used to it, but maybe there's a way to enforce na...
{ "language": "en", "url": "https://stackoverflow.com/questions/396594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Visual Studio Shell (Isolated Mode) Redistributables I want to use the Isolated Shell as a front-end for a custom debugger. If I understand correctly, the Visual Studio Debug Package implements the 'User Interface Parts' of the Visual Studio Debugger system, that is, among other things, all the debugger windows (st...
{ "language": "en", "url": "https://stackoverflow.com/questions/396597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: free or cheap open source browser-based Flash (flv) video players Does any know of any free or cheap OSS browser based Flash video player? It's going to be embedded on ASP.NET 3.5, a webcontrol would be handy, but not required. I've been looking around and there are a lot of options. My client wants to host a vide...
{ "language": "en", "url": "https://stackoverflow.com/questions/396598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Getting a PHP DateTime object into a string representation of a MYSQL date I have a DateTime which I want to store in a Date MySQL column. I am using MySQLi and prepared statements. When binding parameters, I cannot specify date as a type, only strings and integers. How do I convert the DateTime to a MySQL date str...
{ "language": "en", "url": "https://stackoverflow.com/questions/396610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: PHP to ASP.NET - call_user_func() equivalent? I'm wondering if there is an equivalent function to PHP's call_user_func() in ASP.NET application. I'm looking to do a conversion from a PHP application to ASP.NET as a means of teaching myself the language, by taking a CMS I built professionally and trying to recreate i...
{ "language": "en", "url": "https://stackoverflow.com/questions/396620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: LINQ- Combine Multiple List and order by a value (.Net 3.5) I'm trying to combine a number of List<T> where T:IGetTime (i.e T will always have method getTime()). Then I'm trying order the items by the DateTime that getTime() returns. My LINQ looks like this: public static List<T> Combine(List<T> one, List<T> two, L...
{ "language": "en", "url": "https://stackoverflow.com/questions/396621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: DirectShow: Graph works in GraphEdit, not in code I've built the following graph in GraphEdit: Logitech Webcam -> Infinite Tee Pin Filter -> VideoRenderer. This works fine (with GraphEdit automatically inserting a few intermediate filters between the TEe filter and the VideoRenderer filter). I've tried doing the sam...
{ "language": "en", "url": "https://stackoverflow.com/questions/396622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can't run Groovy unit tests in NetBeans 6.5 There is no new Groovy Unit Test built into NetBeans. And if I create one manually, I can't get it to run in NetBeans. Is it not implemented, or is there something wrong with my installation? A: I had the same problem. After I looked into it, it's fairly easy to add uni...
{ "language": "en", "url": "https://stackoverflow.com/questions/396623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Replacements for the C preprocessor I'm interested in using something other than the C preprocessor to preprocess my C and Objective-C source code. Are there good alternatives? An example would be something that allowed one to escape out into a python or perl snippet in the middle of C code, and where the snippet s...
{ "language": "en", "url": "https://stackoverflow.com/questions/396644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Retrieving DOM textnode position Is it possible to retrieve the geometric position (i.e. top/left offsets from either the parent element, the page, etc) of a text node? A: Today you can via Range.getBoundingClientRect(). IE9+ // Get your text node const el = document.querySelector('strong') const textNode = el....
{ "language": "en", "url": "https://stackoverflow.com/questions/396649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How to make an abap program pause? For testing purposes I need my ABAP program to wait for few seconds. How can this be done? A: ABAP WAIT UP TO SAP Documentation WAIT statement has an implicit COMMIT which is something that should be avoided. A: 2 solutions: 1) Either use WAIT UP TO ... SECONDS. WAIT UP TO 42 SEC...
{ "language": "en", "url": "https://stackoverflow.com/questions/396663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: In Grails, need to define a Set for one-to-many relationship? I have the Grails domain classes Child and Toy. A child can have many toys. class Child { static hasMany = [ toys : Toy ] String name } class Toy { static belongsTo = [ owner : Child ] String name } It was my understanding that there wil...
{ "language": "en", "url": "https://stackoverflow.com/questions/396667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: hyperlink on php I'm working on a WordPress template and need to add a hyperlink to the cartoon bubble at the top of the page. The bubble, as far as I can tell, is php. Where do I insert the href? <h1><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></h1> The href should point to www.ojaivalleyne...
{ "language": "en", "url": "https://stackoverflow.com/questions/396674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Grails File Download I'm trying to craete a site which allows users to upload any file type they like. I've implemented this feature fine, and the file is held on the server. Later on they can download the file to view, but i'm having trouble getting it to work. I've used any examples I can get hold of but they all...
{ "language": "en", "url": "https://stackoverflow.com/questions/396677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How can I implement garbage collection in a multithreaded environment? How should I perform garbage collection in a program that consists of multiple threads or processes? How can I scan the stack from each of those threads and processes? Does each process require its own garbage collection routine? Is it a good ide...
{ "language": "en", "url": "https://stackoverflow.com/questions/396684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: AutoCompleteExtender works sometimes [System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod] public string[] GetRowsByFilter(string prefixText, int count) //public static List<string> GetRowsByFilter(string prefixText) { DataTable table = ds.Tables[0]; string fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/396699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: How to reference a Grails domain class fields from outside of the Grails controller and view? I have the domain classes: class Child { static hasMany = [ toys : Toy ] String name Set toys } class Toy { static belongsTo = [ owner : Child ] String name } In my JSP I reference a child by: child = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it safe to pass anonymous type to MVC ViewData.Model? Is it ok to do the following: View(new {Object A, Object B}) Or should Object A and Object B be explicitly declared in a new type? Thanks. A: Yes, it's fine to do so. To get the values, you can use ViewData.Eval("PropertyName") and the existing Html helpers ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you determine what technology a website is built on? Quite often I come across a nice looking or functional website, and wonder what technology was used to create it. What techniques are available to figure out what a particular website was built with? Few frameworks seem to include any kind of generator meta...
{ "language": "en", "url": "https://stackoverflow.com/questions/396739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "157" }
Q: USB Drives and the Windows Drive Limit What happens on a Windows box once you add more drives than can fit in the A-Z drive letters. I know about the mountvol command but my solution needs to work on Win98/XP systems that do not use NTFS. Is there any way to provide access to those drives? A: If it is physical driv...
{ "language": "en", "url": "https://stackoverflow.com/questions/396746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ordering by the order of values in a SQL IN() clause I am wondering if there is away (possibly a better way) to order by the order of the values in an IN() clause. The problem is that I have 2 queries, one that gets all of the IDs and the second that retrieves all the information. The first creates the order of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "180" }
Q: Should I be using PreparedStatements for all my database inserts in Java? What is the recommended method for escaping variables before inserting them into the database in Java? As I understand, I can use PreparedStatement.setString() to escape the data, but PreparedStatement seems somewhat impractical if I don't pla...
{ "language": "en", "url": "https://stackoverflow.com/questions/396749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: UDP Broadcast or IP Multicast? If you had to implement a network broadcast, would you use UDP broadcast or IP multicast in a new application? Why? What are the benefits and drawbacks you encountered with either method? (Especially concerning problems with VPNs, different subnets, various routers etc.) A: Multicast...
{ "language": "en", "url": "https://stackoverflow.com/questions/396753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: When to use Plural vs Collection word on Methods I'm creating an API for a module and after I created several methods inside my classes, I asked myself this question. Right now, and as an example, I'm doing this: public Company GetMonitoredCompany( String companyName ) { ... } public List<Company> GetMonitoredCompan...
{ "language": "en", "url": "https://stackoverflow.com/questions/396756", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Programmatic interface to MOUNTVOL.EXE Is there any programatic interface for the MOUNTVOL command in Windows? What I am trying to do is get the output from mountvol (even if I have to parse it from the command line), which gives me the list of drives with their GUID-like path (\\?\Volume{...}) and get the device in...
{ "language": "en", "url": "https://stackoverflow.com/questions/396766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best data binding solution for GWT Have you ever used one of the many half-baked data binding solutions for GWT? If so, how well did it work? I'd like to stop rolling my own bindings for GWT but there's no clear winner in the data binding space. I'd prefer to use something with a future e.g. GWT Incubator but there'...
{ "language": "en", "url": "https://stackoverflow.com/questions/396786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Is Web Browser "Discrimination" Okay? Is it acceptable to add "special," but unnecessary, content based on a user's web browser? For example, is it okay to display this: at the top of my webpage for all IE users? A: It will certainly irritate visitors. And they probably won't understand what Firefox is and how ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Desktop graphics - or "skinned" windows I'm looking for a way to draw animations right on the desktop. No window frames and with transparent background. I'm using Python in windows XP for it, but it doesn't have to be cross platform, although it'd be a nice bonus. Does anyone know about a python library that can do ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: JavaScript include declaration fails to find file There has to be something utterly simple I'm overlooking here, but for the life of me I can't get a JavaScript file to include properly from my master page. My declaration in the <head> element looks normal enough: <head runat="server"> <title>Untitled Page</tit...
{ "language": "en", "url": "https://stackoverflow.com/questions/396806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is my mounted MacFUSE NTFS vol read-only? I got the impression from the MacFUSE site that when you install it and connect an NTFS volume it will be writable. However, the volume I mounted is read only. Here is some of the output of mount... The NTFS external USB drive I'm talking about: /dev/disk1s1 on /Volumes/...
{ "language": "en", "url": "https://stackoverflow.com/questions/396810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Protection from screen scraping Following on from my question on the Legalities of screen scraping, even if it's illegal people will still try, so: What technical mechanisms can be employed to prevent or at least disincentivise screen scraping? Oh and just for grins and to make life difficult, it may well be nice to...
{ "language": "en", "url": "https://stackoverflow.com/questions/396817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Geocode multiple addresses I need to geocode around 200 addresses per request and do around 3,000 request per day. I will be doing this server side using PHP. I have looked at How to convert an address to a latitude/longitude?, but could not find a way for either Google Maps HTTP Request API or the Yahoo Geocoding R...
{ "language": "en", "url": "https://stackoverflow.com/questions/396819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Converting a development team from FTP to a Versioning System I work at a small LAMP Development Studio where the idea has been to just get the code done and go on to the next item on the list. The team works in Zend Studio 5.5 connected to the Live server via FTP or SFTP. What they love about this is the speed of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/396830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: String acting abnormally in a For Each loop in VBA code in MSAccess Okay so I started with a question and have made a lot of changes to the code based on suggestions from this site and others so I figured I should create a new question. Even though my code is shorter and more efficient the same problem persists; I a...
{ "language": "en", "url": "https://stackoverflow.com/questions/396848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: .NET / COM events interoperability I have an interop assembly generated by TlbImp.exe, the generated classes are heavily evented and the performance is very important. But there's a problem, the events seem to be registered/unregistered/invoked in such a manner that even empty event handlers are counted in. Given a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Calling a class method raises a TypeError in Python I don't understand how classes are used. The following code gives me an error when I try to use the class. class MyStuff: def average(a, b, c): # Get the average of three numbers result = a + b + c result = result / 3 return result # No...
{ "language": "en", "url": "https://stackoverflow.com/questions/396856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: Changing the Contents of the JComboBox I would like to change the contents of the list of a JComboBox (like adding another list in place of and older one). Is there any way I might be able to do that? Thanks in advance! A: I found this thread and came up with a quick (and probably dirty) solution: oldComboBox.setMo...
{ "language": "en", "url": "https://stackoverflow.com/questions/396896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Why can't I connect to my project portal with my newly created teamsystem user? I've followed this walkthrough to create a new user in TFS and add it to the Administrator group When I try to connect to my project portal (directly from the tfs computer), it asks for my credentials : * *if I enter my new user's cre...
{ "language": "en", "url": "https://stackoverflow.com/questions/396901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Detect disk activity in Delphi I'm using Delphi 2007. I am copying files to a remote drive. When the copying ends, I shutdown/standby the machine. It can happen that some files don't get copied from buffer to disk, and the remote disk gets disconnected, so the backup is not completed. I need to detect disk activity ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: In Python, how do I find the date of the first Monday of a given week? If I have a certain week number (eg 51) and a given year (eg 2008), how do I find the date of the first Monday of that same week? Many thanks A: This seems to work, assuming week one can have a Monday falling on a day in the last year. from ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Setting Windows MySQL client default script folder From withing the MySQL client on Windows, how do I set it to point at a particular Windows folder so the file in a SOURCE statement doesn't have to include a path? A: A partial workaround I've been using is to change the data directory so it is not so deeply burie...
{ "language": "en", "url": "https://stackoverflow.com/questions/396917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The absolute minimum training program for your new employees Suppose that you are running a software company. What are the elements that your new developers' training program, that you will not let a developer touch your code without completing it, would contain? The answer can consist of books, articles, presentati...
{ "language": "en", "url": "https://stackoverflow.com/questions/396921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: FastCGI request handling The docs at www.fastcgi.com aren't clear on this (to me), so I hope someone can give me a definitive answer. I have written a FastCGI application in C++ to do some heavy duty number crunching. When the application first loads (when apache starts), it performs some caching of MySQL data in...
{ "language": "en", "url": "https://stackoverflow.com/questions/396923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: The future direction of Help File formats It would appear that CHM help files are no longer the help file format of choice. WinHelp - obsolete HtmlHelp (CHM) - not supported on Vista by default - does not work well on a network share Help 2 (HXS) - I understand this is used in VS2005+ for displaying help Web Bas...
{ "language": "en", "url": "https://stackoverflow.com/questions/396930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Using 32-bit COM object from C# or VBS on Vista 64-bit and getting error 80004005 I need some mind reading here, since I am trying to do what I do not completely understand. There is a 32-bit application (electronic trading application called CQG) which provides a COM API for external access. I have sample programs...
{ "language": "en", "url": "https://stackoverflow.com/questions/396933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Visual Studio Attach to Process How is this tool used? Not the debugger, I mean Tools > Attach to Process. Does this mean I have the ability to dynamically link a DLL into another application or am I thinking far beyond this? A: It's the same as Debug > Attach to Process. It gives you the ability to debug a running...
{ "language": "en", "url": "https://stackoverflow.com/questions/396935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to select N random rows using pure SQL? How do we combine How to request a random row in SQL? and Multiple random values in SQL Server 2005 to select N random rows using a single pure-SQL query? Ideally, I'd like to avoid the use of stored procedures if possible. Is this even possible? CLARIFICATIONS: * *Pure...
{ "language": "en", "url": "https://stackoverflow.com/questions/396943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: detect current tab Is it possible to detect if a page is opened in 2 different browsers? I have built an small app, that stores some data in $_SESSION, and the problem is that when multiple tabs gets opened, the session vars gets overwritten (search filters in a search form) and so the tabs may display the same resu...
{ "language": "en", "url": "https://stackoverflow.com/questions/396947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: A better/good way to generate 4x4x4 Sudoku board? For fun when I have time, I like to code games to see how hard it is or just because I want to see how it works from the inside or just for personal challenge. I just like coding. For now, I made these ones. So I made a Sudoku board. First it was the normal 3x3x3 boa...
{ "language": "en", "url": "https://stackoverflow.com/questions/396955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Sharepoint password change I am a Sharepoint newbie, but ironically I am a Sharepoint Administrator right now. In my company we have around 200 employees. I created accounts for all of them, but I need to help them change their passwords as they prefer to use their favorite passwords. I was just wondering: is there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/396963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best way to store multi-dimensional array on a server? I'm developing a web-based, turn-based strategy game which takes place on a 10x10 board. Each tile represents an area of land and has its own set of statistics (eg, income, population, fertility, natural resources). Each time the client loads it will download al...
{ "language": "en", "url": "https://stackoverflow.com/questions/396973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: commands to send messages in Python via the Poplib module? I've found a number of tutorials online involving downloading messages via Poplib, but haven't been able to find anything explaining how to create new messages. Does this exist? A: As S.Lott rightly says, you will want some smtp, but to create the actual e...
{ "language": "en", "url": "https://stackoverflow.com/questions/396991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it safe to commit more files as a pre-commit hook? I want to automatically commit the database when we copy files from one branch to the other in Subversion. Is it safe to use svn commmit as part of a pre-commit hook assuming that we do it in very specific cases? A: Even if it's safe, it probably doesn't have th...
{ "language": "en", "url": "https://stackoverflow.com/questions/397001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the biggest time wasters for learning programming? I've had several false starts in the past with teaching myself how to program. I've worked through several books (mostly C and Python), and end up just learning the syntax without feeling as though I could sit down and actually write a program for myself. W...
{ "language": "en", "url": "https://stackoverflow.com/questions/397002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Invalid token 'while' in class, struct, or interface member declaration in very simple code I am not sure what the problem is but I keep receiving this error when I try to use a while statement in my code. Invalid token 'while' in class, struct, or interface member declaration I want to use a while loop to hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/397019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Data schema and query for polymorphic tree in SQL Server I have run into this problem a couple of times in my career, and have never been very happy with the solution, and am presented with it again on a project I am doing in ASP.Net MVC, C#, SQL Server 2008: Imagine I have a Person type (class). I further have typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/397031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Confusing [...] List in Python: What is it? So I was writing up a simple binary tree in Python and came across [...] I don't believe this to be related to the Ellipsis object, more it seems to have something to do with an infinity loop (due to Python's shallow copy?). The source of this infinity loop and why it does...
{ "language": "en", "url": "https://stackoverflow.com/questions/397034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Ajax Toolkit ReorderList Two components with the same id 'componentid' can't be added to the applicaiton Line 3655 Char 59 Ajax Toolkit ReorderList Two components with the same id 'componentid' can't be added to the applicaiton. When using with a database to update a simple list it works fine until it is being used...
{ "language": "en", "url": "https://stackoverflow.com/questions/397051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In rails, how do you stub the render method in functional tests? I'm writing some functional tests for a controller in rails, using mocha to do mocking/stubbing. Is there a way to prevent the template from being rendered during the test, so that I can test only the code in the controller? It looks like rspec provid...
{ "language": "en", "url": "https://stackoverflow.com/questions/397052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: calling code stored in the heap from vc++ Imagine I am doing something like this: void *p = malloc (1000); *((char*)p) = some_opcode; *((char*)p+1) = another_opcode; // for the sake of the example: the opcodes are ok .... etc... How can I define a function pointer to call p as if it was a function? (i'm using VC++...
{ "language": "en", "url": "https://stackoverflow.com/questions/397064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Need suggestion for ASP.Net in-memory queue I've a requirement of creating a HttpHandler that will serve an image file (simple static file) and also it'll insert a record in the SQL Server table. (e.g http://site/some.img, where some.img being a HttpHandler) I need an in-memory object (like Generic List object) that...
{ "language": "en", "url": "https://stackoverflow.com/questions/397073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the difference between exit() and abort()? In C and C++, what is the difference between exit() and abort()? I am trying to end my program after an error (not an exception). A: abort sends the SIGABRT signal. abort does not return to the caller. The default handler for the SIGABRT signal closes the applica...
{ "language": "en", "url": "https://stackoverflow.com/questions/397075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "145" }
Q: .Net XmlSerializer: deserialize CDATA being inner text I have a problem with CDATA deserialization using standard .Net XmlSerializer. Update: I get XML from external system and I can't influence it's format so I can't make CData be enclosed in a separate Element of Attribute. Serialization gives this: <?xml version=...
{ "language": "en", "url": "https://stackoverflow.com/questions/397085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: SQL question from Joel Spolsky article From Joel Spolsky's article on leaky abstractions: [C]ertain SQL queries are thousands of times slower than other logically equivalent queries. A famous example of this is that some SQL servers are dramatically faster if you specify "where a=b and b=c and a=c" than if you onl...
{ "language": "en", "url": "https://stackoverflow.com/questions/397089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Date in Dropdown list box I have 3 drop down list having Date,Month ,Year.So when Updating I want this 3 Field to be a single Datafield in Sql Database. Iam using Asp.Net 2.0 Version(VB.Net).(Now these 3 Dropdown list values are saved as 3 Datafields in sql Database) A: Why not use a date/time picker instead? It s...
{ "language": "en", "url": "https://stackoverflow.com/questions/397094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to make the Java.awt.Robot type unicode characters? (Is it possible?) We have a user provided string that may contain unicode characters, and we want the robot to type that string. How do you convert a string into keyCodes that the robot will use? How do you do it so it is also java version independant (1.3 -> 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/397113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: WPF Image Dynamically changing Image source during runtime I have a window with a title on it. When the user selects a choice from a drop down list, the title image can change. The problem is when the image loads, it's a blurred, stretched, and pixelated. These are PNG files I'm working with and they look good prior...
{ "language": "en", "url": "https://stackoverflow.com/questions/397117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Load vs. Shown events in Windows Forms Hopefully I'm just missing something obvious, but I'm trying to get my head around the differences between the Load and the Shown events in Windows Forms. Traditionally, I've only used Load (or actually OnLoad, since I think it's cleaner to override a method than to rely on the...
{ "language": "en", "url": "https://stackoverflow.com/questions/397121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Reading the target of a .lnk file in Python? I'm trying to read the target file/directory of a shortcut (.lnk) file from Python. Is there a headache-free way to do it? The spec is way over my head. I don't mind using Windows-only APIs. My ultimate goal is to find the "(My) Videos" folder on Windows XP and Vista. On ...
{ "language": "en", "url": "https://stackoverflow.com/questions/397125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: sending commands to an application from Excel? COM? I wrote a device controller (rs232) and it is being used successfully, however users want to view data and control the device (or perhaps communicate through my program) from Excel. I dismissed DDE as an option and found that RTD (IRtdServer) is probably a good st...
{ "language": "en", "url": "https://stackoverflow.com/questions/397128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP Return from function in another file I have a class called User with static function loginRequired(), which returns false if the user is logged in and true if the user is logged out. It also appends an error to an error class that I created that tells the person using the site that they must be logged in to view...
{ "language": "en", "url": "https://stackoverflow.com/questions/397142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Grails eager fetch doesn't retrieve all data I have the domain classes: class Person { static hasMany = [ items: Item ] static fetchMode = [ items: 'eager' ] String name Set items } class Item { static belongsTo = [ owner: Person ] String name } If I leave static fetchMode = [ items: 'eager...
{ "language": "en", "url": "https://stackoverflow.com/questions/397145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why doesn't Python have multiline comments? OK, I'm aware that triple-quotes strings can serve as multiline comments. For example, """Hello, I am a multiline comment""" and '''Hello, I am a multiline comment''' But technically speaking these are strings, correct? I've googled and read the Python style gui...
{ "language": "en", "url": "https://stackoverflow.com/questions/397148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "278" }
Q: initialize two dimensional array of pointer elements using memset I have a these structures definitions typedef struct my_s { int x; int y; } my_T; typedef struct your_s { my_T * x; } your_T; your_T array[MAX_COL][MAX_ROW]; To initialize the array's pointer to NULL, can I do: memset (array, 0, sizeof(ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/397153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jCarousel with unknown content width I am trying to use jCarousel plugin for jQuery in order to provide my website users with scrollable (horizontal) content. The content I am mentioning is basically user defined <li> elements, styled so that they have a feel and look of a tab. so basically I am trying to achieve th...
{ "language": "en", "url": "https://stackoverflow.com/questions/397184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Installing PHP extensions on shared hosting I need to enable the mcrypt functions on my website, except I'm on a shared host (running linux) and obviously don't have access to the php.ini file. There does seem to be options for installing PEAR modules but a search told me mcrypt wasn't available. Is there any way I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/397185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I display vector graphics (SVG) in a Windows Forms application? Is there a way (preferably a control) to display vector graphics (preferably SVG) in a Windows Forms application? I'm guessing that this would be easy to do with WPF, but I would prefer not to have to migrate the project. A: GDI+ and the Graphic...
{ "language": "en", "url": "https://stackoverflow.com/questions/397189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to create custom validator in Asp.net using ActiveRecord i want to create custom validator for checking fields exists in multiple tables A: Best way is to use the Castle validator Component please see: Simple server Side validation and Custom Server Side validation
{ "language": "en", "url": "https://stackoverflow.com/questions/397191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why does windows side by side (winSxS) install policy for auto upgrade when there are known issues between versions? We have an app compiled using MSVC 2K5, SP1 (version 762 msvcrt80) All is well, right up until somebody installs on the same machine .Net3.0SP1, and along with it msvcrt80 version 1433 is installed an...
{ "language": "en", "url": "https://stackoverflow.com/questions/397196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CommandBars.FindControl throwing an exception I am trying to use the FindControl Method of the CommandBars object in a VSTO Word addin to get what else a command bar object Code is as follows private void WireContextMenu(string MenuID,string Tag, string ID, ref Office.CommandBarButton Control) { try ...
{ "language": "en", "url": "https://stackoverflow.com/questions/397210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How many types should be implementing the Repository pattern? I am trying to use the repository pattern in an instance of storing pictures. What I do is save the actual pics in a directory on disk but save data about the pics and what pics go with what object in a database. I was wondering if I should use 2 interf...
{ "language": "en", "url": "https://stackoverflow.com/questions/397214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I'd like to learn Struts.Is there any good web sites or books? I want learn it for abc. And I'd like to know what's the difference between struts 1 and struts 2. A: Check this free book: * *Jakarta Struts Live Also here you can find some good basic code examples. For a Struts 1 vs. Struts 2 comparative, check th...
{ "language": "en", "url": "https://stackoverflow.com/questions/397226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Flexible design - customizable entity model, UI and workflow I want to achieve the following aspects in the software I am building: 1. Customizable entity model 2. Customizable UI 3. Customizable workflow I have thought about an approach to achieve this, I want you to review this and make suggestions: * *Entity o...
{ "language": "en", "url": "https://stackoverflow.com/questions/397227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is Grails worth it? This is half rant, half question. Is it worth using Grails? I'm trying to develop a relatively simple database-driven web application. My expertise is in Java, so naturally Grails seemed like a good choice. At first I thought of using Spring, JPA and Hibernate, but I’ve used that previously and h...
{ "language": "en", "url": "https://stackoverflow.com/questions/397228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "88" }