text
stringlengths
8
267k
meta
dict
Q: regex giving error less than 2 okay so I set up this regex to take exponential and give me back doubles but it crashes if I give it less than two String sc = "2 e 3+ 1"; Pattern pattern = Pattern.compile("\\s+"); Matcher matcher = pattern.matcher(sc); boolean check = matcher.find(); sc = matcher.replaceAll(""...
{ "language": "en", "url": "https://stackoverflow.com/questions/7543991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Make Visual Studio 2010 display more lines in code editor With a 14" LCD monitor (1366x768), my VS2010 can only display 21 lines in code editor. There are too many tool bars occupied upper and bottom part (see below screenshot). When writing codes, it's OK to use fullscreen mode. However, when reading codes, I need ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7543992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: OOP Design Question Got this interview question which i'm wondering about: A software company designed an app that manages employees and, among other functions, calculates Salary. The current structure which fits the customer's requirements is: abstract Class Employee; Class Manager extends Employee; Class Engineer ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to initialize pages in jquery mobile? pageinit not firing What's the right way to initialize objects on a jquery mobile page? The events docs say to use "pageInit()" with no examples of that function, but give examples of binding to the "pageinit" method (note case difference). However, I don't see the event f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: PHP-Function ereg_replace() is deprecated class autoActiveLink { function makeActiveLink($originalString){ $newString = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>", $originalString); return $newString; } } What should I replace the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to prevent specific images from being cached by browser with NGINX I have an avatar upload page in my site. But when the user successfully uploaded the avatar the browser keeps showing the old one. How to prevent avatar image from being cached by browser? A: Haven't tried it myself but this might work: if ($req...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Lesson 16 - Gas Mileage - Multiple Classes Project ~~~Update: Solved! Thanks everyone!~~~ I'm working on a project from the Blue Pelican Java book, lesson 16 project Gas Mileage. It asks to create two classes, one is Automobile which holds the methods I will work with. The other class, Tester, is the main class. Ev...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can't get the handle of a Cwnd Class in MFC Windowless Activex? I have asked two questions earlier about this and for each post there was some solutions i tried them, but the problem still exist. My first question was : why a windowless Activex does not return the Handle. the suggestion was "change the creation se...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android stacked views The view that I would like to have would be shown in the figure. A: For that you can take FrameLayout. For example - 1: <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <ImageVie...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: 3tier Architecture for DatagridView I have a DatagridView and i want to populate it with the contents of a database. I know it can be done through DataAdapter, dataset and Fill/Update commands and all. But what I want to know is, how to write it in a 3tier architecture. I mean, what will be the commands in the Prese...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Key-value observing on UIButton's State UIButton has a state property, which appears to be KVO compliant by all accounts and there is no documentation to indicate otherwise. However, when I added an observer to a UIButton's state property, the observer callback was never invoked. How come? A: If you look at the d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Creating menus for JApplet I am making a simple game where numbers fall from top to bottom and I have to type the number. (number is erased as I type the number) This is coordinated with a Zen.java which is a JApplet file. I am trying to make a menu for this game with a typical menu bar. So far, I've tried this.. p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Map multiple entities to EF4 abstract base class or interface? I have multiple tables in a db that are identical in terms of column structure. I'd like to have this modelled in EF4 so that they all inherit from a single abstract base class, so I can write common methods etc. I've tried an abstract base class, but th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can i detect new items in rss feed I am making an app that will load stories from rss feed and store them locally in Documents folder, so they would be available offline. My question is: How can i detect new items so i could update the existing stories list. A: You would need to re-query the feeds. Either add ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why am i getting a 403 forbidden when using a img tag? When trying to use <img src="../Ginger.jpeg" /> I am getting a 403 error. Here is the page which is requesting: http://laponderosakennels.com/beagles/memories/ginger/index.html What is going on here am I just tired? A: if you look at http://laponderosakennels...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: win32 api function to get processor's current speed I am unaware of a win32 api function/functions used to query the local PC processor's current speed. I wish not to use WMI because it seems unlikely to be feasible on all PCs. A: You can (usually) get the processor speed using the QueryPerformanceFrequency functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544049", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to retain layout when webview follows links I have a layout where there are buttons at the top and bottom of a screen with a large webview in the center between the buttons. When a link in webview is clicked, the webview becomes full-screen, but I want to keep the buttons and retain the original layout. How can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Disable menu when login as guest on Android I have an app where the user is able to choose to login with the ID or only as a guest. I set the default of the app that after the user chooses either to login or with ID or not, there is a menu on the activity. What I wanna do is, when the user login as guest, the menu i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: TransformerHandler to output CDATA sections I am trying to output CDATA section using the below code. While other declarations are being honoured the CDATA sections still comes out as plain text without its enclosing tags (CDATA). What am i doing wrong? private TransformerHandler getHandler(StringWriter sw) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why should we use WSDL4j for developing webservices? I need to develop Webservice Application for our Client . I dont know anything about WSDL4J From the net I found this "The Web Services Description Language for Java Toolkit (WSDL4J) allows the creation, representation, and manipulation of WSDL documents. Is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Show soft keyboard (numeric) using AlertDialog.Builder I have an EditText in an AlertDialog, but when it pops up, I have to click on the text box before the keyboard pops up. This EditText is declared in the XML layout as "number", so when the EditText is clicked, a numeric keypad pops up. I want to eliminate this...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: raising events in chaining classes say I have three classes: class1, control1 and form1; form1 instantiate contorl. and control1 instantiate class1, the later produces some event that I need to 'bypass' to form1, to achieve that I have made an intermediate function as shown below: public delegate void TestHandler(St...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does the MD5 function work? I'd like to implent a function for SuperFastHash that is compatible so openssl's MD5 function. MD5 is declared in md5.h as: unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); But I can't find it's definition in the headers and the sourcecode. So how does it work...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can a Bayesian filter be used to create multiple outputs I see that Bayesian filters are use well for binary choices - (spam:not spam, male:female etc). Is there any way for it to categorize multiple values (eg php+javascript, house+yard). I've seen Naive bayesian classifier - multiple decisions but I want to know ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you change of a Satchmo Store? This seems like something that should be obvious, but I simply can't find it. I created a Satchmo store using clonesatchmo.py, as indicated by the installation instructions. I have tried to change the name of the site through the admin interface (going to Sites and changing the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Long Polling causing server problems? I've finally made a simple chat page that I had wanted to make for a while now, but I'm running into problems with my servers. I'm not sure if long polling is the correct term, but from what I understand, I think it is. I have an ajax call to a php page that checks a mysql data...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: iOS support for Canon RAW format? I know the iPad can read Canon RAW (.CR2) files when used with the Camera Kit but is any of that file format reading accessible to an iOS developer? Or are we just limited to things supported in the UIImage Class Reference document? (https://developer.apple.com/documentation/uikit/...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Regarding format date/time in java I have two datetime formats, * *'dd-mm-yyyy' and *'dd-mm-yyyy hh:MM:ss' in my application. The input value may be a string in any of above forms. I want to store this date value in database. So, first I format it with SimpleDateFormatter. But how can I check that input string ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: load UIWebView - NSData How can I load a uiwebview with nsdata like if have NSData *da = [[NSData alloc]initwithContentsofURL:[NSURL URLWithString:@"google.com"]]; //not tested and now use this NSData in UIWebView. thanks A: Check out this method - (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType text...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544092", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Table width, vsapce, will not align correctly on wordpress template My table will not align correctly on this link: http://www.teampaulmitchellkarate.com/meet-the-team/ Is there something im missing with the CSS/hspace vsapce? I know a bunch of links are the same but its the layout I'm concerned about. A: It's just...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: A weak/shared pointer, detect when one user remains, boost I want a pointer where I can tell when the reference count is one. Essentially the pointer works like a weak_ptr, but the cleanup needs to be manual. That is, every so often the program goes through a loop of its pointers and checks which ones have only one ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: scope of a variable How can I get the value of a method parameter "myInteger" in this code. public void myMethod(int myInteger) { View.OnClickListener myClearHandler = new View.OnClickListener() { public void onClick(View v) { //***How can I get the value of "myInteger" here?*** } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to minimise restore time when de-tombstoning? So i have a number of methods i use to minimise load time when restoring a Windows Phone 7 application when it has been tombstoned and completely closed, and a user hits the back button or (in mango) navigates to your app from the multi-tasking switc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android - Listview Background Problem I have a problem, and i know that the answer properly is pretty simple, but I've tried everything at the moment, and I can't figure out what I'm doing wrong. In my project I've got the following layouts: main.xml <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="htt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I solve this load error problem in irb? I can't understand why this error occurs. I have a file named hello.rb, it is in "C/Ruby192/bin/hello.rb". irb(main):005:0>load("hello.rb") Load Error: no such file to load -- hello.rb from(irb):5:in`load' from(irb):5 from C:/Ruby192/bin/irb:12:in`<m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to change the 3d axis settings in matplotlib I have managed to create this graph using matplotlib. I would like to remove the 0.2, 0.4, 0.6.. from the axis named B and change the axis interval from 200 to 100 in the axis named A. I have been trying to do this for quite sometime now...Any suggestions?? here is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Richfaces poupPanel is shown before action execution I have JSF 2.0 form that looks like this <h:form id="formId"> . . . <a4j:commandButton action="#{bean.myAction}" value="foo" oncomplete="#{rich:component('popup')}.show();" /> </form> <rich:popupPanel id="popup" modal="false" autosized="true" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to programatically read active window title of any window opened within a Remote Desktop? I have an application which periodically reads the windows title of current active window on a persons desktop. However, when a person accesses any window using Remote Desktop then my application is only able to detect that...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C usual arithmetic conversions I was reading in the C99 standard about the usual arithmetic conversions. If both operands have the same type, then no further conversion is needed. Otherwise, if both operands have signed integer types or both have unsigned integer types, the operand with the type of lesser integ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: jQuery Datepicker Icon Not Showing I'm using a jQuery datepicker in WordPress. The datepicker is working fine. But, I can't get the icon, the little button next to the datepicker's text input to work. Instead of an icon, I've got a tiny little "pill", an oblong 7px high pellet instead of my icon. If I click it, it f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Calculate each Word Occurrence in large document I was wondering how can I solve this problem by using which data structure.. Can anyone explain this in detail...!! I was thinking to use tree. There is a large document. Which contains millions of words. so how you will calculate a each word occurrence count in an op...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What difference does it make to register location updates with location listener and pending intents.? In the Google I/O Session on Android Pro Tips, http://www.google.com/events/io/2011/sessions/android-protips-advanced-topics-for-expert-android-app-developers.html , the speaker mentions to register location update...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: HTML source code doesn't understand Arabic text? I'm trying to read a source code for a webPage that contains Arabic text but all what am getting is this &#1580;&#1575;&#1605;&#1593;&#1577; (which is not Arabic, only a group of characters). If I reload the page on my localhost I get the Arabic tags and text correctl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Has anyone tried the new opengraph beta api with rails? I'm wondering if anyone's given the new api introduced with rails yet? I began a mock app through facebook and heroku and it actually generates the beginnings of a sinatra based project. Has anyone crossed over to rails by chance? A: I'm actually working on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does cvSet2D take in a tuple of doubles, and why is this tuple all 0 save for the first element? cvSet2D(matrix, i, j, tuple) Hi. I'm dissecting the Gabor Filter code given in http://www.eml.ele.cst.nihon-u.ac.jp/~momma/wiki/wiki.cgi/OpenCV/Gabor%20Filter.html . I have a few questions on cvSet2D especially as us...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Out of memory when passing sequences through Clojure's loop/recur Possible Duplicate: Recursive function causing a stack overflow I wrote a function calculating all the primes below a given natural number, using the Sieve of Eratosthenes. It returns the whole prime sequence. (defn primes-below [n] (loop [prim...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the difference between _chdir and SetCurrentDirectory in windows? Are there any difference that I should choose one over the other? A: _chdir actually uses SetCurrentDirectory internally, so on most cases they are effectively interchangeable. However, _chdir does one more thing: it updates the current direc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to get current location in blackberry device? In simulator my gps code work fine. But when I install my app in device I can't get current latitude and longitude. When I send lat long from simulator it get proper lat long which is send through simulator. I don't know why is not working in device? I have already e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to send parameters with jquery $.get() I'm trying to do a jquery GET and i want to send a parameter. here's my function: $(function() { var availableProductNames; $.get("manageproducts.do?option=1", function(data){ availableProductNames = data.split(",");; alert(availableProductNames); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Is there a way of storing contents of a file in a database by using anything other than CLOB? For a project, I want to store the contents of my file in a database. I am aware that using CLOB is one of the options for storing large file contents. But I have heard that it is not an efficient way to do so. Are there ot...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can i get the recomendation details from LinkedIn In my application, i have to show the recomendation received by the user.. but using Linkedin API plugin, am able to get only these fileds (ID, RecommendationType, Recommeders).. what should i do to get the "Recommendation Text" for the user. kindly help me out ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: PHP COUNT_RECURSIVE only count non-array values? I have a multidimensional array to the tune of $doclist['area']['source'][#]['type'] I would like to get a number of all entries of ['type'] = "title" that are not empty. Is there a simple way of doing it? While I am at it, is there a way to get a number of all entrie...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: UIView alway show full screen in simulator although setting width and height to 320 x 320 px by Interface Builder I try to show UIView of HomeViewController as modal of TabBarViewController. I want UIView display over TabBar and there 's TabBar at bottom of screen. Although, setting setting UIView of HomeControlle...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WinRT and the server (ASP.NET, Azure, etc) Has Microsoft made any indication of WinRT's current or future relationship with server development (such as ASP.NET)? While it's been made clear that WinRT is the intended future of Windows UI programming, it also includes a substantial library of common features like netw...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: alternative to $_POST I have a huge form with inputs of type (text, checkboxes, hidden et). The content of the form inputs are taken from a database. The user has to make some changes and to save the data back into the db. At this moment I'm using a function which has a foreach($_POST as $key=>$value) loop. As you k...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to set cookies with GAE/Python for 1 month? I need to implement the following: * *User input user id and pass *We validate that on another server *If they are correct, cookies with these details should be saved for one month *Each time user uses my site, we should look for cookies *If they are not found -...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Unable to compile clippy (swf clipboard utility) I am having trouble compiling clippy using the instructions here: https://github.com/mojombo/clippy/blob/master/README.md I've downloaded clippy and have tried compiling on Mac, Linux, and Windows and I keep getting the same result: The swf compiles with no apparent e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: center div with adjacent one Is it possible to construct a central div that has equal amounts of space on both sides, and another div that is always adjacent to the big one, on it's exterior left side. I tried setting the width, but when I enlarge the page it isn't adjacent anymore. Forgot to mention, the center d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Windows service start, stop, debug problems I have a service that I don't know the runtime of, I guess around 7 seconds. For some reason the service stops working after the first run and I can't debug it. It keeps saying "starting" on the services manager and I can't find it on the attach process window. When I try...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Optimized way for changing all the colors of my UIView's elements programmatically I have an UIView with different kind of elements inside (UIButton, UIImageView, UIImageView animations). At some moment, when the user select it, I want to switch all this view to grayscale. At the moment I do one element after one so...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I use Redis in Ruby on Rails to take the dot product of two hashes efficiently I have a data structure like this in the database in the features table called token_vector (a hash): Feature.find(1).token_vector = { "a" => 0.1, "b" => 0.2, "c" => 0.3 } There are 25 of these features. First, I entered the data ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: String object instances Possible Duplicate: Basic Java question: String equality Given String s= "God"; String k= "God"; Will both s and k be considered to be referring to the same String object? Is there a single instance of String object? A: Yes, Java should optimize this so that s == k to save memory. (The r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP MYSQL Check Case When Querying Database How do I check the case of a string when querying the database? For example, with this statement: mysql_query("SELECT id FROM members WHERE username = '$username'"); The value in the database is "Test". The user could, however, type in "test" and it would still work. How ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: GWT 2.4 Updated MVP sample I'm looking for a project sample of the latest GWT 2.4 version using MVP and UIBinder. All the samples i could find, are really old, and most of the functions and classes are deprecated. The latest sample I found is Contacts from GWT site, that is from March 2010. Where can I find the most...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Compiling latest OpenCV from source on OS X (with Cmake) My problem: I'm using cmake to compile the latest OpenCV from SVN on Mac OS X and it's having an error at the end of the terminal output. I'm not familiar enough with Cmake to really track down the problem. What does it mean? Here are the last several lines of...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to write a function to take any object with an index operator I think I have asked this in the context of C++ (Can't find it in my question history!!) in the past and the solution was to use a template function. As C++ template resolve at compile time, it works. But for C#, it doesn't. public Hashtable ConvertTo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: AJAX response - selecting parent of where the post originated? I am using an AJAX post to load all comments from a database. I need the response to load only in the DIV that it originated from. $('.viewCommentsExpBtn').click(function() { var trackid=$(this).parent().find(".trackidField2").val(); $.ajax({ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: While, do, done flow control in bash Can anyone explain the control flow of the following bash script? while IFS= read -r file do rm -rf "$file" done < todelete.txt From what I understand, this would happen: IFS would be assigned nothing. The rm -rf command would do nothing because its argument, the variable $file...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: html javascript select option control with huge number of elements (like 10K) I have two controls with huge nubmer of elements and I move elements from one to another with arrows (built as a single control). however moving elements from one select to another takes lot of time (i have 10K elements) i want to know if...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Difference between implicit conversion and explicit conversion Possible Duplicate: Implicit VS Explicit Conversion What is the difference between "implicit conversion" and "explicit conversion"? Is the difference different in Java and C++? A: You Mean Casting? Implicit mean you pass an instance of type, say B, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: NSTextView, bindings and displaying an NSString My second day working with Cocoa. I've got an NSTextView set up, its attributed string is bound to an NSArrayController (I'm using Core Data): controller key: selection model key path: myString I've read that an NSTextView needs an NSAttributedString, which is why it'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Problem with Kohana 3.2 Validation class. It seems it is not sending Exception when there is an error When the POST data is send to: Auth::instance()->register( $_POST ); The data is then validated... If it's not I assume the Validation Class in Kohana throws an Exception. And then try-catch function catches it. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Single slave - multiple master MySQL replication I need to replicate different MySQL databases from multiple servers into a single slave server. How can this be done? Do I need a separate MySQL instance on the slave for each master server? Or is there a way to define multiple master hosts? We're basically using the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: HTML5 audio duration using jQuery I am trying to get the audio duration using jQuery but having hard time getting it. The method I am using is defined below var audioElement = document.createElement('audio'); audioElement.setAttribute('src','song.mp3'); audioElement.play();...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Finish() Activity from other one without starting it with StartActivityForResult()? I have an AsyncTask in separate file (as it uses it about half of my activities) and in that AsyncTask I'm having a constructor with context in it so I can show progress dialog etc. Only problem I have is that Context does not contai...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Changing classes with javascript My code is here: http://jsfiddle.net/PXU2w/8/ CODE $('#navigation').hover(function() { //Check if element with class 'author' exists, if so change it to 'authornew' if ($('div.menu-description').length != 0) $('div.menu-description').removeClass('menu-description').addClass...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Javascript demo hosting I have a blog http://justgagan.wordpress.com/, where I want to show some demo of my javascript's scripts. I know I could do this with tweaking my example for WordPress, but it will increase my pages load time, since I had to add this on body. Is there any site, which could host my example in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Chained callback readability in Javascript? What's the best way to write a series of deeply nested callbacks? You have several functions, each of which performs an asynchronous operation and which depends on the prior function's output. For two functions, this typically looks like foo(bar). A long series of callback...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Need help on PHP/jQuery comments script I asked this question previously but i didnt post the code. So here it goes... <?php require(database.php); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Using FiltersUnitTestCase to unit test Shiro security filters, IllegalStateException Update: I have changed this question to be about the specific problem I am having. This is because unit testing of Filters will be supported in Grails 2.0 so hopefully the documentation will be better then. I am trying to write unit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: getting matrix element using dictionary-like index in Python Numpy can manipulate matrix. And matrix element can be got via numerical indexes. Now, say I have a 3*3 square matrix M (Actually, it is a Malcov transition matrix, where each element speaks the probability from one state switching to another). And the ro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The diagram for the many to many relationship table does not appear in the edmx I am using a databse first method. I generated edmx from the database. But diagrams for the tables which are in many to many relationships do not display in the generated edmx. A: If your Many to many lookup table consists of just Forei...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CGContextSetRGBFillColor not working I am creating sprites from the CGImage I have drawn using the CGContext functions. I have also a color changing mechanism implemented as a menu. But even though I clear the context and change the color the color which is used for drawing remains the same. Do anybody have anyidea ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Algorithm to find related words in a text I would like to have a word (e.g. "Apple) and process a text (or maybe more). I'd like to come up with related terms. For example: process a document for Apple and find that iPod, iPhone, Mac are terms related to "Apple". Any idea on how to solve this? A: Like all of AI, it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is it possible to record calls both sides(mic,speaker) in android? i'm trying to develop an application to record calls bothside(mic and speaker). I've seen there is one app vrecorder providing this vrecorder for android 1.6. Now i want to do this for android 2.2 and above. Can i know is this possible with MediaRe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: A "modern" look of Manifest file A "traditional" Manifest files consisted of application/activities tags, uses-sdk tag and uses-persmission eventually. What are the new tags that you advise to include in the "modern" Manifest file? I am referring to the tags that deals with screens and resolutions, and possibly som...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Committing a set of svn file/directory actions in a single check-in I’ve recently decided to re-structure my svn repositories. This job includes lots of file/directory actions (renaming, copying, moving and deleting) in my repository. By default, each action is required to be committed in the context of a check-in. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Anybody has android honeycomb source? I wanted to attach the source for android.jar in eclipse, but for this I need to download an actual source for android 3.0 honeycomb, however android.git.kernel.org is down since Sep.7. Does anybody have a backup repository or maybe just honeycomb source? A: Google did not sh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: get/use radio button value android I FIGURED OUT WHAT I WAS DOING. I HAD THE VARIABLE NAME IN QUOTES WITH THE REST OF THE URL STRING. How do you save the value of a Radio button into a variable and use that variable later. I can see the variable Day_Item in my LogCat and the value is in there but when try using Da...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: find complete object in list of objects is it possible to find a complete object in list of objects? dim list1 as list(of class1) = alist dim x as class1 how to find x in list1 if it exists without comparing a single property like ID ? A: The Contains method will return true if the element is in the list. dim ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: linux-wide semaphore with a Java API I need to prevent a certain application function from being run concurrently with itself. The risk is significant because this function is in code submitted to java.util.Timer (to repeat every minute for several hours) and the process that sets up the function completes and goes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Apache CXF with Spring I am using Apache CXF with Spring , please tell me how the CXFServlet reads the myapp-ws-context.xml <web-app> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:myapp-ws-context.xml</param-value> </context-param> <listener> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jQuery each loop currently this is static code : if you compare div ids no to that of a hrefs of second list is getting added by +1 for example slide0 » #pic1 to #pic5 slide1 » #pic2 to #pic6 and so on.. how should i achieve this with jquery each loop or any other jquery method ? thanks in advance <div id="my-sl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Drawable resource using a variable I want to use a variable instead of R.drawable.myimage because I have a database with the image's names. I get the name from the database and I want to use the drawable resource with this name. String flagimage = "R.drawable." + myHelper.getFlagImage(5); int resourceId = Integer.pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: error when trying to edit status of Order in admin interface(playframework) In my app ,I have a class Order that contains a collection of cartItems .The Order can have status 'pending' ,'confirmed' etc. After the customer placed the order,it has a status 'confirmed'.Since wrong payment info was provided by customer...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does push technology work successfully on a mobile browser? If I had a webpage that had a square on it and if I was using push technology to update the coordinates of this square on the page, could I see these updates well in a mobile browser (how much in "real-time" would the responses be)? I want to use Sencha to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET Active Directory C# field specification We've got an active directory here. provided the unique user id of the user, I need to access the organization->manager->name attribute related to that userid. Basically this will be used to send an approval form to the manager of the person submitting request. Any ide...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Python google search explicit phrase I am trying to define a google search with the AJAX interface using the very good function described here (A Martelli) Google Search from a Python App ........ query = urllib.urlencode({'q': searchfor}) .... If I define the variable searchfor = "big car", the query generated is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I utilize XAML objects specified in a resource dictionary in other XAML source? If i have a resource dictionary that contains something like <RibbonTab x:Key="HomeRibbonComponent" Header="test"> </RibbonTab> how can I have my Ribbon control add this as a child? (in code it seems easy, in XAML not so much....
{ "language": "en", "url": "https://stackoverflow.com/questions/7544327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Maven copy resources in multi module project My need is pretty basic but I could not find any clean answer to it: I simply need to be able to distribute a resource in a multi-module project. Let us consider for example the LICENSE file, which I hereby assume to be the same for all modules. I prefer not to manually ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }