text
stringlengths
8
267k
meta
dict
Q: why should i use back_inserter in function generate_n? hi guys i will show three codes 1 and 2 makes same work but the third one doesnt work. I want to understand why doesnt work or why do work the other two ? (strrand function produces random string) 1. int main(){ vector<string> svec(50); randomize(); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I get this to run. I keep on getting a cannot find symbol I saw this code on this stackoverflow question at Create Java console inside a GUI panel Whenever I compile the code though I get an error saying it can't find the symbol TextAreaOutputStream. I really want to have this work. I would really appreciate...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to reduce execution time? I have a facebook app where users can bet on a basketball game (guess the winner, the difference, the mvp and the top scorer). I keep one table with the games, one with the IDs of the users and one with the bets. If you guess the winner right, you get 1 point. If you guess the differenc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Deleting list elements based on condition I have a list of lists: [word, good freq, bad freq, change_status] list_1 = [['good',100, 20, 0.2],['bad', 10, 0, 0.0],['change', 1, 2, 2]] I would like to delete from the list all elements which don't satisfy a condition. So if change_status > 0.3 and bad_freq < 5 then I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Amazon Red Price On Amazon store there are many prices and I'm trying to get what is referred as Amazon Price that is in red and Large. When I try $pxml = aws_signed_request("com", array("Operation"=>"ItemLookup","ItemId"=>$itemId,"ResponseGroup"=>"Large"), $public_key, $private_key); $pxml->Items->Item->Offers->Off...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Rewrite file extension BUT deny direct access to file I am looking for a way to hide the file extension via .htaccess and deny direct access. Let's consider the following: http://www.xyz.zyx/index.php gets converted to http://www.xyz.zyx/index OR http://www.xyz.zyx/ All good till now. What I want to do next is bl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Fluid MovieClip with mouse pan at AS3 In fact, all I want to have is getting this pan effect and to be able to add buttons inside fluidly resizing main MovieClip. See this example: www.avmevsimifilm.com Do you have a good idea to make something working like this? Thanks A: Parallax scrolling for the parallax eff...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Are WebSockets not supported in Firefox I'm running Firefox 7 in Ubuntu 11.04, and I noticed socket.io was falling back from web sockets to xhr-polling, so I typed WebSocket in Firefox's console, and got [00:48:21.224] ReferenceError: WebSocket is not defined On Google Chrome 14 I got WebSocket function WebSocket()...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Error initializer element is not constant I am having trouble with my code, and I can not solve .... the code snippet where the error is reported: static FILE *debugOut = stderr; static FILE *infoOut = stdout; The error that the gcc return is: initializer element is not constant A: try doing it in main for exampl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: jquery hover hides on child element live example: http://jsbin.com/axaqoc/2 when i try to select the child select box, the dropDown menu hides away, thinking the mouse went away from parent element. js code: (complete code: http://pastie.org/2624436) $('.dropOption').hover(function(e) { e.stopPropagation();...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: passing this from constructor to other constructor yields undefined reference on linking I am trying to compile code with the following structure under codeblocks: class a : public cppcms::application (has virtual members) { public: a() : b_inst(this) {} ... b b_inst; } class b { public: b(a* ptr) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Resizing the content of UIWebView? A noob here so it might take a while to understand what's the wrong, just follow along .. the key purpose of my app is to download an xml file from rss feed then parse it and pass it as html file to a webview with this method: [webView loadHTMLString:aString baseURL:nil] after the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting specific things from a site in android So i'm working on a track and trace app. And i need to pull information from this site: http://www.postdanmark.dk/tracktrace/TrackTrace.do?i_stregkode=RA076673982CN My problem is that i dont know how to pick this part: * *september 2011 09:47 Ankommet til DANMARK ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Memcached on NodeJS - node-memcached or node-memcache, which one is more stable? I need to implement a memory cache with Node, it looks like there are currently two packages available for doing this: * *node-memcached (https://github.com/3rd-Eden/node-memcached) *node-memcache (https://github.com/vanillahsu/node...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do android "app lock" applications work? I've tried googling, and looking on stackoverflow as well, but I can't seem to find any satisfying answer as to how the "App lock" applications(eg: ZDBox, App Lock, etc..) work. Is there a service that runs in the background continuously polling to see if the app is launc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: 404 errors with Codeigniter on nginx when accessing controller I'm using Codeigniter for my website, the root website works just fine which has a landing page, however I have a development section located /var/www/domain.com/www/dev/ which /var/www/domain.com/www/ is the root (landing page is stored there). Now, whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to detect that animation has ended on UITableView beginUpdates/endUpdates? I am inserting/deleting table cell using insertRowsAtIndexPaths/deleteRowsAtIndexPaths wrapped in beginUpdates/endUpdates. I am also using beginUpdates/endUpdates when adjusting rowHeight. All these operations are animated by default. How...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "120" }
Q: Is there a open-source forum that I can integrate my current members database with? So what im trying to do is save myself coding a forum... I've got a members table already with their passwords, username etc etc... and I want a forum system that can possibly be linked with my members table. So then they don't have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: scala simple while loop error object JDWhileLoop { def main(args: Array[String]) { var index:Int = 0 while( index<=10) { println("index="+index) ind...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add and subtract 16 bit floating point half precision numbers? How do I add and subtract 16 bit floating point half precision numbers? Say I need to add or subtract: 1 10000 0000000000 1 01111 1111100000 2’s complement form. A: The OpenEXR library defines a half-precision floating point class. It's C++, bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Prevent firefox from resetting scroll position when overflow element changes I am trying to implement a modal popup like the way facebook does it for previewing photos. From what I've inspected, the body becomes overflow:hidden and the modal box becomes overflow-y:scroll. However, I have a bug in my website for fir...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How does std::endl not use any brackets if it is a function? The question is pretty much in the title. According to C++ Reference, std::endl is actually a function. Looking at its declaration in <iostream>, this can be verified. However, when you use std::endl, you don't use std::endl(). Instead, you use: std::cout ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: diff on two program with same input? #!bin/sh i=0; while read inputline do array[$i]=$inputline; i=`expr $i + 1` done j=i; ./a.out > test/temp; while [$i -gt 0] do echo ${array[$i]} i=`expr $i - 1`; done ./test > test/temp1; while [$j -gt 0] do echo ${array[$j]} j=`expr $j - 1`; done diff test...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NUnit vs Manual Unit Testing Background I have recently tried to develop a suite of tests for regression testing of a particular application. I have been using NUnit and have had no problems. I ran into the issue of sending parameters to NUnit tests, for which no satisfactory answer seems to exist. Question Say I im...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Remove/change Internal styles sheet styles with JavaScript/jQuery I want to be able to remove/change the internal style sheets values through JavasScript. It has to be through JS because I cannot edit the html since I am using an application that does not allow me to, but I can use JS. How can I change the value for...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Form Action with Relative Path Not Working I am using PHP and MySql and running inside of VS.PHP. I have written the following: <form action="../register.php" method="post"> <input type="button" value="Submit" id="submit" /> </form> But when I click, nothing actually happens. Am I not allowed to use relative paths ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Operator '^' cannot be applied to operands of type 'double' and 'double' I have this code: private void t_Tick(object source, EventArgs e) { double anInteger; anInteger = Convert.ToDouble(label1.Text); anInteger = double.Parse(label1.Text); double val1; double val2; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Removing indent in PYDEV I am using pydev for python development. I am facing issue while removing indentation for a block of statement. If I have to add indentation I used to press SHIFT + down arrow key until I reach the end of block of statements which I want to indent and then press the TAB key.This is how i us...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you setup relationships with many foreign keys from the same table in PHP ActiveRecord? I am building a real estate related website that real estate agents and investors can use to track properties submitted in the system and keep track of who is owed what profits. I have the following tables that I am having...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Wait for Swing to finish updating JProgressBar before continuing I have a JFrame with a CardLayout set as its layout manager. This has two JPanel subclasses in it. One is a panel, WordsLoadingPanel, which displays the text "Loading words..." and has a JProgressBar. The other has to actually load the words. This take...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: WebView - WebPage not available I (like many others) followed the webview tutorial, but I can't get pages to load. Everything comes up as 'Webpage not Available' I have ensured that the emulator does have internet access, and just to rule out a problem with the emulator I tried installing it on my phone, which resu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Java can't find the 'equal' method I tried to check if a property was equal to a string but I keep getting this error Code: if (prop.getProperty("quit").equal("true")) { } Error: cannot find symbol symbol: method equal(java.lang.String) location: class java.lang.String A: The method name is equals not equa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-8" }
Q: SDL Surface with a menu and status bar How can I add a menu, and a status toolbar to SDL? I can not find any reference to this online... I think it might be an SDL limitation? If so, what portable library can I use which would allow me to add an SDL surface to it, and a status bar and menu?
{ "language": "en", "url": "https://stackoverflow.com/questions/7623812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python if statement doesn't work as expected I currently have the code: fleechance = random.randrange(1,5) print fleechance if fleechance == 1 or 2: print "You failed to run away!" elif fleechance == 4 or 3: print "You got away safely!" fleechance is constantly printing as 3 or 4, but I continue to get the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Looking for a javascript solution to reorder divs I have some divs in the page that show different things of the same kind, for example offers, now offers have ending time, and also posted time, if the user wants to order by ending time, or posted time, they should be re ordered. I'm looking for a javascript solutio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How set cursor inside textbox after page load with jquery Alright i have a asp.net textbox and i want to set cursor inside textbox after page loaded like when you open google. I only need set cursor inside textbox code. I tried this but not working $('txtSendTo').focus(); A: If txtSendTo is an id, you need a # $('...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: JQuery hover addclass not working I am trying to use JQuery to change a picture inside of a nested li with an id of "logotest" The classes I want applied are logotest1 and logotest2. Basically when the user hovers over the button, the picture is changed to a different one so the colors match. Here's a fiddle. Obviou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Submitting form data through a jQuery command I have an MVC project I'm working on, and am creating a set of different submit buttons, each which pass a different value to the controller on submission. In my current code, I have the call to the submit function first create hidden input elements to pass the data I wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Massage model data before save in Django I'm not sure if this is the best way to do this, but I have some data that is being sent by a form. I have a ModelForm that takes the the request.POST of that form data. All the data that is being sent is a description, amount and deposit (boolean). When the person submits ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I tell IE to add the class 'Selected' to my LI on scroll? I was hoping to get a little help with my code. This works in moz/webkit but not in ie. I don't quite understand why :( $(window).trigger('hashchange'); // Add .selected class to nav on page scroll var $sections = $('section'); var $navs = $('nav > ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I get pianobarfly to compile correctly on OS X? I'm trying to get pianobarfly working on OS X and can't get it to compile correctly. Selected text from the install document: Dependencies ------------ gmake libao http://www.xiph.org/ao/ libfaad2 http://www.audiocoding.com/downloads.h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to tell which Facebook Page my Page Tab App is installed on Possible Duplicate: How can I find out what Page has installed my Facebook Canvas App? I have a facebook app and I have installed this app to a page tab through the graph api. It worked fine so far. Once this app may be installed to a lot of pages, w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jquery onclick run I need to run all onclick events on page load. how can I do something like this: $('.upload').foreach(function(){ //execute onclick for found element (ex: test(this, 'var') ) }); <div class="upload" onclick="test(this, 'var')">text</div> A: You can use the click() or trigger() methods to do th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ContentFlow javascript - reloading images after filtering I am using the following "Coverflow" javascript, ContentFlow and have a filter function to search the Contentflow for image titles and filter them. I need the Contentflow to reload with the filtered images after the search function. I have the following code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there any loss of functionality with streaming jobs in hbase/hadoop versus using java? Sorry in advance if this is a basic question. I'm reading a book on hbase and learing but most of the examples in the book(and well as online) tend to be using Java(I guess because hbase is native to java). There are a few pyt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Printing numbered nested lists on separate lines using enumerate in python I've come to some grief in trying to achieve the following though I suspect it has a simple fix that has temporarily leaked from my brain. I need to be able to to print a grid of variable dimensions that has numbers down the left-hand side li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java Swing - set opacity for all children components? I've got some Swing components with children. When I setOpaque(false) on the parent, the children still have opacity. So I hacked up this function (thanks SOF users): Component[] comps = this.getComponents(); for(Component c : comps) { if(c instanceof JCompon...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Alternative select box with jquery I'm trying to make the a selectable list like a select-box, so when you click on the li a, change the label for the selected li a. First of all, this is possible? Here is the code: http://jsfiddle.net/dcalixto/h8esW/10/ Thank's for any hint :) A: Definitely possible using the tex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Zero width inline element moves justified text node contents I have a justified text node into which I want to insert an inline placeholder ( element if you like) whose only content is a "&zwj;" that shouldn't have any width (and chrome inspector says as much too). I have noticed that when I insert this node inline ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I ask ocamlopt to link against glibc 2.5? Is there a way to ask ocamlopt to link against glibc 2.5 such that I can run the resulting binary on machines that have only that that version of the library? If this were possible, are there additional packages I would have to install on my machine? My machine does...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Threaded programming - ties to asynchronous programming? Useful for web apps? Aside from AJAX, I don't know much about asynchronous programming, and certainly nothing about threads aside from the basic idea behind them. So, needless to say, I was a bit perplexed when I saw in a MSDN blog that the newest version of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: merging arrays and word frequency So I'm cycling through a document with 41 paragraphs. For each paragraph I'm trying to [1] first break the string into an array, and then get the word frequency of the paragraph. I then want to combine the data from all paragraphs and get the word frequency of the whole document. I'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Sign out has to be clicked twice in asp.net In my master page I have the signout. When I click the sign out button the below code is executed protected void singout_Click(object sender, EventArgs e) { Session.Abandon(); if (Request.Cookies[FormsAuthentication.FormsCookieName] != null) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Zend and google fusion table I have a fusion table containing postcodes. I'm trying to access it using PHP. After hours, I've managed to get something display (Select) using Zend. I'm now able to display the body of the Http response. But I can't find a way to do a 'foreach' for each postcode (I need to update anot...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails can't see my controller Given: Two controllers under /app/controllers named: * *customers_controller.rb (CustomersController) *home_controller.rb (HomeController) Problem: When I run rails command (i.e. rails c) this is what I get: ruby-1.9.2-p290 :001 > CustomersController => CustomersController ruby...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Whitespace detector returning errors I created a method to basically detect white space characters. I go through a string and check each character for white space. If it is a white space character, I return true, and if it's not, I return false. However, I get a compilation error, stating "missing return statement"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Use method in different context, instance_eval adds unwanted argument I'm trying to call a method of an object foo as if it was an method of object bar. I tried two approaches: 1. unbind and bind - fails because of different classes class Foo def initialize @name = "John" end end class Bar def out put...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java Swing Components - why deprecated HTML markup? I'm learning Java from a webdev background. I've been using some HTML inside Swing components, but a little part of me dies every time I see or write <p color=red>Two<br>Lines</p> So I can sleep at night, what's the reason for this poor, deprecated markup? And, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Silverlight Grid Layout When I have Grid in Silverlight, and I provide Column Definitions like below <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> For some reason the items that get placed in those c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multi-dimensional array to JSON java / android gson In my web service I'm making a query to a database, and I would like to return 2 columns of the database and put these columns in a 2d array. Also I would like to convert the array to JSON and send it to the client. The client using gson parses the message from t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Property binding in MVVM my cpde in ModelView : public Boolean EnableTextBox { get; set; } public CustomerAccountVM() { this.EnableTextBox = false; //... } code in View: XAML : <TextBox Text="{Binding Path=IdCustomer, Mode=Default}" IsEnabled="{Binding Path=EnableTextBox,Mode=Default}" /> Why ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I fix this FS00003 error? This is my code: module RTX open System open System.Text.RegularExpressions let input = "Line 1: Num allocs:3 New:2 Delete:1 Line 2: Num allocs:3 New:2 Delete:1 Line 3: Num allocs:3 New:2 Delete:1" type AllocResult = { lineNo:string; numAllocs:string; news:string; frees:string } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Find zeros for solutions to differential equations in Mathematica Given the following code: s := NDSolve[{x''[t] == -x[t], x[0] == 1, x'[0] == 1}, x, {t, 0, 5 }] Plot[Evaluate[{x[t]} /. s], {t, 0, 3}] This plots the solution to the differential equation. How would I numerically solve for a zero of x[t] where t rang...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: "Don't ask again before sending requests to" checked or not I tried this using "Test user" and random friend , it seems "Test user" continue to appear even previous I cheched "Don't ask again before sending requests to Test user and rand user". Is sending apprequests only available through fb.ui and no POST method ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Adding a new page to a website sorry if this question seems a bit open ended, but I'm often wanting to add new pages to my website. As my website grows, this means I'm having go back and add a link to the new page on all of my previous pages, which is becoming increasingly time consuming. Is there any way around thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: asp.net mvc 3 view for ef4 join how can i display a join from a entity framework model and then show it in an asp.net mvc 3 view? The join is then based on more than 1 model? A: Create a custom view model that will hold the contents of your EF join. A: you can have a view model with all the properties you want ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Web player not playing files with non-ASCII characters Our app allows users to upload video. I noticed, as soon as someone uploads a video with "é" in the file name, the video doesn't play. For example "fooébar.flv". Question is. Should I be saving file names with those characters or should I filter out those char...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Graph API - /apprequests seems to return an empty JSON array every time When I use https://graph.facebook.com/(userid goes here)/apprequests?access_token=(user access_token goes here) it returns an empty JSON array like so: { "data": [ ] } Even though there ARE app requests. These people were having the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Dynamic CSS padding for Google +1 button I have several Google +1 buttons on my website and when a button is clicked a certain amount of times the plus one button on the page becomes wider and therefore moves out of its space given. How could I stop this from happening dynamically? The CSS code for the button is as...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Backreference each character For the sake of simplicity & learning something new, please don't suggest using two separate replace functions. I know that's an option but I would rather also know how to do this (or if it's not possible). '<test></test>'.replace(/<|>/g,'$&'.charCodeAt(0)) This is what I've got so far....
{ "language": "en", "url": "https://stackoverflow.com/questions/7623935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Updating Apple g++/gcc What is the difference between Apple gcc and GNU gcc? Is Apple gcc a superset of the standard one? The g++ version information in my OSX shows: $ g++ --version i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) Some of the latest features of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: CSS: #id .class VS .class performance. Which is better? I'd assume that this would be faster: #dialog .videoContainer { width:100px; } than: .videoContainer { width:100px; } Of course disregarding that .videoContainer in the first example would only be styled under the #dialog tag. A: CSS selectors are matched fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Android & OpenId4Java Any special tricks/gotchas for building an OpenId app for Android using OpenId4Java? Haven't found info on others that have made this combo work. I have a simple app that compiles fine in Eclipse & command line, but when I install the apk, I get a bunch of debug messages indicating there are c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: php - which is faster call mysql connection + query OR call a data file? good evening, i have a mysql table that contain the users data and i use mysql_connect, mysql_query, mysql_fetch_array to fetch user data this query should run on every page load and for thousands of users so which is better and faster ? using ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: quickfix: how to convert FIX::Account to a c_string or other types I am using quickfixengine to build a FIX application. quickfix almost has no documentation, pretty much like a blackhole. I have a variable which is a FIX::Account type. I know it is a FIX string type, but how do I get the string out (to be a c-strin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Naming a relation in Doctrine 2 ORM? How can i set the name of the foreign key (edit: not the name of the attribute itself) for the many-to-one relation "region" using YAML? SWA\TestBundle\Entity\Province: type: entity table: province uniqueConstraints: UNIQUE_PROVINCE_CODE: columns: code id: i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: std::vectors in classes I'm building a c++ program, and I need to store an indefinite (i.e., dynamic) number of images within a class. I also have an indefinite number of sprite objects which can display those images. Right now I have something like this: class Hud { std::vector<Image> images; std::vector<Sprite...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to create an interval of times in PHP based on a start time? I'm wondering how given a start time, I can calculate a series of time spans in intervals and execute code during that time. For example: I start at 3:30pm and have 4, 45 minute intervals that need to be calculated based on the start time. Then between...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Boost requires compiled libraries like libboost_date_time for even basic things. How do I eliminate dependencies on building those libraries? I want a header-only BOOST. Using boost::bind and boost::ptr_set, it seems unnecessary to depend on libboost_date_time and libboost_regex. But I get a linker error for those l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to get the content of a tag inside a label How can get the content of the b tag? <label for="onde"> <b>qua qua text</b> <textarea name="onde"></textarea> </label> I am trying this with no success: $('textarea[name=onde]').prev().val(); A: $('label[for="onde"] b').text(); should do it A: You were clo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623975", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: IntelliSense: cannot open source file "curl.h" in C++ I am unable to compile my C++ project. IntelliSense: cannot open source file "curl.h" in C++ I tried adding that file to the "Header Files" folder in Solution Explorer: no change. I was unable to add it to the "Source Files" folder. How can I fix this? A: Unde...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Intersecting sets of custom variables in Google Analytics This question refers to both the iOS SDK and JS API for Google Analytics. Let's say a mobile device opens my application or views my webpage, and I want to note certain things, for example, the device's model, firmware version, and application version. It set...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: rake undefined method `[]' for nil:NilClass I just installed a Rails 3.1 app to my deployment server. When I tried to run sudo rake db:setup RAILS_ENV=“production” I got an error message saying rake aborted! undefined method `[]' for nil:NilClass With --trace it says: ** Invoke db:setup (first_time) ** Invok...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: load data local infile ERROR 2 file not found I've been ramming my face against this sql error for about 45 minutes, and I have a feeling it's going to be something silly. I'm trying to load a .txt file into my database, which is on a server elsewhere. I'm using putty on windows 7. The sql call I am using is the fol...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Plugging a sortedArrayUsingSelector and/or initWithArray Memory Leak Between Classes I've been struggling to solve this memory leak for awhile now, so I'm hoping the community can provide some help. Memory Management is still an issue I'm working to understand (and yes I have the memory management guide). According ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Scheme, lists, and graph theory I'm trying to develop a Scheme function that will take a graph as defined: (define aGraph '{{USA {Canada Mexico}} {Mexico {USA}} {Canada {USA}}}) and find the number of nodes bordering the specified node of the graph. I believe I am approaching this problem the wr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Looping moving background objective-C I am testing a background-loop animation where there will be to images both 1024x768 pixels in dimension, move leftwards, go offscreen, then jump back to the other side, and repeat. I was able to do this by creating a constant speed for both background image to move (successful)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why do I get a seg fault? I want to put a char array pointer inside a struct consider the fallowing code: typedef struct port * pport; struct port { int a; int b; pport next; pport prev; char * port; }; void addNewport(pport head) { pport newPort = (pport)malloc(sizeof(pport*)); newPort->prev=temp; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: No `while (!my_ifstream.eof()) { getline(my_ifstream, line) }` in C++? On this website, someone writes: while (! myfile.eof() ) { getline (myfile,line); cout << line << endl; } This is wrong, read carefully the documentation for the eof() memberfunction. The correct code is this: while( getline( myfile, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7623999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I speed up my Java text file parser? I am reading about 600 text files, and then parsing each file individually and add all the terms to a map so i can know the frequency of each word within the 600 files. (about 400MB). My parser functions includes the following steps (ordered): * *find text between two ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to hide frag and refresh the activity to show this i have a button called ac and when i click on it, i want to hide my two fragment called a and b, but this is not happening, what do I need to do to make this work? package cmsc436.lab5; import android.app.Activity; import android.app.FragmentManager; import an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Authentication with Windows Live ID issues I am trying to set up authentication with Windows LIve ID and followed this blog post. Everything is working but I have a problem logging into live INT web site. Whenever I try to log in (https://login.live-int.com/login.srf), after entering valid email/password I get redi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Batch: Running exe, copying file to appdata, and put it in startup For example, I have 2 exe's. Let's call them 1.exe and 2.exe, to keep it simple. And I want to make a zip file, with 3 things in it, 1.exe, 2.exe and setup.bat. First off, I want to know that the user is okay that we start the first exe (1.exe). So w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Load Files for Effeiency I was told there is a way to clean up my code to make it run faster. i should be able to reuse variables so i wont have to keyed them over and over again. Thus in return should make my reading of my files faster when load time comes, but i cant seem to figure out how to do this. My code wor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Using PHP pack() to Convert WKT into WKB I'm using prepared statements to insert data into my database, problem is I'm not able to use INSERT INTO table (polygon) VALUES (GeomFromText(POLYGON((?,?,?,?,?,?)))) why? well, seems the GeomFromText itself is interpreted as text :/ so I figured I'd try pushing pure WKB str...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C++0x : Storing any type of std::function in a std::map I'm trying to store a set of std::function in a map (under GCC 4.5) I'd like to get 2 kind of things : * *storing functions with arguments already passed; then you just have to call f() *storing functions without arguments; then you have to call f(...) I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Confusion with typedef and pointers in C Possible Duplicate: Typedef pointers a good idea? I am confused with the following: typedef struct body *headerptr; Now, when I create something with type headptr that points to a struct body, to create a new headerptr would be as follows (I'm not sure if I'm doing this c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does error_log() always send exactly 3 emails? I'm using the error_log() function like so: error_log($errorstring, 1, 'myemail@gmail.com'); And it works fine, but every single time it is executed I get exactly 3 copies of the same email spaced about 1 or 2 seconds apart. There is no loop or anything that it's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ClassCastException at Gallery.setLayoutParams? I am create a base adapter for a Gallery. I am using this method to override getView(). But i keep getting this error at the LayoutParam's code. 10-02 01:14:32.543: ERROR/AndroidRuntime(839): FATAL EXCEPTION: main 10-02 01:14:32.543: ERROR/AndroidRuntime(839): java.lang...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: bjam can't find the boost libraries I've built boost from source because I need the latest version to build pyopencv with. That all went fine. However, bjam now can't find the boost libs or includes because now they're no longer in /usr/lib, now they're in /usr/local/lib and /usr/local/include. (I did add /usr/loca...
{ "language": "en", "url": "https://stackoverflow.com/questions/7624043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }