Search Results

Search found 3931 results on 158 pages for 'roulette wheel selection'.

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

  • Good way to maintain Muliple level selection menu list in J2ME

    - by geoaxis
    Hello, I need a good way to maintain multiple form level data for menue selection. So for example If I have A and B, each might Have 1 2 3 so A A1 A2 A3 B B1 B2 B3 And this can continue for long, so that I could have A - A1 - A1.1 - A1.1.1 -.... I have the following class in place, works ok But I suspect we could have better. I just need to perform selection ni a selection tree like Widget, but each level of selection comes in another form (in J2ME) import java.util.Vector; public class Tag { private String tag; private Vector childTags; private Tag parent; Tag(String tag, Vector childtag) { this.tag = tag; this.childTags= childTags; } public void setChildTags(Vector childTags) { this.childTags = childTags; } public Vector getChildTags() { return this.childTags; } public String getTag() { return this.tag; } public String toString(int depth) { String a =""; if(depth==0) { a = a + this.getTag(); } if(this.getChildTags()!= null) { for(int k=0;k <this.getChildTags().capacity(); k++) { for (int i=0; i<depth; i++ ) { a = a + ("-"); } a = a+ ( ((Tag)this.getChildTags().elementAt(k)).toString(depth++)); } } return a; } }

    Read the article

  • jquery mouse wheel scroll horizontal

    - by steve
    I currently have a site that is a sidescroller (http://www.studioimbrue.com) and I'm trying to bind a mousewheel to scroll sideways. Currently I'm using the one found at thehorizontalway.com but it doesn't seem to work in all browsers (Chrome). I'm trying to get this one to work: http://brandonaaron.net/code/mousewheel/docs , to simply scroll the whole window, nothing else. There is very limited documentation so I can't figure it out. Any help is appreciated.

    Read the article

  • Vertical mouse scrolling wheel not working in VS 2010 Ultimate

    - by Robert
    The title says it all. I tried it with two different mice- both of which work perfectly fine in all other applications. The mouse is MS Intellimouse Optical. I even tried to speed up the vertical scroll through the mouse utility and still nothing. It barely moves the code a tiny bit and then it stops. I had no problems at all with VS 2008 which is concurrently installed in the same machine. Am I the only one having this???

    Read the article

  • Is this GetEnumAsStrings<T>() method reinventing the wheel?

    - by Edward Tanguay
    I have a number of enums and need to get them as List<string> objects in order to enumerate through them and hence made the GetEnumAsStrings<T>() method. But it seems to me there would be an easier way. Is there not a built-in method to get an enum like this into a List<string>? using System; using System.Collections.Generic; namespace TestEnumForeach2312 { class Program { static void Main(string[] args) { List<string> testModes = StringHelpers.GetEnumAsStrings<TestModes>(); testModes.ForEach(s => Console.WriteLine(s)); Console.ReadLine(); } } public static class StringHelpers { public static List<string> GetEnumAsStrings<T>() { List<string> enumNames = new List<string>(); foreach (T item in Enum.GetValues(typeof(TestModes))) { enumNames.Add(item.ToString()); } return enumNames; } } public enum TestModes { Test, Show, Wait, Stop } }

    Read the article

  • Iphone UITableViewCell selection background

    - by user360297
    Hi, I'm developing custom tableViewCell for iphone, I used interface builder to design it and loaded in from code. It use custom background to show Cell Selection. It work ok expect form one small issue, there is a small rectangular area in left side dosen't show the custom image, but show default selection ( bule color ) in that area. Please take look at the image @ this link http://warunadesilva.com/fih/Untitled.png I selection image's with is 320px. Could anyone suggest possible solution for this problem, Thank you in advance. Waruna

    Read the article

  • managing html rich text selections

    - by swami
    Hi, I am writing a component for a web app which will display some html, and let me capture and manipulate the selection boundaries (of the text selected by the user). I have done this successfully (for Mozilla) with a simple div element using window.getSelection(). However, the browser selection API is different for IE. If I were to use a textarea instead (for interacting with the selection api), is there a uniform API across the browsers? Then I would need to overlay a DIV on top of this to display the styled text, and presumably I'd need to manage the cursor etc... Basically I want a rich text editor - but without editing. Does anyone have any advice on the best way to go about this, which is quick, simple and cross browser compatible. I don't want to spend ages reinventing the wheel... (If anyone's interested - this is for an online xml editor. I capture the users selection on a html version of the xml doc and then send the selection offsets info to the server, where the real xml doc gets marked up). Kind Regards Swami

    Read the article

  • Mac / OS X Finder regularly jumps down or changes selection in the file list (annoyance)

    - by RipperDoc
    I have this annoying problem with Finder on Snow Leopard. Every time I activate a Finder window and for example navigate to a folder, a few seconds later the selection or scroll will jump down in the list. It is like something is changed with the folder and the position is resetted or changed. Anyone know what causes this? Is Finder detecting some constant change in the folder that I cannot see? Folder Actions?

    Read the article

  • Firefox extension to translate selection boxes

    - by Michael
    Many extensions can translate selected texts. What if the text located within selection box? Meanwhile I can't translate the whole website because google translator says "Sorry, we are unable to translate the page you requested." I can use firebug to explore html, copy the text to google translator and do translation. Wondering if there is such add-on for firefox to translate text from "non selectable" HTML elements. Thx

    Read the article

  • Can I delay selection of a file name?

    - by Xavierjazz
    XP SP3 I have my system set up so that I do not need to double click on an item to open it. However, I find that items are selected when I move over them swiftly. This is a problem when I want to save a file and inadvertently pass over another file name. It immediately gets selected. Is there a way to delay this selection for, say, a second so that they are not selected so quickly? Thanks. Regards,

    Read the article

  • How to raycast select a scaled OBB?

    - by user3254944
    I have the OBB picking code to select an OBB with code inspired from Real time Rendering 3 and opengl-tutorial.org. I can successfully select objects that have been moved or rotated. However, I cant correctly select an object that has been scaled. The bounding box scales right, but the I can only select the object in a thin strip on its center. How do I fix the checkForHits() function to allow it to read the scaling that I passed to it in the raycast matrix? void GLWidget::selectObjRaycast() { glm::vec2 mouse = (glm::vec2(mousePos.x(), mousePos.y()) / glm::vec2(this->width(), this->height())) * 2.0f - 1.0f; mouse.y *= -1; glm::mat4 toWorld = glm::inverse(ProjectionM * ViewM); glm::vec4 from = toWorld * glm::vec4(mouse, -1.0f, 1.0f); glm::vec4 to = toWorld * glm::vec4(mouse, 1.0f, 1.0f); from /= from.w; to /= to.w; fromAABB = glm::vec3(from); toAABB = glm::normalize(glm::vec3(to - from)); checkForHits(); } void GLWidget::checkForHits() { for (int i = 0; i < myWin.myEtc->allObj.size(); ++i) //check for hits on each obj's bb { bool miss = 0; float tMin = 0.0f; float tMax = 100000.0f; glm::vec3 bbPos(myWin.myEtc->allObj[i]->raycastM[3].x, myWin.myEtc->allObj[i]->raycastM[3].y, myWin.myEtc->allObj[i]->raycastM[3].z); glm::vec3 delta = bbPos - fromAABB; for (int j = 0; j < 3; ++j) { glm::vec3 axis(myWin.myEtc->allObj[i]->raycastM[j].x, myWin.myEtc->allObj[i]->raycastM[j].y, myWin.myEtc->allObj[i]->raycastM[j].z); float e = glm::dot(axis, delta); float f = glm::dot(toAABB, axis); if (fabs(f) > 0.001f) { float t1 = (e + myWin.myEtc->allObj[i]->bbMin[j]) / f; float t2 = (e + myWin.myEtc->allObj[i]->bbMax[j]) / f; if (t1 > t2) { float w = t1; t1 = t2; t2 = w; } if (t2 < tMax) tMax = t2; if (t1 > tMin) tMin = t1; if (tMax < tMin) miss = 1; } else { if (-e + myWin.myEtc->allObj[i]->bbMin[j] > 0.0f || -e + myWin.myEtc->allObj[i]->bbMax[j] < 0.0f) miss = 1; } } if (miss == 0) { intersection_distance = tMin; myWin.myEtc->sel.push_back(myWin.myEtc->allObj[i]); myWin.myEtc->allObj[i]->highlight = myWin.myGLHelp->highlight; break; } } } void Object::render(glm::mat4 PV) { scaleM = glm::scale(glm::mat4(), s->val_3); r_quat = glm::quat(glm::radians(r->val_3)); rotationM = glm::toMat4(r_quat); translationM = glm::translate(glm::mat4(), t->val_3); transLocal1M = glm::translate(glm::mat4(), -rsPivot->val_3); transLocal2M = glm::translate(glm::mat4(), rsPivot->val_3); raycastM = translationM * transLocal2M * rotationM * scaleM * transLocal1M; // MVP = PV * translationM * transLocal2M * rotationM * scaleM * transLocal1M; }

    Read the article

  • Scrolling though objects then creating a new instace of this object

    - by gopgop
    In my game when pressing the right mouse button you will place an object on the ground. all objects have the same super class (GameObject). I have a field called selected and will be equal to one certain gameobject at a time. when clicking the right mouse button it checks whats the instance of selected and that how it determines which object to place on the ground. code exapmle: t is the "slot" for which the object will go to. if (selected instanceof MapleTree) { t = new MapleTree(game,highLight); } else if (selected instanceof OakTree) { t = new OakTree(game,highLight); } Now it has to be a "new" instance of the object. Eventually my game will have hundreds of GameObjects and I don't want to have a huge if else statement. How would I make it so it scrolls though the possible kinds of objects and if its the correct type then create a new instance of it...? When pressing E it will switch the type of selected and is an if else statement as well. How would I do it for this too? here is a code example: if (selected instanceof MapleTree) { selected = new OakTree(game); } else if (selected instanceof OakTree) { selected = new MapleTree(game); }

    Read the article

  • How to clear a Firefox address bar without selecting its content?

    - by zuba
    Sometimes I need to move an url from an app to a browser. I select the url, say in gvim, and make Firefox window active. Then I see that I should clear address bar before pasting the new url, which requires selecting existing url, which wipes the new url from PRIMARY clipboard out. What is the best way to put the new url from PRIMARY clipboard to address bar? Is there a shortcut to clear address bar and then to move focus there? ps I know I can use Ctrl-C to put the new url to CLIPBOARD clipboard, but I prefer to use PRIMARY clipboard.

    Read the article

  • get user selection and convert it to a String [Android]

    - by Kira
    Hello, I just got a Droid, and after having used it for a while, I felt like I wanted to make a program for it. The program that I am trying to make calculates the actual storage capacity of secondary storage mediums. The user select from a list of units that ranges from KB to YB and the size the entered gets put into a formula depending on the chosen unit. However, there is a bit of a problem with the program. From my testing, I have narrowed it down to the fact that the user's selection is not really being obtained from the spinner. Everything I look up seems to point me to a method quite similar to how it works in J2SE, but it does nothing. How am I actually supposed to get that data? Here is the Java source code for the app: package com.Actual.android; import android.app.Activity; import android.os.Bundle; import android.widget.*; import android.view.*; public class ActualStorageActivity extends Activity { Spinner selection; /* declare variable, in order to control spinner (ComboBox) */ ArrayAdapter adapter; /* declare an array adapter object, in order for spinner to work */ EditText size; /* declare variable to control textfield */ EditText result; /* declare variable to control textfield */ Button calculate; /* declare variable to control button */ Storage capacity = new Storage(); /* import custom class for formulas */ /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // load content from XML selection = (Spinner)findViewById(R.id.spinner); adapter = ArrayAdapter.createFromResource(this, R.array.choices_array, android.R.layout.simple_spinner_dropdown_item); size = (EditText)findViewById(R.id.size); result = (EditText)findViewById(R.id.result); calculate = (Button)findViewById(R.id.submit); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); /* set resource for dropdown */ selection.setAdapter(adapter); // attach adapter to spinner result.setEnabled(false); // make read-only result.setText("usable storage"); } public void calcAction(View view) { String initial = size.getText().toString(); String unit = selection.getSelectedItem().toString(); String end = "Nothing"; double convert = Double.parseDouble(initial); capacity.setStorage(convert); if (unit == "KB") { end = Double.toString(capacity.getKB()); } else if (unit == "MB") { end = Double.toString(capacity.getMB()); } else if (unit == "GB") { end = Double.toString(capacity.getGB()); } else if (unit == "TB") { end = Double.toString(capacity.getTB()); } else if (unit == "PB") { end = Double.toString(capacity.getPB()); } else if (unit == "EB") { end = Double.toString(capacity.getEB()); } else if (unit == "ZB") { end = Double.toString(capacity.getZB()); } else if (unit == "YB") { end = Double.toString(capacity.getYB()); } else; result.setText(end); } }

    Read the article

  • Silverlight RichTextBox Disable Mouse Selection

    - by Fastidious
    I am writing a custom control based on RichTextBox that needs the ability to process MouseLeftButtonDown events but must not allow user-initiated selection (I'm doing everything programmatically). I tried setting a flag in MouseLeftButtonDown to track dragging and then continuously setting the RichTextBox.Selection to nothing in the MouseMove event but the move event isn't fired until after I release the mouse button. Any ideas on how to solve this? Thanks.

    Read the article

  • Can't Set Crystal Report Selection Formula Programatically

    - by eidylon
    Hello all, first, I can't stand Crystal! Okay, that's off my chest... Now, we have an old VB6 app we maintain for a client, which uses the Crystal Automation library to programatically change the record selection formulas in a bunch of Crystal Reports 8.5 reports. There are two reports which are ALMOST identical. I had to change them recently to add another field from another table. When I added the table in to the reports though, while it added it in the visual designer, it did not add it in the FROM clause of the SQL statement. So, I manually edited the SQL statement to add in the additional join. KO, works great. If i run the reports in Crystal preview mode, they work exactly as expected. Now, the users went to test the changes from within the VB app. One of the reports works fine and dandy. The other report however, is failing to set the selection formula as expected. The code sets the selection formulas using the function PESetSelectionFormula. I verified that the string being passed in to the function as the new selection formula is correct via a step-through examination of the variables. The call to PESetSelectionFormula seems to be working okay, and is returning a value of 1, which as near as I can find anywhere indicates success. (The other report, which is working fine from code is also returning 1.) However, the report is failing with an error: Error Code: 534 - Error detected by database DLL. The code, for debugging purposes dumps out the SQL string currently being used by the report. The SQL coming out of the report is: SELECT ... FROM ... WHERE ORDER BY ... As you can see, the WHERE clause is blank, which I would imagine is why the database DLL is upchucking on this statement. I don't understand why the automation library is not setting the WHERE clause even though the call to PESetSelectionFormula is being passed a valid string and is returning success. I thought perhaps it was because I had manually edited the SQL in the report to add the table it wasn't adding, but I did the same thing in the other nearly identical report, and that one is working fine. Anyone have any ideas why PESetSelectionFormula might report success but not actually do anything? P.S. I have already tried doing a Database Verify Database from the menus, and that said the report was all up to date and did not help at all.

    Read the article

  • Silverlight Marching Ants Image Selection

    - by Ben Herila
    (Silverlight 3) Is there a pre-existing (preferably free, even better if open source) method (either a control or source code) for dragging a "marching ants" style selection on an image in a ScrollViewer or on a Canvas, similar to how it's done in image editing software? Even better if the resulting selection box has adjustment handles.

    Read the article

  • Need to incorporate Timezone Selection (UTC) within Web App

    - by tonsils
    Hi, I need to incorporate a Timezone dropdown selection within my web app, which I need to use within an Oracle database. I basically require the user to select their timezone and I then need to use this against time stamp info stored within the Oracle tables. Unsure where/how to build this Timezone selection list within my page - example how-tos would be great. Would like this to be UTC. Thanks.

    Read the article

  • Length of current selection in Eclipse

    - by Grzegorz Oledzki
    Do you know any easy way to know what is the length of current selection in Eclipse? I.e. I select a line fragment and would like to know how many characters are there? Usually I count them manually, but that's stupid. When being desperate I move to the start, check the column number, move to the end, check the column number, subtract, think a minute if I should add 1 or not... and my selection is lost.

    Read the article

  • Watin: file upload ...without file selection window?

    - by user526186
    with "file upload" HTML like this: <input name="input_name" type="file" size="40" /> ...there is no way for users to directly enter text into input area for security reasons, correct? file selection window pops up instead. In Watin automation project, we are wanting to bypass the file selection window and place filename directly in text entry area - but we are not finding a way to do this. How can this be accomplished? ...or perhaps it cannot be done?

    Read the article

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