text
stringlengths
8
267k
meta
dict
Q: Django messages framework not working in template loop I recently upgraded to Django 1.3 and I want to start using the Messages system. I have added my Middleware, Template context processors and also messages into the INSTALLED_APPS MIDDLEWARE_CLASSES = ( 'django.middleware.cache.UpdateCacheMiddleware', 'dj...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: OSM: convert ties from projected coordinates in spherical mercator "EPSG:900913" to "EPSG:4326" coordinates I'm using a map with a layer (from the example): var lonLat = new OpenLayers.LonLat(40.4088576, -86.8576718) .transform( new OpenLayers.Projection("EPSG:4326"), // transform...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using php as a desktop application Possible Duplicate: PHP as a Desktop Programming Language I have developed a sales application with php (codeigniter framework). i am using xampp to run this application in local PC's browser. now i want 2 things: * *is there any way to run this application as a desktop appli...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: setText not working for EditTextPreference I'm trying to set value for EditTextPreference item with hostPreference.setText("Not yet set"); But text is not showing I want to show it like Use Name here public class HostSettingActivity extends PreferenceActivity { private final String MY_DEBUG_TAG = "SettingAc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Compare two SQL Server Profiler traces I want to compare two SQL Server profiler traces, any tool does this? Thanks, Ramkumar A: In the profiler you can export the trace files by using File | Export | Extract SQL Server Events | Extract Transact-SQL Events. When you do this for both traces, you can compare them for...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Changing UIView when applicationWillEnterForeground fires I am looking for a way to grab the current view being shown to the user when they send the application to the background. The situation is that I have provided options in my settings bundle for look and feel that I would like to take effect when the applicati...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: unexpected non-whitespace character after JSON data? I want in output this PHP code echo name, star_type, service by jquery.each(), but i have error. how is fix it? error: An error has occured: [object Object] parsererror SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data I have this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to style parents of a certain element type in SASS? I want to do this: .classname { color: red a& { color: blue; } } and for it to compile to: .classname { color: red; } a.classname { color: blue; } Is there syntax available to support this? I have tried using a&, #{a&} and the com...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: jQuery dropdown navigation I am using simple jQuery code to make drop down navigation, but its not giving expected results... jquery code $(function() { $('.nav li').hover(function () { $('ul', this).slideDown(100); }, function () { $('ul', this).slideUp(100); }); });...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to bind to an owning window's control-property (from a dialog window)? My friends, i Have a problem in WPF which i just cannot solve. I have two Windows, Mainwindow and Window1. I'd like to bind a ListView in my child-window to a controls property in the parent-window. In detail: Mainwindow has a control declare...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP - Cast int key to string? I have a few large PHP functions written some time ago. They contain some associative arrays. Until now, I had no problem with these arrays because they contained keys of type string and int (like "brown" and 118). The problem is, when the keys are all int, they are not kept, instead th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Programmatically insert a method call on each property of a class My question is based on this article. Basically a class can implement a Freezable method to make sure that no properties can be changed once the object enters the Frozen state. I have an interface that follow this design public interface IFreezableMod...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Defining an output file stream within a class How can I define an output file stream within a class, so that I don't have to keep passing it around to functions. Basically what I want to do is this: class A { private: ofstream otp ; }; Then in my constructor, I simply have otp.open("myfile"); and in other func...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In Firefox insertRow() is not working in javascript I am working in a JSP file. In that I need to create one table with multiple rows onclick event. When I am trying the following code in IE7 and IE8, it is working fine. But when I am trying the same in Firefox[ (in any version) it is not creating the table. This i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java - Socket not reading until client disconnects? So I made a Server and Client with sockets in Java. I'm trying to get the server to read/write from the socket, but it only reads once the client disconnects: System.out.println("Server initialized"); clientSocket = server.accept(); System.o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Authenticating across domains : How to? Before you write off this question as a dupe, I would like to add that there are a few questions with the same subject/title on SO, but this one is a little different, coz most/all of them involve SSL and my question doesn't. www.mysite.com is my website and it was built usin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MYSQL Subctract Days and Seconds Greeting all I update my field 'createdOn' datetime field to hold values of last 7 days in random like this: UPDATE posts SET createdOn = DATE_SUB(DATE(NOW()), INTERVAL ROUND(RAND()*7) DAY) Although this gives me the random dates I need, the hours, minutes and seconds are no...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I fill an S-record with two byte values starting on even address boundaries? When I compile my code I eventually get Motorola S records (a.mot) with gaps (the whole address range is not covered by code and data). I want to fill those gaps with the pattern 0x01 0x80. However, it is important that all of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to parse RSS with GB2312 encoding in Python I have a RSS feed shich is encoded in GB2312 When I am trying to parse it using following code: for item in XML.ElementFromURL(feed).xpath('//item'): title = item.find('title').text It is not able to parse the Feed. Any Idea how to parse GB2312 encoded RSS feed T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create a table using insert so columns are nullable? Using SQL Server 2008. Here is a simplified example of my problem: WITH cte ( a ) AS ( SELECT 1 UNION ALL SELECT NULL ) SELECT * INTO a_tmp FROM cte SELECT * FROM a_tmp This creates the table cal...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Launch Settings->Sounds Launch Settings->Sounds I need to launch the view of Sounds Settings in iPhone device.. Just like we get the Mail composer and Contact View using API's , can we get the Sounds Settings view? Thanks in advance of any suggestion and help. A: Apple like to use a standard methods for certain ope...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best Utility Class Implementation I have read several questions regarding when to use a utility class or any class that doesn't have a state associated with it. My question is what is the best implementation once you have decided to use a utility class? A static class, a normal class with private constructor and on...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android/Java: Import text file and read out random lines from within the text file I got this code I've been working on so far, it is going to be a game im trying to create which just switches between two players. Every time it switches it is supposed to write out a question, like truth or dare. It is not allowed to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MYSQL: Query to update an incremental value and store the returning value I have a query to substract a value stored on the DB. UPDATE tablename SET available = IF( available > 0, available - " . $var . ", 0 ) , purchases = purchases + 1 WHERE condition Is posible to get the new value of field available witho...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting the class name from within the initialize method when class inherited from Hash I have a class that inherits from Hash. When this class itself gets inherited from, I want to know the class name of the inheriting class from within the initialize method. When I call self I get {}, which doesn't know of the nam...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Rete Tree view not being displayed using drools plugin for Eclipse I have been trying to display the Rete Tree view for drools files using the drools plugin for eclipse. But it is failing for me with the following error : I am using Eclipse Indigos, Drools 5.3 and JDK 1.7 . I googled around a bit to solve this issue...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CUDA warp vote functions make the code slower? I have written a CUDA function that calculates a convex envelop in a set of points in 2D. But it is extremely slower than the CPU code! I am using warp vote functions and __syncronisation(); quite number of times. So does that make the code slower ? Thanks Adding the co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Figure out which row in an HTML table was clicked Possible Duplicate: How to detect which row [ tr ] is clicked? I have a table like this: <table> <tr> <td>1</td><td>1</td><td>1</td> </tr> <tr> <td>2</td><td>2</td><td>2</td> </tr> <tr> <td>3</td><td>3</td><td>3</td> </tr> </tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: xlabel and ylabel for facet I'm doing like this: ggplot(IDPlotLn, aes(x=CO3, y=CRf)) + xlab(xlabel) + ylab(ylabel) + opts( axis.text.x = theme_text(size=10, face="plain", colour="black",vjust=1), axis.text.y = theme_text(size=10, face="plain", colour="black", hjust=1)) + scale_y_continuous(li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Copy file from shared directory with given user name and password Is there a way to create/copy a file to/from specific network shared directory with different than current user name and password ? A: Either what @Luke suggested in a comment, or you can PInvoke to NetUseAdd function. You can pass user name and pass...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the difference between Lazy.Force() and Lazy.Value On the MSDN documentation for Lazy.Force<T> extension method says: Forces the execution of this value and returns its result. Same as Value. Mutual exclusion is used to prevent other threads from also computing the value. Does it mean that it's equivale...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Open Atrium - Default Front Page In OA I'm trying to set the default page to a group i.e. I've selected then put in a group name for example 'intranet' but this says that the page does not exist... Does anybody know how I can default the front page to a specific group when users log in? A: You need your group's ni...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to pass header information to the soap header SOAP_ENV__Header, in c++ using gsoap I am working on calling the webservices using the gsoap packages in c++ and get the responses. I have to pass some header information as well, which I am not sure how to do that, as my header is like this - /* SOAP Header: */ str...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Scrollbars - transparent and invisible until movement for scrollable divs I utterly hate the inconsistency of scrollbars across browsers. After recently seeing OSX lion in action with its transparent until movement scrollbars I wonder if we can recreate this cross browser. I looked at a few JQuery plugins. The close...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: trouble reading a 2D array of characters in C? This is the code: #include <stdio.h> #include <stdlib.h> void acceptMaze(char maze[ROW][COLOUMN], int nrows, int ncols) { int i,j; for (i = 0; i < nrows; i++) { fprintf(stdout,"I = %d",i); for (j = 0; j < ncols; j++) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JAVA the smartest embedded persistance solution I'm developing GWT application, so I have JAVA server with next to nothing configuration. And I'm in need of persisting my DomainObjects. It's a tree with root Class containing String id, List<ClassB>, ClassC, List<ClassD> CLassB,C,D contains only String and primitives...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rewrite rule not trying to redirect I have this 301 redirect rule for Apache: RewriteEngine On RewriteRule ^park.php?park_id=3 http://hiking.comehike.com/outdoors/parks/park.php?park_id=3 [R=301,L] I am trying to get this url: http://www.comehike.com/outdoors/parks/park.php?park_id=3 to redirect to this url:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Reverse a string in Java I have "Hello World" kept in a String variable named hi. I need to print it, but reversed. How can I do this? I understand there is some kind of a function already built-in into Java that does that. Related: Reverse each individual word of “Hello World” string with Java A: public static Str...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "574" }
Q: Weather predictions Peter decides what to do at weekends according to the weather predictions. This is the available information: Saturday will be sunny, Sunday will be uncertain. whenever it is sunny, Peter goes to the beach. Whenever it's rainy he stays at home. When the weather is uncertain it depends on the day:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does the Document TYPE ( or even the way HTML tag is written) affects the javascript engine in IE9? Does the Document TYPE ( or even the way HTML tag is written) affects the javascript engine in IE9? I am not talking about the rendition but the behavior other than it. A: Yes. The <!doctype> is used as rendering mod...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can my app be rejected by Apple if I changed an UISeachBar background? Will my app be rejected by Apple if I changed an UISearchBar background to be transparent? A: If you use 'private' APIs, or modify controls when Apple documentation says not to, then Apple may indeed reject your App. Possibly during initial revi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to call another property file? I'm having two property file called sample.properties and sample1.properties in src folder at same level. It is having some information like, A1 = please call {sample1:name} Here, sample1 -> property file name name -> key defined in sample1 like [name = abc] I want to call sample1...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: asp.net website stops responding when doing heavy query I have an asp.net website that is nearing release. The site deals with business management. One of the things I am doing to prepare for release is upload a whole bunch of data from purchased lists of businesses into our SQL database. To do this, I'm using a ver...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569358", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should I store values in the database or in an XML or text file? I have a few simple questions about data storage on a website I am developing. The site in question will allow users a personal profile space which they have the ability to customise with text, images, BB code and alike. These profiles will have a char...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: 'for' loop vs vectorization in MATLAB I was programming something in MATLAB and, as recommended, I am always trying to use vectorization. But in the end the program was quite slow. So I found out that in one place the code is significantly faster when using loops (example below). I would like to know if I misinterpr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to create combo box in iphone? Hi anybody can tell me how to create combo box in iphone (like same as Spinner in Android). Here i developing a simple application, i need to load some value to combo box. But not using UIPicker. Can anybody help me pls. A: you can set your pickerview frame like follow [pickerView...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Open Graph beta: How can you tag friends in a action? I've managed to publish an activity using the Graph API. How can you tag friends in a action? I can see you can add tags in the action dashboard, but other than that it's not specified how to tag friends. A: There's a simplified example at https://developers.fac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Mysql Select Statement with respect to another table field I have two tables. One is newBus, and Second is newPassengers. The table newBus contain the columns startcity and endCity. Now let say newBus.startCity contains: newBus.id----newBus.startCity-----newBus.endCity 4 ACity to xCity ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to split array of strings based on string's length? I hope it can be done with "NSPredicate". I have array of strings in thousands and i want to split into array using string length. i.e. Strings with length 2 will come into an array. Strings with length 3 will come in an array so on. Is it possible using "NSPr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Simple RMI Application I have created a simple RMI application, that just send a message to RMI server.But when sending a message i got the error message.I am using eclipse for running the programs. sending hello to 10.0.0.12:3233 java.rmi.UnmarshalException: error unmarshalling return; nested exception is: jav...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best way to build a GWT Application What is the best way I can use to build a GWT app to a .war file? I already have one ant file to build my project, but, it is very ugly and slow. I think one of you have a better option... thanks A: Use maven. It's proven and commonly used to build java and GWT projects. http://m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android live video streaming issue I have a question about video streaming from Android devices and maybe someone who will give me some useful advice/suggestions about my question.So here is the deal : I have a project for video streaming from Android device.The idea is that to connect to devices to a server and the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Calculating standard deviation of samples with boostrapping in R Imagine: I have sampled 10,000 humans and measured their height in cm, and drawn the distribution as follows: # Generate sample data sampleSize = 10000 sampleData = round(rnorm(n=sampleSize, mean=175, sd=14)) # Draw histogram of sample h = hist(sample...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Save Dynamically generated PDF from Web browser control I have a web browser control in my windows form. I am trying to automate some process in a website. During this process, the invoice pdf has been generated dynamically and shown in the web browser control. I need to save that pdf locally. Please note: there is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: get a recursive parent list Using MySQL, I want to return a list of parents, from a table that has a field structure like this. ID,PARENTID,NAME (a standard parent-child hierarchy). I would like to traverse "up" the tree to return a list of ALL 'parents'. I realize that "nested set", might be a better way to handle...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: how to fix interval on UISlider,iphone I have Slider,which works perfect. But what i am trying to do is, for ex, min =0 and max=50 and x=0 every time i slide or use buttons to change the value of slider, the interval should be of 5 only. i.e x should be equal to only 0,5,10,15.....50 Suggestions. Thanks A: In the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ruby mysql gem works but I see an exception when I execute the script with debug option using -d $DEBUG I have got some CGI scripts. I use mysql connection and queries in these scripts. After seeing some anomalies in the scripts I wanted to execute them using ruby debug options. Here, below, a small test script that...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to speed up my ArrayList searching? I currently have an ArrayList holding objects of a class I have created, I then parse through the ArrayList in a for loop searching and comparing some data from the ArrayList and some global variables that are loaded else where, however this ArrayList is constantly growing and...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Passing a class property as a parameter I'd like to pass a class property (or a getter/setter if need be) reference to a function. For example I have an array of a class with lots of boolean flags. class Flags { public bool a; public bool b; public bool c; public string name; public Flags(bool a, bool b, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Dynamically add items to TabBar in Sencha Touch New to senchatouch world, trying to make the following code work. I have the following code : myApp.views.Homecard = Ext.extend(Ext.TabPanel, { id: 'myownid', title : "home", iconCls : "home", defaults : { styleHtmlContent : true }, ite...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Easy way to create menus in GTK#? Is there an easy way to make menus in Gtk# ? In Gtk+ and PyGtk there is the ItemFactory which creates menus easily but it is bugged and deprecated in Gtk#, so is there any other easier way? Except for using a GUI Designer... A: Check out Gtk.UIManager.
{ "language": "en", "url": "https://stackoverflow.com/questions/7569417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: robots.txt and serving images from a separate domain I'm trying to find out if a robots.txt file set on domain A will still apply to an image served from domain B, but actually displayed on domain A. Example: Somewhere on the page on www.example.com, there is an: <img src="http://img.example.com/images/myimage.jpg" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python script that notifies me when a update is made to a website. I need to make a script that will notify me when a change is made to a website. I am not sure about the best way to go about this and I don't know what python has that will be useful. Any push in the right direction would be helpful. A: You may use...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Drupal7: Trying to theme a specific page using a preprocess function, but...I get a blank screen instead I've just discovered that if you want to alter a specific page (or group of pages) all you need is to add templates file to the core templates. For instance, I need to theme my /helloword page using a page--hello...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CSS: Constrain a table with long cell contents to page width? Take the following CSS+HTML: <style> div.stuff { overflow: hidden; width: 100%; white-space: nowrap; } table { width: 100%; } td { border: 1px dotted black; } </style> <table> <tr><td> <div class='stuff...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Rooting android emulator - Error? I have to root android emulator. I've found some articles, but I've got the same error every time! It's 'cannot create su: not enough memory'! What I did: 1. adb push su /data/local 2. adb shell 3. #su 4. #mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system 5. # cd /system/x...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to test abstract class in Java with JUnit? I am new to Java testing with JUnit. I have to work with Java and I would like to use unit tests. My problem is: I have an abstract class with some abstract methods. But there are some methods which are not abstract. How can I test this class with JUnit? Example code (v...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "93" }
Q: Inactive session in Oracle by JDBC We have a web service written in Java and is connecting to Oracle database for data extraction. Recently, we encountered too many inactive session in Oracle database from JDBC which is our web service. We are very sure that all the connection is being closed and set to null after e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Insert a single pixel into HTML5 canvas I want to insert a pixel with a color, and I use this code: context.fillStyle='RGB('+s[i]+')'; context.fillRect(i,y,1,1) Is there a shorter way to do it? e.g. in a single line of code? My main goal is to reduce the amount of code. A: There really isn't a shorter way to do it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can I have multiple run methods in a class? If so, how? I need to have 2 run methods in each object I will instantiate. I meant a run method for threading. What i need is more like a race of two cars. each car should have a name and a run() method in a class which extends Thread. I will have to call on the two cars ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to overwrite the put() method on a python app engine model? In Appengine, I am trying to have a property value computed automatically and stored with the object. I have a class, Rectangle, and it has a width, height and area. Obviously the area is a function of width and height, but I want it to be a property be...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Nested sequence in XSD I would like to validate this XML: <meta> <house> <big ... /> <little ... /> <big ... /> </house> <flat> <red ... /> <red ... /> <yellow ... /> </flat> </meta> I wrote that. <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmln...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using one site for multiple domain in PHP I have one site completely working for one client , now I have some more clients want same thing replicated for them , Is there any way , that I can use this site as base site , as I plan to access this site from there domain and providing database for each client. I am usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to get ScalaCheck's Arbitrary to always generate some special case values? I'd like to have all my properties always be tested with at least a fixed set of special values in addition to some random values. I'd like to define this in my generator specification, not in every test using that generator type. For ins...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Double buffering with Panel Double buffering the whole form can be done by setting the value of the "AllPaintingInWmPaint", "UserPaint" and "DoubleBuffer" ControlStyles to "true" (this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true)). But this can't happen wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: get cookie value in the textbox using jquery or javascript I want to see cookie value in the textbox. I have used this document.getElementsByName('Custom_Field_Custom2')[0].Value=$.cookie('artname',{ path:'/'}); but that cookies value is not displaying in the textbox. What I need to do? A: The "value" attribute i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to install Delphi 7 on Win 7? I am planning to upgrade my OS to Win 7 (32bit or 64bit). I would like to know whether we can install and run Delphi 7 on Win 7 successfully or not.Share your thoughts on installation of 3rd party components as well. This would help me to take decision regarding OS up-gra...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Primary address in Address Does anybody know how to make a address primary in VendTable? I need to make a new field (checkbox) in the Address tab of VendTable (the datasource for Address in VendTable comes from DirpartyAddressRelationship and Address). Can anyone let me know step by step how to make a address prima...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: main layout settings gone after layout change I change the layout in my App for different reasons like,a settings or about sub-layout. But when I go back to the main layout, every setting there is gone: no Buttonlistener is set anymore and the EditTextfields do contain the standart text. How can I change that behavi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: $.getJSON to receive JSON from API URL Hey I've done about as much research as I can and can't figure out my issue, if anyone could help me out. Basically have a API set up leading to a JSON doc and something seems to be hanging up the URL and this is what I'm working with so far $(document).ready(function () { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Hudson: Builds of multi-module maven project fail, then immediately succeed again I have a multi-module project where the top level project serves both as the parent of the individual modules and as the project that declares the modules. Only this top level project is configured in Hudson (including automatic SVN ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unable to connect to apns from php I am having trouble connecting to the apple apns from my production machine, its a vps hosting. * *I asked the hosting technical assistance and they said that they do not block outgoing connections on any port and that the logs show nothing of this problem and they have no idea ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jQuery objects and form.serialize Here is my example: var form= $(".anyclass form"); var sf = form.serialize(); $.post(form[0].action, Let's suppose that there is only one form in the page that fits the criteria. Why I need to access the action property using [0]? Why the .serialize() is done without [0]? Sorry abo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Error with Directory.Services when on production The following code works fine in Visual Studio Development enviroment on my local machine. However when I move the files to a Windows 2008 R2 IIS 7.5 machine I get the following error: [DirectoryServicesCOMException (0x80072020): An operations error occurred. ] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: where is file entry.S in v2.6.39.4? I am studying system call in linux with source code in version 2.6.39.4. Books said that system call is implementd in entry.S, located in arch/i386/kernel/entry.S, but I can't find that file in v2.6.39.4. so which file implement system call in my version? Any difference with old...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Problem with write delegated method I have a problem with adding parameters to EventHandler. I have a control when user select message and choose to who he want to send it. I need to handler OnConfirmForwarClosed add in some way variable item. How can I do it? private void inboxContextMenu_ItemClick(object sender, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery hover issue on mouseout I am using the jQuery variable "mouseover" and "mouseout" to show a DIV element when hovering over another. http://74.54.17.66/~adbuynet/case-studies/ - If you hover over "Call to Action" in the top right, you see a dropdown. The problem is, that when mousing over the dropdown itself, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Grails - Pass a link as a parameter I have implemented an email sharing service in my web application. People can click on the email button and access a form with which they can send emails to whom they want. I would like to set a default subject and body. In the default body text of the email, I would like to pass...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Find Duplicates using Rank Over Partition The following SQL works in identifying unique phones when there is a disparity in LastDate. But if duplicate phones have the exact same LastDate it does not work. Any ideas will be appreciate it. SELECT * FROM ( SELECT ID, Phone, [LastDate] ,RANK() OVER (PARTITION BY P...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Best Practice? Restart Centos service via ssh securely? I have a need to restart a CentOS service remotely via ssh during an automated, unattended process (executing a build on some software from a build server), but am unsure how to best implement security. Help is needed! ;-) Environment: Running an ssh login on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ping with php phar i want to use this script to do ping without using the exec(); or the commands that similar to it. the problem is i get these errors: Strict Standards: Non-static method Net_Ping::factory() should not be called statically in C:\xampp\htdocs\test.php on line 3 Strict Standards: Non-static meth...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Constructor chaining I have following code: public MapReader(string fName) { FileName = fName; } public MapReader(){ Console.WriteLine("Input valid file name:"); string name = Console.ReadLine(); this(name); } Apparently this is Java approach, which is not working in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Suppress "The method does not override the inherited method since it is private to a different package." How can I suppress the following error with the @SuppressWarning annotation? The method Foo.trololo() does not override the inherited method from Bar since it is private to a different package So far as I can t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Working with TIFFs (import, export) in Python using numpy I need a python method to open and import TIFF images into numpy arrays so I can analyze and modify the pixel data and then save them as TIFFs again. (They are basically light intensity maps in greyscale, representing the respective values per pixel) I couldn...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "133" }
Q: Dropdown Sort MySQL Query with Javascript OnChange? Below is a preview of what I have. What I want to do is when someone changes the drop down to "Cooper" then only Cooper brand tires will show, it will have to update my MySQL query. If they change it back to "All Tire Brands" then it does a quick refresh and show...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CSS Floating Div's & Alignment I am trying to create a control which contains two listboxes with add/remove buttons to move items from one list to the other. Typically I would do this using a table, but I am trying to follow css standards and use divs. I have the listboxes aligned perfectly, but I can't figure out h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Displaying an image from SQL Server in asp.net I am need to display an image on my asp.net page, which is stored as an image data type in SQL Server. I am looking at this post, display/retrieve image from sql database in vb.net, however, how can I display that image in a <td> element? A: <td> tags can't be used to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Efficient Way to Create Numpy Arrays from Binary Files I have very large datasets that are stored in binary files on the hard disk. Here is an example of the file structure: File Header 149 Byte ASCII Header Record Start 4 Byte Int - Record Timestamp Sample Start 2 Byte Int - Data Stream 1 Sample 2 Byte Int - Data...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: extern pointer problem in c++ I have a header file that has a number of declarations like this: extern ID3D10Device* device; I can't make these static because of a problem with multiple translation units, and I can't have them as normal pointers for a similar reason. However when I try to build the program I get un...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: System.Web.HttpException: Response is not available in this context error Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7569568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }