text
stringlengths
8
267k
meta
dict
Q: iPhone App- MkMapview get the range of area visible in map view in ipohne app Using mapView how to detect the the range of area visible in mapview (i mean range of longitude and latitude which binds the total area) and also when applying zoomin or zoomout in mapview, how to get notified that the range is changed wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How is my simple android activity leaking memory? My activity simply displays an image: public class PhotoFrameActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); File externalStora...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to run any exe with administrator privileges? I am using makecert to create certificate i need to do it though c# program the command doesnot execute as it requires administrator privileges. Please suggest me how to run any exe using administrator privileges in windows 7? If possible than just suggest me the sam...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: exception handling iterator interface I'm trying to make a watertight interface to a library that I'm designing. The user is to enter two dimensional data and so I thought an iterator interface similar to std::transform would be transparant. However, I am unsure how to exception handle any abuse of the iterators. M...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Facebook Connect does nothing have FACEBOOK connect to auto register users on my site - but clicking the "LOG IN WITH FACEBOOK" button does nothing - no pop ups. I've tried various ways of integrating it but still no joy. A: You need to upgrade to oAuth 2.0, Facebook connect has been depreciated. Facebook Integrat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Backgrounds look bad in phones? My designer created some good looking designs but the problem is that when I apply them on the app I get a weird outcome... Here is the image he designed: And here it is when I apply it on the phone: Why are there like waves in the phone background? A: Either use gradient in xml...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Kohana database select, list of fields In Kohana if I want to select fields 'id', and 'username' I do it this way: $record = DB::select('id', 'username') ->from('users') ->where('id', '=', 1) ->as_object() ->execute(); But how to do it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Combining common values in SQL Say for Instance I have the following table (full of connections between members) connectionA ConnectionB 887 225 129 887 225 887 887 562 562 887 How am I able to use SQL to find all of the rows where both A...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to make jpeg lossless in java? Is there someone that can tell me how to write 'jpeg' file using lossless compression in java? I read the bytes using the code below to edit the bytes WritableRaster raster = image.getRaster(); DataBufferByte buffer = (DataBufferByte) raster.getDataBuffer(); And I need to write a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: ruby on rails javascript_include_tag :defaults What the how the, where the.. <%= javascript_include_tag :defaults %> this little evil line is pulling in 3 additional JavaScript that I could essentially give less then a damn about. In fact I would like to use that to redefine some defaults on a per page basis. Howe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: jQuery MVC - Basic jQuery if else statement which CANT work? I got an if-else script: $('#favitem').live('click', function () { var fid = $(this).parent().attr('id'); if (isFav(fid)) { alert("Do you want to remove from favorite?"); } else { alert("Add to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Spring integration test does not roll back I'm using Spring + Hibernate + H2. I do database operations in my integration tests (by calling a service class). I want Spring to rollback the changes after each test method, but I can't get it to work. At first I used MySQL (with MyISAM, which doesn't support transaction...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Creating new entity classes from database in Netbeans and Glassfish I am trying to create entity classes from database for my JPA/Hibernate project in Netbeans (7.0) IDE with Glassfish server (3.1) But I get the following error when selecting the datasource from the "New Entity Classes from Database" wizard: Una...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: File names matching "..\ThirdParty\dlls\*.dll" Is there an easy way to get a list of filenames that matach a filename pattern including references to parent directory? What I want is for "..\ThirdParty\dlls\*.dll" to return a collection like ["..\ThirdParty\dlls\one.dll", "..\ThirdParty\dlls\two.dll", ...] I can fin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Customizing rating bar in android I have to design a custon list item including rating bar in it I followed this tutorial([Problem with custom rating bar in android) for customising and resizing rating bar.Rating bar is now appering small bt i am unable to click on it My custom listItem Code is : <TableLayout xmln...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Actual precedence for infix operators in Scala The May 24, 2011 Scala Language Specification has a typo in section 6.12.3 as discovered here. This was acknowledged on the mailing list. What is the actual precedence for the infix operators? A: I thought it would be fun figuring it out by testing it, I wrote the foll...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Advise how to optimize the solution (LOOP for all records and check for errors) I used the following (check for errors in loop and if they are exists I insert they into the table): FOR rec IN (SELECT MAX(t.s_id) as s_id,t.sdate,t.stype,t.snumber,t.code, SUM(t.amount) as amount, t... (other fields) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: emacs gud window use How do I customize which window GUD will use when i issue commands - 'up', 'down', etc ? It seems to use an arbitrary window, sometimes even the window with gdb in it - I want to be able to specify a specific window to be used. A: Have you considered borrowing the key bindings mentioned in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Mysql InnoDB Error code #1025 We are using Mysql 5.1 in our production servers and trying to run an alter query to change the datatype of a column from tinytext to varchar(200). On running the alter query we are seeing this error :- #1025 - Error on rename of './msging/#sql-123b_ab7634' to './msging/outboxes' (er...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to use newer headers on an older version of gcc (g++)? Is it possible to use newer headers with an older version of gcc ? I have gcc 4.2.1 on my ipod (which I learned has a compiler that can be installed with cydia) but I have gcc 4.4.3 on my distro. I was wondering if I need to get the original heade...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Where should the top of stack be in linked list implementation of stack? Here is what a linked list implementing a stack with 3 elements might look like: list | v -------- -------- --------- | C | -+-->| B | -+-->| A | 0 | -------- -------- --------- Where should we consider the top of the stack to be, th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618939", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Activity Transition Animation not working from Tab Activity To any other Activity I am trying to use activity transition animaition using OverridePendingTransition The same code works while I move from 1 activity to another everywhere in my App But when I use the same while transitioning from an activity which is a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to access SessionMode in WCF .NET framework 4.0 How do you programatically access SessionMode in WCF on the client side? How do you programatically access SessionMode in WCF on the server side? A: found answer here http://social.msdn.microsoft.com/Forums/en/wcf/thread/bf1ecbec-4eda-4dc5-ba26-c7ad43247b93 Server...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create batch file which opens an website e.g. gmail.com and enters user name and password i need to create a batch file which opens a website(gmail) and enters username and password. so can anyone help me please.. Thank you. here is the code i tried.. It opens gmail, now how can i enter username and password....
{ "language": "en", "url": "https://stackoverflow.com/questions/7618954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Comparing two databases I am using SQL Server 2008, can you recommend me some tool that I will be able to compare two database instances? Also I want to be able to choose what tables and columns should participate in the comparison. I want to add it to our automation testing. Thanks. A: Red Gate's SQL Data Compare ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PrimeFaces commandButton doesn't call action if ajax enabled Here's my page: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:cpanel="http://java.sun.com/jsf/composite/components/cpanel" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: JBoss Cache Cluster Issue In our production environment we have three JBoss servers loadbalanced for application requests, client applications session has been maintained JBoss-cache with clustered enabled to make sure that all three servers should get the session object. All went fine in production for the past thr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to Hide Video view's Seekbar or Progressbar in android i am doing live streaming and play video in video view. i want to hide default progress bar of video view . so i kindly request for my problem if anybody have good solution for my problem please send me. Thanx in advance....... A: You have to set the media...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Parsing xml-like data I have a string with xml-like data: <header>Article header</header> <description>This article is about you</description> <text>some <b>html</b> text</text> I need to parse it into variables/object/array "header", "description", "text". What is the best way to do this? I tried $vars = simplex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I create my desired string using a byte array? I have the following byte array: byte[] bytes = new byte[] { (byte) -61, (byte) -61}; At first I convert it to String using the following line: strResult = new String(bytes, "ISO_8859_1"); Then I convert it back to byte array using the following code: byte[] m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618975", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating an Interactive map using an Image not google map I want to create a map view using a static image, so I can enlarge the image, minimize it, and if I click on a specific place on the image a message with the clicked place name appear. I'm using titanium for android and iPhone. Is it possible? Note that I c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create pretty URLs (permalinks) for website on Java? I would like to make pretty URLs for my web projects on Java. For example, I have URLs like these: * *www.mysite.com/web/controller?command=showNews&newsId=1 *www.mysite.com/web/controller?command=showNews&newsId=2 *www.mysite.com/web/controller?comman...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: wp7 Display string in webbrowser or otherway? string a="hi <p> how </p> are <Br> you?</Br>"; How can avoid this tags <p> </p><Br> </Br>. In output coming like that : Hi how are you? If anyone know the answer help me. A: You can call NavigateToString to render custom HTML in a WebBrowser control: string html = "<ht...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Adding UISearchBar as tableHeaderView in xib not works I added UISearchBar as tableHeaderView for UITableView in xib, by just dropping UISearchBar onto UITableView. It is working fine, when the table has more than 6 rows. But when there is less than 6 rows, it UITableView does not scroll. At the same time, if i a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Let users visit other users (profiles) in my own written social community? The thing I'm asking for is how the users can visit other users profile. The past week I have been scripting a social network I'm doing, and I'm kind of stuck right now. I don't know where to start and read or anything. So I'm asking you guys...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Openssl asymmetric encryption without salt (in php) I need to encrypt a string data with SSH-2 RSA 1024 bit ( with the public key ) then with RMD-160 algorithm. I do it like this: generate private key: openssl genrsa -des3 -out privatekey.key 1024 public key: openssl rsa -in privatekey.key -pubout -out public.pem ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python download all files from internet address? I want to download all files from an internet page, actually all the image files. I found the 'urllib' module to be what I need. There seems to be a method to download a file, if you know the filename, but I don't. urllib.urlretrieve('http://www.example.com/page', 'my...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Errors when using two Asynchronous ASIHTTP Requests in different classes Suppose i have two classes A & B. class A calls the asynchronus method Foo in class B. Foo method fetches data using asynchronous ASIHTTPRequest and send the data from Foo back as the return value to Class A. Class A will use that returned data...
{ "language": "en", "url": "https://stackoverflow.com/questions/7618999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Replacing HTML with Javascript in a way that is executable in a browser I have no Javascript experience at all. What I want is to replace a single instance of a block of text in a page's HTML - how can I do this? 30 minutes of reading around has brought me this: javascript:document.body.innerHTML = document.body.inn...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Facebook Canvas JavaScript Links Don't Work We are using ASP.NET for our Canvas Page, however none of the link buttons (JavaScript Post Backs) work when using FireFox. After a bit of investigation it appears that any javascript link i.e. <a href="javascript:..."> will not run. When viewing the iFrame outside of Face...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP Calling A Method Statically; Even Though Its Not Defined As Static How is this working? Shouldn't this throw an error, since I am trying to call a non static method statically? Basically, I've never instantiated an object of type something. class Something { public function helloworld() { echo 'hello w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jQuery Modal Window Displayed Under Mask I'm newbie in jQuery and i have a problem creating modal windows. My modal window is displayed under the mask. I want it to be displayed on top of the mask. I'm not being able to figure out the problem so need some assistance on this one. Here's the code: <!DOCTYPE html PUBL...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Add SuggestBox to CellTable as an editable cell Is there any way to SuggestBox to CellTable? Maybe there is another solution then SuggestBox? I need to get an editable cell with suggestion feature? I'm using GWT 2.4. A: I don't think you can add it directly in. Try using a ClickableTextCell as the cell for that co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: JavaFX when will be available for Linux world? Will Oracle make JavaFX like Flash policy to make Linux developers impossible to get it? I am looking for JavaFX under Linux Ubuntu/Fedora/OpenSuse/Gentoo/TinycoreLinux/MicrocoreLinux But none of the OS have a single JavaFX latest coding emulators, it will be too late a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Compare value obtained from textbox in asp(vb) using SQL Server database I am using asp(vb) In SQL Server database I made a table cars which has two columns: * *productid int *name varchar(50) Now I am collecting the value of name attribute from user through a text field: Enter car name <input type="text" name=...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jquery save multiple cookie for every link I have lots of links in the page, click each one addClass 'voted' to this link. then save the effection into cookies. so that next time refresh web browser, it will save the addClass event. My code here, but it will only save 1 cookie. I mean if I clicked link 1, link 2. it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to enable iOS browser to login with facebook from web page (not app)? I have a web site, that uses facebook to login. I would like iOS user of safari, to be able to login into this site. You understand i'm NOT talking about a native iOS app..... just a web site visit. Currently, user can't login from iOS safari,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sensor manager not working as expected after Android 2.3.6 update Couple of days back, I made my first app on Android. The basic concept is to monitor the proximity sensor, if there is an obstacle at the sensor I will increment a counter. If the counter crosses the threshold I will trigger an action. I have implemen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Prefixing array keys with a string (:) in PHP Quick one; I know a solution, but I'm looking for something more elegant if it exists. I'm using PDO for prepeared statements: $sql = "INSERT INTO my_table (foo, bar, baz) VALUES (:foo, :bar, :baz)"; $source->execute($sql, array( ':foo' => $foo, ':bar' => $bar, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Unable to access xml files, whose addresses' contain unicode characters I was wondering how to access file addresses containing latin characters, with jquery ajax. I tried to retrieve data in xml files with the script below: $.ajax({ type:'get', url:encodeURI('configuration/'+(value).toLowerCase()+'.xml'), ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Convert a byte array to integer in Java and vice versa I want to store some data into byte arrays in Java. Basically just numbers which can take up to 2 Bytes per number. I'd like to know how I can convert an integer into a 2 byte long byte array and vice versa. I found a lot of solutions googling but most of them d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "167" }
Q: Start and Reset Button How I could create a Start Button, which start my calculation and repaint in Java(Eclipse)? I try it with if(permission==true) but this do not work. The same is the with the Reset Button. In class space: public void setPermissionTrue() { permission = true; } public void run() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: adding html tags to selected text in textarea. Why does "if('selectionStart' in textarea)" need to be in there? I found javascript code that allows me to add html tags around text that I have highlighted in the textarea field: <textarea id="myArea" cols="30" spellcheck="false">Select some text within this field....
{ "language": "en", "url": "https://stackoverflow.com/questions/7619063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting Java 1.5 compatible code to Java 1.4 Is there any tool that might help in converting the Java code written using 1.5 to 1.4. This is required because i need to reverse engineer my project using STAR UML. and Star UML is Java 1.4 compatible. Please Help A: Maybe you can try with retroweaver, it works on b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Storing an int into NSNumber then calling it in a new class So basically on my ClassA.h I have created a NSNumber called selected. It is also used in @property as well in that .h. Now in ClassA.m I have a table view and when one is selected it goes to another screen. I would like the indexPath.row to save into that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Which unit test framework for C can be used with Jenkins I am trying to find a unit test framework for C, that would work with Jenkins. from the wikipedia page http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C i can see only few that generate results in XML , and gtest needs your code to be compiled wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Make the while loop test all the time I'm working on a simple test that uses a while loop. Here is the code: var ishovered = 0; $('a.hovertest').hover(function(){ ishovered = 1; },function(){ ishovered = 0; }); while(ishovered == 1) { //execute function } How do I make it so that while loo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Factory Girl vs. User.create -- what's the difference? This is an additional note to the question "Factory Girl - what's the purpose?" I'm not sure whether my question is counted as a repetitive one, but I'm simply still not very clear after reading that post, since I think my doubt is still different. Alright, so n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Earliest deadline scheduling I want to implement Earliest deadline scheduling in C but I cant find the algorithm on the net.. I understand the example below that when time is 0, both A1 and B1 arrive. Since A1 has the earliest deadline, it is scheduled first. When A1 completes, B1 is given the processor.when time is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Load json data to autocomplete jquery I am trying to use the jqueryui autocomplete to load services from mysql database on my form but nothing happens?? please help me or tell me where am wrong my html <input type="text" id="actual_service" /> my javascript script $("#actual_service").autocomplete({ source: "http:/...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create a Custom Circle? I want to create a custom circle for my application whose all attribute and property i want to define my self. Basically i want to create a myCircle class which should be inherited from NSObject class. How can i do that? Any sample application /example/ code for reference? A: MyCircl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MemoryLeak in iphone programming? Can any one help me to understand the problem in this image A: As the analyzer says, you are allocating locs on line 647, using NSMutableArray *locs = [[NSMutableArray alloc] init]; and not releasing it later in the block. You should release it or you can use convenience construc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generating one Texture2D from multiple Texture2Ds My problem is the I need to represent a length-changing floor using a Texture2D, which means a floor that the sides has the image of the sides, and in the middle it repeats the same 'middle' image, like so: To achieve this, I get the 'left edge', the 'middle' and th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Transform text to vector shape in Adobe Flash Professional CS5 How? Question is simple, hope the answer will be as well. A: * *Use the text tool T and type *Select the text with the Selection tool V *From the menu select Modify then Break Apart or Ctrl+b *Finally use the Subselection tool A and click the text e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619092", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to inject CSS into webpage through Chrome extension? I do not know how to inject CSS into a webpage through a Chrome extension. I am trying to inject this into a web page: body { background: #000 !important; } a { color: #777 !important; } Here is my manifest.json: { "update_url":"http://clients2.google....
{ "language": "en", "url": "https://stackoverflow.com/questions/7619095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Can't set image int into webview? Allright so here's my problem. I have an app which contains alot of pictures and i wanted to be able to pinchzoom these, but since the ImageViewer doesnt support this natively I thought I'd use the Webviewer instead, but heres the thing. all my pictures are saved into my "picture" i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: A bit of assistance with sub and regex This works: 'http://foobar.com/default_profile_images/default_profile_6_normal.png'.sub(/normal\.([a-z]+)$/, 'reasonably_small.\1') This doesn't: "http://foobar.com/profile_images/1550660558/Bathurze_Pics_normal.JPG".sub(/normal\.([a-z]+)$/, 'reasonably_small.\1') I'm trying...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating a 'Table' from divs in CSS/HTML I have content in a 400px wide div that I would like repeated across the width of the screen with 30px spacing in between, similar to the layout of these blog modules. The number of modules per row would depend on the width of the screen, like in the above example. I am new t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Noticing strange behavior with strings in c Still in learning mode and may be the following question is a really dumb but I dont have any idea why it is happening.. #include<stdio.h> int main() { /* code to accept string and then a character from stdin */ char str[20], inp; /*take string ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: html_escape seems to be broken after upgrading to Rails 3.1 I have a project that uses the WYSIWYG editor 'wysihat-engine' by Dutch guys from 80beans . It use to work fine with Rails version 3.0.9 , but after upgrading to 3.1.0 the wysihat-engine cannot find 'html_escape' from ERB::Util (ActiveSupport 3.1.0) , givin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NLTK Chunking and walking the results tree I'm using NLTK RegexpParser to extract noungroups and verbgroups from tagged tokens. How do I walk the resulting tree to find only the chunks that are NP or V groups? from nltk.chunk import RegexpParser grammar = ''' NP: {<DT>?<JJ>*<NN>*} V: {<V.*>}''' chunker = RegexpPars...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: PHP replace newlines stored in MySQL DB I have a MySQL table with 2 columns: * *text: stores a multi-line text which could have line breaks as \n, \r, \r\n.... The text is inserted via a webform and could have been inserted by any browser on any OS. *line_break: represents what type of line break this particul...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to use answer (from command window) for a code I have random matrix(A) and I find a result I'd like to use later for my code A=randint(5,7,[1,9]) ans A = 8 1 2 2 6 7 7 9 3 9 4 1 7 1 2 5 9 9 8 4 3 9 9 5 8 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sorting groups of data looking at the newest entry I have a table with two columns team and date. The date column has the date that the entry was added to the table. I want to print the last 10 entries of each team sorted by date DESC. I also want to sort these groups of team entries by date DESC. I tried a lot of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PyQt4: set size of QGridLayout depending on size of QMainWindow I'm writing a little Qt application with Python. I've created QMainWindow, which have a QGridLayout. In each grid I'm adding QTextBrowser Widget. I want left side of my grid to be not bigger than 25% of window. So I'll have two QTextBrowsers: one is 25%...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Executing Scala objects in Eclipse without a main method I have an assignment to code several methods in Scala. The methods will be encapsulated in an object that has no main method. The professor gave us a JAR file that contains an interface (my object implements this interface) as well as a sort of pseudo test obj...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I spread out randomly located images in js? I am randomly placing images on a canvas in javascript. The problem is that I want to minimize stacking but not prevent it. I would like to see the behavior where if there is enough images to fit on the canvas without overlapping, they wont. However, I want the ima...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: target and display an object of list control in flex i have made a list control. i want to display the name of the objects in it in a text control box the code i am using here is public function add(event:MouseEvent):void { var str:String; str = mylistcontrol.dataProvider.getItemAt(0).toStri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to close thread when application deactivated? I have some thread in some page (e.g page1) in wp7. I want to close these thread when the application deactivated in this page, not in the global application file.When application deactivated from some other page only this page onNvavigateFrom is called, bit page1 on...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In ruby, why does array append fail on a hash with a default value of empty array? Code example below. Calling append on a hash value returns correctly but the hash itself doesn't behave as I would expect. ruby-1.9.2-p290 :037 > r = {} => {} ruby-1.9.2-p290 :038 > r.default = [] => [] ruby-1.9.2-p290 :039 > r[...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: left outer join by comparing 2 files I have 2 files as shown below: success.txt amar akbar anthony john jill tom fail.txt anthony tom I want to remove the records from sucess.txt those matches with fail.txt Expected output: amar akbar john jill A: I'd use fgrep - if available - as you're using fixed strings it s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to debug PHP/WordPress failure running on WebMatrix (Windows 7) I was able to install and run WordPress via WebMatrix on a VM. I have a WordPress theme though that immediately causes the site to start failing. I receive a 500 error message, there is nothing in my event logs. Where can I find some kind of log f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ajax for DB Updation I am updating 100,000 records. So the page looks blank while the update query process runs on the backend. Can someone tell me how to display the text "Please wait blah blah" until the update ends? A: Well depending on your script and the structure, the easiest way would be to change a div's cs...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Automatic factory registration i'm just learning java, and i meet some problems. Here we have simple factory pattern: public class SomeFactory { ... public static void registerProduct(String name, Class<? extends IProduct > f) } public SomeProduct implements IProduct { static { SomeFactory.regist...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: PHPExcel : Splitting an Excel document sheet by sheet I'm using PHPExcel library for many Excel manipulations, combined with PHP/MySQL. That helps me well. But I can't figure how to split an Excel document sheet by sheet,where each sheet is created as a new Excel document. I also need, at the same time, to delete th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to upload image with reduced size I am using asp.net fileupload control for uploading image but here i want to automatically re size to 250*200px. please suggest me what to add in my code. I am a novice to asp.net. protected void Button1_Click(object sender, EventArgs e) { string s =@"~\img\"+FileUplo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make certain widgets in scroll view unscrollable or sticky at the top of screen like a header I am creating an android application in which the user can view the channel list and programme list on the same screen. For ex :- The image of the channel will be on left and the programmes scheduled will be on the r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to create a javascript object like Date()? I wonder how is it possible to create an object for example MyObject() which it can act like javascript Date object when we +(new MyObject()) like: var a = new Date(); alert(+a); A: Your object needs to have a valueOf method like so: var f=new function(){ this.val...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Register a path via template layer, alt to hook_menu Is there a way to register a path via template layer, like what hook_menu does via a module? I can only work with isset($_GET['some_path']), but I am expecting more like a real registered path. *some_path can be any special page which simply return/print 'print', ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java How to mock the object and static method in java? I am writing a junit of CustomerHelper which internally calls the method of AccountHelper object. The CustomerHelper is creating the AccountHelper object with new operator inside one of its method. Now if i want to mock the AccountHelper object.Is there any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: deploying a new version of a GWT project to GAE doesn't work I have a problem deploying to GAE. I have deployed new versions many times, but now it creates the new staging directory properly, but it uploads 0 files to the server. It is like it doesn't notice the code changes. And when I execute it in the server it d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: stream.publish issue, share is not working Two days ago I started to develop a new application, and I am just copied and pasted my other application, and then change it like how I want. **The problem is that my old application worked perfectly with the share function, but the new one gives an error: An error occur...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How to keep track of CurrentUser in WPF using ASP.NET Membership I have the following needs. I am using ASP.NET Membership installed into my database. I need to create a WPF application which needs to have login functionality. I have imported the System.Web.Security namespace so I can validate and create users with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get the attribure value of firstnode which is having its attribute value starts with "Heading" and assign to a variable in xslt2.0? This is XML Document. <w:document xmlns:w="w"> <w:body> <w:p> <w:pPr> <w:pStyle w:val="Normal"/> </w:pPr> <w:r> <w:t> Para1 ...
{ "language": "uk", "url": "https://stackoverflow.com/questions/7619191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MCTS 70-515 training kit, wrong on view state? On page 123 of the book - chapter 3, lesson 2. it says: " The Page.ViewState property provides a dictionary object for retaining values between multiple requests for the same page. This object is of the type StateBag. When an ASP.NET page is processed, the current stat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Strange codeigniter issue When I upload my fully working codeigniter app on live server it did not find any controller and cotroller action. For example: my local url is: localhost/myapp/index.php/testcontroller/testaction Yes, It works fine, But when I upload the same thing and url becomes: livesite.com/index.php/...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to load bitmap from res without resizing? Using this code: Drawable blankDrawable = context.getResources().getDrawable(image); Bitmap blankBitmap=((BitmapDrawable)blankDrawable).getBitmap(); I get a bitmap that is scaled to the density of the context, preserving the physical size of the bitmap (based on...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to use DataTemplateSelector with a DataGridBoundColumn? I followed the simple method described here and have a DataGrid with dynamically generated columns which allows DataTemplates to be used and bound dynamically. for (int i = 0; i < testDataGridSourceList.DataList[0].Count; i++) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Click closest submit button when any 'enter' key event occurs on any input field I have multiple submit button on the page. What I want is if user presses enter on any input field it should click the related submit button. I tried the way below but it even couldnt catch the key press on the input fields. Thanks in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How should I make this box shadow work efficiently? I have a small, fixed position header on my site. It has a shadow at the bottom of it. It is all nice and good, but I think it would look better if the header would have a border originally (when the page loads) and when the user scrolls down the shadow would appea...
{ "language": "en", "url": "https://stackoverflow.com/questions/7619215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }