Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
sequence |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,006,975 | 1 | 3,007,057 | null | 1 | 248 | i have an issue with the theme i am developing for my blog ([example](http://jiewmeng.tumblr.com/post/642917176/quick-tip-the-multi-column-css3-module-via)), where below a video, there is a "extra" space/padding to its border

basically, i have a
```
<div class="media"> ... embeded stuff ... </div>
.media { border: 5px solid #CCC }
```
something like that
| CSS: Padding wrong with video embeds | CC BY-SA 2.5 | null | 2010-06-09T14:54:39.240 | 2010-06-09T15:02:39.647 | 2017-02-08T14:26:45.633 | -1 | 292,291 | [
"css"
] |
3,007,120 | 1 | 3,007,789 | null | 13 | 30,912 | I have the following data:
```
bin groupname total_dist
0 rowA 377
0 rowA 306.6
0 rowB 2.1
0 rowB 110.6
1 rowA 918.1
1 rowA 463.2
1 rowB 798.2
1 rowB 1196
2 rowA 1295.1
2 rowA 1269.1
2 rowB 698
2 rowB 1022.1
```
Using R, I want to make a bar graph where there is a bar for rowA and a bar for rowB for bin. I can group total_dist by one or the other (`plot(total_dist~bin)` or `plot(total_dist~groupname)`). But I can't figure out how to combine them.
I want something that looks similar to this example:

| grouped bar graph | CC BY-SA 2.5 | 0 | 2010-06-09T15:10:00.373 | 2010-06-09T16:57:57.633 | 2017-02-08T14:26:45.967 | -1 | 128,245 | [
"r",
"graphing"
] |
3,009,446 | 1 | null | null | 0 | 106 | I have the code (snippet):
The Model is the IEnumerable object of the Person's class:
```
<% foreach (var item in Model)
{ %>
<tr>
<td><%= Html.DisplayFor(x=>item.Name) %></td>
</tr>
<% } %>
```
it renders only labels like that:
```
<td>Tommy</td>
```
According to the [link](http://weblogs.asp.net/scottgu/archive/2010/01/10/asp-net-mvc-2-strongly-typed-html-helpers.aspx) it should be rendering a HTML markup something like:

but there is no the ID and the NAME property. Why ?
| ASP.NET MVC2 TeplatedHelper doesn't render an ID of the HTML's markup | CC BY-SA 2.5 | null | 2010-06-09T19:59:07.693 | 2010-06-10T12:11:01.587 | 2017-02-08T14:26:47.793 | -1 | 106,616 | [
"asp.net-mvc-2"
] |
3,010,105 | 1 | 3,254,626 | null | 6 | 1,116 |
Hi,
An interaction designer employed by the client I am currently working for produced some mock-ups, and now it is my job to determine the best way of implementing the charts included therein.
After looking at the options I am aware of and was able to find doing some simple Google searches, I have narrowed it down to using either , or , simply because from what I can see of their demos, they have certain features I believe I will need to get things done.
Here are the pictures from the mock-ups - ideally I need one piece of software that will cover all of these:
---

---

---

---

---
Any ideas or recommendations would be appreciated, I haven't used charting controls in , so I am at a bit of a loss and the client wants an estimate soon.
Thank you!
| Which JavaScript or ASP.NET Charting Component/Tool/Library Will Work For This? | CC BY-SA 2.5 | 0 | 2010-06-09T21:31:53.327 | 2010-07-15T10:21:22.370 | 2017-02-08T14:26:49.210 | -1 | 1,790 | [
"asp.net",
"javascript",
"asp.net-mvc",
"controls",
"charts"
] |
3,010,837 | 1 | 3,080,946 | null | 22 | 6,646 | Sampling uniformly at random from an n-dimensional unit simplex is the fancy way to say that you want n random numbers such that
- - -
In the n=2 case you want to sample uniformly from the segment of the line x+y=1 (ie, y=1-x) that is in the positive quadrant.
In the n=3 case you're sampling from the triangle-shaped part of the plane x+y+z=1 that is in the positive octant of R3:

(Image from [http://en.wikipedia.org/wiki/Simplex](http://en.wikipedia.org/wiki/Simplex).)
Note that picking n uniform random numbers and then normalizing them so they sum to one does not work. You end up with a bias towards less extreme numbers.
Similarly, picking n-1 uniform random numbers and then taking the nth to be one minus the sum of them also introduces bias.
Wikipedia gives two algorithms to do this correctly: [http://en.wikipedia.org/wiki/Simplex#Random_sampling](http://en.wikipedia.org/wiki/Simplex#Random_sampling)
(Though the second one currently claims to only be correct in practice, not in theory. I'm hoping to clean that up or clarify it when I understand this better. I initially stuck in a "WARNING: such-and-such paper claims the following is wrong" on that Wikipedia page and someone else turned it into the "works only in practice" caveat.)
Finally, the question:
What do you consider the best implementation of simplex sampling in Mathematica (preferably with empirical confirmation that it's correct)?
Related questions
- [Generating a probability distribution](https://stackoverflow.com/questions/2171074/generating-a-probability-distribution)- [java random percentages](https://stackoverflow.com/questions/3007975/java-random-percentages)
| Sample uniformly at random from an n-dimensional unit simplex | CC BY-SA 2.5 | 0 | 2010-06-10T00:03:52.937 | 2021-08-18T16:16:35.103 | 2017-05-23T12:17:04.057 | -1 | 4,234 | [
"math",
"random",
"wolfram-mathematica"
] |
3,011,409 | 1 | 3,013,086 | null | 9 | 7,175 | [This great SO answer](https://stackoverflow.com/questions/1242190/c-memory-efficient-solution-for-axb-linear-algebra-system/1279744#1279744) points to a good sparse solver for `Ax=b`, but I've got constraints on `x` such that each element in `x` is `>=0` an `<=N`.
Also, `A` is (around 2e6x2e6) but very sparse with `<=4` elements per row.
Any ideas/recommendations? I'm looking for something like MATLAB's [lsqlin](http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/lsqlin.html) but with huge sparse matrices.
I'm essentially trying to solve the large scale [bounded variable least squares problem](http://www.stat.berkeley.edu/users/stark/Preprints/bvls.pdf) on sparse matrices:

In [CVX](http://cvxr.com/cvx/):
```
cvx_begin
variable x(n)
minimize( norm(A*x-b) );
subject to
x <= N;
x >= 0;
cvx_end
```
| Sparse constrained linear least-squares solver | CC BY-SA 2.5 | 0 | 2010-06-10T03:17:40.307 | 2018-05-22T17:28:03.390 | 2017-05-23T11:45:39.863 | -1 | 71,131 | [
"c++",
"math",
"linear-algebra",
"linear-programming",
"sparse-matrix"
] |
3,011,505 | 1 | null | null | 1 | 309 | 
As you see in the images, the top picture is created automatically when navigation controller is pushed
If I try to create one like this it will appear like the bottom picture.
How can I programmatically create a Back Button like the top picture?
Here is my code to create the Done button
```
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(backtohome)];
```
| need help about add navigationItem | CC BY-SA 3.0 | null | 2010-06-10T03:45:28.290 | 2011-11-11T19:06:29.420 | 2017-02-08T14:26:50.233 | -1 | 203,372 | [
"iphone",
"uinavigationitem"
] |
3,011,604 | 1 | null | null | 24 | 48,820 | I've really been struggling through this. New to Java/Android. I'm writing my first app and this is the first thing that has taken me longer than a couple days of searching to figure out. Here's the setup: It's a BAC calculator / drink counter:

A formula is used to calculate the BAC. Here's the forumla:
```
Bac = ((StandardDrinks / 2) * (GenderConstant / Weight)) - (0.017 * Hours);
```
So as you can see, being able to modify the gender and weight will produce more accurate and personalized results. So I have them as doubles:
```
double GenderConstant = 7.5; //9 for female
double Weight = 180;
```
To change these variables I would like the person to be able to go into the settings and choose different values. I have these things set up, but not linked to the variables shown above because I cannot for the life of me figure out how. Here they are:

I press the menu button and this pops up. Great. I'll click Settings.

Now the preferences pops up. Here is my preferences.xml:
```
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="Personal Settings">
<ListPreference
android:title="Gender"
android:summary="Verify or deny the presence of a Y chromosome."
android:key="genderPref"
android:defaultValue="male"
android:entries="@array/genderArray"
android:entryValues="@array/genderValues" />
<ListPreference
android:title="Weight"
android:summary="How much the planet pulls on you, in pounds."
android:key="weightPref"
android:defaultValue="180"
android:entries="@array/weightArray"
android:entryValues="@array/weightValues" />
</PreferenceCategory>
<PreferenceCategory android:title="Drink Settings">
<ListPreference
android:title="Beer Size"
android:summary="The volume of your beer, in ounces."
android:key="beerPref"
android:defaultValue="12"
android:entries="@array/beerArray"
android:entryValues="@array/beerValues" />
<ListPreference
android:title="Shot Size"
android:summary="The volume of your shot, in ounces."
android:key="shotPref"
android:defaultValue="1.5"
android:entries="@array/shotArray"
android:entryValues="@array/shotValues" />
<ListPreference
android:title="Wine Size"
android:summary="The volume of your wine, in ounces."
android:key="winePref"
android:defaultValue="5"
android:entries="@array/wineArray"
android:entryValues="@array/wineValues" />
</PreferenceCategory>
</PreferenceScreen>
```
Onward to the weight ListPreference:

And that shows up. The values are stored as string-arrays in res/values/arrays.xml. Here's a sample, of just the weight ones:
```
<string-array name="weightArray">
<item>120 lbs</item>
<item>150 lbs</item>
<item>180 lbs</item>
<item>210 lbs</item>
<item>240 lbs</item>
<item>270 lbs</item>
</string-array>
<string-array name="weightValues">
<item>120</item>
<item>150</item>
<item>180</item>
<item>210</item>
<item>240</item>
<item>270</item>
</string-array>
```
This is basically as far as I've gotten. I can click a value, sure, but it doesn't change the formula because it's not linked with the doubles I created in DrinkingBuddy.java. All of the stuff displayed in the settings are just empty shells for now, including the spinner on the main layout (the default time is just set to 1 hour)
I did create a Preferences.java and have tried implementing various combinations of code found in tutorials and resources around the web, but to no avail. Here it is anyway, filled with failed attempts to make beerPref (the settings option to change how many ounces in the beer) correlate with a variable in my main class:
```
package com.dantoth.drinkingbuddy;
import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.Preference.OnPreferenceClickListener;
public class Preferences extends PreferenceActivity {
public static final String PREF_BEER_SIZE = "PREF_BEER_SIZE";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
//Get the custom preference
Preference beerPref = (Preference) findPreference("beerPref");
beerPref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
public boolean onPreferenceClick(Preference preference) {
SharedPreferences customSharedPreference = getSharedPreferences("myCustomSharedPrefs", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = customSharedPreference.edit();
editor.commit();
return true;
}}
);}
}
```
A full on tutorial and sample code would be AWESOME as I've yet to find any reliable guides out there.
| How do I get preferences to work in Android? | CC BY-SA 2.5 | 0 | 2010-06-10T04:20:00.907 | 2016-01-16T14:35:05.377 | 2010-06-10T04:26:05.937 | 23,897 | 359,045 | [
"android",
"variables",
"settings",
"preferences",
"sharedpreferences"
] |
3,012,160 | 1 | 3,012,837 | null | 0 | 368 | in this code:
```
#include <QApplication>
#include <QPushButton>
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QPushButton *button = new QPushButton("Button Text");
QObject::connect(button,SIGNAL(clicked()),&app,SLOT(quit()));
button->show();
return app.exec();
}
```
intellisense is appearing when the cursor is in SIGNAL parenthesis to write event. But it doesn't appear in SLOT parenthesis to write method ?
is it related with character in front of ?

| QT intellisense question | CC BY-SA 2.5 | null | 2010-06-10T06:34:58.773 | 2010-06-10T08:35:57.767 | 2017-02-08T14:26:50.573 | -1 | 104,085 | [
"qt4"
] |
3,013,601 | 1 | 3,062,837 | null | 0 | 562 | I am creating a rounded rectangle GraphicsPath (see red outline image below), and then using this as a clip region both when drawing graphics, and as the Region of a Form.
Unfortunately, although the path looks good, it doesn't work well as a region (see solid black image below)
Is there a way that I can generate a clipping region from the path that includes all the 'outline' pixels of the path? Do I need to generate a bitmap and then process this to create a region?



| How to create a clip region from a path that includes the 'outline'? | CC BY-SA 2.5 | 0 | 2010-06-10T10:38:38.130 | 2010-06-17T14:59:53.070 | 2017-02-08T14:26:51.583 | -1 | 25,457 | [
"winforms",
"system.drawing",
"region",
"graphicspath"
] |
3,013,973 | 1 | null | null | 2 | 1,213 | I want to be able to play an alarm sound using Javascript in a browser window, preferably with the requirement for any browser plugins (Quicktime/Flash). I have been experimenting with the tag and the new Audio object in Javascript, but results are mixed:

As you can see, there is no variant that works on all browsers.
Do I miss a trick that is more cross-browser compatible?
This is my code:
```
// mp3 with Audio object
var snd = new Audio("/sounds/beep.mp3");snd.play();
// wav with Audio object
var snd = new Audio("/sounds/beep.wav");snd.play();
// mp3 with EMBED tag
$("#alarmsound").empty().append
('<embed src="/sounds/beep.mp3" autostart="true" loop="false" '+
'volume="100" hidden="true" width="1" height="1" />');
// wav with EMBED tag
$("#alarmsound").empty().append
('<embed src="/sounds/beep.wav" autostart="true" loop="false" '+
'volume="100" hidden="true" width="1" height="1" />');
```
}
| What trick will give most reliable/compatible sound alarm in a browser window for most browsers | CC BY-SA 2.5 | 0 | 2010-06-10T11:37:15.703 | 2011-06-21T12:03:23.660 | 2017-02-08T14:26:52.260 | -1 | 102,991 | [
"jquery",
"audio",
"cross-browser",
"mp3",
"wav"
] |
3,016,610 | 1 | null | null | 0 | 942 | I've created a ComboBox skin by extending mx.skins.ProgrammaticSkin. It's working fine, except I can't figure out how to limit the width of the text. Is there a way to control this within the skin?
See the attached image for an example of the text going too far. I would like it to stop before the separator line to the left of the down arrow.

| Flex 3 ComboBox skin, limiting text width | CC BY-SA 2.5 | null | 2010-06-10T16:57:44.050 | 2010-06-10T17:01:11.937 | null | null | 52,791 | [
"apache-flex",
"flash",
"flex3",
"combobox",
"skinning"
] |
3,016,747 | 1 | 14,072,851 | null | 4 | 12,982 | I've created a view in Drupal that retrieves a list of nodes. The display of this view is a page and it works perfectly well. It does even allow me to filter its content by argument.
See the current's view configuration (click to enlarge):

without reloading the page. I've enabled the "Use AJAX" option but I am not sure on how to continue.
Any ideas on how to do that?
By the way, I'm building my own theme (in case that changes anything).
---
Basically, this view works when I browse through section/parameter1, section/parameter2... but I want to do the same with AJAX, without reloading the page. I hope is clearer now
| Drupal. Use AJAX to update view's content | CC BY-SA 3.0 | 0 | 2010-06-10T17:14:16.143 | 2016-05-26T11:14:19.270 | 2013-01-29T07:28:56.297 | 119,775 | 77,758 | [
"php",
"javascript",
"ajax",
"drupal",
"drupal-themes"
] |
3,016,940 | 1 | 3,020,304 | null | 1 | 807 | [I recently ran across this great article by Chad Parry entitled "DIY-DI" or "Do-It-Yourself Dependency Injection".](http://misko.hevery.com/2010/05/26/do-it-yourself-dependency-injection) I'm in a position where I'm not yet ready to use a IoC framework, but I want to head in that direction. It seems like DIY-DI is a good first step.
However, after reading the article, I'm still a little confused about object creation. Here's a simple example:

Using manual constructor dependency injection (not DIY-DI), this is how one must construct a Hotel object:
```
PowerGrid powerGrid; // only one in the entire application
WaterSupply waterSupply; // only one in the entire application
Staff staff;
Rooms rooms;
Hotel hotel(staff, rooms, powerGrid, waterSupply);
```
Creating all of these dependency objects makes it difficult to construct the Hotel object in isolation, which means that writing unit tests for Hotel will be difficult.
| Simple object creation with DIY-DI? | CC BY-SA 3.0 | null | 2010-06-10T17:37:30.863 | 2012-05-03T19:30:36.540 | 2012-01-15T18:01:39.763 | 635,608 | 68,768 | [
"dependency-injection"
] |
3,017,181 | 1 | 3,018,560 | null | 10 | 1,426 | I have a script which inserts "popup" elements into the DOM. It sets their `top` and `left` css properties relative to mouse coordinates on a click event. It works great except that the height of these "popup" elements are variable and some of them extend beyond the viewable area of the browser window. I would like to avoid this.

Here's what I have so far
```
<script type="text/javascript">
$(function () {
$("area").click(function (e) {
e.preventDefault();
var offset = $(this).offset();
var relativeX = e.pageX - offset.left;
var relativeY = e.pageY - offset.top;
// 'responseText' is the "popup" HTML fragment
$.get($(this).attr("href"), function (responseText) {
$(responseText).css({
top: relativeY,
left: relativeX
}).appendTo("#territories");
// Need to be able to determine
// viewable area width and height
// so that I can check if the "popup"
// extends beyond.
$(".popup .close").click(function () {
$(this).closest(".popup").remove();
});
});
});
});
</script>
```
| How to force positioned elements to stay withing viewable browser area? | CC BY-SA 2.5 | 0 | 2010-06-10T18:11:36.653 | 2010-06-10T21:12:46.490 | 2017-02-08T14:26:52.940 | -1 | 5,651 | [
"javascript",
"jquery",
"css"
] |
3,018,469 | 1 | 3,050,377 | null | 3 | 380 | Where does the Windows XP control panel get the value for the "Comments" field from? I'm writing an EXE control panel application, and it doesn't appear from [the documentation](http://msdn.microsoft.com/en-us/library/cc144195.aspx) that you can provide a value for that field.

| Windows XP control panel - providing a value for the "comments" field | CC BY-SA 2.5 | 0 | 2010-06-10T20:58:13.837 | 2022-09-17T08:09:56.650 | null | null | 1,319 | [
"windows-xp",
"controlpanel"
] |
3,020,166 | 1 | null | null | 0 | 2,563 | I am struggling to show different views of gridview with database values. Here is my requirement.

I need to show one drop downlist with three values 1,2,3. If user selects 3 i Need to show a grid like below

Age,AnnualSales and Assortment are names which are coming dynamically from database.
High,Medium and Core all are values
Here my question is I need to show same attribute names.
Like If the name changes from "Assortment" to "Location" I need to show it in different page index .
In page index 2 i need to show like below.

Please help with solution
| How change column names randomly in gridview? | CC BY-SA 2.5 | null | 2010-06-11T04:15:03.983 | 2013-01-14T12:13:40.327 | 2017-02-08T14:26:55.020 | -1 | 158,008 | [
"c#",
"asp.net",
"vb.net",
"gridview"
] |
3,020,279 | 1 | null | null | 0 | 211 | Consider a partial view whose job is to render markup for a pizza order. The desire is to reuse this partial view in the Create, Details, and Update views.
It will always be passed an `IEnumerable<Topping>`, and output a multitude of checkboxes. There are lots... maybe 40 in all (yes, that might smell). A-OK so far.

The question is around how to include the user's choices on the Details and Update views. From the datastore, we've got a `List<ChosenTopping>`. The goal is to have each checkbox set to true for each chosen topping. What's the easiest to read, or most maintainable way to achieve this?
1. Create a ViewModel with the List and List. Write out the checkboxes as per normal. While writing each, check whether the ToppingID exists in the list of ChosenTopping.
2. Create a new ViewModel that's a hybrid of both. Perhaps call it DisplayTopping or similar. It would have property ID, Name and IsUserChosen. The respective controller methods for Create, Update, and Details would have to create this new collection with respect to the user's choices as they see fit. The Create controller method would basically set all to false so that it appears to be a blank slate.
The real application isn't pizza, and the organization is a bit different from the fakeshot, but the concept is the same.
- - - -
| designing an ASP.NET MVC partial view - showing user choices within a large set of choices | CC BY-SA 2.5 | null | 2010-06-11T04:59:40.867 | 2010-06-11T06:02:09.947 | null | null | 23,199 | [
"asp.net-mvc",
"view"
] |
3,022,880 | 1 | 3,022,917 | null | 11 | 1,783 | I am not even sure this is a previous command or a non-finished command or whatever, but I do know I really don't like it.
My problem is that some commands (or messages, or whatever) get stuck in the mini-buffer so that when I type a new command it appears there really quickly, and then the mini-buffer is back to the stubborn command. Some commands seem to be chosen, and after using lots of commands something else gets stuck there, but there is always something being shown that I don't want to see. I tried typing C-g lots of times to see if it would quit, but that does not work.
This is a picture of what I have now:

It does not matter what I do, that bit
> Label: hl-line
will not leave. It does leave momentarily when a new command is typed, but it goes back. I don't like it, it is confusing, and I would much rather see there the last used command.
I did check the customisation options for the mini-buffer (the bottom part of it can be seen in my picture), but I found nothing that seemed to be what I was looking for.
Any ideas?
| How can I prevent the mini-buffer from displaying previous commands in Emacs? | CC BY-SA 2.5 | 0 | 2010-06-11T12:58:26.667 | 2010-06-11T16:04:35.513 | 2017-02-08T14:26:56.363 | -1 | 347,646 | [
"emacs",
"minibuffer"
] |
3,022,907 | 1 | 9,501,853 | null | 6 | 1,029 | 
Here's the scenario:
I've got a table called MarketDataCurrent (MDC) that has live updating stock prices.
I've got one process called 'LiveFeed' which reads prices streaming from the wire, queues up inserts, and uses a 'bulk upload to temp table then insert/update to MDC table.' (BulkUpsert)
I've got another process which then reads this data, computes other data, and then saves the results back into the same table, using a similar BulkUpsert stored proc.
Thirdly, there are a multitude of users running a C# Gui polling the MDC table and reading updates from it.
Now, during the day when the data is changing rapidly, things run pretty smoothly, but then, after market hours, we've recently started seeing an increasing number of Deadlock exceptions coming out of the database, nowadays we see 10-20 a day. The imporant thing to note here is that these happen when the values are NOT changing.
Here's all the relevant info:
Table Def:
```
CREATE TABLE [dbo].[MarketDataCurrent](
[MDID] [int] NOT NULL,
[LastUpdate] [datetime] NOT NULL,
[Value] [float] NOT NULL,
[Source] [varchar](20) NULL,
CONSTRAINT [PK_MarketDataCurrent] PRIMARY KEY CLUSTERED
(
[MDID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
```
-

I've got a Sql Profiler Trace Running, catching the deadlocks, and here's what all the graphs look like.

Process 258 is called the following 'BulkUpsert' stored proc, repeatedly, while 73 is calling the next one:
```
ALTER proc [dbo].[MarketDataCurrent_BulkUpload]
@updateTime datetime,
@source varchar(10)
as
begin transaction
update c with (rowlock) set LastUpdate = getdate(), Value = t.Value, Source = @source
from MarketDataCurrent c INNER JOIN #MDTUP t ON c.MDID = t.mdid
where c.lastUpdate < @updateTime
and c.mdid not in (select mdid from MarketData where LiveFeedTicker is not null and PriceSource like 'LiveFeed.%')
and c.value <> t.value
insert into MarketDataCurrent
with (rowlock)
select MDID, getdate(), Value, @source from #MDTUP
where mdid not in (select mdid from MarketDataCurrent with (nolock))
and mdid not in (select mdid from MarketData where LiveFeedTicker is not null and PriceSource like 'LiveFeed.%')
commit
```
And the other one:
```
ALTER PROCEDURE [dbo].[MarketDataCurrent_LiveFeedUpload]
AS
begin transaction
-- Update existing mdid
UPDATE c WITH (ROWLOCK) SET LastUpdate = t.LastUpdate, Value = t.Value, Source = t.Source
FROM MarketDataCurrent c INNER JOIN #TEMPTABLE2 t ON c.MDID = t.mdid;
-- Insert new MDID
INSERT INTO MarketDataCurrent with (ROWLOCK) SELECT * FROM #TEMPTABLE2
WHERE MDID NOT IN (SELECT MDID FROM MarketDataCurrent with (NOLOCK))
-- Clean up the temp table
DELETE #TEMPTABLE2
commit
```
To clarify, those Temp Tables are being created by the C# code on the same connection and are populated using the C# SqlBulkCopy class.
To me it looks like it's deadlocking on the PK of the table, so I tried removing that PK and switching to a Unique Constraint instead but that increased the number of deadlocks 10-fold.
I'm totally lost as to what to do about this situation and am open to just about any suggestion.
HELP!!
---
In response to the request for the XDL, here it is:
```
<deadlock-list>
<deadlock victim="processc19978">
<process-list>
<process id="processaf0b68" taskpriority="0" logused="0" waitresource="KEY: 6:72057594090487808 (d900ed5a6cc6)" waittime="718" ownerId="1102128174" transactionname="user_transaction" lasttranstarted="2010-06-11T16:30:44.750" XDES="0xffffffff817f9a40" lockMode="U" schedulerid="3" kpid="8228" status="suspended" spid="73" sbid="0" ecid="0" priority="0" transcount="2" lastbatchstarted="2010-06-11T16:30:44.750" lastbatchcompleted="2010-06-11T16:30:44.750" clientapp=".Net SqlClient Data Provider" hostname="RISKAPPS_VM" hostpid="3836" loginname="RiskOpt" isolationlevel="read committed (2)" xactid="1102128174" currentdb="6" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
<executionStack>
<frame procname="MKP_RISKDB.dbo.MarketDataCurrent_BulkUpload" line="28" stmtstart="1062" stmtend="1720" sqlhandle="0x03000600a28e5e4ef4fd8e00849d00000100000000000000">
UPDATE c WITH (ROWLOCK) SET LastUpdate = getdate(), Value = t.Value, Source = @source
FROM MarketDataCurrent c INNER JOIN #MDTUP t ON c.MDID = t.mdid
WHERE c.lastUpdate < @updateTime
and c.mdid not in (select mdid from MarketData where BloombergTicker is not null and PriceSource like 'Blbg.%')
and c.value <> t.value </frame>
<frame procname="adhoc" line="1" stmtstart="88" sqlhandle="0x01000600c1653d0598706ca7000000000000000000000000">
exec MarketDataCurrent_BulkUpload @clearBefore, @source </frame>
<frame procname="unknown" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000">
unknown </frame>
</executionStack>
<inputbuf>
(@clearBefore datetime,@source nvarchar(10))exec MarketDataCurrent_BulkUpload @clearBefore, @source </inputbuf>
</process>
<process id="processc19978" taskpriority="0" logused="0" waitresource="KEY: 6:72057594090487808 (74008e31572b)" waittime="718" ownerId="1102128228" transactionname="user_transaction" lasttranstarted="2010-06-11T16:30:44.780" XDES="0x380be9d8" lockMode="U" schedulerid="5" kpid="8464" status="suspended" spid="248" sbid="0" ecid="0" priority="0" transcount="2" lastbatchstarted="2010-06-11T16:30:44.780" lastbatchcompleted="2010-06-11T16:30:44.780" clientapp=".Net SqlClient Data Provider" hostname="RISKBBG_VM" hostpid="4480" loginname="RiskOpt" isolationlevel="read committed (2)" xactid="1102128228" currentdb="6" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
<executionStack>
<frame procname="MKP_RISKDB.dbo.MarketDataCurrentBlbgRtUpload" line="14" stmtstart="840" stmtend="1220" sqlhandle="0x03000600005f9d24c8878f00849d00000100000000000000">
UPDATE c WITH (ROWLOCK) SET LastUpdate = t.LastUpdate, Value = t.Value, Source = t.Source
FROM MarketDataCurrent c INNER JOIN #TEMPTABLE2 t ON c.MDID = t.mdid;
-- Insert new MDID </frame>
<frame procname="adhoc" line="1" sqlhandle="0x010006004a58132228bf8d73000000000000000000000000">
MarketDataCurrentBlbgRtUpload </frame>
</executionStack>
<inputbuf>
MarketDataCurrentBlbgRtUpload </inputbuf>
</process>
</process-list>
<resource-list>
<keylock hobtid="72057594090487808" dbid="6" objectname="MKP_RISKDB.dbo.MarketDataCurrent" indexname="PK_MarketDataCurrent" id="lock5ba77b00" mode="U" associatedObjectId="72057594090487808">
<owner-list>
<owner id="processc19978" mode="U"/>
</owner-list>
<waiter-list>
<waiter id="processaf0b68" mode="U" requestType="wait"/>
</waiter-list>
</keylock>
<keylock hobtid="72057594090487808" dbid="6" objectname="MKP_RISKDB.dbo.MarketDataCurrent" indexname="PK_MarketDataCurrent" id="lock65dca340" mode="U" associatedObjectId="72057594090487808">
<owner-list>
<owner id="processaf0b68" mode="U"/>
</owner-list>
<waiter-list>
<waiter id="processc19978" mode="U" requestType="wait"/>
</waiter-list>
</keylock>
</resource-list>
</deadlock>
</deadlock-list>
```
| Deadlock in SQL Server 2005! Two real-time bulk upserts are fighting. WHY? | CC BY-SA 2.5 | 0 | 2010-06-11T13:01:54.647 | 2012-02-29T15:26:07.910 | 2017-02-08T14:26:57.047 | -1 | 270,317 | [
"sql-server-2005",
"deadlock",
"bulk",
"primary-key",
"database-deadlocks"
] |
3,023,870 | 1 | 3,298,641 | null | 0 | 160 | I have a rather complicated Binding situation. I have a solution that I created in windows forms for this back in VS2005, but now I am recreating the control using wpf, but I am not doing it in exactly the same way I had done it before.
I have a listbox control that has the following DataTemplate:
```
<DataTemplate>
<Border CornerRadius="5" BorderBrush="Black" BorderThickness="1">
<StackPanel>
<TextBlock x:Name="TaxonomyCode" Margin="2" FontWeight="Bold"
FontSize="12">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}{1}{2}X">
<Binding Path="TaxonomyTypeID" />
<Binding Path="TaxonomyClassificationID" />
<Binding Path="TaxonomySpecializationID" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock Margin="2"
Text="{Binding ElementName=TaxonomyCode,Path=Text,Converter={StaticResource TaxonomyCodeToDescriptionConverter}}" />
</StackPanel>
</Border>
</DataTemplate>
```
Below that I have 3 listboxes that list the actual Taxonomy Hierarchies using properties on my ViewModel...
```
<ListBox
Grid.Column="0" Grid.Row="1"
ItemsSource="{Binding TaxonomyTypeLUT}"
DisplayMemberPath="IDDescription"
SelectedItem="{Binding Path=SelectedTaxonomyType}" />
<ListBox
Grid.Column="1" Grid.Row="1"
ItemsSource="{Binding SelectedTaxonomyType.TaxonomyClassifications}"
DisplayMemberPath="IDDescription"
SelectedItem="{Binding Path=SelectedTaxonomyClassification}" />
<ListBox
Grid.Column="2" Grid.Row="1"
ItemsSource="{Binding SelectedTaxonomyClassification.TaxonomySpecializations}"
DisplayMemberPath="IDDescription"
SelectedItem="{Binding SelectedTaxonomySpecializations}" />
```
The actual datatbase binding is kindof complex as well. With multiple keys for each table in the hierarchy because each table can contain the same key that belongs to different parents... for example
taxonomy code : 207R00000X which breaks down to: 20 7R 00000 translates to: Allopathic,internal medicine,internal medicine
taxonomy code : 208M00000X which breaks down to: 20 8M 00000 translates to: allopathic, hospitalist, hospitalist
Each of those break downs is the keyfield in its own table.

Here is the design of my tables.
I am trying to have my lower control change each child as a new selection is made. I have that working. Now though when I select the top list, I want the bottom lists to reflect the Taxonomy of the selected item. I can get that done too by binding One-Way.
If I don't bind oneway I get this ErrorMessage:"The property 'TaxonomySpecializationID' is part of the object's key information and cannot be modified."
Ideally what I want to be able to do, is change the taxonomy of the selected DoctorTaxonomy using the listboxes. Maybe it just won't work...
| How to edit Parent ListboxItem from separate Listboxes that are hierarchically linked | CC BY-SA 3.0 | null | 2010-06-11T15:02:42.530 | 2017-08-13T01:55:48.463 | 2017-08-13T01:55:48.463 | 1,033,581 | 183,408 | [
"wpf",
"database-design",
"data-binding",
"wpf-controls"
] |
3,024,849 | 1 | 3,025,192 | null | 1 | 370 | Is it possible to have divs located around a central point and then on hover for them to whisk off screen and return when the mouse is gone?
This what the layout:

[http://pena-alcantara.com/aramael/wp-content/uploads/2010/04/Paper-Browser.8.5x11.Horizontal3.jpg](http://pena-alcantara.com/aramael/wp-content/uploads/2010/04/Paper-Browser.8.5x11.Horizontal3.jpg)
is looking like, the idea is for the green "leaves" to whisk off to show the branches and the menus. Would this be possible with JavaScript and PHP?
| How can I animate DIVs moving from a central point to off-screen? | CC BY-SA 3.0 | null | 2010-06-11T17:26:42.173 | 2011-12-01T22:59:30.480 | 2011-12-01T22:59:30.480 | 234,976 | 364,775 | [
"javascript",
"animation",
"css",
"html"
] |
3,024,939 | 1 | 3,025,478 | null | 35 | 12,959 | I have an NxM matrix in MATLAB that I would like to reorder in similar fashion to the way JPEG reorders its subblock pixels:
 [(image from Wikipedia)](http://en.wikipedia.org/wiki/JPEG)
I would like the algorithm to be generic such that I can pass in a 2D matrix with any dimensions. I am a C++ programmer by trade and am very tempted to write an old school loop to accomplish this, but I suspect there is a better way to do it in MATLAB.
I'd be rather want an algorithm that worked on an `NxN` matrix and go from there.
### Example:
```
1 2 3
4 5 6 --> 1 2 4 7 5 3 6 8 9
7 8 9
```
| Matrix "Zigzag" Reordering | CC BY-SA 4.0 | 0 | 2010-06-11T17:41:42.077 | 2019-01-31T16:47:34.603 | 2019-01-31T16:47:34.603 | 10,607,772 | 153,535 | [
"matlab",
"loops",
"matrix"
] |
3,025,595 | 1 | 3,027,570 | null | 25 | 4,678 |
## The Challenge
The shortest code by character count that takes a single input integer `N` (N >= 3) and returns an array of indices that when iterated would traverse an `N`x`N` matrix according to the JPEG "zigzag" scan pattern. The following is an example traversal over an 8x8 matrix[src](http://en.wikipedia.org/wiki/Jpeg):

### Examples
(The middle matrix is not part of the input or output, just a representation of the NxN matrix the input represents.)
```
1 2 3
(Input) 3 --> 4 5 6 --> 1 2 4 7 5 3 6 8 9 (Output)
7 8 9
1 2 3 4
(Input) 4 --> 5 6 7 8 --> 1 2 5 9 6 3 4 7 10 13 14 11 8 12 15 16 (Output)
9 10 11 12
13 14 15 16
```
### Notes
- - [this question](https://stackoverflow.com/questions/3024939)
## Bonus
Extend your answer to take two inputs `N` and `M` (N, M >=3) and perform the same scan over an `N`x`M` matrix. (In this case `N` would be the number of columns and `M` the number of rows.)
### Bonus Examples
```
1 2 3 4
(Input) 4 3 --> 5 6 7 8 --> 1 2 5 9 6 3 4 7 10 11 8 12 (Output)
9 10 11 12
1 2 3
(Input) 3 4 --> 4 5 6 --> 1 2 4 7 5 3 6 8 10 11 9 12 (Output)
7 8 9
10 11 12
```
| Code Golf: Zigzag pattern scanning | CC BY-SA 2.5 | 0 | 2010-06-11T19:20:00.993 | 2015-04-03T16:43:04.163 | 2017-05-23T12:24:21.783 | -1 | 153,535 | [
"language-agnostic",
"code-golf",
"rosetta-stone"
] |
3,026,721 | 1 | null | null | 2 | 4,304 | I have set negative paddings on my custom seekbar so that the round thumb image can go outside the bar, but the thumb isn't rendered out there, is there anyway to force the thumb to be drawn outside those bounds?
Sorry guys, I'm new to Android development, and have been tasked with fixing an existing application. The problem is that we have a custom rounded looking track bar, which consists of two rounded 'end cap' images and a 1 px background that is tiled to create the seekbar. As far as I can tell there was never one image that could be set as the background of a normal SeekBar, which is why a custom one was created.
The thumb is a circle and needs to 'fit' into the end caps - the three pieces of the bar are in a relative layout. Right now I'm kind of unclear as to how the 1 px background png gets stretched as the seekbar bg, otherwise I would try to tack on the two endcaps onto that drawable some how ... ?
Please let me know if this was unclear and I'll try to post any followup info. Thanks in advance for any advice!!
Oh, I'm using Android 2.1 if that's relevant to anyone's interests :)
This is what it looks like when the thumb all the way over - outside of the seekbar. Ideally what I need is for the thumb to be shown as 'inside' the endcap image :-/

| Is it possible to have a SeekBar's thumb image extend outside the bar? | CC BY-SA 3.0 | 0 | 2010-06-11T22:46:07.683 | 2017-03-01T23:53:36.630 | 2017-03-01T23:53:36.630 | 2,911,458 | 364,937 | [
"android",
"offset",
"seekbar",
"margins"
] |
3,026,841 | 1 | null | null | 2 | 1,420 | I'm trying to do something which seems like it should be extremely simple and yet I can't see how. I have a very simple layout, a TextBox with an image next to it, similar to the way it might look adorned with an ErrorProvider in a WinForms application. The problem is, I want the image to be no higher than the TextBox it's next to. If I lay it out like this, say:
```
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Row="0" Grid.Column="0" MinWidth="100"/>
<Image Grid.Row="0" Grid.Column="1" Source="error.png" />
</Grid>
```
the row will size to the height of the image if the image is taller than the TextBox. This also happens if I use a DockPanel or StackPanel.
The naive solution would be to bind the `Height` to the `TextBox`'s `ActualHeight`. I'm sure this is wrong. But what's right?
Here's an example of what looks wrong to me: In both of these layouts (which are both horizontal `StackPanel`s), the `FontSize` is the only variable:

You can see that the first `TextBox` is constrained to the height of the icon, and as a result has an unnecessary bottom padding under the text. And the icon next to the second is out of scale to the `TextBox` it's next to.
As it happens, I found a completely different (and much better) way to approach the problem - originally I was scaling my layout by changing the `FontSize` on the `Window`, but using a `ScaleTransform` is a whole lot easier and seems to work perfectly. But even so, it still seems odd to me that it's so hard to do this.
| How do I constrain a container's height to the height of a specific content element? | CC BY-SA 2.5 | 0 | 2010-06-11T23:21:42.250 | 2010-07-31T23:25:39.070 | 2010-07-31T23:25:39.070 | 19,403 | 19,403 | [
"wpf",
"layout",
"size",
"panel",
"element"
] |
3,027,032 | 1 | 3,028,199 | null | 0 | 4,568 | I have this image as the background of the form:

---
So my form looks like this:
[http://img823.imageshack.us/i/cisto.jpg/](http://img823.imageshack.us/i/cisto.jpg/)
---
When I resize it it looks like this: [http://img820.imageshack.us/i/cistoumanjeno.jpg/](http://img820.imageshack.us/i/cistoumanjeno.jpg/)
---
Now what I need to do is to put listeners on every rectangle like on the picture: [http://img810.imageshack.us/img810/238/18887457.jpg](http://img810.imageshack.us/img810/238/18887457.jpg)
---
I made transparent panels and put them on form to match the rectangles on the image (on image, panels are green so you can see where they are): [http://img809.imageshack.us/i/paneli.jpg/](http://img809.imageshack.us/i/paneli.jpg/)
---
but when I resize the form it turns like this: [http://img810.imageshack.us/i/paneliumanjeno.jpg/](http://img810.imageshack.us/i/paneliumanjeno.jpg/)
---
anchor and dock properties don't work because they rely on parent container and here rectangles are on background image.
---
QUESTION:
I would like to do something like "relative-resize and position". Is that posible? So when I resize form, all the panels fits the rectangles on image.
This code works, only bad thing is when I am resizing main form, it "strugles". When I move mouse cursor while resizing it is not going smooth, it "strugles". And after half a second after i stop resizing panels are where they should be.
Image while resizing:

Image when I stop resizing, and after half a second after stop resizing:

Any suggestions about that or I should just leave it that way? There are lots of calculations here so that's why it struggles.
| C# resize all elements in form when resizing form | CC BY-SA 3.0 | 0 | 2010-06-12T00:37:37.553 | 2011-12-14T03:00:25.257 | 2011-12-14T03:00:25.257 | 214,668 | 365,011 | [
"c#",
"image",
"forms",
"resize",
"background"
] |
3,029,026 | 1 | 3,029,029 | null | 0 | 289 | I am trying to setup tables so the result outcomes like this:

Code:
```
<table width="60%" cellpadding="0" cellspacing="1" id="theBoxer">
<tr style="background: #686868 ;">
<td align="center" valign="top" width="240" height="25" style="border:1px #FFF solid;">About me</td>
</tr>
<tr>
<td align="left" valign="top" width="250" height="112" style="">
Points:<br>
Lalala: <br>
Lalala: <br>
</td>
<td align="left" valign="top" width="250" height="112" style="">
Lalala: <br>
Lalala:
</tr>
</table>
```
Can't get it to work like how I wanted.
The problem I get with my code is that "About me" only covers for the first cell and not the other.
| Table HTML layout | CC BY-SA 3.0 | null | 2010-06-12T14:46:06.210 | 2016-10-17T07:57:18.563 | 2016-10-17T07:57:18.563 | 5,104,748 | 267,304 | [
"html",
"html-table"
] |
3,029,253 | 1 | null | null | 1 | 1,158 | When i create a JCheckBox in my Swing application i leave some extra space after its label, so if the JCheckBox label is for example 100 pixels width, i make the JCheckBox 120 pixels for safety.
The problem as at runtime, it's not nice that a user can click on the empty space after the JCheckBox label and it can be actually clicked, like this :

This seems fancy a bit, but i like to make things look perfect :)
I use [FormLayout](http://www.jgoodies.com/freeware/forms/), and I define the `JCheckBox` like this :
```
CellConstraints con = new CellConstraints();
contentPane.add(checkBox1, con.xywh(3, 13, 10, 1));
```
| How to force resize JCheckBox to prevent clicking the empty space? | CC BY-SA 3.0 | null | 2010-06-12T16:06:11.103 | 2013-04-24T12:08:58.243 | 2013-04-24T12:08:58.243 | 714,965 | 147,381 | [
"java",
"swing",
"resize",
"jcheckbox"
] |
3,030,060 | 1 | 3,031,396 | null | 2 | 4,869 | I am using memoir class with latex, and I need the two characters:
"«", and "»".
I found the following commands:
`\guillemotright` and `\guillemotleft`, but they look ugly. Is there something wrong in what I am doing? Latex source:
[http://pastebin.com/1w0J6jbN](http://pastebin.com/1w0J6jbN)
Result:

Any help would be very appreciated. Thanks!
—Albé
| Latex and Memoir class, guillemot left/right | CC BY-SA 3.0 | null | 2010-06-12T20:58:51.323 | 2011-10-15T23:55:44.060 | 2011-10-15T23:55:44.060 | 758,485 | 223,090 | [
"latex",
"memoir"
] |
3,030,188 | 1 | 3,030,192 | null | -1 | 175 | I'm looking to develop my own task application so I'm trying to study the UI of any possible in-browser apps that have some sort of functionality which has an ordered list where items can be tagged as "done" and they either get color-highlighted or move into a "DONE" column.
By the way, the area would be a tinyMCE or similar editable area and not some primitive html rendering.
Example:

| Web app that contains a check-list based task management UI? | CC BY-SA 2.5 | null | 2010-06-12T21:38:22.327 | 2012-10-25T10:49:12.510 | 2012-10-25T10:49:12.510 | 1,252,063 | 145,190 | [
"user-interface",
"checkbox",
"task-management"
] |
3,034,102 | 1 | 3,034,113 | null | 0 | 45 | Codeplex gave me the relevant information for proper connection, and I connected to my repository using the Team > Connect to Team Foundation Sever in VS 2010 Ultimate.
Here is what I see:

How can I push the code I have made on my machine, to the repository on CodePlex?
| I'm having trouble pushing my source code from my local drive to CodePlex using Visual Studio 2010 Ultimate | CC BY-SA 2.5 | null | 2010-06-13T22:09:47.733 | 2016-02-14T16:11:20.257 | 2020-06-20T09:12:55.060 | -1 | 112,355 | [
".net",
"visual-studio-2010",
"codeplex"
] |
3,035,322 | 1 | 3,035,682 | null | 8 | 24,166 | I am using table to display a set of data, my HTML code goes here...
```
<table border="1" cellspacing="0" cellpadding="0" style="width: 780px;">
<tbody>
<tr>
<td style="width: 780px; height: 25px;">
<pre width='100' style='width: 780px; word-wrap: break-word;'>
the data goes here.....
</pre>
</td>
</tr>
<tr>
<td style="width: 780px; height: 25px;">
<pre width='100' style='width: 780px; word-wrap: break-word;'>
the data goes here.....
</pre>
</td>
</tr>
</tbody>
</table>
```
this table works ok in firefox, safari, and IE8. But the problem arise in IE7, IE6.. asthe table expands and goes out of the screen(i.e expands towards right hand side in x-axis)....
is there any hack to fix it?
the screen shots of IE6 in IETester:

| HTML Table width in IE? | CC BY-SA 3.0 | 0 | 2010-06-14T06:27:09.733 | 2014-03-04T00:29:59.613 | 2014-03-04T00:29:59.613 | 881,229 | 212,595 | [
"html",
"css",
"html-table"
] |
3,036,822 | 1 | 3,036,844 | null | 0 | 241 | I'm using os.popen() in order to run a few commands.
This is what looks like:

---
Any ideas why the text is displayed as such. I tried both Arial and Consolas fonts.
Help would be amazing! Thanks
| Using popen, but text looks weird - Python | CC BY-SA 2.5 | 0 | 2010-06-14T11:30:24.033 | 2010-06-14T11:38:53.393 | null | null | 208,827 | [
"python",
"command-line",
"popen"
] |
3,036,987 | 1 | null | null | 0 | 2,498 | i am using jquery to create the following using this code
```
<script>
$(document).ready(function() {
$("#content").tabs({ fx: { opacity: 'toggle' } });
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$("#documents").tabs({ fx: { opacity: 'toggle' } });
});
</script>
```
Here it is in firefox working like in every other browser like this:

but in ... it does this but in 7 its fine.

I think it is somethin to do with the script opacity but i cant get it to work. does any one have any idea.
Cheers
| Jquery tabs and IE8 | CC BY-SA 2.5 | null | 2010-06-14T11:57:43.107 | 2010-12-06T18:47:28.693 | 2010-06-14T12:23:39.400 | 94,197 | 356,309 | [
"jquery",
"internet-explorer-8"
] |
3,039,141 | 1 | 3,234,889 | null | 3 | 3,401 | I'm currently recoding a bar chart in my app to make use of the `Chart` class in the [WPF Toolkit](http://wpf.codeplex.com/). Using MVVM, I'm binding the `ItemsSource` of a `ColumnSeries` in my chart to a property on my viewmodel. Here's the relevant XAML:
```
<charting:Chart>
<charting:ColumnSeries ItemsSource="{Binding ScoreDistribution.ClassScores}"
IndependentValuePath="ClassName" DependentValuePath="Score"/>
</charting:Chart>
```
And the property on the viewmodel:
```
// NB: viewmodel derived from Josh Smith's BindableObject
public class ExamResultsViewModel : BindableObject
{
// ...
private ScoreDistributionByClass _scoreDistribution;
public ScoreDistributionByClass ScoreDistribution
{
get
{
return _scoreDistribution;
}
set
{
if (_scoreDistribution == value)
{
return;
}
_scoreDistribution = value;
RaisePropertyChanged(() => ScoreDistribution);
}
}
```
However, when I update the `ScoreDistribution` property (by setting it to a new `ScoreDistribution` object), the chart gets an series (based on the new ScoreDistribution) as well as keeping the original series (based on the previous ScoreDistribution).
To illustrate this, here are a couple of screenshots showing the chart before an update (with a single data point in `ScoreDistribution.ClassScores`) and after it (now with 3 data points in `ScoreDistribution.ClassScores`):


Now, I realise there are other ways I could be doing this (e.g. changing the contents of the original `ScoreDistribution` object rather than replacing it entirely), but I don't understand why it's going wrong in its current form. Can anyone help?
| Binding update adds news series to WPF Toolkit chart (instead of replacing/updating series) | CC BY-SA 3.0 | 0 | 2010-06-14T16:50:38.837 | 2013-02-11T13:34:11.020 | 2013-02-11T13:34:11.020 | 8,705 | 8,705 | [
"wpf",
"binding",
"charts",
"wpftoolkit"
] |
3,040,841 | 1 | 3,044,772 | null | 9 | 494 | I'd like to know if it ever makes sense to provide some functionality in a piece of software that is only available to the user through a context (right click) menu. It seems that in most software I've worked with the right click menu is always used as a quick way to get to features that are otherwise available from other buttons or menus.
Below is a screen shot of the UI I'm developing. The tree view on the right shows the user's library of catalogs. Users can create new catalogs, or add and remove existing catalogs to and from their library. Catalogs in their library can then be opened or closed, or set to read-only.

The screen shot shows the context menu I've created for the browser. Some commands can be executed independently from any specific catalog (New, Add). Yet the other commands must be applied to a specifically selected catalog (Close, Open, Remove, ReadOnly, Refresh, Clean UP, Rename).
Currently the "Catalog" menu at the top of the window looks identical to this context menu. Yet I think this may be confusing to the users as the tree view which shows the currently selected catalog may not always be visible. The user may have switched to the Search or Filters tab, or the left pane may be hidden entirely.
However, I'm hesitant to change the UI so that the commands that depends on a specifically selected catalog are only available through the context menu.
| Is it wrong for a context (right click) menu be the only way a user can perform a certain task? | CC BY-SA 2.5 | 0 | 2010-06-14T20:53:34.380 | 2010-06-15T12:03:10.473 | null | null | 88,427 | [
"user-interface"
] |
3,041,629 | 1 | 3,217,292 | null | 1 | 402 | In my 'cellForRowAtIndexPath' method for a UITableView delegate, I'm allocating a cell if it doesn't exist, and in this cell, I'm creating a new activity spinner like so:
`UIActivityIndicatorView *actView = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray ] autorelease];`
I'm using Leaks to detect memory leaks in my program, and for some reason, this is coming up as a leak, even though it's autoreleasing. The cell itself is also autoreleasing. Has anyone had experience with autoreleasing variables coming up as leaks in the Leaks instrument, and how to tackle these problems?
This is only leaking if I add it to the cell's contentView. If I just create it and let it be, the Leak instrument doesn't report any problem.
Also, if it helps, this is the history Leaks is displaying for this memory location. It looks like it at some point gets an additional retain message? This is not being done in my code.

| Autorelease with elements in a UITableViewCell - memory leak | CC BY-SA 2.5 | null | 2010-06-14T23:26:54.900 | 2010-07-10T00:23:05.153 | 2017-02-08T14:27:02.747 | -1 | 244,968 | [
"iphone",
"objective-c",
"memory-leaks"
] |
3,042,021 | 1 | 3,126,296 | null | 6 | 1,440 | I'm using a ToolStripContainer that contains three ToolStrips. At design time I move the ToolStrips to the positions I want them in, which is in a horizontal row across the top of the form like this:

I then close and save the Form. However, if I open the form up again the ToolStrips end up stacked up on the left side of the ToolStripContainer like this:

How can I keep the ToolStrips in the positions that I specify?
| Why do my horizontal toolstrips keep stacking verticaly? | CC BY-SA 2.5 | 0 | 2010-06-15T01:29:22.940 | 2010-06-27T03:29:52.247 | null | null | 88,427 | [
"c#",
"winforms",
"toolstrip",
"toolstripcontainer"
] |
3,042,906 | 1 | null | null | 2 | 735 | 
That image shows what I'm talking about.
Visual Studio 2010 on the left, Visual Studio 2005 on the right.
If you ignore the jpeg compression artifacts you can tell that the left icons are much blurrier than the right icons.
Is there some way to turn off this anti-aliasing?
| Why are the Visual Studio 2010 icons blurry when compared to the Visual Studio 2005 icons? | CC BY-SA 3.0 | null | 2010-06-15T06:12:04.570 | 2011-12-03T23:56:48.453 | 2011-12-03T23:56:48.453 | 84,042 | 266,767 | [
"visual-studio-2010"
] |
3,045,258 | 1 | 3,045,933 | null | 0 | 3,536 | I have a ItemsControl in a ScrollViewer, and when the items exceed the width of the ScrollViewer they are put into a ContextMenu and shown as a DropDown instead. My problem is that when the Context Menu is first loaded, it saves the saves the size of the Menu and does not redraw when more commands get added/removed.
For example, a panel has 3 commands. 1 is visible and 2 are in the Menu. Viewing the menu shows the 2 commands and draws the control, but then if you resize the panel so 2 are visible and only 1 command is in the menu, it doesn't redraw the menu to eliminate that second menu item. Or even worse, if you shrink the panel so that no commands are shown and all 3 are in the Menu, it will only show the top 2.

Here's my code:
```
<Button Click="DropDownMenu_Click"
ContextMenuOpening="DropDownMenu_ContextMenuOpening">
<Button.ContextMenu>
<ContextMenu ItemsSource="{Binding Path=MenuCommands}" Placement="Bottom">
<ContextMenu.Resources>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Command" Value="{Binding Path=Command}" />
<Setter Property="Visibility" Value="{Binding Path=IsVisible, Converter={StaticResource ReverseBooleanToVisibilityConverter}}"/>
</Style>
</ContextMenu.Resources>
<ContextMenu.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DisplayName}" />
</DataTemplate>
</ContextMenu.ItemTemplate>
</ContextMenu>
</Button.ContextMenu>
</Button>
```
Code Behind:
```
void DropDownMenu_ContextMenuOpening(object sender, ContextMenuEventArgs e)
{
Button b = sender as Button;
b.ContextMenu.IsOpen = false;
e.Handled = true;
}
private void DropDownMenu_Click(object sender, RoutedEventArgs e)
{
Button b = sender as Button;
ContextMenu cMenu = b.ContextMenu;
if (cMenu != null)
{
cMenu.PlacementTarget = b;
cMenu.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom;
cMenu.IsOpen = true;
}
}
```
I have tried using InvalidateVisual and passing an empty delegate on Render to try and force a redraw, however neither works. I'm using .Net 4.0.
| WPF - Redrawing a Context Menu when Items change? | CC BY-SA 2.5 | 0 | 2010-06-15T12:51:28.303 | 2010-06-15T14:07:52.020 | 2017-02-08T14:27:04.237 | -1 | 302,677 | [
"wpf",
"dynamic",
"refresh",
"contextmenu",
"redraw"
] |
3,045,406 | 1 | null | null | 2 | 1,177 | I need to launch a Dialog from home screen widget, so I created an Activity with `android:theme="@android:style/Theme.Dialog"`
The problem is, that I would like make it look like standard dialog window ( buttons on the gray background, font and text size, paddings etc), like here:
[](https://i.stack.imgur.com/ZyYYq.png)
[android.com](http://developer.android.com/images/dialog_buttons.png)
This is how my "dialog" Activity looks like:

Is there some standard way (theme?) to make it look like standard system dialogs? Or do I have to imitate it in my own layout?
| Tunning up Activity with dialog theme | CC BY-SA 4.0 | null | 2010-06-15T13:09:48.227 | 2019-07-29T17:09:36.697 | 2019-07-29T17:09:36.697 | 4,751,173 | 306,831 | [
"android",
"android-widget",
"android-layout"
] |
3,045,744 | 1 | 3,138,630 | null | 2 | 2,457 | is it possible to change the language of my wordpress installation (WP 3.0 Multisite) only in frontend (without editing the .mo/.po files)?
changing this option here:

does also change my language in backend.
any ideas?
thanks for helping!
| single backend Language or different frontend Language in Wordpress | CC BY-SA 2.5 | null | 2010-06-15T13:49:10.423 | 2012-07-07T02:41:31.163 | 2017-02-08T14:27:04.963 | -1 | 253,288 | [
"wordpress",
"backend"
] |
3,046,378 | 1 | null | null | 0 | 845 | Using Joomla, I have a flat list menu (see image) and am using separator links with images to separate the menu links.

I'd like to style the menu links (not the separator links) so that they are lifted up slightly and are sitting more centrally among the separator images.
Can anybody help with this?
| Styling individual menu links in Joomla! | CC BY-SA 2.5 | null | 2010-06-15T14:58:34.033 | 2012-05-10T20:47:33.313 | 2017-02-08T14:27:05.333 | -1 | 271,132 | [
"css",
"joomla",
"menu"
] |
3,048,305 | 1 | null | null | 24 | 6,643 | I am looking for an algorithm to wrap text within a non-rectangular shape, preferably based on the Knuth and Plass algorithm. The hardest part of this is that the lines may have different heights due to differing font sizes in the text. The image below is an example of what the algorithm should be able to generate.

| Algorithm for Text Wrapping Within a Shape | CC BY-SA 3.0 | 0 | 2010-06-15T19:20:52.537 | 2017-10-15T00:28:57.267 | 2017-10-15T00:28:57.267 | 1,494,454 | 140,951 | [
"javascript",
"algorithm",
"graphics",
"text",
"word-wrap"
] |
3,048,315 | 1 | 3,048,589 | null | 3 | 1,321 | I have a listlayout with items in it that looks like this:

There is first an ImageView (the light) and then two textViews. All of this inside a TableLayout. (source here: [http://code.google.com/p/switchctrl/source/browse/trunk/android/res/layout/device_switch.xml](http://code.google.com/p/switchctrl/source/browse/trunk/android/res/layout/device_switch.xml))
I want to have a rotating animation of a loading indicator Ontop of this light when this particular device (light) performs an action or an action is performed on it.
How do I put an animation ontop of this light imageview?
| Imageview ontop of another imageview | CC BY-SA 2.5 | null | 2010-06-15T19:22:24.317 | 2010-06-16T09:04:55.073 | 2017-02-08T14:27:05.707 | -1 | 247,004 | [
"android",
"listview",
"animation",
"imageview"
] |
3,050,735 | 1 | 3,056,985 | null | 2 | 961 | I know this is more programming related site but I couldnt think of a better place to ask this... anyways, Im trying to use the new Embed from video site feature but it seems to be disabled. Please help?

| Power Point 2010 youtube embeding problem | CC BY-SA 2.5 | null | 2010-06-16T04:34:08.163 | 2011-01-19T06:45:29.180 | 2011-01-19T06:45:29.180 | 149,573 | 167,519 | [
"vba",
"youtube",
"powerpoint"
] |
3,051,583 | 1 | null | null | 12 | 8,390 | How do you align views relative to the "middle" part of another view?
I think it is best explained with a pic of the UI I'm trying to create in android.

| How to align views in the middle of another views baseline? | CC BY-SA 2.5 | 0 | 2010-06-16T08:07:41.320 | 2012-02-02T12:30:34.700 | 2010-10-07T15:36:33.857 | 114,066 | 357,652 | [
"android",
"view"
] |
3,053,158 | 1 | 3,059,238 | null | 10 | 4,865 | Recently I installed in Visual Studio 2010 the [Power Tools Extension](http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef) It's working great, however I have problems with my text coloring theme ([Nightfall](http://studiostyles.info/schemes/nightfall)), and the extension's Colorized Parameter feature.
Since the theme text fore color is grey, when the Power Tools Extensions shows the Parameter Help tooltip using my text colors, it gets unreadable:

Is there a way to change Parameter Help background color?
| Visual Studio 2010 Themes, change Parameter Help background color | CC BY-SA 2.5 | 0 | 2010-06-16T12:22:55.837 | 2014-06-18T14:38:02.990 | 2017-02-08T14:27:08.637 | -1 | 235,853 | [
"visual-studio-2010"
] |
3,057,119 | 1 | 3,057,165 | null | 1 | 657 | I have string that contains "1.3" and I am checking with Date.TryParse method. It automatically converting into "1/3/2010". How to handle this?


| Date.TryParse for decimal converting date | CC BY-SA 2.5 | null | 2010-06-16T20:57:15.373 | 2010-06-16T21:11:52.120 | 2017-02-08T14:27:11.420 | -1 | 158,008 | [
"asp.net",
"vb.net"
] |
3,058,059 | 1 | 3,058,066 | null | 56 | 99,389 | How do I unmap a project in Team Foundation Server 2010?
I changed the location of a source control, and completely removed it from TFS source control. but now it is showing up wanting to add it:

Also, when I try to Map the new project, it is giving the error below. I've completely deleted the files off my local PC, and I'm wanting to map and get latest version from source control, but it gives an error trying to map. I'd rather not change the location. How do I remove the old binding and the project, when it was already deleted using `TfsDeleteProject.exe`?

| How do I unmap a project? | CC BY-SA 3.0 | 0 | 2010-06-17T00:06:17.597 | 2015-07-18T22:09:57.230 | 2015-07-18T22:09:57.230 | 1,768,232 | 1,398,964 | [
"visual-studio",
"tfs"
] |
3,058,111 | 1 | 3,058,178 | null | 13 | 48,514 | How do I set Environment Variables in Visual Studio 2010?
I found [this web page](http://msdn.microsoft.com/en-us/library/ee479070.aspx).
Which says:
From the Project menu, choose Properties.
In the left pane, select Configuration Properties, and then select Environment.
But when I select "Configuration Properties", there is no "Enviroment" option:

This is an example in VS 2008:

But how is it done in VS 2010?
| How do I set Environment Variables in Visual Studio 2010? | CC BY-SA 3.0 | 0 | 2010-06-17T00:25:04.550 | 2013-03-08T03:11:46.400 | 2013-03-08T03:11:46.400 | 41,956 | 54,760 | [
"c#",
".net",
"windows",
"visual-studio",
"environment-variables"
] |
3,058,150 | 1 | 3,058,249 | null | 11 | 3,758 | I have to be able to set a random location for a waypoint for a flight sim. The maths challenge is straightforward:
"To find a single random location within a quadrangle, where there's an equal chance of the point being at any location."
Visually like this:

An example ABCD quadrangle is:
A:[21417.78 37105.97]
B:[38197.32 24009.74]
C:[1364.19 2455.54]
D:[1227.77 37378.81]
Thanks in advance for any help you can provide. :-)
EDIT
Thanks all for your replies. I'll be taking a look at this at the weekend and will award the accepted answer then. BTW I should have mentioned that the quadrangle can be CONVEX OR CONCAVE. Sry 'bout dat.
| How to find a random point in a quadrangle? | CC BY-SA 2.5 | 0 | 2010-06-17T00:34:09.817 | 2019-07-29T23:12:05.140 | 2017-02-08T14:27:11.760 | -1 | 97,855 | [
"c#",
"geometry",
"computational-geometry"
] |
3,058,992 | 1 | 3,059,528 | null | 8 | 5,945 | I'm trying to develop an algorithm that identifies all possible paths between two nodes in a graph, as in this example:
.
in fact, i just need to know which nodes appear in all existing paths.
in the web only got references about DFS, A* or dijkstra, but i think they doesn't work in this case.
Does anyone know how to solve it?
| All possible paths in a cyclic undirected graph | CC BY-SA 3.0 | 0 | 2010-06-17T05:02:32.937 | 2015-07-14T16:49:05.750 | 2015-07-14T16:49:05.750 | 360,899 | 368,926 | [
"java",
"c++",
"algorithm"
] |
3,065,964 | 1 | null | null | 0 | 1,506 | i wish to achieve: 
so in my shopping cart page i set `session("Payment_Amount") = total`
and downloaded both asp files the wizard told me. and . and added the API credentials to the corect place.
and i add the form from their wizard:
```
<form action='expresscheckout.asp' METHOD='POST'>
<input type='image' name='submit' src='https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif' border='0' align='top' alt='Check out with PayPal'/>
</form>
```
But when i go to my shopping cart and press on the paypal submit button i am taken to expressheckout.asp but the page stays whit, saying Done in the status bar. how can i debug that? :/
EDIT ADDED MY CODE, ASP:
```
<!-- #include file ="paypalfunctions.asp" -->
<%
' ==================================
' PayPal Express Checkout Module
' ==================================
On Error Resume Next
'------------------------------------
' The paymentAmount is the total value of
' the shopping cart, that was set
' earlier in a session variable
' by the shopping cart page
'------------------------------------
paymentAmount = Session("Payment_Amount")
'------------------------------------
' The currencyCodeType and paymentType
' are set to the selections made on the Integration Assistant
'------------------------------------
currencyCodeType = "USD"
paymentType = "Sale"
'------------------------------------
' The returnURL is the location where buyers return to when a
' payment has been succesfully authorized.
'
' This is set to the value entered on the Integration Assistant
'------------------------------------
returnURL = "http://www.noamsm.co.il/index.asp"
'------------------------------------
' The cancelURL is the location buyers are sent to when they click the
' return to XXXX site where XXX is the merhcant store name
' during payment review on PayPal
'
' This is set to the value entered on the Integration Assistant
'------------------------------------
cancelURL = "http://www.noamsm.co.il/index.asp"
'------------------------------------
' Calls the SetExpressCheckout API call
'
' The CallShortcutExpressCheckout function is defined in the file PayPalFunctions.asp,
' it is included at the top of this file.
'-------------------------------------------------
Set resArray = CallShortcutExpressCheckout (paymentAmount, currencyCodeType, paymentType, returnURL, cancelURL)
ack = UCase(resArray("ACK"))
If ack="SUCCESS" Then
' Redirect to paypal.com
ReDirectURL( resArray("TOKEN") )
Else
'Display a user friendly Error on the page using any of the following error information returned by PayPal
ErrorCode = URLDecode( resArray("L_ERRORCODE0"))
ErrorShortMsg = URLDecode( resArray("L_SHORTMESSAGE0"))
ErrorLongMsg = URLDecode( resArray("L_LONGMESSAGE0"))
ErrorSeverityCode = URLDecode( resArray("L_SEVERITYCODE0"))
End If
%>
```
i am guessing i am getting one of the errors from the bottom but cant find where to see thm..
| PayPal express checkout on the shopping cart | CC BY-SA 2.5 | null | 2010-06-17T21:57:59.610 | 2010-06-17T22:38:52.287 | 2010-06-17T22:38:52.287 | 177,146 | 177,146 | [
"asp-classic",
"paypal"
] |
3,067,247 | 1 | 3,109,465 | null | 6 | 3,959 | Basically I want to take the following:

And make it match the styling of the rest of the application.
I am creating a custom error page in my C# based project and I want it to be able to show the same information that is displayed in the ASP.NET default error page. From fiddling with reflector I can see that this is generated through `HttpException.GetHtmlErrorMessage()` but when I try to use this in my exception it returns `null`.
| How do you access the Source Error, Source File and Line Number of an exception to use in a custom error page? | CC BY-SA 2.5 | 0 | 2010-06-18T04:43:14.513 | 2012-02-08T16:34:10.830 | null | null | 146,897 | [
"c#",
"asp.net",
"exception",
"error-handling"
] |
3,067,971 | 1 | 3,068,640 | null | 3 | 612 | I have 23(column)x6(row) table and change the row with link_to_remote function.
each has its own .
link call and change action changes the row using render function wit partial.
_change.html.erb
```
<td id="row_1">1</td>
.
.
omitted
.
.
<td id="row_23">23</td>
```
link_to_remote function
```
<%= link_to_remote 'Change', :update => 'row_1', :url => change_path %>
```
change action
```
def change
logger.debug render :partial => 'change'
end
```
If I coded like above, everything work okay. This means all changed-columns are in .
But, if I wrap partial code with function like below...
```
<% form_for 'change' do %>
<td id="row_1">1</td>
.
.
omitted
.
.
<td id="row_23">23</td>
<% end %>
```
Then, one column located in one row and that column is the first column. I've looked up the log file, but it was normal html tags.
What's wrong?

| Rendering partial for table row with form_tag is getting crazy! | CC BY-SA 2.5 | 0 | 2010-06-18T07:55:52.690 | 2010-06-18T09:50:14.770 | 2017-02-08T14:27:13.107 | -1 | 1,145,208 | [
"html",
"ruby-on-rails",
"ajax"
] |
3,068,037 | 1 | 3,068,216 | null | 5 | 8,993 | i need help modelling a use case diagram from a topic, it will be in java GUI
Design a Calculator that
1.Allow user to key in a legitimate arithmetic statement that involves number, operator +, - and bracket '(' and ')' ;
2.When user press “Calculate” button, display result;
3.Some legitimate statement would be ((3+2)-4+2) (equals 3) and (-2+3)-(3-1) (equals -1);
4.You should NOT use a pre-existing function that just take in the statement as a parameter and returns the result but you should write the logic of parsing every character in your code.
5.Store the last statement and answer so it is displayed when user press the “Last calculation” button.
i have designed two use case diagrams using UML on netbeans 6.5.1, one of the use case i am not sure whether is it containing too much use cases etc, while the other is what i think could be too vague for the topic.i hope to get some feedback on whether the use case diagram are appropriate, thanks.i included a what it would be like in GUI



| Use case modelling for calculator | CC BY-SA 2.5 | 0 | 2010-06-18T08:09:50.327 | 2010-06-18T11:29:35.503 | 2010-06-18T08:16:25.497 | 267,738 | 267,738 | [
"java",
"uml",
"use-case"
] |
3,069,245 | 1 | null | null | 3 | 4,032 | The following problem is in 2D, so some simplifications can be made when suggesting answers.
I need to create closed areas (defined either by line segments or just set of points - convex polygon) from a set of points/line segments.
Basically I used Voronoi to generate "roads". Then I changed some of the data. Now I need a way to loop through that data (which is still line segments but doesn't comply with Voronoi anymore) and generate "neigbourhoods" that are bordered with the "roads".
I looked at some graph diagrams and shortest path theories, but I could not figure it out.
Logically it could be done by starting at left edge from one point, finding the way back to that point using the shortest path with available lines (using only clockwise directions). Then mark this line set down and remove from the data. Then you can repeat the same process and get all the areas like that.
I tried to implement that but it did not get me anywhere as I could not figure out a way to write a C++ code that could do that. Problem was with choosing the most counterclockwise line from available lines from a specific point. All angle based math I did gave wrong answers because the way sin/cos are implemented in c++.
So to summarize - if you can help me with a totally new approach to the problem its good, if not could you help me find a way to write the part of the code that finds the shortest clockwise path back to the beginning point using the line segment set as paths back.
EDIT: Added a picture to illustrate what I want to do.
Check the image here - (need 10 reputations before I can post it here :P)

I have a set of points (purple small dots). Another array defines what points make up a line (road). I want a way to define the area that is surrounded by roads so I can put buildings or smaller roads inside that and test against the edges so every region is separated. Hope this gives you more info on how to solve this problem.
Thank you for your help!
| How to create closed areas (convex polygons) from set of line segments? | CC BY-SA 4.0 | 0 | 2010-06-18T11:37:28.030 | 2020-08-04T18:11:42.740 | 2020-08-04T18:11:42.740 | 1,885,735 | 370,247 | [
"c++",
"graph",
"geometry",
"polygon"
] |
3,070,419 | 1 | 3,070,435 | null | 1 | 2,151 | I would like to use a `JProgressBar` and augment it to print its current value as well as the graphical bar.

I'm guessing the best way to do this is to override paintComponent:
```
@Override protected void paintComponent(Graphics g) {
// Let component paint first
super.paintComponent(g);
// paint my contents next....
}
```
but I am not sure... any advice?
| swing: making a JProgressBar with a label superimposed on it? | CC BY-SA 3.0 | null | 2010-06-18T14:23:58.347 | 2013-02-23T09:39:29.293 | 2017-02-08T14:27:13.803 | -1 | 44,330 | [
"java",
"swing",
"jprogressbar"
] |
3,071,169 | 1 | 3,071,188 | null | 1 | 121 | I hate these three tables that. Two tables have a many to many relationship and as such it generates a third table.

I'm using Linq-to-SQL and in the .dbml file I've dragged all the folder there to the graphic surface.
Here is the method I'm using to delete an Area safely. Remember that documents are associated to an Area, so I can't just delete it and leave documents hanging.
```
ScansDataContext db = new ScansDataContext();
/// <summary>
/// Deletes an Area object from the database along with all associations in the database.
/// </summary>
/// <param name="area">Area object to save</param>
public void Delete(Area area)
{
db.DocumentAreaRelations.DeleteAllOnSubmit(area.DocumentAreaRelations);
db.Areas.DeleteOnSubmit(area);
db.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict);
}
```
| Will this safely delete my record? | CC BY-SA 2.5 | 0 | 2010-06-18T15:54:30.573 | 2010-06-18T16:18:45.810 | null | null | 112,355 | [
"c#",
"linq-to-sql"
] |
3,073,081 | 1 | 3,073,241 | null | 0 | 1,417 | I am trying to make a table inside a table so I can organize stuff in the right place. But I simple cannot set the table width. Here is a picture of the table

and circled in red is the table inside table that I've created, it has one row 3 columns:

and here is the code I've used to create the 2nd table:
```
// attack type
var farmTableAttack = dom.cn("table");
var ftableBodyAttack = dom.cn("tbody");
farmTableAttack.style.tableLayout = "fixed";
farmTableAttack.width = "20px";
ftableBodyAttack.setAttribute("colspan", 4);
ftableBodyAttack.setAttribute("width", 50);
tableRow = dom.cn("tr");
tableCol = dom.cn("th");
tableCol.setAttribute("colspan", 2);
tableCol.innerHTML = "Attack: ";
tableRow.appendChild(tableCol);
tableCol = dom.cn("th");
tableCol.setAttribute("colspan", 1);
tableCol.innerHTML = "N";
var Button = createInputButton("checkbox");
Button.id = "attackTypeN";
Button.checked = GM_getValue("checkBoxAttackType_"+suffixLocal, "tabela") == "normal";
Button.addEventListener("click", function() {
if (Button.checked) {
Button.checked = false;
GM_setValue("checkBoxAttackType_"+suffixLocal, "tabela");
}
else if (document.getElementbyId("attackTypeA").checked == true) {
document.getElementbyId("attackTypeA").checked = false;
GM_setValue("checkBoxAttackType_"+suffixLocal, "normal");
}
}, false);
tableCol.appendChild(Button);
tableRow.appendChild(tableCol);
tableCol = dom.cn("th");
tableCol.setAttribute("colspan", 1);
tableCol.innerHTML = "A";
var Button = createInputButton("checkbox");
Button.id = "attackTypeA";
Button.checked = GM_getValue("checkBoxAttackType_"+suffixLocal, "tabela") == "assalto";
Button.addEventListener("click", function() {
if (Button.checked) {
Button.checked = false;
GM_setValue("checkBoxAttackType_"+suffixLocal, "tabela");
}
else if (document.getElementbyId("attackTypeN").checked == true) {
document.getElementbyId("attackTypeN").checked = false;
GM_setValue("checkBoxAttackType_"+suffixLocal, "assalto");
}
}, false);
tableCol.appendChild(Button);
//append the row in the table
tableRow.appendChild(tableCol);
ftableBodyAttack.appendChild(tableRow);
farmTableAttack.appendChild(ftableBodyAttack);
```
I want the second table to be inside this place (this is the original table without the 2nd table coded into it):

I simple don't know what to do.
another option would be to fix the stuff inside that circle region of the original table without having to use another table, I just don´t know how to do that.
dom.cn:
```
var dom = new DOMUtils();
//DOM functions
function DOMUtils(doc, ctxt, html) { // from FranMod
this.cn = function(tag, html) {
var elem = this.document.createElement(tag);
if (html)
elem.innerHTML = html;
return elem;
}
this.ct = function(text) {
return this.document.createTextNode(text);
}
this.id = function(id) {
return this.document.getElementById(id);
}
this.tag = function(tag) {
return this.document.getElementsByTagName(tag);
}
this.xs = function(xpath) {
var res = this.document.evaluate(xpath, this.context, null,
XPathResult.FIRST_ORDERED_NODE_TYPE, null);
return res.singleNodeValue;
}
this.xa = function(xpath) {
var arr = [];
var xpr = this.document.evaluate(xpath, this.context, null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; item = xpr.snapshotItem(i); i++)
arr.push(item);
return arr.length == 0 ? null : arr;
}
this.xo = function(xpath) {
var ret = this.document.evaluate(xpath, this.context, null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
return ret; //no snapshot
}
this.find = function(xpath, xpres, doc) {
if (!doc)
doc = document;
else if (typeof doc == 'string')
doc = cn('div', doc);
var ret = document.evaluate(xpath, doc, null, xpres, null);
return xpres == XPFirst ? ret.singleNodeValue : ret;
}
this.get = function(id, doc) {
if (!doc)
doc = document;
return doc.getElementById(id);
}
if (!doc)
doc = document;
if (!ctxt)
ctxt = doc;
if (html) {
this.document = doc.implementation.createDocument('', '', null);
this.context = doc.createElement('div');
this.context.innerHTML = html;
ansDoc.appendChild(this.context);
} else {
this.document = doc;
this.context = ctxt;
}
}
```
| Javascript table inside table not working | CC BY-SA 3.0 | null | 2010-06-18T21:04:21.260 | 2017-06-03T22:03:52.190 | 2017-06-03T22:03:52.190 | 4,370,109 | 336,762 | [
"javascript"
] |
3,073,365 | 1 | 3,075,483 | null | 1 | 1,927 |
A PostgreSQL database uses PL/R to call R functions. An R call to calculate Spearman's correlation looks as follows:
```
cor( rank(x), rank(y) )
```
Also in R, a naïve calculation of a fitted generalized additive model (GAM):
```
data.frame( x, fitted( gam( y ~ s(x) ) ) )
```
Here `x` represents the years from 1900 to 2009 and `y` is the average measurement (e.g., minimum temperature) for that year.
The fitted trend line (using GAM) is reasonably accurate, as you can see in the following picture:

The problem is that the correlations (shown in the bottom left) do not accurately reflect how closely the model fits the data.
One way to improve the accuracy of the correlation is to use a root mean square error (RMSE) calculation on binned data.
How would you implement the RMSE calculation on the binned data to get a correlation (between 0 and 1) of GAM's fit to the measurements, in the R language?
Is there a better way to find the accuracy of GAM's fit to the data, and if so, what is it (e.g., root mean square deviation)?
1. Call the PL/R function using the observed amounts and the model (GAM) amounts: correlation_rmse := climate.plr_corr_rmse( v_amount, v_model );
2. Define plr_corr_rmse as follows (where o and m represent the observed and modelled data): CREATE OR REPLACE FUNCTION climate.plr_corr_rmse(
o double precision[], m double precision[])
RETURNS double precision AS
$BODY$
sqrt( mean( o - m ) ^ 2 )
$BODY$
LANGUAGE 'plr' VOLATILE STRICT
COST 100;
The `o - m` is wrong. I'd like to bin both data sets by calculating the `mean` of every 5 data points (there will be at most 110 data points). For example:
```
omean <- c( mean(o[1:5]), mean(o[6:10]), ... )
mmean <- c( mean(m[1:5]), mean(m[6:10]), ... )
```
Then correct the RMSE calculation as:
```
sqrt( mean( omean - mmean ) ^ 2 )
```
How do you calculate `c( mean(o[1:5]), mean(o[6:10]), ... )` for an arbitrary length vector in an appropriate number of bins (5, for example, might not be ideal for only 67 measurements)?
I don't think `hist` is suitable here, is it?
The following code will solve the problem, however it drops data points from the end of the list (to make the list divisible by 5). The solution isn't ideal as the number "5" is rather magical.
```
while( length(o) %% 5 != 0 ) {
o <- o[-length(o)]
}
omean <- apply( matrix(o, 5), 2, mean )
```
What other options are available?
Thanks in advance.
| Root mean square deviation on binned GAM results using R | CC BY-SA 2.5 | null | 2010-06-18T22:08:05.760 | 2010-06-19T12:32:51.647 | 2010-06-19T01:29:25.307 | 59,087 | 59,087 | [
"r",
"statistics",
"binning",
"plr",
"gam"
] |
3,073,389 | 1 | 3,074,637 | null | 5 | 3,913 | In Windows, a List View can have its items grouped, as in the following picture:

My application employs a white-on-black GUI. Most of the controls (buttons, edit fields, check-boxes etc.) I have created myself, but I am kind of fond of the Windows List View control, so I want to use it. To this end, I set the background colour to black and the text colour to white, to obtain

However, I cannot seem to find a way of changing the text colour of the group header. This is controlled by the theme, so it is by no means obvious that it even be changed, but I am confident that you all see my need: The default blue color looks horrible on a black background.
So: Is there any means of chaning the text colour of a List View group header?
| Win32: List View Group Header Text Color | CC BY-SA 4.0 | 0 | 2010-06-18T22:14:38.693 | 2023-02-04T19:32:52.533 | 2019-07-30T10:35:12.320 | 282,848 | 282,848 | [
"listview",
"winapi",
"textcolor"
] |
3,073,447 | 1 | 3,074,364 | null | 5 | 13,332 | I'm using this sample code to populate the Spinner. Data is read from database. The selection displays correctly - in this case, it shows "Green" and "Red".
```
Spinner spinnerColor = (Spinner) findViewById(R.id.spinnertProfile);
mProfileDbHelper = new ProfileDbAdapter(this);
mProfileDbHelper.open();
Cursor profilesCursor = mProfileDbHelper.fetchAllProfiles();
startManagingCursor(profilesCursor);
// Create an array to specify the fields we want to display in the list
String[] from = new String[] { ProfileDbAdapter.COL_PROFILE_TITLE };
// and an array of the fields we want to bind those fields to
int[] to = new int[] { R.id.textviewColors };
// Now create a simple cursor adapter and set it to display
SimpleCursorAdapter profilesAdapter = new SimpleCursorAdapter(this,
R.layout.profile_color, profilesCursor, from,
to);
spinnerColor.setAdapter(profilesAdapter);
}
```
However, when I changed to use a different layout . The Spinner Text disappeared.
```
// Now create a simple cursor adapter and set it to display
SimpleCursorAdapter profilesAdapter = new SimpleCursorAdapter(this,
R.layout.profile_color, profilesCursor, from,
to);
profilesAdapter
.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinnerColor.setAdapter(profilesAdapter);
```
See snapshots of without and with below:

Anything I may miss?
| Android - Text dropdown/selection of Spinner does not show | CC BY-SA 3.0 | 0 | 2010-06-18T22:25:21.163 | 2019-07-30T05:11:22.987 | 2014-03-04T09:02:56.887 | 2,065,587 | 370,640 | [
"android",
"android-widget",
"spinner"
] |
3,073,615 | 1 | 6,006,006 | null | 3 | 5,344 | I've run into the issue of using a `UIBarButtonItem` with a custom color. Everything out on the 'net seems to indicate that the only way around this lack of official API support revolves around the use of images. This is all fine and dandy when developing for pre-iOS 4 devices, except when using the new iPhone 4. Creating an image for iPad and pre-iOS 4 devices is straightforward enough, but the images developed for those devices look absolutely horrid on iPhone 4. I suspect that this problem will be exacerbated further with the introduction of next generation devices.
Consider the example below. Notice how the default colored button is nice and smooth, but the iPhone 3GS image looks terrible. It does not seem very scalable (pun intended) to have to include multiple images for different resolution devices.

In the absence of an official API for changing the color of a `UIBarButtonItem`, what strategies are out there for creating images that scale well against differing resolution devices? This problem is hardly unique to UIBarButtonItems, how is the community adapting to other UI elements that are bitmapped? Is there a better solution for this particular case than using an image (such as using Quartz to draw it)?
If at all possible, please offer concrete code examples.
| How to create iOS image buttons that scale well across multiple resolutions? | CC BY-SA 2.5 | 0 | 2010-06-18T23:15:10.937 | 2012-10-12T09:30:43.790 | 2017-02-08T14:27:15.513 | -1 | 105,903 | [
"iphone",
"graphics",
"ios4"
] |
3,075,105 | 1 | 3,075,729 | null | 5 | 3,117 | Once when I got my hand on openbsd I was really happy to have black and white terminal, I, somehow, orienting much more with b/w colors..
Anyway I know just one option to do it.
```
export TERM="linux-m"
```
and openbsd used something else like "vt8.." i don't remember.
Now I have freebsd on my dedicated server, I want to have black and white terminal again. On bash it works perfectly even in sh, i got normal unicode in Midnight commander for example... but when I entering ZSH with TERM="linux-m" in mc I have unicode problem , edges just a bunch of letters...
in /etc/login.conf i've got this locales:
```
unicode|Unicode Users Accounts:\
:charset=UTF-8:\
:lang=en_US.UTF-8:\
:lc_all=en_US.UTF-8:\
:tc=default:
```
here's screenshots


| How to turn off colors in ZSH shell? Make it black and white with unicode support! | CC BY-SA 2.5 | null | 2010-06-19T10:06:03.420 | 2010-06-19T13:57:31.390 | null | null | 310,662 | [
"shell",
"terminal",
"colors",
"freebsd",
"zsh"
] |
3,077,597 | 1 | 3,077,605 | null | 3 | 1,902 | I have a list of Groups that can vary in number, with Items in these groups that also vary in number. I've been racking my head over a way to get all possible combinations of 1 Item from every Group.
Bonus: I also need all combinations of not having every items from a group.
I've seen and done what was [mentioned before](https://stackoverflow.com/questions/127704/algorithm-to-return-all-combinations-of-k-elements-from-n/127898#127898), but that requires knowing the number of groups to begin with.
To be more specific about what I'm doing, I would like to generate products with exact pricing based off product options. Here's an example list:

So it would generate products like:
UV Coating, Qty 500, Color 4:0
UV Coating, Qty 500, Color 4:1
etc...
Each of these Groups has an ID, and each item has a Group_Item_ID. So I can put them in an array such as:
```
$selections[1][...] // 1 = Coating
$selections[2][...] // 2 = Quantity
// ... = all selected Items in group
```
Hope I explained it well enough. I'm just not able to wrap my head around how to do this when the number of Groups are variable also.
Here's an example array for the groups and their items:
```
Array
(
[0] => Array
(
[0] => 2
[1] => 3
)
[1] => Array
(
[0] => 10
[1] => 11
[2] => 12
)
[2] => Array
(
[0] => 16
[1] => 17
)
[3] => Array
(
[0] => 19
[1] => 20
)
)
```
| Getting all possible combinations of N items in X Groups | CC BY-SA 2.5 | null | 2010-06-19T23:13:23.060 | 2010-06-21T12:18:28.417 | 2017-05-23T12:13:26.380 | -1 | 229,967 | [
"php",
"recursion",
"combinations"
] |
3,077,639 | 1 | 3,081,139 | null | 3 | 265 | I have recently moved to a dark color theme for all my code editors. It is much easier on the eyes. But I recently came across an issue that I can’t figure out how to correct and was hoping that someone will have an answer.
When the method info box pops up this is what it looks like this:

Notice the method info is unreadable because the colors in the theme are meant for a dark background. How can I change the background of this popup?
The theme is a modified version of [Coding Instinct](http://studiostyles.info/schemes/coding-instinct-theme) available on [StudioStyles](http://studiostyles.info/). [Here](http://cid-11d05b676a3170c4.office.live.com/self.aspx/.Public/VSSettings/coding-instinct-theme-2010.vssettings) is my modified version. It sets the background for the linenumbers/marker margin plus some other minor tweaks.
| How can I correct this in the visual studio 2010 theme? | CC BY-SA 2.5 | 0 | 2010-06-19T23:32:32.703 | 2012-07-03T00:25:23.480 | 2017-02-08T14:27:16.197 | -1 | 32,502 | [
"visual-studio-2010",
"visual-studio"
] |
3,078,052 | 1 | 3,078,061 | null | 3 | 4,504 | How can I get smooth fonts? I don't want the edges to look all fuzzy.

| Smooth fonts with CSS | CC BY-SA 2.5 | null | 2010-06-20T02:53:54.493 | 2015-10-12T12:12:39.470 | null | null | 111,669 | [
"javascript",
"css",
"fonts",
"antialiasing"
] |
3,079,978 | 1 | 4,002,502 | null | 4 | 894 | I notice Vista/7 uses this type of control as well as Windows Live Messenger. This is the control: [](https://i.stack.imgur.com/EKniO.png)


How can this control be programably added to a WinAPI application?
Thanks
| Making Vista / 7 User Frame control? (WinAPI) | CC BY-SA 4.0 | 0 | 2010-06-20T16:29:09.217 | 2019-07-30T07:11:18.437 | 2019-07-30T07:11:18.437 | 4,751,173 | 146,780 | [
"c++",
"c",
"winapi",
"controls",
"themes"
] |
3,081,203 | 1 | 15,561,904 | null | 11 | 12,187 | How is this effect achieved? Code snippets are highly welcome.
This can be seen in Notes app and other apps on the App Store.
It seem that either the buttons on the navigation controller are transparent and show the custom background of the navigation controller or that they themselves have a custom background applied to them. Any ideas on how this is achieved?
EDIT:
Here is an example from the iBooks app for the iPhone. As you can see, not only the UIButtons, but also the segmented control have custom backgrounds. I'm thinking that there is a way to globally set transparency/background to different interface elements.

[http://c0839932.cdn.cloudfiles.rackspacecloud.com/iBooks%201.1%20-%206.png](http://c0839932.cdn.cloudfiles.rackspacecloud.com/iBooks%201.1%20-%206.png)
| Custom background/transparent background on UIBarButtonItem? | CC BY-SA 3.0 | 0 | 2010-06-20T22:38:44.130 | 2014-03-22T10:23:43.570 | 2014-01-17T15:40:18.887 | 1,986,847 | 358,381 | [
"ios",
"iphone",
"objective-c",
"background",
"uibarbuttonitem"
] |
3,081,387 | 1 | 3,081,612 | null | 1 | 2,245 | I have just started working with RemObjects Pascal Script. and have been trying to follow the remobjects tutorial.
[http://devcenter.remobjects.com/articles/?id=](http://devcenter.remobjects.com/articles/?id=){2FFC1EE9-F18D-4B11-9DE4-1BA0A79D0D04}
all was going fine up to the part you run
```
begin
ShowNewMessage('Show This !');
end.
```
where it claimed it does not know of it.
but i have it here
```
procedure Tmainwindow.ceCompile(Sender: TPSScript);
begin
Sender.AddMethod(Self, @Tmainwindow.ShowNewMessage,
'procedure ShowNewMessage(const Message: string);');
end;
procedure ShowNewMessage(const Message: string);
procedure Tmainwindow.ShowNewMessage(const Message: string);
begin
//ShowMessage('ShowNewMessage invoked:'#13#10+Message);
end;
```
added on the compile event as instructed... it all compiles in delphi but when i run the code from within my executable it says it dont exist.
secondly if i add any plugins to improve the function calls of the script i get this..

please help i realise i may be doing something silly here im new to rem objects.
| Getting started working with RemObjects Pascal Script in delphi | CC BY-SA 2.5 | null | 2010-06-20T23:50:35.390 | 2013-07-22T11:44:28.213 | 2017-02-08T14:27:17.860 | -1 | 53,915 | [
"delphi",
"scripting",
"pascal",
"pascalscript",
"remobjects"
] |
3,084,039 | 1 | 3,086,673 | null | 6 | 795 | Is there a lib that can build a simple GUI by looking at a class or method signature?
For Example:
```
class MyMath{
public static double sqrt(double d){
//impl
}
}
```
To

So that when the button is clicked the method is invoked and the result is shown.
Do you know any examples of something like that in Java or other languages?
thanks
| GUI from class definition | CC BY-SA 2.5 | 0 | 2010-06-21T11:03:51.707 | 2015-03-03T17:17:21.520 | null | null | 243,779 | [
"java",
"user-interface",
"reflection"
] |
3,085,544 | 1 | 3,085,597 | null | 1 | 164 | I've been able to do this in Chrome and Firefox, and I thought I had it working in IE7 and IE8, but alas, I must've been dreaming.
Basically I have the following HTML:
```
<style>
div,li,ul {
margin: 0;
padding: 0;
border: 0;
outline: 0;
}
ul,li {
list-style: none;
}
div#container {
display: inline-block;
width: 600px;
height: 120px;
border: 1px solid lime;
overflow: auto;
position: relative;
}
div#container > ul {
display: inline-block;
width: auto;
white-space: nowrap;
vertical-align: top;
position: absolute;
left: 0px;
top: 0px;
}
div#container > ul > li {
display: inline-block;
width: 100px;
height: 100px;
border: 1px solid red;
}
</style>
<div id="container">
<ul>
<li>Item 0</li>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
<li>Item 6</li>
<li>Item 7</li>
<li>Item 8</li>
<li>Item 9</li>
<li>Item 10</li>
<li>Item 11</li>
<li>Item 12</li>
<li>Item 13</li>
<li>Item 14</li>
<li>Item 15</li>
</ul>
</div>
```
And I want it to look like this:
(from Firefox)

(from Chrome)

instead it looks like this:
(from IE8)

I'm at my wits end with this, and I'm considering doing some table layout hackery to fix it. But I'd rather not do that if I don't have to.
| CSS Issue: Hidden children stretching along Y-axis in IE with pure CSS? | CC BY-SA 2.5 | null | 2010-06-21T14:33:44.243 | 2010-06-29T16:57:13.713 | null | null | 135,786 | [
"html",
"css",
"internet-explorer"
] |
3,090,369 | 1 | 3,094,185 | null | 468 | 373,540 | In my forms, I'd like to use the new HTML form types, for example `<input type="url" />` ([more info about the types here](http://diveintohtml5.info/forms.html#type-url)).
The problem is that Chrome wants to be super helpful and validate these elements for me, except that it sucks at it. If it fails the built-in validation, there's no message or indication other than the element getting focus. I prefill URL elements with `"http://"`, and so my own custom validation just treats those values as empty strings, however Chrome rejects that. If I could change its validation rules, that would work too.
I know I could just revert back to using `type="text"` but I want the nice enhancements using these new types offers (eg: it automatically switches to a custom keyboard layout on mobile devices):

Is there a way to switch off or customise the automatic validation?
| Disable validation of HTML form elements | CC BY-SA 4.0 | 0 | 2010-06-22T04:53:09.847 | 2022-12-30T17:35:29.707 | 2022-12-29T15:25:37.480 | 2,756,409 | 9,021 | [
"validation",
"forms",
"html",
"input"
] |
3,090,810 | 1 | null | null | 18 | 12,547 | I'm using one of the new HTML5 input types, [number](http://diveintohtml5.info/forms.html#type-number):
```
<input type="number" />
```
In Opera, which is the only desktop browser I know of which currently recognises it, it renders it as such:

The problem I'm facing is one of validation. If a user types something invalid into the field, eg: "`abc`", the value returned by `myInput.value` is an empty string. This makes it impossible to tell whether the user left the field blank, or if they entered some incorrect data. Is there any way to get the real value of the field?
| Getting the value of a HTML5 number input | CC BY-SA 3.0 | 0 | 2010-06-22T06:35:21.727 | 2017-12-28T16:42:23.673 | 2012-04-18T12:53:35.113 | 444,991 | 9,021 | [
"javascript",
"html",
"input"
] |
3,091,373 | 1 | null | null | 0 | 1,348 | I create a transparent gif with text with the gd library but the output quality of the Text isn't good. Has anybody an idea how can I improve the quality?
Here is the code:
```
$req = explode('|', $_REQUEST['r']);
$text = $req[0];
header ("Content-type: image/gif");
$font = getFont($req[2]);
$font_size = $req[1];
$tmpcolor = getColor($req[3]);
$tmp_image=@imagecreatefromgif('gfx/transparent.gif');
$width = imagesx($tmp_image);
$height = imagesy($tmp_image);
//calculate the new width / height
$tmp = imagettfbbox($font_size,0,$font,$text);
$new_width = $tmp[2]+10;
$new_height = $font_size+5;
$new_image = imagecreate($new_width,$new_height);
ImageCopyResized($new_image, $tmp_image,0,0,0,0, $new_width, $new_height, $width, $height);
$black = ImageColorAllocate($new_image, 0, 0,0);
$trans = ImageColortransparent($new_image,$black);
$color = ImageColorAllocate($new_image, trim($tmpcolor[0]), trim($tmpcolor[1]), trim($tmpcolor[2]));
imagettftext($new_image, $font_size, 0, 0, $font_size, $color, $font, $text);
//Grab new image
imagegif($new_image);
imagedestroy($new_image);
imagedestroy($tmp_image);
```
Here is the result:

[http://desmond.yfrog.com/Himg691/scaled.php?tn=0&server=691&filename=createphp.gif&xsize=640&ysize=640](http://desmond.yfrog.com/Himg691/scaled.php?tn=0&server=691&filename=createphp.gif&xsize=640&ysize=640)
Thank you
| better image quality for gif with gd library in PHP | CC BY-SA 3.0 | null | 2010-06-22T08:17:00.100 | 2011-12-10T00:07:37.377 | 2011-12-10T00:07:37.377 | 234,976 | 372,929 | [
"php",
"gd",
"gif"
] |
3,091,794 | 1 | 3,091,880 | null | 6 | 1,555 | I have a library A, which depends on the libraries B and C. I unpack the libraries classes of B and C into the jar for library A using the maven-dependency-plugin (see below).
Now, when a library D uses library A, library D can access all the classes of A, B and C. However, I want D only to depend on A but not on the transitive dependencies B and C.

I know this can be achieved by manually excluding B and C for the dependency A-D but I would like to somehow declare in A that B and C are not to be made known to modules using A.
```
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
```
| Maven: Unpack-Dependencies ... and then forget about them | CC BY-SA 2.5 | 0 | 2010-06-22T09:21:48.010 | 2010-06-22T23:01:20.433 | 2017-02-08T14:27:18.560 | -1 | 270,662 | [
"java",
"maven-2"
] |
3,092,156 | 1 | 3,092,209 | null | 2 | 261 | Can you point out what is wrong in following query?
(Please copy and paste URL)
[https://chart.apis.google.com/chart?cht=p3&chs=550x200&chd=t:970,134,57,28,51,11,6&chl=Instant(970)|Below1Min(134)|Above1MinandBelow5Min(57)|Above5MinandBelow10Min(28)|Above10MinandBelow30Min(51)|Above30MinandBelow1Hr(11)|Above1HrsandBelow3Hrs(6)](https://chart.apis.google.com/chart?cht=p3&chs=550x200&chd=t:970,134,57,28,51,11,6&chl=Instant(970)|Below1Min(134)|Above1MinandBelow5Min(57)|Above5MinandBelow10Min(28)|Above10MinandBelow30Min(51)|Above30MinandBelow1Hr(11)|Above1HrsandBelow3Hrs(6))
I am getting
|Below1Min(134)|Above1MinandBelow5Min(57)|Above5MinandBelow10Min(28)|Above10MinandBelow30Min(51)|Above30MinandBelow1Hr(11)|Above1HrsandBelow3Hrs(6))
My Instant data is 970 and total is 1257 ie
Same problem for . It is 134
| Google chart display problem | CC BY-SA 2.5 | null | 2010-06-22T10:18:23.913 | 2010-06-22T10:27:28.977 | 2017-02-08T14:27:18.897 | -1 | 150,174 | [
"url",
"visualization",
"google-visualization"
] |
3,092,399 | 1 | 3,092,822 | null | 1 | 1,399 |
I am drawing to a canvas, this is updated regularly and it flashes.
Logically thinking I assumed this is because my redraw method clears the Canvas then draws one element at a time to the canvas. so my idea was to write to a Timage then set the picture to the Timage.
---
here is my code
```
procedure Tmainwindow.Button3Click(Sender: TObject);
var bufferpicture:TImage;
begin
//draw stuff to bufferpicture
//***
//draw stuff to bufferpicture
myrealpicture.picture:=bufferpicture.picture;
end;
```
Upon running the code I get a error show below.

---
How do I set the canvas of one to another since canvas is a read only property? or is there a better way to do what i am trying to do?
| image buffer implementation in delphi | CC BY-SA 2.5 | 0 | 2010-06-22T10:57:18.453 | 2010-06-22T11:59:40.957 | 2017-02-08T14:27:19.583 | -1 | 53,915 | [
"delphi",
"image",
"canvas",
"drawing",
"buffer"
] |
3,092,583 | 1 | 3,092,615 | null | 3 | 8,350 | How can i create a collage from a large number of images as per below using PHP scripts?
I am also looking at creating different sizes A0, A1, A2 sized images depending on the number of pictures used in the collage.

Thanks
| Creating a photo collage image as attached using PHP from several images | CC BY-SA 2.5 | 0 | 2010-06-22T11:23:02.770 | 2013-03-13T17:31:39.383 | null | null | 79,523 | [
"php",
"image",
"image-processing",
"image-manipulation",
"photos"
] |
3,092,635 | 1 | 3,430,345 | null | 2 | 324 | Does such an add-on exist for Firefox?

| A Firefox plugin to display the distance between the sides of an element and its parent | CC BY-SA 2.5 | null | 2010-06-22T11:30:48.327 | 2010-08-07T12:20:09.120 | null | null | 309,683 | [
"html",
"firefox",
"firefox-addon"
] |
3,092,694 | 1 | 3,134,599 | null | 7 | 3,998 | I am trying to build a mathematical model of the availability of a file in a distributed file-system. I posted this question at MathOverflow but this might as well be classified as a CS-question so I give it a shot here as well.
The system works like this: a node stores a file (encoed using erasure codes) at r*b remotes nodes, where r is the replication-factor and b is an integer constant. Erasure-coded files have the property that the file can be restored iff at least b of the remote nodes are available and return its part of the file.
The simplest approach to this is to assume that all remote nodes are independent of each other and have the same availability p. With these assumptions the availability of a file follows the Binomial distribution, i.e. 
Unfortunately these two assumptions can introduce a non-neligible error, as shown by this paper: [http://deim.urv.cat/~lluis.pamies/uploads/Main/icpp09-paper.pdf](http://deim.urv.cat/%7Elluis.pamies/uploads/Main/icpp09-paper.pdf).
One way to overcome the assumption that all nodes have the same availability is to calculate the probability of each possible combination of availaible/non-available node and take the sum of all these outcomes (which is sort of what they suggest in the paper above, just more formally than what I just described). You can see this approach as a binary tree with depth r*b and each leave is one possible combination of available/not-available nodes. The file's availability is the same thing as the probablity that you arrive at a leave with >=b available nodes. This approach is more correct but has a computational cost of [](https://i.stack.imgur.com/LlZyG.png). Also, it doesn't deal with the assumption of node independence.
Do you guys have any ideas of a good approximation which introduces less error than the binomial distribution-aproximation but with better computational cost than [](https://i.stack.imgur.com/LlZyG.png)?
You can assume that the availability-data of each node is a set of tuples consisting of `(measurement-date, node measuring, node being measured, succes/failure-bit)`. With this data you could for example calculate the correlation of the availability between the nodes and the availability variance.
| Calculating the probability of system failure in a distributed network | CC BY-SA 4.0 | 0 | 2010-06-22T11:39:03.817 | 2021-04-27T19:34:27.717 | 2021-04-27T19:34:27.717 | 4,751,173 | 71,354 | [
"computer-science",
"distributed",
"time-complexity",
"high-availability",
"binomial-cdf"
] |
3,093,468 | 1 | 3,095,534 | null | 3 | 17,608 | I have added an instance of UIToolbar and buttons on top of it . Each button's belongs to the class of UIBarButtonItem.
My Requirement is that each button has a customized layout , i dont want to use the native button styles provided by Apple. So i had 3 options in Interface Builder ( Plain , Bordered , Done ).
I have selected the style Plain and selected the image i want to add as backgroun under
Bar item -> Image.
But it didnt work for me, using the plain option gets me a little closer as border and done are nowhere closer but still it displays the images in white outline. Is there anyway that images on the buttons are added and they look exactly as they are. Its a pretty simple task while using UIButton. I just used Image option in the Attributes inspector for UIButton and select the image i want. But here while using UIBarButtonitem it doesnt work at all.
This is how it displays

Thanks
Taimur
| Customize UIBarbuttonitem with Background Images | CC BY-SA 2.5 | 0 | 2010-06-22T13:21:09.853 | 2015-01-08T15:38:18.497 | 2010-07-30T20:35:17.110 | 315,594 | 315,594 | [
"iphone",
"cocoa-touch",
"uibarbuttonitem",
"uitoolbar",
"uibarbuttonitemstyle"
] |
3,095,510 | 1 | 3,095,595 | null | 34 | 19,700 | Consider this code attempting to create an Active Directory account. It's generating an exception here with a certain set of data. It's not clear right now what's causing the exception.
```
var user = new UserPrincipal(someValidUserContext,
".x-xyz-t-FooFooBarTest", "somePwd", true);
user.UserPrincipalName = "[email protected]";
user.SamAccountName = ".x-xyz-t-FooFooBarTest";
user.DisplayName = "Some String 16 chars long";
user.Name = "Some String 16 chars long";
user.Description = "Foo BarBaz 12 more characters";
user.AccountExpirationDate = someDateInFuture;
user.UserCannotChangePassword = true;
user.Save();
// exception thrown on Save():
// A device attached to the system is not functioning
```

> PrincipalOperationException was unhandled by user code:
A device attached to the system is not functioning
What's causing this exception, and how can you work around it?
| creating a user in Active Directory: A device attached to the system is not functioning | CC BY-SA 2.5 | 0 | 2010-06-22T17:24:24.017 | 2019-03-05T19:15:26.163 | null | null | 23,199 | [
"c#",
"active-directory",
"asp.net-3.5"
] |
3,095,772 | 1 | 3,110,738 | null | 8 | 8,650 | OK, I realize that this is something of an eternal question, but here goes:
I've got a single text input,
```
<input type="text" name="whatever" />
```
and I've specified its `font-family`, `font-size` and `padding`. Yet, even on the same machine (my Mac, let's say), the input has a different height in Firefox (3.6) than it does in Chrome or Safari. Specifically, Firefox adds a little bit more padding below the text.
And no, specifying `height` in pixels doesn't achieve consistency either.
Is there any way to achieve text input height consistency across Gecko- and WebKit-based browsers (let alone IE and Opera) without resorting to JavaScript? And if I must use JavaScript, has someone already devised a jQuery plugin or something to easily do this?
Here's what not to do. The [jqTransform](http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/) plugin lets you skin form elements and promises that they'll look the same across browsers. Here's how the demo input looks in Chrome 5 on my Mac:

and here's how the same input looks in Firefox 3.6.4:

I haven't altered these screenshots in any way, just cropped them. Now, my first reaction is, "Ugh, I don't want to support Firefox." But there are currently more Firefox users than Safari and Chrome users combined, so that's not an option.
Someone, please help! I just want my forms to look the same across browsers! And by "look the same," I'm not talking about the `outline` on selection or anything like that; I'm just talking about having the same width, height, and text placement!
| Inconsistent height of text input elements between Firefox and WebKit | CC BY-SA 3.0 | 0 | 2010-06-22T18:03:36.400 | 2011-07-29T18:19:30.170 | 2011-07-29T18:19:30.170 | 66,226 | 66,226 | [
"css",
"firefox",
"webkit"
] |
3,095,986 | 1 | 3,096,024 | null | 84 | 69,090 | I'm creating a little Java application which should have a progress indicator with percentages. In every loop it uses backspace `\b` to remove the displayed progress before displaying the next percentage.
Here's a simplified example:
```
public static void main(String[] args) throws Exception {
System.out.print("Progress: ");
for (int percentage = 0; percentage < 100; percentage++) {
System.out.print(percentage + "%");
Thread.sleep(10); // Stub for "long running task".
int length = String.valueOf(percentage).length() + 1;
while (length-- > 0) {
System.out.print('\b');
}
}
System.out.println("finished!");
}
```
This works perfectly in command prompt, but the backspace character isn't recognized in Eclipse's console (Galileo build 20090920-1017). It instead displays an empty square denoting an unknown character. See screenshot:

How do I get Eclipse to "display" the backspace properly? I.e. let it remove the previous character.
This is actually no showstopper since it will just be run in command console, but it would be just nice to get it to work in Eclipse as well :)
| How to get backspace \b to work in Eclipse's console? | CC BY-SA 3.0 | 0 | 2010-06-22T18:27:26.323 | 2020-05-10T19:54:35.580 | 2015-01-24T18:41:19.567 | 964,243 | 157,882 | [
"java",
"eclipse",
"backspace"
] |
3,096,600 | 1 | 3,096,621 | null | 118 | 130,769 | Yesterday I found myself needing to zoom my Visual Studio text editor and was without a mouse (don't ask). Typically I do this by holding down and scrolling the mouse wheel. I also couldn't figure out how to tab into the area where you can specify your zoom level in the lower left hand corner of the text editor window.

So I guess I have two questions:
1. Is there a menu setting somewhere that I could have navigated to via the keyboard to set my zoom level?
2. Even better is there a similar keyboard command to holding CTRL and scrolling the mouse wheel?
| Is there a way to zoom the Visual Studio text editor with a keyboard shortcut? | CC BY-SA 3.0 | 0 | 2010-06-22T19:51:43.193 | 2021-07-20T20:18:07.243 | 2021-07-20T20:18:07.243 | 61,654 | 61,654 | [
"visual-studio",
"visual-studio-2015",
"visual-studio-2013",
"visual-studio-2017",
"visual-studio-2019"
] |
3,097,117 | 1 | 3,128,810 | null | 1 | 477 | I am trying to create a program which will show me the status of my Gtalk (online/offline).

I can find the Status View 2 class, but how can I find the text within it.
Here's my code.
API decleration :
```
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
private static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string lclassName, string windowTitle);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
```
Code that calls Api :
```
IntPtr hwnd = IntPtr.Zero;
hwnd = FindWindowEx(hwnd, IntPtr.Zero, "Google Talk - Google Xmpp Client GUI Window", "Google Talk");
hwnd = FindWindowEx(hwnd, IntPtr.Zero, "Main View", "@main");
hwnd = FindWindowEx(hwnd, IntPtr.Zero, "Status View 2", "Status Box");
hwnd = FindWindowEx(hwnd, IntPtr.Zero, "RichEdit20W", "String.Empty");
MessageBox.Show(hwnd.ToString());
```
Thanks.
| Finding status of GoogleTalk | CC BY-SA 2.5 | 0 | 2010-06-22T21:02:00.607 | 2010-06-27T20:35:38.963 | 2017-02-08T14:27:20.627 | -1 | 92,487 | [
"c#",
"google-talk"
] |
3,097,193 | 1 | 3,244,819 | null | 0 | 222 | I have the following 2 consequative, unaltered frames from a video:


For some reason the camera made the 2nd much 'washed out' than the first. I want to make the 2nd look more like the 1st.
In the video I'm trying to process, there are lots of cases like this, where the 'exposure' changes suddenly from one frame to the next. I am able to find this parts of the video by looking at the image histogram for each frame, and when 2 adjacent frames have histograms that are too far apart, it's where this has happened. I can find this sections of different exposure, but I'm stumped with how to fix it.
As a programmer I'm familar with ImageMagick and that's about it. Since I have lots of frames, some automated hand off approach to fix this is by far the best solution. I am also totally unskilled with graphics editing programmes.
I've tried changing the exposure in imagemagick (with `-level 0,50%` etc.), but that doesn't help.
What ImageMagick commands (or other FLOSS image editing tools) will make the 2nd image look more like the 1st?
| Image processing - one frame is washed out, other isn't. How to 'fix'? | CC BY-SA 2.5 | null | 2010-06-22T21:13:49.230 | 2010-07-14T09:22:13.573 | null | null | 161,922 | [
"image",
"image-processing",
"image-manipulation",
"imagemagick",
"video-processing"
] |
3,097,527 | 1 | 5,083,745 | null | 3 | 1,191 | I want to find a function that approximates a function that produces output that looks like:
Blue, Red and Green are the X, Y and Z space dimensions.

What R package should I use?
| Best R package for doing Fourier Analysis for three dimensional function | CC BY-SA 2.5 | 0 | 2010-06-22T22:11:07.650 | 2012-11-24T17:44:45.810 | 2017-02-08T14:27:20.963 | -1 | 25,282 | [
"r"
] |
3,097,753 | 1 | 3,122,078 | null | 3 | 885 | I'm trying emulate the [Tint Effect](http://msdn.microsoft.com/en-us/library/documentformat.openxml.drawing.tinteffect.aspx) of Open XML. What it does is change the hue of pixels in an image by shifting the hue. It takes 2 parameters: 1) the `hue` (in degrees) and 2) the `amt` (the amount, a percentage). It is #2 that I'm having issues with. The spec states:
> : Shifts effect color values either towards or away from hue by the
specified amount.- -
Never minding the XML construction, I can emulate values that have an `amt` of 100%. So for example, if I want Blue (hue: 240°), I can create this (the one). Here's an example:
and (hue = 240, Amount = 100%).
 
This is achieved simply by setting the hue to 240, keeping saturation and luminance the same and converting to RGB and writing each pixel.
Here's what I can't achieve though:
Hue= (), Amount = , and , respectively
  
Again, the spec for `Amount` says . I've tried all sorts of ways here to get this to work, but can't seem to (`hue=hue*amount`, `originalhue * amount + hue`, etc.)
More examples: Hue= (), Amount = , , and , respectively. The one I can get.
   
Here are some value lists of a single pixel in the pictures above:
### Pixel 159, 116 - Blue Pictures
### Pixel 159, 116 - Green Pictures
> Note: This is a duplicate of:- [Changing the tint of a bitmap while preserving the overall brightness](https://stackoverflow.com/questions/2347840/changing-the-tint-of-a-bitmap-while-preserving-the-overall-brightness)- [Rotate Hue using ImageAttributes in C#](https://stackoverflow.com/questions/1079820/rotate-hue-using-imageattributes-in-c)-
| Tinting Towards or Away from a Hue By a Certain Percentage | CC BY-SA 2.5 | 0 | 2010-06-22T22:59:35.197 | 2019-07-31T03:04:51.463 | 2017-05-23T11:45:25.150 | -1 | 149,573 | [
"c#",
"image",
"gdi+",
"hsl"
] |
3,098,774 | 1 | null | null | 1 | 2,878 | I have user profile property called "Chapter". It is index when it was created. But this property is not showing up on crawled properties selection window to make for searching. How can I get this property on crawled properties selection window?


| Property showing up in crawled properties selection (Search) | CC BY-SA 2.5 | null | 2010-06-23T03:35:39.933 | 2014-04-29T08:57:07.203 | 2017-02-08T14:27:25.487 | -1 | 158,008 | [
"sharepoint",
"sharepoint-2007",
"moss",
"web-crawler"
] |
3,099,677 | 1 | null | null | 1 | 701 | I'm running into a little problem with my infowindows: when a marker
is close enough to the edge of the map that the map needs to pan to
display the full infowindow, it does so but not enough to allow for a
few pixels of space between the infowindow and the border of the map.
Technically this works because content is made visible but it looks
awful.
Any ideas on how to make the infowindow have a margin?
```
marker = new GMarker(new GLatLng(this.latitude,this.longitude));
map.addOverlay(marker);
marker.openInfoWindow(this.infoWindow());
```

But this shows correctly if I use
```
map.openInfoWindow(marker.getLatLng(),this.infoWindow());
```

| Centering an infowindow and infowindow margins - Google Maps | CC BY-SA 3.0 | null | 2010-06-23T07:22:38.143 | 2013-10-17T14:05:24.250 | 2013-10-17T14:05:24.250 | 1,711,796 | 372,653 | [
"google-maps"
] |
3,100,807 | 1 | 3,100,957 | null | 5 | 3,361 | I have recently started using doc-view in Emacs, but I am having quite a few problems with it. The main one is that I can't scroll down on pages. I can see the next or previous page using "n" or "p", but the commands to scroll up and down a page, which are supposedly SPACE and DEL, do not work. Well, to be fair, DEL works, but it goes to the previous page rather than scroll up to the bottom of the previous page. The result is that I can only see the top of the pdf pages, but not the bottom parts.
I tried changing the view to continuous, but that doesn't work either. This is what I tried changing:

I did check the customisations for doc-view, but the variables (or options, or whatever they are called) did not appear to me to be the ones which would solve my problem.
More information: I did manage to make SPACE and DEL work at some point, but I don't remember what I did, and I can't get it to work again. I am using Aquamacs.
Any ideas?
By the way, another problem I have is that doc-view causes Aquamacs to sort of crash, meaning it freezes everything, keeps "thinking", and I have to force quit Aquamacs to get it to work again. While this is not my main question, if anyone can tell me anything about this I would also appreciate.
Thanks!
: I tried what the answer below suggested, it didn't work, kept trying other things/commands, and then C-n and SPACE started working! I quit Aquamacs, started it again, opened a pdf document, and it is back to not working. Can someone please explain what is happening? How can I make this reliable?
| How to scroll down on pages in doc-view mode in Emacs? | CC BY-SA 2.5 | null | 2010-06-23T10:28:41.400 | 2014-09-15T02:03:32.077 | 2017-02-08T14:27:29.547 | -1 | 347,646 | [
"emacs",
"docview"
] |
3,101,592 | 1 | 3,101,720 | null | 1 | 113 | i am using jQuery to dynamically add content
```
$("#articles").prepend('<article><header><p>info</p><h2>You are using Internet Explorer</h2></header><p>It is recommended that you use a modern browser like Firefox, Chrome or install Google Chrome Frame to experience better performance and advanced HTML5 and CSS3 features.</p></article>');
```
but the HTML i got was

notice the `/>`
| Dynamically added AJAX content with wrong markup | CC BY-SA 2.5 | null | 2010-06-23T12:34:11.063 | 2010-06-23T12:55:20.667 | 2017-02-08T14:27:30.223 | -1 | 292,291 | [
"javascript",
"jquery",
"ajax",
"html"
] |
3,102,619 | 1 | null | null | 0 | 215 | Alright, so here's the problem I'm having (it's a weird one.)
I added a new UIViewController for the app I'm building. The first view controller works perfectly, orients correctly, etc. The second one orients horribly.
This is how it looks if you start in landscape and then change orientation to portrait:


And then, if you start in portrait and switch to landscape:


It's worth noting that the button isn't a problem, it's there as a trigger for some code and doesn't need to stay correctly placed. Also, switching tabs makes the orientation display correctly, but it breaks as soon as you switch again.
I have absolutely no idea why this is happening. The only code I've added to this view controller is an IBAction that doesn't have any bearing (I commented it out to be sure.) Any ideas?
Thanks,
jkap
| iPad - UIViewController only kinda rotates | CC BY-SA 2.5 | null | 2010-06-23T14:39:53.513 | 2011-11-22T19:02:38.687 | null | null | 293,388 | [
"objective-c",
"ipad",
"uiviewcontroller",
"orientation"
] |
3,107,040 | 1 | 3,114,080 | null | 2 | 691 | The braces shown below after `...ret):String` are incorrectly being highlighted as red
I'm using the following syntax definition file for actionscript:
- [http://www.vim.org/scripts/script.php?script_id=1061](http://www.vim.org/scripts/script.php?script_id=1061)

2 Questions:
1. Does anyone happen to know off-hand what causes this weird matching?
2. Is there anyway of identifying the current syntax matching group under the cursor?
| Incorrect syntax highlighting Vim (Actionscript 3) | CC BY-SA 2.5 | null | 2010-06-24T03:26:28.713 | 2010-06-24T21:39:59.940 | null | null | 303,911 | [
"actionscript-3",
"vim",
"syntax-highlighting"
] |
3,108,011 | 1 | 3,108,034 | null | 3 | 7,237 | I'm using one of my MySQL database tables as an actual table, with times of the day as each column, and one column called day. You guessed it, in day it says the day of the week, and in the rest of the cells it says what is happening at that time.
What I want to do is only show the cells that have value in it. In my case, I'm always going to have all the rows and 2 columns full. The 2 columns are 'day' and '19:00', however in the future I might add values for '18:00' etc.
So, how can I only SELECT the columns and rows which have data in them? Some type of 'WHERE: there is data'?
Thanks!
Picture
| SQL isset and not showing blank 'cells' | CC BY-SA 2.5 | 0 | 2010-06-24T07:41:13.983 | 2010-06-24T08:26:23.393 | 2017-02-08T14:27:32.623 | -1 | 353,542 | [
"sql",
"mysql",
"select",
"where-clause"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.