text
string
meta
dict
Q: using C# regex. question is how to use "=" I`m parsing SQL query with C# Regex. I need also to make my pattern to understand "=", for example: string pattern = @"...something...(where)\s\w*\s*(order by)*...something else..."; the following query should match my pattern: select fieldslist from mytable where fieldvalu...
{ "language": "en", "url": "https://stackoverflow.com/questions/244354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Farpoint spreadsheet - disable cell right click menu I'm using Farpoint Spreadsheet for WinForms with C#. How can I disable the "context menu" displayed when right-clicking over a cell that is being edited? A: set AutoClipboard property of fpspread component to false
{ "language": "en", "url": "https://stackoverflow.com/questions/244360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# 3.5 - Connecting named pipe across network What is the correct way to setup a named pipe in C# across a network? Currently I have two machines, 'client' and 'server'. Server sets up its pipe in the following manner: NamedPipeServerStream pipeServer = new NamedPipeServerStream( "pipe", PipeDirection.InOut,...
{ "language": "en", "url": "https://stackoverflow.com/questions/244367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Playing small sounds in Java game For the computer game I'm making, I obviously want to play sound. So far, I've been using AudioClip to play WAV files. While this approach works fine, the WAV files tend to be gigantic. A few seconds of sound end up being hundreds of kB. I'm faced with having a game download that's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Query antivirus definitions date? Is it possible at all to query (WMI?) the virus defnintions date of definitions installed on remote computers? I'd like to start specificially with Symantec Endpoint Protection, and then branch out to other antivirus products. This is a WinForms, .NET project. A: Symantec Endpoint ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hibernate transaction problem We are using Hibernate Spring MVC with OpenSessionInView filter. Here is a problem we are running into (pseudo code) transaction 1 load object foo transaction 1 end update foo's properties (not calling session.save or session.update but only foo's setters) validate foo (using hiberna...
{ "language": "en", "url": "https://stackoverflow.com/questions/244381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP fork without having child inherit the parent's file descriptors? I'm trying to run a shell command using the backtick operators, but the fact that the child process inherits php's open file descriptors is problematic. Is there a way to keep this from happening? I'm running PHP 5.1.2 A: The only way I really kn...
{ "language": "en", "url": "https://stackoverflow.com/questions/244385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is the proper syntax for a cross-table SQL query? Right now, I have SELECT gp_id FROM gp.keywords WHERE keyword_id = 15 AND (SELECT practice_link FROM gp.practices WHERE practice_link IS NOT NULL AND id = gp_id) This does not provide a syntax error, however for values where it should return row(...
{ "language": "en", "url": "https://stackoverflow.com/questions/244390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery Toggle State Here's the quick and skinny of my issue: $("a").toggle(function() { /*function A*/ }, function() { /*function B*/ }); Inside function A a form is displayed. If the user successfully completes the form, the form is hidden again (returning to it's original state). Inside function B the same form i...
{ "language": "en", "url": "https://stackoverflow.com/questions/244392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How can I browse the local network from a web client using C#? Our web client needs a way to browse the local network and select location for file storage. This will then be returned to the webpage as a UNC name. On a native client this easily accomplished by using Shell32 functions. I've looked at ASP FileUpload, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to check if program is running in local console? In Windows Server 2003, how I can check if my program is running in local console ("on the screen of the server machine") instead of remote session? I'm using Delphi Win32, so any Windows API based method should work.. A: Wouldn't the session number tell you this...
{ "language": "en", "url": "https://stackoverflow.com/questions/244397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: app GUI similar to Control Panel in Vista I was playing a bit with Windows Vista (still using XP) and I liked how the standard Control Panel worked. Do you think this design is good also for normal applications? I like the idea of showing main topics with large fonts + icons. Details within each main topic are displ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Deleting items from one collection in another collection I've got two collections (generic Lists), let's call them ListA and ListB. In ListA I've got a few items of type A. In ListB I've got some items of type B that have the SAME ID (but not same type) as the items in ListA, plus many more. I want to remove all the...
{ "language": "en", "url": "https://stackoverflow.com/questions/244408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Best examples of data visualisation? I love data visualisation and to spread that love I thought we could share our favourite examples of data visualisation: Chess moves http://turbulence.org/spotlight/thinking/chess.html Chris Harrison's Visualisations http://www.chrisharrison.net/projects/visualization.html I espe...
{ "language": "en", "url": "https://stackoverflow.com/questions/244416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Best way to track changes and make changes from Mysql -> MSSQL So I need to track changes that happen on a Mysql table. I was thinking of using triggers to log all the changes made to it and then save these changes in another table. Then I will have a cron script get all these changes and propagate the changes into ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: get image from scanner How do you get a image from the scanner using .NET (C#) on Vista? Preferably to have the possibility to set the DPI. There are a few controls on the market that do this, but they don't seem to work very well. A: You can P/Invoke into twain_32.dll, like with the CodeProject sample at http://ww...
{ "language": "en", "url": "https://stackoverflow.com/questions/244425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: If I have two assemblies with the same name in the GAC, how do I tell .Net which to use? I have two assemblies with the same name in the Global Assembly cache, but with different version numbers. How do I tell my program which version to reference? For the record, this is a VB.Net page in an ASP.Net web site. A: A...
{ "language": "en", "url": "https://stackoverflow.com/questions/244431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Map two lists into one single list of dictionaries Imagine I have these python lists: keys = ['name', 'age'] values = ['Monty', 42, 'Matt', 28, 'Frank', 33] Is there a direct or at least a simple way to produce the following list of dictionaries ? [ {'name': 'Monty', 'age': 42}, {'name': 'Matt', 'age': 28}...
{ "language": "en", "url": "https://stackoverflow.com/questions/244438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Refactoring and concurrent development branches Let's say you have several maintenance branches for existing releases of your software. Some developers are making direct changes in the maintenance branches, and merging periodically into the trunk. Now comes an extensive refactoring in the trunk codeline, scheduled f...
{ "language": "en", "url": "https://stackoverflow.com/questions/244439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Best refactoring for the dreaded While (True) loop If, like me, you shiver at the site of a While (True) loop, then you too must have thought long and hard about the best way to refactor it away. I've seen several different implementations, none really better than any other, such as the timer & delegate combination...
{ "language": "en", "url": "https://stackoverflow.com/questions/244445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What is an Efficient algorithm to find Area of Overlapping Rectangles My situation * *Input: a set of rectangles *each rect is comprised of 4 doubles like this: (x0,y0,x1,y1) *they are not "rotated" at any angle, all they are "normal" rectangles that go "up/down" and "left/right" with respect to the screen *t...
{ "language": "en", "url": "https://stackoverflow.com/questions/244452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Best documentation for Boost:asio? The documentation available on the boost website is... limited. From what I've been able to read, the general consensus is that it is simply difficult to find good documentation on the boost::asio library. Is this really the case? If so, why? Notes: * *I have already found the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "148" }
Q: UML standards guide / Best Practices Does anyone know of a decent UML standards guide? My company currently relies on UML 2.0 (rightly or wrongly) to do the majority (read all) of their design work. I have been asked to come up with a draft 'best practice' guide to help other developers develop better models. The ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/244457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using Google Spreadsheet as DB for apps I want to use Google spreadsheets to store data online so multiple people can enter and maintain data, then publish or export (csv, xls, ods) the sheet for their application. What is the easiest way to process the sheet? If the data can be accessed as a link the updates could ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to deal with LinkageErrors in Java? Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux. My application, using the Java Plugin Framework, appears unable to convert a dom4j-created XML document to Batik's implementation of the SVG specification. On the co...
{ "language": "en", "url": "https://stackoverflow.com/questions/244482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: How do I sort a CArray of a user defined type? Is there a built-in way to sort a CArray in C++? A: std::sort() should work: CArray<int> arrayOfInts; arrayOfInts.Add(7); arrayOfInts.Add(114); arrayOfInts.Add(3); std::sort(arrayOfInts.GetData(), arrayOfInts.GetData()+arrayOfInts.GetSize()); This uses the pointer to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I tell if my managed code is leaking memory due to native library calls? I have a managed dll that calls into a native library. This native library generally returns IntPtrs. These can be passed in to other methods in the native library to do things, or to tell the library to free the instance associated w...
{ "language": "en", "url": "https://stackoverflow.com/questions/244489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MFC Panel and window handle Is there something like a panel that I can use in a MFC application. This is to overlay the default window in MFC (a dialog application). Then to paint the panel black and paint some random stuff on top of it. Something like a view port. is there a better option than this to achieve the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/244492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Homemade vs. Java Serialization I have a certain POJO which needs to be persisted on a database, current design specifies its field as a single string column, and adding additional fields to the table is not an option. Meaning, the objects need to be serialized in some way. So just for the basic implementation I wen...
{ "language": "en", "url": "https://stackoverflow.com/questions/244493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Best messaging medium for real-time SOA applications? I'm working on a real time application implemented using in a SOA-style (read loosely coupled components connected via some messaging protocol - JMS, MQ or HTTP). The architect who designed this system opted to use JMS to connect the components. This system is r...
{ "language": "en", "url": "https://stackoverflow.com/questions/244494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why does OS X define 'nil' At least the libsigc++2 project is hit by OS X headers defining nil on the preprocessor level, outside of namespaces etc. At least 10.5.5 and XCode 3.1 have this. Note that it is in effect not only in Objective-C sources but C++ as well. Short question: why? http://ardour.sourcearchive.com...
{ "language": "en", "url": "https://stackoverflow.com/questions/244499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Preserve mapped drive letter information during UAC elevation We have an application that needs to know the path that it is executed from (which is always a network path). We set up part of our configuration based on the path that the application is launched from, and we really want that configuration to use mapped ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How do I check for valid (not dead) links programmatically using PHP? Given a list of urls, I would like to check that each url: * *Returns a 200 OK status code *Returns a response within X amount of time The end goal is a system that is capable of flagging urls as potentially broken so that an administrator c...
{ "language": "en", "url": "https://stackoverflow.com/questions/244506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What's the standard way to determine the number for a primary key? I'm planning to make a very simple program using php and mySQL. The main page will take information and make a new row in the database with that information. However, I need a number to put in for the primary key. Unfortunately, I have no idea about ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Where is a reliable registry key to find install location of Excel 2007? Where is a reliable registry key to find install location of Excel 2007? A: How about: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\X.0\Common\InstallRoot] which contains a key named 'Path' with the installation directory of that versio...
{ "language": "en", "url": "https://stackoverflow.com/questions/244517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Embedded browser with iframe I am writing a web application that will run in kiosk mode on a touch screen. I am currently only targeting it for running on Firefox 3. A few of the use cases I have need to visit external sites. I wish to do so with an embedded browser, which I'm tackling with the help of an <iframe>. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there an alternative to string.Replace that is case-insensitive? I need to search a string and replace all occurrences of %FirstName% and %PolicyAmount% with a value pulled from a database. The problem is the capitalization of FirstName varies. That prevents me from using the String.Replace() method. I've seen we...
{ "language": "en", "url": "https://stackoverflow.com/questions/244531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "312" }
Q: Multiselect listbox bound to database in Delphi 6 I'm using Delphi 6, and I want a database bound list box with multiselect. I found three types of List boxes: TListBox, TDBListBox and TDBLookupListBox. As far as I can understand, TListbox is not bound to database. TDBListBox and TDBLookupListBox can't be multise...
{ "language": "en", "url": "https://stackoverflow.com/questions/244536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Create object from XML string in Ruby I am trying to deserialize an object from XML in Ruby. Something simple like: u = User.new({:client_key => "Bar"}) v = User.new(u.to_xml) I get an error: NoMethodError: undefined method 'stringify_keys!' for #String:0x20fc7cc> I'm not sure what I have to do in order to get ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Adding to multiple tables in rails I'm sure this is a relatively simple question, and there must be a good sensible rails way of doing it, but I'm not sure what it is. Basically I'm adding books to a database, and I want to store the Author in a separate table. So I have a table called authors which is referenced by...
{ "language": "en", "url": "https://stackoverflow.com/questions/244569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What are the best options available for a rich UI in an ASP.NET MVC application? So far I've found the following components for building ASP.NET MVC views: * *Yahoo UI (YUI) *Ext JS *Flexgrid (grid only) What are the other options that are currently available which inlcude a nice grid component? A: Check ou...
{ "language": "en", "url": "https://stackoverflow.com/questions/244577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is parentViewController always a Navigation controller? I was kind of scratching my head at this a week ago, and now with a little bit more Cocoa experience under my belt I feel like I have an inkling as to what might be going on. I'm making an application that is driven by a UINavigationController. In the AppDeleg...
{ "language": "en", "url": "https://stackoverflow.com/questions/244588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why am I getting this error:"Cross-thread operation not valid: Control lbFolders accessed from a thread other than the thread it was created on."? This is baffling me, maybe somebody can shine the light of education on my ignorance. This is in a C# windows app. I am accessing the contents of a listbox from a threa...
{ "language": "en", "url": "https://stackoverflow.com/questions/244591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Display JSON/YAML hierarchy as a tree in HTML? I have YAML data that looks sort of like this, but ~150k of it: --- all: foo: 1025 bar: baz: 37628 quux: a: 179 b: 7 ...or the same thing in JSON: {"all":{"bar":{"baz":"37628","quux":{"a":"179","b":"7"}},"foo":"1025"}} I want to present this co...
{ "language": "en", "url": "https://stackoverflow.com/questions/244601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do I retrieve relevance value for ThinkingSphinx search results? Is there any way to retrieve relevance values with results with the array returned by ThinkingSphinx? Percentages, points or whatever, just something I can work with? A: Yep - you can iterate over the result set, and retrieve the weight for each:...
{ "language": "en", "url": "https://stackoverflow.com/questions/244605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Duplicate spring configurations being loaded? I'm looking at the output from spring being loaded up by tomcat and there's something very strange...Everything is duplicated. What would cause this? Whatever it is, it's causing my application to run in odd ways. Additional Info: The application is a web app. All the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: structuring large web application for multiple developers I've got several developers about to start working on the front end of a jquery-based web application. How can we structure the application so that multiple developers can work on the ui at the same time. The end result for the user will just be one web "page...
{ "language": "en", "url": "https://stackoverflow.com/questions/244631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Git thinks I am rewriting one of my files everytime I make a small change I have a medium size Java file. Everytime I make a change to one of my files, BuildTable.java, Git reports it as a massive change, even if is only a line or two. BuildTable.java is about 200 lines and the change in this commit only changed a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/244639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: C# refreshing textbox from BindingSource I am having difficulty refreshing windows forms controls that are using a BindingSource object. We have a CAB/MVP/SCSF client that I (actually “we” since it is a team effort) are developing that will interact with WCF services running on a remote server. (This is our first a...
{ "language": "en", "url": "https://stackoverflow.com/questions/244640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Get elapsed time in Qt I'm looking for the equivalent in Qt to GetTickCount() Something that will allow me to measure the time it takes for a segment of code to run as in: uint start = GetTickCount(); // do something.. uint timeItTook = GetTickCount() - start; any suggestions? A: How about QTime? Depending on you...
{ "language": "en", "url": "https://stackoverflow.com/questions/244646", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "79" }
Q: How do I get the "reverse" tangent in objective-c? I know that tan(angle) gets me the tangent. But how do I do the "reverse tangent" so that I can get the angle given the length of both sides of the right triangle? I'm assuming there is a method for this in math.h? A: There should be an atan() function. For example...
{ "language": "en", "url": "https://stackoverflow.com/questions/244647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you remove two digits in smallmoney with tsql? Sign. My tsql kungfu sucks. I have a fee that is of type small money. When I exported as SQL from MS Access the column that represents the fee was stored as text, for example $3.28 was stored as "00000328". When I imported this into MS SQLServer I changed the dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/244663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Need to set color of link This is the css for setting the color for h1 text that is linked: .nav-left h1 a, a:visited { color: #055830; } <div class="nav-left"> <h1><a href="/index.php/housing/">Housing</a></h1> </div> It does not look like it is working appropriately, any help is appreciated. A: What...
{ "language": "en", "url": "https://stackoverflow.com/questions/244665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: UPDATE statement in Oracle using SQL or PL/SQL to update first duplicate row ONLY I'm looking for an UPDATE statement where it will update a single duplicate row only and remain the rest (duplicate rows) intact as is, using ROWID or something else or other elements to utilize in Oracle SQL or PL/SQL? Here is an exa...
{ "language": "en", "url": "https://stackoverflow.com/questions/244671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Case (or switch) in a for loop or for loop in a case (or switch)? Can it be known in general whether or not placing a case within a for loop will result in bad assembly. I'm interested mainly in Delphi, but this is an interesting programming question, both in terms of style and performance. Here are my codez! ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/244677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What do parentheses in a C variable declaration mean? Can someone explain what this means? int (*data[2])[2]; A: If you know how to read expressions in C, then you're one step away from reading complicated declarations. What does char *p; really mean? It means that *p is a char. What does int (*data[2])[5]; mean...
{ "language": "en", "url": "https://stackoverflow.com/questions/244680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: How to combine two branches from two different repositories in a single repository? The structures of my Git repositories look like this: A-B-C-D-E-F # master branch in separate repo1 A-B-C-D-E-G-H # master branch in separate repo2 A-H are simple commits. As you can see the repositories are related (repo2 is a fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/244695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: does YUI have selectors like in jQuery? Does YUI have selector methods like jQuery? e.g. get me all div's that are children of <table> that have links in them? A: YUI 3 (currently in preview release) has explicitly JQuery-like selectors: Y.all('.foo').set('title', 'Go!').removeClass('off'); Take a look at: * *h...
{ "language": "en", "url": "https://stackoverflow.com/questions/244699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Learning/Implementing Design Patterns (For Newbies) I'm a confused newbie and hobbyist programmer trying to get a grip on this, so forgive me if my question is a little off or doesn't make much sense. I see a lot of questions on SO revolving around the use of design patterns, and I'm wondering if anyone has a good r...
{ "language": "en", "url": "https://stackoverflow.com/questions/244706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "88" }
Q: Propagate Permissions to Javascript I'm debating the best way to propagate fairly complex permissions from the server to an AJAX application, and I'm not sure the best approach to take. Essentially, I want my permissions to be defined so I can request a whole set of permissions in one shot, and adjust the UI as appr...
{ "language": "en", "url": "https://stackoverflow.com/questions/244715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Could someone give me a "hello world" example of logging in ASP.NET? I'm trying to get a bare-bones example of logging going in my ASP.NET application. I would like to use the My.Log functionality to write out error log messages to a text log file. I have tried several things via Google but none of them seem to work...
{ "language": "en", "url": "https://stackoverflow.com/questions/244719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: opengl set texture color with vertex color Because I need to display a huge number of labels that move independently, I need to render a label in pyglet to a texture (otherwise updating the vertex list for each glyph is too slow). I have a solution to do this, but my problem is that the texture that contains the gly...
{ "language": "en", "url": "https://stackoverflow.com/questions/244720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: AJAX console window with ANSI/VT100 support? I'm planning to write gateway web application, which would need "terminal window" with VT100/ANSI escape code support. Are there any AJAX based alternatives for such a task? I'm thinking something like this: http://tryruby.hobix.com/ My preferred backend for the system is...
{ "language": "en", "url": "https://stackoverflow.com/questions/244750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the best way to move files from one server to another with PHP? I want to setup a CRON that runs a PHP script that in turn moves XML file (holding non-sensitive information) from one server to another. I have been given the proper username/password, and want to use SFTP protocol. The jobs will run daily. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/244752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Automatic .aspx publishing in SharePoint I am currently publishing code behind .aspx in SharePoint. I can automatically publish the .dll to the bin folder of the virtual directory, but I cannot figure out how to push the .aspx pages and images to the server without manually using SharePoint Designer. Where does the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery Animation - Smooth Size Transition So this might be really simple, but I haven't been able to find any examples to learn off of yet, so please bear with me. ;) Here's basically what I want to do: <div>Lots of content! Lots of content! Lots of content! ...</div> .... $("div").html("Itsy-bitsy bit of conten...
{ "language": "en", "url": "https://stackoverflow.com/questions/244758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Builder design pattern with inheritance: is there a better way? I'm creating a series of builders to clean up the syntax which creates domain classes for my mocks as part of improving our overall unit tests. My builders essentially populate a domain class (such as a Schedule) with some values determined by invoking...
{ "language": "en", "url": "https://stackoverflow.com/questions/244772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Can comments be used in JSON? Can I use comments inside a JSON file? If so, how? A: Here is what I found in the Google Firebase documentation that allows you to put comments in JSON: { "//": "Some browsers will use this to enable push notifications.", "//": "It is the same for all projects, this is not your pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/244777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9284" }
Q: Sharing code in respond_to blocks I have the following before_filter: def find_current_membership respond_to do |wants| wants.html { @current_membership = @group.memberships.for(@current_user) } wants.rss {} wants.js { @current_membership = @group.memberships.for(@current_user) } end ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: YAML serialization library for C++? YAML seems like a great format for configuration files & data binding persistent objects in human-readable form... Is there a C++ library that handles YAML? Does Boost::Serialization have plans for a YAML option? EDIT: I would prefer an OO library. A: Try the YAML component from ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Porting MATLAB functions to Scilab. How do I use symbolic? I'm porting some MATLAB functions to Scilab. The cool thing is that there is a conversion toolbox that make things very easy. The problem is I did not find the counterpart to the syms function, and the symbolic toolbox in general. (I'd like a port of the Con...
{ "language": "en", "url": "https://stackoverflow.com/questions/244803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to use image resource in asp.net website? I have a c# site which makes use of a lot of images with embedded english text. How can I use a standard resource file to swap out images depending on the language? I have a resx file in my App_GlobalResources directory, but I can't seem to get it plugged into an asp:i...
{ "language": "en", "url": "https://stackoverflow.com/questions/244807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: text_field_with_auto_complete inside form_for Simple question really - how do I use text_field_with_auto_complete inside a form_for block? I've tried doing f.text_field_with_auto_complete but that gives an error, and just using text_field_with_auto_complete by itself doesn't seem to do anything. Am I missing somethi...
{ "language": "en", "url": "https://stackoverflow.com/questions/244808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What's the Best way to Generate a Dynamic XML for Web Service? For my web service component, I need to generate a relatively large XML (~500 lines) according to many factors. I am facing a few different choices here: 1. StringBuilder 2. XmlWriter class 3. C# object with serialization??? Which one should I use. Is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/244811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: NHibernate one-to-one mapping where second table data can be null I have an existing database with the table Transactions in it. I have added a new table called TransactionSequence where each transaction will ultimately have only one record. We are using the sequence table to count transactions for a given account. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Using "ref" and/or "out" for Object type I'm stuck with .Net 1.1 application (i.e. I can not use the generics goodies from 2.0 for now), and I was trying to optimize some parts of the code. As it deals a lot with runtime callable wrappers, which need to be released, I ended up to create a utility method which loops ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Unit testing Visitor pattern architecture I've introduced visitors as one of core architecture ideas in one of my apps. I have several visitors that operate on a same stuff. Now, how should I test it? Some tests I'm thinking of are a bit larger then a unit test should be (integration test? whatever) but I still wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/244845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Ranking method used by SQL Server for Fulltext indexing I'm having some problems with the ranking used by fulltext search in SQL Server. Suppose a user searches for two words, "foo bar". We assume the user intends to do an OR search, so we pass "foo OR bar" to our CONTAINSTABLE call. What we're finding is that an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: .NET: How to know when serialization is completed? When I construct my control (which inherits DataGrid), I add specific rows and columns. This works great at design time. Unfortunately, at runtime I add my rows and columns in the same constructor, but then the DataGrid is serialized (after the constructor runs) add...
{ "language": "en", "url": "https://stackoverflow.com/questions/244854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Autocomplete on SQL Management Studio? Does anyone know if there's an add-in that does autocomplete for queries on SQL Management Studio? A: And SQL Server 2008 has autocomplete/IntelliSense built in. A: You can also try Devart's free SQL Complete. http://www.devart.com/dbforge/sql/sqlcomplete/ A: ApexSQL Comple...
{ "language": "en", "url": "https://stackoverflow.com/questions/244860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Change the default list aspx pages in SharePoint Is there a way to change the default pages used to edit/create/view a Sharepoint list item without using SharePoint designer? Since I've already created the aspx files on the development machine, it seem's a bit silly to have to install SharePoint designer on the cust...
{ "language": "en", "url": "https://stackoverflow.com/questions/244861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Render image in custom webpart from Picture Library I have a custom webpart that is displaying dynamic list data, it needs to render an image from a Picture Library (or at least provide me the URL so I can encapsulate it with an tag), however, none of the fields in the Picture Library seem to contain the image URL?...
{ "language": "en", "url": "https://stackoverflow.com/questions/244875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best approach for redirecting a large number of old URLs to new URLs? We are re-platforming for a client, and they are concerned about SEO. Their current site supports SEO friendly URLs, and so does the new platform. So for those, we are just going to create the same URL mapping. However, they have a large number of...
{ "language": "en", "url": "https://stackoverflow.com/questions/244879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: New dynamic variable in C# 4.0 Can dynamic variables in C# 4.0 be members on a class or passed into or returned from methods? var from C# 3.0 couldn't but I haven't seen any mention anywhere of whether it is possible or not with dynamic. A: Yes. There's a big difference between var and dynamic. var just means "let ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the best way to implement "remember me" for a website? I want my website to have a checkbox that users can click so that they will not have to log in each time they visit my website. I know I will need to store a cookie on their computer to implement this, but what should be contained in that cookie? Also,...
{ "language": "en", "url": "https://stackoverflow.com/questions/244882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "547" }
Q: How do I make JSP tag files NOT ignore all whitespace? I'm really stumped on this one. I want to output a list and have the tag file take care of commas, singular versus plural, etc. but when I display the list it completely ignores whitespace so everythingrunstogetherlikethis. I tried using the HTML entities "thins...
{ "language": "en", "url": "https://stackoverflow.com/questions/244884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I inject a WebRequest/Response dependency? I'm struggling to separate the dependencies in the following code: public static SiteConnector ConnectToSite(String Logon, String Password) { HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(_URI); ConfigureRequest(Logon, Passwor...
{ "language": "en", "url": "https://stackoverflow.com/questions/244885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: From Child instance call base class method that was overridden Consider the following code: Public Class Animal Public Overridable Function Speak() As String Return "Hello" End Function End Class Public Class Dog Inherits Animal Public Overrides Function Speak() As String Return "Ruff" En...
{ "language": "en", "url": "https://stackoverflow.com/questions/244886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What are the Conventional GEM PATHS for Ruby under OS X 10.5? I have a performance problem with my ruby on my machine, which I think I have isolated to loading libraries (when #require is called), so I'm trying to work out whether ruby is searching too many folders for libraries. When I run $ gem environment RubyGe...
{ "language": "en", "url": "https://stackoverflow.com/questions/244889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Is JasperReports can be a good replacement for a CGI based web report framework We have a CGI based web report framework written in C/C++. The CGI client connects with proprietary code which in turn connects to database. We are looking for a better Java based replacement for CGI due to performance, maintenance and p...
{ "language": "en", "url": "https://stackoverflow.com/questions/244891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Trap the Worksheet Unprotect event in Excel I have a protected Excel worksheet, without a password. What I'd like to do is trap the event that a user unprotects the worksheet, so that I can generate a message (and nag 'em!). I can setup event checking for the application, for when new workbooks are opened, etc., bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/244892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to programmatically detect corrupt Access 2007 database tables? Is it possible via code to programmatically (from .NET for example via SQL query) to ask an Access database if it is corrupt or have tables with corrupt rows in it? //Andy A: None of the application/database level objects have such an "i...
{ "language": "en", "url": "https://stackoverflow.com/questions/244896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why is a password salt called a "salt"? Is there a significance to the word "salt" for a password salt? A: I would guess because it's easy to add "salt" (NaCl or a fixed string). But once you do, the output is irrevocably changed (food, encrypted password). A: I had thought it related to the verb salt ... (salt aw...
{ "language": "en", "url": "https://stackoverflow.com/questions/244903", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Split string into sentences using regular expression I need to match a string like "one. two. three. four. five. six. seven. eight. nine. ten. eleven" into groups of four sentences. I need a regular expression to break the string into a group after every fourth period. Something like: string regex = @"(.*.\s...
{ "language": "en", "url": "https://stackoverflow.com/questions/244913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Dictionary or List with C# 3.5? I often use Dictionary in C#2.0 with the first key as string that was containing a unique identifier. I am learning C#3.0+ and it seems that I can now simply use a List and simply do LINQ on that object to get the specific object (with the .where()). So, if I understand well, the Dict...
{ "language": "en", "url": "https://stackoverflow.com/questions/244916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Internet Explorer 7 Ajax links only load once I'm writing an application and I'm trying to tie simple AJAX functionality in. It works well in Mozilla Firefox, but there's an interesting bug in Internet Explorer: Each of the links can only be clicked once. The browser must be completely restarted, simply reloading th...
{ "language": "en", "url": "https://stackoverflow.com/questions/244918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: WPF ControlTemplate for scrolling TreeView Control I'm using a the TreeView control and it scrolls automatically to left-align TreeViewItem when one of them is clicked. I've gone looking at my Styles and ControlTemplates, but I haven't found anything. Is there a default ControlTemplate that causes this? I want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Any way to enforce numeric primary key size limit in sql? I'd like to create a table which has an integer primary key limited between 000 and 999. Is there any way to enforce this 3 digit limit within the sql? I'm using sqlite3. Thanks. A: SQLite supports two ways of doing this: Define a CHECK constraint on the pri...
{ "language": "en", "url": "https://stackoverflow.com/questions/244934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Inject App Settings using Windsor How can I inject the value of an appSettings entry (from app.config or web.config) into a service using the Windsor container? If I wanted to inject the value of a Windsor property into a service, I would do something like this: <properties> <importantIntegerProperty>666</import...
{ "language": "en", "url": "https://stackoverflow.com/questions/244935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Can anyone help me convert this ANTLR 2.0 grammar file to ANTLR 3.0 syntax? I've converted the 'easy' parts (fragment, @header and @member declerations etc.), but since I'm new to Antlr I have a really hard time converting the Tree statements etc. I use the following migration guide. The grammar file can be found ...
{ "language": "en", "url": "https://stackoverflow.com/questions/244936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }