Questions tagged [selection]

The selection can refer to text that has been highlighted, or it can refer to a choice made in UI elements that require one, e.g. a particular option in an HTML `select`. Selection is also the stage of a genetic algorithm in which individual genomes are chosen from a population for later breeding.

The selection can refer to:

  • a range of text that has been highlighted, a feature intended to mark the text for copying and, in editable areas, pasting over.

  • a choice made in UI elements that require one, e.g. a particular option in an HTML select. In UI elements, the selection is often made by means of drop-down boxes, radio buttons, checkboxes, file choosers, and more. Selections can be made with the mouse by clicking and dragging over the desired text, or by holding down the Shift key while navigating the text with the arrow keys. Selections are not usually permanent marks, and can often be removed just by clicking or selecting elsewhere.

  • the stage in genetic algorithms / programming is in which individual genomes are chosen from a population for later breeding (recombination or crossover).

4031 questions
1
vote
3 answers

how to set a textarea's selection in react using state instead of a ref?

i'm setting a textarea's selectionRange using a react ref, but that contradicts with the react "way" . the ref is working perfectly . i want to set the textarea's selectionRange using state, not a ref ( like in this code snippet ) import React, {…
soufiane yakoubi
  • 861
  • 11
  • 31
1
vote
2 answers

Java android RecyclerView selection: IllegalStateException

I'm creating a selectable recycler view. I implemented all classes needed for it to work and it does work, I can select and deselect items and they change state. But if I deselect all items and then start selecting again, the app crashes. I didn't…
Alex Chashin
  • 3,129
  • 1
  • 13
  • 35
1
vote
1 answer

UIWebView document.getSelection() script returns nothing

I have a UIWebView displaying string containing a locally generated sequence of Korean and Russian words. I.e. there is nothing special in the string, just simple 'body'/'span' tags to format the text. I need to get selected text, so I…
Sergey Lost
  • 2,511
  • 3
  • 19
  • 22
1
vote
0 answers

How to add more than 1 range to a windows.selection object in chrome browser?

I want to implement the copy and paste feature in my web page. I would like to use document.execcommand("copy") to implement the feature,so that user can use Ctrl-Z to roll back the copy action. The following code working prorperly in firefox…
HK KNVB
  • 152
  • 1
  • 11
1
vote
1 answer

Three.js algorithm for marquee selecting in 3D scene

I'm creating a 3D model editor application using THREE.js where you can load a CAD model and have it display on the screen. You can pan, zoom, rotate the camera anywhere around in the scene to view the CAD model from any angle. I want to add…
Marek Krzeminski
  • 1,308
  • 3
  • 15
  • 40
1
vote
1 answer

Coreldraw VBA select all colour CMYK

Guys i'm trying to select all colours of a certain colour in the current selection I use the following to find out the all the colours in the selection Dim s As Shape Dim value As String, os As ShapeRange Set os = ActiveSelectionRange If os.Count <…
user3422687
  • 229
  • 1
  • 8
  • 27
1
vote
0 answers

Maintaining inherit background in CSS ::selection

According to this answer, web selection background colors are dependent on the operating system/browser combination. I would like to change the foreground color of ::selection, but not the background; however, it seems that changing the former…
Jordan Mann
  • 402
  • 6
  • 16
1
vote
3 answers

How to randomly select and bind data columns based on their median values in R?

I have two dataframes in wide format. Each of the columns is a time series of page hits for various wikipedia articles. set.seed(123) library(tidyr) time = as.Date('2009-01-01') + 0:9 wiki_1 <- data.frame( W = sample(1:1000,10,replace = T), X…
adkane
  • 1,429
  • 14
  • 29
1
vote
2 answers

MySQLWorkbench text selection shows black text on a black background

MySQLWorkbench 8.0.13 on Fedora 29 shows black text on a black background when I select text in the Query Editor. Any ideas for how to fix this? I've not noticed the problem with any other applications.
Daniel Scott
  • 7,418
  • 5
  • 39
  • 58
1
vote
2 answers

HTML SVG text selection in Chromium not working

I have a problem - when I try to select a text in element, only the first character gets highlighted. I'm running Chromium 70.0.3538.77 (Official Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit). Problem does not exist on Firefox. Basic…
1
vote
0 answers

after range.setStart new characters appear in previous node

this happens in chrome (71.0.3578.80 on windows): on range.setStart the caret moves to the reference node, but after typing the new characters appear in the node before, when offset is 0. the expected behaviour would be, that the characters appear…
bjd1
  • 11
  • 1
  • 3
1
vote
2 answers

Octave problem with ploting only some samples of audiosignal

My task is to load a signal, then take every 8th sample and compare it with 0. If sample > 0 -> sample=1 else sample -> 0. I have a code like this: sn = wavread('example.wav',100); z = sn(1 : 1 : end); x = sn(1 : 1 : end); for i = 1:rows(z); for j…
1
vote
1 answer

CoreldrawVBA Select multiple Objects by Name

Guys I am new to VBA for Coreldraw and am searching for some help in selecting multiple objects by name I have two objects 1 is a curve and one is a rectangle. I name them OBJ1 & OBJ 2 with the following Code For Each s In sr.Shapes objName =…
user3422687
  • 229
  • 1
  • 8
  • 27
1
vote
1 answer

how to select python tkinter columns with defaultdict?

I can select rows with the defaultdict in my tkinter program, but I don't know how to select the entire column. I understand the concept of defaultdict(list), but I don't know how to code to select a column. The defaultdict set up happens to part…
fishtang
  • 167
  • 3
  • 9
1
vote
1 answer

Print Menu Function Keeps Printing After Selection

I was supposed to make a program that would be a calculator using functions to provide results. I got it down and everything is working but I'm having a slight issue with the printing function out of everything which is humorous; for some reason…
1 2 3
99
100