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,682,939 | 1 | null | null | 0 | 537 | I tried 'float: left;', but when scrolling(slowly is clearer), only one list item scroll..but not numItem of one row..(But photos app built in palm pre ROM woks just fine)
In one file:
```
<div id="results-list" class='thumb-list' x-mojo-element="List"></div>
```
In another:
```
<ul>#{-listElements}</ul>
```
In another:
```
<li class='thumb-item'>
<img src="#{-pic_idFormatted}"/>
</li>
```
The CSS:
```
/**
* thumblist
*/
.thumb-list {
padding: 12px;
}
.thumb-item {
float: left;
margin: 8px;
}
.thumb-item img {
width: 80px;
height: 80px;
border-radius: 5px;
border: 1px solid black;
}
```
The Script:
```
this.resultsModel = {items: []};
this.controller.setupWidget('results-list', {
itemTemplate:'thumb/search-result',
listTemplate:'thumb/result-list',
formatters:{pic_id:this.formatThumb.bind(this)},
//renderLimit: 50,
lookahead: 20,
fixedHeightItems: true,
initialAverageRowHeight:100,
hasNoWidgets: true
},
this.resultsModel);
```


in the same grid
| How to make list in webOS look like Grid? | CC BY-SA 2.5 | 0 | 2010-09-10T07:37:56.420 | 2010-09-10T09:21:54.357 | 2010-09-10T09:21:54.357 | 398,646 | 398,646 | [
"javascript",
"html",
"css",
"webos",
"mojo"
] |
3,683,211 | 1 | 4,895,542 | null | 38 | 32,276 | I got a video element on a page that's working fine both in safari mobile and desktop.
I have a seme-transparent pull-down menu that's working fine. The problem is, when the menu is over the video element, on the desktop safari i can see the video under the menu (as desired), while on the mobile version the video element stay on the foreground (ugly) no matter what i tell the css. Is there any workaround?

| iPad Safari mobile seems to ignore z-indexing position for html5 video elements | CC BY-SA 2.5 | 0 | 2010-09-10T08:37:47.030 | 2020-12-18T11:50:48.293 | 2010-09-10T13:27:18.250 | 279,739 | 279,739 | [
"ipad",
"mobile-safari",
"html5-video"
] |
3,683,432 | 1 | 3,683,480 | null | 0 | 2,175 | I need to display a image view that is filled with violet color picture as shown below,
but there us no UIColor color violet for this.
How can i display it?
| how can i display voilet color in imageview | CC BY-SA 2.5 | 0 | 2010-09-10T09:14:31.807 | 2011-05-04T10:27:27.083 | 2010-09-10T12:07:47.273 | 699,226 | 699,226 | [
"iphone"
] |
3,684,456 | 1 | 3,684,520 | null | 0 | 208 | In a C# (3.5) Winforms app I have a FlowLayoutPanel containing a number of listviews. Each listview represents a short to-do list sorted in a sequential order with assigned priorities.
Occasionally a user has to create a new priority 1 to-do item.
An issue arises when there are multiple priority 1 instances - how does the user know which was requested first? Due to space constraints it isn't possible to show a date-time field.
The listviews currently look like this:

Could I use some sort of watermark that shows the time floating on-top of the listview whenever a priority 1 is added?
A visual of what I'm thinking:

| To-do list(view)s with time displayed? | CC BY-SA 2.5 | null | 2010-09-10T12:07:19.953 | 2010-09-10T12:17:46.860 | null | null | 127,776 | [
"c#",
"winforms",
".net-3.5",
"listview"
] |
3,684,484 | 1 | 3,689,710 | null | 988 | 138,231 | I'm helping a veterinary clinic measuring pressure under a dogs paw. I use Python for my data analysis and now I'm stuck trying to divide the paws into (anatomical) subregions.
I made a 2D array of each paw, that consists of the maximal values for each sensor that has been loaded by the paw over time. Here's an example of one paw, where I used Excel to draw the areas I want to 'detect'. These are 2 by 2 boxes around the sensor with local maxima's, that together have the largest sum.

So I tried some experimenting and decide to simply look for the maximums of each column and row (can't look in one direction due to the shape of the paw). This seems to 'detect' the location of the separate toes fairly well, but it also marks neighboring sensors.

So what would be the best way to tell Python which of these maximums are the ones I want?
Also I took 2x2 as a convenience, any more advanced solution is welcome, but I'm simply a human movement scientist, so I'm neither a real programmer or a mathematician, so please keep it 'simple'.
Here's a [version that can be loaded with np.loadtxt](https://upl.io/0liy07)
---
## Results
So I tried @jextee's solution (see the results below). As you can see, it works very on the front paws, but it works less well for the hind legs.
More specifically, it can't recognize the small peak that's the fourth toe. This is obviously inherent to the fact that the loop looks top down towards the lowest value, without taking into account where this is.
Would anyone know how to tweak @jextee's algorithm, so that it might be able to find the 4th toe too?

Since I haven't processed any other trials yet, I can't supply any other samples. But the data I gave before were the averages of each paw. This file is an array with the maximal data of 9 paws in the order they made contact with the plate.
This image shows how they were spatially spread out over the plate.

## Update:
[I have set up a blog for anyone interested](http://www.flipserd.com/blog/ivoflipse/post/toe-detection-revisited) and [I have setup a OneDrive with all the raw measurements.](https://1drv.ms/u/s!AjVZ_ROiXWgOhDEn4KrRB8mrOZWM?e=aUCCm4) So to anyone requesting more data: more power to you!
---
## New update:
So after the help I got with my questions regarding [paw detection](https://stackoverflow.com/q/4087919/77595) and [paw sorting](https://stackoverflow.com/q/4502656/77595), I was finally able to check the toe detection for every paw! Turns out, it doesn't work so well in anything but paws sized like the one in my own example. Off course in hindsight, it's my own fault for choosing the 2x2 so arbitrarily.
Here's a nice example of where it goes wrong: a nail is being recognized as a toe and the 'heel' is so wide, it gets recognized twice!

The paw is too large, so taking a 2x2 size with no overlap, causes some toes to be detected twice. The other way around, in small dogs it often fails to find a 5th toe, which I suspect is being caused by the 2x2 area being too large.
After [trying the current solution on all my measurements](http://www.flipserd.com/blog/ivoflipse/post/toe-detection-revisited) I came to the staggering conclusion that for nearly all my small dogs it didn't find a 5th toe and that in over 50% of the impacts for the large dogs it would find more!
So clearly I need to change it. My own guess was changing the size of the `neighborhood` to something smaller for small dogs and larger for large dogs. But `generate_binary_structure` wouldn't let me change the size of the array.
Therefore, I'm hoping that anyone else has a better suggestion for locating the toes, perhaps having the toe area scale with the paw size?
| Peak detection in a 2D array | CC BY-SA 4.0 | 0 | 2010-09-10T12:12:25.200 | 2021-11-18T08:12:56.133 | 2021-11-18T08:12:56.133 | 77,595 | 77,595 | [
"python",
"image-processing"
] |
3,684,951 | 1 | 3,685,020 | null | 0 | 307 | I've encountered a strange feature (that may be related to SQL Management Studio) with regard to the placement of return characters at the end of SQL Statements. Whilst the query runs just fine within the ID, the feature in question was breaking our deployment scripts.
Essentially, for some reason, certain lines were being terminated by what looked like a Carriage Return (CR) instead of a CRLF, as can be seen in the diff between two files below:

Now I know how to modify the build scripts to catch this, but I was curious as to how this was being caused. How on earth would a CR character be used in place of a CRLF character?
Thoughts anyone?
| Strange issue in SQL Management Studio IDE with CR instead of CRLF | CC BY-SA 3.0 | null | 2010-09-10T13:29:09.603 | 2015-06-26T12:52:14.643 | 2015-06-26T12:52:14.643 | 144,491 | 144,491 | [
"sql-server",
"sql-server-2005",
"ssms"
] |
3,685,161 | 1 | 3,686,015 | null | 7 | 4,590 | How do you change the behavior of a `QListWidget` so that it resizes its height instead of choosing a (seemingly arbitrary) height and adding scrollbars? See screenshot:

The `QListView`'s should fill up as much space horizontally as they can (creating as many "columns," if you will.) Then they wrap and make as many rows as necessary to fit all the items. These calculations should be adjusted as the window is resized. This is all working fine.
However, what I to happen is that instead of the height staying the same, the `QListView` should grow or shrink vertically and never need any scrollbars. The scrolling, if necessary, will be handled on the parent `QWidget` that hosts all of the labels and lists. It seems like once the height of the `QListWidget` is established (not sure where its default is coming from), it never changes. It is too big in some cases (see second "Test" list above) and too small in others (see first "blank maps" list above.)
The layout above is nothing surprising: two `QLabel`'s and two `QListWidget`'s in a `QVBoxLayout.` Here are the properties I have set on the `QListWidget`'s:
```
setMovement(QListView::Static);
setResizeMode(QListView::Adjust);
setViewMode(QListView::IconMode);
setIconSize(QSize(128, 128));
```
(I already tried setting the horizontal and vertical scrollbar policies, but that just turns the scrollbars off, clipping the content. Not what I want.)
| QListWidget that resizes instead of scrolls | CC BY-SA 2.5 | 0 | 2010-09-10T13:59:43.693 | 2010-09-10T15:37:29.413 | null | null | 183,339 | [
"c++",
"qt",
"qlistview",
"qlistwidget"
] |
3,685,562 | 1 | null | null | 1 | 460 | I am trying to get my xml to lay this out properly. How it is now, the video is mooshed. If I take away the
```
android:layout_below="@id/day_scroller"
```
in the VideoView tag and add
```
android:layout_centerHorizontal="true"
```
the video size is now proportioned, but I lose my content that is display in my
```
android:id="@+id/day_container"
```
I did not create this layout, but am trying to understand how layouts work and to get this one to work properly. Any help or leads to where I can gain a better understanding is greatly appreciated!
Here is what I want:

And here is the XML:
```
<?xml version="1.0" encoding="utf-8"?>
```
```
>
<com.accuweather.wordweather.SnapHorizontalScrollView android:id="@+id/day_scroller"
android:layout_width="fill_parent"
android:layout_height="200dip"
android:scrollbars="none"
android:fadingEdge="none"
>
<LinearLayout android:id="@+id/day_container"
android:orientation="horizontal"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:paddingTop="45dip"
/>
</com.accuweather.wordweather.SnapHorizontalScrollView>
<TextView
android:id="@+id/location"
android:layout_width="fill_parent"
android:gravity="center"
android:layout_height="wrap_content"
android:background="@drawable/background"
android:textSize="20dip"
/>
<ImageView android:id="@+id/current_alert_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/alert_icon"
android:visibility="gone"
/>
<VideoView android:id="@+id/videoview"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_centerHorizontal="true"
/>
<ProgressBar android:id="@+android:id/progress_large"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_marginBottom="4dip"
>
<ImageView android:id="@+id/scroll_page_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/scrollview_page_on"
/>
<ImageView android:id="@+id/scroll_page_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/scrollview_page_off"
/>
<ImageView android:id="@+id/scroll_page_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/scrollview_page_off"
/>
</LinearLayout>
<ImageView
android:id="@+id/logo"
android:scaleType="fitXY"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="10dip"
android:src="@drawable/logo"
android:layout_marginBottom="10dip"
android:layout_width="150dip"
android:layout_height="13dip"
/>
<Button
android:id="@+id/logo_mask"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="5dip"
android:layout_marginBottom="5dip"
android:layout_width="180dip"
android:layout_height="50dip"
android:background="@drawable/trans"
/>
```
| Help with Android XML layout | CC BY-SA 2.5 | null | 2010-09-10T14:45:26.827 | 2011-03-10T03:33:00.993 | null | null | 2,186,261 | [
"android",
"xml"
] |
3,685,723 | 1 | null | null | 0 | 1,516 | I've written a entry form for our company employees to enter marketing courses into the DB and at the same time add them to a Google Calendar. The Calendar is accepting the events, but the coloration of the event is different from a "manually" entered event using Google's interface. This leads me to believe that there is some property I am not setting that is causing the events not to be show on the calendar once it is embedded in our other company web pages.
The code used to enter events:
```
// Create a CalenderService and authenticate
CalendarService myService = new CalendarService("exampleCo-exampleApp-1");
myService.setUserCredentials("[email protected]", "xxxxxx");
CalendarQuery query = new CalendarQuery();
query.Uri = new Uri("https://www.google.com/calendar/feeds/default/owncalendars/full");
CalendarFeed resultFeed = (CalendarFeed)myService.Query(query);
Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/owncalendars/full");
foreach (CalendarEntry centry in resultFeed.Entries)
{
litErrorMsg.Text += centry.Title.Text + "<br />";
if (centry.Title.Text == "[email protected]")
{
postUri = new Uri("https://www.google.com/calendar/feeds/" +
centry.SelfUri.ToString().Substring(centry.SelfUri.
ToString().LastIndexOf("/") + 1) + "/private/full");
break;
}
}
Google.GData.Calendar.EventEntry entry = new Google.GData.Calendar.EventEntry();
// Set the title and content of the entry.
entry.Title.Text = eventName;
entry.Content.Content = eventName;
//entry.QuickAdd = true;
entry.EventVisibility = new Google.GData.Calendar.EventEntry.Visibility("event.public");
When eventTime = new When(Convert.ToDateTime(startDate), Convert.ToDateTime(endDate));
entry.Times.Add(eventTime);
GDataGAuthRequestFactory requestFactory = (GDataGAuthRequestFactory)myService.RequestFactory;
requestFactory.CreateRequest(GDataRequestType.Insert, postUri);
// Send the request and receive the response:
AtomEntry insertedEntry = myService.Insert(postUri, entry);
```
And this is the resulting calendar:

The "test event jasdf event" is the manually entered event, and the two events: "Test event 234" are the programmatically entered events. In any case, once I embed the calendar, the only event showing up is the "test event jasdf".
I tried to manually set the event to PUBLIC but that didn't seem to help.
Anyone faced this issue before or had success with google calendar? If so, I'd like to see what you might have used to successfully create events and publish them.
Thanks!
| Unable to see programmatically entered events in Google Calendar | CC BY-SA 2.5 | null | 2010-09-10T15:04:04.103 | 2010-09-27T01:35:59.873 | null | null | 138,374 | [
"c#",
"asp.net",
"google-calendar-api"
] |
3,685,997 | 1 | null | null | 1 | 540 | I need to carry out a data capture exercise, which is looking like a large task, that unfortunately may end up being done in Excel. I believe a database is more suitable, but the structure of it is probably very complicated.
I've created 4 categories per Unit (30 units). Each category has 8 graphs/dimensions. Each graph/dimension has a scale that I've visually broken down into 4 major interval points (inerval1, Interval2, etc). I'm intending to put a figure in a box that represents the change against these 4 interval points. Therefore, 4(categories)*8(dimensions) = 32. Then 32*4(intervals) = 128. This means per unit I need to record 128 changes.
...and the best thing, there are 3 distincy scales. 4 of the graphs use one scale. 2 use another and the last 2 use a final one.
Like I said this is a monster of a task and doing this in excel is possible, but doesn't give me the flexibility I think I need when it comes to comparing the data.
- - - -
I'm trying to figure out where the actual data would be captured. Would I have a single table called tblIntervalData that is related to a linking table that connects to each of the 3 tblScales, which in turn are linked to the tblDimensions?
Below is a screen grab of what I've done, but it doesn't feel right. Your views and advice will be much appreciated. '
[A higher resolution image can bee seen here](http://i56.tinypic.com/20pss5e.jpg)

| Database design & table relationships: where would the data go? (Image included) | CC BY-SA 3.0 | null | 2010-09-10T15:35:33.447 | 2017-06-10T19:30:22.350 | 2017-06-10T19:30:22.350 | 4,370,109 | 1,955,139 | [
"database",
"database-design",
"relationship"
] |
3,686,136 | 1 | null | null | 1 | 1,637 | I am working with Gridview control and I am also adding radio button to each row in ASP .NET.
Here is something that I would like to accomplish but I am not sure how this should done. The problem is that I have add a muliple datarow insie of the each gridview. Something like below.

So, some cases I have add a row with two rows like the example. And, the ID eventurally will be radio button where user can click. Is there any way i can accomplish this?
Thank your help.
| Adding muliple rows inside of Gridview row | CC BY-SA 2.5 | null | 2010-09-10T15:52:44.903 | 2012-01-13T11:18:57.470 | 2010-09-10T15:54:24.570 | 98,180 | 356,822 | [
"asp.net",
"gridview"
] |
3,686,516 | 1 | null | null | 24 | 43,808 | I'm currently developing a member administration for a local association here and I'm developing the database schema at the moment. I'd like to share it with you to improve it and give other an example of a Role Based Access Model (RBAC). I'd appreciate any constructive criticism especially about the relationships I used between the tables.
Link to highres: [http://i.stack.imgur.com/WG3Vz.png](https://i.stack.imgur.com/WG3Vz.png)
Heres the schema: 
How it works:
I'm mapping existing clients (actually members of the association) from an external application into my administration application. (clients table)
The association is structured in Division, Subdivisions, etc. (intern_structures table). Every client can be a member in multiple Division, Subdivisions, Sections etc.
Every client can have one or multiple roles in such memberships (divisions,...) like President, Actuary, Treasurer etc. and each role has certain privileges which the owner of the role can apply on others in his Division,Subdivision,Section etc.
A credential is connected to a certain action of an application. The owner of the credential may execute this action on other members in his scope. There can be multiple "standalone" applications but they all share the same authentication/authorization system.
An application is structured in Modules/Submodules/Actions etc. An example could be a "Personal Details" module and this module contains a submodule called "Picture" and you could apply the actions "view,delete,edit" on this picture. But you can't delete any picture unless the person whose picture you try to delete is in a division/section where you have the adequate role to do so.
The internal and application structure are both trees, implemented as adjacency list nested set. The adjacency list ensures the integrity and the nested set allows me to traverse the tree quickly.
An exception is that you can give someone certain credentials directly (client_credentials). This is needed if someone needs to perform certain actions on somebody who isn't in his divsion/section.
So, someone can be a member in multiple divsions/sections and obtain multiple roles in every division/section he's a member of. I'm going to merge all credentials someone has through his multiple roles. And credentials are always positive, means restrictive credentials are not possible.
| DB Schema of a Role Based Access Control | CC BY-SA 2.5 | 0 | 2010-09-10T16:43:20.417 | 2018-09-06T11:52:38.893 | null | null | 440,764 | [
"mysql",
"credentials",
"rbac",
"db-schema"
] |
3,686,538 | 1 | 3,686,566 | null | 0 | 128 | I'm having the following problem, and would love some pointers in the right direction.
To put things simple:
I information from a table, with PHP, that I put inside a `<select>` tag.
Whenever I click one of the options (lines) present it should load/show certain information on a cell that is right next to it. If I click another one of the options it should show different information (loaded from a database).
Like this:

Click on a category, show information. Actually I'm supposed to have on the second cell another sub-category, but I believe that If I can get this first step solved then it will be a matter of applying it to the 2nd/3rd cells.
UPDATE:
I am also considering using a frame inside that cell, a php document, that reloads everytime the user clicks on one of the options. Is that viable as well?
| Using Javascript to show contents that are present in DB | CC BY-SA 2.5 | 0 | 2010-09-10T16:47:20.123 | 2010-09-10T17:13:02.970 | 2010-09-10T17:13:02.970 | 210,742 | 210,742 | [
"php",
"javascript",
"database",
"mysql"
] |
3,686,626 | 1 | 3,686,725 | null | 0 | 250 | I am having a problem using Superfish dropdowns inside a jQuery grid. It looks like the dropdown is being clipped by the table bounds.
I’ve researched this and it seems to be a z-index issue except that I have tried various combinations of z-index to no avail.
Here’s a screenshot of what it looks like:

I can post the css and code if need be; it's a bit complicated though.
Thanks in advance.
Rick
| Superfish dropdown clipped by table bounds | CC BY-SA 2.5 | null | 2010-09-10T17:00:31.917 | 2010-09-10T17:15:38.690 | null | null | 131,818 | [
"jquery",
"css",
"superfish",
"suckerfish"
] |
3,686,700 | 1 | 3,831,656 | null | 2 | 458 | Having just upgraded to iOS 4.1 (Xcode 3.2.4) I am getting warnings when using the static analyser that I don't think I was previously getting when using 3.2.3

Now the project compiles just fine, is this something that has changed or do I have something set wrong?
# EDIT:
I think it might be related to this:
[strange-issue-after-upgrading-to-ios-4-1-sdk](https://stackoverflow.com/questions/3677879/strange-issue-after-upgrading-to-ios-4-1-sdk)
much appreciated
Gary
| Xcode 3.2.4 Analyzer skipped this file? | CC BY-SA 2.5 | 0 | 2010-09-10T17:12:12.720 | 2010-09-30T14:38:24.307 | 2017-05-23T12:13:30.580 | -1 | 164,216 | [
"iphone",
"objective-c",
"cocoa-touch",
"xcode",
"clang-static-analyzer"
] |
3,687,188 | 1 | 3,689,724 | null | 9 | 11,527 | From this screenshot you can see a lot of space inside the rows:

I've used these functions to get resizing:
```
resizeRowsToContents();
resizeColumnsToContents();
```
How can I get a better fit for cells/rows sizes?
| How to get right row height in Qt for QTableView object? | CC BY-SA 2.5 | 0 | 2010-09-10T18:16:56.997 | 2019-09-13T16:20:54.323 | 2010-09-11T03:34:41.560 | 31,044 | 262,732 | [
"c++",
"qt",
"qt4",
"qtableview"
] |
3,687,258 | 1 | 3,687,359 | null | 4 | 5,464 | I'm running a query via php on a mysql database. With my result set I'm am iterating the following table:
```
$resultString = '<table>';
$resultString .= '<tr>';
$resultString .= '<th>Index</th>';
$resultString .= '<th>Title</th>';
$resultString .= '<th>File</th>';
$resultString .= '<th>Template File</th>';
$resultString .= '<th>Pretty URL</th>';
$resultString .= '<th>Parent</th>';
$resultString .= '<th></th>';
$resultString .= '</tr>';
while($data = mysql_fetch_assoc($results)){
$resultString .= '<form class="myForm">' ."\n";
$resultString .= '<tr>' ."\n";
$resultString .= '<input type="hidden" name="index" value="' . $data['index'] . '">' ."\n";
$resultString .= '<input type="hidden" name="title" value="' . $data['title'] . '">' ."\n";
$resultString .= '<input type="hidden" name="file_name" value="' . $data['file_name'] . '">' ."\n";
$resultString .= '<input type="hidden" name="template_file" value="' . $data['template_file'] . '">' ."\n";
$resultString .= '<input type="hidden" name="child_of" value="' . $data['child_of'] . '">' ."\n";
$resultString .= '<input type="hidden" name="pretty_url" value="' . $data['pretty_url'] . '">' ."\n";
$resultString .= '<td class="indexTd">' . $data['index'] . '</td>' ."\n";
$resultString .= '<td>' . $data['title'] . '</td>' ."\n";
$resultString .= '<td>' . $data['file_name'] . '</td>' ."\n";
$resultString .= '<td>' . $data['template_file'] . '</td>' ."\n";
$resultString .= '<td>' . $data['pretty_url'] . '</td>' ."\n";
$resultString .= '<td>' . $this->get_parent_select_list($data['child_of'],$data['index']) . '</td>' ."\n";
$resultString .= '<td class="buttonTd"><input type="button" class="deletePageButton" value="X" onclick="submit_form(this,\'deletePage\')"></td>' ."\n";
$resultString .= '</tr>' ."\n";
$resultString .= '</form>' ."\n";
}
$resultString .= '</table>';
```
The table comes out great, the only problem is my form isn't working at all... viewing it in FireBug I see this:

The form is closing itself becore all of my input tags can populate it. I HAVE tried putting the tags inside a "<td>" instead of a "<tr>" to no avail....
thoughts?
| Form Issue (closing itself early in table) | CC BY-SA 2.5 | null | 2010-09-10T18:27:10.820 | 2019-03-10T11:35:58.557 | null | null | 183,806 | [
"php",
"html",
"forms"
] |
3,687,796 | 1 | 6,829,640 | null | 1 | 630 | I have a collage image ( many images clubbed together ) , and at the center i have an advertisement banner for example visit the following sample image

Now, in my application user can set this image as a wallpaper in iphone screen. now what i want is to keep changing advertisement banner (here is is MC Donald's) inside this image on a regular interval (after setting the image as a wallpaper).
| change image on iphone screen's wallpaper | CC BY-SA 2.5 | null | 2010-09-10T19:44:04.230 | 2011-07-26T11:57:05.290 | 2010-09-11T06:09:14.240 | 405,383 | 405,383 | [
"iphone",
"iphone-sdk-3.0",
"ios4"
] |
3,687,903 | 1 | null | null | 15 | 18,195 |
## The Problem
i'm trying to import data into a table using SQL Server Management Studio's `Import Data` task. It only brings in 26 rows, out of the original 49,325. (: That's where 99.9% comes from: `(1-26/49325)*100 = 99.9%`
Using DTS in Enterprise Manager correctly brings all 49,325 rows.
Why is SSMS not importing all rows, reporting that it transferred 49,325 successfully, and experienced no errors? Why is Enterprise Manager able to correctly import all 49,325 rows?
Microsoft SQL Server Management Studio version: 10.0.1600.22 (From SQL Server 2008, installed today on a fresh Windows 7 machine, SP1 applied)
## Proof - Import using SSMS
The `STRTransactions` table is initially empty:
[](https://i.stack.imgur.com/2N9Xl.png)
Source is the `ContosoFrobManager` database on `lithium`:
[](https://i.stack.imgur.com/wcqLK.png)
Destination is the `Grob` database on `lithium`;
[](https://i.stack.imgur.com/lqrSi.png)
i want to copy data from one (or more) tables:

i want to copy the `STRTransactions` table:

You can append to the existing table, that's fine (it's empty). i want to enable identity inserts. And don't try to import a timestamp (since you'll just complain anyway):

Run immediately, that's fine:

Yup, you're going to do stuff:

i managed to catch it while it was transferring the 49,325 rows, around the 1k mark:

All done. All 49,325 rows copied successfully:

And here's the report:
> The execution was successful- Initializing Data Flow Task (Success)- Initializing Connections (Success)- Setting SQL Command (Success)- Setting Source Connection (Success)- Setting Destination Connection (Success)- Validating (Success) Messages Warning 0x80049304: Data Flow Task 1:
Warning: Could not open global shared
memory to communicate with performance
DLL; data flow performance counters
are not available. To resolve, run
this package as an administrator, or
on the system's console. (SQL Server
Import and Export Wizard) Warning
0x80047076: Data Flow Task 1: The
output column "timestamp" (158) on
output "OLE DB Source Output" (11) and
component "Source - STRTransactions"
(1) is not subsequently used in the
Data Flow task. Removing this unused
output column can increase Data Flow
task performance. (SQL Server Import
and Export Wizard)- Prepare for Execute (Success)- Pre-execute (Success)- Executing (Success)- Copying to [dbo].[STRTransactions] (Success) 49325 rows transferredMessages Information 0x402090df: Data
Flow Task 1: The final commit for the
data insertion in "component
"Destination - STRTransactions" (163)"
has started. (SQL Server Import and
Export Wizard) Information
0x402090e0: Data Flow Task 1: The
final commit for the data insertion
in "component "Destination -
STRTransactions" (163)" has ended.
(SQL Server Import and Export Wizard)-
Excellent. All done. "".
Except that it only wrote 26 rows:
[](https://i.stack.imgur.com/QqZCA.png)
Obviously i'm not crazy. i did everything right. And even if i didn't, SSMS gives no indication of any problems. i've repeated these same steps 8 times:
- - -
Every time it's exactly 26 rows, no more, no less. But which was destroyed, the master, or the aprentice?
But just to prove that i'm not doing anything wrong, we'll try again with . An excellent tool written over ten years ago:
## Proof - Import using Enterprise Manager
i've deleted the 26 rows from the `STRTransactions` table. i could provide a screenshot that i'm starting with an empty table; or you could just trust me on this. And since the wizards are nearly identical, you'll be seeing nearly identical screenshots. Sorry about that; but nobody will believe me without proof.
i want to export from the `ContosoFrobManager` database on `lithium`:
[](https://i.stack.imgur.com/dpwUW.png)
i want to import to the `Grob` database on `lithium`:
[](https://i.stack.imgur.com/IEsg4.png)
i want to copy tables:

i want to copy the STR Transactions table:
[](https://i.stack.imgur.com/p9Daa.png)
You can go ahead and append rows to the existing table (it's empty anyway). i want you to insert identity values. And don't try to insert `timestamp` values, you'll just throw an error anyway:
[](https://i.stack.imgur.com/u8lgH.png)
Run now, sure:

Yup, you're about to do stuff:
[](https://i.stack.imgur.com/dAgVR.png)
i managed to catch it in the middle of the import, around 12k rows:
[](https://i.stack.imgur.com/CtIgk.png)
All done, 49,325 rows successfully copied:
[](https://i.stack.imgur.com/WWjS0.png)
And we select from the table to see the rows:
[](https://i.stack.imgur.com/GJEXO.png)
---
Why is SSMS, a tool which has been actively developed for 6 years now still not gotten in right? While Enterprise Manager was nearly bug-free by the initial dev team? This is another example of the critical bugs in SSMS. The last critical bug I found [was that it does not script all objects](https://serverfault.com/questions/66854/sql-server-management-studio-not-scripting-all-objects).
---
I suspect the only answers I'll see are
- - -
Of course I have a workaround: stop using SQL Server Management Studio. But I'm already having to run Enterprise Manager in an XP Mode 32-bit compatibility thing (as you can see by the Luna themed windows on my Aero themed desktop)
`Me:` I got it to work
`Colleague:` How?
`Me:` I used Enterprise Manager
`Colleague:` Well.
`Colleague:` I might have to install that, then.
I created a [ticket on Microsoft Connect](https://connect.microsoft.com/SQLServer/feedback/details/597022/ssis-silently-skipping-rows), but it was closed after several weeks.
| SQL Server Management Studio: Import quietly ignoring 99.9% of data | CC BY-SA 4.0 | 0 | 2010-09-10T19:58:43.217 | 2021-09-07T14:41:59.687 | 2021-09-07T14:41:59.687 | 2,756,409 | 12,597 | [
"sql-server",
"ssms",
"etl",
"sql-server-2000"
] |
3,688,070 | 1 | 3,688,433 | null | 1 | 147 | So I'm having the hardest time figuring out what this thing is called, or where I can find it. I have an app where I would like to use this icon, or button or whatever it is, but I can't find it in Apple's system supplied buttons.
Here is a picture of the icon I'm looking for (it's in the red circle):

I know that Pandora uses this same icon, but where the heck did they find it?
Thanks,
Robbie
| iPod detail view icon | CC BY-SA 2.5 | 0 | 2010-09-10T20:21:55.133 | 2010-09-10T21:21:27.300 | null | null | 138,145 | [
"iphone",
"uibutton",
"uinavigationitem"
] |
3,688,897 | 1 | 3,689,012 | null | 0 | 5,744 | In have a controller class that handle a Contact object. In this controller I have defined some actions like the two I am showing here
```
public ActionResult Edit(int id)
{
ContactModel cm = loadContactModel(id);
cm.ModelState = ModelStateEnum.Edit;
return PartialView("Contact", cm);
}
public ActionResult AddAddress(int id)
{
AddressModel am = new AddressModel() { ModelState = ModelStateEnum.Add };
return PartialView("Address", am);
}
```
The first load the Contact Detail view to edit a contact and the second load an Address detail view to add an Address to a Contact. On the UI side I have, in the same page, a button and an anchor that respectively call the same javascript function, this one
```
function loadDialog(action, id, title) {
$("#contactPanel").dialog("option", "title", title);
var urlAction = action;
if (id != "") urlAction = urlAction + "/" + id;
$.ajax({
type: "get",
dataType: "html",
url: urlAction,
data: {},
success: function(response) {
$("#contactPanel").html('').html(response).dialog('open');
}
});
}
```
This function simply load a jQuery dialog and set its content to what is returned back from the ajax call.
The problem is that when I call the AddAddress action I get .
I have used Fiddler to look at the http request and this is what I see

Any suggestion???
| why I am getting HTTP/1.1 500 Internal Server Error? | CC BY-SA 2.5 | null | 2010-09-10T22:42:18.560 | 2015-11-19T01:36:20.303 | 2015-11-19T01:36:20.303 | 1,505,120 | 431,537 | [
"asp.net-mvc-2"
] |
3,689,484 | 1 | 3,689,691 | null | 0 | 2,521 | Since FixedSys won't display in Chrome or Safari I make it switch to `Lucida Console`. It works for Chrome but for Safari I run into an issue. Unless `Lucida Console` is by itself, it WILL be to the font I said. If not -- then it won't work.
Have a look at this picture:
I don't know what font the first Hello world! is but it's weird. It's weird because the default font on my Safari is Times New Roman. I have checked. Also, it's not in conflict with any other style because I have tried it by itself and the problem persists.
| CSS - Specifying fonts on Safari | CC BY-SA 3.0 | 0 | 2010-09-11T02:01:41.187 | 2018-01-29T05:59:10.600 | 2018-01-29T05:59:10.600 | 1,033,581 | 272,501 | [
"html",
"css"
] |
3,689,507 | 1 | 3,689,560 | null | 1 | 3,891 | Or should I just copy all the files from bin\Release\ excluding .pdb?
:


:
That is what I've found in the Advanced settings at the Build tab. Is it what I'm looking for?

| How to make a release build in the VS Express 2010? | CC BY-SA 2.5 | 0 | 2010-09-11T02:10:13.200 | 2010-09-11T04:19:40.000 | 2010-09-11T02:44:42.700 | 251,311 | 251,311 | [
"visual-studio-2010",
"release"
] |
3,689,508 | 1 | 3,689,785 | null | 0 | 2,053 | I have a `DataGridView` control and I'm checking if I'm getting the correct value of `column 0`

But when I click my button to echo the value, I always get this error...

Are there errors in my code? Or what?
| What Causes this NullReferenceException when Accessing a Cell of a DataGridView? | CC BY-SA 2.5 | null | 2010-09-11T02:10:50.017 | 2013-08-27T01:32:43.457 | 2010-09-11T02:57:54.367 | 76,337 | 396,335 | [
"c#",
"winforms",
"datagridview"
] |
3,689,546 | 1 | 3,689,623 | null | 4 | 4,617 | I hope to display the badge info on the row UITableView like the picture shown below

I try to use codes below:
```
UILabel *labelCell1 =[ [UILabel alloc]init];
labelCell1.frame = CGRectMake(160.9f,10.0f,60.0f,30.0f) ;
[labelCell1 setBackgroundColor:[UIColor
colorWithPatternImage:[[UIImage imageNamed:@"block.png"]
stretchableImageWithLeftCapWidth:0.0 topCapHeight:0.0]]];
```
but I can not get result of round block shown in the picture above.
| display badge info on UITableView | CC BY-SA 2.5 | 0 | 2010-09-11T02:26:34.253 | 2013-12-24T07:16:54.507 | 2010-09-11T02:32:43.943 | 73,488 | 262,325 | [
"iphone"
] |
3,689,570 | 1 | 3,691,052 | null | 7 | 3,101 | I'm adding buttons to form with loop and i noticed adding click event handlers slowing down application too much. Later i tried mouse click event instead click event and it is working instantly.
This screenshot showing my test result:

Source code: [http://pastebin.com/qVewNm1u](http://pastebin.com/qVewNm1u)
Results for 1000 event handler:
Click: 2892ms
MouseClick: 1ms
I can't figure out why Click event very slow.
Edit:
If i change build platform target to x64 or Any CPU, results changing:
Click: 5, MouseClick: 9
Look like x86 platform target causing this problem but still x64 results not good too compared to x86 MouseClick time (1ms).
Edit2:
I changed screenshot now it will show better result.
Edit3:
[https://connect.microsoft.com/VisualStudio/feedback/details/597039/winforms-click-event-slower-than-the-mouseclick-event](https://connect.microsoft.com/VisualStudio/feedback/details/597039/winforms-click-event-slower-than-the-mouseclick-event)
| Why is the Winforms Click event slower than the MouseClick event? | CC BY-SA 2.5 | 0 | 2010-09-11T02:35:18.203 | 2010-09-11T14:24:42.220 | 2010-09-11T14:24:42.220 | 264,877 | 264,877 | [
"c#",
".net",
"winforms",
"events",
"click"
] |
3,689,725 | 1 | 3,691,608 | null | 2 | 373 | 
URL: [http://www.hkpete.com/test.html](http://www.hkpete.com/test.html)
jQuery 1.42
jQuery Tools 1.2.3 overlay
IE7 has this problem too (tested on ietester)
I can not find where the problems lie.
Thanks a lot.
```
<div id="dialog-content">
<!--Login -->
<div id="login" class="panel" style="display:none">
Login..................
</div>
<!--Register -->
<div id="register" class="panel" style="display:none">
Register..................
</div>
</div>
<!--Links-->
<a href="javascript:;" onclick="showDialog('#login','member');">Login</a>
<a href="javascript:;" onclick="showDialog('#register','member');">Register</a>
<script type="text/javascript">
var ol;
var dialog=null;
function showDialog(panel,action){
var each=each ? each : 0;
function overlay(){
if(panel){
$("#dialog div.panel").hide();
//show panel login,register,lostpw
$(panel).show();
}
if(ol !== undefined && ol.isOpened()) {
$("#dialog").css("top", ( $(window).height() - $("#dialog").height() ) / 2+$(window).scrollTop() + "px");
$("#dialog").css("left", ( $(window).width() - $("#dialog").width() ) / 2+$(window).scrollLeft() + "px");
}
//Overlay load
ol=$("#dialog").overlay({top:'center', left:'center', closeOnClick:false, api:true }).load();
$("#dialog .close").click(function(){
ol.close();
});
}
overlay();
//cur action
dialog=action;
return false;
}
</script>
```
| Strange layout problem in IE6 | CC BY-SA 2.5 | 0 | 2010-09-11T03:45:38.360 | 2010-09-13T02:32:53.147 | 2010-09-11T15:51:12.817 | 313,758 | 411,730 | [
"jquery",
"internet-explorer-6",
"overlay",
"jquery-tools"
] |
3,690,643 | 1 | 3,702,558 | null | 1 | 1,304 | I am trying to use an [early experimental release of mapper implementation](http://code.google.com/p/appengine-mapreduce/) to empty the datastore. This solution was proposed in a [similar SO question](https://stackoverflow.com/questions/1062540/how-to-delete-all-datastore-in-google-app-engine/3621227#3621227).
This is the I am currently using. It just deletes the entity.
```
public class EmptyFixesMapper extends AppEngineMapper<Key, Entity, NullWritable, NullWritable> {
public EmptyFixesMapper() {
}
@Override
public void taskSetup(Context context) {
}
@Override
public void taskCleanup(Context context) {
}
@Override
public void setup(Context context) throws IOException, InterruptedException {
super.setup(context);
}
@Override
public void cleanup(Context context) {
getAppEngineContext(context).flush();
}
@Override
public void map(Key key, Entity value, Context context) {
log.warning("Mapping key: " + key);
DatastoreMutationPool mutationPool =
this.getAppEngineContext(context).getMutationPool();
mutationPool.delete(value.getKey());
}
}
```
This is my configuration file:
```
<configurations>
<configuration name="Empty Entities">
<property>
<name>mapreduce.map.class</name>
<value>com.google.appengine.demos.mapreduce.EmptyFixesMapper</value>
</property>
<property>
<name>mapreduce.inputformat.class</name>
<value>com.google.appengine.tools.mapreduce.DatastoreInputFormat</value>
</property>
<property>
<name human="Entity Kind to Map Over">mapreduce.mapper.inputformat.datastoreinputformat.entitykind</name>
<value template="optional">Fix</value>
</property>
</configuration>
...
```
When I enter the the in mydomain/mapreduce/status, I can launch the tasks, but they never complete. This is the screenshot where you can see a field "0/0 shards":

And I can see some tasks are created in the , with a lot of retries:

An finally, in my GAE application logs I see:
> 1.
09-11 03:23AM 08.556 /mapreduce/mapperCallback 500 10081ms
0cpu_ms 0kb AppEngine-Google;
(+[http://code.google.com/appengine](http://code.google.com/appengine))```
0.1.0.2 - - [11/Sep/2010:03:23:18 -0700] "POST
```
/mapreduce/mapperCallback HTTP/1.1"
500 0
"[http://xxx.appspot.com/mapreduce/command/start_job](http://xxx.appspot.com/mapreduce/command/start_job)"
"AppEngine-Google;
(+[http://code.google.com/appengine](http://code.google.com/appengine))"
xxx.appspot.com" ms=10081 cpu_ms=0
api_cpu_ms=0 cpm_usd=0.000057
queue_name=default
task_name=worker-attempt-1284198892815-0001-m-000002-1--02.
W 09-11 03:23AM 18.638```
Request was aborted after waiting too long to attempt to service
```
your request. This may happen
sporadically when the App Engine
serving cluster is under unexpectedly
high or uneven load. If you see this
message frequently, please contact the
App Engine team.
What could be happening? I'm sure I've followed steps described in the [getting started guide](http://code.google.com/p/appengine-mapreduce/wiki/GettingStartedInJava), and I have less than 1000 entities in the datastore...
| Google App Engine : use mapreduce to empty datastore | CC BY-SA 2.5 | 0 | 2010-09-11T10:38:06.530 | 2010-09-13T16:48:37.847 | 2017-05-23T12:09:27.040 | -1 | 12,388 | [
"google-app-engine",
"google-cloud-datastore",
"mapreduce"
] |
3,690,687 | 1 | 3,690,716 | null | 7 | 2,649 | I'm trying to build a firefox addon & I want to add image/icon in the right click content menu , for example, firebug had an icon in the right click context menu,

I wanna do something similar, my addon also consists of menu items
:
```
[icon] [menu]
[menu item 1]
[menu item 2]
[menu item 3]
[menu item 4]
```
How can I do it ?
| firefox addon : adding icon to context menu | CC BY-SA 3.0 | null | 2010-09-11T10:49:44.720 | 2016-02-27T11:49:31.477 | 2014-10-17T09:46:31.830 | 1,886,334 | null | [
"javascript",
"firefox",
"firefox-addon",
"xul"
] |
3,691,336 | 1 | null | null | 0 | 444 | I did a very simple test which was creating a blank project using xCode and execute on device. When executed with Instruments I got memory leaks !
Please note that I am using iPhone 3G device running iOS 4.0.2
Here are the steps to reproduce:
1. From xCode 3.2.3 Choose File -> New Project -> Navigation-based Application selecting Use Core Data for storage
2. Choose Device - 4.0 as the build Target
3. Choose Run -> Run with performance tool -> Leaks
4. On the iPhone 3G device (running iOS 4.0.2) click the '+' button several times in the launched App.
Here is the Instruments screenshot:

Can anyone confirm this issue?
Thanks,
Joshua
| Strange memory leaks when running 'Navigation Based Application' template project | CC BY-SA 2.5 | null | 2010-09-11T14:27:12.837 | 2011-06-11T01:30:48.517 | 2010-09-11T15:03:12.813 | 371,684 | 371,684 | [
"iphone",
"memory-leaks"
] |
3,691,670 | 1 | 3,691,691 | null | 8 | 6,322 | I have a variable number of boxes and I'd like to display as many as I can without forcing the viewer to scroll horizontally, there should also be a certain space in between them. This means that the boxes will have to move to the next or previous "row" if the browser is resized.
How do I achieve this using divs and CSS?
Thanks in advance :-)

| Dynamic rows of divs (boxes) using CSS? | CC BY-SA 2.5 | 0 | 2010-09-11T16:06:26.890 | 2010-09-11T17:09:55.133 | 2010-09-11T16:11:08.707 | 359,226 | 408,089 | [
"css",
"html"
] |
3,691,693 | 1 | 3,691,706 | null | 5 | 3,902 | Hiho,
I'm using the egit plugin for eclipse.
What does this Symbol "*" mean over the icon of a file?
The file is committed but with "git status" the file is marked with "changes to be commited" but with "git diff" happens nothing:/
Here's a screenshot:

greetings
| Egit "*" symbol? | CC BY-SA 3.0 | null | 2010-09-11T16:13:02.710 | 2011-12-07T22:47:57.063 | 2011-12-07T22:47:57.063 | 84,042 | 376,172 | [
"git",
"egit"
] |
3,691,859 | 1 | 3,691,907 | null | 1 | 2,666 | My main window has the following draw-function:
```
void MainWindow::paintEvent(QPaintEvent*)
{
QImage sign(50, 50, QImage::Format_ARGB32_Premultiplied);
QPainter p(&sign);
p.setRenderHint(QPainter::Antialiasing, true);
p.fillRect(sign.rect(), QColor(255, 255, 255, 0));
p.setBrush(Qt::blue);
p.setPen(Qt::NoPen);
p.drawEllipse(0, 0, sign.width(), sign.height());
p.end();
QPainter painter(this);
painter.drawImage(rect(), sign, sign.rect());
}
```
So basically, it draws a blue filled circle onto a QImage and than draws that QImage onto the widget. However, when I resize the window, I get weird artefacts (in the upper left corner). This is what it looks like:
original:

after changing the window size:

Does anyone have an idea why this is?
(I'm working under Ubuntu 10.04, if that's of interest)
| Artefacts when drawing a scaled QImage onto a QWidget | CC BY-SA 2.5 | 0 | 2010-09-11T17:08:36.880 | 2010-09-11T17:43:19.470 | 2010-09-11T17:40:12.147 | 31,044 | 379,943 | [
"qt",
"qt4"
] |
3,691,886 | 1 | null | null | 0 | 63 | I am building a new website. The HTML and CSS is verified but I have trouble displaying the correct layout for IE7. You can view a screenshot of the problem here:

How do I prevent IE7 from putting the extra space between the breadcrumbs links?
The links should be like this:

| CSS link layout issue Internet Explorer 7 | CC BY-SA 3.0 | null | 2010-09-11T17:18:01.413 | 2012-01-17T18:22:52.970 | 2012-01-17T18:22:52.970 | 918,414 | 445,195 | [
"css"
] |
3,692,057 | 1 | 3,811,317 | null | 9 | 6,174 | I have a `UIViewController` set up to display an info-button on the right in its `UINavigationItem` like this:
```
UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
[infoButton addTarget:self action:@selector(toggleAboutView) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView:infoButton] autorelease];
```
That works perfectly, but the only problem is that I'm left with little to no space to the right of the button, which looks pretty ugly:

Is there any way for the button to move about 5 px out from the right side?
Thanks.
| rightBarButtonItem info button, no space to the right | CC BY-SA 3.0 | 0 | 2010-09-11T18:08:09.317 | 2013-06-25T19:51:58.427 | 2013-06-25T19:51:58.427 | 267,892 | 267,892 | [
"iphone",
"space",
"uinavigationitem",
"rightbarbuttonitem"
] |
3,692,222 | 1 | 3,692,408 | null | 1 | 638 | Hello,
I have 3 Buttons add,delete,open as in my .
Below you see how I have bound them. Of course those binding does not work, because the data is set to the of the and the buttons are of that...
What I tried then is to set the DataContext at the first StackPanel you see in my code snippet.
like this: `<StackPanel DataContext="{Binding DocumentViewModelList}" >`
BUT then a new problem arised... now the documents are NOT visible/listed anymore in the ListBox :/
```
<StackPanel Orientation="Vertical" >
<ListBox
Height="100"
Width="Auto"
Focusable="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Grid.Row="1"
Name="itemListBox"
BorderThickness="1"
ItemsSource="{Binding DocumentViewModelList}"
>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<!-- xxx -->
<TextBlock Text="{Binding Path=Name}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="IsSelected" Value="{Binding Mode=TwoWay, Path=IsSelected}" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Button Command="{Binding DeleteDocumentCommand}" HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" Content="Delete" />
<Button Command="{Binding AddDocumentCommand}" HorizontalAlignment="Stretch" Content="Add" />
<Button Command="{Binding OpenDocumentCommand}" HorizontalAlignment="Stretch" Content="Open" />
</StackPanel>
</StackPanel>
```
:
:
```
<Button Command="{Binding Path=DeleteDocumentCommand, RelativeSource={RelativeSource AncestorType={x:Type DocumentViewModel}}}"
```
: The type reference cannot find a public type named 'DocumentViewModel'
I would like to stick with the StackPanel DataContext solution and make somehow the ListBox.ItemsSource grabbing the DocumentViewModelList via RelativeSource binding with FindAncestor. I tried some things but no luck, maybe someone can post a nice snippet :)
OK I found the solution: `<ListBox ItemsSource="{Binding}" ..`.
this is binding to the current DataContext that is "DocumentViewModelList" cool!
ok there is still another problem, maybe if someone can provide a solution on this I mark this thread as a solution then. Do not want to open a new thread, because the whole text+code snippet is the same... Problem now is =>Selecting The 1st Document activates the Button. Selecting any other Button does not activate a Button, WHY? What is wrong with the binding of my IsSelected property ?
DocumentViewModel.cs:
```
private bool _isSelected;
public bool IsSelected
{
get { return _isSelected; }
set
{
if (_isSelected == value)
return;
_isSelected = value;
this.RaisePropertyChanged("IsSelected");
}
}
```
This is the code for enabling the buttons: What do I wrong? I get no binding errors in the output console!?
```
private void DeleteDocument()
{
throw new NotImplementedException();
}
private bool CanDeleteDocument()
{
return (IsSelected == true);
}
private void AddDocument()
{
}
private void OpenDocument()
{
}
public RelayCommand DeleteDocumentCommand
{
get { return _deleteDocumentCommand ?? (_deleteDocumentCommand = new RelayCommand(() => DeleteDocument(), () => CanDeleteDocument())); }
}
public RelayCommand AddDocumentCommand
{
get { return _addDocumentCommand ?? (_addDocumentCommand = new RelayCommand(() => AddDocument())); }
}
public RelayCommand OpenDocumentCommand
{
get { return _openDocumentCommand ?? (_openDocumentCommand = new RelayCommand(() => OpenDocument())); }
}
```
| WPF buttons are outside the datacontext and could not be bound | CC BY-SA 2.5 | null | 2010-09-11T18:54:01.530 | 2010-09-12T08:12:51.317 | 2010-09-12T08:12:51.317 | 320,460 | 320,460 | [
"wpf",
"binding",
"controls",
"datacontext"
] |
3,692,596 | 1 | 3,692,743 | null | 1 | 1,662 | I have a WPF application rendering fonts to a larger size than I expect.
The catch is that only WPF applications I write seem to have this effect, and the problem happens only on one computer. The effect also happens with all WPF programs I write (not just one), and all windows exhit the effect.
I am using Visual Studio 2008 with .NET 3.5 SP1; all programs written in WPF.
The operating system is Windows XP with the latest service packs.
The screen resolution is 1680x1050.
Windows and buttons using Windows XP style.
Font size is Normal.
DPI setting is normal size (96 dpi).
I tested my applications on a two other computers with same OS and settings and it looks fine. My programs run on dozens of other computers and I do not see this problem.
Here is a window that looks good:

Here is a window that shows the problem (notice the button on the lower left, and the font size):

I know I can increase the width and add margin to compensate, but I need to understand why this happening.
I am close to a release and I want to make sure my users do not see this effect.
All ideas appreciated.
| WPF Windows program displays in large fonts but only on one PC | CC BY-SA 2.5 | null | 2010-09-11T20:48:20.390 | 2010-09-11T21:53:57.373 | null | null | 174,682 | [
"c#",
"wpf",
"windows",
"font-size"
] |
3,692,654 | 1 | null | null | 7 | 5,641 | I want to create thumbnails out of PDF files to be able to display a short preview of the PDF file on a website.
I tried it by using ImageMagick. Unfortunately the results aren't very pleasing.
The resulting images are very fuzzy.
Example Thumbnail (fuzzy):

Original PDF: (see Comment)
Command: `convert -thumbnail x800 k.pdf[0] test.png`
Is my convert command misconfigured or do you know any better way achieving my goal?
| How to create thumbnails/screenshots out of PDF files on my Linux server? | CC BY-SA 3.0 | 0 | 2010-09-11T21:05:58.273 | 2013-12-15T14:11:54.627 | 2011-10-28T21:11:45.013 | 757,830 | 445,286 | [
"php",
"linux",
"pdf",
"screenshot",
"thumbnails"
] |
3,692,787 | 1 | 3,767,013 | null | -1 | 677 | I'm getting the following error when i send a finished program to a client in a ClickOnce deployment setup.

Yet when i try to execute it on my PC, it runs perfectly, i also tried the same program on my laptop and no problems. Yet he has tried to execute this in 5 different PC and get's the same error on each.
He also gets the following error when he click on details.
> ---------------------------begins:PLATFORM VERSION INFO Windows :
6.0.6001.65536 (Win32NT) Common Language Runtime : 2.0.50727.3603
System.Deployment.dll : 2.0.50727.3053
(netfxsp.050727-3000) mscorwks.dll :
2.0.50727.3603 (GDR.050727-3600) dfdll.dll : 2.0.50727.3053
(netfxsp.050727-3000) dfshim.dll :
2.0.50727.3053 (netfxsp.050727-3000)SOURCES Deployment url :
file:///C:/Users/MAIN-HD2/AppData/Local/Temp/7zO48D2.tmp/Desktop%20Manager.applicationERROR SUMMARY Below is a summary of
the errors, details of these errors
are listed later in the log.
* Activation of C:\Users\MAIN-HD2\AppData\Local\Temp\7zO48D2.tmp\Desktop
Manager.application resulted in
exception. Following failure messages
were detected:
+ Downloading file:///C:/Users/MAIN-HD2/AppData/Local/Temp/7zO48D2.tmp/Desktop
Manager.application did not succeed.
+ Could not find file 'C:\Users\MAIN-HD2\AppData\Local\Temp\7zO48D2.tmp\Desktop
Manager.application'.
+ Could not find file 'C:\Users\MAIN-HD2\AppData\Local\Temp\7zO48D2.tmp\Desktop
Manager.application'.
+ Could not find file 'C:\Users\MAIN-HD2\AppData\Local\Temp\7zO48D2.tmp\Desktop
Manager.application'.COMPONENT STORE TRANSACTION FAILURE
SUMMARY No transaction error was
detected.WARNINGS There were no warnings during
this operation.OPERATION PROGRESS STATUS
* [9/9/2010 2:21:17 PM] : Activation of
C:\Users\MAIN-HD2\AppData\Local\Temp\7zO48D2.tmp\Desktop
Manager.application has started.ERROR DETAILS Following errors were
detected during this operation.
* [9/9/2010 2:21:17 PM] System.Deployment.Application.DeploymentDownloadException
(Unknown subtype)
- Downloading file:///C:/Users/MAIN-HD2/AppData/Local/Temp/7zO48D2.tmp/Desktop
Manager.application did not succeed.
- Source: System.Deployment
- Stack trace: at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next) at
System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at
System.Deployment.Application.FileDownloader.Download(SubscriptionState
subState) at
System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri&
sourceUri, String targetPath,
IDownloadNotification notification,
DownloadOptions options,
ServerInformation& serverInformation)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile&
tempFile, SubscriptionState& subState,
IDownloadNotification notification,
DownloadOptions options,
ServerInformation& serverInformation)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile&
tempFile, SubscriptionState& subState,
IDownloadNotification notification,
DownloadOptions options) at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
activationUri, Boolean isShortcut,
String textualSubId, String
deploymentProviderUrlFromExtension,
BrowserSettings browserSettings,
String& errorPageUrl) at
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object
state)
--- Inner Exception --- System.Net.WebException
- Could not find file 'C:\Users\MAIN-HD2\AppData\Local\Temp\7zO48D2.tmp\Desktop
Manager.application'.
- Source: System
- Stack trace: at System.Net.FileWebRequest.EndGetResponse(IAsyncResult
asyncResult) at
System.Net.FileWebRequest.GetResponse()
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
--- Inner Exception --- System.Net.WebException
- Could not find file 'C:\Users\MAIN-HD2\AppData\Local\Temp\7zO48D2.tmp\Desktop
Manager.application'.
- Source: System
- Stack trace: at System.Net.FileWebResponse..ctor(FileWebRequest
request, Uri uri, FileAccess access,
Boolean asyncHint) at
System.Net.FileWebRequest.GetResponseCallback(Object
state)
--- Inner Exception --- System.IO.FileNotFoundException
- Could not find file 'C:\Users\MAIN-HD2\AppData\Local\Temp\7zO48D2.tmp\Desktop
Manager.application'.
- Source: mscorlib
- Stack trace: at System.IO.__Error.WinIOError(Int32
errorCode, String maybeFullPath) at
System.IO.FileStream.Init(String path,
FileMode mode, FileAccess access,
Int32 rights, Boolean useRights,
FileShare share, Int32 bufferSize,
FileOptions options,
SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy) at
System.IO.FileStream..ctor(String
path, FileMode mode, FileAccess
access, FileShare share, Int32
bufferSize, FileOptions options,
String msgPath, Boolean bFromProxy) at
System.IO.FileStream..ctor(String
path, FileMode mode, FileAccess
access, FileShare share, Int32
bufferSize, Boolean useAsync) at
System.Net.FileWebStream..ctor(FileWebRequest
request, String path, FileMode mode,
FileAccess access, FileShare sharing,
Int32 length, Boolean async) at
System.Net.FileWebResponse..ctor(FileWebRequest
request, Uri uri, FileAccess access,
Boolean asyncHint)COMPONENT STORE TRANSACTION DETAILS No
transaction information is available.------------------------ends
Please any help would be greatly appreciated, cause I'm loosing my mind over this.
Thanks.
| Visual Studio ClickOnce Problem | CC BY-SA 2.5 | null | 2010-09-11T21:50:43.510 | 2010-09-22T07:06:05.387 | null | null | 344,725 | [
"visual-studio",
"clickonce"
] |
3,692,928 | 1 | 4,781,033 | null | 11 | 5,021 | I have [matplotlib 1.0.0](http://matplotlib.sourceforge.net/) installed in a Python 2.7 virtualenv on Mac OS X 10.6. I can create plots fine. However, whenever I press the button, I can't type text into the save dialog window nor can I save the plot. The only thing I can do is hit cancel. Any thoughts on what's causing this and how to fix it?

## Matplotlib installation procedure
I installed matplotlib by cloning [astraw's matplotlib github repository](http://github.com/astraw/matplotlib) and then loosely following [HyperJeff's Installation Instructions for numpy/scipy/matplotlib](http://blog.hyperjeff.net/?p=160). Below are the potentially relevant sections of `setup.cfg` and `make.osx`, including the sections that I modified prior to compiling and installing.
### setup.cfg
```
[egg_info]
tag_svn_revision = 1
[directories]
basedirlist = /Users/matthew/.virtualenvs/matplotlib-test
[status]
#suppress = True
#verbose = True
[provide_packages]
[gui_support]
#gtk = False
#gtkagg = False
#tkagg = False
wxagg = False
#macosx = False
[rc_options]
backend = MacOSX
#numerix = numpy
```
### make.osx
```
# build mpl into a local install dir with
PREFIX=/Users/matthew/.virtualenvs/matplotlib-test
MPLVERSION=1.0rc1
PYVERSION=2.7
PYTHON=python${PYVERSION}
ZLIBVERSION=1.2.3
PNGVERSION=1.2.39
FREETYPEVERSION=2.3.11
MACOSX_DEPLOYMENT_TARGET=10.6
OSX_SDK_VER=10.6
ARCH_FLAGS="-arch i386-arch x86_64"
## You shouldn't need to configure past this point (but I did...)
PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"
CFLAGS="${ARCH_FLAGS} -I${PREFIX}/include -I${PREFIX}/include/freetype2 -isysroot /Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk"
LDFLAGS="${ARCH_FLAGS} -L${PREFIX}/lib -syslibroot,/Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk"
PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"
CFLAGS="-arch i386 -arch x86_64 -I${PREFIX}/include -I${PREFIX}/include/freetype2 -isysroot /Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk"
LDFLAGS="-arch i386 -arch x86_64 -L${PREFIX}/lib -syslibroot,/Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk"
FFLAGS="-arch i386 -arch x86_64"
```
After modifying `setup.cfg` and `make.osx`, I issued the following commands to install matplotlib:
```
make -f make.osx fetch deps mpl_build mpl_install
python setup.py install
```
`sudo` isn't required, since I'm installing into a virtualenv instead of into the site-packages like HyperJeff is doing.
## Python Installation
I installed Python 2.7 using python.org's . Thanks to [Ned Deily's answer to this SO question](https://stackoverflow.com/questions/3472349/what-are-the-differences-between-the-two-python-2-7-mac-os-x-disk-image-installer/3472625#3472625), I know that this version of Python 2.7 cannot run IDLE or Tkinter on Mac OS X 10.6.
## Questions
1. Could the version of Python 2.7 that I have installed be the cause of the problem? Should I reinstall Python 2.7 using the Python 2.7 32-bit Mac OS X Installer Disk Image for Mac OS X 10.3 through 10.6?
2. Is there a different gui_support option that I need to configure in setup.cfg and then recompile matplotlib?
## Update, September 13, 2010, 3:33 PM
It appears that other Mac OS X and matplotlib users are having the same problem. In the matplotlib-users mailing list, [two users reported having the same problem on Mac OS X 10.5](http://sourceforge.net/mailarchive/message.php?msg_name=3E234DB6-BD55-4F95-803E-EF0806E80371%40gmail.com). Although, they were running matplotlib 0.99.1.1 and 0.99.1.2 versus matplotlib 1.0.0 that I have installed.
## Updated, September 14, 2010, 8:18 AM
[matplotlib bug 2973874](http://sourceforge.net/tracker/index.php?func=detail&aid=2973874&group_id=80706&atid=560720) was opened on 20-Mar-10 with the same issue. However, it's a priority 5 and hasn't been modified since the bug was originally opened. Below is the description from the bug:
> I am running the 6.0.1 enthought python distibution 64bit Mac. If a run a plot and click save I get a save dialog window that opens, I canot enter text in the file name field. I can select an existing file but still cannot modify the name. If I select a non png file it does not overwrite it. I get a file with the same name but with the png extension.
| Why doesn't the save button work on a matplotlib plot? | CC BY-SA 2.5 | 0 | 2010-09-11T22:31:07.097 | 2017-07-21T10:15:17.287 | 2017-05-23T12:09:57.707 | -1 | 95,592 | [
"python",
"matplotlib",
"virtualenv"
] |
3,692,987 | 1 | 5,981,426 | null | 23 | 35,396 | I'm trying to get the Layout of a `JDialog` of mine to fit a particular look that a program in which I'm porting to Java has, I've used several LayoutManagers before with great success yet for some reason I cannot seem to get this working at all. My goal is to have the Right (East) side of the `JDialog` contain a "Find Next" and "Cancel" button in a top-down order and then any extra space below so that the two buttons are always at the top of the `JDialog`, yet for some reason `BoxLayout` is continously ignoring any attempts at changing (this is where I'm lost) the width of a `JButton`. Code follows.
```
JButton findNext = new JButton("Find Next");
JButton cancel = new JButton("Cancel");
cancel.setPreferredSize(new Dimension((int)findNext.getPreferredSize().getWidth(),
(int)cancel.getPreferredSize().getHeight()));
JPanel example = new JPanel();
example.setLayout(new BoxLayout(example, BoxLayout.Y_AXIS));
example.add(findNext);
example.add(cancel);
example.add(Box.createGlue());
```
No matter what I try, `cancel` always retains it's normal size. I've tried `setMinimumSize()` and `setMaximumSize()` with the same parameters as `setPreferredSize` with no luck. I've even tried `cancel.setPreferredSize(new Dimension(500, 500));` and the buttons height was the only thing adjusted, it STILL retained the default width it was given.
To clear up any questions, here is what it looks like (now that I've finished it) and you'll see that the "Find Next" and "Cancel" buttons are not the same size.

| Why will BoxLayout not allow me to change the width of a JButton but let me change the height? | CC BY-SA 3.0 | 0 | 2010-09-11T22:51:54.763 | 2017-05-04T21:04:38.003 | 2017-02-08T14:30:21.263 | -1 | 445,322 | [
"java",
"user-interface",
"swing",
"jpanel",
"jbutton"
] |
3,693,972 | 1 | 3,697,850 | null | 1 | 3,002 | Creating a website using simple html(not html5) and css but got stock in mouseover effect. Need to show some text with background image when user mouseover a link. Following is an example..
NORMAL:

OVER:

I don't think it is possible to create the effect with simple CSS. My question is what is the most effective way to create the over effect and how? Javascript, DHTML or other language...
Thanks in advance...Rex...
| mouse over popup menu | CC BY-SA 2.5 | null | 2010-09-12T06:22:13.380 | 2010-09-13T04:36:28.230 | null | null | 395,000 | [
"javascript",
"html",
"css",
"xhtml",
"dhtml"
] |
3,694,405 | 1 | 3,699,316 | null | 4 | 21,698 | 
This is the desired result I need to populate as a report, where xx is number of people.
I have a table which has fields like:
```
----------
table1
----------
id
state
year(as Quarter)
gender
```
I need to determine the count from id and populate as a report. The year is like 20081, 20082..20084 (in quarter).
I have created a dataset using this query:
```
SELECT STATE,GENDER,YEAR,COUNT(*)
FROM TABLE 1
GROUP BY STATE,GENDER,YEAR
```
From this query I could populate the result
```
ex: ca, m , 20081,3
ny, f , 20091,4
```
From the above query I could populate the count and using group by(row) state(in ssrs).
I need to group by (column). From the gender I get and by year.
1. How do I take the column gender and make it has Male and Female column?
2. Do I need to create multiple dataset like passing where gender = 'M' or gender = 'F' so that I could have two datasets, one for Male and One for Female? Otherwise, is there any way I could group from the Gender field just like pivot?
3. Should I populate result separately like creating multiple dataset for Male 2008, Female 2009 or is there any way I could group by with the single dataset using SSRS Matrix table and column grouping?
4. Should I resolve it at my Query level or is there any Features in SSRS which could solve this problem?
Any help would be appreciated.
| Column and Row grouping in SQL Server Reporting Services 2008 | CC BY-SA 3.0 | 0 | 2010-09-12T09:56:23.770 | 2012-07-05T06:06:09.330 | 2011-06-21T13:28:11.347 | 1,288 | 178,769 | [
"sql-server",
"reporting-services",
"dataset",
"ssrs-2008",
"ssrs-grouping"
] |
3,694,632 | 1 | 3,704,643 | null | 5 | 2,273 | I have two entities: `Employee` and `Team`.

What I want is an `EmployeeForm` that has the `Name` of the `Team`.

How can I achieve this using ?
My current "solution" is the following:
```
Mapper.CreateMap<Employee, EmployeeForm>()
.ForMember(dest => dest.TeamName, opt => opt.MapFrom(x => x.GetTeams().FirstOrDefault() != null ? string.Join(", ", x.GetTeams().Select(y=>y.Name)) : "n/a"));
```
In my opinion this is bad readable.
What I would like to have is a generic method where I can pass an entity, choosing the collection and saying if collection is null return a default value or otherwise choose the property of the collection via lambda expressions.
| Automapper - Bestpractice of mapping a many-to-many association into a flat object | CC BY-SA 2.5 | 0 | 2010-09-12T11:20:08.157 | 2010-09-13T21:43:59.793 | 2010-09-12T19:24:32.887 | 175,399 | 175,399 | [
"c#",
"many-to-many",
"associations",
"automapper",
"object-object-mapping"
] |
3,694,862 | 1 | 3,695,548 | null | 3 | 8,357 | Hello All,
I have the following molten data:
```
X variable value
1 StationA SAR11.cluster 0.001309292
2 StationB SAR11.cluster 0.002712237
3 StationC SAR11.cluster 0.002362708
4 StationD SAR11.cluster 0.002516751
5 StationE SAR11.cluster 0.004301075
6 StationF SAR11.cluster 0.0
.
.
.
etc.
etc.
```
I used the following code to chart a bubblechart of the data:
```
ggplot(foomelt, aes(x=foomelt$Station, y=variable, angle=45, size=(value))) +
+geom_point() + opts(theme_bw(), axis.text.x = theme_text(size=10, angle = 70))
+ scale_area()
```
All is well except that I want to ignore the 0 (zero) values and only use for the scaling of the dots values between all those that are grater than zeroes and the max value.
I don't want to delete the zero values rows from the data because in order to prove a point I want all the stations and variables to be included and to have those with the zero value left blank.
I managed to use this to ignore the zero values but scaling does not work:
```
ggplot(foomelt, aes(x=foomelt$Station, y=variable, angle=45, size=(value>0))) +
+ geom_point() + opts(theme_bw(), axis.text.x = theme_text(size=10, angle = 70))
+ scale_area("Ratio") + scale_size_identity()
```
any help would be greatly appreciated.
| How to draw only a range of values in geom_point from the ggplot2 package? | CC BY-SA 2.5 | 0 | 2010-09-12T12:44:31.400 | 2010-09-13T10:14:54.953 | 2010-09-12T12:59:14.767 | 235,425 | 235,425 | [
"r",
"ggplot2",
"scatter-plot"
] |
3,695,038 | 1 | 3,739,845 | null | 3 | 575 | I have a html page with some links. When you click on a link, some jQuery code hides the div container, and shows another div. The originals links, in the first div, are no longer visible.
From the browser (webkit on android) point of view, everything works perfectly.
But if I touch the screen, the hidden links react as if they were visible. If I touch the screen, where the hidden links would be, I see an orange rectangle. The browser does nothing it is only showing the link as clicked.
How is it possible to synchronize touch screen and jquery hide/show functions?
My test is on webkit, android, and sony ericson xperia phone.
I've realised a test page with the phenomen. See it [here](http://www.diaam.com/stacko/stacktest.html) or with this qr code:

When you touch the link, you go to a div without any links, but, on my phone, if I touch the first line I see an effect on the non visible link.
Here is the html :
```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test for Stackoverflow</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function ()
{
$("#with-link a").click(function()
{
$("#with-link").hide("slow");
$("#after-touch").show("slow");
return false;
});
});
</script>
</head>
<body>
<div id="with-link">
Oh... <a href="http://stackoverflow.com">It's a link !</a>
</div>
<div id="after-touch"style="display:none">
But it's not go to stackoverflow :-)<br>
To Touch Or Not To Touch that is the question.
</div>
</body>
</html>
```
| Touch screen reacts on hidden links | CC BY-SA 2.5 | 0 | 2010-09-12T13:37:52.067 | 2010-09-18T00:08:59.977 | 2010-09-16T07:38:38.527 | 114,066 | 312,025 | [
"jquery",
"android",
"webkit"
] |
3,695,278 | 1 | 3,695,426 | null | 1 | 153 | 
As you can see above , there are 4 win32 threads at exactly the same location, how to understand it?
```
7C92E4BE mov dword ptr [esp],eax
7C92E4C1 mov dword ptr [esp+4],0
7C92E4C9 mov dword ptr [esp+8],0
7C92E4D1 mov dword ptr [esp+10h],0
7C92E4D9 push esp
7C92E4DA call 7C92E508
7C92E4DF mov eax,dword ptr [esp]
7C92E4E2 mov esp,ebp
7C92E4E4 pop ebp
7C92E4E5 ret
7C92E4E6 lea esp,[esp]
7C92E4ED lea ecx,[ecx]
7C92E4F0 mov edx,esp
7C92E4F2 sysenter
7C92E4F4 ret
```
| Doubting about the Threads window of visual studio | CC BY-SA 2.5 | null | 2010-09-12T14:59:40.603 | 2010-09-12T15:47:13.503 | 2010-09-12T15:14:48.457 | 444,905 | 444,905 | [
"c++",
"visual-studio-2008"
] |
3,695,369 | 1 | 3,695,443 | null | 20 | 161,178 | I have a table which looks like that:

As You see, there are some date duplicates, so how to select only one row for each date in that table?
the column 'id_from_other_table' is from INNER JOIN with the table above
| SQL How to remove duplicates within select query? | CC BY-SA 2.5 | 0 | 2010-09-12T15:27:01.993 | 2017-07-12T01:01:56.427 | null | null | 106,616 | [
"sql"
] |
3,695,400 | 1 | 3,695,697 | null | 2 | 1,278 | 
Like in the above graph,all other threads will automatically exit once the main thread is dead.
Is it possible to create a thread that never dies?
| Is it possible to create a thread that doesn't exit even when main thread exits in windows using c/c++? | CC BY-SA 2.5 | 0 | 2010-09-12T15:35:42.900 | 2010-09-12T17:00:02.030 | 2020-06-20T09:12:55.060 | -1 | 444,905 | [
"c++",
"windows",
"multithreading"
] |
3,695,402 | 1 | 3,846,867 | null | 13 | 11,358 | Is it possible to completely emulate the behavior of a GridLayout with the GridBagLayout manager?
Basically, I have a 8x8 grid in which each cell should have the same width and height. The GridLayout automatically did this. But I want to add another row and column to the grid which size is as the other ones. That row/column should take up all the remaining space that might be left over (because the available size couldn't be equally distributed into 8 cells). Is that even possible, or do I – again – have to use a different layout manager?
### edit
Here is a simple graphic of what I want to achieve, simplified to just 4 cells:

The colored cells are the ones I added to the actual grid (gray) which has cells with the same height and width `x`. So the grid's height and width is `4*x`. I now want the additional cells to have the necessary width/height (minimumSize) plus the rest of the available width/height from the full size.
If the whole panel's size is changed, the gray grid cells should again take up as much as space as possible.
| GridBagLayout: equally distributed cells | CC BY-SA 2.5 | 0 | 2010-09-12T15:35:52.820 | 2012-05-26T23:15:40.313 | 2010-09-12T16:36:00.727 | 216,074 | 216,074 | [
"java",
"swing",
"layout-manager",
"gridbaglayout"
] |
3,695,719 | 1 | null | null | 0 | 1,271 | I have a bound to a .
Each has a bound to a within the DataGrid`s . 
The IsSelected property of the DocumentViewModel is bound to the ListBox`s Item property IsSelected.
The delete document button in the DocumentViewModel checks in its CanExecute Method this:
```
private bool CanDeleteDocument()
{
return _isSelected;
}
```
When I select the Item in the ListBox, the Delete button is enabled.
When I selected the 2nd,3rd etc. Item in the ListBox the Delete button is ALWAYS disabled.
I try to paste only the important code and cropped other stuff:
I have just tried to rebuild the scenario with just a ListBox -not being part of a DataGrid- and I get the same behavior :/
I would be pleased about any hint :)
:
```
<DataGrid VirtualizingStackPanel.VirtualizationMode="Recycling"
ScrollViewer.CanContentScroll="False"
CanUserResizeRows="True"
VerticalScrollBarVisibility="Auto"
ItemsSource="{Binding MeetingViewModelList}"
AutoGenerateColumns="False"
x:Name="DailyGrid"
Height="580"
SelectionMode="Single"
CanUserSortColumns="False"
Background="#FF2DCE2D"
CanUserAddRows="False"
HeadersVisibility="All"
RowHeaderWidth="40"
RowHeight="200" >
<!--Content-->
<DataGridTemplateColumn Width="0.5*" Header="Content">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Helper:RichTextBox LostFocus="RTFBox_LostFocus" VerticalScrollBarVisibility="Auto" x:Name="RTFBox" Text="{Binding Content,IsAsync=True}" AcceptsReturn="True" AutoWordSelection="False" AllowDrop="False" SelectionBrush="#FFAC5BCB" HorizontalScrollBarVisibility="Hidden">
<Helper:RichTextBox.TextFormatter>
<Helper:RtfFormatter />
</Helper:RichTextBox.TextFormatter>
</Helper:RichTextBox>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Documents-->
<DataGridTemplateColumn Visibility="{Binding Source={StaticResource spy}, Path=DataContext.DocumentsVisible}" IsReadOnly="True" Width="125" Header="Attachments">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Background="Green" DataContext="{Binding DocumentViewModelList}" Orientation="Vertical" >
<ListBox SelectionMode="Single" VirtualizingStackPanel.IsVirtualizing="False"
Height="100"
Width="Auto"
Focusable="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Grid.Row="1"
Name="documentListBox"
BorderThickness="1"
ItemsSource="{Binding}"
Visibility="{Binding ElementName=documentListBox,Path=HasItems, Converter={StaticResource boolToVisibilityConverter}}"
>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Path=Name}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="IsSelected" Value="{Binding Mode=TwoWay, Path=IsSelected}" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Button Command="{Binding Path=DeleteDocumentCommand}" HorizontalAlignment="Stretch" Content="Delete" />
<Button Command="{Binding Path=AddDocumentCommand}" HorizontalAlignment="Stretch" Content="Add" />
<Button Command="{Binding Path=OpenDocumentCommand}" HorizontalAlignment="Stretch" Content="Open" />
</StackPanel>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
```
```
public class ReportingViewModel : ViewModelBase
{
private ObservableCollection<MeetingViewModel> _meetingViewModelList;
public ReportingViewModel ()
{
}
public ObservableCollection<MeetingViewModel> MeetingViewModelList
{
get { return _meetingViewModelList; }
set
{
_meetingViewModelList= value;
this.RaisePropertyChanged("MeetingViewModelList");
}
}
}
```
```
public class MeetingViewModel: ViewModelBase
{
private ObservableCollection<DocumentViewModel> _documentViewModelList = new ObservableCollection<DocumentViewModel>();
private Meeting _meeting;
public MeetingViewModel(Meeting meeting)
{
_meeting= meeting;
_meeting.Documents.ForEach(doc => DocumentViewModelList.Add(new DocumentViewModel(doc)));
}
public ObservableCollection<DocumentViewModel> DocumentViewModelList
{
get { return _documentViewModelList; }
set
{
_documentViewModelList = value;
this.RaisePropertyChanged("DocumentViewModelList");
}
}
public string Content
{
get { return _meeting.Content; }
set
{
if (_meeting.Content == value)
return;
_meeting.Content = value;
this.RaisePropertyChanged("Content");
}
}
}
```
```
public class DocumentViewModel : ViewModelBase
{
private Document _document;
private RelayCommand _deleteDocumentCommand;
private RelayCommand _addDocumentCommand;
private RelayCommand _openDocumentCommand;
public DocumentViewModel(Document document)
{
_document = document;
}
private void DeleteDocument()
{
throw new NotImplementedException();
}
private bool CanDeleteDocument()
{
return _isSelected;
}
private void AddDocument()
{
}
private void OpenDocument()
{
}
public RelayCommand DeleteDocumentCommand
{
get { return _deleteDocumentCommand ?? (_deleteDocumentCommand = new RelayCommand(() => DeleteDocument(), () => CanDeleteDocument())); }
}
public RelayCommand AddDocumentCommand
{
get { return _addDocumentCommand ?? (_addDocumentCommand = new RelayCommand(() => AddDocument())); }
}
public RelayCommand OpenDocumentCommand
{
get { return _openDocumentCommand ?? (_openDocumentCommand = new RelayCommand(() => OpenDocument())); }
}
private bool _isSelected;
public bool IsSelected
{
get { return _isSelected; }
set
{
if (_isSelected == value)
return;
_isSelected = value;
this.RaisePropertyChanged("IsSelected");
}
}
public string Name
{
get { return _document.DocumentName; }
set
{
if (_document.DocumentName == value)
return;
_document.DocumentName = value;
this.RaisePropertyChanged("Name");
}
}
}
```
| IsSelected property of ViewModel bound to ListBox, Only FIRST item selection works? | CC BY-SA 2.5 | null | 2010-09-12T17:07:06.693 | 2011-01-05T13:16:11.237 | 2010-09-12T17:12:42.747 | 320,460 | 320,460 | [
"wpf",
"listbox",
"viewmodel",
"selected"
] |
3,696,095 | 1 | 6,181,681 | null | 2 | 1,408 | I have to model an association structure and the association is divided into divisions/subdivisions/sections etc. So I've created a simple Entity-Attribute Model:

I'd like to use rail's single-table-inheritance but it seems like this works only if the type column is a string. My question is how to achieve this with my approach? Since I'm using a foreign key as "type" I'd have to query the "type name" first. Has anybody done this before?
| Rails Single Table Inheritance using Foreign Key (ID) | CC BY-SA 2.5 | 0 | 2010-09-12T18:50:31.953 | 2011-05-30T23:51:41.393 | null | null | 440,764 | [
"ruby-on-rails",
"foreign-keys",
"single-table-inheritance"
] |
3,696,351 | 1 | 3,696,365 | null | 2 | 13,546 | I recently took all my code a manually imported it into an eclipse project from BlueJ, I then got use to the settings up "Run Configurations", finally thinking I was home free. Then I ran the code, and I got this error
```
java.lang.NoSuchMethodError: main
Exception in thread "main"
```
so I figured I had to add a main method (I never had to do this in BlueJ, why?). So I did that just called the constructor method (in BlueJ I would just create a new object and the JFrame would show). So I did that, same error. After trying different things (such as moving the code in the constructor to a different method etc.). I just put this in for the main method:
```
public void main(String[] args)
{
System.out.println("Hello, this is main why won't Java find this.");
}
```
After that I still got the same error, so I then decided to add it to all my classes to make sure it wasn't using another class as the main class. Still same error, so I come to you wondering if any of you have encountered this problem. Also I did search Google and all I found was problems with `private` classes etc and sense all my classes are `public` (hey I come from Python :) ). I knew that wasn't the problem. Help Please :)
Picture of my Run Configuration

## This is my main method code
WARNING: LONG
```
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class AppFrame extends JFrame
{
public String status = "Status:";// Status of Applet
public int paint_count = 1;// Number of times applet has been painted
public int[] mousePos = {-1, -1};// Stores Mouse's Last Clicked X and Y Cordinates
public int[] boardPos = {-1, -1};//Stores The Board's X and Y Cordinates
public int[] selectedSquarePos = {-1, -1};
public int[] boardSquare = {-1, -1};//Stores Last Clicked Square
public Color P1_Color = Color.GRAY;
public Color P2_Color = Color.WHITE;
public Color SquareEven = Color.BLACK;
public Color SquareOdd = Color.RED;// pieces move on this one
public int boardHeight = 400;
public int boardWidth = 400;
public boolean pieceSelected = false;
public boolean CheckersPiece = false;
public Board CheckersBoard = new Board();
public Image buffer = null;
public Graphics bg = null;
public void main(String[] args)
{
System.out.println("Hello, this is main why won't Java find this.");
}
public AppFrame()
{
super("JCheckers");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(900,900);
setVisible(true);
buffer = createImage(getWidth(), getHeight());
boardHeight = getHeight() - 40; // 20 pixel border at top and bottom and 20 pixels for blue bar
boardWidth = getWidth() - 40; // 20 pixel border at left and right
bg = buffer.getGraphics();
addMouseListener(new MouseAdapter()
{
public void mouseClicked (MouseEvent e)
{
handleClick(e);
}
}
);
}
public void handleClick(MouseEvent e)
{
/* Handles tracking of mouse clicks; DOES NOT HANDLE DISPLAY, it just updates the data and calls redraw */
mousePos[0] = e.getX();
mousePos[1] = e.getY();
repaint();
}
public void paint(Graphics g)
{
super.paint(g);
render(g);
}
public void render(Graphics g)
{
bg.clearRect(0,0, getWidth(), getHeight());
//Draw Chess Board and Pieces
renderChessBoard(bg, 20, 20);
// Display Info
System.out.println(status);
System.out.println(String.format("Last Mouse Click @ (X:%d Y:%d)", mousePos[0], mousePos[1]) );
System.out.println("Paint #" + paint_count );
System.out.println(String.format("Board Square (x:%s, y:%s) %b", boardSquare[0], boardSquare[1], CheckersPiece) );
System.out.println(CheckersBoard.status );
paint_count += 1;
// Draw Image to Screen
g.drawImage(buffer, 0, 25, null);// so it does not get hidden by the blue close/min/max room
}
public boolean isValidSquare(int col, int row)
{
if (col > -1 & col < 8) {return true;}
return false;
}
public void renderChessBoard(Graphics g, int x, int y)
{
/* Renders board and pieces*/
// sense the row squares are well squares then the
// board will be a square also; so we draw it with whatever
// side is smallest, width or height
boardPos[0] = x;
boardPos[1] = y;
drawBoard(g, x, y, boardWidth, boardHeight);
boardSquare = getBoardSquare(mousePos[0], mousePos[1]);
CheckersPiece = isCheckersPiece(boardSquare[0], boardSquare[1]);
boolean validSquare = isValidSquare(boardSquare[0], boardSquare[1]);
if (validSquare)
{
if (CheckersPiece)
{
selectSquare(g, boardSquare[0], boardSquare[1]);
}
else
{
if (pieceSelected)
{
int selectedCol = selectedSquarePos[0];
int selectedRow = selectedSquarePos[1];
int toCol = boardSquare[0];
int toRow = boardSquare[1];
System.out.println(selectedCol + " " + selectedRow + " " + toCol + " " + toRow);
if (!CheckersBoard.move(selectedSquarePos, boardSquare)) // not a valid move;
{
pieceSelected = false;
}
}
}
}
parseBoard(CheckersBoard.board, g);
}
public void drawBoard(Graphics g, int Bx, int By, int Bw, int Bh)
{
int numberRowsDrawed = 0;
int rH = Bh / 8;
int rW = Bw; // Row width is the same as the Board's width because the board and the row share the same sides
while (numberRowsDrawed < 8)
{
int rY = (numberRowsDrawed * rH) + By;
// Row X is the same as the Board X because the board and the row share the same sides
int rX = Bx;
Color EVEN = SquareEven;
Color ODD = SquareOdd;
// Yes Yes The EVEN Color is now odd and vica versa its because rows only now there row counts and so they start at 0 and don't
// include the rows above
if ((numberRowsDrawed % 2) != 0) {EVEN = SquareOdd; ODD = SquareEven;}
drawRow(g, rX, rY, rW, rH, EVEN, ODD);
numberRowsDrawed +=1;
}
}
public void drawRow(Graphics g, int x, int y, int width, int height, Color EVEN, Color ODD)
{
System.out.println("Board Y: " + y);
int squareW = width / 8;
int squareH = height;
int numberSquaresCreated = 0;
while (numberSquaresCreated < 8)
{
// needs a special case because Java's modulo uses division (so it would give a divide by 0 error) STUPID JAVA!!!!!!
if (numberSquaresCreated == 0)
{
g.setColor(EVEN);
g.fillRect(x, y, squareW, squareH);
}
else
{
if (numberSquaresCreated % 2 == 0){g.setColor(EVEN);}
else {g.setColor(ODD);}
int sX = x + (squareW * numberSquaresCreated);
g.fillRect(sX, y, squareW, squareH);
}
numberSquaresCreated +=1;
}
}
public void drawMan(Graphics g, int boardRow, int boardCol, Color pieceColor)
{
int x = boardPos[0];
int y = boardPos[1];
int pixelPosX = x + ((boardWidth / 8) * boardRow);
int pixelPosY = y + ((boardHeight / 8) * boardCol);
g.setColor(pieceColor);
g.fillOval(pixelPosX + 13, pixelPosY + 13, (boardWidth / 8) - 26, (boardHeight / 8) - 26);
}
public void drawKing(Graphics g, int boardRow, int boardCol, Color pieceColor, Color crownColor)
{
drawMan(g, boardRow, boardCol, pieceColor);
g.setColor(crownColor);
int x = boardPos[0];
int y = boardPos[1];
double DsizeFactor = ( (float) boardHeight / 8.0) / 3.75;
int sizeFactor = (int) DsizeFactor;
int pixelPosX = x + ((boardWidth / 8) - sizeFactor) / 2 + ((boardWidth / 8) * boardRow);
int pixelPosY = y + ((boardHeight / 8) - sizeFactor) / 2 + ((boardHeight / 8) * boardCol);
int[] xPoints = {pixelPosX, pixelPosX, pixelPosX + sizeFactor, pixelPosX + sizeFactor, pixelPosX + ((sizeFactor * 3) / 4), pixelPosX + (sizeFactor / 2), pixelPosX + (sizeFactor / 4) };
int[] yPoints = {pixelPosY, pixelPosY + sizeFactor, pixelPosY + sizeFactor, pixelPosY, pixelPosY + (sizeFactor / 2), pixelPosY, pixelPosY + (sizeFactor / 2)};
g.fillPolygon(xPoints, yPoints, 7);
}
public void selectSquare(Graphics g, int bSX, int bSY)
{
g.setColor(Color.YELLOW);
/*+10 is to offset text (the xy cordinates are the bottom left side of the text NOT top left.*/
pieceSelected = true;
int squareX = boardPos[0] + (boardWidth / 8) * bSX;
int squareY = 10 + boardPos[1] + (boardHeight / 8) * bSY;
selectedSquarePos[0] = bSX;
selectedSquarePos[1] = bSY;
g.drawString("Selected", squareX, squareY);
}
// Data Handling and Retreiving methods
public void parseBoard(String[][] Board, Graphics g)
{
int row = 0;
int col = 0;
for (String[] rowOfPieces : Board)
{
for (String piece : rowOfPieces)
{
if (piece != "X")
{
Color PIECE_COLOR = P1_Color;
if (piece.contains("P2")) {PIECE_COLOR = P2_Color;}
if (piece.contains("C"))
{
drawMan(g, col, row, PIECE_COLOR);
}
if (piece.contains("K"))
{
Color Crown_Color = P2_Color;
if (PIECE_COLOR != P1_Color) {Crown_Color = P1_Color;}
drawKing(g, col, row, PIECE_COLOR, Crown_Color);
}
}
col+=1;
}
row +=1;
col = 0;
}
}
public int[] getBoardSquare(int x, int y)
{
//row or col = boardpos - offset / row height or width
if ((x < boardPos[0]) | (y < boardPos[1]) | (x > (boardPos[0] + boardWidth)) | (y > (boardPos[1] + boardHeight)) )
{
int[] BS = {-1, -1};
return BS;
}
int col = (x - boardPos[0]) / (boardWidth / 8);
int row = (y - boardPos[1]) / (boardHeight / 8);
int[] BS = {col, row};
return BS;
}
public boolean isCheckersPiece(int BoardSquareX, int BoardSquareY)
{
int Px = BoardSquareX;
int Py = BoardSquareY;
if (Px == -1 & Py == -1)
{
return false;
}
String Square = CheckersBoard.board[Py][Px];
return Square != "X";
}
}
```
| Eclipse: Java, no main method found | CC BY-SA 3.0 | null | 2010-09-12T19:54:09.747 | 2013-09-28T15:16:23.993 | 2013-09-28T15:16:23.993 | 2,766,231 | 410,368 | [
"java",
"eclipse",
"swing"
] |
3,696,593 | 1 | null | null | 2 | 2,744 | I am seeking a, preferably free, crumb-bar control for my app. For those that do now know what it is, it is the address bar on the top of explorer:

If anyone knows of any free or paid control libraries that have this, please answer.
| Windows Explorer Crumb-Bar Control | CC BY-SA 2.5 | null | 2010-09-12T20:59:20.530 | 2010-09-12T21:24:09.787 | 2010-09-12T21:00:44.150 | 33,225 | 385,853 | [
"c#",
"windows",
"winforms",
"windows-vista",
"explorer"
] |
3,696,616 | 1 | 3,696,969 | null | 2 | 2,695 | I'm just wondering how I would go about splitting a pixel array (R,G,B,A,R,G,B,A,R,G,B,A,etc.) into 64x64 chunks. I've tried several methods myself but they all seem really over-complex and a bit too messy.
I have the following variables (obviously filled with information):
```
int nWidth, nHeight;
unsigned char *pImage;
```
And basically for each chunk I want to call:
```
void ProcessChunk(int x, int y, int width, int height)
```
You may be wondering why there is a and argument for the processing function, but if the image is not exactly divisible by 64, then there will be smaller chunks at the edge of the image (right-hand side and the bottom). See this image for a better understanding what I mean (red chunks are the chunks that will have <64 or arguments).

Thanks in advance.
| Split an image into 64x64 chunks | CC BY-SA 2.5 | null | 2010-09-12T21:05:45.073 | 2010-09-12T22:58:06.297 | null | null | 118,570 | [
"c++",
"c",
"image-manipulation"
] |
3,696,680 | 1 | 3,699,575 | null | 8 | 23,900 | I am trying to implement DAOs to work with Spring Security database authentication in Hibernate/JPA2. Spring uses following relations and associations in order to represent user & roles:

repesented as postgresql create query:
```
CREATE TABLE users
(
username character varying(50) NOT NULL,
"password" character varying(50) NOT NULL,
enabled boolean NOT NULL,
CONSTRAINT users_pkey PRIMARY KEY (username)
);
CREATE TABLE authorities
(
username character varying(50) NOT NULL,
authority character varying(50) NOT NULL,
CONSTRAINT fk_authorities_users FOREIGN KEY (username)
REFERENCES users (username) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
);
```
Using the on-board implementations of `GrantedAuthorities`, `UserDetailsService` and `UserDetailsmanager`, everything is fine. However, I am not satisfied with the JDBC implementation of Spring and would like to write my own ones. In order to do so, I tried to create a representation of the relations by following business objects:
The user entity:
```
@Entity
@Table(name = "users", uniqueConstraints = {@UniqueConstraint(columnNames = {"username"})})
public class AppUser implements UserDetails, CredentialsContainer {
private static final long serialVersionUID = -8275492272371421013L;
@Id
@Column(name = "username", nullable = false, unique = true)
private String username;
@Column(name = "password", nullable = false)
@NotNull
private String password;
@OneToMany(
fetch = FetchType.EAGER, cascade = CascadeType.ALL,
mappedBy = "appUser"
)
private Set<AppAuthority> appAuthorities;
@Column(name = "accountNonExpired")
private Boolean accountNonExpired;
@Column(name = "accountNonLocked")
private Boolean accountNonLocked;
@Column(name = "credentialsNonExpired")
private Boolean credentialsNonExpired;
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name = "personalinformation_fk", nullable = true)
@JsonIgnore
private PersonalInformation personalInformation;
@Column(name = "enabled", nullable = false)
@NotNull
private Boolean enabled;
public AppUser(
String username,
String password,
boolean enabled,
boolean accountNonExpired,
boolean credentialsNonExpired,
boolean accountNonLocked,
Collection<? extends AppAuthority> authorities,
PersonalInformation personalInformation
) {
if (((username == null) || "".equals(username)) || (password == null)) {
throw new IllegalArgumentException("Cannot pass null or empty values to constructor");
}
this.username = username;
this.password = password;
this.enabled = enabled;
this.accountNonExpired = accountNonExpired;
this.credentialsNonExpired = credentialsNonExpired;
this.accountNonLocked = accountNonLocked;
this.appAuthorities = Collections.unmodifiableSet(sortAuthorities(authorities));
this.personalInformation = personalInformation;
}
public AppUser() {
}
@JsonIgnore
public PersonalInformation getPersonalInformation() {
return personalInformation;
}
@JsonIgnore
public void setPersonalInformation(PersonalInformation personalInformation) {
this.personalInformation = personalInformation;
}
// Getters, setters 'n other stuff
```
And the authority entity as an implementation of GrantedAuthorities:
```
@Entity
@Table(name = "authorities", uniqueConstraints = {@UniqueConstraint(columnNames = {"id"})})
public class AppAuthority implements GrantedAuthority, Serializable {
//~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.TABLE)
@Column(name = "id", nullable = false)
private Integer id;
@Column(name = "username", nullable = false)
private String username;
@Column(name = "authority", nullable = false)
private String authority;
// Here comes the buggy attribute. It is supposed to repesent the
// association username<->username, but I just don't know how to
// implement it
@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name = "appuser_fk")
private AppUser appUser;
//~ Constructors ===================================================================================================
public AppAuthority(String username, String authority) {
Assert.hasText(authority,
"A granted authority textual representation is required");
this.username = username;
this.authority = authority;
}
public AppAuthority() {
}
// Getters 'n setters 'n other stuff
```
My problem is the `@ManyToOne` assoc. of `AppAuthorities`: It is supposed to be "username", but trying and doing so throws an error, because I've got to typify that attribute as `String` ... while Hibernate expects the associated entity. So what I tryied is actually providing the correct entity and creating the association by `@JoinColumn(name = "appuser_fk")`. This is, of course, rubbish, because in order to load the User, I will have the foreign key in `username`, while Hibernate searches for it in `appuser_fk`, which will always be empty.
So here is my question: any suggestion on how to modify the above metioned code in order to get a correct JPA2 implementation of the data model?
Thanks
| Howto implement Spring Security User/Authorities with Hibernate/JPA2? | CC BY-SA 2.5 | 0 | 2010-09-12T21:24:06.120 | 2013-06-27T06:31:43.643 | 2010-09-12T23:17:12.007 | 268,098 | 268,098 | [
"java",
"hibernate",
"orm",
"jpa",
"spring-security"
] |
3,696,778 | 1 | 3,696,802 | null | 18 | 21,592 | I'm trying to create the following table using phpmyadmin sql console:
```
CREATE TABLE dates
(
id int NOT NULL,
id_date datetime NOT NULL DEFAULT CURDATE(),
PRIMARY KEY (id)
)
```
However I get the following error:

It shows "CURDATE()" in red, so I guess that's the problem.
Could anyone help me out here ?
| Create table fail in mysql when using CURDATE() as default | CC BY-SA 2.5 | 0 | 2010-09-12T21:44:25.300 | 2016-06-16T09:29:40.720 | null | null | 145,077 | [
"mysql",
"phpmyadmin"
] |
3,697,158 | 1 | null | null | 1 | 97 | Within a project I've been writing for the past two years I have a WSDL file which works nicely for use with my SOAP calls however we are now moving all of our code over to a new server and it seems to handle this differently.
On the old server if I type in the file path for the WSDL file I can simply read it as if it's a text doc, but on the new server it gives me an error:

EDIT: This does not happen in FireFox but does still not work when I call the webservice.
Now while I understand that using example.org/GetWhatever isn't valid, this will work on my other server. Does anyone know why it tries to render this rather than give me the text? And what is a valid URI?
EDIT: I think this is down to the php install on the server not having everything installed. Does anyone know what I need installed to run php webservices?
Thanks
| Separate servers handling WSDL file differently | CC BY-SA 2.5 | null | 2010-09-12T23:46:08.670 | 2010-10-01T15:57:13.073 | 2010-10-01T15:57:13.073 | 143,979 | 143,979 | [
"php",
"linux",
"web-services",
"soap",
"wsdl"
] |
3,697,293 | 1 | 3,699,564 | null | 0 | 1,339 | I'm trying to add a `ContextMenu` in a particular cell of a `DataGridView`. Like the image below:

I found it very hard to do, but I did a it in a TextBox control using the below code:
```
private void Form1_Load(object sender, EventArgs e)
{
foreach (Control control in this.Controls)
{
// Add KeyDown event to each control in the form.
control.KeyDown += new KeyEventHandler(control_KeyDown);
}
}
private void control_KeyDown(object sender, KeyEventArgs e)
{
Control ctrl = (Control)sender;
if (e.KeyData == Keys.F1) // Check if F1 is being pressed.
{
if (ctrl.GetType() == typeOf(TextBox)) // Check if the control is a TextBox
{
ToolStripControlHost lblInfo;
label1.Text = "This context menu is for TextBoxes.";
lblInfo = new ToolStripControlHost(label1); // some Label
contextMenuStrip1.Items.Add(lblInfo);
contextMenuStrip1.Show(ctrl, 0, 25); // Popups the contextMenu just below the textBox control.
}
}
}
```
I just don't know how to do it in a particular cell of a DataGridView.
I tried experimenting on this code:
```
if (ctrl.GetType() == typeOf(DataGridView)) // Check if the control is a DataGridView
{
DataGridViewCell testCell = dataGridView1[dataGridView1.CurrentCell.ColumnIndex, dataGridView1.CurrentRow.Index]; // Returns DataGridViewCell type
ToolStripControlHost lblInfo;
label1.Text = "test";
lblInfo = new ToolStripControlHost(label1); // some Label
contextMenuStrip1.Items.Add(lblInfo);
contextMenuStrip1.Show(testCell, 0, 25);
}
```
But i think ContextMenu only accepts a `Control` type on its first argument, and I got this exception:
```
cannot convert from 'System.Windows.Forms.DataGridViewCell' to 'System.Windows.Forms.Control'
```
Are there any workaround on this? Please advice me what to do.. thanks in advance.
| How to add ContextMenu in a particular DataGridViewCell? (C# winforms) | CC BY-SA 2.5 | 0 | 2010-09-13T00:41:56.440 | 2010-09-13T10:32:18.033 | null | null | 396,335 | [
"c#"
] |
3,697,340 | 1 | null | null | 1 | 93 | I have a UITableViewCell setup and i'd like to add a graphic on the right hand side with a number inside it (similar to the way mail shows how many new mail messages you have)
So the UITableViewCell would look something like this;

Is there a simple way to do this? Many thanks.
| Adding extra graphic to a a UITableViewCell | CC BY-SA 2.5 | null | 2010-09-13T00:57:17.050 | 2013-05-27T15:18:52.930 | null | null | 441,019 | [
"iphone",
"uitableview"
] |
3,697,468 | 1 | 3,697,788 | null | 0 | 244 | What is the largest set of seven-, fourteen-, or sixteen-segment LCD symbols such that
- - -
The best I've been able to do with a seven-segment alphabet is three: 
No fair using characters that are meaningless out of context, e.g. the M and W from [Harvey Twyman's seven segment font](http://www.twyman.org.uk/Fonts/) are no good.
(Why would you want to do this? Imagine a situation where you can superimpose symbols of your choice, and some of them are going to be invisible but you don't know which. By using symbols from a set like this, and getting someone to look at the result, you can deduce which base symbols were invisible.)
| Encoding golf: stack LCD characters to make other characters | CC BY-SA 2.5 | null | 2010-09-13T01:44:15.640 | 2010-09-20T18:12:25.223 | 2010-09-20T18:12:25.223 | 10,396 | 388,520 | [
"encoding"
] |
3,697,852 | 1 | 3,697,923 | null | 1 | 187 | 
the original code is like this.
```
else
{
continue;
}
}
break;
}
case UserType.Individual:
{
```
| What is happening with resharper in vs2005 | CC BY-SA 2.5 | null | 2010-09-13T04:37:03.457 | 2010-09-14T18:05:27.020 | null | null | 372,935 | [
"visual-studio-2005",
"resharper"
] |
3,697,873 | 1 | 3,699,026 | null | -1 | 140 | i am using the autoresize plugin which increases the height as users type in stuff. It works great on FF/Chrome, but the behavior is messed up on IE (see screenshots below).
Essentially, the textbox, when resized, does not push the rest of the buttons down, which is weird, given that nothing on the page is absolute positioned.


| When textbox is resized in IE, block position behavior is messed up | CC BY-SA 2.5 | null | 2010-09-13T04:45:31.913 | 2010-09-13T09:06:45.807 | null | null | 180,663 | [
"javascript",
"css",
"internet-explorer",
"textarea"
] |
3,698,154 | 1 | 3,698,250 | null | 2 | 421 | I'd like to display a UIActivityView in a rounded transparent box with text, just like the one shown below. Does anyone know how to do this?
p.s. I'd rather not be putting it in an UIAlertView, but I don't know how to do it any other way.
Thanks!
Tristan

| display loading | CC BY-SA 2.5 | 0 | 2010-09-13T06:12:25.420 | 2010-09-13T06:36:46.620 | null | null | 2,684,342 | [
"iphone",
"xcode",
"uiview",
"transparent",
"uiactivityindicatorview"
] |
3,698,252 | 1 | 3,698,318 | null | 1 | 1,821 | i'm new to drupal views. not displayed with my view block. i set more link both k and option too. Find picture below for view settings.

Note: i'm sure there is around 10+ nodes available to display.
| drupal views more link | CC BY-SA 3.0 | null | 2010-09-13T06:37:08.943 | 2012-10-25T13:05:56.347 | 2012-01-31T05:40:09.227 | 166,476 | 166,476 | [
"drupal",
"hyperlink",
"drupal-views"
] |
3,698,329 | 1 | 3,698,335 | null | 0 | 5,708 | I have a table in mysql which holds the values in integers, my table is something like this.

I want to sum up the values of a particular column, for example i want to calculate the total amount, total cashpaid and total balance. hwo do i do it?
| How do i count and sum the values from the database | CC BY-SA 2.5 | null | 2010-09-13T06:54:34.183 | 2010-09-13T07:05:55.143 | null | null | 396,476 | [
"php",
"mysql"
] |
3,698,577 | 1 | 3,712,916 | null | 1 | 264 | I have added some constraints to some MySQL table fields. This seems to change phpMyAdmin a little bit, including constrained fields being presented as drop down boxes in edit or insert mode:

This looks a bit weird to me, as if phpMyAdmin wants to add titles but doesn't have the correct information. Am I correct in this assumption?
And why do the IDs go from 3 to 1, then back up to 3?
| In phpMyAdmin, constraints cause weird dropdowns when editing or inserting | CC BY-SA 2.5 | null | 2010-09-13T07:41:57.250 | 2010-09-14T21:06:49.700 | null | null | 334,966 | [
"mysql",
"constraints",
"phpmyadmin"
] |
3,698,579 | 1 | 3,699,920 | null | 12 | 24,292 | I am using JSF2 and Java to build a web application. I want to build a form like the one at the picture below:

When somebody unchecks the checkbox the form should disappear:

[Here](http://www.sencha.com/examples/pages/forms/forms.html) is an example with gwt.
---
So far,
I tried some stuff with the `<f:ajax>` tag and an `PropertyActionListener` in the managedBean but it didn't work. Can somebody give me an example or at least some hints to accomplish my goal. I would be really thankfull
| Show/hide another input fields using h:selectBooleanCheckbox | CC BY-SA 4.0 | 0 | 2010-09-13T07:42:25.707 | 2019-07-04T12:29:50.870 | 2019-07-04T12:11:57.967 | 157,882 | 389,430 | [
"javascript",
"jsf",
"jsf-2"
] |
3,698,639 | 1 | null | null | 2 | 910 | Look at the strange problem on MYSQL.

Look at the column 3. The result is 0.02876121 but the actually result should be the column 4 = 0.02876.
Why is MYSQL giving fault value on decimal points?
*Another thing is that, it only give wrong value if I append "Where column = 'uniquevalue'" to return the result i want.
The value is correct if I remove where condition, giving all the records in table.
| Strange division problem on mysql | CC BY-SA 2.5 | 0 | 2010-09-13T07:53:03.887 | 2010-09-13T09:16:22.483 | 2010-09-13T09:16:22.483 | 309,740 | 309,740 | [
"mysql",
"division"
] |
3,698,604 | 1 | 3,699,934 | null | 1 | 3,028 | I am making a web application using spring mvc and hibernate and I am getting a very strange error from tomcat 7 console output stating this:
```
13-Sep-2010 08:27:18 org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/ZangV3Spring]
13-Sep-2010 08:27:18 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive ZangV3Spring.war
13-Sep-2010 08:27:20 org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(C:\Users\xxxxx\Various stuff\apache-tomcat-7.0.0-windows-x86\apache-tomcat-7.0.0\webapps\ZangV3Spring\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
13-Sep-2010 08:27:21 org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart
13-Sep-2010 08:27:21 org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/ZangV3Spring] startup failed due to previous errors
```
Any ideas how to fix this error?
Here is my build.xml:
```
<property name="src.dir" value="src"/>
<property name="web.dir" value="war"/>
<property name="build.dir" value="${web.dir}/WEB-INF/classes"/>
<property name="name" value="ZangV3Spring"/>
<path id="master-classpath">
<fileset dir="${web.dir}/WEB-INF/lib">
<include name="*.jar"/>
</fileset>
<!-- We need the servlet API classes: -->
<!-- * for Tomcat 5/6 use servlet-api.jar -->
<!-- * for other app servers - check the docs -->
<fileset dir="${appserver.lib}">
<include name="servlet*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>
<target name="usage">
<echo message=""/>
<echo message="${name} build file"/>
<echo message="-----------------------------------"/>
<echo message=""/>
<echo message="Available targets are:"/>
<echo message=""/>
<echo message="build --> Build the application"/>
<echo message="deploy --> Deploy application as directory"/>
<echo message="deploywar --> Deploy application as a WAR file"/>
<echo message="install --> Install application in Tomcat"/>
<echo message="reload --> Reload application in Tomcat"/>
<echo message="start --> Start Tomcat application"/>
<echo message="stop --> Stop Tomcat application"/>
<echo message="list --> List Tomcat applications"/>
<echo message=""/>
</target>
<target name="build" description="Compile main source tree java files">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}" source="1.5" target="1.5" debug="true"
deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
</target>
<target name="deploy" depends="build" description="Deploy application">
<copy todir="${deploy.path}/${name}" preservelastmodified="true">
<fileset dir="${web.dir}">
<include name="**/*.*"/>
</fileset>
</copy>
</target>
<target name="deploywar" depends="build" description="Deploy application as a WAR file">
<war destfile="${deploy.path}/${name}.war"
webxml="${web.dir}/WEB-INF/web.xml">
<fileset dir="${web.dir}">
<include name="**/*.*"/>
</fileset>
</war>
<copy todir="${deploy.path}" preservelastmodified="true">
<fileset dir=".">
<include name="*.war"/>
</fileset>
</copy>
</target>
```
```
<path id="catalina-ant-classpath">
<!-- We need the Catalina jars for Tomcat -->
<!-- * for other app servers - check the docs -->
<fileset dir="${appserver.lib}">
<include name="catalina-ant.jar"/>
</fileset>
</path>
<taskdef name="install" classname="org.apache.catalina.ant.DeployTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="list" classname="org.apache.catalina.ant.ListTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="start" classname="org.apache.catalina.ant.StartTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<target name="install" description="Install application in Tomcat">
<install url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"
war="${name}"/>
</target>
<target name="reload" description="Reload application in Tomcat">
<reload url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"/>
</target>
<target name="start" description="Start Tomcat application">
<start url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"/>
</target>
<target name="stop" description="Stop Tomcat application">
<stop url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"/>
</target>
<target name="list" description="List Tomcat applications">
<list url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"/>
</target>
```
And below is my build.properties file:
```
# Ant properties for building the springapp
appserver.home=C:/Users/xxxxx/Various stuff/apache-tomcat-7.0.0-windows-x86/apache-tomcat-7.0.0/
# for Tomcat 5 use $appserver.home}/server/lib
# for Tomcat 6 use $appserver.home}/lib
appserver.lib=${appserver.home}/lib/
deploy.path=${appserver.home}/webapps
tomcat.manager.url=http://localhost:8080/manager
tomcat.manager.username=
tomcat.manager.password=
```
And here is my lib folder:

| Spring web application can't start due to previous error | CC BY-SA 3.0 | null | 2010-09-13T07:46:58.960 | 2014-02-05T10:20:29.057 | 2014-02-05T09:17:34.417 | 1,521,627 | 444,668 | [
"java",
"spring",
"tomcat"
] |
3,698,807 | 1 | 3,700,738 | null | 0 | 262 | I'm working with biological data - namely groups of genes. For example:
```
group 1: geneA geneB geneC
group 2: geneD geneE
group 3: geneF geneG geneH
```
For each pair of genes, `geneX` and `geneY` I have a score telling how similiar the two genes are (actually, I have two scores, since I used BLAST which is 'directional': I first searched `geneX` against all the other genes then `geneY` against all the other genes, so I have two `geneX--geneY` scores, but I guess I can take the lower score of the two, or the average).
So, let's suppose I have only one score for each pair of genes. My data can be viewed as a undirected graph:

and recall each edge has a score attached to it.
Now, what I would like to do is:
1. Visualize my data interactively: being able to click on gene nodes and open a link attached to them, show only edges above/below some threshold, control how the network is "spread", etc.
2. Cluster together groups which are similar, i.e. groups that have similar genes.
Any ideas of how can I do that? I guess it's basic clustering and I would appreciate any hints on packages/software that can be of any help here.
Thank you.
| How to visualize gene networks and cluster groups of genes? | CC BY-SA 3.0 | null | 2010-09-13T08:26:41.040 | 2013-03-28T10:03:13.293 | 2013-03-28T10:03:13.293 | 454,824 | 377,031 | [
"cluster-analysis",
"bioinformatics"
] |
3,698,841 | 1 | 3,706,005 | null | 1 | 843 | I want a tutorial for help me to create a table view thumbnail like this.

I use UItableView to implement this view and try to custom UITableViewCell
but UITableViewCell can't support
anyone can sugess me
thank.
| How to create thumbnail view for iPad? | CC BY-SA 2.5 | null | 2010-09-13T08:33:38.140 | 2010-09-14T03:51:13.410 | 2010-09-13T08:47:00.727 | 168,225 | 65,964 | [
"cocoa-touch",
"ipad"
] |
3,699,032 | 1 | 3,699,048 | null | 4 | 113 | I do start off organising my `.h` files with the best intentions but somehow they get disgustingly messy.
Below is an example (which isn't bad, but i've seen much worse!). I've tried grouping sections with `#pragma mark` but it seems to look even messier.
All the UILabels and UIButtons are required (as mentioned above) as they're showing data coming from a web service request so they're all required if we're using Interface Builder to design our GUI's. For example, the label might be a "weight" or "height" characteristic for a product.
Does anyone have any good advice on how to organise these in the most maintainable/readable way?
Cheers

| What's the normal way of organising a header file in Objective-C? | CC BY-SA 2.5 | 0 | 2010-09-13T09:08:29.917 | 2010-09-13T09:34:56.233 | 2010-09-13T09:34:56.233 | 259,296 | 259,296 | [
"iphone",
"objective-c",
"code-readability",
"code-maintainability"
] |
3,699,784 | 1 | null | null | 12 | 20,670 | How can I make an interface for console applications to make them look like `edit.com` under Microsoft's operating systems. Target languages are C, C++ and C#.NET.

| Making UI for console application | CC BY-SA 2.5 | 0 | 2010-09-13T11:00:29.197 | 2020-10-05T09:29:25.343 | 2010-09-13T11:23:03.560 | 50,846 | 407,315 | [
"c#",
"c++",
"c",
"user-interface",
"console-application"
] |
3,700,001 | 1 | null | null | 0 | 162 | Ok, this might sound simple, but somehow I can't get this function to work .
```
- (void)setViewMovedUp:(BOOL)movedUp {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
CGRect rect = self.view.frame;
NSLog(@"%f",self.view.frame.size.height);
if (movedUp)
{
NSLog(@"test Moved Up");
rect.origin.y += 60;
rect.size.height -= 300;
}
self.view.frame = rect ;
NSLog(@"%f after:",self.view.frame.size.height);
[UIView commitAnimations];
}
```
All the NSLogs are printing results fine and "Test Moved Up" appears so I know there is nothing wrong upstream .
This function is part of the implementation file of my MainViewController ( which manages the root view of my Window app ) .
I assume I have to call : , right ?
No error or warning appears, but it just doesn`t move despite printing out the logs correctly ..
Edit, this is the hierarchy in IB :

---
Edit again : I'm actually wondering if I'm allowed to move that view up, are we allowed to move views up if they are at the top of the hierarchy ? Then what would be revealed behind ?
| Moving a View Up | CC BY-SA 2.5 | null | 2010-09-13T11:35:25.523 | 2010-09-16T06:35:58.847 | 2010-09-16T06:35:58.847 | 415,088 | 415,088 | [
"iphone",
"objective-c"
] |
3,700,441 | 1 | null | null | 1 | 220 | It's a c++ project:

```
7C92E4BE mov dword ptr [esp],eax
7C92E4C1 mov dword ptr [esp+4],0
7C92E4C9 mov dword ptr [esp+8],0
7C92E4D1 mov dword ptr [esp+10h],0
7C92E4D9 push esp
7C92E4DA call 7C92E508
7C92E4DF mov eax,dword ptr [esp]
7C92E4E2 mov esp,ebp
7C92E4E4 pop ebp
7C92E4E5 ret
7C92E4E6 lea esp,[esp]
7C92E4ED lea ecx,[ecx]
7C92E4F0 mov edx,esp
7C92E4F2 sysenter
7C92E4F4 ret
```
I set bp on `7C92E4F2` (this part is called by Win32,not explicitly from my code) , then I start debugging, it doesn't stop.
Why ?
| Why break point doesn't work for those lines without source code in Disassembly view of visual studio? | CC BY-SA 2.5 | null | 2010-09-13T12:41:13.263 | 2010-09-13T16:05:58.517 | 2010-09-13T16:05:58.517 | 444,905 | 444,905 | [
"visual-studio-2008",
"breakpoints",
"disassembly"
] |
3,700,596 | 1 | 3,700,693 | null | 0 | 761 | I have a working ticker, but I want the text to fade out to the left and right just like on the twitter wellcome page. any ideas how to realise that?

| jQuery Twitter like ticker. How To? | CC BY-SA 2.5 | null | 2010-09-13T13:00:53.973 | 2011-12-09T15:13:26.613 | null | null | 401,025 | [
"jquery",
"twitter",
"ticker"
] |
3,700,637 | 1 | 3,703,465 | null | 54 | 59,328 | For a new project I'm trying to create my business classes first and create the real database tables later. Therefore I'm using the Entity Framework 4 Designer. A created a new "ADO.Net Entity Data model" file, with the extension .edmx.
I created two Entities:

I want to add a 1 to nc relation between Product -> Group. If I'd created the MSSQL database first, I would have added a column IDGroup to the Table Product and referenced Product.IDGroup to Group.IDGroup. As far as I can see, I can't add such association in the designer if I add a new Property called IDGroup to the Product Entity
This is how I add the mapping:

Which results in:

Now the part what this question is about: If I add two tables from an existing MSSQL database to the edmx file, I'll get the compile error:
```
Error 3027: No mapping specified for the following EntitySet/AssociationSet - GroupSet, ProductSet
```
What does that error mean and what must I do to fix this?
If I delete those two tables, I'll receive a warning instead:
```
Error 2062: No mapping specified for instances of the EntitySet and AssociationSet in the EntityContainer myContainer.
```
Something tells me, I'm doing this all wrong and this is just basic stuff. How can I do it right?
| How do I correctly set an association between two objects in the Entity Framework 4 Entitydesigner? | CC BY-SA 2.5 | 0 | 2010-09-13T13:04:54.107 | 2017-01-25T22:25:59.290 | null | null | 225,808 | [
"c#",
"asp.net",
"entity-framework-4"
] |
3,700,667 | 1 | 3,700,778 | null | 2 | 1,945 | I am using below code to apply different background color to odd and even rows:
```
$('#tbl tr:odd').css('background-color', '#ECF6FC');
$('#tbl tr:even').css('background-color', '#ffffff');
```
But odd and even rows show up differently in FF and IE, for example:


As can be seen, in FF, first row turns out to be white while in IE the first row turns out to be blue. Why it is happening, what is the fix for this?
| jQuery odd even problem | CC BY-SA 2.5 | null | 2010-09-13T13:07:47.050 | 2010-09-13T13:25:21.863 | 2010-09-13T13:13:13.103 | null | null | [
"jquery",
"internet-explorer"
] |
3,701,372 | 1 | 3,702,371 | null | 1 | 180 | I'd like to apply a Brush (LinearGradientBrush in this case) to two or more objects (TextBlocks) at once. The effect that I'd like is something like this:

I cannot simply apply the same brush to both objects, as this will make both of them start red and go to blue (instead of the second one starting at a shade of purple).

I'm sure I'm overlooking something quick-n-easy...
Thanks,
wTs
| Apply Brush to Two Objects At Once | CC BY-SA 2.5 | null | 2010-09-13T14:33:31.857 | 2010-09-14T07:03:01.117 | 2010-09-13T15:06:25.330 | 285,417 | 285,417 | [
"wpf",
"brush",
"lineargradientbrush"
] |
3,701,729 | 1 | null | null | 5 | 3,030 | I'm trying to figure out how I can get the correct "active" tile under the mouse when I have "ramp" and +1 height tiles (see picture below).

When my world is flat, everything works no problem. Once I add a tile with a height of say +1, along with a ramp going back to +0, my screen -> map routine is still looking as if everything is "flat".
In the picture above, the green "ramp" is the real tile I want to render and calculate mouse -> map, however the blue tile you see "below" it is the area which gets calculated. So if you move your mouse into any of the dark green areas, it thinks you're on another tile.
Here is my map render (very simple)
```
canvas.width = canvas.width; // cheap clear in firefox 3.6, does not work in other browsers
for(i=0;i<map_y;i++){
for(j=0;j<map_x;j++){
var xpos = (i-j)*tile_h + current_x;
var ypos = (i+j)*tile_h/2+ current_y;
context.beginPath();
context.moveTo(xpos, ypos+(tile_h/2));
context.lineTo(xpos+(tile_w/2), ypos);
context.lineTo(xpos+(tile_w), ypos+(tile_h/2));
context.lineTo(xpos+(tile_w/2), ypos+(tile_h));
context.fill();
}
}
```
And here is my mouse -> map routine:
```
ymouse=( (2*(ev.pageY-canvas.offsetTop-current_y)-ev.pageX+canvas.offsetLeft+current_x)/2 );
xmouse=( ev.pageX+ymouse-current_x-(tile_w/2)-canvas.offsetLeft );
ymouse=Math.round(ymouse/tile_h);
xmouse=Math.round(xmouse/(tile_w/2));
current_tile=[xmouse,ymouse];
```
I have a feeling I'll have to start over and implement a world based map system rather than a simple screen -> map routine.
Thanks.
| Isometric Screen to Map | CC BY-SA 2.5 | 0 | 2010-09-13T15:14:03.487 | 2011-03-08T10:44:33.703 | 2011-03-08T10:44:33.703 | 649,481 | 45,439 | [
"javascript",
"tiles",
"isometric"
] |
3,701,859 | 1 | 3,702,037 | null | 0 | 285 | I have been using WinForms since the first framework introduced and invested a lot of time and effort in it. Now I am attempting to move to WPF and, honestly, it's not so easy.
Now I have a task, I need to implement a simple wizard, each page of which has a aligned to center group of controls. The group contains a set of buttons, four button in a row. Width of the group is constant, height is variable -- it depends on the number of buttons inside.

It's a simple task for WinForms, but I have no idea how to do it using XAML.
I have three questions:
1). Obviously, the buttons inside a group is a which is placed in a Grid's cell. It's simple. But how to calculate height of the not using code behind?
2). Which is recommended way to implement wizard? Data template or some kind of ? I probably will need to have some transition effects when switching pages.
3). Is it acceptable in WPF world to use binding as a way to repositioning controls?
Thank you in advance!
| Control positioning & binding | CC BY-SA 2.5 | null | 2010-09-13T15:27:57.573 | 2010-09-13T15:55:10.970 | null | null | 440,109 | [
"c#",
".net",
"wpf",
"user-interface"
] |
3,701,876 | 1 | null | null | 0 | 1,073 | How do you copy javascript errors in IE to clipboard? CTRL + C doesn't work and I don't want to take screenshots. Are there any tools out there that lets you copy the text?

(ANSWER) EDIT: I finally found a machine which has IE8 on it and was able to copy the error message. It's a hassle, though.
| Copy javascript error text to clipboard? | CC BY-SA 2.5 | null | 2010-09-13T15:29:34.290 | 2011-05-30T20:23:34.763 | 2010-09-13T17:17:02.240 | 349,308 | 349,308 | [
"javascript"
] |
3,701,979 | 1 | 3,703,986 | null | 0 | 2,130 | i am making a history page for a website. The structure of my classes is something like this:

```
class Person(models.Model):
name = models.CharField(max_length=100)
type = models.CharField(max_length=30)
class History(models.Model):
date = models.DateField(max_length=100)
action = models.CharField(max_length=250)
person = models.ForeignKey(Person)
class Parent(Person):
#some attributes that are not relevant
class Son(Person)
parent = models.ForeignKey(Parent)
#other attributes that are not relevant
```
its quite simple... i have a that has multiple both can do on the website and they are all saved in the History table that has a reference to the Person that executed the action. The history table is something like:
```
date | action | person_id
----------------------------------------
16-12-2010 | saved profile | 1
16-12-2010 | new child | 2
```
for a Parent i need to display all his actions and the action of his sons
Using sql it would be:
```
SELECT * FROM History where person_id=1
UNION
SELECT h.* FROM History h JOIN Son s ON s.person_ptr_id=h.person_id WHERE s.parent_id=1
```
but i have no idea how to do that using django's ORM. Myabe using two querys? a loop?
Do you have any ideas? i'd really appreciate some help.. thanks in advance
BTW: i'm using django 1.1
i added the attributes in the classes. These are just examples, my tables have more attributes, but this is how django translate the relations into tables
| help using django's ORM for UNION query | CC BY-SA 2.5 | null | 2010-09-13T15:40:37.853 | 2010-09-13T20:07:18.447 | 2010-09-13T18:35:19.337 | 361,427 | 361,427 | [
"django",
"orm"
] |
3,702,083 | 1 | 3,705,498 | null | 9 | 9,623 | I'm having an issue with a JFreeChart overlaid graph. I'm using JFreeChart 1.0.13. What I am trying to do seems like it was easier to do in earlier versions of JFreeChart?
The graph shows a line chart and a bar chart. The data range plotted by the line chart for the Y axis is in the 0-100 range, and the axis for the bar chart is in the 0-5 range.
Individually, when I lay out each chart and paint it, they look great. Here's an example:
Bar Chart
Line Chart
But when I overlay them, the bar chart gets scaled down to look incredibly useless... presumably because the scales of the two datasets are so different.
Example:

What I really want is to split the series data for the two datasets, and display the 0-100 range for the line chart on the left hand Y axis and to have the bar chart displayed full size as in my first example below, but have the scale 0-5 displayed on the right hand Y axis side of the graph.
To create the graph, I am first creating the bar chart using an XYSeriesCollection, adding the data and creating the plot...
```
XYSeriesCollection histogramDataset= new XYSeriesCollection();
XYSeries xy= new XYSeries("Temp");
xy.add(100,0.0);
xy.add(101,0.3769791404875597);
histogramDataset.addSeries(xy);
...
final NumberAxis xAxis = new NumberAxis("Temperature C");
xAxis.setAutoRangeIncludesZero(false);
final ValueAxis yAxis = new NumberAxis("Percent Time above Temperature");
final XYItemRenderer renderer = new XYBarRenderer();
final XYPlot plot = new XYPlot((XYDataset) histogramDataset, xAxis, yAxis, renderer);
```
Then I create the line chart in a similar way and add the second series to the plot...
```
final XYSeries xy = new XYSeries("First");
final XYDataset xySeriesData = new XYSeriesCollection();
final XYItemRenderer xyLineRenderer = new XYLineAndShapeRenderer();
xyLineRenderer.setSeriesShape(0, new Line2D.Double(0.0, 0.0, 0.0, 0.0));
xyLineRenderer.setSeriesStroke(0, new BasicStroke(4.5f));
xy.add(100,100.0);
xy.add(101,100.0);
xyseriesData.add(xy);
plot.setDataset(1, xySeriesData);
plot.setRenderer(1, xyLineRenderer);
plot.setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);
```
My suspicion is that somehow each graph needs to be it's own plot and combined together. Can anyone help? What I am going for here is something like this:

Except I don't want the bar chart to be a background image. The X axis should be the same, and the Y axis should be on the right hand side with the proper scale that allows the graph to be shown full size.
Any/all replies are appreciated...
| Help with JFreeChart overlay | CC BY-SA 2.5 | 0 | 2010-09-13T15:53:30.453 | 2010-09-22T05:43:19.693 | null | null | 418,548 | [
"overlay",
"jfreechart",
"scale",
"mismatch"
] |
3,702,436 | 1 | 3,703,959 | null | 6 | 2,825 | I've got two Wpf ToolBars in a single ToolBarTray. How to make them fit on two rows?
I noticed users can move them at run-time. Is there a way to get the same behavior at design-time without using two ToolBarTrays ?
To sumarize, at startup, I want this:

instead of that:

Thanks
| WPF ToolBar: How to arrange toolbars at design-time | CC BY-SA 2.5 | null | 2010-09-13T16:34:31.797 | 2010-09-13T20:04:27.997 | null | null | 197,377 | [
"wpf",
"toolbar"
] |
3,702,447 | 1 | 3,702,455 | null | 4 | 956 | I can't see what code called the line being executed at runtime using the debugger.

How do I step into the methods that called the code being exectued themselves?
| VS 2010: Call Stack says: [external code] and won't show calling code | CC BY-SA 3.0 | 0 | 2010-09-13T16:35:52.400 | 2012-06-30T04:08:47.867 | 2012-06-30T04:08:47.867 | 918,414 | 424,952 | [
"visual-studio",
"visual-studio-2010"
] |
3,702,496 | 1 | null | null | 3 | 256 | I have a model like this:
```
public class Person
{
public int ID { get; set; }
[Required(ErrorMessage="Name cant be empty")]
public string Name { get; set; }
public Person Friend { get; set; }
}
```
I want to create a new Person, and made a form with the fields using the strongly typed HtmlHelper
- - - `<option value="Friend.ID">Friend.Name</option>`

When posting the form, my controller takes in a Person object (`p`), which is bound using the default modelbinder. Just to be explicit, the modelbinder does the following: The `ID` and `Name` properties are bound as expected. The `Friend` is set to a new `Person` instance whose `ID` equals the ID of the person I chose in the dropdown. The `Friend.Name`'s value is `null` because I didn't provide a value for it in the form.
I want the `RequiredAttribute` to fire on the `Name` textbox if it is empty - and it does. The problem is that it also fires on the `Friend`'s name attribute. So when I post, filling in all the fields, I get that the ModelState is invalid and the error being that `p.Friend.Name` is required.

How would I solve this problem? Of couse in this case I `Friend` I've thought of:
1. Using ViewModels for my views, which will somehow solve my problems. I haven't tried this yet as I feel I really shouldn't need to for such a simple problem
2. Sending the friend's ID as a separate parameter, friend_id, and binding the Friend property manually. Only the ID and Name attributes of the posted person is bound and I manually set the Friend property. This involves getting the Friend from my repository using the friend_id to make it a "real" Person object.
3. Checking the ModelState and removing errors I know don't count. This is just plain wrong and non-scalable (have to remember to do this if I add for example a SecondFriend property
I feel option 2 is the most feasable, but ideally I'd like it to be automatic. In addition, I can't use the strongly typed helper, as the `friend_id` textbox' `name` attribute must match the action method's parameter name.
I feel there's some point I've missed that would make this easier. Hopefully I'm right. Although I think it's a bit tedious using a ViewModel, it that's the correct thing to do, please do tell.
For now solved the problem using ViewModels with `ID`, `Name` and `Friend_id` as its properties and the same validation attributes as the `Person` model. I then map the `ID` and `Name` values over to a new `Person` instance. The Friend property is then set by loadning the specified friend from the repository. Like `newPerson.Friend = repository.Get(viewModel.Friend_id)`
When I get the time I plan on looking closer at [AutoMapper](http://automapper.codeplex.com/) to do this "automatically".
| Validation propagating to related objects | CC BY-SA 2.5 | null | 2010-09-13T16:41:45.323 | 2011-01-02T15:02:06.973 | 2010-09-16T13:07:49.667 | 440,816 | 440,816 | [
"asp.net-mvc",
"validation",
"model-binding"
] |
3,702,732 | 1 | 3,702,906 | null | 3 | 349 | I'm experiencing a strange CSS spacing issue in Chrome (but not in Firefox and/or IE)
[My site is here.](http://johnedwards.com/news/press-releases/20070905-mattel-recall/)
The vertical spacing in Firefox between the "" (H2 tag) and the form input field for "" (#city-field input tag) is perfect, but in Chrome, Chrome is applying more/extra vertical spacing than desired.
To help, I've attached a screenshot. The redline represent the extra spacing that Chrome is adding that Firefox/IE are not.

Any ideas why Chrome is apply more spacing than Firefox & IE.
And how to fix this issue.
Thanks in advance
I'm also using a "reset stylesheet" to standardize across all browsers the H2 spacing, etc. It can be found in my linked HTML document above yet still am experiencing this issue.
| CSS: Padding issue. Need help please | CC BY-SA 3.0 | null | 2010-09-13T17:09:57.647 | 2011-07-28T09:35:53.407 | 2011-07-28T09:35:53.407 | 128,662 | 446,570 | [
"html",
"css",
"spacing"
] |
3,702,820 | 1 | 3,702,849 | null | 2 | 187 | For the following (simplified) mysql DB setup, I'd like to copy the applicable guids into the `message` table. Can this be done with a single SQL `update`?

```
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`guid` varchar(13) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
INSERT INTO `user` (`id`, `guid`) VALUES
(1, 'a'),
(2, 'b'),
(3, 'c');
CREATE TABLE IF NOT EXISTS `message` (
`user` int(11) NOT NULL,
`user_guid` varchar(13) NOT NULL,
KEY `user` (`user`)
) ENGINE=InnoDB;
ALTER TABLE `message`
ADD CONSTRAINT `message_ibfk_1` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE CASCADE;
INSERT INTO `message` (`user`, `user_guid`) VALUES
(3, ''),
(2, ''),
(3, '');
```
| Mysql: Is there an update-statement that will denormalize as follows? | CC BY-SA 2.5 | null | 2010-09-13T17:23:01.047 | 2010-09-13T18:52:34.363 | 2010-09-13T17:53:59.850 | 153,394 | 153,394 | [
"sql",
"mysql"
] |
3,702,862 | 1 | 3,702,908 | null | 1 | 2,333 | I've been recruited to work on a form for tracking specimens. Each specimen is associated with a subject; each specimen also has a particular slot in a 9 x 9 storage box. For ease of data entry, I think it would be best if the Access form mirrored the box itself (and the paper forms that will be used to enter data into Access): nine columns by nine rows, with each element consisting basically of a text box for the specimen ID. This is basically how I'd like it to look:

So the data entry person would essentially type in the box number and specimen IDs, then click "Create Records" to pop all of those records into existence (you can see some other stuff going on here, but that's not really important right now). I'm not really sure about the best way to code this, however. Right now, the best process I can think of is to: 1) run an insert query to create the box if it doesn't exist, 2) run an insert query to create the subject (person), if it doesn't exist, and 3) run an insert query for each specimen, hard-coding in its row and column (e.g. box_col = 'A', box_row = '1').
Note: the subject ID and specimen ID would both be parsed out of the ID field - it's goofy, not my idea, but that's how it's set up. I can handle that, though.
This is a certainly a kludge, but I'm not sure what else to do and most of what I've googled up hasn't been pertinent to multiple-record creation from a single form. Is there a better way to do this? Should I simply abandon the idea and go with a more traditional bound subform approach?
| One (probably unbound) Access 2003 form to create multiple records | CC BY-SA 4.0 | null | 2010-09-13T17:29:25.120 | 2021-12-09T10:43:35.900 | 2021-12-09T10:43:35.900 | 12,892,553 | 143,319 | [
"forms",
"ms-access",
"ms-access-2003",
"data-entry"
] |
3,703,373 | 1 | 3,703,560 | null | 36 | 7,706 | [continuous deployment](http://www.startuplessonslearned.com/2009/02/work-in-small-batches.html) I'd like some feedback on possible process or technical bottlenecks in this workflow, suggestions for improvement, and ideas for how to better automate and increase the ease-of-use for my team.
---
## Core components:
- [Hudson](http://wiki.hudson-ci.org/display/HUDSON/Home)- `Git`[GitHub](http://www.github.com)- [PHPUnit](http://www.phpunit.de/)- [Selenium RC](http://seleniumhq.org/projects/remote-control/)- [Sauce OnDemand](http://saucelabs.com/how-it-works)`Selenium RC`- [Puppet](http://www.puppetlabs.com/puppet/introduction/)- [Gerrit](http://code.google.com/p/gerrit/)- [Gerrit Trigger](http://wiki.hudson-ci.org/display/HUDSON/Gerrit+Trigger)`Hudson`
---
: I've changed the workflow graphic to take ircmaxwell's contributions into account by: removing `PHPUnit`'s extension for `Selenium RC` and running those tests only as part of the QC stage; adding a QC stage; moving UI testing after code review but before merges; moving merges after the QC stage; moving deployment after the merge.
This workflow graphic describes the process. My questions / thoughts / concerns follow.

## My concerns / thoughts / questions:
- Overall difficulty using this system.- Time involvement.- Difficulty employing `Gerrit`.- Difficulty employing `Puppet`.- We'll be deploying on `Amazon EC2` instances later. If we're going about setting up `Debian` packages with `Puppet` and deploying to `Linode` slices now, is there a potential for a working deployment on `Linode` to break on `EC2`? Should we instead be doing our builds and deployments on `EC2` from the get-go?- Another question re: `EC2` and `Puppet`. We're also considering using Scalr as a solution. Would it make as much sense to avoid the overhead of `Puppet` for this alone and invest in Scalr instead? I have a secondary (ha!) concern here about cost; the `Selenium` tests shouldn't be running often that `EC2` build instances will be running 24/7, but for something like a five-minute build, paying for an hour of `EC2` usage seems a bit much.- Possible process bottlenecks on merges.- Could "A" be moved?
: Portions of this workflow are [inspired by Digg's awesome post on continuous deployment](http://about.digg.com/blog/continuous-deployment-code-review-and-pre-tested-commits-digg4). The workflow graphic above is [inspired by the Android OS Project](http://source.android.com/source/life-of-a-patch.html).
| Help me improve my continuous deployment workflow | CC BY-SA 2.5 | 0 | 2010-09-13T18:44:32.247 | 2012-09-06T22:23:42.783 | 2010-09-14T07:59:24.427 | 373,496 | 373,496 | [
"php",
"workflow",
"continuous-integration",
"hudson",
"selenium-rc"
] |
3,703,485 | 1 | 4,250,605 | null | 0 | 547 | There is a table  alt text that uses CSS (by using inherit in CSS) to format its layout. As you can see there is a drop down on top of the window that allows us select names, and based on the selection, the table would be populated. This action has been handled by an Ajax call, so we only refresh the table and not the rest of the page. However, when we call this Ajax call, even though we don't have any change in the code, there would be an extra space between vertical and horizontal borders of this table. I assume that there is a problem with the Ajax call and the CSS layout that we have this extra spaces. Does it make sense? or Do you any place that I can start my investigations? 
Here is the source code of my Test.jsp
```
<a:test-webpart>
<table class="ContentPanel first-child" cellspacing="0" cellpadding="0">
<tr>
<th id="title" class="CPHeader" width="100%" colspan="400" style="border-bottom:1px solid <theme:get selector="#test .DefaultBorder" attribute="border-color" />;"><c:out value="${tile_title}" /></th>
</tr>
<%@ include file="MyTest.jst" %>
<tbody class="content-area">
<tr>
<td>
<table class="ContentPanel ControlLayout" >
<tr>
<th style="padding-left:7px;" width="20%"><label for="testlist"><span >*</span><fmt:message key = "jsp.request.testlist" bundle="${local}" /></label></th>
<td class="last-child" width="80%">
<span >
<html:select property="valueAsMap(test_ITEM).value(test_OFFER)" styleClass="dropDown" styleId="offeredtest">
<html:optionsCollection property="value(Item_test_LIST)" label = "name" value ="id" />
</html:select>
</span>
</td>
</tr>
<tr>
<th style="padding-left:7px;" width="20%"><label for="employeeslist"><span >*</span><fmt:message key = "jsp.reques.employeeslist" bundle="${local}" /></label></th>
<td class="last-child" width="80%" >
<span >
<html:select property="valueAsMap(test_ITEM).value(Item_test_EMP)" onchange="javascript:getAlltests()" styleClass="dropDown" styleId="employeeId">
<html:optionsCollection property="value(Item_test_EMP_LIST)" label = "name" value = "id" />
</html:select>
</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th style="padding-left:7px;" align="left"><label for="testacceptlist"><span >*</span><fmt:message key = "jsp.request.testacceptlist" bundle="${local}" /></label></th>
</tr>
<tr>
<td style="padding-left:7px;">
<kvl:rsr-webpart>
<div id="testsTable">
<table class="Tabular" width="100%" cellpadding="0" cellSpacing="0">
<tr class="first-child">
<th><fmt:message key = "jsp.request.select" bundle="${local}" /></th>
<th ><fmt:message key = "jsp.request.a" bundle="${local}" /></th>
<th ><fmt:message key = "jsp.request.b" bundle="${local}" /></th>
<th ><fmt:message key = "jsp.request.c" bundle="${local}" /></th>
<th ><fmt:message key = "jsp.request.d" bundle="${local}" /></th>
<th ><fmt:message key = "jsp.request.e" bundle="${local}" /></th>
<th ><fmt:message key = "jsp.request.f" bundle="${local}" /></th>
<th class="last-child"><fmt:message key = "jsp.request.job" bundle="${local}" /></th>
</tr>
<c:forEach var="item" items = "${items}" varStatus="status">
<tr class="<c:if test='${status.index % 2 != 0}'>Even</c:if> <c:if test='${item.isFromPrimaryJob == true}'>Primary</c:if> <c:if test='${item.isFromPrimaryJob != true}'>Exchange</c:if>">
<td>
<input type="checkbox"
id="test_id_<c:out value="${item.id}"/>_<c:out value="${item.Date}"/>"
name="value(test_selected)"
value="<c:out value="${item.id}" />_<c:out value="${item.Date}"/>"
onclick="javascript:checkBox('test_id_<c:out value="${item.id}"/>_<c:out value="${item.Date}"/>','value(test_selected)','valueAsMap(REQUEST_ITEM).value(test_selected_list)','false')" >
</td>
<td>
<c:choose>
<c:when test="${empty item.label}">
</c:when>
<c:otherwise>
<c:out value="${item.label}"/>
</c:otherwise>
</c:choose>
</td>
<td><c:out value="${item.Date}"/></td>
<td><c:out value="${item.b}"/></td>
<td><c:out value="${item.d}"/></td>
<td><c:out value="${item.e}"/></td>
<td><c:out value="${item.f}"/></td>
<td class="last-child"><c:out value="${item.job}"/></td>
</tr>
</c:forEach>
</table>
</div>
</kvl:rsr-webpart>
</td>
</tr>
<tr>
<td style="padding-left:7px;">
<table class="ContentPanel ControlLayout" width="100%">
<%@ include file="request.jst" %>
</table>
</td>
</tr>
</tbody>
</table>
</a:test-webpart>
```
| issue with css inherit and Ajax | CC BY-SA 2.5 | null | 2010-09-13T18:57:15.663 | 2010-11-22T21:59:15.327 | 2010-09-14T14:50:55.813 | 119,504 | 119,504 | [
"css",
"ajax",
"jsp"
] |
3,703,937 | 1 | 3,704,022 | null | 1 | 1,667 | I have table with couple of textboxes in it. In those 2 fields I have required fields. When validators fire alignment is changing. Before the validators fire, textboxes aligntment is good.
Pic1 for after validator fires.

Pic2 for before validator fires.

Here is the HTML.
```
<table class="Borderblue" id="Table26" cellspacing="3" align="center" style="width: 100%;">
<tr>
<td bgcolor="White" style="width:20%" >
First Name <br/>
(on website)
</td>
<td bgcolor="White" style="width:20%" >
Middle Intial <br/>
(on website)
</td>
<td bgcolor="White" style="width:20%" >
Last Name <br/>
(on website)
</td>
<td bgcolor="White" style="width:20%" >
Nick Name <br/>
(Goes By Name)
</td>
</tr>
<tr>
<td bgcolor="White" style="width:20%" >
<asp:TextBox ID="txt6_2" runat="server" CssClass="TextBox SmallText" ></asp:TextBox>
<asp:RequiredFieldValidator runat="server" id="RequiredFieldValidator8" ValidationGroup="ValidateInsert" Display="Dynamic" controltovalidate="txt6_2" errormessage="Please enter first name!" />
</td>
<td bgcolor="White" style="width:20%">
<asp:TextBox ID="txt7_2" runat="server" CssClass="TextBox SmallText" MaxLength="2" Width="20px" style="vertical-align:top" ></asp:TextBox>
</td>
<td bgcolor="White" style="width:20%">
<asp:TextBox ID="txt8_2" runat="server" CssClass="TextBox SmallText"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" id="RequiredFieldValidator9" ValidationGroup="ValidateInsert" Display="Dynamic" controltovalidate="txt8_2" errormessage="Please enter last name!" />
</td>
<td bgcolor="White" style="width:20%" >
<asp:TextBox ID="txt9_2" runat="server" CssClass="TextBox SmallText" width="120px"></asp:TextBox> </td>
</tr>
</table>
```
CSS:
```
.SmallText
{
font-family: Tahoma, Arial, Helvetica;
text-align:justify;
font-size: 8.5pt;
}
.TextBox
{
Width: 100px;
Height:12px;
background-color:#F0F0F0;
border: 1px solid #000000;
}
```
| textboxes alignment messing up when required validators fire? | CC BY-SA 2.5 | null | 2010-09-13T20:00:41.700 | 2010-09-13T20:11:57.460 | 2010-09-13T20:09:05.620 | 90,011 | 158,008 | [
"asp.net",
"html",
"css",
"alignment"
] |
3,704,009 | 1 | 3,704,036 | null | 3 | 3,251 | I don't even know if this is possible or not but is there a method you can take the value of the selected file in a input field to a input field?
Like this:

| Input File field to Input Text field | CC BY-SA 2.5 | 0 | 2010-09-13T20:10:37.433 | 2010-09-13T20:29:06.687 | null | null | 264,795 | [
"javascript",
"file",
"input",
"field",
"input-field"
] |
3,704,566 | 1 | 4,639,018 | null | 8 | 627 | Before I start, I must say that for those with a background of linear algebra, this is NOT matrix decomposition as you know it. Please read the following paragraphs to get a clearer understanding of the problem I am trying to solve.
Here are the salient properties/definitions of the matrix and its submatrices:
1. I have an SxP matrix which forms a grid like structure of S.P "boxes". This is the main matrix.
This is what the (empty) main matrix looks like. Each square in the matrix is simply referred to as a box. The matrix can be viewed as a a kind of "gameboard" e.g. a chess board. The vertical axis is measured using an interval scale (i.e. real numbers), and the horizontal axis is measured using monotonically increasing non-negative integers.

1. There is an additional concept of submatrices (as explained earlier). A submatrix is simply a collection of boxes in a particular configuration, and with specific numbers and piece types (see black and white pieces below), assigned to the boxes. I have a finite set of these sub matrices - which I refer to as my lexicon or vocabulary for carrying out valid matrix composition/decompositions.
The "formal" definition of a sub matrix is that it is a configuration of M boxes contained within the main matrix, that satisfy the criteria:
- -
A vertical unit is the gap between the vertical axis lines in the main matrix. In the image below, the vertical unit is 100.

The image immediately above illustrates a simple sub matrix addition. The units with orange boarders/boxes are sub matrices - the recognized units that form part of my lexicon. You will notice that I have introduced further annotation in my sub matrices. This is because (using the chess analogy), I have two types of pieces I can use on the board. means a black piece, and (not shown in the image), represents a white piece. A recognized unit (or lexeme/sub matrix) There is a simple equivalence relation that allows conversion between a white piece and a black piece. This relationship can be used to further decompose a submatrix to use either exclusively black pieces, white pieces or a combination of both.
For the sake of simplicity, I have omitted specifying the equivalence relationship. However, if someone feels that the problem as posed is not "too difficult" without additional details, I shall gladly broaden the scope. For now, I am trying to keep things as simple as possible, to avoid confusing people with "information overload".
1. Each box in a sub matrix contains a signed integer, indicating a number of units of an item. Each "configuration" of boxes (along with its signed integers and piece type i.e. black or white pieces) is said to be a "recognized unit".
2. Submatrices can be placed in the main matrix in a way such that they overlap. Wherever the "boxes" overlap, the number of units in the resulting submatrix box is the sum of the number of units in the constituent boxes (as illustrated in the second image above).
The problem becomes slightly difficult because, the "recognized units" defined above themselves are sometimes combined with other "recognized units" to form another "recognized unit" - i.e. the sub matrices (i.e.recognized units) are ["holons"](http://en.wikipedia.org/wiki/Holon_%28philosophy%29). For example, in the second image above, the recognized unit being added to the matrix can itself be further decomposed into "smaller" submatrices.
This sort of [holarchy](http://en.wikipedia.org/wiki/Holarchy) is similar to how (in Physical chemistry), elements form compounds, which then go on to form ever more complicated compounds (amino acids, proteins etc).
Back to our problem, given a main matrix M, I want to be able to do the following:
i. identify the submatrices (or recognized units) that are contained within the main matrix. This is the first "matrix decomposition". (Note: a submatrix has to satisfy the criteria given above)
ii. For each identified submatrix, I want to be able to recognize whether it can be decomposed further into 2 or more recognized submatrices. The idea is to iteratively decompose submatrices found in step i above, until either a specified hierarchy level is reached, or until we have a finite set of submatrices that can not be decomposed further.
I am trying to come up with an algorithm to help me do (i) and (ii) above. I will implement the logic in either C++, Python or C# (in increasing level of preference), depending on which ever is the easiest to do and/or in which I happen to get snippets to get me started in implementing the algorithm.
| "Matrix decomposition" of a matrix with holonic sub structure | CC BY-SA 2.5 | 0 | 2010-09-13T21:29:06.917 | 2014-07-02T22:02:21.430 | 2010-09-14T10:06:08.637 | 197,843 | 197,843 | [
"c#",
"c++",
"python"
] |
3,704,680 | 1 | 3,704,815 | null | 3 | 969 | I can get the ShareKit demo from github to compile using the iOS 4.1 SDK, but when I import it into my project exactly how it's described on the ShareKit site, after compiling I'm getting 4,448 errors. It looks like I'm missing a framework, but I have the required frameworks listed. Maybe there's some kind of framework conflict. Here are some screenshots:

The frameworks:


Has anyone else seen this before? Thanks!
| adding ShareKit to my project, won't compile - 4,448 errors | CC BY-SA 2.5 | null | 2010-09-13T21:48:57.430 | 2010-09-13T22:12:29.137 | null | null | 100,027 | [
"iphone",
"objective-c",
"frameworks",
"sharekit"
] |
3,704,754 | 1 | null | null | 0 | 414 | For one of my projects I display a list of counties in a drop down list (this list comes from a lookup table containing all counties). The client just requested that I limit it to a subset of their choice. The subset was given to me in an excel spreadsheet containing only names (seen below):

I'm trying to figure out the quickest way possible for me to map each of these to their corresponding id in the original lookup table. The client cannot give me these IDs. The names in here match the names in my table (except for the case).
This will most likely be a one time only thing.
Can anyone suggest a fast way to get these values into a query so I don't have to manually do it?
When I say fast I'm not talking about processing speed, just the fastest start to finish time that results in me getting the corresponding IDs using any tool available.
Note: I'm aware that I could have probably done this manually in the time it will take to get an answer, but I'd like to know for future reference.
| Fastest way to map a list of names in an excel doc to their IDs in a lookup table? | CC BY-SA 2.5 | null | 2010-09-13T22:01:26.717 | 2010-09-14T12:54:21.090 | 2010-09-13T22:23:49.283 | 226,897 | 226,897 | [
"sql-server",
"excel",
"sql-server-2008"
] |
3,704,854 | 1 | null | null | 1 | 2,785 | I'm setting a textview as a child to a TableRow view programmatically and I cannot seem to get the text to wrap inside of the parent.
Here is the code which should be wrapping the text inside of the TableRow. Notice the setSingleLine is being set to false.
```
TextView value = new TextView(this);
![alt text][1]value.setLayoutParams(new TableRow.LayoutParams(
LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));
value.setSingleLine(false);
value.setEllipsize(TruncateAt.END);
value.setHorizontallyScrolling(false);
value.setText(txt);
value.setTextColor(Color.BLACK);
value.setTextSize(12);
value.setTypeface(generalFont);
```
The documentation doesn't say by setting it to false will make it multiline, it says it will restore it to the defaults.
> setSingleLine(boolean singleLine)
If true, sets the properties of this field (lines, horizontally scrolling, transformation method) to be for a single-line input; if false, restores these to the default conditions.
Does anybody have a code snippet or URL which points to a multiline TextView being created programmatically?
TEXT IN TEXT VIEW
> Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Phasellus
tempus porttitor diam, sit amet rutrum
nunc laoreet at. Mauris sit amet
tristique e
IMAGE SHOWING THE ISSUE

| Android :: TextView :: Programitic Creation with setSingleLine(false) - Not wrapping | CC BY-SA 2.5 | null | 2010-09-13T22:21:12.673 | 2010-09-14T19:32:49.097 | 2010-09-14T17:03:15.700 | 308,987 | 308,987 | [
"android",
"textview"
] |
3,705,195 | 1 | 3,705,717 | null | 11 | 1,003 | We have a grid with red squares on it. Meaning we have an array of 3 squares (with angles == 90 deg) which as we know have same size, lying on the same plane and with same rotation relative to the plane they are lying on, and are not situated on same line on plane.
We have a projection of the space which contains the plane with squares.

We want to turn our plane projection with squares so that we would see it like it's facing us, in general we need a formula for turning each point of that original plane projection so that it would be facing us like on the image below.
What formulas can be used for solving such problem, how to solve it, has any one faced something like this before?

| Is there an algorithm for solving such projection reconstruction geometric problem? | CC BY-SA 2.5 | 0 | 2010-09-13T23:42:03.090 | 2010-09-16T12:40:09.577 | 2010-09-16T12:40:09.577 | 242,848 | 434,051 | [
"algorithm",
"math",
"geometry",
"projective-geometry"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.