text
stringlengths
8
267k
meta
dict
Q: Glassfish + SqlServer + Liferay Bug I keep getting errors related to connection pool when I try to deploy liferay. My connection pool seems to be setup correctly. What could it be? A: If you are configuring Glassfish with SqlServer using the javax.sql.ConnectionPoolDataSource the DataSource Classname should be com....
{ "language": "en", "url": "https://stackoverflow.com/questions/7519727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to prevent users from editing/deleting cases' activity history records I'm preparing an org for a call center and the customer doesn't want the agents to be editing or deleting a cases' activity history records (for instance, if an email was sent, that record shouldn't be deleted from the history). Is there a wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to ensure location updates continue indefinitely? The app is handling location updates and sending the location back to a server. The app does not turn the location updates off. This is for devices permanently plugged into power, so battery is not an issue. By design, will the location updates continue indefinit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Zend Form - setting defaults for multi checkbox The HTML for my checkbox list is like this: <dt id="list-label"> <label for="list" class="optional"> Choose which feeds to include in the mix </label> </dt> <dd id="list-element"> <label for="list-1"> <input type="checkbox" name="list[]" id...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why bit shifting? I was recently looking at a config file that was saving some cryptic values. I happened to have the source available, so I took a look at what it was doing, and it was saving a bunch of different values and bit shifting them into each other. It mystified me why someone would do that. My question...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: PDF Add Text and Flatten I'm developing a web application that displays PDFs and allows users to order copies of the documents. We want to add text, such as "unpaid" or "sample", on the fly when the PDF is displayed. I have accomplished this using itextsharp. However, the page images are easily separated from the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: XML Generation Error Installing SQL Server Express 2008 on Windows 8 Disclaimer: Yes, I know Windows 8 is a pre-release and things won't necessarily work. I still need to do this. I'm trying to install SQL Server Express 2008 R2 on Windows 8 32-bit (via Virtual Box). When I run the installer, I get an error: Databas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Validating HTML Tags in a String in C# Assume that we have the following HTML strings. string A = " <table width=325><tr><td width=325>test</td></tr></table>" string B = " <<table width=325><tr><td width=325>test</td></table>" How can we validate A or B in C# according to HTML specifications? A should return true w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Writing a polling Windows service I usually write Windows services in C# but I'm giving it a go in F#. For a polling serivce, like this one, I ordinarily use a class I've written, which is similar to BackgroundWorker. It spawns a background thread and fires an OnWork method at regular intervals. (Complete code is he...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: SQL Azure: sp_helptext gives non-runnable source code When trying to automate reading out constraint information using sp_helpconstraint I got the bright idea of pulling out the source code of the built-in SP directly and run it myself (since it returns multiple result sets so those can't be stored in a temp table)....
{ "language": "en", "url": "https://stackoverflow.com/questions/7519766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to programatically turn on/off a Data Annotation Validation Attribute So, I am using ASP.NET MVC 3 and Entity Framework 4.1 (code-first). I have a class like this: public class Person { public int Id { get; set; } public string Name { get; set; } [Range(18, 99)] public int Age { get; set; } } Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Set Directories for Silent Install I've created a Basic MSI project and have a fully functional installer. Some directories need path values found in the registry. I have a few "Set Directory" custom actions to handle this for me. The regular GUI installer works just fine, but the silent install doesn't seem to run ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is Mercurial Server a must for using Mercurial? I am trying to pick a version control software for our team but I don't have much experience for it before. After searching and googling, it seems Mercurial is a good try. However, I am a little bit confused about some general information about it. Basically, our team ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What are some strategies for updating volatile data in Solr? What are some strategies for updating volatile data in Solr? Imagine if you needed to model YouTube video data in a Solr index: how would you keep the "views" data fresh without swamping Solr in updates? I would imagine that storing the "views" data in a d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: adding conditional statement inside UPDATE The query: UPDATE empPac SET quantityLimit = allocation, allocationStart = '"&allocationStart&"', nextUpdate = DATEADD(mm, allocationMonths, "&allocationStart&"), lastUpdate = GETDATE(), quantityIssued = 0, quantityShipped = 0 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Facebook app on fan page problems (error 404) I see this issue has appeared a few times but none of the solutions have worked for me. Here is my app: https://www.facebook.com/apps/application.php?id=168373039912688 It's basically an image of a poster: http://www.clare-ents.com/test/facebook/index.html I want this im...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Assign multiple new variables on LHS in a single line I want to assign multiple variables in a single line in R. Is it possible to do something like this? values # initialize some vector of values (a, b) = values[c(2,4)] # assign a and b to values at 2 and 4 indices of 'values' Typically I want to assign about 5-6 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "107" }
Q: Style Trigger to Apply another Style I am sure this has been asked before, but I haven't had an easy time figuring out how to phrase the query. I have this style; <SolidColorBrush x:Key="SemiTransparentRedBrushKey">#F0FF0000</SolidColorBrush> <Style x:Key="TextBoxEmptyError" TargetType="{x:Type TextBox}"> <Style...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sequencing Events in Javascript I am trying to make a simple hidden object game using javascript. When the user finds and clicks an image, I want 3 things to happen in the following order; a sound plays, the image size increases, and the image goes invisible. The problem I am running into is getting the 3 events to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should i cache the whole query in php or should i just cache the primary key of the row? The question is quite straightforward. I can't choose between either. In the dev documents MySQL has specified that indexes can pick a row from it's position rather than searching the whole table. Suppost i have a request to fet...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make cell save when slickgrid looses focus I have a SlickGrid with some Editors on a form with some buttons above it. (Save and Cancel). When i edit a cell in the grid and click the buttons above the grid - the cell does not commit it's edit. I've debugged and it is not calling : commitCurrentEdit. I've also ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Apache Axis - Calendar instance that gets serialized to 0001-01-01T00:00:00.000Z I'm using Apache Axis to communicate with a web service written in .Net. One of the functions in that WS has special handling when it encounters DateTime.MinDate (i.e. "0001-01-01"). Now, I'm trying to send this special value to the WS,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Validating email input in form using PHP I'm creating a form in PHP that contains a field called email where the user needs to enter his/her email ID. In order to ensure that the mail ID entered is authentic in terms of syntax (eg. username_123@domain.com is valid) I need to append some kind of validation to it. I f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL CLI web environment halts on / So I just made a question about symbols, but yeah, while the symbols are now working properly, there is still a problem with UNIX commands. The thing is, whenever I input a value that starts with / and follows with a UNIX command, the host responds with - 501 Method Not Implement...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can't inherit constructor from parent class I have problem with inheritance of consturctor: function Alive(name) { this.name = name; } var Cat = new Function(); Cat.prototype = new Alive(); Cat.prototype.constructor = Alive; var cat = new Cat('Thomas'); alert(cat.name); alert show undefined. What i do wrong? jsf...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Testing website on localhost server for iphone and ipad What I'm looking to do is preview what I've built on a custom localhost server (set up with Mamp Pro) on my iphone or ipad. The localhost is under http://devsite:8888 and not http://localhost:8888. I've tried the instructions for something similar found here. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: In JQuery, how to pass the element that was clicked to the method that is called on onclick event I have several of these lines on a page: <div class="save-button" onclick="Save()">Save</div> In my Save() method I want to manipulate the div that was clicked to call the Save() method. How do I pass that in (I think...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: NSDateFormatter set date to 1970 In my summarydict, I have a entire called date_generated, it looks like : Sep 22, 2:33 PM, I want to convert it into a NSDate so that I can later feed it into a repeated timer. So here's my code: ALog(@"Last update time is: %@", [[summarydict objectForKey:@"root"]objectForKey:@"date_...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What affect will upgrading from ASP.NET MVC2 to MVC3 have on NHibernate? How do I upgrade ASP.NET MVC2 to MVC3 with minimal possible implications to NHibernate? A: There's there should be no impact in terms of NHibernate if you properly separated concerns in your application by using abstractions. As far as upgradi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WinForm Automatically Close After Time Expires? In Framework 4.0, I have a WinForm that is opened from another form, displays some stuff and a progress bar, and then sits there. I would like to close that "pop up" form after n secods if the user does not close it manually. What's the smartest way to do that? Thanks...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Addition of vectors c++. Cannot understand compilation error Hi I am have written the following function for adding 2 vectors vector<double> add(vector<double>& v1, vector<double>& v2 ) { /*Do quick size check on vectors before proceeding*/ vector<double> result(v1.size()); for (unsigned int i = 0; i < result...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Javascript Split Performance I'm sure you've all seen code like this in JS: var args = 'now later today tomorrow'.split(' ') Anyone know why that's faster than this: args = ['now', 'later', 'today', 'tomorrow'] (I don't know the answer to this, but I can verify by timing in the console that splitting is faster) A...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Clearing C# Events after execution? Say I have the following code: public event EventHandler DatabaseInitialized = delegate {}; //a intederminant amount of subscribers have subscribed to this event... // sometime later fire the event, then create a new event handler... DatabaseInitialized(null,EventArgs.Empty); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Stream camera feed of android to a java based server i am making a simple android app which streams video feed of camera to a custom java based server, i am sending the frames (basically byte[]) using tcp, [i know tcp is not a good approach for video streaming but it is ok for me], android is the client and a java a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Regions in CSS like C# regions? Is there a way to define regions in CSS file just like regions in C#? Like in C# you define regions as follows #region My Region //your code here #endregion My problem is I don't want to use separate CSS files for my asp.net project but I also want to organinze so I can define speci...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "91" }
Q: How to equalize and in Emacs? Some key bindings are designed in a way that Enter (<return>) and numpad Enter (<kb-enter>) are not the same (I guess, if a binding is (kbd "<return>/<kb-enter>") not (kbd "RET")). Is it possible to rewrite <kb-enter to <return> in Emacs or I have to change system settings? A: It sou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how do I get emacs to treat a file with the wrong extension correctly? So (let us not concern ourselves with why) I have a .emacs file which is called dotemacs, and a .bashrc file which is called dotbashrc. When I load up dotemacs, I get no syntax highlighing (amongst other things). If I do M-x lisp-mode then all is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Generate a list of files/objects dynamically from within makefile I am trying to do this: From a directory, pick all the C (.c) files, generate .o and add it to my final target executable. The C files can be added or removed at anytime, so when I run make for my target, the available C files from the directory has ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Camel idiom to route dynamically based on the value in the body of the message Suppose you have a route like: from("direct:start").to("http://some.endpoint/accounts/"); where message passed through direct:start is an XML: <payload> <account id="1">Bob</account> </payload> What's the idiomatic way to extract th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Object does not exist or is not a valid using 'sp_changeobjectowner' I changed the table schema from dbo to db_owner using the SQL statement below (SQL 2008 R2): DECLARE @old sysname, @new sysname, @sql varchar(1000) SELECT @old = 'db_owner' , @new = 'dbo' , @sql = ' IF EXISTS (SELECT NULL FROM INFORMATION_...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use a common test harness for MStests & NUnit and run them in Mono? I'm using VS2010 to develop a project and will be adding some NUnit tests to an existing test harness which is full of MStests.How do i run only the NUnit tests from that harness in Mono? Is there way i can selectively switch between running ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP Soap - How to remove xsi:type= from XML tag I'm sending a SOAP request that looks like: <SOAP-ENV:Body> <api:GetOrder xsi:type="SOAP-ENC:Struct"> <api_orderId xsi:type="xsd:int">1234</api_orderId> </api:GetOrder> </SOAP-ENV:Body> But needs to look like this (SoapUI generated): <soapenv:Body> <api:GetO...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to cut Faces after detection I have been working on a college project using OpenCV. I made a simple program which detects faces, by passing frames captured by a webcam in a function which detects faces. On detection it draws black boxes on the faces when detected. However my project does not end here, i would li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Generate unique username from first and last name? I've got a bunch of users in my database and I want to reset all their usernames to the first letter of their first name, plus their full last name. As you can imagine, there are some dupes. In this scenario, I'd like to add a "2" or "3" or something to the end of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Ajax Error Reporting With PrototypeJS I am wondering if there is script or something out there that will report javascript/PrototypeJS errors that happen in Ajax calls. It can be time consuming to fill code with console.log and/or alerts. It would be great if there was something like a browser plugin that would do...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Send 'POST' request without submit event Event after which i am sending ajax is not submit. I even don't have sumbmin button. This is part of my jquery: var description_data = $('#description_form').serialize(); alert(description_data) $.ajax({ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using to make a servlet call that returns additional 's, but they're not being rendered So this question suggested using a servlet to do the file check before doing the include: How can you check if a file exists before including/importing it in JSP? So I wrote a servlet that does that. I call it using something l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: core-plot remove decimal points from axis labels Can someone tell me how to remove the decimal points from the Axis labels? Instead of 10.0 I'd like to have only 10 showing. A: CPTXYAxis *x = axisSet.xAxis; NSNumberFormatter *Xformatter = [[NSNumberFormatter alloc] init]; [Xformatter setGeneratesDecimalNumbers:NO];...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Codeigniter session using ajax i know maybe it's a repetitive question, but i would like to know if someone has a good idea for leave user session alive when using ajax calls. I figured out that when i'm logged and i leave the browser open for 1-2 hours, when i launch ajax calls the session is expired. i'm using the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does query with AND and OR operators yield unexpected results? I have this query but it's not giving me the expected results: User.all(:conditions => ["company_id == ? AND role_id == ? OR role_id == ? OR role_id == ?", X, 1,2,3 ]) It's supposed to mean: Get all the users with X company_id AND their roles can be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Problem using HDI membership provider with asp.net I am trying to use HDI custom membership provider and after seting up with web.config when I run the applcation it gives me an error as shown below. And I am unable to know where I am going wrong?Can anyone point me the right way? Failed to map the path '/'. Descri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery UI Tabs AJAX link with anchor I am trying to implement something quite simple, I want to have a tab menu, with submenu as anchor in tabs, let say : <div id="tabs"> <ul> <li><a href="file1.html">Nunc tincidunt</a> <ul> <li><a href="file1.html#anchor1">Et perditur</a></li> <li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Context initialization failed: org.springframework.beans.factory.BeanDefinitionStoreException I have a J2EE based web application which perfectly gets deployed on JBoss 6.0 app server. I am using JBoss's "default" server configuration. My ".ear" file contains EJBs and a ".war" file - I am using Spring Security 3x fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using group and file references to imitate a real folder in Xcode I have the following directory structure: - container - app - index.html - ... - ios - mobile.xcodeproj - Mobile - www # imaginary folder (or could be a real, empty one) - android - ... app contains files shared among an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to condense/collate multiple jQuery events into one event on a time delay? I want to condense multiple events into a single event on a time delay. I don't need my bound function to be called repeatedly for really common things like mouse movement and page scrolling. At most, once every half second would be ple...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Display iframe div contents on parent page I'm sure this is pretty basic, but I can't seem to get any of the solutions I've found to work for me. Basically, I need to get the contents of a div from an iframe, and write them to a div in the parent page. This is what I have: <iframe src="slideshows/slideshow/case2.htm...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java Painting a Triangle and Trying to use other Swing Objects I am having a bit of an issue using Netbeans to design a GUI (Yeah im lazy :\ ) and manually trying to paint a triangle onto the JFrame. The Swing Components are 'covered up' until I press tab and put focus on the objects. Ive attached a picture and code...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Online payments for a middleman I'm new to online payments and would like some opinions on my task. Here is the scenario: I have a website where people buy and sell digital photos. A seller has a photo and wants to sell it. They create an ad on the site and upload the photo into the website database. Buyers look...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: MSI - How to know when a particular MSI is running Is there a simply way to know when an msi is running? (either in silent or no silent mode.) Maybe using and MSI API? Reading from somewhere?... I need this in order to avoid launching a program coded in C++. Thanks for your help. A: There isn't any API for detectin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jQuery tagit plugin, public methods Does anyone know if the tagit jQuery plugin has a public method for removing just 1 specified tag from the list? I saw there is for removing (clear) all tags from the list, but I would need to remove only 1 tag :P Also, how to call all the public methods from outside of tagit() ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to put sounds in an array? I have 10 sounds, and it would be easier for me to put them into an array. However I'm new to Obj C. Here is the code so far, this is just for 1 sound. I could copy and paste it 10 times. But if all 10 sounds are in an array I'll be able to do more functions with the sounds. - (IBActio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Speech recognition framework for iOS that supports Spanish Is there a speech to text framework for iOS that supports Spanish out of the box? Commercial or OS is ok. A: There are a bunch of commercial IOS librariers for speech recognition. The names I keep hearing are Nuance, iSpeech, and Yapme. Each offers cloud sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Discovering the reason for File.mkdirs() failure If I call one of the methods File.mkdir() or File.mkdirs() in Java, and it returns false, is there a way to know why was the directory not created? A: Not really, no. If a SecurityException is NOT thrown, then the most likely cause is a typo in the path, meaning you'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Escaping shell / database with utf-8 characters What is the preferred order for escaping characters? For instance in PHP environment: 1) shell -> database = return escapeshellcmd(mysqli_real_escape_string($string));? 2) database -> shell = return mysqli_real_escape_string(escapeshellcmd($string));? 3) No difference ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to implement 'either-or' scenario in left outer joins in SQL I am a newbie in SQL queries and am really struggling with the following query. I have to implement something like this: Select person.name, person.age, employee.yearsofservice from person join employee on person.name = employee.name join fulltimeem...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Remove duplicates in Table Join with Case Statement I need to be able to select distinct "phone" regardless if the phone comes from work or home. All phones need to be unique. This query produces duplicates when the same phone is found in work and home in different rows. SELECT CASE WorkPhone WHEN '' THEN ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is a foreach loop on $_GET a good way to apply htmlspecialchars? I'm wondering if there is a significant downside to using the following code: if(isset($_GET)){ foreach($_GET as $v){ $v = htmlspecialchars($v); } } I realize that it probably isn't necessary to use htmlspecialchars on each variable. Anyone know o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python pull back plain text body from message from IMAP account I have been working on this and am missing the mark. I am able to connect and get the mail via imaplib. msrv = imaplib.IMAP4(server) msrv.login(username,password) # Get mail msrv.select() #msrv.search(None, 'ALL') typ, data = msrv.search(None, 'ALL'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Configure date-time format for JODA in Jackson when deserializing I am using "Full Data Binding" in Jackson to deserialize a date in a JSON string. The format these dates are coming is "EEE MMM dd HH:mm:ss zzz yyyy". I'm using Jackson 1.8 and I cannot figure out how to configure the ObjectMapper so it would deserial...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Display a new view when button in cell is pressed I have data displayed in a customized cell view. A cell contains a title and a button. When a user clicks on the button, the page will re-direct to a new view. Now what I need to do is, when the user clicks on the button (and not the cell), the title of the cell sho...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Redis mimic MASTER/MASTER? or something else? I have been reading a lot of the posts on here and surfing the web, but maybe I am not asking the right question. I know that Redis is currently Master/slave until Cluster becomes available. However, I was wondering if someone can tell me how I would want to configure Re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Tfs custom work item value migration I have a task to create reports about various work items from a Team Foundation Server 2010 instance. They are looking for more information than the query tools seem to expose which is why I am not using the OOB reporting capabilities. The documentation on creating custom reports...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: iOS: How to get swipe effect between views of tabbed view controller? I keep seeing apps that appear to be tabbed view controller apps, where the user can easily swipe left or right between views. How do I enable that kind of behavior? Thanks. A: The best and least hassle free solution I found is Andrey Tarantsov's...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: CDT compare broken? Help. I have been relying on the compare editor for code review, and it mostly works quite well. But for some reason, on some files, it is giving me inconsistent results and telling me that some code is different when it is not. It can't seem to deal with commented out code in this file. It tells...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: writeToFile fails - how do I debug WHY it fails (what tools)? I'm getting an NSDictionary from JSON (using SBJson), and I want to store it. I'm using [liveData writeToFile:localFilePath atomically:YES] and it fails. The data looks like its all NSString, NSDictionary, and NSArray (which "atomically:YES" demands). I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7519996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Getting value from Map I need to get one data from a collection (get() calls in the range of 100K for a single file processing). public class DemoCollection { private Map<GroupCriteria, GroupData> collectionHolder = new ConcurrentHashMap<GroupCriteria, GroupData>(); /** * * @param groupCriteria ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Receive index of list element using jQuery i have an unordered list with an unknown number of list items. it looks like this: <ul id="keyvisualpager"> <li><a><span>first</span></a></li> <li><a><span>second</span></a></li> <li><a><span>third</span></a></li> <li><a><span>and so on</span><...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Yahoo! Contacts API fails for new users I have spent the last several days implementing OAuth-based communication with Yahoo! in order to retrieve a user's contact information and I have successfully built an implementation which works beautifully with a Yahoo! account I created several years ago. Now I am attempti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to keep 3rd party's site credentials with GAE? My GAE site should communicate with 3rd party site (i.e. should use it's API). That 3rd party site requires HTTP Digest Authentication. To support that I use the following header, it works well: headers={'Authorization': 'Basic %s' % base64.b64encode('login:pass')} ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What will be the SQL trigger of this scenario? I have three tables, requirement, selloffer and tradeleads. Tradelead is a table which holds the common entities of earlier two tables. Schema of requirement: reqId, name, description, posteddate, companyid, cat1,cat2,cat3 .... Schema of selloffer: sellid, name, d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why isn't a jQuery Tools tooltip showing up as a jQuery extension? I have a Boilerplate 2.0-based page and want to add tooltips. Under the call to load jQuery, I add a call to load the jQuery-tools bundle, and then in js/script.js call: jQuery(".has-tooltip").tooltip(); The result? No tooltips show up; Chrome's Jav...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Pointing to another object's attributes and adding your own Suppose I have a class: class Car(object): def __init__(self, name, tank_size=10, mpg=30): self.name = name self.tank_size = tank_size self.mpg = mpg I put together a list of the cars I'm looking at: cars = [] cars.append(Car("T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Ruby: unless vs if not I find myself preferring if not rather than unless. Is there a proper way to write that sort of condition? How do people generally feel about unless? A: I hope this helps you: https://github.com/rubocop-hq/ruby-style-guide#if-vs-unless Prefer unless over if for negative conditions (or contro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: Why can't you use a object property as an index in a for loop? (MATLAB) Below is an example that doesn't work in Matlab because obj.yo is used as the for loop's index. You can just convert this to the equivalent while loop and it works fine, so why won't Matlab let this code run? classdef iter_test properties ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to store user mentions I want to implement user mentions with @username like in Twitter. But, in my app, the username may change. My approach is to parse the post before saving into the database and convert all the @username to @userId. What do you think of this? Does anyone has any better alternative? A: Store...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Show users with any privileges to database. MySQL i have to select all users with any privileges to database (e.g. database 'mysql'). Any suggestions? Thanks. A: A good view of all users and their approximate privileges. If there is a password, it will by an encrytped string; if not, this field is blank. Select is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to do multiple publication scheduling in C# service? I have one service which is listening for position updates coming from upstream system. Now there are multiple consumers of this position updates. * *One consumer wants to get update as soon as possible *One consumer wants to get update every 30 seconds ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problem with AVAudioPlayer ? Creating delay While using AVAudioPlayer .... Sound not playing at instant if i click button... and in that class i have one NSTimer which keep changing image so for that purpose i have to ring sound. But If i will use this AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: alertDialog button go to URI As the title says, I want to make a button in my alertDialog of my app go to a certain URI, and I was wondering how i would do this? heres and excerpt of the code: // Add a neutral button to the alert box AND assign a listener for said button... alertb...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Access multidimensional array by string with delimiter suppose i have a multidimensional array like something like this: <?php $array = array("test1" => array("test2" => array("test3" => 1)), ... foo1 = array("foo2" => 2)); ?> i want to access an array element by passing a string like "test1.test2.test3" to a fun...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to Combine two or more columns with Android SimpleCursorAdapter SimpleCursorAdapter adapter = new SimpleCursorAdapter( this, R.layout.mytaskslayout, cursor, new String[] {"Aircraft","Discrepancy","ARR_FLT"}, new int[] {R.id.ac, R.id.discrepancy, R.id.arrinfo} ); Can I combine two or more col...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: FQL query response randomly omits some results I'm trying to make a simple "only status updates, nothing else" app (since FB doesn't seem too interested in this sort of thing). However, my queries seem to omit some results: "select status_id,uid,time,message from status where uid in (select uid2 from friend where ui...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: what should I do to analyze the log file I have an app (node.js) running on multiple servers. each server has its own log (request log, error log, etc). The log file contains time, http request, sometimes with userId. What program I can use to analyze log file? or if there is any node.js plug-in that can do it?...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Create struct with boost graph I whant to use this structure that I've created with a graph: typedef struct type_INFOGRAPH { boost::adjacency_list < boost::listS, boost::vecS, boost::undirectedS, Node, Line > graphNetworkType; map<int,graph_traits<graphNetworkType>::edge_descriptor> emymap; map<int, gr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: fill input text How can I fill a text input with a value? I am trying this: <input id="curso" maxlength="150" name="curso" size="40" type="text" value="window.location.href.substring(91))" /> But that does not work. A: <input id="curso" maxlength="150" name="curso" size="40" type="text"> <script> document.ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Agile Parallel Database Migrations I work in an environment that is very agile. We typically have daily rollouts. That ability is necessary due to the nature of our business. Often we have updates to the database. We built a home brewed database migration library, however there is currently no concept of a versi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best way to combine multiple TBytes arrays What is the best way to combine TBytes arrays? All arrays are of the same size. I want the content of Array2 to be added to the end of Array1, Array3 to the end of Array2, and so forth. A: To merge two TBytes together, you have to allocate a third TBytes that is the total ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Prevent iOS from taking screen capture of app before going into background You all might know that iOS takes a screen shot of your application before throwing it into the background. This is usually for a better User experience like quick animation to bring the app back and so on. I don't want my app screen shot to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Linq expression to get all items in a IList where one field is in another List This collection contains the entire database of products: IList<Products> allProducts; This contains just the guids of all the products for this user: IList<Guid> usersProducts; Below is the psuedo code of what I need, i.e. all the prod...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using ROOT (cern) with mingw32 Can I install Cern's ROOT on win32 without MSVS but with mingw32? I want to develop some C/C++ programs, which will use ROOT. A: As far as I know, compiling with mingw32 is currently not supported. I guess it would technically be possible, as mingw32 is based on gcc, but it would be a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7520088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }