text
stringlengths
8
267k
meta
dict
Q: Highlighted color not cover all the table cell in Objective-c As the screenshot below, the highlighted color(blue) is not covered all the are of the cell, how can I make the highlighted color(blue) cover all the cell? Thanks A: Your subviews are covering the highlighting. You can try setting the highlighted color...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get unique or distinct user comments? User has many Posts and many Comments. Posts has many Comments. If I have @post, how do I get all unique user comments of this post? For example. User Foo and user Bar have comments on @post. User Foo has 10 comments, while user Bar has 5 comments. The result only needs t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Error while trying to parse JSON using the json library I'm trying to parse JSON using the json library. I'm executing the chunk of code below, and I get the error: Traceback (most recent call last): File "test1.py", line 12, in <module> parsedResponse = json.loads(data) File "/usr/local/lib/python2.7/json/_...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using LINQ to SQL with custom business model? When using LINQ to SQL am I forced to live with objects structured the same as the database? Or can I use a different modelling structure for my business models? If it's possible, how can I make this change? A: You can create your own business model as DTO classes and c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP parse HTML rows based on class name How can I get all the rows with a specific class name such as: <tr class="dailyeventtext" bgcolor="#cfcfcf" valign="top"> and then place each cell in that row into an array? I used cURL to get the page off the client's server. A: $matches = array(); $dom = new DOMDocument;...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Animated Panel in Java how do applications get animated such as when you press a button, suddenly this whole panel would slide out then another panel would slide in with another set of option. is it playing with Thread.sleep(time) then change coordinates of the panel? or there's more than this algo? A: This is some...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP: Extracting important keywords from a string I use the Google Images API to automatically generate thumbnails for my blog posts. I want to pick 3 or 4 important keywords from the post title and get a relevant image from Google Images. What's a good way to do this using PHP? A: You could try the yahho term extra...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django (nonrel), App engine and asynchronous database calls When using Google App Engine with Django-nonrel, is there any way to take advantage of the Async Datastore API when I declare my model classes with the Django API? A: Ok, I've investigated a bit more and found an alternative way to deal with having a Djan...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: android: ksoap2 org.xmlpull.v1.XmlPullParserException: expected: START_TAG exception I am trying to get a response from a web service. However I am getting some exception errors: mainly this one org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:S...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I reset the text visible with a jQuery Autocomplete combobox? Using a jQuery Autocomplete combobox like on the demo http://jqueryui.com/demos/autocomplete/#combobox How do I reset the visible user-entered text using jQuery? (after the user has entered some text, made an autocomplete choice and caused, an unre...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Use ManagementObject to restart remote service I want to restart a service on a remote machine and do not want to use ServiceController because the process to get all services on that machine took 21 seconds while the following ManagementObject returned in less than 2 seconds: ConnectionOptions options = new Conne...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: sumproduct of List or Array using lambda expression I'm trying to get the sumproduct (values * index) of a List or Array. for (int i = 0; i < myList.Count; i++) { sumproduct += myList[i] * i; } Can this be done using a lambda expression? In general, can I access the index of a List or Array in lambda expression...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Given an array of ints, what is the most efficient way to split the array down the middle into two arrays of shorts? It struck me there must be a clever way to do this. This isn't for homework, or work or anything. I was just noodling around with a file format that has data interleaved. So, in generic C/C++, (or w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Need help setting Neural Network parameters (learning rate, momentum, hidden layer size...) I have a standard feedforward backpropagation neural network that i would like to train to be able to recognize a blue ball. I have 30 images 20 of the ball and 10 without and my first question is whether or not this is enoug...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does read-sequence not return upon end of the console stream? I am opening a serial port with CLISP in Cygwin as an IO stream and found that reading character-by-character is too slow. For some reason, the stream is being classified as interactive which I believe is causing it to hang with a read smaller than t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to save/load progress? Suppose I have a program, with let's say - a dictionary, that the user updates, changes and stuff like that. Now, I want to save that dictionary in a file, so in the next time he runs the program, he can continue where he stopped. What is the right way to/how would you accomplish that? Tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Zend Framework: Select with join and PDO name param binding I am using Zend Framework and have been trying to do a joined query and also use named param binding. Referencing from the two posts below. When I just do the join everything works. When I add the name binding then it gets this error: Message: SQLSTATE[...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting access token issue with twitter4j I am getting the following error. Any help ? 09-25 20:44:58.934: WARN/System.err(3741): oauth.signpost.exception.OAuthExpectationFailedException: Request token or token secret not set in server reply. The service provider you use is probably buggy. 09-25 20:44:58.934: WARN/S...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Custom TableViewCell question I subclassed UITableViewCell and added a round rec button using IB. Normally, the event will be handled on the class of my custom UITableViewCell. But how do handle the event that the button is clicked on the viewController which has a UITableView that uses this UITableViewCell? A: Whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Authenticating Heroku app with Google I'm trying to set up a Rails app on Heroku to access Google data. I'm new to the process but it looks like I need to register an authentication certificate with Google in order to use Google services (using either OAuth or AuthSub). End game: I need persistent access to Google c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to instantiate a non-public final class using reflection? I have a non-public final class that looks like the following: final class FragmentManagerImpl { ... } Note that it is not public and it has no declared constructors. I would like to instantiate an instance of this class using reflection. However, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Android Google API Java Client com.google.api.client.auth.oauth2.draft10 I was trying to do a simple app using the Google Tasks API. Something simple it's turning into a nightmare. Maybe it's something simple, probably it is, but I can't figure it out. The problem: I was following the example of TasksSample.java fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to load more on PHP array? I use jQuery (I found this code in an answer, tested and working) to show people.php and reload it every 100 seconds. People.php has an array peoples where there are saved name, job, birthday. As you can see, the output stops at 30 names. How can I have a twitter like button "load more...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Launching Android Market Main Page from an application I'm trying to write a launcher-like application (I'm not planning to release it, it's just for me to use) but I don't seem to find any way to launch the Market. All of the answers I've found actually perform a search on the Market (using a uri "market://") or ev...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are the 'ref' and 'sealed' keywords in C++? I've just seen some (presumably) C++ code which sports two "keywords" unknown to me (I'm assuming keywords but, since I have no context, they may be simple #define things). They also don't seem to appear in the C++11 standard, at least the draft I have but, since that...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Entity Framework Discriminated Associations Is there any way of getting discriminated associations to work in Entity Framework 4? That is, where we have the following tables TableA RelatedEntityTypeId RelatedEntityTypeKey TableB (1) Id TableC (2) Id TableD (3) Id and I want to have three associati...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can nodejs be installed on a free webhost My goal is to create a chatting website. Not so much for the sake of the website, but for the experience so I know how; just something to work towards gradually. I tried long polling, but that always ends up pissing off the webhosts whose servers I'm using. I was told to use...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: exception during commit I am using hibernate 3.6.1 and jpa. At certain times when I try to commit the data into database I seem to get the following exception: Exception in thread "pool-2-thread-1" javax.persistence.RollbackException: Error while committing the transaction at org.hibernate.ejb.TransactionImpl.commit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SharePoint 2007: How to cross-site lookup value? I'm working in application build in SharePoint 2007, my question is can we do lookup value of Site Column across Site? A: Only possible with third party : http://www.boostsolutions.com/Cross-SiteLookup.html A: If your lookup list is at Site collection and the column...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mac OS X + Rails 3.1 + Unicorn + HTTPS Here is my setup: * *Mac OS X 10.6 *Ruby 1.8.7 *Rails 3.1 I have a Rails 3.1 application that starts with Unicorn every time this machine starts up (via a .plist in /Library/LaunchDaemons). The .plist essentially does this: cd /my_application_directory sudo unicorn -E pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Javascript Json Parse I am using Json in javascript. I'm reading the json from test.js. How can I read for(;;). <script type="text/javascript"> $.getScript('ajax/test.js', function(data, textStatus){ jQuery.each(data, function(return) { alert(return.name); alert(return.surname)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: default Twitter button doesn't load image I went to Twitter's resource page here (https://twitter.com/about/resources/tweetbutton) and got the following code: <a href="https://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a><script type="text/javascript" src="//platform.twitter.com/wid...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: rails 3 get data from an association and display in flash message I'm using ActiveMerchant with Authorize.net and already setup 2 models Order and Transaction. (http://railscasts.com/episodes/145-integrating-active-merchant) I would like to get error message from the transaction if error occurred then output in flas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get column names of multiple tables and insert it to another table + PHP MySQL I have this code: $createFields="CREATE TABLE temp_field (fld text NOT NULL, tablename char(50) NOT NULL)"; mysql_query($createFields); $fields=array(); $campaign=mysql_query("SELECT campaignid FROM campaign ORDER BY campaignid"); w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I get touchesBegan event on SuperView In my program there is two views(scrollView-super, view-sub*2). In my case two subviews are subviewed in scrollView. touchesBegan event called in subviews. How Can I get event in scrollView??? @interface MyScrollView:UIScrollView ... @implement MyScrollView ... -(void)t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to edit/update a nested resource without going through the parent class? Can I update my nested resource without going through the parent class? I put this in the routes put 'ratings/:id' => 'ratings#update', :as => 'update_ratings' and I put an exception for [:edit, :update] in the nested re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Reading Samsung firmware and serial from Android phones (java) I'm looking for a way to read the firmware version (e.g. I9100XXKI3) from a Samsung mobile phone running Android from within an App. I know it is possible as I've seen an app already doing this however I could not find anything in the SDK docs.. Also I'm...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: New Static Library has build error "libtool exited with code 1" I created a new static library in my iOS project and now I'm getting the build error Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool failed with exit code 1 How do I go about debugging this? A: To see the actual output ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: No idea where compiler errors are forming when using JLayeredPane So, in my last question ("Can't figure out how to overlap images in java") I was kindly advised to utilize layout managers and the JLayeredPane. However, after studying the demos, and forming my own code, I have a whopping 34 compiler errors. The comp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Non virtual version of virtual class Lets say we have the following two class definitions. #include <iostream> #include <array> class A { public: virtual void f() = 0; }; class B : public A { public: virtual void f() { std::cout << i << std::endl; } int i; }; Here sizeof(B) == 8, presumably 4 the virtual po...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Intercepting Outgoing SMS Is it possible to intercept outgoing SMS before it is actually sent, get its contents then ignore / send it according to some criteria? eg. block all international text (numbers with leading 00), but allow everything else. A: Based on what I've been able to find, it seems as though the an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Loading images from cache but return a blank screen i try the example i gotten from here. The example shows how to display a image that is larger then the screen and the screen acting like a window, allowing user to look at the images via scrolling. However, what i want to achieved is similar just that, instead of o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP MongoDB find nested element How can I do a select for all documents that have a parent.id that is equal to 3? I try doing this.parents.id == 3, but it doesn't seem to be working... [parents] => Array ( [0] => Array ( [id] => 1 [title] => Folder 1 ) [1] => Array ( [id] => 3 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I flush a 'RandomAccessFile' (java)? I'm using RandomAccessFile in java: file = new RandomAccessFile(filename, "rw"); ... file.writeBytes(...); How can I ensure that this data is flushed to the Operating System? There is no file.flush() method. (Note that I don't actually expect it to be physically written...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Need help constructing a deterministic finite automata? What are the rules for constructing a deterministic finite automata in the form of a diagram? My professor explained by examples, but I am not exactly sure what rules must be followed by all diagrams. Any help is appreciated, thanks! A: Off the top of my head...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I make cron jobs to POST to a url through PHP scripts? I am not sure how I can assign cron jobs through PHP script AND have that cron job POST to a PHP script. Any ideas? Also, what would I need to tell my webhost people? usually If i want to allow one or more PHP script to have write access to a csv or text...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How can I capture audio from a mic to send it over a socket? I am using Windows 7 and developing a chat-like application with Visual Studio 2010. I am looking for an EASY way of capturing audio from a microphone (or rather, from the default recording device), collect the buffer from said input, and send it over a so...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: OCaml: Using a comparison operator passed into a function I'm an OCaml noob. I'm trying to figure out how to handle a comparison operator that's passed into a function. My function just tries to pass in a comparison operator (=, <, >, etc.) and an int. let myFunction comparison x = if (x (comparison) 10) then ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Unable to take screenshot on android using robotium and private method i have been trying to get a screenshot lately but every thing in vain the folders are created in android emulator with api level 8. i have mentioned the code below. In the this code Method takeScreenShot() is supposed to create a directory and st...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Subtract (-) 2 Text Labels from each other to get result Well, I've tried it with ToInt, ToString, and I'm out of options. I'm trying to substract 2 Label Texts from each other. (Those contains numbers from RSS) What I have at the moment: lblOldID.Text = nodeChannel["oldid"].InnerText; lblNewID.Text ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Storing a Yes / No radio button into a MySQL database I've seen a Yes/No form radio buttons value be stored/saved in a couple different ways. I wonder which way is better and why? This is for a PHP/MySQL application with a typical Yes/No question as part of a form. 1.) Store it as 1, 0 or null. 1 being Yes, 0 being ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: fitting and plotting a parabola, matlab I have a very simple problem. I have x=[ 10 25 50]; y=[ 1.2 3 7.5]; I know my curve fitting function f(x)=(a*x+1)/(bx+c); How can I get coefficient(a,b,c) solve in matlab and also plot this curve? A: Rearrange y = f(x) to make a, b, and c the unknowns: y = (ax + 1) / (bx + ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CSS selector just for elements in submenu I have this menu with a slide down submenu: <ul class="sf-menu"> <li class="menu-item current-menu-item"> <a> whatever </a> <ul class="sub-menu"> <li class="menu-item current-menu-item"> <a> whatever </a> <li class="menu-item current-menu-item"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How should I complete this type of notification? I am basically creating a site for recruiters. One of the functionality in my application requires posting to Facebook periodically. The posting frequency can be from 0(Never) to 4(High) For Eg. If a recruiter has 4 open jobs and he has posting frequency set to 4, eac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: iPhone Filling UITableView with JSON results (using search entered in UISearchBar) Does anyone have a link to a tutorial for using a UISearchBar as the entry for a search, and a UITableView to display results returned in JSON? Thank you! Please no suggestions to RTFM - I can't find anything about using a UISearchBar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Proper use of Response.ContentType I have a site that allows users to upload a document such as pdf, word, excel etc. Now in my code, when I want to show the document in a browser, I am checking for the extension and setting the ContentType appropriately. However, this switch statement just doesn't sound like the be...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Collision Detection Between Rectangles - Resulting Angles Basically I have a bunch of rectangles floating around at 8 different angles (45 degrees, 90 degrees etc). I have collision detection going on between all of them, but one thing still doesn't work as it should. I don't know if I'm just not thinking or what, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Converting Java URL to valid File path in Linux Ok I'm developing in Linux using Eclipse a program that needs to read a text file. The idea is to have the JAR and text file on the same folder. So I'm getting the text file path like this: Client.class.getClassLoader().getResource("Client.class"); This correctly ret...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Facebook share URL code not working I realize Share has been deprecated by Facebook, but this is still posted on their documentation: https://www.facebook.com/sharer.php?u=[url to share]&t=[title of content] However, the title won't change no matter what I do -- including adding the "og:title" meta and changing the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to unit test administrator-only functionality? The design of my application is that standard user operations run first (and produce interested information even if the user cannot proceed) and then optionally offers to make some system changes accordingly, which requires elevation. If the user chooses to proceed...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: VB.NET Webbrowser to textbox I need help getting all of the text from WebBrowser1 to my textbox1.text I tried WebBrowser1.Navigate(TextBox3.Text) TextBox1.Text = WebBrowser1.DocumentText textbox3 being my website and textbox1 being were i want all the text. A: You have to handle the DocumentCompleted event...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jqgrid inline edit beforeSubmit afterSubmit I was wanting to get beforeSubmit working . colModel: [...], onSelectRow : function(id) { alert("Hi"); }, beforeSubmit:function(postdata, formid) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Yahoo BOSS API - V1 -> V2 I was using Yahoo BOSS API v1 and an URL I used got me backlinks for any site. Since the new update/upgrade to V2 the old URL is not working. Can anyone who has worked with V2 please help me out? I found theold documentation very simple and organized really well but am lost with the new doc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does setting up a CNAME in the DNS record allow for POST'ing to that server's pages? I'm building a Shopify website and I'm trying to create a simple "Contact Us" page that allows the user to POST their comments (e.g. name, email, comments). The Shopify website is hosted (as all Shopify accounts are) but I can set u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why isn't DownThemAll able to recognize my reddit URL regular expression? So I'm trying to download all my old reddit posts using a combination of AutoPagerize and DownThemAll. Here are two sample URLs I want to distinguish between: * *http://www.reddit.com/r/China/comments/kqjr1/what_is_the_name_of_this_weird_ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is time(NULL) in C? I learning about some basic C functions and have encountered time(NULL) in some manuals. What exactly does this mean? A: You can pass in a pointer to a time_t object that time will fill up with the current time (and the return value is the same one that you pointed to). If you pass in NULL,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: can't add a .accde MS access file(located outside the project folder) as AccessDataSource I'm pretty sure that the .accde file does exist. I noticed that VS asks for .mdb file, but a .accde is also a MS Access generated database file. Here is the screenshot(hope it helps): A: From the MSDN AccessDataSource page. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Erlang exception Error - no function clause matching lists:map - what am I missing? I am working on Euler 8. After a bit of reading i decided that use of the map function would solve a problem for me. Throwing a simple test program together to make sure I understood the concepts came up short. From within the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: facebook api error code: 191 Asp.Net MVC 3 using Dev Environment localhost and ACS I have been trying for the last couple of days to get the ACS integration for my identity providers. The main ones work, Google, Yahoo!, and Live, but I cannot get Facebook to work with my localhost dev environment. Also Facebook ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: HTTPHandler write Binary Data to Response , load image iv'e got a repeater bonded to a list of entities BL_Engine engine = (BL_Engine)Application["engine"]; List<AppProduct> products = engine.Get_Products(); Repeater1.DataSource = products; Repeater1.DataBind(); iv'e also got a user control i use...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Load balance/distribution for postgresql I am coming here after spending considerable time trying to understand how to implement load balancing (distributing database processing load) between postgresql database servers. I have a postgresql system which attracts about 100s of transactions per second and this is lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to handle user input containing quotes (etc)? I have a standard text input field. It get it's value from $_POST and I use it to build an SQL query (ODBC, not just MySQL, if that makes a difference (or instance, I can't use mysql_escape_string() ) ) . The query which I am building has single quotes on the PHP and...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I modify shapes on each item in a DataRepeater? I have a DataRepeater with some shapes on the ItemTemplate that I want to toggle on and off based on data in each Item. With every other control, I have done similar things using e.DataRepeaterItem.Controls["whatever"] in the DrawItem event, however this doesn'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Background job with a thread/process? Technology used: EJB 3.1, Java EE 6, GlassFish 3.1. I need to implement a background job that is execute every 2 minutes to check the status of a list of servers. I already implemented a timer and my function updateStatus get called every two minutes. The problem is I want to us...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SDL delete an image and replace it with the new one I've started SDL just a few days ago and I'm having a problem I tried to erase an image from the screen and replace it with the new one here is my logic : * *load image *apply surface, then delay for 1s *free old image surface (SDL_FreeSurface()) *load new im...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why method overloading does not work inside another method? In the class or object body, this works: def a(s:String) {} def a(s:Int) {} But if it is placed inside another method, it does not compile: def something() { def a(s:String) {} def a(s:Int) {} } Why is it so? A: Note that you can achieve the same res...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: jqgrid - upload a file in add/edit dialog I'm new to jqgrid and I have learn many things through your answer. Now I have a problem: I want to upload files when adding or modifying records to a jqgrid? This is my code: { name: 'File', index: 'file', hidden: true, enctype: "multipart/form-data", e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: any open source CAdES signature implementation I want to create an app for digital signature, and the standard seems to be CAdES, could anyone point me to an open source (so it can be customized) implementation with practical examples to follow? A: BouncyCastle 1.46b17 has an implementation of CAdES which was provi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Need to create separate log file for jar file? I am creating a jar file that i need to provide to client, but my client is asking for separate logger for the jar file as this is doing some integration work. anyone can suggest how can i create logger for only one jar file, can i put log4j.properties in same jar file....
{ "language": "en", "url": "https://stackoverflow.com/questions/7550308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mysql NOW() and PHP time()? I am salting users' passwords with a mysql column which has the type timestamp and default is CURRENT TIMESTAMP. Both of my timezones for mysql and php are identical. My problem is this, $q = $dbc -> prepare("INSERT INTO accounts (password) VALUES (?)"); $q -> execute(array(hash('sha512...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Knowing if a value can be called Note that this question is about pure Lua. I do not have access to any module or the C side. Additionally, I can not use the IO, the OS or the debug library. What I'm trying to make is a function that receives, as parameters: * *a number that is an ammount of second *a callable v...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I check if the text contains at least one A to Z letter? How can I write this in PHP? if ($text contains at least one letter from A to Z, regardless of numbers or other characters) echo 'Yes'; else echo 'No'; Please help. A: Here's something that will help preg_match("/[a-z]/i",$text); A: Like th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to extract tags with content that have certain substring using CSS selectors? I have the following HTML: <tr bgcolor="#DEDEDE"> <td> <b>OK:Have idea</b> </td> <td> <b>KO:Write code</b> </td> <td> <b>KO:Run code</b> </td> <td> <b>KO:Debug code</b> </...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Twilio, is it possible to have 5 minute delays between a call with Rest api? I have a sequential dialling app but I want to add 5 minute delays between each call.. I am thinking cron job. is this possible? If so what do I need to do to make this happen? I have no experience with cron.. A: I would just set up some s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: mdx parameter that contains two words causing an error I require help of the experts again! I have set up a drop down list to be a parameter of another dataset. When I choose an item that contains two words, it gives me an error saying the syntaxt for "the second word" is incorrect. So is there any way to wrap the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What type would you map BigDecimal in Java/Hibernate in MySQL? After going through the previous develop's trainwreck of code I realized I need to move all of the money based columns to not use floating point math. On the Java side this means using BigDecimal but when using Hibernate/JPA and MySQL 5 what would be th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Take screenshot Webbrowser in wp7 I have a code to take screenshot in wp7. int Width = (int)LayoutRoot.RenderSize.Width; int Height = (int)LayoutRoot.RenderSize.Height; // Write the map control to a WwriteableBitmap WriteableBitmap screenshot = new WriteableBitmap(LayoutRoot, new TranslateTransform()); using (Memo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: database query filling the var/temp I am not a programmer so please be gentle :) Following query on our website loads a lot of data to server's var/temp folder and creates server load and all sorts of troubles. {php} global $db; $res = $db->get_results("select * from ".table_links." , pligg_files where link_s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Removing text using regular expressions I want to remove "2011" and everything before it plus a single space (" ") after "2011". Not quite sure how to approach this, all I could think of is a simple regex-like find and replace. string temp; StringBuilder sb = new StringBuilder(); string[] file = File.ReadAllLines(@"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Upload Photos Facebook api EVERYONE I'm working with fql and php sdk and I created a Facebook page and I want to allow all users who likes my pages to upload photos (created dynamic from different photos like a collage), my problem is that as administrator of the page I can upload pictures but as a normal user does ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to escape in sqlite? I'm escaping two semi colons in the code below using a backslash. I'm executing this code in SQLite Database Brower 2.0 for Mac. It keeps freezing up. I'm guessing that is because of some syntax issue? INSERT INTO question (QuestionId, QuestionText, AreaId, AnswerText) VALUES(6019, 'Math F...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: how to get PC unique id? * *What is the PC unique ID? *How could we get the PC unqiue ID? *Is it about Hard disk or motherboard? I'd like to store PC ID in my window program. Please share me. A: This work for me Private Function CpuId() As String Dim computer As String = "." Dim wmi As Object = GetOb...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: CoffeeScript Wrapping Block Header Comment in Closure I have the following CS snippet: ### jQuery Observer Copyright 2011 All Rights Reserved ### $ = jQuery ... Which compiles to: (function() { /* jQuery Observer Copyright 2011 All Rights Reserved */ var $; $ = jQuery; ... }).call(this); However, I'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I make my launchpad downloads faster I am bzr branching some launchpad repositories and it takes very long (hours) As this is distributed version control, wouldn't it be possible to have a local copy of those repositories (that I could just manually update before I clone them), let's call it a cache machine,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can CSS alter an input element's SRC attribute? Is it possible, via CSS to remove or change the src reference in the markup below? The easy thing to do would be to change the markup, however, this code is in the wild and I need to deal with it as it is, so I'm trying to remove the image and use a background image in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: new window with same content and a small change I have a page in php which has several check boxes. whenever a user selects one of the check boxes, I want to change the check box with an undo button. can you please give me a clue how I should do that? A: If you're using jQuery you could have an undo link that looks...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In C++11, what is the point of a thread which "does not represent a thread of execution"? Looking over the new threading stuff in C++11 to see how easily it maps to pthreads, I notice the curious section in the thread constructor area: thread(); Effects: Constructs a thread object that does not represent a thread o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Time between jQuery add/remove class How can I set a timer, 10 sec in between this? addClass('loading').removeClass('loading') This is the full code $("#loadmore").click(function() { cap += 10; }).bind('click', loadfeed).addClass('loading').removeClass('loading'); Thank you. A: Use setTimeout. Also not sure w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: browser extension and a (big?) database I am thinking of building a browser extension that would need access to a database of around 30 thousand items, with no more than 3 attributes each. Having this embedded in a json object doesn't seem like the right thing to do, but databases is not something I know much about....
{ "language": "en", "url": "https://stackoverflow.com/questions/7550366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: HTML Component of jQuery.ajax() I am reading the documentation on the jQuery website about the $.ajax() method and I didn't see an example of the HTML. I'm wondering how you tie the $.ajax() function to a user's "Click" on the submit button. This is my best guess, is it the right way? Here is the example: <html> <he...
{ "language": "en", "url": "https://stackoverflow.com/questions/7550368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }