text
stringlengths
8
267k
meta
dict
Q: EditText with Currency format I have a EditText in which I want to display currency: input.setInputType(InputType.TYPE_CLASS_NUMBER); input.addTextChangedListener(new CurrencyTextWatcher()); with: public class CurrencyTextWatcher implements TextWatcher { boolean mEditing; public CurrencyTextWatcher() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: c# pass file pointer to unmanaged c++ dll to use for stdout Please bear with me - I'm a c# developer with little experience with C++, and this is a steep learning curve! From a c# console app, I'm calling some methods from an unmanaged C++ dll. The DLL writes to the stdout stream, although this was not being picked...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Caching at repository layer in Asp.net application using Caching Application Block In one of my webapplication, I am trying to cache some reference entities so as to reduce database hits. I am using Caching application block to implement the caching. I am new to it, and I am not sure about its implementation. I have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: UISearchBar Issue on Table Loaded by SQLite Query First of all, I'm new to this so excuse my any simplest question. I'm trying to view data and filter it which is very common. So I use different tutorials. First, I loaded data from my SQLite database, then I used custom cell tutorials and customized my cells. But I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get ID of element that called a function How can I get the ID of an element that called a JS function? body.jpg is an image of a dog as the user points his/her mouse around the screen at different parts of the body an enlarged image is shown. The ID of the area element is identical to the image filename minus the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "89" }
Q: Mapping XML responses to data records ( Smartgwt) I have subclassed RestDatasource to create my own data source. This is the constructor to my Datasource public CustomDS (){ setDataProtocol(DSProtocol.POSTMESSAGE); setDataFormat(DSDataFormat.XML); DataSourceTextField firstNameField = new DataSour...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to get data from facebook graph api in jquery I am trying to get json data using facebook graph api through jquery. I am using the code below. I am trying to get json data using $.getJSON function but it displays this error in firebug NetworkError: 400 Bad Request - https://graph.facebook.com/me/home?access_toke...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627164", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: New ASP.NET MVC project contains membership functionality but no database I created ASP.NET MVC 3 project and it has functionality to create users and login/logout. However I don't see a database that its trying to work with. I assumed that a mdf file would be added to App_Data folder but I don't see it there. When...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I replace the string exactly using gsub() I have a corpus: txt = "a patterned layer within a microelectronic pattern." I would like to replace the term "pattern" exactly by "form", I try to write a code: txt_replaced = gsub("pattern","form",txt) However, the responsed corpus in txt_replaced is: "a formed lay...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: C# MVC Send an email attachment of a print screen image This is for printing screen, using System.Drawing; using System.Drawing.Imaging; Bitmap printscreen = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); Graphics graphics = Graphics.FromImage(printscreen as Image); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NSSearchPathForDirectoriesInDomains explanation confused I have just been studying this code which checks if a file exists: NSString *path; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); path = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"SomeDirectory"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627177", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to prevent registration of DLL in the GAC I have a dll say DLLA(Version3) installed in GAC. When a lower version of the same dll ,say DLLA(version 2) is trying to install into GAC, I need to prevent it because there is already an higher version of the same in GAC. How do I do this? A: The GAC will manage multi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I make a tooltip point at a specific label in C#? In my application I want to use a tooltip to point at a label to get the users attention: toolTip.IsBalloon = true; toolTip.Show("message", label1); The problem is that the balloon isn't pointing at the specified label. What should I do? A: This is a known b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can you use a Where Clause in WPF - XAML Binding? I want to bind an image source to a List item, but I need the binding to select an image from the list based on an argument - select the image from the List based on a boolean value within the list. e.g. Images List has a number of fields: Images.Src Images.IsMainIma...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: count elements using javascript Possible Duplicate: JQuery - How do I count the number of elements selected by a selector? I know you can determine if an object exists using var nextfooter = $('footer.newcontent')[0]; but using the same sort of syntax could I return the number of elements found? A: Why not simpl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Replacements for `target="_blank"`? I am using target="_blank" in most of google gadgets so that the link opens in a new window, rather than in small gadget space, but it is polluting the browser with windows and I am looking for a solution so that the window would open to the current browsing window (like normal br...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Appending HTML Content with Attributes to a jQuery Selector I want to add DIV tags with attributes within a selected element. I understand that the normal way of inserting HTML content according to the jQuery website is to: $('#selected_element').append('<DIV id=' + A + '>{HTML CONTENT}</DIV>'); However, I also nee...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Strange behaviour while interating JSON array of objects using jQuery This is my sample JSON response: [{"id":11137,"name":"Agra"},{"id":11138,"name":"Albizzate"}] and i need to iterate each array object and print id and name: $.ajax({ url: '{{ path('ajax_provinces') }}', type: 'POST...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Match and substitute whole visual range in vim I wanted to visually mark a few lines and then surround the whole range with <p> and </p>. After a lot of fiddling I have come up with this substitute command that seams to work: :'<,'>s/^\(\_.*\)\%V/<p>\1<\/p>/ Is there a better way of doing this or could someone expla...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Facebook OAUTH2 and PHP/JSDK I have registered with auth.login in order to do an ajax call back to my server and update login counts. it doesnt work as the php sdk is resolutely refusing to see that the user is properly logged in. JS code: window.fbAsyncInit = function () { var channelurl='http://'+window.lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: css rule inheritance in wicket parent-child pages I have a problem resolving css classes in wicket parent child pages. I have a wicket base page (BasePage) and a child page (ChildPage) extending BasePage. The div in BasePage is like, <div class="container-fluid"> <wicket:child/> </div> and in ChildPage <wicke...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Falsy? How does the && operator cause a 0 to return 0 rather than NaN? I read that sometimes the && operator is used to "short circuit" JavaScript into believing that a return value of 0 is 0 and not NaN because 0 is a falsy number in JavaScript. I've been looking around to figure out what all this means. Can some...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Incorrect filename on WWW::Mechanize submission As far as I can read from the WWW::Mechanize documentation, you can do the following to submit a file from a string: $mech->submit_form( fields => { 'UploadedFile' => [[ undef, 'test2.txt', Content => $content ], 1], } ); This should submit a file with...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: XML parsing tool I need to make some XML manipulation within OpenStreetMap project. Input will be XAPI tag search result (XML file), which I can save and load locally. I need to extract a parameter from a tag in one file and save it as a differently named parameter of a differetly named tag in another file. The outp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How do compilers treat variable length arrays This might seem like a beginner's question, but I am interested in the way that a compiler normally creates arrays of variable-dimensions, like in the following program. #include<iostream> int main(){ int n; std::cin>>n; int a[n]; } From what I've learnt, in C al...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: exception NoClassDefFoundError from deploy spring project with maven assembly i'm trying to build an executable jar with dependencies for a spring project. my pom: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Modifying Arduino code to read serial to control shift register I am needing to send a MIDI signal through the midi2serial converter. I am using THIS shift register, in order to control 32 individual LEDs. How do I modify the shift register code to accept the MIDI serial signal to light specific LEDs in the matrixs?...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Retroactively remove commonly ignored files from Mercurial? I started a new project and did a half dozen local commits in Mercurial before I remembered to copy my .hgignore file into the working directory. So, now I have a bunch of binary and debug symbol files that I'd like to retroactively prune out. I haven't pus...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Java Generics in combination with interface inheritance I have a problem with generics in Java in combination with interface inheritance. Here is an exampe: public interface Type0 { } public interface Type1 extends Type0 { void method(); } public interface SomeInterface0<T extends Type0> { T get(); } publi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Best way to implement Failover Pattern for Java Clients We are designing a Java client (will be deployed on Tomcat, Windows 2008 R2) which needs to subscriber for some JMS topics on Sonic MQ. Client wants to have to redundancy for this Java client and at any point of time, only one subscriber should be subscribed f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to access database from Ubuntu Possible Duplicate: Import/Exporting databases from one machine to another I am on Ubuntu. I can access files (phpmyadmin folder) in xampp (I used it in Windows). What files do I need to copy from xampp or maybe there is .sql file somewhere, so I could copy database which was in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Why those different string formats on TimeSpan on XAML? I'm going crazy. Can someone explain me why these string formats formatting the same thing are so different? <DataGridTextColumn Header="Max Time" IsReadOnly="True" Binding="{Binding MaxTime, StringFormat=hh\\:mm\\:ss, TargetNullValue=---}"> <DataGridTextCol...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: DES Cryptography in C# I've been trying to find out the correct way to encrypt a byte[16] variable using DES algorithm. Here's the scenario: * *The data should be encrypted in 8-byte parts. the key for encryption is: byte[] {11, 11, 11, 11, 11, 11, 11, 11} *First 8 bytes is encrypted using Instance Vector = ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to use AS3 code with Haxe without any modification? I am going to use a lot of AS3 code in a Haxe project. I use latest version of Haxe. I really want to use it without any modification. Is there any standard way to do it? Any tools? A: You can compile your AS3 code to an SWC and then include the SWC in your Ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CakePHP Admin Panel and Front End I am new to CakePHP. These days, I create an application some like hotscripts. I need an admin panel for site manager to add new articles/apps and front end for public visitors. I am looking for a solution for this. I have alread made the router_prefix to admin. For example, in the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: multiple submit buttons and css tabpanel I have a ASP.NET Ajax web query form which is made of 4 tab panels. Each of these panels have its own textbox and Submit button so that it can perform a particular query against the database. E.g. one is searching data by Month, another by Name... When a form only contains ON...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to populate a ListBox with external API response? I am making a request to an API, the only option I get is async get response var r = (HttpWebRequest)WebRequest.Create(url); r.BeginGetResponse(new AsyncCallback(ResponseMethod), state); So, I built everything I need to get the data, and it is working. But the d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Overlapping event areas I got a square component inside a canvas which when clicked shows a glow effect-indicating selection-while clicking somewhere else this effect is removed-indicating deselection The problem is that the canvas always dispatches the "deselect" event, even if the mouse if over the square. I worke...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Eclipse: Refactoring-renaming GWT uibinder java bean does not rename template ui.xml file When using Eclipse Google plugin, when you create a gwt uibinder pair, you get a java bean file and its corresponding .ui.xml template file. I believe I used to be able to do this in Eclipse Helios: Right-click on the java bean...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why this source code doesn't work in Grails 1.3.7? I'm a novice in Grails and I came across this question. And I thought of testing this link as one of the answer suggest. I downloaded it and when I ran the grails app, I get an error message stating that the version is low and I need to upgrade it. And I did the sam...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting items in GridView after it's been bound I have a UserControl AutomatedFeedGridView.ascx which is essentially a GridView. It has a public property Category which is passed in on the page using the control. The problem I have is that I want to filter based on a dropdown list on the calling page. Below is the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using contains on a String in Java I have a string called trips. In this string there are 3 values chosen by the enemy player. I want the buttons which equals one of those values to change their color. for(int i = 0; i <=Lobby.baanlengte;i++){ if ((trips.contains(Speler1[i].getActionCommand()))) { Syst...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Error 324 Empty_response only on free webhost with fpassthru, readfile, file_get_contents i'm a little confused. $l = $_REQUEST['l']; $arr = get_headers($l); foreach($arr as $a => $b){ if($a == "6"){ $r = str_replace('Location: ', '', $b); } } readfile($r); this code works fine on my local apche se...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I set a value in memcache to expire at a specific time? I have a google app engine apps (created using python). I want to add a value to memcache but would like for the value to expire every midnight (PST) How do I do this? A: You can set an item's expiration time either as absolute epoch time, or as a rela...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When installing a custom Visual Studio template, do you have to install the interop stuff? I want to install a custom project template with my tool. The template uses a Wizard, so I'm including an assembly and putting it into the GAC on the target machine. Now, this assembly has lots of dependencies like Interop.IWs...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: More storage in a Firefox addon with Add-on SDK I want to develop an addon with the addon builder. I read that with simple storage one can have about 5 megabytes for his addon, but 5 mgb won't do it for my app. I need more. What could I do? A: You cannot do much given the Add-on SDK API. Instead you could break out...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Delegate call is very slow in ipad app I have a view composed of two table views (custom split view) divided by a splitter image. When a user clicks an item on the right view, a modal view pops up and the user edits some values. Once he clicks submit, the edited values must be updated in the respective columns of th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: LDAP: error code 49 - cannot bind the principalDn I'm a newbie to ApacheDS.I just created a new partition in ApcheDS. When i try to register my connection factory i get above error..(with OracleAQ ) My code is; // ldap settings env.put(Context.INITIAL_CONTEXT_FACTORY, AQjmsConstants.INIT_CTX_FACTORY); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: PHP RegEx match string with random number at end Currently learning PHP with RegEx and I want to extract the DAX value from a website. Got the website source with file_get_contents and then cleaned up the tags with strip_tags. The block that contains the string i want is this one: Dax5.502-2,4% but i just need the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: 2 class instances, 1 line If I have two PHP classes Rappers and Rockers, is this the best way to create an instance of both? $musicians = new Rappers() && new Rockers(); Update: More specific as to how I wanted to use this is to instantiate another class along with the Hybrid framework which is wrapped entirely in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Can't stop recording? Possible Duplicate: Stop Recording and Context I can't understand what's wrong ?!!! When the phone rings then recording starts. But when the call ends I get NullPointerException, because MediRecorder is null, but recording is still going until I shut the window with an error. My problem th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: exec-maven-plugin not detecting class in src/main/java I have a project that fails with: Caused by: java.lang.ClassNotFoundException: app.Main at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.la...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Remove image background with Javascript/jQuery I came across this site http://skincity.se/sv/product/1198/md-formulations-vit-a-plus-hand-body-creme and wanted to copy the way they have removed the background color from the product images. How do they do it? It seems they are doing it on the frontend, since all imag...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: FileExists() returns false, even if file exists I want to check if a dll in System32 directory (Windows 7) exists. But even if it exists, FileExists() returns false. LoadLibrary returns a valid handle. In this case, I only want to check, if the files exists and visualize this information. Do you have a any tips to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: OpenSSL memory BIO and partial cipher blocks I'm using OpenSSL in an architecture which requires me to perform encryption and decryption locally. The decryption function gets a buffer which was encrypted on the other side of the connection. The encryption/decryption process usually works fine, but for the case where...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to generate thumbnail images from a PDF file with JQuery / ASP.Net MVC I am working on project that allows the user to upload pdf files , store them in SQL Database , manipulate them (Comment, Highlight, Bookmark, Draw, Copy Text/Table/Image)and generate the files from HTML Pages . To do the work , I chose to wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Self-destructing class containing a window I've created a print preview class, PPREVIEW, containing a print preview window, which is supposed to popup over my app's main window, while disabling it. When user closes preview window, it is supposed to enable main window and destroy PPREVIEW object. I'd like to use it i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In Javascript, how to explain 0 == "" returning true? Possible Duplicate: Why is 0 == “” true in JavaScript The following is done in Firebug: >>> 0 == "" true >>> "" == false true But how did the "" get converted to 0? I think the reason they both returned true was that "" gets converted to 0, and in the first...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Android: Edittext- get current line In an edittext is there a method for getting the current line of the cursor? If not I will write my own method, but just wanted to check. If I do write my own method would the best method be to go through every character in the edittext until selectionstart and count the number of...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Prevent a using-statement from happening I want to have a custom view mode, to show online user text and not online user some other text. But I want to do it like the Html.BeginForm(), in a using statement. I have made a class witch can write text at the start of the using and text, but I cant get it to stop the tex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: iphone dealloc property I run the analyse build on Xcode, and get a warning for a leak because of an object that is a property and instance var .h UIView *_transparentView; } @property (nonatomic, retain) UIView *transparentView; .m @synthesize transparentView = _transparentView; self.transparentView = [[UIVi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: mvc3 - how do i trigger framework validation prior to submission so that it also displays error messages for required fields? I have a form that is used like a wizard using JQuery. The only problem I have is that the user can click the next button to go to the next wizard step but the validation does not capture any...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to convert Cloudera Hadoop "vbox" VMDK to VirtualBox VDI Hi guys : I am trying to run the Cloudera Hadoop VM in Virtual box. * *First, I noted that the download is a .vmdk file. Of course, this suffix is for VMWare, so that was a bit odd. *Luckily, I found a tutorial on how to convert the cloudera vmdk i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Gui - JPanel adding JComponent into GridLayout cell I'm trying to display a frame using GridLayout, but one of my panels isn't displaying. The JPanel that I'm having trouble with (gridPanel) is supposed to have a 50 by 50 GridLayout and each cell in that grid is supposed to have a Square object added to it. Then th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Programmatically added UI items order next to each other There is a UIScrollView and I'd like to programmatically put subviews in it. It's ok, but how can I lay automatically the subviews next to each other? Thanks in advance! A: The position of the subviews is dictated by their frame property. So you need to set t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: re-order alphabet sorting in Perl I am trying to fix sorting in Armenian alphabet, because all standard Unix tools and programming languages sort letters and words as a result for only 1 of the 2 major dialects (Western). Translating this into technical problem is to re-order one of the chars "ւ", to put it in diffe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627371", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can I make a custom pygtk tooltip stay on when the cursor is over it? Please look at the following snippet : import gtk def callback(widget, x, y, keyboard_mode, tooltip): hbox = gtk.HBox(False, 8) button = gtk.Button('Exit Tooltip') label = gtk.Label('Tooltip text') hbox.p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: No mouse-scrolling in Pane objects? The following Pane object does not scroll when the mouse wheel is used. Does anyone experience the same behaviour? Is it the default behaviour? Any idea why? Could it be platform-specific? CreateDialog[Pane[Column[Range[30]], {300, 200}, Scrollbars -> True]] My platform: Win7-64,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Difference between prefix/postfix increment in Objective-C method call? I understand the difference between prefix and postfix notation in plain C. I was, however, wondering if the same rules applied to Objective-C method calls like [myObject foo:++i]; and [myObject foo:i++]; Or is the "inner C expression" always ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Trying to get property of non-object php error Possible Duplicate: Call to a member function on a non-object - works localhost but not online don't know how to solve this problem, it's basic but can't find a solution. I use two files: connect.php and user.php. in connect.php is a Connect class: class Connect{ var...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Use external button for rich:fileUpload I'm using the component rich:fileUpload for uploading files to my server the problem is that those files go along with a form that the user fills, so I wanna use one external button for doing this. The user select the files to upload, fill the form and then click a "Submit" b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Weird dispatch_async memory behavior I have the following dispatch_async code: dispatch_async(openGLESContextQueue, ^{ [(EAGLView *)self.view setFramebuffer]; // Replace the implementation of this method to do your own custom drawing. static const GLfloat squareVertices[] = { -0...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Adding WHERE to a Simple LINQ Query returns zero results (but shouldn't) I've got the following query: var Query = db.ReportCommon .Where(x => x.ReportType == category) .Where(x => x.ReportDateTime >= dateStart) .Where(x => x.ReportDateTime < dateEnd); category is a variab...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Log4j in Websphere I recently take over a web application project using websphere and log4j running under AIX. To create a development environment, I setup all the components in windows, using eclipse to compile a WAR file and deploy it. All is working fine except that log file is not created. I changed the log file...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: UIView + Swipe Gestures info i've just implemented a swipe gesture in my UIView, and I want it to 'move' according to the gesture. Long story short, I need to get the current "X and Y" coordinates during the swipe, to move the UIView. Currently I have a "Swipe Gesture" linked to my UIView, an IBAction linked to the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Table alias in ActiveRecord? I have the following to find posts. @posts = Post.find(:all, :select => "DISTINCT *", :include => [:user, {:track => :artist}], :conditions => ["user_id IN (?) AND NOT track_id = ?", users, @track.id], :group => "track_id", :order => 'id desc', :limit => '5') I would like to add the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you make a picture bring up a print dialog box when clicked on? I have a coupon I have on my website and I want my users to click on the coupon and then be able to print it. Is there any way to do this? A: You'd need to forward your users on to a page containing just the image and add a bit of javascript if...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to set spinnerMode in codebehind I could not find a way to set spinnerMode in codebehind. Spinner sets it's spinnerMode property automatically as dialog by default theme. How do I set it while I'm creating a new spinner on code behind? A: in android >= 3.0 (API 11) you can use this : Spinner spinner = new Spin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: session expire time in CodeIgniter In CodeIgniter config.php file,we can set session expire time in seconds $config['sess_expiration'] = 300;. Now I have two part for my web site,user part and admin part.I need user session expires after 10 minutes(600sec) and admin session expires after 5 minutes(300sec) . Is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to use only one connection string accross one solution? I have a solution where I have more than 10 projects and in each project I need to connect to database. Is there anyway to centralize and get connection string only from one web.config file? A: Just put the connection strings inside the Web.config. Library...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Node js.. create a proxy server which will monitor & log the traffic I basically want to set up a proxy server using Node.js which will capture the outgoing requests and the incoming response and dump it in a file.. A: Googling "node proxy server" reveals some modules you could use. There's node-http-proxy and node...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rails how to view a txt file? How is it possiable to open an view a txt file with rails? Example I have test.txt: Test test test test Then I have my test.html.erb: Here I want to view test.txt A: You can either render an arbitrary file or use send_file: 3.1 or < 3.1 A: Another possibility is: Here is the test.tx...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to use basic authentication with httparty in a Rails app? The command line version of 'httparty' with basic authentication works simple and great: httparty -u username:password http://example.com/api/url But now I'm looking for the way I can add the basic auth to a HTTParty.get call from within a Rails app. Fir...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: Generating pure javascript/css files using JSF 1.2/Facelets I need to generate a pure JavaScript file or pure css file dynamically using JSF 1.2/Facelets. When I mean 'pure' I mean without any markup like xml, html open/close tags. Is this possible? If so what settings do I need to use for the facelets output mecha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to pass Enum as argument Possible Duplicate: Iterating through an enumeration in Silverlight? I came up with a handy little function that gets me the count of an enum (I know it won't work properly with all enums). Rather than hard coding the Enum into the function such that I have to write a seprate functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: iPhone iOS 4 UITimePicker force 24 hour view I got a UITimePicker in my app, and I want to use it to select a certain number of hours and minutes after a user event. (for example 3 hours 15 minutes after 7PM) This is why I want to show the date in 24 hour format, otherwise the user might get confused. Is there a way...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: load balancing purely dynamic web app on tomcat I have a web app which is purely dynamic in nature (think of a public API). So I do not need any static file serving or static file caching optimizations. I need to move from one tomcat to multiple ones, due performance and availability needs. I am using apache mod_pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Include JS files in a xhtml file that was included using ui:include I will ilustrate my question using an example: outerfile.xhtml: <h:head> <h:outputScript library="js" name="jquery-1.6.2.js" /> <h:outputScript library="js" name="outer.js" /> </h:head> <h:body> <h:panelGroup id="inner_panel"> <ui...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Cannot install rmagick gem in Lion: gems can't find ruby.h I've got a clean instal of Mac OS X Lion, and I've installed the Developer Tools. I'm trying to install some ruby gems and the ones which need native extensions aren't building. sudo gem install rmagick For example will not build. I get back this error: Bui...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: array of pointers to member functions: make it work In the following code I am getting the error: a value of type (double*)(const double& arg) const cannot be assigned to an entity of type pt2calculateA Any suggestions on how to make it work? class myClass { private: typedef double (*pt2calculateA)(double);...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: std::get_time and other locale functionality not working correctly on Windows In my attempts to make libc++ and its tests work on Windows, I have come to a problem I can't seem to wrap my head around. The following code is taken from libc++ test code, and passes on Mac (aand probably FreeBSD as well), but not with M...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Importing packages in Google App Engine I know this issue has been mentioned before and there were solutions for this. One of solutions that I tried with my problem was this one but it didn't work. My problem is with importing Jinja2 template package. It seems my app finds the root package folder successfully but th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JSoup get absolute url of an image with special characters i am working with JSoup and Android to get image urls from some site but some urls contains special characters like (é,è,à...) example : http://www.mysite.com/détail du jour.jpg the element.attr("abs:src") returns the same url as above till now no problem to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Drop down list inside iframe I just figure it out that if I put my drop down menu inside iframe, all my menus from it will be covered by iframe. The problem is - I dunno how long menu is gonna be, so I can't set the height, and actually I don't want to make it really long. Question: is it possible that drop down men...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Use of java image in pythonic OpenCV I'm fetching some images via HTTP: val ostream = new ByteArrayOutputStream() ImageIO.write(imageurl, imageType, ostream) val istream = new ByteArrayInputStream(ostream.toByteArray) (it is actually scala, but this code itself using Java libs, so there is no scala specific magic)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to switch between activity in android if one of activity is called by an handler My problem borns when i call Intent i = new Intent(c.getApplicationContext(),ActivityMulti.class); c.startActivity(i); It generates the exception mentioned below: 10-02 17:54:26.037: ERROR/AndroidRuntime(905...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to constraint one column with values from a column from another table? This isn't a big deal, but my OCD is acting up with the following problem in the database I'm creating. I'm not used to working with databases, but the data has to be stored somewhere... Problem I have two tables A and B. One of the datafiel...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Trying to create a re-usable text-box (text with a square background-colour) in SVG 1.1? I'm trying to create (what I thought would be!) a simple re-usable bit of SVG to show three lines of text, with a background colour - to simulate a 'post-it' note. I have found some useful code here to get the Bounds of the Text...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sharing SQL CE 4.0 db and Entity Framework 4.0 between web project and winforms project I have a web based application developed using MVC 3, Entity Framework 4.0 and SQL CE 4.0. It is used for showing off analysis results and data in charts on a web site. There is little to no data additions from web users in any...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cannot find class [org.apache.commons.dbcp.BasicDataSource] I am getting this exception when trying to start my spring MVC hibernate app. SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.CannotLoa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7627490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }