Search Results

Search found 902 results on 37 pages for 'gray fox'.

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

  • ListView selection issue...Using onItemClick(AdapterView<?> parent, View view, ...)

    - by searchMaker
    The problem I hope to resolve here is that when I click on one item in the ListView that item's background changes to light gray, but when I continue to scroll through the list every 4th item has the background changed to light gray even though those other items have not been clicked. How do I make only the item I clicked be effected by the click? ListView lv = (ListView) findViewById(R.id.resultsList); lv.setAdapter(new ArrayAdapter(this, R.layout.resultitem, (String[])labelList.toArray(new String[labelList.size()]))); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View view, int position, long id) { TextView tv = (TextView)view.findViewById(R.id.result); tv.setBackgroundColor(Color.LTGRAY); tv.setTextColor(Color.BLACK);

    Read the article

  • Java enums: Gathering info from another enums

    - by Samuel Carrijo
    I made a similar question a few days ago, but now I have new requirements, and new challenges =). As usual, I'm using the animal enums for didactic purposes, once I don't want to explain domain-specific stuff I have a basic enum of animals, which is used by the whole zoo (I can add stuff to it, but must keep compatibility): public enum Animal { DOG, ELEPHANT, WHALE, SHRIMP, BIRD, GIRAFFE; } I need to categorize them in a few, non-related categories, like gray animals (whale (my whale is gray) and elephant), small animals (bird, shrimp and dog), sea animals (whale and shrimp). I could, as suggested in my previous questions, add a lot of booleans, like isGray, isSmall and isFromSea, but I'd like an approach where I could keep this somewhere else (so my enum doesn't need to know much). Something like: public enum Animal { DOG, ELEPHANT, WHALE, SHRIMP, BIRD, GIRAFFE; public boolean isGray() { // What comes here? } } Somewhere else public enum GrayAnimal { WHALE, ELEPHANT; } How is this possible? Am I requesting too much from Java?

    Read the article

  • dojo.require() prevents Firefox from rendering the page

    - by Eduard Wirch
    Im experiencing strange behavior with Firefox and Dojo. I have a html page with these lines in the <head> section: ... <script type="text/javascript" src="dojo.js" djconfig="parseOnLoad: true, locale: 'de'"></script> <script type="text/javascript"> dojo.require("dojo.number"); </script> ... Sometimes the page loads normally. But sometimes it won't. Firefox will fetch the whole html page but not render it. I see only a gray window. After some experiments I figured out that the rendering problem has something to do with the load time of the html. Firefox starts evaluating the html page while loading it. If the page takes too long to load the above javascript will be executed BEFORE the html finishes loading. If this happens I'll get the gray window. Advising Firefox to show me the source code of the page will display the correct complete html code. BUT: if I save the page to disk (File-Save Page As...) the html code will be truncated and the above part will look like this: ... <script type="text/javascript" src="dojo.js" djconfig="parseOnLoad: true, locale: 'de'"></script> <script type="text/javascript"> dojo.require("dojo.number"); </script></head><body></body></html> This explains why I get to see a gray area. But why does this code appear there? I assume the require() method of Dojo does something "evil". But I can't figure out what. There is no write.document("</head><body></body></html>"); in the Dojo code. I checked for it. The problem would be fixed, if I'd place the dojo.require("dojo.number"); statement in the window.load event: <script type="text/javascript"> window.load=function() { dojo.require("dojo.number"); } </script> But I'm curious why this happens. Is there a Javasctript function which forces Firefox to stop evaluating the page? Does Dojo do somethig "bad"? Can anyone explain this behavior to me? EDIT: Dojo 1.3.1, no JS errors or warnings.

    Read the article

  • Android Textview Italic and wrap_contents

    - by Faisal khan
    I am using 3 italic textviews with different colors <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:id="@+id/submittedBy" android:paddingTop="10dip"> <ImageView android:id="@+id/subByImg" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="left" android:layout_gravity="bottom" android:src="@drawable/submitted_by_arrow"/> <TextView android:id="@+id/submitLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="left" android:text="Submitted by" android:textStyle="italic" android:textSize="12sp" android:textColor="@color/gray" android:paddingLeft="5dip"/> <TextView android:id="@+id/submitName" android:textStyle="italic" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="12sp" android:textColor="@color/maroon_dark" android:paddingLeft="10dip"/> <TextView android:id="@+id/submitByDate" android:textStyle="italic" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="left" android:textSize="12sp" android:textColor="@color/gray" android:paddingLeft="10dip"/> </LinearLayout> I wonder every last character is not displaying properly specially name displayed in the middle is "Dan Buckland" and it it is missing last character looks like "Dan Bucklano" Also tell me pls how can have textview italic and bold both..

    Read the article

  • UISearchbar clearButton forces the keyboard to appear

    - by DASKAjA
    I have a UISearchBar which acts as a live filter for a table view. When the keyboard is dismissed via endEditing:, the query text and the gray circular "clear" button remain. From here, if I tap the gray "clear" button the keyboard reappears as the text is cleared. How do I prevent this? If the keyboard is not currently open I want that button to clear the text without reopening the keyboard. There is a protocol method that gets called when I tap the clear button. But sending the UISearchBar a resignFirstResponder message doesn't have any effect on the keyboard.

    Read the article

  • TabWidget white foreground color?

    - by Kurian
    I don't know what I did but for a period of time my TabWidget had white colored tabs which looked really nice. I never set a theme or background/foreground color in my project at all. The next time I compiled it it reverted back to the gray tabs. My application is using the default dark theme. Even if I set the application theme to light, the tabs are still gray. So obviously it was something else that changed the tabs' color. Anyone know how to do this?

    Read the article

  • css dropdownlist /combox <select

    - by teki
    i am using bassistance.de form validation please look at the demo here i have few dropdownlist and when it validates i want that dropdonwlist to be dotted with red which is not happening and i have even add the .css line please see below. please have a look at the demo to get an idea what i am asking for. div.error { display: none; } input { border: 1px solid black; } input.checkbox { border: none } input:focus { border: 1px dotted black; } input.error { border: 1px dotted red; } textarea.error { border: 1px dotted red; } **select.error { border: 1px dotted red; }** form.cmxform .gray * { color: gray; } PS: some how it ignores "select.error..."

    Read the article

  • Why does my JButton look differently of different computers?

    - by Roman
    I use JButtons in my application. They need to have different colors. First I used that btn.setBackground(col);. It works on my computer and on another computer my button just gray (not red, as it's supposed to be). Trying to solve this problem I decided to use images. I do it in the following way: tmp = new JButton(newIcon); Again, it works fine on my computer and on another computer I see just gray buttons. Does anybody have any ideas what can be the reason of the problem and how it can be solved? I heard it can be related to "look-and-feel of the native system". But I do not know what it means and what should I do if it is the case? Can anybody pleas, help me with that?

    Read the article

  • FLEX: customized tag Cloud, how to compute positioning and distances

    - by Patrick
    hi, I want to build a tag cloud like this one in my Flex application. See image: http://dl.dropbox.com/u/72686/tagCloud.png At the moment I have the tags (that are mx.controls.LinkButtons) added at the same position and having different sizes according to values (stored in an ArrayComponent). In my visualization, the orange tags are supposed to be listed vertically in the middle. The gray tags should be at different distances (according to stored numeric values). I want to avoid overlapping and cluttering. How do you suggest to compute x and y of the gray tags taking care about: the distances from orange tags avoid overlapping between them thanks

    Read the article

  • getSelection() by Double Click or manual selection is not the same

    - by sanceray3
    Hi all, I allow me to ask a question, because I have a little probleme with an function which returns me the parent of a selection. $('input[type=button].btn_transform').click(function(){ var selectionObj = getSelected();//Function which gives me selection var theParent=selectionObj.anchorNode.parentNode; alert (theParent); }) For example with this sentence : "the cat is <strong>gray</strong>." If I select manually the word "gray" and click on my button, the function returns me [object HTMLSpanElement]. But if I select the same word by double clicking, the function returns me [object HTMLParagraphElement]. Do you know why ? Thanks a lot.

    Read the article

  • can i change the black background of an iphone app?

    - by Cristi Balu?a
    My app is structured like this, a single MainWindow with window backgroundColor to white(which doesn't appear anywhere anyway), and in this nib i have a UINavigationController which doesn't seems to have a backgroundColor. Any view controller is added from code and made from code and they have a gray background. What happens is that when i rotate the iphone and the views are rotating as well, i see a black background under my views. Can this be changed? It looks ugly especially if i have a photo that is rotating in the same time with my gray background.

    Read the article

  • Why am I getting two section headers on this grouped table?

    - by Andy
    I'm sure this is some easy-to-fix issue that I've missed, but I can't figure it out. I've got a grouped table view with 3 sections. I'm using the following code to generate section headers: -(NSString*)tableView:(UITableView*)tableView titleForHeaderInSection:(NSInteger)section { if (section == 0) { NSString *header = @"Header 1"; return header; } if (section == 1) { NSString *header = @"Header 2"; return header; } else { NSString *header = @"Header 3"; return header; } } When my table is displayed, there are two headers for each section - one with white text on a gray bar that stretches across the screen (like the letter separators in the Contacts app), and one in gray text on the table background (which is the one I want). Both headers have identical text. Where is the first header coming from?

    Read the article

  • Box with multiple borders

    - by Mambley
    Hello, I am trying to code and style a box which will contain a post. My problem is with multiple borders (i guess), trying to find the best way to code this, i prefer semantic HTML5 and CSS3, but if there is no other way, i can do "old style" with 3 divs (top, center, bottom) with css background: url..., can anyone give me some lights please? If you please check the following url, you can check what i need to accomplish. http://dl.dropbox.com/u/3696224/postBox.jpg If you notice it has: one border around all the box with a dark gray (#cccccc); (border) a small space between that border and other light gray (#f7f7f7), almost white; and only then the content with a white background; Any suggestions? Very sorry for English grammar, thanks in advance. Regards PS - I almost forgot, i don't know is if needed or not, but the all around the box i have a box-shadow (i know how to do this part)

    Read the article

  • Get HTML DOM with CSS

    - by 2x2p1p
    CSS can apply styles in elements through one ID, class or pseudo-selector, but I would like to get the HTML tree, something like in javascript: <script type = "text/javascript"> window.onload = function () { var div = document.getElementsByTagName ("div"); div[0].style.backgroundColor = "gray"; div[0].style.padding = "20px"; } </script> So for example: <style type = "text/css"> div[0] { /* Wrong but i tried :( */ background-color: gray; padding: 20px; } </style> <div > <div>...</div> </div> I'm tired of assign IDs to millions and millions of elements; is there a way to do this?

    Read the article

  • My Spinner Widgets look different on different devices. How can I define a own Spinner that looks th

    - by Janusz
    I use this code to generate a spinner in my app: subCatAdapter = new ArrayAdapter<Subcategory>(this, android.R.layout.simple_spinner_item, subCategories); subCatAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); On my device (Motorola Milestone) and in the emulator this looks like the standard gray spinner widget. On of my colleagues uses a Motorola Backflip and on his device the Spinner is black. Now its very hard to read the font in the spinner. What do I have to do to use my own view for the spinner? I don't mind to have the gray spinner on all devices, but it should always look the same on all devices.

    Read the article

  • Three State Treeview Windows Forms

    - by alhambraeidos
    Hello everybody people, One of the frustrations with the standard TreeView is that you can't show a partial selection to indicate that some of the children are selected. A partial selection in a complex tree allows the user to easily determine where the selections are, even if the tree is not completely expanded. A similar idea is used in manu backup programs to allow the user to select the files to be backed up. Does anyone know of a way to make the checks in a treeview checkbox gray? I want to gray the check of a parent node when some (but not all) of its child nodes are checked. Kinda like what you see when you are selecting options to install during a software installation. I have seen several post, but is older (2000, 2007 year). I now, in 2010, the better answer possible is required. I use VS 2008 . Net 3.5 , Windows Forms Thanks in advanced, greetings

    Read the article

  • Computer graphics: programatically create duotone (or separations)

    - by TarGz
    There are special kind of images called "duotone" which have just two channels. It is mostly used when you want to achive higher quality reproduction - have a printing press with two colors (black , gray). My question is, I have normal gray-scale image, how to convert it to duotone? I know I can tweak the curves in Photoshop - this is not what I'm asking, rather than how to do it programmatically? Perhaps there is a library which can do just that? What about "dot gain compensation"? "Total ink coverage"?

    Read the article

  • Advanced search functionality

    - by Chris
    I have a website with a jQuery based autocomplete search functionality which works great. Currently though I have just one search box for all categories, what I want is for someone to be able to type in, say for example, dorian gray dvd (in any order) which will search for dorian gray within the dvd category. What this will require then is a bit of magic on the server side to figure out if any of the words are category keywords, and then limit the search by that. What is the best (and quickest) way to do this in PHP / MySQL? I currently have a few trains of thought Search the category table for matches and perhaps order the results by that. Or split up the search terms into an array and separately search the categories for that for a match. Another thought I just had is to concat the category title to the dvd title in the database and match against that, or something similar... but this sounds computationally expensive? Any advice?

    Read the article

  • how to send the value of "text box" even if it is grayed out/disabled in HTML?

    - by mujahid
    I m doing like this in java script : document.getElementById(XYZ).value = '32768'; document.getElementById(ABC).value = '32768 '; document.getElementById(XYZ).disabled = true; document.getElementById(ABC).disabled = true; when i m pressing submit it gives "0" as value. BUT i want to retrieve above values. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ readOnly is an option but it changes the FONT COLOUR from gray to black, but i want gray colored text in readOnly textbox any help!!!! thanx !!!

    Read the article

  • Strings in .NET are Enumerable

    - by Scott Dorman
    It seems like there is always some confusion concerning strings in .NET. This is both from developers who are new to the Framework and those that have been working with it for quite some time. Strings in the .NET Framework are represented by the System.String class, which encapsulates the data manipulation, sorting, and searching methods you most commonly perform on string data. In the .NET Framework, you can use System.String (which is the actual type name or the language alias (for C#, string). They are equivalent so use whichever naming convention you prefer but be consistent. Common usage (and my preference) is to use the language alias (string) when referring to the data type and String (the actual type name) when accessing the static members of the class. Many mainstream programming languages (like C and C++) treat strings as a null terminated array of characters. The .NET Framework, however, treats strings as an immutable sequence of Unicode characters which cannot be modified after it has been created. Because strings are immutable, all operations which modify the string contents are actually creating new string instances and returning those. They never modify the original string data. There is one important word in the preceding paragraph which many people tend to miss: sequence. In .NET, strings are treated as a sequence…in fact, they are treated as an enumerable sequence. This can be verified if you look at the class declaration for System.String, as seen below: // Summary:// Represents text as a series of Unicode characters.public sealed class String : IEnumerable, IComparable, IComparable<string>, IEquatable<string> The first interface that String implements is IEnumerable, which has the following definition: // Summary:// Exposes the enumerator, which supports a simple iteration over a non-generic// collection.public interface IEnumerable{ // Summary: // Returns an enumerator that iterates through a collection. // // Returns: // An System.Collections.IEnumerator object that can be used to iterate through // the collection. IEnumerator GetEnumerator();} As a side note, System.Array also implements IEnumerable. Why is that important to know? Simply put, it means that any operation you can perform on an array can also be performed on a string. This allows you to write code such as the following: string s = "The quick brown fox";foreach (var c in s){ System.Diagnostics.Debug.WriteLine(c);}for (int i = 0; i < s.Length; i++){ System.Diagnostics.Debug.WriteLine(s[i]);} If you executed those lines of code in a running application, you would see the following output in the Visual Studio Output window: In the case of a string, these enumerable or array operations return a char (System.Char) rather than a string. That might lead you to believe that you can get around the string immutability restriction by simply treating strings as an array and assigning a new character to a specific index location inside the string, like this: string s = "The quick brown fox";s[2] = 'a';   However, if you were to write such code, the compiler will promptly tell you that you can’t do it: This preserves the notion that strings are immutable and cannot be changed once they are created. (Incidentally, there is no built in way to replace a single character like this. It can be done but it would require converting the string to a character array, changing the appropriate indexed location, and then creating a new string.)

    Read the article

  • Flex textarea control not updating properly.

    - by ielashi
    I am writing a flex application that involves modifying a textarea very frequently. I have encountered issues with the textarea sometimes not displaying my modifications. The following actionscript code illustrates my problem: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600"> <mx:TextArea x="82" y="36" width="354" height="291" id="textArea" creationComplete="initApp()"/> <mx:Script> <![CDATA[ private var testSentence:String = "The big brown fox jumps over the lazy dog."; private var testCounter:int = 0; private function initApp():void { var timer:Timer = new Timer(10); timer.addEventListener(TimerEvent.TIMER, playSentence); timer.start(); } private function playSentence(event:TimerEvent):void { textArea.editable = false; if (testCounter == testSentence.length) { testCounter = 0; textArea.text += "\n"; } else { textArea.text += testSentence.charAt(testCounter++); } textArea.editable = true; } ]]> </mx:Script> </mx:Application> When you run the above code in a flex project, it should repeatedly print, character by character, the sentence "The big brown fox jumps over the lazy dog.". But, if you are typing into the textarea at the same time, you will notice the text the timer prints is distorted. I am really curious as to why this happens. The single-threaded nature of flex and disabling user input for the textarea when I make modifications should prevent this from happening, but for some reason this doesn't seem to be working. I must note too that, when running the timer at larger intervals (around 100ms) it seems to work perfectly, so I am tempted to think it's some kind of synchronization issue in the internals of the flex framework. Any ideas on what could be causing the problem?

    Read the article

  • How can I merge multiple Compass Resources into one, with one score?

    - by Brent Fisher
    I am trying to integrate compass into my platform using the JDBC ResultSetToResourceMapping. What I want to do is set it up so that I could have multiple result set mappings, tied to one Resource, that produces one result, with one score, and a merged score. I have tried to trick Compass into doing this by mapping the same id across them, even though the property fields are different, but it just ends up giving me separate hits for each. E.g. I have the following Data Model, Cases and Comments. One case might have several comments. Say I search for a term that appears in multiple comments. Right now, I a hit for each one, each with a different score. Is there a way that I could merge or aggregate those hits into one hit? Say, instead of Score Entity ID Snippets 100.0% Case 3558 ... The fox jumped over the lazy dog ... 60.0% Case 3558 ... In Alabama today, three jumping turtles were ... 25.0% Case 3558 ... Three jumpers fled the scene... I get Score Entity ID Snippets 100.0% Case 3558 The fox jumped over the lazy dog ...In Alabama today, three jumping turtles were ... Three jumpers fled the scene... Where the latter score is an aggregated score.

    Read the article

  • Table cell doesn't obey vertical-align CSS declaration when it contains a floated element

    - by mikez302
    I am trying to create a table, where each cell contains a big floated h1 on the left side, and a larger amount of small text to the right of the big text, vertically centered. However, the small text is showing up at the top of each cell, despite that it has a "vertical-align: middle" declaration. When I remove the big floated element, everything looks fine. I tested it in recent versions of IE, Firefox, and Safari, and this happened in every case. Why is this happening? Does anyone know of a way around it? Here is an example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <title>vertical-align test</title> <style type="text/css"> td { border: solid black 1px; vertical-align: middle; font-size: 12px} h1 { font-size: 40px; float: left} </style> </head> <body> <table> <tr> <td><h1>1</h1>The quick brown fox jumps over the lazy dog.</td> <td>The quick brown fox jumps over the lazy dog.</td> </tr> </table> </body></html> Notice that the small text in the first cell is at the top for some reason, but the text in the 2nd cell is vertically centered.

    Read the article

  • Time with and without OpenMP

    - by was
    I have a question.. I tried to improve a well known program algorithm in C, FOX algorithm for matrix multiplication.. relative link without openMP: (http://web.mst.edu/~ercal/387/MPI/ppmpi_c/chap07/fox.c). The initial program had only MPI and I tried to insert openMP in the matrix multiplication method, in order to improve the time of computation: (This program runs in a cluster and computers have 2 cores, thus I created 2 threads.) The problem is that there is no difference of time, with and without openMP. I observed that using openMP sometimes, time is equivalent or greater than the time without openMP. I tried to multiply two 600x600 matrices. void Local_matrix_multiply( LOCAL_MATRIX_T* local_A /* in */, LOCAL_MATRIX_T* local_B /* in */, LOCAL_MATRIX_T* local_C /* out */) { int i, j, k; chunk = CHUNKSIZE; // 100 #pragma omp parallel shared(local_A, local_B, local_C, chunk, nthreads) private(i,j,k,tid) num_threads(2) { /* tid = omp_get_thread_num(); if(tid == 0){ nthreads = omp_get_num_threads(); printf("O Pollaplasiamos pinakwn ksekina me %d threads\n", nthreads); } printf("Thread %d use the matrix: \n", tid); */ #pragma omp for schedule(static, chunk) for (i = 0; i < Order(local_A); i++) for (j = 0; j < Order(local_A); j++) for (k = 0; k < Order(local_B); k++) Entry(local_C,i,j) = Entry(local_C,i,j) + Entry(local_A,i,k)*Entry(local_B,k,j); } //end pragma omp parallel } /* Local_matrix_multiply */

    Read the article

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