selection

Get Area or Elements in zoomed Scatterplot

非 Y 不嫁゛ 提交于 2019-12-18 07:35:51
问题 I've got the following problem. I want to zoom-in a Scatterplot and then select all the displayed elements. It would be sufficient to somehow get the displayed area in the zoomed-in Scatterplot. From the range of this area i could determine which elements are displayed in the area and which are not. \edit: Found the Solution (Implementing AxisChangeListener Interface) import java.awt.Color; import java.awt.Dimension; import org.jfree.chart.ChartPanel; import org.jfree.chart.event

How can I show different content to website visitors from a specific country in PHP?

狂风中的少年 提交于 2019-12-18 07:34:52
问题 On my Wordpress blog, I want to show additional content to people from Finland on all pages. Very much like the Feedback button at the left edge of the screen on printfriendly.com. How can I achieve this most reliably using PHP? 回答1: My suggestion would be to use the PHP GeoIP functions to determine the users location based on IP, and serve appropriate content based on that. More information on GeoIP can be found here. 回答2: In addition to the other answers (GeoIP), you may try to analyze the

How can I show different content to website visitors from a specific country in PHP?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 07:33:10
问题 On my Wordpress blog, I want to show additional content to people from Finland on all pages. Very much like the Feedback button at the left edge of the screen on printfriendly.com. How can I achieve this most reliably using PHP? 回答1: My suggestion would be to use the PHP GeoIP functions to determine the users location based on IP, and serve appropriate content based on that. More information on GeoIP can be found here. 回答2: In addition to the other answers (GeoIP), you may try to analyze the

Selecting the tapped-on word on a single click in textbox

。_饼干妹妹 提交于 2019-12-18 07:10:37
问题 In a Windows Phone 7 app. I happen to have many TextBox s stacked in a ItemsControl and the behaviour across textboxes for selection is not uniform i.e. a single click on any word in any text box does not select the tapped word. First a click is consumed for focusing the text box and then another to actually select the word; but once the text box has focus, it's a single click to select any word within, until the user wants to select some other word in another textbox. Is there a way to

DataGridView selected rows to DataTable

青春壹個敷衍的年華 提交于 2019-12-18 06:17:05
问题 I'm trying to add only the selected rows of a DataGridView to a DataTable, the code that I'm using always start from the first row even if this one is not selected... Does someone have an idea for how to fix this please? DataTable dt = new DataTable("Rapport"); //Generating columns to datatable: foreach (DataGridViewColumn column in dataGridView1.Columns) dt.Columns.Add(column.Name, typeof(string)); //Adding selected rows of DGV to DataTable: for (int i = 0; i < dataGridView1.SelectedRows

remember after refresh selected row in extjs grid

老子叫甜甜 提交于 2019-12-18 04:34:29
问题 I have a problem. I use extjs grid . This grid will be refreshed every seconds . I refresh with this function: ND.refresh = function() { ND.commList.load(); } var refreshSeconds = refreshRate * 1000; var t = setInterval('ND.refresh()', refreshSeconds); But when someone selected a row to highlight it it reset this selection. How can I remember the selected row and highlight it again after refresh? This is my grid: var grid = Ext.create('Ext.grid.Panel', { autoscroll: true, region: 'center',

Java - Selection Sort Algorithm

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 04:20:35
问题 I have some questions about selection sort.I'm a little bit confused. int [] arr = {5,4,3,2,1}; // This is my array int min = 0; for(int i = 0;i<arr.length;i++) { //Assume first element is min min = i;//Selection sort algorithm says that find the minimum in the // array, but first element is not minimum.What's point here? for(int j = i + 1;j<arr.length;j++) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; System.out.println(arr[i]);//I print the in ascending order } } Output is : 4 3 2 1

Ranking Selection in Genetic Algorithm code

心不动则不痛 提交于 2019-12-18 03:44:35
问题 I need code for the ranking selection method on a genetic algorithm. I have create roulette and tournament selections method but now I need ranking and I am stuck. My roulette code is here (I am using atom struct for genetic atoms) : const int roulette (const atom *f) { int i; double sum, sumrnd; sum = 0; for (i = 0; i < N; i++) sum += f[i].fitness + OFFSET; sumrnd = rnd () * sum; sum = 0; for (i = 0; i < N; i++) { sum += f[i].fitness + OFFSET; if (sum > sumrnd) break; } return i; } Where

In preferences, select my sound just like with RingtonePreference

耗尽温柔 提交于 2019-12-17 22:16:32
问题 I have sounds in my /raw folder and I would like my user to be able to choose one sound in preferences exactly like RingtonePreference does but only with my sounds. 回答1: Here my RingtonePreference replacement. All system ringtones and your custom ringtones (defined in xml, stored in res/raw) are listed: ExtraRingtonePreference.java package de.almisoft.test; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.Map; import java.util.TreeMap; import de.almisoft.test.R;

Character offset in an Internet Explorer TextRange

人走茶凉 提交于 2019-12-17 20:25:42
问题 As far as I can tell there's no simple way of retrieving a character offset from a TextRange object in Internet Explorer. The W3C Range object has a node, and the offset into the text within that node. IE seems to just have pixel offsets. There are methods to create, extend and compare ranges, so it would be possible to write an algorithm to calculate the character offset, but I feel I must be missing something. So, what's the easiest way to calculate the character offset of the start of an