text
stringlengths
8
267k
meta
dict
Q: GAMS, matrix direct assignment I want to assign values to a 3-D table in GAMS. But it seems it doesn't work as in Matlab.....Any luck ? Code is as followed and the problem is at the last few lines: Sets n nodes / Sto , Lon , Par , Ber , War , Mad , Rom / i ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SiteMapPath not showing sitemap as expected Using a <asp:SiteMapPath> control with the Web.sitemap file below: <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" /> <asp:SiteMapPath ID="SiteMapPath1" runat="server"></asp:SiteMapPath> <asp:Image ID="Image1" runat="server" ImageUrl="~/closed-sign.jpg" Heigh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to keep an important column value in a GROUP BY Here is the example data set i have : id | messageread | timestamp 1 | 'yes' | 999 1 | 'yes' | 0 1 | 'no' | 0 I'm doing so : SELECT * FROM nvm GROUP BY id You will note that the data set is already ORDER BY timestamp DE...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get the source code from an html file I am wondering if you could please help with generating .cpp/.h file from the following html file in a programmatic way (using whatever scripting language, or programming language, or even using editors such as vi or emacs): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to generate array-list of all combinations of a table in C/C++ I want to make automated measurements varying several parameters. There is a table with variable row/column-number containing parameter values, e.g.: a1 b1 c1 a2 b2 c2 a3 b3 c3 Is there an easy was for generating list of Arrays containing all combin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Dismiss keyboard button doesn't work 0 iOS For some reason, in my app, the dismiss keybaord button on the lower right hand corner never works. I am able to use resignFirstResponder on the UITextField correctly, but if the user tries to us that button, nothing happens. any ideas? - (BOOL)textFieldShouldEndEditing:(UI...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Tab suppression callback I have a tab app and I'd like to know if there is a way to get a notification or to setup a callback for when a user suppress the tab from his Facebook page? Because I noticed that even if you remove the tab, you don't necessarily deauthorize the application (and for me it's not the same op...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to handle multitouch I am writing an app in xcode using box2d. Right now I am using the code below. The problem is that it will only handle one touch event. How can I make my code handle all of the touch events, in this case check the location of each touch. I also want to store the touches so that when they end...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Algorithm for placing a grid over a disordered set of points Given a large set (tens of thousands up to millions) of disordered points represented as 3D Cartesian vectors, what's a good algorithm for making a regular square grid (of user-defined spacing) that encloses all of the points? Some constraints: * *The g...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: DelayedJob: How to solve the problem "Job failed to load"? I am using Ruby on Rails 3.1.0 and DelayedJob. As many people on the web I get the "Job failed to load: uninitialized constant Syck::Syck" error, but I think I discovered at least what generates the error (in my case). I have an ActiveModel like the followin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Tree view in VB.Net Is there any way to find a node in treeview using xpath? Also I wanted to expand only the selected path of the node in treeview when found. Sample: + A + B - C + C.1 + C.2 - C.3 - C.3.1 + C.4 + D + E Problem: Find C.3.1 using "C/C.3/C.3.1" and when found expand only C/C.3/C.3.1
{ "language": "en", "url": "https://stackoverflow.com/questions/7507705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a way to dynamically wrap/intercept HtmlHelper extension methods. Think decorator pattern I would like wrap/intercept HtmlHelper extension methods (TextBox, Hidden, etc) provided in System.Web.Mvc.Html to enable reuse of the same Partial Views in 2 separate use cases. Ex of Partial: @model BlogEntry @Html....
{ "language": "en", "url": "https://stackoverflow.com/questions/7507711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Javascript wrap div in/remove anchor on hover I have divs I need to wrap in an anchor tag with href="#" on hover and remove when the mouse leaves. When you hover on ps_image it wrap ps_img with <a href="#">DIV HERE</a> Then unwrap when not hovering. <div class="ps_image"> <div class="ps_img"> <img src="a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to fill UITableViewCell TextLabels with NSDictionary value? I am on the last stage of setting up my Indexed Uitableview for fast scrolling, Once I have finished this I am going to write about my experience to hopefully help anyone that is trying to achieve the same results as myself. However I have one last step...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Server 2005 Transaction Level and Stored Procedures If I use the command SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED and then execute a stored procedure using the EXEC storedProcedureName on the same context, will the stored procedure use the transaction level stated previously or will use a default one? If...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: 'SQLSTATE 57017' (Character Conversion Problem)for SQL UDF java program on the iSeries I followed the instructions at http://www.itjungle.com/mpo/mpo100903-story01.html The UDF looks like this CREATE FUNCTION re_Test(input VARCHAR(500), regex VARCHAR(500)) RETURNS INTEGER EXTERNAL NAME ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Error installing NPM for node.js I'm trying to install npm on ubuntu 11.04 using the "git all the way" method found in this gist I keep getting this error after running sudo make install on npm $ sudo make install ! [ -d .git ] || git submodule update --init --recursive node cli.js install -g -f bash: node: command...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can I use web stack to develop native apps on Windows Phone 7, just as on Windows 8? Windows 8 apps can be developed using web stack(JavaScript, HTML, CSS) or .NET stack(C#, C++, Visual Basic, XAML). What's the situation for Windows Phone 7 development? A: WP7 doesn't have built in support for building apps with HT...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android library having trouble reading stream that openRawResource gives I'm using the plist library to load a plist file: http://code.google.com/p/plist/ I'm using code like so: //InputStream ins = getResources().openRawResource(R.raw.skillsanddrills) InputStream ins = getResources().openRawResource(R.xml.skill...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting the current global messages from FacesContext I have a problem. I need to know whether my page has global errors or not. This is because I have 2 different h:messages (error containers) <h:messages id="errorMsgsContainer" layout="table" rendered="true" styleClass="message-container error-message" infoCla...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507729", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to make hybrid JPG / PNG with 8-bit alpha I would like to put a big (almost full screen) alpha transparent image on a website, but I have the following problem: * *if I use JPG the size and compression is OK, but I cannot make it transparent (100 kB) *if I use PNG-24 the size is HUGE (3-4 MB) *if I use PNG-...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Trying to give groups the ability to have own URL in Grails. (Similar to how you could browse to facebook.com/{username}) I am developing a group based web application in Grails (1.3.7) and one of the fields I have is groupUrl for my Group domain. The theory behind it is I want to give users the ability to browse t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: iphone json data size limitations What's the size limitation for JSON data payloads for an iPhone app? I'm creating a time entry application and am delivering down to the iPhone app all of the time that has been entered for a week for the iPhone user. The JSON data sizes have been around 15-20 KB for a weeks worth...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sending Data and accessing components between multiple forms in Visual Studio I am working on a project with a total of 6 forms. One form is the main form and the other 5 are part of its option menu. The forms on the options menu are for changing settings and modifying data that is used in the main form. For example...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a way to remove a Service Activity from Calendar area in a Microsoft Dynamics CRM Workplace? I need to remove a Service Activity link which is located on the right-hand side of Calendar area under the “Create a New:” section in Workplace. However, I see no way of doing it other than changing /workplace/home...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Drop array values if they exist in a database? I have a list of urls stored in a database, and I want to run a bit of code that checks an array of urls vs what is stored in the database. If the value exists, I want that value from the array dropped. So far, I have a database that contains 3 rows: CREATE TABLE links...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting Reachability changed notifications in the background Im developing an app that uploads media to a server. I use Andrew Donoho's Reachability class to determine if I've got Reachability via WiFi, WWAN or if it is not reachable. (Users can choose if they upload media only over WiFi or WiFi and WWAN). If the ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507756", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Speeding up insert query over 2 databases I have this query below which I am getting certain columns from 1 database and I am then inserting them into another table in another database. I will then Delete the table I am copying from. At the moment it takes 5 minutes and 36 seconds to copy a bit over 5300 records. Is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get row and column indices of matches using `which()` Say I have some matrix, for example: m = matrix(rep(c(0, 0, 1), 4), nrow = 4) m [,1] [,2] [,3] [1,] 0 0 1 [2,] 0 1 0 [3,] 1 0 0 [4,] 0 0 1 If I run which, I get list of normal indices: > which(m == 1) [1] 3 6 9 12 I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: Best methods to group multiple actions together (as one event) At work we use a web application (attask.com) to record projects and tasks etc. It has lots of nice features like comments and status update (ill stop before you think im selling it!) anywho, On the site you can update the status of a project and this is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: GWT - Annotated time line chart with zooming, scrollbar and navigator I am looking for a GWT extension for displaying a Google finance-like chart. (features like zooming, scroll-bar and navigator are required)I want to stay away from flash. I have looked at GWT Highcharts. Anything else worth considering? A: Why no...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MVC3 View With Abstract Property Consider the following. Models public class DemographicsModel { public List<QuestionModel> Questions { get; set; } } //Does not work at all if this class is abstract. public /*abstract*/ class QuestionModel { //... } public class ChooseOneQuestionModel : QuestionModel { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Help Merging 2 PHP Functions (Wordpress) I'm trying to merge two separate PHP functions into one that I can use in my Wordpress theme. I'm using Wordpress functions to get the post meta of the key "_videoembed" which is then trimmed from a YouTube URL down to the YouTube video ID. I'll include both the earlier funct...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: For Guis using Delphi ObjectPascal, does checking .Visible before (potentially) changing it serve any useful purpose? I inherited a GUI implemented in Delphi RadStudio2007 targeted for Windows XP embedded. I am seeing a lot of code that looks like this: procedure TStatusForm.Status_refresh; begin if DataModel.C...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Compiling Windows C++ application with long doubles in VS2010 At work we have MSVS2010 Ultimate, and I'm writing a program which runs exhaustive simulations using real numbers. I'm getting non-trivial round-off errors and I've already taken reasonable steps to ensure my algorithm is as numerically stable as possible...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Android system application DEVICE_POWER permission error I try to use goToSleep() method to put phone into deep sleep. Program was installed into /system/app directory so Android System Info says, that it is a system application, but if i try call goToSleep() i get this error Neither user 10085 nor current process h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to implement database locking across several function in a code igniter model? I'm creating a system that involves the reservation of tickets by many users within a short period of time with only a certain number of reservations possible in total. Say 600 tickets available, potentially all being reserved in 3 ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Firefox reload page loop debugging hints? One of my javascript heavy pages reloads itself endlessly when using a deep link in firefox. (I'm using jquery address plugin btw.) The page works fine in Chrome and IE, but not in FF. I have tried debugging it using firebug, but the problem is that when the page reloads fir...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Multiple Android Application Package .apk files from single source code I would like an Android build system procedure, command line or Eclipse, to generate several .apk files from a single source codebase. Some common reasons for this - having specific versions for markets with different requirements or a free and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: Why does my indexed column appear not to have statistics? I'm using SQL Server and I'm currently trying to debug some queries where the optimizer has chosen a poor execution plan and I noticed for one of my indexed columns that when I run the command: DBCC SHOW_STATISTICS ("tablename", columnname); for this indexed...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Logging info to a disk file using MS Enterprise Library I am trying to create a class that logs information to a txt or xml file on disk using MS Enterprise Library (5.0). I have been following this guide but so far it has been silently failing (no events in the log viewer). Here is my class: public static void logE...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iPhone application, Documents directory on Mac I'm reading through some of the documentation about File Management on iOS. When you create an application for the simulator, does the application get created somewhere on my hard drive? If so, where is it? Also, does this have access to the Documents directory? Li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Silverlight 4 EventTrigger Handled I have two nested Grid (FrameworkElement) items in my application. <UserControl xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"> <Grid x:name="OuterGrid"> <i:Interaction.Triggers> <i:EventTrigger EventName="MouseLeftButtonDown"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Monotouch OpenGL orientation event I'm trying to do something that should be very simple, but the interface builder in xCode is doing some stuff behind the curtains that makes it all very unclear. Basically I want to allow my OpenGL application to be orientation aware, and from what I understand I need to catch thes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to source a script in a Makefile? Is there a better way to source a script, which sets env vars, from within a makefile? FLAG ?= 0 ifeq ($(FLAG),0) export FLAG=1 /bin/myshell -c '<source scripts here> ; $(MAKE) $@' else ...targets... endif A: Some constructs are the same in the shell and in GNU Make. var=1234 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "102" }
Q: Standard layout type and reinterpret_cast Am I allowed to cast from my class to a structure if i have copied the members of the structure to my class? #include <stdint.h> #include <sys/uio.h> class Buffer { public: void * address; size_t size; Buffer(void * address = nullptr, size_t size = 0) :...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to get BitmapImage in codebehind from the image tag in xaml in wpf/silverlight i dont have a problem with binding a bitmapimage to image tag in codebehind for eg. BitmapImage image = new BitmapImage(); imagetaginxaml.Source = image; // this will remove whatever image is currently on the image tag in xaml and att...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where is a complete example of logging.config.dictConfig? How do I use dictConfig? How should I specify its input config dictionary? A: The accepted answer is nice! But what if one could begin with something less complex? The logging module is very powerful thing and the documentation is kind of a little bit overwh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "216" }
Q: SharePoint 2010 and ASHX Handler I'm trying to get a webpart deployed and using a Silverlight webpart with an upload control inside. I am however, receiving the following error in the application log when I access my ashx. Exception information: Exception type: HttpParseException Exception message: Could not creat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add nodes to FireMonkey's TreeView at runtime I can't found any sample in the online documentation, or in the demos included with Delphi XE2, for adding nodes to a FMX.TreeView.TTreeView control at runtime. So, how can I add, remove, and traverse nodes of a FireMonkey TreeView at runtime? A: With AddObject(F...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: XtraGrid row index mismatch after deleteing a row I am currently using a XtraGrid. I have bound the gridControl to a DataTable. When I delete a row from the DataTable, the XtraGrid shows the change. But when I start dealing with row indexes, I get odd behavior. This is (roughly) the code I use to delete the row. Dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: delphi xe2 tms components unavailable under x64 platform Instaled tms components 6.1.4.1 in delphi xe2. Under x32 platform they work ok but under x64 platform they are unavailable. Am I missing something ? A: After some exchange with TMS Software it seems that the problem come with the changes of different platform...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: LiveBindings - TList bound to TStringGrid I have the following example set of code, how can I bind the Data list elements to the TStringGrid using LiveBindings. I need bi-directional updates so that when the column in the grid is changed it can update the underlying TPerson. I have seen example of how to do this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Utility To Count Number Of Lines Of Code In Python Or Bash Is there a quick and dirty way in either python or bash script, that can recursively descend a directory and count the total number of lines of code? We would like to be able to exclude certain directories though. For example: start at: /apps/projects/really...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How to log API Errors on my server? In my Facebook App Insights I see a section called "API Errors Returned" which indicate that I have a few API Errors everyday. How can I log all the API Errors my App generates so I can fix them or at least know what's wrong? A: I am also getting API errors returned according to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: BizTalk set up in dual center environment I have a question with setting up BizTalk clustered servers in both dual center. We have a data center in South of CA and North of CA. We want both BizTalk servers to be running at both dual center, possibly doing the same things. If there's a problem with one of the data...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: mixing my jQuery click events with existing object's onclick attribute I'm using jQuery but dealing with markup produced from JSF pages. A lot of the elements have onclick attributes provided by the JSF code (which isn't my realm). Example: <div onclick="[jsf js to submit form and go to next page]">submit</div> I'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Preferred caching strategy for data-driven applications on mobile devices What is the preferred strategy for creating a mobile application that relies on data to be moved to/from a cloud-based service (thus requiring connectivity)? What mechanisms are typically employed to ensure synchronization while connectivity c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WCF Data Service + Expiring Data (Timer?) I would like to expose a few endpoints via a WCF data service (Singlton) which will maintain a collection of data used to respond to individual requests. Ideally I would like to be able to expire (delete) the data held in memory for a given request after a period of time. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Silverstripe subsites with independent user registrations I'm using the subsites module to make a multi site system. I'd like the users logins to the sites to be independent. So if a user has registered on one site, they can't just go to another subsite and login - they have to register for that site too. In other w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Reassigning an ActiveRecord instance and corresponding foreign keys In Rails/ActiveReocrd is there a way to replace one instance with another such that all the relations/foreign keys get resolved. I could imagine something like this: //setup customer1 = Customer.find(1) customer2 = Customer.find(2) //this would be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is a good standard practice to find a distinct regex patterns from a single field in a table? I'm looking for a standard approach to generate all the unique patterns that can occur in a single field in an sql 2000-2008r2 table. Is there a simple tool that will generate all the different static patterns. Also ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Recommended development web server for Rails 3.1 and Ruby 1.9.2 I have been using Mongrel successfully with rails 2.* and 3.0* development, with ruby 1.8.7. I recently started working with Rails 3.1 and ruby 1.9.2. I got my test app running with WEBrick. I don't like WEBrick. If I forget and simply close the WEBric...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Ruby Selenium - How to check if text is present only once I am working on a application that reports status updates on certain services. I am using Ruby Selenium for testing the application. For the same purpose I wana test some updates that are just plain text - these updates should appear exactly once in the page....
{ "language": "en", "url": "https://stackoverflow.com/questions/7507885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CUDA Runtime error when copying to element of jagged array On the host I have a jagged array implemented with a vector of vector of ints. To set up a jagged array on device, I started by allocating a pointer to a pointer of ints: int ** adjlist; // host pointer int ** d_adjlist; // device pointer Just to cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: AS3: How to make this mouse position detection work properly? I'm new to AS3 so please bare with my basic questions. What I want to do is have a left arrow MC on the left side of the stage and right arrow MC on the right side of stage. When the mouse is over the left 1/3 of the stage, the left arrow appears, on the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dynamically adding container to a dynamic container I have a loop that goes through data from a book and displays it. The book is not consistent in it's layout so I am trying to display it in two different ways. First way(works fine) is to load the text from that section in to a panel and display it. The second way ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Usage of Factory / Abstract Factory Design Patterns in Unit Testing I am told that the Factory / Abstract Factory Design Patterns for writing Unit Test cases is very effective but I havent been able to find any tutorial which clearly demonstrates it. So it will be very helpful if somebody can point me to any existin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can i find the co occurrence of words in a sentences with perl? is there anyone who can help me find the co occurrence of words in a sentence ? the words are listed in two different arrays, the idea is to find the co occurrence of the words in two arrays from the sentences. example: #sentence my $string1 = "...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can I use django as a front end for an already existing database? I have a database populated with data that I want to present as a website. It will be read-only and I was wondering if there was a standard way of presenting the data using django's forms and template syntax to make my job easier. I could code up a si...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Resetting element CSS attributes on container resize event (onresize) I have a function in the onresize event of a wrapper div to resize an element. That function isn't called. Is the onresize event not available for divs? Here is the HTML. <div id="matting" onresize="resize_page();"> <!-- Begin page matting div -...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Need to disable an array of ctrl keys for my site Especially Ctrl+I , which is "mail this page". I'm using wordpress self hosted. So far I've found this code, not sure how to implement it or if it's old. Please no plethora of reasons as to why you find this attempt pointless. A: Really, shouldn't answer, but: The...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507903", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: same query, dramatic different performances on different data. MySQL So, I have this huge database with 40 Millions entries. the query is a simple (a_view is a view!) select * from a_view where id > x LIMIT 10000 this is the behavior I get: If x is a little number (int) the query is super fast. when x > 29 Millions...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: XPath: Selecting a node based on another nodes value I am trying to use a single XPath expression to select a node that has a child node which matches another node in the document. A match would mean that ALL attributes of the node are the same. So if a node was being compared with several attributes doing indivi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I see a `dependency:tree` for artifacts only used in non-default lifecycle steps? I have a Maven project with a number of dependencies. I can run mvn dependency:tree to get a dump of all the artifacts that I depend on, plus their transitive dependencies, etc, turtles all the way down. However, I can someti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: See last comment or stream tag for each friend So right now this looks like: $mq = array( "usr"=>"SELECT uid2 FROM friend WHERE uid1 = me() LIMIT 70", "basics"=>"SELECT name, uid FROM user WHERE uid IN (SELECT uid2 FROM #usr)", "q1" =>"SELECT actor_id FROM stream_tag WHERE target_id = me() AND actor_id I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Kinect Openni - I need to filter out random people from the active user I need major help!!! I am designing a game that will be at a tradeshow which means lots of people walking by. The problem it seems is that once kinect sees you "New user" even if you are just strolling by it seems to kill or mess up the ONISkele...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Moving different projects tracked by git into one repository I have several closely related projects in a directory, and I want them all to be tracked with the same git repository. Right now I have two directories, thing1 and thing2, in a parent directory things. Each directory has its own .git. I want to have one...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Cocoa icon for file type? If I have a file, I can get the icon by doing something such as: NSImage *iconImage = [[NSWorkspace sharedWorkspace] iconForFile: @"myFile.png"]; But if I just wanted to get the icon for a specific file type (example the icon associated with png files, without having a "myFile.png" that al...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to optimize this MySQL query? (moving window) I have a huge table (400k+ rows), where each row describes an event in the FX market. The table's primary key is an integer named 'pTime' - it is the time at which the event occurred in POSIX time. My database is queried repeatedly by my computer during a simulation ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: OpenGL point sprites with depth testing - a blending issue? I am rendering point sprites (using OpenGL ES 2.0 on iOS) as a user's drawing strokes. I am storing these points in vertex buffer objects such that I need to perform depth testing in order for the sprites to appear in the correct order when they're submitte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to use monadic forms? I am implementing a "contact me" form that will send an email when it is submitted. I needed this form to emit custom HTML, so I ended up using monadic forms. The problem is that I do not know how to use a monadic form. the code is below. I have omitted the part that sends e-mail for brevit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: python sort list short of renaming/fixing the logging module on the webservers... when i do a list.sort(), the list entries get placed in the following order: 2011-09-21 19:15:54,731 DEBUG __main__ 44: running www.site.com-110731.log.0.gz 2011-09-21 19:15:54,731 DEBUG __main__ 44: running www.site.com-110731.log.1...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: facebook api - get email with I have for facebook: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>head</title> </head> <body> <h1>head</h1> <p><fb:login-button ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using Manifesto gem with Sinatra I'm very new to Ruby and using Sinatra, mainly so that I can do some quick prototyping of web apps and some of the newer things available in HTML5. I am trying to use Manifesto to generate the application cache needed for an offline web app. I've followed the example listed on github...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: GWT UiHandler for g:Anchor is not firing I essentially have a menu where you can't click the headers, but when you hover over the menu item you can select from the drop down elements. Each of the elements are g:Anchor tags with ui fields associated to them. What I would expect to happen, is that when a user clicks...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I rotate a background image (custom bullet) 90degrees What I am trying to do is make an accordion of sorts with a triangular bullet which rotates to point down when the <dd> slides down. Just to be clear, I want the bullet to animate, not just flip between two images. I know I can do this with css3 and a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: is it possible to use Validation Application Block with WCF REST service? I'm using WCF REST service with API key template and trying to enforce validation using Validation Application Block attribute validation. here is my service: [ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatib...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP object oriented foreach loop I have a CodeIgniter query that brings back an array of objects. My query is querying multiple tables that all have the same field name. So I am using the select to give them aliases. Like this: SELECT t1.platform_brief b1, t2.platform_brief b2 where t1 and t2 are my two tables. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Reading & printing binary data as it is from a binary file using C++ How can I read a binary file (I don't know its type or what is stored in it) and print out the 0s and 1s into a text file? #include <iostream> #include <fstream> #include <string.h> #include <iomanip> using namespace std; int main(int argc, cha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Datepicker events handler I have got this addon to my datepicker but I dont want it to give me an alertbox. I want it to show a div under the datepicker with the event on that day. I don't know how to change the if (event) to a <div> instead of an alert. $(function(){ var events = [ { Title: "Five K for...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: mkbundle produces non-functional console exe I can successfully build a bundled exe from my MonoDevelop C# project, but when I run the bundle, it doesn't do anything; execution is terminated immediately and silently. What am I doing wrong? I'm using Mono 2.10.5 on 64-bit Windows 7 with cygwin generally following th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Where is a good place to find Ruby Selenium tutorials and or documentation that explains what to use for what element? Where is a good place to find Ruby Selenium tutorials and or documentation that explains what to use for what element? Watir has a great place to find this type of information such as: * *Watir ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jquery Validation Plugin I’ve looked over the documentation for the validation plugin and I can’t figure out for the life of me what is wrong with my form/javascript. I load the plugin after I load Jquery, and to my knowledge I didn’t leave anything out. But the page biases the Javascript and goes straight to the ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you query by Date and Date Range in Mongo This would be the equivalent of this SQL statement? Select * from example WHERE date = '2011-09-21' The record is stored with a MongoDate field. I would also like to know the syntax of the between query. A: This would be the equivalent of this SQL statement? Sel...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to create a common WPF base window style? Is there any recommended way with WPF to create a common window style to be used across an application? I have several dialogs that appear in my app, and I would like them all to be styled the same (same window border, ok/cancel button position, etc) and simply have diff...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: join mySQL query, two of the same column names, how to display data? I have created my first join query to display some Wordpress content on a home page of a website, so far so good, but there are two columns in the joined tables with name "ID". I lost ability to use one of the column names as a variable later on (i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: maintain state between custom tag calls? Is there a way to maintain state between tag calls? I need to store the last item passed to a tag that I have created. It appeared as if I could use context to do this, but it doesn't seem to work. Here is my code: @register.simple_tag(takes_context=True) def date_divider(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: why does an error result from zend autoloader testing if a non-existant class exists? Say I've registered the extra namespace "Tracker_" in the config file for some classes I've written, using autoloadernamespaces[]="Tracker_" Things with this namespace and autoloader work as expected except when I am testing for e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Instantiating immutable paired objects Is it possible to create a class with an immutable reference to a partner object, or does it have to be a var that I assign after creation? e.g. class PairedObject (p: PairedObject, id: String) { val partner: PairedObject = p // but I need ref to this object to create p! } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7507965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }