text
stringlengths
8
267k
meta
dict
Q: compare lists in Haskell I've been trying to compare two lists in Haskell and found an answer here. I wonder how all (flip elem listx) input works, especially for the role flip plays here. When I take out flip it won't work anymore. A: * *flip elem listx is equivalent to (flip elem) listx. *(flip elem) is the sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JSF provide very basic REST get method Is there a way to have a doGet method in a @ManagedBean and define a URL on which this bean will react. I am using JSF and want to provide a really basic feed, but for this I need to react on a get request. I wrote it with normal servlets first, but now I noticed that I need in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Entity Framework 4.1 Persisting a getter Lots of Like for EF4.1, but have got stuck on doing this! I want to end up with a class like this, where EF handles both properties, and they are both in the database. public class myClass { public int priority { get; set; } public string status { get { return priori...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: IplImage exists memory leak after cvReleaseImage IplImage* psrcImage = cvLoadImage("E:\\ImageDataBase\\image_905\\manualExtract\\3.jpg") ; cvReleaseImage( &psrcImage); For instance, before loading image, memory is 700k. After load and release, memory is 730k. What's the reason? We need to process millions of images...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Entity Framework code first relationships and navigation property? i have the following classes public class Subject{ public int SubjectId { get; set; } public String SubjectName { get; set; } public String SubjectCategory { get; set; } } public class QuestionDescriptor { public...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I optimize this code by using SENDER? I have a form that contains 16 TCheckBox and 32 TEditBox. Every 2 TEditBox en-ability is depending of the checkBox state. so I uses this code which is too long: //T1 procedure TOFAddForm.T1Click(Sender: TObject); begin Q1.Enabled:=T1.Checked; P1.Enabled:=T1.Ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Ubuntu 11.04: Installing GCC 4.4.6 I am trying to install GCC 4.4.6 on Ubuntu 11.04 64 bit and having some trouble. As the package does not ship with this distribution I try to build it from source. It needs GMP and MPFR which I installed from the package system. I am using distinct source, build and install directo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET Forms Authentication Cookie and Sessions for additional data Application Background Security: The applications are all hosted on a private extranet (and / or a local intranet - depending on the installation instance). So while security is important, it's not as important as if it were an application on the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C program under Linux: how to find out if another program is running My C program running under Linux wants to find out, by name, if another program is running. How to do it? A: There are two ways basically: * *Use popen("pgrep yourproc", "r"); and then fgets from it *Use opendir and readdir to parse /proc - th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Google Maps API change view when options menu button was pressed? Im trying to make the view change from traffic to satelite when a button in my options menu is pressed but its not working.. Here is my code: Here is my onCrete public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Simulink example ideas I am putting together a workshop on Simulink. I expect that most of the attendees will be sophomore undergrads or older. I expect that most of the attendees will be in a bachelor's program for electrical or mechanical engineering or computer science. I need to think of good example problems to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Google map GET error? I have installed Google map in my site and when my page load I get the error. GET xdc._uqt0ll&token=129509">http://maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate?1shttp%3A%2F%2Fwww.mysite_here.ext%2F&callback=xdc._uqt0ll&token=129509 403 (Forbidden) AuthenticationServi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to call method on previous page? is there any way to call method or set propery of the previous page in the stack? Say I started a thread in the A page, then navigated to page B, now my application is going to be deactivated and I want to take care of the thread started in the page A, I want to call a method of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to find all active sessions of gmail and facebook accounts? After some research I found out a way to check all the active sessions of gmail and face book manually. Is there are APIs to get details of these accounts an sign them out? A: I don't know of any APIs, but that doesn't mean you couldn't get the same f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Most useful Asp.net MVC 3 Library every programmer shoud have? I was was wondering that which are the most useful, easy to integrate, easy to code and powerful libraries available in the market (Free, Paid) that every MVC programmer should use to achieve the ultimate goal "Write Less, DO More" I am currently using A...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: AS3 line of sight without using hittest object. I'm working on a game project, and I am working on the AI aspect of the game. I want the enemy objects to start aiming and shooting at the player when they are in sight of the enemy, and i came across this article on a way to do that: http://www.emanueleferonato.com/20...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Multiple Python Processes slow I have a python script which goes off and makes a number of HTTP and urllib requests to various domains. We have a huge amount of domains to processes and need to do this as quickly as possible. As HTTP requests are slow (i.e. they could time out of there is no website on the domain) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to handle sessions php I can't find a fitting article for this subject. Indeed, there are a lot of those I found, but they are old. How should I store session? How can I secure them, as much as possible, etc. A: Those on php.net are updated. It's very easy to use sessions, you just (before any ouput) add this s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Retrieve auto increment last entered auto increments data. In my case the owner_ID of the previously entered record into the mySQL database. <?php require "formfunctions.inc.php"; require "connect.inc.php"; startPage("Add details"); connectAndSelect(); //Uses my include php script functions to logon to mySQL using...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: ASP DOt NET itemTemplate in GridView How to add Textbox in gridview and how to access to it and perform some calculations like Serno,Name,ServAmnt,Qty,Disc,netamt netamt=servamnt*qty*discount A: Take a look at the GridView Examples for ASP.NET 2.0: Working with TemplateFields MSDN tutorial as a strating point: Spe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Complex regex with custom formula builder I have a string which is like this - MVAL("A","01-01-1900")+MVAL(B,"01-01-1900")+MVAL("C")+MVAL(D). Now I want to extract B AND D out of this using regex because it is the first parameter and it has no quotes around it in both the overloaded version of the functions. Secondl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Delphi x64 embedded database Googled for a long time but cant seem to find an answer. Is there any x64 embedded database to use with Delphi ? Cant seem to find any A: Delphi XE 2 supports FireBird 2.5 using dbExpress, So try the Firebird x64 Embedded version. A: Check AnyDAC 5.0.3 with XE2 and 64-bit support. SQL...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Jquery find all images on a website link I'm trying to create an jquery "inside" bookmarklet to my website like facebook share. I need to get all images on a link. I mean if I give www.domain.com in my form, ajax request is needed to get all image links in that webpage and images should be shown in the form to sele...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to avoid extra indentation in Template Haskell declaration quotations? I have a toy program: $ cat a.hs main = putStrLn "Toy example" $ runghc a.hs Toy example Let's add some Template Haskell to it: $ cat b.hs {-# LANGUAGE TemplateHaskell #-} id [d| main = putStrLn "Toy example" |] $ runghc b.hs b.hs:3:0: pars...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why can't I see the invoking method in the debugger? a beginner question about xCode debugger. - (void)searchDidFinished:(NSDictionary *)info method is invoked and I'm trying to determine who is the invoker but as you can see the call stack doesn't help me: http://cl.ly/AaE4 Why ? I've also checked if the method is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: compile time error regarding template function instantiation I am trying to write a container class with iterator. This is my class: template <class T> class C{ private: T* v; int MAX_SIZE; int i; public: C (int size){ MAX_SIZE = size; v = new T (MAX_SIZE); i = 0; } ~C(){ delete v; } class ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to avoid overloading of application main form by multi tabs webbrowser? I'm using multiple TCppWebBrowsers on main form, and when I start the application all tabs from last internet session are recovered. But this makes the main form of application to overload much. My question is how can I avoid overloading of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: AudioTrack will only play audio once I'm working on an Android program that needs to playback audio files repeatedly with very exact timing (music program). I'm using an "AudioTrack" right now that has the PCM data loaded in from a WAV sample. here is the code im testing this feature out with. it just loops until it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Generate Pdf pages thumbnails Hiii I wanted to know about generating thumbnails in pdf in android. I want all the thumbnails of the pdf to be displayed when pdf is displayed. A: Andpdf is a port of pdf renderer so I think you can easily use this answer to get this done. A: It is possible to display PDF page in th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Python xlrd: suppress warning messages I am using xlrd to process Excel files. I am running a script on a folder that contains many files, and I am printing messages related to the files. However, for each file I run, I get the following xlrd-generated error message as well: WARNING *** OLE2 inconsistency: SSCS size...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: matplotlib: how do I easily fit the plot to the canvas May be that is a simple question - but I tried to solve it several times - and just can't make it work. My problem is that - my plot is larger than the canvas: Is there a way to make plot fit to the canvas - without changing the canvas size? Here's the code tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Trying to make WYSIWYG on my page Being unlucky with this: A WYSIWYG Where it's possible to limit the text/height What should I do, i would like to have WYSIWYG, but the WYG part, (what you get) is inside a fixed sized box. And the editors out there makes scrollers/expands in height when you write more than the hei...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Sending Email from SMTP server from a certain email, but make it appear as if coming from another email We have an application that prompts the user to login using his ldap username and password, from that I can get the user email but not the email password, My goal is to send email from this user's mail without the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Consume WSDL url with XML with escaped chars as argument I am executing a method of a SOAP web service which receives 3 string arguments with suds library. The first string argument should be an XML and the other 2 an username and password, this is my semi-working implementation. from suds.client import Client url =...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Creating a two column ordered list. Can I put a DIV between the OL and LI tags? Using the 960.gs framework, I'm trying to create a two columned ordered list where each list item contains a heading and paragraph and the numbering goes across, not down e.g. the top row contains 1,2 not 1,3. The only way I can get it t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Java live chat opensource Does anybody know any Java live chat opensource? I want to embed into the application. Please let me know. Thanks A: You could try using this one http://sourceforge.net/projects/llamachat I hope it's what you're looking for
{ "language": "en", "url": "https://stackoverflow.com/questions/7619336", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Which one is faster ? Function call or Conditional if Statement? Please consider the branch prediction too before answering this question. I have some scenarios where i can replace a conditional statement with a call to a function with the help of function pointer.Some thing like this. (you can think of component ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: creating megamenu from hierachical Data using stored procedure I have a following table.I was trying to create a mega menu using single stored procedure. CategoryId Category_name ParentId displayorder 1 Electronics 0 1 2 Vehicles 0 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: php pdo save query data : Call to a member function rowCount() on a non-object in C:\wamp\www\prjy\classes\user.php on line 34 Line 29-32 $this->sth = $this->dbh->prepare("SELECT id, userlevel FROM users WHERE username = ? AND password = ?"); $this->sth->bindParam(1, $username); $this->sth->bindParam(2, $password);...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Loading indicator for MVC3 unrobustive remote validation I am doing the MVC3 unrobustive remote validation for checking username availability. It works fine, but it takes quite some time load the validation message! Is there any way to show a spinner/user name available checking message during the transition? A: Yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C++ SDL keyboard response I have a problem with my game program. The program responds to my keyboard input but won't move far. It will only move 1 bit up. #include <SDL/SDL.h> #include "Mrn.h" int main (int argc,char** argv) { SDL_Init(SDL_INIT_EVERYTHING);//initialized everything. SDL_Surface* screen;//allows draw...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Which method in the Iterator interface can remove the previously returned element? I read the following in Data Structures and Algorithms by Goodrich : Java provides an iterator through its java.util.Iterator interface. We note that the java.util.Scanner class (Section 1.6) implements this interface. This inter...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can we use domain model at UI layer in MVVM pattern Can I use domain model at UI layer instead of view model in some of the views. If No. Why shouldn't I use? A: If you are exposing some model objects in a list to an ItemsSource, I think this completely fine. I generally take the approach to only wrap a model such...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Accessing JpegEncoder class from JavaScript in Adobe AIR application I need to encode a BitmapData object using the JPegEncoder in a Adobe AIR application using JavaScript I am trying to create a JpegEncoder object var encoder=new window.runtime.mx.graphics.codec.JPEGEncoder() and I get the error TypeError: Resul...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: UIImage Does Not Load Image I am using UIImage to plot a png. I have getting a weird behavior that I cannot understand. The following piece of code results in a nil im reference and thus prints "PROBLEM!" UIImage *im = [[UIImage alloc] initWithContentsOfFile:@"tree.png"]; if (nil==im) NSLog(@"PROBLEM! IMAGE NO...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619358", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Optimize two COUNT/DISTINCT queries I have a table with column1 and column2 (both of them contain TEXT). I want to get: 1) the count of unique rows of column1@table, case-insensitive 2) the count of unique rows of column1@table and column2@table, case-insensitive SELECT count(*) AS unique_row1 FROM (SELECT DISTINCT ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Retrieve a value from a table in a subview From a view, I push a tableView where the back button is hidden. When one row is selected, the "back button" appear. I would like to pass to the value of the selected row as the user tap on the back button as content of a textField. This is the code of the tableView (Catego...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to pass an int value from one activity to other can anyone help what is the problem in my code Activiy 1: int view=1; TabFunctionality.setFirstTabFunctionality(TabFunctionality.FIRST_TAB, 1); Intent intent = new Intent(AdultTeeth.this, MainScreen.class); Bundle b = new Bundle(); b.putInt("TEXT", view); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Where is the access violation is my code? I'm getting an Access Violation when attempting to run this code which finds prime numbers in a bound. int main () { cout << "Program initialized successfully. Please wait for the next message to appear." << endl << endl ; int Primes[51] ; int runner = 0 ; i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Emacs fix the indentation of the java-mode Suppose that code : Command provisionHostCommand = new Command() { @Override public void execute() { final List<Host> hosts = new ArrayList<Host>(display.getSelectionModel().getSelectedSet()); eventBus.fireEvent(new ProvisioningHostEvent(hosts)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to set a different language to the ListContents in my ListView I have two simple ListViews: public class SimpleListView extends Activity { private ListView lv1 = null; private ListView lv2 = null; private String s1[] = {"a", "b", "c", "d", "f", "g","h","i"}; private String s2[] = {"j", "k", "l", "m", "n", "o","p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Jquery - Url checker (rss, audio or video podcast) i try to built an url checker using the google feed api. My problems: 1: the if(result) check doesn't work. Maybe an async problem? 2: any ideas for the rss,audio/video podcast check? I'm sure, i get in the response an url to the audio/video file (but i'm blind at ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Recipients bar in an iPhone App I would to insert a recipients bar in an iPhone application, a bar that list address book items when I type chars on it, the same that is used in the iPhone SMS native application. How can I do? A: This is achieved using a UISearchDisplayController. You can see how to do this in Appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: get categories from a limited query i have the following query: select company_title,address,zipcode.zipcode,city,region,category from test.companies left join test.address on companies.address_id = address.address_id left join test.zipcode on companies.zipcode_id = zipcode.zipcode left join test.categories on compa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Assign variable in smarty? I have assigned two array to smarty : profiles and selected_id . profiles array contains the array of all profiles and the selected_id array contains ids of the profiles to be displayed .So I am displaying the all profiles like this : <select id="countries" class="multiselect" multiple="mu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I grab information which users have set to private by using Graph API? If the user has set the information (e.g. movies, books, TV) to private instead of public, can I still grab such data by using the Graph API? A: If you request the appropriate extended permission like user_activities, etc then the API will r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to debug HTTP traffic of a Windows 8 Metro style apps using Fiddler? I'm using 'HttpClient' in a Windows Metro style app and want to see the traffic using Fiddler. However, when Fiddler is active I get an exception that the app can't connect to the server. What's the problem? A: The answer is in this article: "...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Lagging of the run() method are to strong private static int millis_per_tick = 1; public void run() { // While not stop do while(true) { Thread t = Thread.currentThread(); long startTime, timeTaken; startTime = System.currentTimeMillis(); a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: bucket sort analysis A simple example is bucket sort. For bucket sort to work, extra information must be available. The input a1, a2, . . . , an must consist of only positive integers smaller than m. (Obviously extensions to this are possible.) If this is the case, then the algorithm is simple: Keep an arra...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to determine which SQLException has been returned / where's the error codes list? I'm using com.mysql.jdbc.Driver (If it means anything). I want to be able to catch and properly process the exceptions I receive from MySQL. I want to know if the transaction failed, if there's already a primary key with the value ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Bash: read a file line-by-line and process each segment as parameters to other prog I have some dirty work to do, so a Bash script seems to be a good choice. I'm new to Bash, and the experience makes me kind of frustrated. The file mapfiles.txt consists of lines as follow. Each line has four segments separated by a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Add shortcut to website in right-click menu for chrome extension? I would like to add a website shortcut in the right click menu when clicking on the icon for the google chrome extension. A: You can't access that context menu, only the one you get by right clicking on the page.
{ "language": "en", "url": "https://stackoverflow.com/questions/7619450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Select bin/tray when printing with javax.print I'd like to specify the input bins when printing with Java. I've found the MediaTray class which should correspond to the input bins: The following standard values are defined for input-trays (from ISO DPA and the Printer MIB): 'top': The top input tray in the printer....
{ "language": "en", "url": "https://stackoverflow.com/questions/7619451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Spring Security Plugin in Modular Applications I'm starting a new, modular Grails application. I'm creating a domain plugin and of course need a User/Person domain. Do I add the Spring Security Core plugin to domain, just to generate the its user domain? If so, do I also add the plugin to the main app. Or since the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to prevent (programmatically) a java application from starting if it's not in a pre-defined directory? how to prevent (programmatically) a java application from starting if it's not in a predefined directory? Example: I have application.jar and I want to make it runnable only if it's located in "C:\r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How to send message to a viewcontroller in another tab I use a UiTabBarController for my iPad app. One of the tabs is a UITableView with favorites. When I klick a cell I want the favorite to open in a viewController in another tab. I solved it the ugly way by assigning a variable in a singleton and then select the o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I check if the admin panel in django is enabled? I'm writing an app which has an effect on the admin panel if it is enabled. How can I check if it is enabled or not within a certain project? A: from django.conf import settings if "django.contrib.admin" in settings.INSTALLED_APPS: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: saving password in device memory in android I am creating an application which connects to the server using username/password and I would like to enable the option "Save password" so the user wouldn't have to type the password each time the application starts. Can any one please tell me how to do this?? thanks. A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: DLL not working Recently, I decided to get into DLL programming with C++. I made a simple DLL but when I inject it into a process, nothing happens. Here's the code: #include <windows.h> BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { if(fdwReason == DLL_PROCESS_ATTACH){ MessageBoxA(0,"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Generate JSON from java for jsTree I am creating a jstree with JSON data in struts 2. I want to generate JSON data into action and pass to the JSP means for creating the tree. But I cant understand how to pass JSON from Action class to JSP and create jstree. Please anybody provide me sample code for developing jstre...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Database periodic cleansing I'm creating a public messaging service and I was wondering, in order to perform a cleanse of the oldest messages, is it okay to delete the oldest message every time a new one is submitted? Or is this approach inefficient for some reason? If so, could you specify why? I considered create ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Type Casting In Groovy I have two questions. I did the following code to find the ASCII value of $ : def a = "\$" def b = (int)a println b //prints 36 Well I'm happy with the answer. But when I tried to do it in reverse like this, I found I'm missing something : def a = 36 String b = a println b // getting out...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: preg_replace() not finding ending delimiter? I use preg_replace() alot but I'm not a genius at it. If I start up a function and deliberately key in all the smilies that I want to use e.g. <?php function parse_emotes($body){ $body = preg_replace("#\:p#i", "<img src='images/emotes/tongue.png' alt=':p' title=':p' /...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is it possible to add jspf files to a jsp page without using jsp:include? What I want to achieve is something similar to a master page in asp.net. I'm following a tutorial, but I may have missed something cause I have added my header.jspf and footer.jspf to the WEB-INF/jspf folder and index.jsp is outside of WEB-INF...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Core Data - Get objectIDs of to-many relationship without firing a fault I have an entity with a to-many relationship. After I fetch a subset of objects from my entity, I would like to get the ManagedObjectIDs of the relationship objects - without firing a fault. Is this possible? My understanding from the documenta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Multiplying real matrix with a complex vector using BLAS How can I use Blas to multiply a real matrix with a complex vector ? When I use functions like ccsrgemv() I get type mismatch errors? error: argument of type "float *" is incompatible with parameter of type "std::complex<float> *" A: Use two matrix-vector mu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to remove all entries in a list that are above some given value? Newbie question: Suppose that in R I have a list with 10'000 entries (numbers). myList <- read.table ("my10000Vaulues") Now I would like to remove all entries that are above some value (say 523.689). The resulting list should not have any white ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: getting distinct column name and count when based on another table i have the following query: select cc.category from companies c left join categories cc on c.category_id = cc.category_id where company_title like '%gge%'; which return categories with duplicate rows. what i need is to get distinct categories, with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I resolve "an enclosing instance that contains X.Y is required"? I am developing a small desktop application in Netbeans. This is my first program and I am facing a very strange type of error. I know I did some thing wrong but unable to trace what I am doing wrong :( Please help me in resolving this error. D...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Precision issue with the Silverlight Slider and it's thumb I have a precision problem with the slider control in Silverlight: I've built some custeom template to slightly modify the visual appreance of the standard Silverlight slider control. My goal is to have a slider that represents it's values as drawn ticks on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: batch rename the files in a folder I have some files (about 10000 files) in bellow format SDEF-2001-23965-236.pdf SlkF-1991-65-123.pdf I want to check if the file name is in wanted format rename it by removing 4 characters from end SDEF-2001-23965-236.pdf >>SDEF-2001-23965.pdf SlkF-1991-65-123.pdf >>SlkF-1991-6...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make model "hasMany" and "belongsTo"? (Same like cakePHP) I am currently working on my mvc framework (in PHP). I saw that cakePHP has ability to use "belongsTo" and "hasMany" features. I am trying to create my own feature and I hit a problem. Lets say that we have appointment table (id, where, date, year_id) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How is physical inch related to pixels in css given so many different resolutions? Following code sets the height of two div elements - one in inch and one in pixel. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.or...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Options for a file system based Sql database for a multiuser web application that can perform and scale What are my options for a file based sql database (not NoSql) which scales well, performs well, and is designed for handling many hundreds of multiple users (and plays nice with .net)? My requirements I'm accusto...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Determine which region of the window is clicked This is really sort of a general programming question. I have a window split into 9 even squares. When the user clicks one of those squares, I'd like to know which one. I can get the location of the click via x and y variables. My current approach is xRegion = screen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get Wikipedia's Random page actual url Possible Duplicate: How to get the URL of a redirect with Python How can I get actual url of this http://en.wikipedia.org/wiki/Special:Random after it redirects on random page(in Python).
{ "language": "en", "url": "https://stackoverflow.com/questions/7619529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Silverlight DataGrid to work like Excel In using the Silverlight DataGrid and I wanted it to work like Excel, I assume the best way if I was not using a DomainDataSource was to and was just binding the itemsource to an observablecollection, what would be the best way to add a new row...Should I just temporarily add...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: set + nth element : fast implementation For the following data structure: * *add an element in O(lg(n)) *remove an element in O(lg(n)) *find the k'th element in O(lg(n)) we can use a balanced BST which each node has size of it's subtree, but it needs to implement red-black tree which is not fast to code. any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Flexible progress bar I have a long pending question about the progress bar in Ajax which I need to clarify. The question is that when we do any action in Facebook and the site is waiting for a response from the server the progress bar appears on different parts of the page.. Facebook couldn't have installed 100's...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Order by one column if the other is empty for each field I have two tables: a Topics tables and a joined Comments tables, both with timestamp columns. I would like to order the topics list so that topics with the most recent comment are at the top. However, if a topic has no comments, I want it to be sorted by the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Not able to retrive and update data in same struts action class I am new to struts and currently working on a project. In one page I want to populate some data from database and there is a submit button is available in my from which will submit the data. My struts action class is: public class BookreturnAction exte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Katta vs Lucene + Infinispan Lucene can work with disturbed infinispan cache. I'm wondering what is the moment to move from lucene + infinispan to Katta based on hadoop? When I'll be more effective to use Katta and when Lucene+infinispan? I've read that hadoop is not suitable for real-time systems, but what with Kat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: XMPP Logout (Smack API) without disconnecting with the server I am using smack API to connect to Openfire server. Am able to create user, login and exchange message. After logout I want my activity to be finished( user has to come to home screen) without disconnecting with the server. Any one have used Smack API for...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django custom order_by I've got a model eg. Car with a foreign key eg. Owner, which may or may not be blank. The Car has a creation_date. I would like to order these cars by date, but if the car has an owner, the date of birth of the owner must be taken instead of the creation_date of the car. Is this possible? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: error: 'IOCTL_STORAGE_QUERY_PROPERTY' was not declared in this scop I've included winioctl.h and there is no #define for IOCTL_STORAGE_QUERY_PROPERTY in that file !! http://www.osronline.com/ddkx/storage/k307_8z3m.htm Says Its in ntddstor.h But I cannot find any ntddstor.h on my Windows XP. HoweverIOCTL_STORAGE_QU...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Intercept an ABase class while a Child class implementing the base class namely A and an independent interface namely IC is used in binding Intercept an ABase class while a Child class implementing the base class namely A and an independent interface namely IC is used in binding. Bind<IC>().To<A>(); Problem rises w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: linux system(3) call fails - how to know the errno-like error code? When I call the system(char* Command) with some command and it fails, I should like to know the error code (and not to parse text output). For example, I run system("rm file") and 'file' does not exist - how can I receive ENOENT into my application?...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Testing string for no content I want to send a message to a ruby string object that tests for no_content: "".content? => false # same as .empty? " ".content? => false # same as .blank? "\n\t".content? => false # new feature Specifically, content? would pass true if there is anything a person could read there. I a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: cakephp 1.3: find conditions Array ( [0] => Array ( [DebateComment] => Array ( [id] => 126 [user_id] => 17 [debate_id] => 32 [debate_comment_title] => hiiiiiii [debate_comments] => gfdfg dfg . ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How to implement translation on a existing web project? I've rescued an old project that was originally writted only for spanish audience and now I have to internationalize it. This project has 3 kinds of text strings: * *Strings written from PHP: For example: echo "Hello world" *Short strings in database fields...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }