Search Results

Search found 8737 results on 350 pages for 'clear'.

Page 9/350 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Android Class which extends Dialog, how to clear TextViews before it is displayed

    - by wuntee
    I have a class that extends android.app.Dialog, the layout is done in an xml file, and the setup (button listeners, etc) is done on the onCreate method. My problem is that whenever the dialog is displayed, then dismissed, and displayed again, the Editable TextViews are still populated with the information that was displayed previously. What is the common way to clear these text fields? Remember - this is a separate class that extends Dialog - so there is no 'onDialogCreate' like Activity has. Or, perhaps I am extending the wrong class? There is just a lot of processing being done, and do not want to have all the code in the main Activity. I would like it to be in a separate Class. I tried to extend AlertDialog, but it does not create the border like Dialog does. Any help would be great. The dialog is shown via the Activity: protected Dialog onCreateDialog(int id) { switch(id){ case DIALOG_NEW_SAFE: return(new NewSafeDialog(this)); default: return(null); } }

    Read the article

  • Memcache won't flush or clear memory

    - by pedalpete
    I've been trying to clear my memcache as I'm noticing the storage taking up almost 30% of server memory when using ps -aux. So I ran the following php code. $memcache = new Memcache; $memcache-connect("localhost",11211); $memcache-flush(); print_r($memcache-getStats()); This results in the output of ( [pid] = 4936 [uptime] = 27318915 [time] = 1255318611 [version] = 1.2.2 [pointer_size] = 64 [rusage_user] = 9.659531 [rusage_system] = 49.770433 [curr_items] = 57864 [total_items] = 128246 [bytes] = 1931734247 [curr_connections] = 1 [total_connections] = 128488 [connection_structures] = 17 [cmd_get] = 170288 [cmd_set] = 128246 [get_hits] = 45464 [get_misses] = 124824 [evictions] = 1009 [bytes_read] = 5607431213 [bytes_written] = 1806543589 [limit_maxbytes] = 2147483648 [threads] = 1 ) This should be fairly basic, but clearly, I'm missing something.

    Read the article

  • To make the drawn text clear

    - by user1758835
    I have written the code to draw text on the image and to save the image,But the text which I am drawing is looking blur on the image.What modifications need to do to make it clear,Or if there is any other way to draw text on image in android Canvas canvas = new Canvas(photo); Typeface tf = Typeface.create(topaste, Typeface.BOLD); Paint paint = new Paint(); paint.setStyle(Style.FILL); paint.setTypeface(tf); paint.setColor(Color.WHITE); paint.setStrokeWidth(12); canvas.drawBitmap(photo, 0, 0, paint); canvas.drawText(topaste, 15, 120, paint); image.setImageBitmap(photo);

    Read the article

  • How to clear the memory allocated for Customized Exception

    - by ilan
    Hi All I have a customized exception class. say class CustomExcep{}; My Application is a middleware made of C++. It is a webservice which is used for the communication between Java based web Front-end and the DCE Backend. whenever the DCE Backend is not running or down due to some core dumps, the application throws the CustomExcep. It's like this. CustomExcep * exc = new CustomExcep(); throw exc; I am unable to use the stack memory for this as it leads to some run-time exceptions. I need a solution to clear the memory used by this CustomException. Can we use Templates for this purpose? Any help would be appreciated. Thanks in Advance.

    Read the article

  • How to draw a transparent stroke (or anyway clear part of an image) on the iPhone

    - by devguy
    I have a small app that allows the user to draw on the screen with the finger. Yes, nothing original, but it's part of something larger :) I have a UIImageView where the user draws, by creating a CGContextRef and the various CG draw functions. I primarily draw strokes/lines with the function CGContextAddLineToPoint Now the problem is this: the user can draw lines of various colors. I want to give him the ability to use a "rubber" tool to delete some part of the image drawn so far, with the finger. I initially did this by using a white color for the stroke (set with the CGContextSetRGBStrokeColor function) but it did't work out...because I discovered later that the UIImage on the UIImageView was actually with transparent background, not white...so I would end up with a transparent image with white lines on it! Is there anyway to set a "transparent" stroke color...or is there any other way to clear the content of the CGContextRef under the user's finger, when he moves it? Thanks

    Read the article

  • Postgres: clear entire database before re-creating / re-populating from bash script

    - by Hoff
    hi folks, I'm writing a shell script (will become a cronjob) that will: 1: dump my production database 2: import the dump into my development database Between step 1 and 2, I need to clear the development database (drop all tables?). How is this best accomplished from a shell script? So far, it looks like this: #!/bin/bash time=`date '+%Y'-'%m'-'%d'` # 1. export(dump) the current production database pg_dump -U production_db_name > /backup/dir/backup-${time}.sql # missing step: drop all tables from development database so it can be re-populated # 2. load the backup into the development database psql -U development_db_name < backup/dir/backup-${time}.sql Many thanks in advance! Martin

    Read the article

  • min.js to clear source

    - by dole
    Hi there As far i know until now, the min version of a .js(javascript) file is obtaining by removing the unncessary blank spaces and comments, in order to reduce the file size. My questions are: How can I convert a min.js file into a clear, easy readable .js file Besides, size(&and speed) are there any other advtages of the min.js file. the js files can be encripted? can js be infected. I think the answer is yes, so the question is how to protect the .js files from infections? Only the first question is most important and I'm looking for help on it. TY

    Read the article

  • Clear Input onFocus with Google Custom Search

    - by Wes
    I'm moving a sites search over to google custom search. The old input for text looks like this: <input type="text" value="Search this website..." name="s" id="searchbox" onfocus="if (this.value == 'Search this website...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search this website...';}" /> Now I need to Have the attr 'name' as 'q', like so: <input type="text" value="Search this website..." name="q" id="searchbox" onfocus="if (this.value == 'Search this website...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search this website...';}" /> The odd thing is that when I swap the name over to q, I'm unable to clear the search box on focus. Am I missing something super easy?

    Read the article

  • SQL Script to clear database tables.

    - by pencilslate
    I have a need to take backup of a SQL Server Db with tons of data in it and import into another environment for updating and testing. Since, i am not interested in the data, i just want to recreate the schema on my other server. There is an option called 'Generate Script', but is throwing errors running them on the target server. Curious, if anyone attempted to write a SQL script that would run through all the tables in the db and clear the rows, thereby i could just create the schema backup as .bak file and restore it into another server.

    Read the article

  • UItableviewcell makes label's background clear when highlighted

    - by Jonathan
    I have a UIlabel on a UItabelViewCell, which I've created programmatically (ie not a nib or a subclass). When the cell is highlighted (goes blue) it makes all the background colors of the UILabels turn clear I have 2 UILabels where I don't want this to be the case. Currently I m using UIImageViews behind the UILabel's to make it look like the background color doesn't change. But this seems an inefficient way to do it. How can i stop certain UILabel's background color changing when the TableViewCell is highlighted?

    Read the article

  • How to clear a cookie programatically?

    - by peter
    Hi All, I am using silverlight unit tests to test an important part of our site. Is it possible to clear cookies before each unit test runs? The problem is that if I do this, HtmlPage.Document.Cookies = ""; It doesn't work. If the cookie already was this, key = value I can do this, HtmlPage.Document.Cookies = "key="; It kind of clears it out, but the string "key" is still part of the cookie. Any ideas? Are there any other classes in .NET that deal with cookies? The functionality seems quite limited when I am dealing with more complicated scenarios.

    Read the article

  • clear input textbox value on load

    - by user544079
    I have the following form which is getting pre populated with values on load. I want to have empty input boxes on load using Javascript. However I do not have access to the <body> tag so <body onload="" will not work here. Is there any other way to clear the form fields on load? <form method="POST" action=""> <input name="username" id="user" value="" /><br /> <input name="pwd" id="pass" value="" /> <input type="submit" value="Go" /> </form>

    Read the article

  • Clear all currently defined vim macros

    - by Simon Walker
    Hi everyone I have a vim macro that I keep mistyping, usually when I'm trying to save something so I do it quickly and I can't work out what keys I pressed. It is annoying as it pastes some irrelevant bash code into my file so I have to undo the erroneous pasting which also undos the last thing I typed that I do want. I was looking for a way to either list the currently defined macros (so I can redefine the offending one), or a way to clear out them completely. I only use macros in the very short term so I don't mind losing them all. Cheers

    Read the article

  • clear cached javascript includes in FireFox

    - by user151841
    I'm working on javascript for a site, developing with FireFox, and when I refresh the page, I don't see my changes. The javascript file is in an external file. I reloaded and refreshed the page several times, but the old javascript file was still cached. Finally, I loaded the javascript page in the browser directly, saw the old script, hit 'reload', and saw my changes. How can I clear cached external javascript files? I'll need to know this also when I tell the client that the changes are made, so that they aren't seeing the old cached functionality.

    Read the article

  • Android SharedPreferences set True or False - Clear on App Exit

    - by KickingLettuce
    I want a notification to pop up when an app opens. But once User dismisses, I don't want it to come back again, even if they go back to the same activity. But when the app exits, and they come back later, I want same dialog notification to pop up (prompting user to login). So basically... boolean b = true; if (b == true) { // show dialog b = false; } I simply want var b to save state but clear on exit.

    Read the article

  • Merge arrow in clear case

    - by cheiav
    Hi, I have to merge all objects from a sub branch to main branch recursively. I would like to merge manually by check in the code from sub branch to main branch instead of using merge command in clear case. So after the check in into the main branch I would like to draw arrow recursively to all my objects. ic from sub branch to main branch I have used this command cleartool mkhlink -unidir Merge <sub branch path>>@@/main/<<sub branch>> <<main brach path>>@@/main/LATEST But when I dit it, it is drawing the arrow for the directory only not for all contains of the directory. Please suggest how to draw the arrow recursively from sub branch to main branch objects. Thanks in advance

    Read the article

  • Android SurfaceView/Canvas flickering after trying to clear it

    - by Mark D
    So I am trying to clear the Canvas using canvas.drawColor(Color.BLACK) but if I just call this once, the display flickers and displays the old drawing which should have been covered up by the drawColor. Here is the important bits of my code - public void update() { //This method is called by a Thread Canvas canvas = holder.lockCanvas(null); if (canvas != null) { onDraw(canvas); } holder.unlockCanvasAndPost(canvas); } @Override protected void onDraw(Canvas canvas) { if (toClear) { canvas.drawColor(Color.BLACK); //if this is not set to change back to false, it does not flicker toClear = false; } //Draw some objects that are moving around } public void clearScreen() { //This method is called when the user pressed a button toClear = true; } After Googling around a litte, I heard about double buffering but came to the understanding that lockCanvas() and unlockCanvasAndPost() should handle this for me. What is going wrong here?

    Read the article

  • Correct way to clear/release an array of arrays

    - by iFloh
    And again my array of arrays .... When I have an array "x" that contains multiple instances of an array "y", how do I clear/release it without risking memory leaks? are the following calls sufficient? (a) clearing the array [x removeAllObjects]; (b) releasing the array [x release]; or do I need to enumerate the array, such as: (c) clearing the array for(int i=0;i<x.count;i++) [[x objectAtIndex:i] release]; [x removeAllObjects]; (d) releasing the array for(int i=0;i<x.count;i++) [[x objectAtIndex:i] release]; [x release]; thanks in advance

    Read the article

  • How to clear a textbox based on a checkbox using Javascript

    - by LoftyWofty
    I am trying to code in javascript (to avoid validation triggers at the server) to clear a text box if the checkbox associated with it is unchecked. I have this code ... <input type="checkbox" id="chkOTHER" onclick="document.getElementById('txtOtherFlag').value='';" /> <asp:TextBox ID="txtOtherFlag" runat="server" AutoPostBack="True" CausesValidation="True" ValidationGroup="ValidationGroup1"></asp:TextBox> The problem is the Javascript inside the checkbox is not triggering to remove the value in the text box. Even if this worked, it's incorrect as it would blank out the text box every time the checkbox is triggered whether it is checked or not. I need to resolve this in the client side only. Thank you

    Read the article

  • In WPF: Children.Remove or Children.Clear doesn't free objects

    - by Bart Roozendaal
    I create some UIElements from code behind and was anticipating the garbage collection to clear up stuff. However, the objects are not free-ed at the time I expected it. I was expecting them to be freeed at RemoveAt(0), but they are only freed at the end of the program. How can I make the objects be freed when removed from the Children collection of the Canvas? <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" MouseDown="Window_MouseDown"> <Grid> <Canvas x:Name="main" /> </Grid> </Window> The code behind is: public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Window_MouseDown(object sender, MouseButtonEventArgs e) { if (main.Children.Count == 0) main.Children.Add(new MyControl() { Background = Brushes.Yellow, Width = 100, Height = 50 }); else main.Children.RemoveAt(0); } } public class MyControl : UserControl { ~MyControl() { Debug.WriteLine("Goodbye"); } }

    Read the article

  • Pseudocode: a clear definition?

    - by Cian E
    The following code is an example of what I think would qualify as pseudocode, since it does not execute in any language but the logic is correct. string checkRubric(gpa, major) bool brake = false num lastRange num rangeCounter string assignment = "unassigned" array bus['business']= array('person a'=>array(0, 2.9), 'person b'=>array(3, 4)) array cis['computer science']= array('person c'=>array(0, 2.9), 'person d'=>array(3, 4)) array lib['english']= array('person e'=>array(0, 4)) array rubric = array(bus, cis, lib) foreach (rubric as fieldAr) foreach (fieldAr as field => advisorAr) if (major == field) foreach (advisorAr as advisor => gpaRangeAr) rangeCounter = 0 foreach (gpaRangeAr as gpaValue) if (rangeCounter < 1) lastRange = gpaValue else if (gpa >= lastRange && gpa <= gpaValue) assignment = advisor brake = true break endif rangeCounter++ endforeach if (brake == true) break endif endforeach if (brake == true) break endif endif endforeach if (brake == true) break endif endforeach return assignment For the past couple of weeks I've been trying to create a clear definition of what pseudocode actually is. Is it relative to the programmer or is there an actual clearcut syntax? I say pseudocode is any code that does not execute, how about you? Thanks (links to this subject welcome)

    Read the article

  • Clear UIWebView content upon dismissal of modal view (iPhone OS 3.0)

    - by Ricky
    I currently have a UIWebView that is displayed within a modal view. It is basically a detail view that provides a view of a page when the user clicks a link. When the view is dismissed and then brought up again (when the user clicks another link), the previously-loaded content is still visible and the new content loads "on top" of the last content. This makes sense because the instance of the UIWebView persists between sessions and is only released when the memory is needed. However, I would like to completely clear the UIWebView when the modal view is dismissed so that 1) content is cleared and 2) memory is freed. Thus far my research and attempts have not found an answer. These links haven't worked for me: http://stackoverflow.com/questions/2184688/is-it-possible-to-free-memory-of-uiwebview http://stackoverflow.com/questions/2311564/reused-uiwebview-showing-previous-loaded-content-for-a-brief-second-on-iphone I've tried [[NSURLCache sharedURLCache] removeAllCachedResponses]; and setting the webView to nil and manually releasing the webView upon modal-view-dismiss to no avail. Any thoughts from the wizened masses?

    Read the article

  • Changing UITableViewCell textLabel background color to clear

    - by SorinA.
    In my app i have a table view with customViewCells. i subclassed the UITableViewCell class and added an image that will load async and for the text i use cell.textLabel.text = @"someThext". for the cells the background color is set alternatively to [UIColor darkGrayColor] and whitecolor. When i run the app in the simulator and on the pone the textLabel of the cell has the background white. I want to set it to be clear, because i want the background color of the cell to be full not a strip then white then another strip. in the init method of my custom cell i added hoping that the white will turn into red but it doesn't have any effect. [self.textLabel setBackgroundColor:[UIColor redColor]]; i tried also self.textLabel.backgroundColor = [UIColor redColor]; but this also didn't work...if i add a UILabel as a subview the background color of the label can be set..but i don't want to do that because when i rotate the phone i want my labels to auto enlarge... any ideas why setting the background color of cell.textLabel doesn't work? thank you

    Read the article

  • How to hide check all, clear all checkbox

    - by Kalpana
    I am having check box in the column header. The function of this is to check or uncheck all the check boxes in that column.If the row check box is checked and say delete, that row can be deleted from the dataTable. If the row object is used in some other table as a foreign key i put '-' in that row instead of check box which indicates that row cannot be deletable. In these cases if all the row has '-" , there is no need to have the header check box. How to programatically hide this 'Check All | Clear All' check box, if there is nothing to be removed. It would be even preferable to hide the 'Remove' button if there is no selection to be made. What are the best practices to address the above scenario. I have attached the javascript which I am using. <script type="text/javascript"> var tableId = '#user\\:userList'; jQuery(document).ready(function() { jQuery('#selectAll').click(function() { jQuery(tableId).find("input[type='checkbox']").attr('checked', jQuery('#selectAll').is(':checked')); }); }); </script>

    Read the article

  • Proggraming a VPN, Authontication stage - RFC not clear enough

    - by John
    I have a custom build of a unix OS. My task: Adding an IPSec to the OS. I am working on Phase I, done sending the first 2 packets. what I am trying to do now is making the Identefication Payload. I've been reading RFC 2409 (Apendix B) which discuss the keying materials (SKEYID, SKEYID_d, SKEYID_a, SKEYID_e and the IV making). Now, I use SHA1 for authontication and thus I use HMAC-SHA1 & my encryption algorithem is AES 256bit. The real problem is that the RFC is not clear enough of what should I do regarding the PRF. It says: "Use of negotiated PRFs may require the PRF output to be expanded due to the PRF feedback mechanism employed by this document." I use SHA1, does it mean I do not negotiate a PRF? In my opinion, AES is the only algorithm that needs expention (a fixed length of 256bit), so, do i need to expand only the SKEYID_e? If you happen to know a clearer, though relible, source then the RFC please post a link. Thanks in advance!

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >