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,544,004 | 1 | 3,544,314 | null | 7 | 3,723 | I can't seem to keep the horizontal header from being selected when I select a single row in a `QTableWidget`.

How can I prevent the header from being selected too? This only happens when one row is in the table. If it has more than two rows, then it works as expected and only the row itself is selected.
---
```
ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
```
| How to keep header from being selected when there is one item in a QTableWidget? | CC BY-SA 2.5 | 0 | 2010-08-23T00:08:50.807 | 2016-11-27T20:56:53.860 | 2010-08-23T01:16:39.130 | 193,619 | 193,619 | [
"qt",
"select",
"header",
"qtablewidget"
] |
3,544,053 | 1 | 3,544,190 | null | 4 | 1,626 | well i have 2 radio buttons and each one exist in a different groupbox.
they they act as they are not related to each other.
but i want them to be as they exist in a same form.
is there a method to 2 that ?
i can do that by handling the the click and unchek the other checkbox but i was wondering if there is a better way?
thanks
Update:
currently i have
```
private void c_RadioButton1_CheckedChanged(object sender, EventArgs e)
{
if (RadioButton1.Checked)
RadioButton2.Checked = false;
}
private void c_RadioButton2_CheckedChanged(object sender, EventArgs e)
{
if (RadioButton2.Checked)
RadioButton1.Checked = false;
}
```
Update2:

| how do i let 2 radio buttons each in a a different groupbox act as they are in the same group? | CC BY-SA 2.5 | null | 2010-08-23T00:29:25.917 | 2010-08-23T01:26:31.710 | 2010-08-23T01:11:27.863 | 108,714 | 108,714 | [
"c#",
"winforms",
"radio-button"
] |
3,544,146 | 1 | 3,544,315 | null | 0 | 2,432 | Xcode has a nice feature that let you submit your application to iTunes connect without launching Application Loader. The problem appears when you have a whitespace in the application name.

I understand the problem, but since Xcode is naming the file automatically, how can I use this feature without changing the name of my app?
Thanks,
P.S. I will file a radar if there's no way to do it. I just wanted to be sure that there were no other way.
| "Submit Application to iTunes Connect..." Xcode feature with filename that contain whitespace | CC BY-SA 2.5 | 0 | 2010-08-23T01:10:14.937 | 2010-12-17T19:57:43.243 | null | null | 111,783 | [
"iphone",
"xcode",
"whitespace",
"app-store-connect"
] |
3,544,883 | 1 | null | null | 0 | 145 | while not sqlDebtors.eof do begin
fAmtOut := 0;
fAmt := 0;
sBranch := sqlDebtors.fieldbyname('Branch').AsString;
while (not sqlDebtors.Eof) and (sqlDebtors.FieldByName('Branch').AsString =sBranch) do begin
fAmtOut := fAmtOut + sqlDebtors.fieldbyname('Outstanding').asfloat;
fAmt := fAmt + sqlDebtors.fieldbyname('Amount').asfloat;
sqlDebtors.Next;
end;
pbar.add(fAmtOut, sBranch);
pbar.add(fAmt, sBranch);
end;
my graph draw like this

but i want to group my graph to be side bar graph so its can group by branch like this:

hope anyone can help me.thanks.
| how to set my graph to be side bar graph | CC BY-SA 2.5 | null | 2010-08-23T05:11:51.280 | 2010-08-23T06:47:56.447 | null | null | 448,173 | [
"delphi"
] |
3,545,059 | 1 | 3,545,205 | null | -2 | 1,916 | Again i came back with a question.
1.I have a line drawing from a point (x2,y2) for which i do no the end point(Say point unknown as in the fig),but i knew the line length and the angle from the vector (x2,y2). Can any one help me how to calculate the unknown points.

Thanks,
Lokesh.
| How to calculate the point(x2,y2) with the point (x1,y1) and the angle | CC BY-SA 2.5 | null | 2010-08-23T06:02:11.553 | 2021-09-11T08:30:14.923 | null | null | 385,162 | [
"c#"
] |
3,545,509 | 1 | 3,546,754 | null | 0 | 120 | I just now installed Windows Phone 7 Developer tools Beta. I noticed that the icons on the emulator differ from the icons in the web site, demos, samples etc.
Mine looks like this;

But other uses a different emulator like this;

Why is that? which one is real? or latest?
| Which Windows Phone 7 emulator is new? | CC BY-SA 2.5 | null | 2010-08-23T07:30:45.680 | 2010-08-23T10:39:08.287 | 2010-08-23T10:09:53.460 | 257,727 | 257,727 | [
".net",
"visual-studio-2010",
"windows-phone-7",
"emulation"
] |
3,545,832 | 1 | 3,546,158 | null | 1 | 452 | What is a good naming convention for multi-layered services and DAOs in a multi-tier applications?
In most of our application we have two layers of services, where the top level services use either DAOs or lower-level services for persistence and other tasks.
Both the top-level services and lower-level services end with "Service" in the simple name and the DAOs with "DAO".
Here is an example in UML form. CustomerService is a top-level service, ImageService a lower-level service and CustomerDAO a DAO.

The strict division is necessary in most of our applications because the top level services return DTOs to be used in DWR services or MVC web views. Lower level services do not have such constraints as they are not directly exposed to the View layer in MVC usage.
Also lower level service invocations are sometimes used in open transactions or (Hibernate/JPA) sessions.
What would be a good suffix for the the lower-level services to have them separated from the top-level services?
| Good naming schema for Services and DAOs | CC BY-SA 2.5 | null | 2010-08-23T08:27:51.327 | 2010-08-23T09:24:13.357 | 2010-08-23T08:38:23.760 | 252,552 | 252,552 | [
"naming-conventions"
] |
3,546,023 | 1 | 3,546,463 | null | 4 | 2,052 | I've temporarily inherited the responsibility to look after the website front end to our project as our web maintainer has just left and there isn't a replacement yet (and I'm a summer student anyway, so I'm off soon too...). I'm not very experienced with HTML/CSS/etc, and I'm having some problems getting a table formatted the way the bosses would like it. The table HTML/CSS (cut down as much as I think I can) is as follows:
```
<html>
<head>
<style type="text/css">
/* Old CSS from web-guy before me */
h5 {
font-size: 150%;
color: #878796;
font-family: Arial,Helvetica,sans-serif;
}
.details-container {
border-right : 1px;
border-right-color:#F6F6F6;
float:left;
}
.title-details h5 {
text-align: center;
margin: 0px;
margin-bottom: 5px;
margin-top: 5px;
}
/* From here on it is mostly my CSS */
table.center {
margin-left:auto;
margin-right:auto;
}
.details-column-left{
text-align:right;
padding-right:2px;
}
.details-column-right{
text-align:left;
padding-left:2px;
}
</style>
</head>
<body>
<div class="details-container">
<div class="title-details">
<h5>Details</h5>
</div>
<div class="details">
<table class="center">
<tr>
<th class="details-column-left">Title</th>
<td class="details-column-right">Prince</td>
</tr>
<tr>
<th class="details-column-left">Name</th>
<td class="details-column-right">Vlad III the Impaler</td>
</tr>
<tr>
<th class="details-column-left">Nationality</th>
<td class="details-column-right">Romanian</td>
</tr>
<tr>
<th class="details-column-left">Job</th>
<td class="details-column-right">General</td>
</tr>
<tr>
<th class="details-column-left">Extremely Long Header Text</th>
<td class="details-column-right">Equally Long Value Text</td>
</tr>
<tr>
<th class="details-column-left">Header</th>
<td class="details-column-right">Value</td>
</tr>
</table>
</div>
</div>
</body>
</html>
```
The text in the table (that is, the header cells text and the standard cells text) is generated server-side based on a database, so the values in them can be quite long or quite short (with a reasonable maximum length). The bosses want it as follows:
- - -
I think I've managed to capture 1 and 2 okay - this table should expand if you add longer `th/td` s, and it should likewise get smaller if you remove them - but I'm struggling with number 3. I'm just not sure how to do it at all. I've tried using a `<caption>`, but that didnt help - it's still centered above the entire table, not centered above the column split.
So, I'd appreciate any help getting the table to look 'right'. The only expected browser is apparently Firefox, versions 2 through 3.5 (although pushing 3.5 over 2 mostly). I apologise if I've missed any important information - please just ask and I'll add it.
Screenshot (red lines just for marking centre, not actually on table IRL):

| Get header/caption centered above 2-column table | CC BY-SA 3.0 | null | 2010-08-23T08:58:35.100 | 2017-06-10T12:02:19.290 | 2017-06-10T12:02:19.290 | 4,370,109 | 352,636 | [
"html",
"css",
"html-table",
"caption"
] |
3,546,140 | 1 | 3,546,402 | null | 9 | 4,719 | I have a form with two buttons. The first is hidden using Javascript.
When I press enter in a textfield in IE, the form does not submit. I assume it is because it has chosen the first button as default submit button, but since that button is hidden it does not work.
I have solved this by submitting the form on an enter keydown Javascript event. However, this also submits the form if the user presses enter to select an item from the browser's autocomplete dropdown.

How do I submit the form on enter in IE, without disturbing the autocomplete functionality?
| Enter does not submit form in IE because of hidden button | CC BY-SA 2.5 | 0 | 2010-08-23T09:14:36.933 | 2015-10-09T23:25:53.283 | null | null | 182,971 | [
"javascript",
"internet-explorer",
"autocomplete",
"submit"
] |
3,546,728 | 1 | null | null | 0 | 203 | i have one table with two columns as shown in picture

at the execution of page user enter the start and end date.
now what i need to calculate is total amount.
for example, if user put
```
start date: 18-jan-2010
end date: 23-jan-2010
```
then he has 2 dates in first options (20$) and 3 dates in second options (26$) so total will be (56$).
first i want to calculate in sql
```
1. how many days in first range (if any this depends on supplied dates from user)
2. how many days in 2nd range (if any this depends on supplied dates from user)
3. how many days in 3rd range (if any this depends on supplied dates from user)
```
then
we will multiply days with Amount in php for each range.
at the end i want to get grand total also in php.
| calculate amount on dates difference | CC BY-SA 3.0 | null | 2010-08-23T10:35:47.507 | 2012-12-24T22:28:15.830 | 2012-12-24T22:28:15.830 | 367,456 | 172,319 | [
"php",
"mysql",
"sql"
] |
3,547,007 | 1 | 3,547,050 | null | 5 | 3,454 | I wrote a program, which open docx package and changes some `<w:t>`-text in "word/document.xml". When i open new generated docx in Microsoft word, it gives me an error — "file is corrupted". But if look in "Open XML SDK Tool" diffs between template docx and result docx files — there is only two line changed in "word/document.xml". Look at screenshot:

Program doesn't touches document format, styles or smth. Only text in `<w:t>`
So, what's can provoke "file is corrupted" error in Microsoft Word?
And this error appears ONLY in Microsoft Word. For example OpenOffice and TextEdit on Mac OS X open generated files without any errors.
I upload [these](http://www.vanyamikhailov.ru/files/docxfiles.zip) docx files, so you can look at them by yourself.
| docx "File is corrupt" error in Microsoft Word | CC BY-SA 3.0 | null | 2010-08-23T11:17:49.903 | 2014-10-17T13:36:57.237 | 2011-08-18T12:18:30.070 | 318,465 | 277,262 | [
"ms-word",
"ms-office",
"docx"
] |
3,547,101 | 1 | 3,548,044 | null | 0 | 235 | I have the following EF structure:

I want to get name of the every user who attended to a meeting:
```
using(var ctx = new MyContext())
{
var meeting = (from row in ctx.Meetings.Include("MeetingMessages").Include("MeetingUsers")
where row.mId == 1
select row).FirstOrDefault();
foreach(var meetingUser in meeting.MeetingUsers)
{
MessageBox.Show(meetingUser.User.Name); //<== exception
}
}
```
I'm getting `NullReferenceException` in `meetingUser.User.Name` line because `meetingUser.User` instance is null. I can't add any `.Include()` to `Meeting` because there are no relations in between. Is there a way to load it without doing `meetingUser.UserReference.Load()` in foreach?
| Null reference exception in entity navigation | CC BY-SA 2.5 | null | 2010-08-23T11:32:09.517 | 2010-08-23T13:34:29.697 | null | null | 55,818 | [
"entity-framework"
] |
3,547,834 | 1 | null | null | -1 | 3,922 | i try to use erpCtx.Executecommand but i doesn't have method of executecommand. i think that i must add dll in Reference to show executeCommand?
i need : [1](https://i.stack.imgur.com/YwHwB.jpg)
| How can i see execute command in Entity FrameWork? | CC BY-SA 2.5 | null | 2010-08-23T13:12:12.263 | 2010-12-13T12:11:15.820 | 2010-12-13T12:11:15.820 | 52,420 | 52,420 | [
"c#",
".net",
"visual-studio",
"linq",
"entity-framework"
] |
3,547,831 | 1 | 3,551,234 | null | 10 | 549 | I am playing around a bit with my program (trying to multicore a few parts) and I've noticed the "CPU history" looks a bit different, depend on how many workers I start. 2-4 workers seems to produce a "stable" workflow, however pegging 5-8 workers produces erratic behavior (from zero to max, see pictures). I should point out that all runs started out with "smooth" max capacity (e.g. 2 cores with only 25%), and started to exhibit erratic behavior only after a minute or so.
What's going on? I have 4 core processor, and do you think this behavior may be related to this fact?
I hope you can see the pics.
2 workers

3 workers

4 workers

5 workers

6 workers

7 workers

8 workers

| different behavior when using different number of multicoring workers | CC BY-SA 2.5 | 0 | 2010-08-23T13:11:36.077 | 2011-09-04T11:26:09.737 | 2011-09-04T11:26:09.737 | 322,912 | 322,912 | [
"windows",
"r",
"multicore"
] |
3,548,039 | 1 | 3,548,135 | null | 0 | 4,631 | Given:
(x1,y1) = (0,0)
(x2,y2) = (0,-10)
Using the angle to C,

| Find the coordinates in an isosceles triangle | CC BY-SA 2.5 | null | 2010-08-23T13:33:14.173 | 2015-03-04T03:52:09.477 | 2015-03-04T03:52:09.477 | 1,118,321 | 99,860 | [
"geometry",
"trigonometry"
] |
3,548,140 | 1 | 3,548,161 | null | 54 | 143,183 | I want to make an "Open" and "Save" dialog in java. An example of what I want is in the images below:
Open:

Save:

How would I go about doing this?
| How to "Open" and "Save" using java | CC BY-SA 3.0 | 0 | 2010-08-23T13:44:11.573 | 2018-03-28T14:13:16.833 | 2013-10-25T18:51:31.970 | 2,415,238 | 196,641 | [
"java",
"swing",
"jfilechooser"
] |
3,548,581 | 1 | 3,551,162 | null | 0 | 916 | When a splitview is in portrait mode, the rootView shows as a popover.
in this case, my rootView has a tableView with a searchBar at the top. When I tapped the search bar, the keyboard appears, and the splitView's popover automatically adjust its height, but at the same time, I get this in the top of the popover..

Any ideas?
Thanks in advance.
| SplitViewController's popover UI error when UISearchBar is in focus | CC BY-SA 2.5 | 0 | 2010-08-23T14:37:24.800 | 2010-11-12T03:02:11.750 | 2010-08-23T19:53:59.857 | 21,234 | 219,777 | [
"iphone",
"uisearchbar",
"uisplitviewcontroller",
"uipopovercontroller",
"popover"
] |
3,548,631 | 1 | 3,740,501 | null | 2 | 1,183 | I've run into a particularly nasty bug where an ASP.NET website attempts to make a call to a WCF service method that sends IIS into a death spiral...that ultimately brings down the associated app pool. It never gets to our log4net code that outputs unhandled exceptions.
I was watching w3wp.exe processes spin up and die, so I figured I'd take a dump file on termination using [ProcDump from SysInternals](http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx) using the following command:
```
procdump -e -t -ma <PID> aspnet.dmp
```
This gets me a minidump file, which I can open up in VS2010, and it shows me that the heap information is present. Which is exciting:

So at this point I attempt to set the symbol path, which is the bin folder for that particular website. I've copied it down from the appropriate server. However, I still only get the option to Debug with Native Only, and when I do that .
Here's my PDB location setup:

I'm not sure if that's because the call stack seems to stop somewhere in a Windows DLL...? Here's a screen of the call stack window.

Anyway, my ultimate question is ? It appears to be in unmanaged code but I'd still love to see the last managed call before everything explodes.
Also, in case it's helpful, the web server is Win2003 x86, my PC is Win7 x64.
Thanks!
| How can I debug a dump file for an ASPNET worker process in Visual Studio 2010? | CC BY-SA 2.5 | null | 2010-08-23T14:43:57.590 | 2010-09-18T05:24:04.847 | null | null | 271,250 | [
"asp.net",
"wcf",
"visual-studio-2010",
"windows-server-2003",
"minidump"
] |
3,549,380 | 1 | null | null | 0 | 1,215 | I have written a Well control, similar to the Visual Studio editor tabs so that a user can have multiple documents open and can see one or more at a time. It is derived from a UserControl and exposes an ObservableCollection of OpenDocuments that binds to the ViewModel. If I were to implement this as a simple TabControl, then this would be how it would look:
```
<TabControl
Grid.Row="1"
Grid.Column="1"
ItemsSource="{Binding OpenDocuments}"
SelectedItem="{Binding SelectedTab, Mode=TwoWay}">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock
Text="{Binding Name}" />
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<vw:DocumentView />
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
```
This gives me Name in the tabitem header and the DocumentView (another user control in the Content area).
My control has a ContentTemplate but it is of course representing the whole of the control so all I get to see is the DocumentView. My control doesn't have an ItemTemplate.
How do I expose an ItemTemplate and ContentTemplate?
Andrew
EDIT -------------------------------------------------------------------------
Thanks for the replies. It looks like this:

A user can have one or more document wells holding one or more tabs. All the consumer has access to is the list of visible tabs and the currently selected tabitem.
Notice that the tabs are all empty! I don't understand how to specify the ContentTemplate for the <vw:DocumentView> in the same way as the TabControl example above.
Andrew
| How to expose ItemTemplate and ContentTemplate from a UserControl | CC BY-SA 2.5 | null | 2010-08-23T16:03:52.713 | 2010-08-24T09:11:21.867 | 2010-08-24T09:11:21.867 | 71,367 | 71,367 | [
"wpf",
"wpf-controls"
] |
3,549,404 | 1 | null | null | 2 | 308 | Not directly programming, but related:
I'm using team explorer 2010 to connect to a 2010 TFS server (On a 2008R2 box), however when I try and connect, I get a red X on the project node and cannot expand it. There are not error messages or anything. Here is an image of what I am getting . I have the same exact setup on another system (except Windows 7), using the same credentials and it works fine. Anyone ever run into this before?
| Team explorer 2010 error on project node? | CC BY-SA 2.5 | 0 | 2010-08-23T16:05:57.130 | 2020-07-12T18:34:21.777 | 2020-07-12T18:34:21.777 | 13,095,326 | 127,853 | [
"tfs"
] |
3,550,114 | 1 | 3,550,142 | null | 4 | 594 | I want to store molecules in memory. These can be simple molecules:
```
Methane (CH4)
C-H bond-length: 108.7 pm
H-H angle: 109 degrees
```
But also more complex molecules, like paracetamol (C8H9NO2):

How can I store molecules in memory, including all bond-lengths and angles?
---
A good idea to store atom-structs in an array? Or is there a better way?
| How to store molecules in memory? | CC BY-SA 2.5 | 0 | 2010-08-23T17:34:57.967 | 2010-08-23T17:45:24.250 | 2010-08-23T17:37:32.077 | 106,224 | null | [
"objective-c",
"c",
"memory",
"variables",
"data-structures"
] |
3,550,264 | 1 | 3,550,436 | null | 3 | 22,474 | I tagged this question with `poisson` as I am not sure if it will be helpful in this case.
I need to create a distribution (probably formatted as an image in the end) from a list of data.
For example:
```
data = [1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 10, 10, 10, 22, 30, 30, 35, 46, 58, 59, 59]
```
such that the data can be used to create a visual distribution. I might, for example in this case, say that the ranges are in 10 and there needs to be at least 3 items in each range to be a valid point.
With this example data, I would expect the result to be analogous to
```
ditribution = [1, 2, 4, 6]
```
since I have > 3 items in ranges 0-9, 10-19, 30-39 and 50-59. Using that result I could generate an image that has the sections segmented out (darker color) that exist in my final distribution. An example of the type of image I am trying to create can be seen below and would have been generated with far more data. Ignore the blue line for now.
I know how to do this the way of iterating over every item in the list and doing my calculation like that. But, my data set may have hundreds of thousands, or even millions of numbers. My range (10) and my required number of items (3) will likely be much larger in a real world example.

Thanks for any help.
| Python: create a distribution from a list based on number of items that fall within certain ranges | CC BY-SA 2.5 | null | 2010-08-23T17:55:48.203 | 2023-01-21T19:00:14.630 | null | null | 141,555 | [
"python",
"distribution",
"poisson"
] |
3,550,277 | 1 | 3,550,409 | null | 1 | 1,293 | I am trying to add custom labels to my cell in UITableView. When I try to do this the display is messed up and I am unable to figure out what exactly is going on. Please find the image below and I will post the method I wrote..
```
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
//cell.textLabel.font=[UIFont systemFontOfSize:16];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
NSString *contact=[contactKeys objectAtIndex:[indexPath section]];
NSArray *contactSection=[contactNames objectForKey:contact];
NSMutableArray *sugar=[db sugarId];
if (isSearchOn) {
NSString *cellValue = [searchResult objectAtIndex:indexPath.row];
NSArray *splitText = [cellValue componentsSeparatedByString:@":"];
NSString *contactText = [NSString stringWithFormat:@"%@ %@", [splitText objectAtIndex:1], [splitText objectAtIndex:0]];
//NSString *result=[contactText stringByAppendingString:[sugar objectAtIndex:[indexPath row]]];
firstLabel=[[[UILabel alloc]initWithFrame:CGRectMake(10, 10, 300, 40)]autorelease];
firstLabel.tag =40; //This should be a constant probably
firstLabel.font = [UIFont systemFontOfSize:[UIFont labelFontSize]];
firstLabel.text = contactText;
[firstLabel sizeToFit];
[cell.contentView addSubview:firstLabel];
sugarLabel = [[UILabel alloc] initWithFrame:
CGRectMake(10+firstLabel.frame.size.width+2, 10, 300, 60)];
sugarLabel.tag =40; //This should be a constant probably
//sugarLabel.font = [UIFont boldSystemFontOfSize:16];
sugarLabel.text = [sugar objectAtIndex:[indexPath row]];
[sugarLabel setHidden:YES];
[cell.contentView addSubview:sugarLabel];
cell.textLabel.text =firstLabel.text;
} else {
NSString *cellText = [contactSection objectAtIndex:[indexPath row]];
// split the text by the : to get an array containing { "AAA", "BBB" }
NSArray *splitText = [cellText componentsSeparatedByString:@":"];
// form a new string of the form "BBB AAA" by using the individual entries in the array
NSString *contactText = [NSString stringWithFormat:@"%@ %@", [splitText objectAtIndex:1], [splitText objectAtIndex:0]];
firstLabel=[[[UILabel alloc]initWithFrame:CGRectMake(10, 10, 300, 40)]autorelease];
firstLabel.tag =40; //This should be a constant probably
//firstLabel.font = [UIFont systemFontOfSize:[UIFont labelFontSize]];
firstLabel.text = contactText;
[firstLabel sizeToFit];
[cell.contentView addSubview:firstLabel];
sugarLabel = [[UILabel alloc] initWithFrame:
CGRectMake(10+firstLabel.frame.size.width+2, 10, 300, 60)];
sugarLabel.tag =40; //This should be a constant probably
//sugarLabel.font = [UIFont boldSystemFontOfSize:16];
sugarLabel.text = [sugar objectAtIndex:[indexPath row]];
[sugarLabel setHidden:YES];
[cell.contentView addSubview:sugarLabel];
NSString *result=[NSString stringWithFormat:@"%@ %@",firstLabel.text,sugarLabel.text];
cell.textLabel.text=result;
}
```


| Problem in UITableView custom cell | CC BY-SA 2.5 | 0 | 2010-08-23T17:58:31.730 | 2013-09-02T13:14:12.407 | 2010-08-24T03:36:13.053 | 420,556 | 420,556 | [
"iphone",
"objective-c",
"uitableview",
"uilabel"
] |
3,550,341 | 1 | 29,999,300 | null | 115 | 85,053 | How do I create a [Gantt chart](http://en.wikipedia.org/wiki/Gantt_chart) in R?
I'm looking for something sophisticated (looking more or less like this):

P.S. I could live without the dependency arrows.
| Gantt charts with R | CC BY-SA 4.0 | 0 | 2010-08-23T18:06:02.943 | 2022-03-30T11:59:09.563 | 2022-03-30T04:40:37.443 | 13,095,326 | 170,792 | [
"r",
"charts",
"gantt-chart"
] |
3,550,688 | 1 | 3,627,296 | null | 1 | 369 | It disappeared!

I'm using the standard ActivityDesigner w/Collapsible UI example:
```
<sap:ActivityDesigner
x:Class="WHATTHEEFF.WhaHappenToMe"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sap="clr- namespace:Blah blah standard stuff here"
Collapsible="True">
<sap:ActivityDesigner.Resources>
<DataTemplate
x:Key="DTC">
<TextBlock
Text="Collapsed" />
</DataTemplate>
<DataTemplate
x:Key="DTE">
<TextBlock
Text="Expanded" />
</DataTemplate>
<Style
x:Key="SC"
TargetType="ContentPresenter">
<Setter
Property="ContentTemplate"
Value="{DynamicResource DTC}" />
<Style.Triggers>
<DataTrigger
Binding="{Binding Path=ShowExpanded}"
Value="true">
<Setter
Property="ContentTemplate"
Value="{DynamicResource DTE}" />
</DataTrigger>
</Style.Triggers>
</Style>
</sap:ActivityDesigner.Resources>
<ContentPresenter
Content="{Binding}"
Style="{DynamicResource SC}" />
</sap:ActivityDesigner>
```
| Where'd my ActivityDesigner togglebutton go? | CC BY-SA 2.5 | null | 2010-08-23T18:45:55.320 | 2010-09-02T12:58:28.107 | null | null | null | [
"workflow-foundation-4",
"togglebutton",
"activitydesigner"
] |
3,550,911 | 1 | 3,550,930 | null | 2 | 393 | What's wrong - how can I find out what Eclipse doesn't like about my project?

As you can see it shows no errors in sources, no other errors, just the project. There is no tooltip telling me what's wrong. Can't see anything wrong on console either. Project builds fine with build.xml.
What the hell Eclipse wants from me and my project?
| Eclipse - what's wrong with the project | CC BY-SA 2.5 | null | 2010-08-23T19:17:01.323 | 2010-08-25T02:41:27.670 | null | null | 255,314 | [
"eclipse"
] |
3,551,052 | 1 | 3,551,388 | null | 2 | 2,848 | I'm working on a database for stat keeping for a sports club where I help administrate some events. I think I've got the parts for keeping track of the competitor names, classifications, categories, etc. figured out using a main table, several lookup tables and a couple bridge tables to cover the many-to-many relationships involved.
I have a model sketched out for the next part, but I'm not entirely comfortable that I'm doing it right. I know how we do it on paper and/or in a spreadsheet where I'm still doing a lot of manual work, but I'm not 100% confident I'm 'translating' it to tables and relations correctly.
A simple event structure might look like this:
```
Tournament
- Day 1
- Match 1 (Fired Match)
- Match 2 (Fired Match)
- Match 3 (Fired Match)
- Match 4 (Aggregate Match of 1,2,3)
- Day 2
- Match 5 (Fired Match)
- Match 6 (Fired Match)
- Match 7 (Fired Match)
- Match 8 (Aggregate Match of 5,6,7)
- Match 9 (Aggregate Match of 4,8)
```
I had broken things down a bit further and have tables for 'scores', 'stages', 'matches', and 'tournaments' (among others). The idea being that scores are the raw data I need to record for each competitor, with foreign keys to the 'competitor' and 'stages' table. Rather than having 'fired' and 'aggregate' matches, I decided to approach it as matches being aggregates of one or more stages, and tournaments can have one or more matches (aggregates).

I left out some of the lookup tables indicated by the other foreign keys since they don't directly relate to the matter at hand which I guess is "Is this the correct way to go about this, or would I be better off to skip the matches/stages separation? Would there be a way to reimplement this parent-child relationship between matches and stages in a single table via a self-join?
| Parent-child relationship: multiple tables vs. self-join | CC BY-SA 3.0 | 0 | 2010-08-23T19:38:17.680 | 2012-01-15T20:52:03.100 | 2012-01-15T20:52:03.100 | 894,284 | 359,030 | [
"sql",
"database",
"database-design",
"join",
"relationship"
] |
3,551,262 | 1 | 3,559,251 | null | 0 | 58 | What does mean this Reasharper error? I just upload project from svn repository.

| Resharper error | CC BY-SA 2.5 | null | 2010-08-23T20:08:23.270 | 2011-12-21T20:14:15.540 | 2011-12-21T20:14:15.540 | 3,043 | 290,082 | [
"visual-studio-2008",
"resharper",
"resharper-5.0"
] |
3,551,249 | 1 | 3,551,477 | null | 8 | 5,611 | I create a [wx.TextEntryDialog](http://www.wxpython.org/docs/api/wx.TextEntryDialog-class.html) as follows:
```
import wx
dlg = wx.TextEntryDialog(self, 'Rules:', 'Edit rules',
style=wx.TE_MULTILINE|wx.OK|wx.CANCEL)
dlg.SetValue(self.rules_text.Value)
if dlg.ShowModal() == wx.ID_OK:
…
```
This results in a dialog box that is too small for my needs, and that is not resizable:

My question is: I tried adding the flags `wx.DEFAULT_DIALOG_STYLE` and `wx.RESIZE_BORDER`, but that had no effect except to replace the text with dots:
```
dlg = wx.TextEntryDialog(self, 'Rules:', 'Edit rules',
style=wx.TE_MULTILINE|wx.OK|wx.CANCEL|wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
```

| How to make wx.TextEntryDialog larger and resizable | CC BY-SA 2.5 | 0 | 2010-08-23T20:07:28.763 | 2013-05-28T01:45:32.423 | null | null | 17,498 | [
"python",
"wxpython",
"wxwidgets"
] |
3,551,254 | 1 | 3,551,308 | null | 1 | 1,492 | 
I am trying to accomplish this with CSS. Here is my markup:
```
<h2>
<img src="A.gif" alt="A" width="30" height="30" />
<img src="B.gif" alt="B" width="30" height="30" />
18 pt; vertically centered;
</h2>
```
- `A``B`- - -
There is no chance the 18pt text will overflow the width of the container. Assume it will always be one line.
If more markup would help get the desired view, the markup can be modified.
How can this be accomplished?
| How to vertically center image and text in a block element? [CSS] | CC BY-SA 2.5 | null | 2010-08-23T20:07:44.303 | 2010-08-23T20:30:09.033 | 2010-08-23T20:15:52.363 | 184,600 | 184,600 | [
"html",
"css"
] |
3,551,367 | 1 | null | null | 0 | 304 | I've two tables, Profile and ProfileCategory
```
ProfileId INT IX
UserId UNIQUEIDENTIFIER PK (For one-to-one mapping with aspnet_membership)
CompanyName
Description
ProfileCategory
CategoryId
ProfileId
```
When I generate the code with PLINGO I get following errors
Operator '==' cannot be applied to operands of type 'int?' and 'System.Guid'
Operator '==' cannot be applied to operands of type 'int?' and 'System.Guid'
I dived into the generated code and the following..
```
[System.Diagnostics.DebuggerNonUserCode]
[System.CodeDom.Compiler.GeneratedCode("CodeSmith", "5.0.0.0")]
private void OnProfileList1Remove(Profile entity)
{
SendPropertyChanging(null);
var profileCategory = ProfileCategoryList.FirstOrDefault(c => c.CategoryId == CategoryId
&& c.ProfileId == entity.UserId);
ProfileCategoryList.Remove( profileCategory);
SendPropertyChanged(null);
}
```
So the generated code seems to want to compare the index and the primary key
I can manually alter the code but on regeneration it will be altered back.
Does anyone know why this is happening?
Thanks
Here is the profile snipet from the dbml
```
<Table Name="dbo.Profile" Member="Profile">
<Type Name="Profile">
<Column Name="UserId" Storage="_userId" Type="System.Guid" DbType="uniqueidentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
<Column Name="ProfileId" Storage="_profileId" Type="System.Int32" DbType="int NOT NULL IDENTITY" CanBeNull="false" />
<Column Name="CompanyName" Storage="_companyName" Type="System.String" DbType="nvarchar(250) NOT NULL" CanBeNull="false" />
<Column Name="Description" Storage="_description" Type="System.String" DbType="varchar(MAX)" CanBeNull="true" />
<Column Name="Services" Storage="_services" Type="System.Xml.Linq.XElement" DbType="xml" CanBeNull="true" UpdateCheck="Never" />
<Column Name="ContactDetails" Storage="_contactDetails" Type="System.Xml.Linq.XElement" DbType="xml" CanBeNull="true" UpdateCheck="Never" />
<Column Name="Attributes" Storage="_attributes" Type="System.Xml.Linq.XElement" DbType="xml" CanBeNull="true" UpdateCheck="Never" />
<Column Name="StateId" Storage="_stateId" Type="System.Int32" DbType="int NOT NULL" CanBeNull="false" />
<Column Name="Views" Storage="_views" Type="System.Int32" DbType="int NOT NULL" CanBeNull="false" />
<Association Name="User_Profile" Member="User" Storage="_user" ThisKey="UserId" Type="User" IsForeignKey="true" DeleteRule="CASCADE" />
<Association Name="Profile_ProfileAddress" Member="ProfileAddressList" Storage="_profileAddressList" OtherKey="UserId" Type="ProfileAddress" DeleteOnNull="false" />
<Association Name="Profile_Review" Member="ReviewList" Storage="_reviewList" ThisKey="ProfileId" OtherKey="ProfileId" Type="Review" DeleteOnNull="false" />
<Association Name="Profile_ProfileCategory" Member="ProfileCategoryList" Storage="_profileCategoryList" ThisKey="ProfileId" OtherKey="ProfileId" Type="ProfileCategory" />
</Type>
</Table>
<Table Name="dbo.ProfileCategory" Member="ProfileCategory">
<Type Name="ProfileCategory">
<Column Name="ProfileCategoryId" Storage="_profileCategoryId" Type="System.Int32" DbType="int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
<Column Name="ProfileId" Storage="_profileId" Type="System.Int32" DbType="int" CanBeNull="true" />
<Column Name="CategoryId" Storage="_categoryId" Type="System.Int32" DbType="int NOT NULL" CanBeNull="false" />
<Association Name="Category_ProfileCategory" Member="Category" Storage="_category" ThisKey="CategoryId" Type="Category" IsForeignKey="true" />
<Association Name="Profile_ProfileCategory" Member="Profile" Storage="_profile" ThisKey="ProfileId" OtherKey="ProfileId" Type="Profile" IsForeignKey="true" DeleteRule="CASCADE" />
</Type>
</Table>
```

| PLINQO Primary key AND index problem | CC BY-SA 2.5 | null | 2010-08-23T20:22:50.447 | 2010-08-24T07:54:14.417 | 2010-08-24T07:54:14.417 | 358,297 | 358,297 | [
"indexing",
"primary-key",
"codesmith",
"plinqo"
] |
3,551,438 | 1 | 3,551,485 | null | 2 | 376 | 
I hover over my menu and a submenu expands, then this bad boy comes accross the screen. Is there something I can do in my website to prevent this?
IE6
aspx
```
<%@ Page Title="" Language="C#" MasterPageFile="~/Templates/MyPage.master" AutoEventWireup="true"
CodeFile="Tasks.aspx.cs" Inherits="UI_MyPage_Tasks" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<table>
<tr valign="top">
<td>
<asp:Menu ID="menu1" runat="server" OnMenuItemClick="menu1_MenuItemClick" />
</td>
<td>
<cc:CustomUserControl ID="cuc1" runat="server" />
</td>
</tr>
</table>
```
aspx.cs
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VAC.Data;
public partial class UI_Patient_Tasks : BasePage
{
MyDB db = new MyDB();
private MenuItem UserRole1MenuItem { get { return GetMenu(Common.Role.UserRole1); } }
private MenuItem UserRole2MenuItem { get { return GetMenu(Common.Role.UserRole2); } }
private MenuItem GetMenu(string roleName)
{
int roleID = (from r in db.Roles where r.RoleName == roleName select r.RoleID).First();
MenuItem main = new MenuItem(roleName + " Menu");
foreach (CustomObject co in (from c in db.CustomObjects where c.RoleID == roleID orderby c.SortOrder select c))
main.ChildItems.Add(new MenuItem(co.Description, co.CustomObjectID.ToString()));
return main;
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
menu1.Items.Clear();
if (User.IsInRole(Common.Role.UserRole1))
menu1.Items.Add(UserRole1MenuItem);
if (User.IsInRole(Common.Role.UserRole2))
menu1.Items.Add(UserRole2MenuItem);
}
}
protected void menu1_MenuItemClick(object sender, MenuEventArgs e)
{
int id;
if (int.TryParse(e.Item.Value, out id))
{
cuc1.CustomObjectID = id;
}
}
}
</asp:Content>
```
| asp:Menu hover makes "Security Information" pop up, how do I fix? | CC BY-SA 2.5 | null | 2010-08-23T20:32:37.723 | 2010-10-29T21:43:57.730 | 2010-08-24T13:08:04.587 | 102,526 | 102,526 | [
".net",
"asp.net",
"internet-explorer-6",
"popup"
] |
3,551,489 | 1 | 3,551,505 | null | 2 | 226 | Google Code provides a barcode like this:

When you download software. What is its purpose ?
Edit: Now that I know its name, I found [this article](http://techcrunch.com/2010/04/07/google-continues-to-embrace-qr-codes-integrates-them-into-its-url-shortener/). Thanks!
| What is this image that Google code provides? | CC BY-SA 2.5 | null | 2010-08-23T20:38:13.217 | 2010-08-23T20:46:11.333 | 2010-08-23T20:46:11.333 | 77,779 | 77,779 | [
"checksum",
"google-code"
] |
3,551,631 | 1 | 3,552,214 | null | 1 | 159 | I will try my best to be both succinct and fully explanatory in this predicament.
On a site I manage, we allow a manager to view their "Recruiting Downline" which entails a list of all agents they personally recruited, as well as the recruits that particular agent (and so on and so on) brought to the Team.
For example:
- - - - -

In the database, every individual agent record has a field for 'referring agent', which lists their recruited agent.
- - -
While this functionality works great it is flawed for two reasons:
Because of the way our PHP scripts are built, we are unable to sort the commission level data as a whole. Example: Even as the top man and I can see everybody, sorting by 'commission level' sorts my immediate agents by the criteria, then their downline as an item, then continues the sort based on my criteria. This is difficult to understand so to demonstrate, assume the table below displays the 'commission level' for ALL agents:
- - - - - - - -
Note: an agent can NEVER recruit another agent at a higher level than they sit but they can recruit at ANY level below them (e.g. a 7 can recruit at 1,2,3,4,5,6 while a 3 can only recruit a 1,2).
## FROM MY (high level) perspective,
While it would make sense for the data to be 'sorted by commission level' as:
A, D, B, G, C, E, F, H - this is not the case.
Instead (view from top agent's perspective mind you) is:
A, D, G, H, C, B, E, F
basically, every while loop depends on the DIRECT upline agent number to determine who falls next in line.
I understand this is 'very' difficult to understand but let me know if I can provide any additional understanding into our current 'sort' issue.
| Sort by Referrer (quite complicated) | CC BY-SA 2.5 | null | 2010-08-23T20:55:48.647 | 2010-08-23T22:32:54.733 | 2010-08-23T21:10:46.510 | 127,724 | 337,690 | [
"php",
"mysql",
"sorting",
"hierarchy"
] |
3,552,162 | 1 | 3,552,287 | null | 0 | 1,233 | Short question: Given a point P and a line segment L, how do I find the point (or points) on L that are exactly X distance from P, if it guaranteed that there is such a point?
The longer way to ask this question is with an image. Given two circles, one static and one dynamic, if you move the dynamic one towards the static one in a straight line, it's pretty easy to determine the point of contact (see 1, the green dot).
Now, if you move the dynamic circle towards the static circle at an angle, determining the point of contact is much more difficult, (see 2, the purple dot). That part I already have done. What I want to do is, after determining the point of contact, decrease the angle and determine the new point of contact (see 3, 4, the red dot).
In #4, you can see the angle is decreased by less than half, and the new point of contact is half-way between the straight-line point and the original point. In #7, you can see the angle is bisected, but the new point of contact moves much farther than half way back towards the straight-line point.

In my case, I always want to decrease the angle to 5/6ths its original value, but the original angle and distance between the circles are variable. The circles are all the same radius. The actual data I need after decreasing the angle is the vector between the new center of the dynamic circle and the static circle, that is, the blue line in 3, 4, 6, and 7, if that makes the calculation any easier.
So far, I know I have to move the dynamic circle along the line that the purple circle is a center of, towards the center of the static circle. Then the circle has to move directly back towards the original position of the dynamic circle. The hard part is knowing exactly how far back it has to move so that it's just touching the other circle.
| Rotate a circle around another circle | CC BY-SA 2.5 | 0 | 2010-08-23T22:21:51.267 | 2010-08-23T23:14:26.257 | null | null | 36,007 | [
"language-agnostic",
"math",
"trigonometry"
] |
3,552,313 | 1 | 3,552,377 | null | 0 | 2,223 | I have a problem executing a stored procedure in Silverlight 4/RIA. The only value I get back is null. Am I doing my client and server side code wrong?
```
public ZipCodesDomainContext _ZipcodesDomainContext = new ZipCodesDomainContext();
/// <summary>
/// Creates a new <see cref="MainPage"/> instance.
/// </summary>
public MainPage()
{
InitializeComponent();
this.loginContainer.Child = new LoginStatus();
LoadCity();
}
private void LoadCity()
{
txtCity.Text = _ZipcodesDomainContext.GetCityByZip(42071).Value;
}
```
```
public string GetCityByZip(int pZip)
{
return ObjectContext.sp_GetCityByZip(pZip).ToString();
}
```

```
USE [ZIPCODES]
GO
/****** Object: StoredProcedure [dbo].[sp_GetCityByZip] Script Date: 08/23/2010 13:48:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[sp_GetCityByZip]
@ZIP int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT City FROM ZipCodes WHERE Zip = @ZIP
END
```
| Silverlight 4: Running a stored procedure which returns a string | CC BY-SA 2.5 | null | 2010-08-23T22:52:18.337 | 2010-08-23T23:34:57.953 | null | null | 271,977 | [
"sql-server",
"stored-procedures",
"silverlight-4.0",
"c#-4.0",
"wcf-ria-services"
] |
3,552,467 | 1 | null | null | 5 | 1,706 | I have recently wired up my application to use the Facebook iOS SDK ([http://github.com/facebook/facebook-ios-sdk](http://github.com/facebook/facebook-ios-sdk)). The integration works fine, but the pages loads really slow. It takes really a long time to load the login screen. Login action takes more than 10-60 seconds.
I didn't have this problem with [Facebook Connect](http://developers.facebook.com/blog/post/108). Am I missing something? Is there a way to optimize this?
I did scan the activity through HTTP Scoop over Wi-Fi which revealed something interesting, there are some .js and .css files that are taking a lot of time in the new Facebook iOS SDK (login.php, ar7ed2ft.css, 4wj242ne.js, abl6sgyy.js,) where as the old one was zippy. How to let Facebook know about it?
New Facebook iOS SDK

Old Facebook Connect

| Facebook iOS SDK too slow | CC BY-SA 2.5 | null | 2010-08-23T23:29:55.457 | 2011-01-03T03:06:05.787 | 2011-01-03T03:06:05.787 | 63,550 | 115,278 | [
"iphone",
"facebook",
"ios"
] |
3,552,682 | 1 | 3,553,784 | null | 2 | 682 | I am writing an app for my iPad running 3.2.2 with XCode 3.2.3. It seems that the highest version of the iOS for iPad this version of XCode has is 3.2, but other apps load fine onto the phone so this doesn't seem to be an issue. I am attempting to make use of the new UITextChecker class. I have imported UIKit, and UITextChecker.h appears in the headers folder under the UIKit.framework icon. However, when I try to compile this code:
```
NSString *theLanguage = [[UITextChecker availableLanguages] objectAtIndex:0];
```
or simply this:
```
UITextChecker *textChecker;
```
XCode tells me that UITextChecker is undeclared. Any ideas what it going on here? Thanks!
James
Here is a picture of the UIViewController's header file:

| XCode doesn't recognize UI Class UITextChecker | CC BY-SA 2.5 | null | 2010-08-24T00:19:39.323 | 2010-08-24T06:03:59.897 | 2010-08-24T00:44:32.830 | 261,540 | 261,540 | [
"iphone",
"uikit",
"uitextfield"
] |
3,552,763 | 1 | 3,552,781 | null | 57 | 15,580 | I would like to understand why you might want to use the `global::` prefix. In the following code, ReSharper is identifying it as redundant, and able to be removed:

| Why use the global keyword in C#? | CC BY-SA 3.0 | 0 | 2010-08-24T00:39:46.070 | 2016-01-08T21:30:44.137 | 2017-02-08T14:30:13.520 | -1 | 402,098 | [
"c#",
".net",
"namespaces",
"global"
] |
3,552,819 | 1 | 3,552,832 | null | 1 | 163 | So this might be dumb, but I can't get anything to insert into a MySQL on a certain account, and I've been staring at this for two hours. I'm a newbie to PHP, so I could very well be doing something dumb. I attached a screen shot of the DB I am trying to INSERT INTO.
Here is what I'm talking about:
 (imgur seems to be down for me)
Here's the code I have, and PhpMyAdmin told me GRANT ALL PRIVILEGES ON TO ...
```
$fbFirstName = $me['first_name'];
$fbLastName = $me['last_name'];
$fbEmail = $me['email'];
mysql_real_escape_string($fbFirstName,$fbLastName,$fbEmail);
$getuserresult = mysql_query("SELECT * FROM newusers WHERE fbUID=$uid");
$userrowsreturned=mysql_num_rows($getuserresult);
if ($userrowsreturned=0)
{
echo '<br />user already exists, will update something here eventually<br />';
}
else {
$sql = mysql_query("INSERT INTO newusers (fbUID,callsAttempted,callsMade,fbEmail,fbFirstName,fbLastName) VALUES ($uid,'1','0',$fbEmail,$fbFirstName,$fbLastName)");
if(!$sql) {
die("Nope");
} else {
echo "1 record added";
}
echo '<br />created user<br />';
}
```
| Why can't I INSERT INTO? | CC BY-SA 3.0 | null | 2010-08-24T00:53:40.783 | 2013-07-18T20:29:05.633 | 2013-07-18T20:29:05.633 | 1,446,005 | 428,987 | [
"php",
"mysql",
"insert"
] |
3,553,110 | 1 | null | null | 0 | 1,155 | I have a site on my server that only works with a www.
example:
[http://www.dartmouthplayers.ns.ca/](http://www.dartmouthplayers.ns.ca/)
works but without it, it does not.
[http://dartmouthplayers.ns.ca/](http://dartmouthplayers.ns.ca/)
But the site's bindings has both listed:

and the DNS has the blank host record:

What did I not set right?
It's odd because:
[http://dartmouthplayers.ns.ca/](http://dartmouthplayers.ns.ca/) - returns a 500 error
and [http://randomtexthere.dartmouthplayers.ns.ca/](http://randomtexthere.dartmouthplayers.ns.ca/) - returns a server not found error
thanks!
| windows 2008 DNS Website without www? | CC BY-SA 2.5 | 0 | 2010-08-24T02:12:43.307 | 2010-09-26T09:52:47.770 | null | null | 87,302 | [
"windows",
"iis-7",
"dns"
] |
3,553,240 | 1 | null | null | 0 | 378 | I was reading this paper ["Ropes: an Alternative to Strings"](http://www.cs.ubc.ca/local/reading/proceedings/spe91-95/spe/vol25/issue12/spe986.pdf) about [ropes](http://en.wikipedia.org/wiki/Rope_(computer_science))

[[the same paper](http://www.cs.ubc.ca/local/reading/proceedings/spe91-95/spe/vol25/issue12/spe986.pdf)]
and I was wondering if that is the data structure used by today's browsers to implement textboxes or not. Do we use ropes or some other data structures for this?
Are ropes used somewhere besides textboxes?
---
The previous title of my question somehow also meant that I wanted to know how the string "remembering" happens - as I type, I get suggestions. I have changed it now.
| How is the data stored in a textbox? | CC BY-SA 2.5 | null | 2010-08-24T02:52:11.570 | 2010-08-25T09:42:36.353 | 2010-08-25T09:42:36.353 | 113,124 | 113,124 | [
"algorithm",
"data-structures",
"text",
"string",
"ropes"
] |
3,553,331 | 1 | 3,553,343 | null | 1 | 7,974 | i have the different image with the different size too, i want to put it in cell.imageView.image in every cell, but i want make same size in every cell although the image have the different size, i write this on my code :
```
UIImage *image = [UIImage imageNamed:imageName];
cell.imageView.image = image;
cell.imageView.layer.masksToBounds = YES;
cell.imageView.layer.cornerRadius = 5.0;
float sw=image.size.width/cell.imageView.image.size.width;
float sh=image.size.height/cell.imageView.image.size.height;
cell.imageView.transform=CGAffineTransformMakeScale(sw, sh);
```
but it doesn't work, i'am sure that's right..
any body can help me.??
| resize cell.UIImageView.image | CC BY-SA 2.5 | 0 | 2010-08-24T03:16:34.983 | 2013-07-26T09:54:45.683 | 2010-08-24T09:45:15.637 | 408,434 | 408,434 | [
"iphone",
"uitableview"
] |
3,553,786 | 1 | 3,553,814 | null | 3 | 442 | No foreign keys defined in the database. So I've setup associations.
problem: can't seem to be able to reference the Role table as expected:
I can get as far as u.UserNamesInRole then can't make the jump to role table.
```
IEnumerable<fmwebapp1.Old_App_Code.TelerikUsersDataContext.User> userList = (from u in dbTelerik.Users
where u.UsersInRoles.Role.Name = "admin"
select u.UsersInRoles);
```

| LINQ to SQL - No Foreign Keys | CC BY-SA 2.5 | 0 | 2010-08-24T05:28:52.370 | 2010-08-24T05:42:54.410 | null | null | 26,086 | [
"c#",
"linq-to-sql"
] |
3,553,995 | 1 | 3,554,006 | null | 4 | 9,600 | I'm trying to run eclipse for java in Windows 7 64bit edition, and when I run the eclipse.exe file, absolutely nothing happens. A ephimeral javaw.exe process is created in the task manager, but as I said, it's just there for a split second, and it disappears, after that NOTHING. I tried compiling a small program with the javac.exe file, and that works all right, but for some reason I cannot run Eclipse.
Any suggestions on what I could be doing wrong. I'm a complete Java noob, it's the first time I try to do this.
These are the files I have, and I downloaded the Windows 64bit version of eclipse.

Thanks!
OK, solved. The book I'm using is misleading... it said I should use the javaw.exe file from jdk1.6.0_21, and doing that didn't work. Now I tried with one in jre6, and it ran.
Thanks everyone and sorry for the hassle!
| Run eclipse on windows 7 64 bit | CC BY-SA 2.5 | 0 | 2010-08-24T06:30:48.103 | 2014-05-09T19:43:41.030 | 2010-08-24T06:45:01.673 | 62,642 | 62,642 | [
"java",
"eclipse"
] |
3,554,276 | 1 | 3,555,499 | null | 0 | 227 | Hi all i have my main form as MDI form on this form i am having data grid view. Now form selecting an option from file menu i am loading a child form and i set the property
```
startposition=center
```
It is getting loaded but some part of the form is getting loaded below the data grid view how to over come this . A sample form is attached below 
| Load the child form on the top of the control | CC BY-SA 2.5 | null | 2010-08-24T07:25:04.190 | 2010-08-24T10:32:37.327 | null | null | 388,388 | [
"c#",
"desktop-application"
] |
3,554,476 | 1 | 3,940,457 | null | 0 | 597 | What could be the reason for not showing any urls to html files while debugging the GWT project? The tab is empty, it is not possible to debug any of the pages that are stored in 'war' directory.

I guess it is all about the configuration. Thank you for any hints on how to fix that.
| GWT - no urls in development mode tab | CC BY-SA 2.5 | null | 2010-08-24T07:55:01.290 | 2010-10-15T08:01:40.443 | 2010-08-24T08:08:51.230 | 171,375 | 171,375 | [
"debugging",
"gwt",
"configuration"
] |
3,554,645 | 1 | 3,574,182 | null | 1 | 1,658 | Hi I have a TreeView which is filled with a hierarchicaldatatemplate
```
<TreeView Name="DokumentBrowser" ItemTemplate="{StaticResource HierachrTree}"
<HierarchicalDataTemplate x:Key="HierachrTree"
DataType="{x:Type src:Ordner}"
ItemsSource="{Binding UnterOrdner}">
<TextBlock Text="{Binding OrdnerName}"/>
</HierarchicalDataTemplate>
```
The Class which is used to get the Objects looks like this
```
#region OrdnerClass
public class OrdnerListe : ObservableCollection<Ordner>
{
protected override void InsertItem(int index, Ordner item)
{
base.InsertItem(index, item);
this[index].PropertyChanged += new PropertyChangedEventHandler(OrdnerListe_PropertyChanged);
}
void OrdnerListe_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
OnCollectionChanged(new NotifyCollectionChangedEventArgs(
NotifyCollectionChangedAction.Reset));
}
}
public class Ordner : INotifyPropertyChanged
{
#region fields
private string _name, _path; //Ordnername
private Ordner _pordner; //Parent Ordner Objekt
private OrdnerListe _uordner; //Liste aus Ordner Objekten
private File_Liste _filename; // Liste der Dateien die in einem Ordner Liegen
#endregion
#region INotifyPropertyMember
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(string info)
{
if (PropertyChanged != null)
{
PropertyChanged(this,new PropertyChangedEventArgs(info));
}
}
#endregion
#region konstruktor
public Ordner()
{
_uordner = new OrdnerListe();
_filename = new File_Liste();
}
#endregion
#region properties
public string OrdnerName
{
get { return _name; }
set
{
if (value != this._name)
{
this._name = value;
NotifyPropertyChanged("OrdnerName");
}
}
}
public string OrdnerPfad
{
get { return _path; }
set
{
if (value != this._path)
{
this._path = value;
NotifyPropertyChanged("OrdnerPfad");
}
}
}
public Ordner ParentDir
{
get { return _pordner; }
set
{
if (value != this._pordner)
{
this._pordner = value;
NotifyPropertyChanged("ParentDir");
}
}
}
public OrdnerListe UnterOrdner
{
get { return _uordner; }
set
{
if (value != this._uordner)
{
this._uordner = value;
NotifyPropertyChanged("UnterOrdner");
}
}
}
public File_Liste FileName
{
get { return _filename; }
set
{
if (value != this._filename)
{
this._filename = value;
NotifyPropertyChanged("FileName");
}
}
}
#endregion
}
#endregion
```
It is filled with folders and their subfolders. For Example when the root folder has 2 subfolders and they have 2 subfolders it will look like this 
When i now add files or folders through some methods i want to add the new filenames or Ordner objects to my collection. How can i find the position where the SelectedItem from the TreeView is?
Im Buffering the SelectedItem from the TreeView `selectedOrdner = (Ordner)DokumentBrowser.SelectedItem;` every time when it changed and add to this item the new filenames or Ordner Objects.
How can I now throw the new Item to the right position in my list ? or update the old with the new values.
Do I always have to go recursive through my list to find the Object where im momentarily? or exists there a better and easier way?
--- edit
changed my Ordner Class implemented an observable collection und save the Object that is the root node of the nodes that it holds so i can remove them. its maybe not the best solution but it works fine for me
| C# WPF treeview filled with recursive built list<> add item at position | CC BY-SA 2.5 | 0 | 2010-08-24T08:21:42.280 | 2010-09-03T08:34:12.550 | 2010-09-03T08:34:12.550 | 424,226 | 424,226 | [
"c#",
"wpf",
"list",
"recursion",
"selecteditem"
] |
3,554,769 | 1 | null | null | 3 | 517 | My iPhone app (created under iOS2), has a strange behavior.
The left arrow is not aligned with other controls (on both iOS3 and 4)
My other apps work fine...
Does someone have any idea ?

: That bug appear with all iPhone in my company, and in all iPhone in my customer's company (both compiled on many computers or distributed via adHoc)
: The app is now on the appStore without this problem... Really strange...
| MPMoviePlayerController - Controls are not aligned | CC BY-SA 2.5 | 0 | 2010-08-24T08:41:18.503 | 2010-10-13T09:03:58.193 | 2010-10-13T09:03:58.193 | 65,500 | 65,500 | [
"iphone",
"ios4",
"ios",
"mpmovieplayercontroller",
"ios3.0"
] |
3,554,973 | 1 | 3,555,241 | null | 0 | 80 | Hi all i will have some data in my datagrid as follows
Now if i click on first column on any cell i would like to show a from, and if i click on 2nd row on any cell value i would like to show another form. How can i do this...
| How could i load a form corresponding to the cell clicked in datagrid | CC BY-SA 2.5 | 0 | 2010-08-24T09:09:22.510 | 2010-08-24T09:46:59.313 | null | null | 388,388 | [
"c#",
"datagridview",
"desktop-application"
] |
3,555,343 | 1 | 3,555,430 | null | 11 | 3,118 | I have to make 2d triangles from a list of 2d points with a condition: length of any edge can't be longer than a predefined constant.
Something like this:

Do you know any algorithm that can do this? Or any advise?
Thanks!
| Create 2d triangles from 2d points | CC BY-SA 2.5 | 0 | 2010-08-24T10:05:42.790 | 2016-10-24T15:35:46.647 | 2015-08-30T08:34:46.997 | 4,099,593 | 374,727 | [
"algorithm",
"graphics"
] |
3,555,432 | 1 | 3,555,626 | null | 4 | 2,520 | 
As you can see from the attached image the CPU graph on my dual core machine is weirdly symmetrical!
Is this some sort of load balancing to prevent one core being used more than the other? What are the reasons behind it (heat distribution maybe)?
Of course my main concern: is my single thread PSNR image algorithm achieving 100%?
CPU is Core 2 Duo E6850 3Ghz running Ubuntu 10.4.
Thanks
Ross
| Multi core CPU single thread behaviour, not achieving 100% | CC BY-SA 2.5 | null | 2010-08-24T10:19:51.060 | 2010-08-24T12:58:27.740 | 2010-08-24T12:58:27.740 | 429,383 | 429,383 | [
"multithreading",
"multicore"
] |
3,556,068 | 1 | 3,556,097 | null | 0 | 140 | ```
<td>
<form name="search_form" action="" method="POST">
<input type="text" name="search_text">
<input type="submit" name="search_bt" value="Go">
</form>
</td>
```
now when ever we use this code it adds an extra line after it ends.... see the image below
 see the red boxed area... there is nothing there... nothing but that space is added for no reason by the
BUT... BUT.. if i use the code like this
```
<form name="search_form" action="" method="POST">
<td>
<input type="text" name="search_text">
<input type="submit" name="search_bt" value="Go">
</td>
</form>
```
everything is fine... the space disappears..
| HTML Forms Problem - Adds a line after it ends | CC BY-SA 2.5 | null | 2010-08-24T11:47:21.317 | 2010-08-24T11:57:13.443 | 2010-08-24T11:51:07.893 | null | 158,455 | [
"html",
"forms",
"formatting"
] |
3,556,336 | 1 | 3,560,635 | null | 11 | 11,841 | As a follow-up to the question ["Get resultset from oracle stored procedure"](https://stackoverflow.com/questions/1170548/get-resultset-from-oracle-stored-procedure), is there a way to show the results of a stored procedure that returns a `REFCURSOR` in a grid (instead of the plain text Script Output window) within SQL Developer?
The answer helped, but I'm still having a problem displaying the result set in the "View Value" window:

The columns can only be expanded a small amount, probably due to the number of results being returned. Expanding the window with the resizer control doesn't help:

| Oracle SQL Developer: Show REFCURSOR Results in Grid? | CC BY-SA 2.5 | 0 | 2010-08-24T12:22:24.167 | 2010-08-25T13:05:45.853 | 2017-05-23T12:07:16.513 | -1 | 6,173 | [
"oracle",
"stored-procedures",
"oracle-sqldeveloper"
] |
3,556,561 | 1 | 3,578,555 | null | 1 | 499 | is there any documentation available to build Flot graph similar to what we can find in the Stack Overflow [profile/reputation](https://stackoverflow.com/users/341106?tab=reputationhistory#tab-top) tab?
from the source code I can see that data is queried at this address: `/users/rep-graph/341106/" + ranges.xaxis.from.toFixed(1) + "/" + ranges.xaxis.to.toFixed(1)` but I don't know the values `from` and `to` fields can accept.
:

In this graph, we can see that two points are highlighted, and the result is that two are listed on the side, which means that the plotted values are linked with .
However, if I consider pkh's example, only the (and a label) are provided to Flot:
```
label: "United States",
data: [[1990, 18.9], [1991, 18.7] ....
```
So I'd like to see:
1. how to link data with points
2. how to update a panel according to graph selection [but maybe this part is not actually done by Flot itself]
| Documentation for Stack Overflow reputation graph (Flot) | CC BY-SA 3.0 | null | 2010-08-24T12:50:02.353 | 2015-03-08T20:47:38.293 | 2017-05-23T12:07:06.850 | -1 | 341,106 | [
"javascript",
"flot",
"graphing",
"stackexchange-api"
] |
3,556,742 | 1 | 3,556,993 | null | 0 | 528 | In my site, I have two divs - right and left. Both are contained within a wrapper div. Here is my code:
```
#wrapper{
width:1000px;
height:750px;
margin:auto;
}
#left{
width:500px;
height:750px;
float:left;
position:relative;
}
#right{
width:500px;
height:750px;
float:right;
position:relative;
}
```
In Chrome, no problem.
In Firefox, no problem.
In Safari, no problem.
In Opera, no problem
In IE, the #right div is in the same location horizontally, but vertically it's below the #left div.
I've tried a few different techniques to remedy this. Setting the wrapper line height to 0, setting the right display to inline, reducing the size of the right and left divs (I thought maybe there was a margin/padding issue). I've run out of ideas now, can anybody offer any help of the issue?
In All Browsers (except IE):

In IE:

| Really Frustrating CSS Stepdown in IE | CC BY-SA 2.5 | null | 2010-08-24T13:12:53.087 | 2010-08-24T13:35:48.000 | null | null | 418,146 | [
"css",
"internet-explorer"
] |
3,556,946 | 1 | 3,557,099 | null | 6 | 1,121 | I was searching about over internet and found out some graphs  [slides 3-4](http://www.sics.se/~joe/talks/ll2_2002.pdf) in one of the talk given by . They shows a . Can anybody tell me the reason behind such difference?
| Why Erlang process creation and message passing time less than java and C# | CC BY-SA 2.5 | 0 | 2010-08-24T13:31:51.863 | 2010-08-24T13:46:37.650 | null | null | 362,250 | [
"process",
"erlang"
] |
3,557,310 | 1 | 3,566,531 | null | 2 | 641 | The task is relatively straightforward:
A Drupal website displays a list of articles with thumbnails. Some visitors would like to view it without images by clicking on a button/link and have that preference saved.
e.g. [http://patterntap.com/collections/index/](http://patterntap.com/collections/index/)

The problem is all visitors are anonymous and given certain traffic, page cache is enabled.
My idea was to use some simple JavaScript to set a cookie, refresh the page and depending on the cookie values (or its presence/absence) display or hide the images.
Except Drupal serves cached pages quite early and the only quick way to modify the cached version that I could find is by hacking includes/bootstrap.inc and add a custom class to the body classes then hide the images with css.
A very wrong approach, I know. But I wonder if there is a way to save different versions of a page and serve the correct version?
Edit:
- - - `hook_boot()`-
Edit/solution:
In the end went with Rimian's suggestion. But it is possible to accomplish the task using our own cache.inc implementation as seen in the [Mobile Tools](http://drupal.org/project/mobile_tools) module. Specifically, by extending cache.inc and updating settings.php to include
```
$conf['page_cache_fastpath'] = FALSE;
$conf['cache_inc'] = 'path/to/my/module/my_module_cache.inc';
```
| How to serve different cached versions of a page depending on a cookie in Drupal? | CC BY-SA 2.5 | 0 | 2010-08-24T14:07:38.220 | 2011-02-22T16:02:09.927 | 2011-02-22T16:02:09.927 | 201,316 | 201,316 | [
"drupal",
"caching",
"cookies",
"drupal-6"
] |
3,557,662 | 1 | 3,557,795 | null | 4 | 5,979 | I'm trying to make a pattern in a layout (see attachment for visualisation)
The problem is that using :odd :even doesnt work.
I've tried to make it work by using "for loops", and if statements, but obviously jquery doesn't do this stuff in that way. Or maybe i'm supposed to do it outside the document ready statement? I tired that to but it just doesnt work.
How does one go about that?
EDIT: These squares are max 8 on a page and generated in Wordpress, each square being a post. So I'm not able to divide things into rows as suggested unfortunately.
css:
```
.thumb_container {
width:274px;
height: 274px;
float: left;
position: relative;
background-color: white;
}
.thumb_container:nth-child(4n+1) { clear:both; background-color: green } /* green just to see if its working */
```
Jquery tweek file ([http://baked-beans.tv/bb/wp-content/themes/bakedbeans/js/jquery.site.tweeks.js](http://baked-beans.tv/bb/wp-content/themes/bakedbeans/js/jquery.site.tweeks.js))
```
$(".thumb_container:nth-child(8n+2), .thumb_container:nth-child(8n+4), .thumb_container:nth-child(8n+5), .thumb_container:nth-child(8n+7)")
.css({"background-color":"#333333"});
```
[HTML](http://baked-beans.tv/bb/) Click HTML for link

| Jquery - How to alternate an :Odd :Even pattern every 4 <Divs>? | CC BY-SA 2.5 | 0 | 2010-08-24T14:41:04.240 | 2014-06-03T15:54:13.730 | 2010-08-24T16:26:06.950 | 394,117 | 394,117 | [
"jquery",
"css",
"layout",
"grid",
"for-loop"
] |
3,557,724 | 1 | 3,557,914 | null | 3 | 7,094 | I've read a bunch of previous posts dealing with the padding problem I'm experiencing between IE8 and earlier versions (IE7,6). I already tried resetting my CSS as mentioned previously, but no luck. Any help would be greatly appreciated. Thanks in advance!
The issue is best illustrated with screenshots (see below), but in the css I've attached, I'm fairly certain the problem resides somewhere in the padding in header_left and header_center, which is not properly reflected in IE6/7. My totally widths of the site always add up to 980px, so my math is ok...


```
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>Application Form</title>
<link href="xyx.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#999999">
<div class="wrapper">
<div class="header_separator"></div>
<div class="header_left"></div>
<div class="header_center">
<h2> Lorem ipsum dolor sit amet</h2>
<h2> consectetur adipiscing elit </h2>
<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a nulla at nunc iaculis pretium. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse pellentesque dui quis urna volutpat a posuere nibh imperdiet.</p>
</div>
<div class="header_right"></div>
<div class="header_separator">
<hr align="center" color="#00B050" size="5">
</div>
<div class="body_left">
<h3> Lorem ipsum dolor:</h3>
<ul class=noBulletIndent>
<li> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a nulla at nunc iaculis pretium. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse pellentesque dui quis urna volutpat a posuere nibh imperdiet. Donec eu tellus eu augue pellentesque venenatis ac v</li>
</ul>
</div>
<div class="body_right">
<form action="insert.php" method="post">
<table width="630" border="0" cellspacing="0" cellpadding="0">
<tr height=40 valign="top">
<td width="200"><p><strong>Company Name:</strong></p></td>
<td width="430"><input name="companyname" type="text" id="companyname" size="40" /></td>
</tr>
<tr height=40 valign="top">
<td width="200"><p><strong>Company Website:</strong></p></td>
<td width="430"><input name="website" type="text" id="website" size="40" /></td>
</tr>
<tr height=125 valign="top">
<td width="200"><p><strong>Company Description:</strong></p></td>
<td width="430"><textarea name="description" id="description" rows="6" cols="40"></textarea></td>
</tr>
<tr height=40 valign="top">
<td width="200"><p><strong>Primary Contact Person:</strong></p></td>
<td width="430"><input name="contactperson" type="text" id="contactperson" size="40" /></td>
</tr>
<tr height=40 valign="top">
<td width="200"><p><strong>Contact Person Email:</strong></p></td>
<td width="430"><input name="contactemail" type="text" id="contactemail" size="40" /></td>
</tr>
<tr height=40 valign="top">
<td width="200"><p><strong>Contact Person Phone:</strong></p></td>
<td width="430"><input name="contactphone" type="text" id="contactphone" size="40" /></td>
</tr>
<tr>
</table>
<table width="630" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="300">
<?php
require_once('recaptchalib.php');
$publickey = "xyz";
echo recaptcha_get_html($publickey);
?>
</td>
<td width="330" align="left" valign="bottom">
<input type="image" name="submit_acre" id="submit_acre" src="images/acre_submit.png" />
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>
```
```
@charset "utf-8";
/* CSS Document */
.mainbody{
margin-left: auto;
margin-right: auto;
width:980px;
word-spacing: normal;
}
.wrapper {
height: 100%;
width: 980px;
margin-right: auto;
margin-left: auto;
}
.header_separator {
background-color: #FFF;
height: 10px;
width: 980px;
float: left;
vertical-align: middle;
}
.header_left {
background-color:#FFF;
height:122px;
width:110px;
float: left;
vertical-align: middle;
padding-left: 10px;
}
.header_center {
background-color: #FFF;
height: 122px;
width: 630px;
float: left;
font-family: arial;
vertical-align: top;
text-align: left;
padding-left: 10px;
padding-right: 10px;
}
.header_right {
background-color: #FFF;
height: 122px;
width: 210px;
float: left;
vertical-align: middle;
}
.body_left{
background-color:#FFF;
height:490px;
width:300px;
float:left;
font-family: arial;
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
}
.body_right{
background-color:#FFF;
height:490px;
width:650px;
float:left;
padding-top: 10px;
padding-left: 10px;
}
.noBulletIndent {
padding: 0px;
margin-left: 12px;
margin-top: 0px;
}
p {
margin: 0px;
padding: 0px;
font-family: Arial;
font-size: 14px;
}
h2 {
margin: 0px;
padding: 0px;
font-family: arial;
}
h3 {
margin: 0px;
padding: 0px;
font-family: arial;
font-size: 15px;
}
li {
margin: 0px;
padding: 0px;
font-size: 14px;
margin-left: 4px;
}
```
| Padding issues IE8 v IE7 | CC BY-SA 2.5 | null | 2010-08-24T14:47:10.680 | 2010-08-24T15:39:18.513 | 2010-08-24T15:01:03.710 | 387,049 | 387,049 | [
"css",
"internet-explorer-8",
"internet-explorer-7",
"padding",
"ie8-compatibility-mode"
] |
3,557,931 | 1 | 3,575,158 | null | 0 | 4,303 | I need for my shop up to 4 decimal points. So far I followed some tuts and theyre working fine in front & backend for products. Only in sales/invoice prices,tax and totals are still rounded to 2 decimal points.
I've edited/overwrote following files:
```
\app\code\local\Mage\Adminhtml\Block\Catalog\Product\Edit\Tab\Options\Option.php
```
> somewhere around line 283 i changed `return number_format($value, 2, null, '');` in `return number_format($value, 4, null, '');`
```
\app\code\local\Mage\Adminhtml\Block\Catalog\Product\Helper\Form\Price.php
```
> \app\code\local\Mage\Core\Model\Store.php* changed output of
function `roundPrice()` line 740 into `return round($price, 4);`\app\code\local\Mage\Directory\Model\Currency.php in function
`format()` changed `formatPrecision` from 2 to 4 in line 197.\lib\Zend\Currency.php `$_options['precision']` changed from 2 to 4\app\design\adminhtml\default\default\template\catalog\product\edit\price\tier.phtml
`echo sprintf('%.2f', $_item['price']);` changed to `sprintf('%.4f', $_item['price'])`
Ive looked into some core files like invoice.php or in adminhtml files if there are rounding stuff. But I couldnt find anything useful.
```
used extensions: (Magento 1.4.1.0)
Asperience_DeleteAllOrders
Flagbit_ChangeAttributeSet
Mxperts_Invoice
de_DE languagepack
```
thanks, greetz Rito

| Magento - decimal points in invoice/be | CC BY-SA 4.0 | null | 2010-08-24T15:09:58.913 | 2019-08-26T11:10:51.040 | 2019-08-26T11:10:51.040 | 9,445,441 | 381,232 | [
"php",
"magento",
"decimal-point"
] |
3,558,150 | 1 | 3,558,159 | null | 1 | 256 | I can create objects of each table in my database, so the .edmx file is doing it's job.
Why can't I create a new dbEntEntities (intellisense only pops up dbNull) object of the .edmx file?
Thanks!

| Cannot create an Entities object, but can access generated classes - why? | CC BY-SA 2.5 | null | 2010-08-24T15:32:39.907 | 2010-08-24T15:40:12.913 | null | null | null | [
"c#",
"entity-framework"
] |
3,558,374 | 1 | 3,558,766 | null | 1 | 131 | I have a DataGrid that is setup like this:
```
<DataGrid
AutoGenerateColumns="True"
GridLinesVisibility="Horizontal"
IsReadOnly="True"
ItemsSource="{Binding Documents}"
SelectionMode="Single"
SelectionUnit="FullRow"
/>
```
Can somebody point me in the right direction for making the UI look as though the entire row is selected, by not highlighting the cell that is clicked?

| Don't highight selected cell when user clicks in a data grid row | CC BY-SA 2.5 | null | 2010-08-24T15:54:35.140 | 2010-08-24T17:01:07.133 | null | null | 373,521 | [
"c#",
".net",
"wpf",
"datagrid"
] |
3,558,633 | 1 | 3,558,676 | null | 3 | 13,221 | I have two tables: members and renewals
The two tables have a field called memberid which links the two data tables together. I am trying to construct a query which will extract the firstname and surname from the members table for the data that is being held in the renewals table. I have tried using the query below which is based on some examples I've looked up.
```
SELECT members.memberfirst, members.membersurname, members.memberid, renewals.account_name, renewals.memberid
FROM members, renewals
WHERE renewals.memberid=members.memberid
```
The error I get when trying to run this in phpMyAdmin:
```
#1267 - Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
```

| Join query in MySQL | CC BY-SA 2.5 | null | 2010-08-24T16:24:17.293 | 2016-05-26T17:12:39.180 | 2012-02-27T04:20:59.297 | 135,152 | 1,389,526 | [
"mysql",
"phpmyadmin",
"mysql-error-1267"
] |
3,559,155 | 1 | 3,559,237 | null | 4 | 1,653 | What is the purpose of having two files that appear to do the same/similar thing? Is one deprecated and should I be using the other? Please, break it down for me.
Thanks!


| What is the difference between an "Application Configuration File" & "Settings File" in C#? | CC BY-SA 2.5 | 0 | 2010-08-24T17:23:22.653 | 2010-08-24T17:32:11.933 | 2010-08-24T17:32:11.933 | 38,206 | 402,706 | [
"c#",
".net",
"configuration",
"app-config"
] |
3,559,620 | 1 | 3,559,643 | null | 1 | 2,846 | Why does the following code not work?
```
#include <iostream>
#include <string>
int main(){
char filename[20];
cout << "Type in the filename: ";
cin >> filename;
strcat(filename, '.txt');
cout << filename;
}
```
It should concatenate on the end of whatever filename is inputted
Also, when I try to compile it (with g++) this is the error message

| C++ concatenate string problem | CC BY-SA 2.5 | null | 2010-08-24T18:14:23.703 | 2010-08-24T18:40:52.050 | null | null | 1,246,275 | [
"c++",
"string",
"concatenation"
] |
3,559,632 | 1 | 3,560,604 | null | 8 | 3,226 | I have a stacked areaplot made with ggplot2:
```
dists.med.areaplot<-qplot(starttime,value,fill=dists,facets=~groupname,
geom='area',data=MDist.median, stat='identity') +
labs(y='median distances', x='time(s)', fill='Distance Types')+
opts(title=subt) +
scale_fill_brewer(type='seq') +
facet_wrap(~groupname, ncol=2) + grect #grect adds the grey/white vertical bars
```
It looks like this:

I want to add a an overlay of the profile of the control graph (bottom right) to all the graphs in the output (groupname==rowH is the control).
So far my best efforts have yielded this:
```
cline<-geom_line(aes(x=starttime,y=value),
data=subset(dists.med,groupname=='rowH'),colour='red')
dists.med.areaplot + cline
```

I need the 3 red lines to be 1 red line that skims the top of the dark blue section. And I need that identical line (the rowH line) to overlay each of the panels.
The dataframe looks like this:
```
> str(MDist.median)
'data.frame': 2880 obs. of 6 variables:
$ groupname: Factor w/ 8 levels "rowA","rowB",..: 1 1 1 1 1 1 1 1 1 1 ...
$ fCycle : Factor w/ 6 levels "predark","Cycle 1",..: 1 1 1 1 1 1 1 1 1 1 ...
$ fPhase : Factor w/ 2 levels "Light","Dark": 2 2 2 2 2 2 2 2 2 2 ...
$ starttime: num 0.3 60 120 180 240 300 360 420 480 540 ...
$ dists : Factor w/ 3 levels "inadist","smldist",..: 1 1 1 1 1 1 1 1 1 1 ...
$ value : num 110 117 115 113 114 ...
```
The red line should be calculated as the sum of the `value` at each starttime, where groupname='rowH'. I have tried creating `cline` the following ways. Each results in an error or incorrect output:
```
#sums the entire y for all points and makes horizontal line
cline<-geom_line(aes(x=starttime,y=sum(value)),data=subset(dists.med,groupname=='rowH'),colour='red')
#using related dataset with pre-summed y's
> cline<-geom_line(aes(x=starttime,y=tot_dist),data=subset(t.med,groupname=='rowH'))
> dists.med.areaplot + cline
Error in eval(expr, envir, enclos) : object 'dists' not found
```
Thoughts?
# ETA:
It appears that the issue I was having with `'dists' not found` has to do with the fact that the initial plot, `dists.med.areaplot` was created via qplot. To avoid this issue, I can't build on a qplot. This is the code for the working plot:
```
cline.data <- subset(
ddply(MDist.median, .(starttime, groupname), summarize, value = sum(value)),
groupname == "rowH")
cline<-geom_line(data=transform(cline.data,groupname=NULL), colour='red')
dists.med.areaplot<-ggplot(MDist.median, aes(starttime, value)) +
grect + nogrid +
geom_area(aes(fill=dists),stat='identity') +
facet_grid(~groupname)+ scale_fill_brewer(type='seq') +
facet_wrap(~groupname, ncol=2) +
cline
```
resulting in this graphset:

| ggplot2: overlay control group line on graph panel set | CC BY-SA 2.5 | 0 | 2010-08-24T18:15:45.103 | 2010-08-25T13:30:30.813 | 2020-06-20T09:12:55.060 | -1 | 128,245 | [
"r",
"graph",
"ggplot2"
] |
3,559,750 | 1 | 3,559,806 | null | 0 | 238 | I am having a problem getting the ListView to display properly. It currently looks like this with the following xml code:

```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/favs_main">
<Button
android:text="Return to Home"
android:id="@+id/return_button"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:textSize="15sp"/>
<ListView
android:id="@+id/favsListView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="180dp"
android:layout_above="@id/return_button"/>
</RelativeLayout>
```
If you notice the list is down on the screen. I want it to be just below the favorites text instead of just above the return to home button. The catch however is that I always want the button to show and the list view to just occupy the space between the favorites text and the button. The text is from the background image so I can't just align below that. So even with 100 items I would still like to show the button.
Thanks for the help
| How to get UI to look right | CC BY-SA 2.5 | 0 | 2010-08-24T18:28:03.940 | 2010-08-25T13:03:14.483 | null | null | 336,861 | [
"android",
"xml",
"user-interface"
] |
3,559,946 | 1 | 3,560,053 | null | 1 | 845 | How can you make a [Koch Snowflake Fractal](http://en.wikipedia.org/wiki/Koch_snowflake) using php gd so that it comes out like this...
---


---
Is it possible? Is there another resource I can use?
| PHP GD snowflake fractal | CC BY-SA 2.5 | null | 2010-08-24T18:49:55.753 | 2010-08-24T19:11:00.423 | null | null | 1,246,275 | [
"php",
"gd",
"fractals"
] |
3,560,453 | 1 | 3,569,211 | null | 0 | 800 | I'm trying to setup an enviroment to develop in SharePoint.
I have XP with Visual Studio 2008 Profesional, on XP I have a virtual Windows Server 2003 where I install Share Point Services 3.0.
On XP I want to install Visual Studio Extensions for Windows Sharepoint Services 1.3, I have already modified the registry like [http://fernandof.wordpress.com/2008/02/11/how-to-install-the-sharepoint-2007-vs-2005-extensions-on-a-workstation/](http://fernandof.wordpress.com/2008/02/11/how-to-install-the-sharepoint-2007-vs-2005-extensions-on-a-workstation/) mention.
But when I try to run the set up I received the following error 
I google for this error and found that I must install it using the msiexec /i option, but the error continues.
My question is can I install this on an xp machine?
| Install Visual Studio Extensions for Windows Sharepoint Services 1.3 on XP | CC BY-SA 2.5 | null | 2010-08-24T19:48:33.140 | 2010-08-25T18:48:24.723 | null | null | 116,989 | [
"sharepoint"
] |
3,560,890 | 1 | null | null | 55 | 7,966 | How do you use [DwmGetColorizationColor](http://msdn.microsoft.com/en-us/library/aa969513(VS.85).aspx)?
The [documentation](http://msdn.microsoft.com/en-us/library/aa969513(VS.85).aspx) says it returns two values:
- `0xAARRGGBB`-
Here's a color that i like, a nice puke green:

You can notice the color is greeny, and the translucent title bar (against a white background) shows the snot color very clearly:

i try to get the color from Windows:
```
DwmGetColorizationColor(dwCcolorization, bIsOpaqueBlend);
```
And i get
```
dwColorization: 0x0D0A0F04
bIsOpaqueBlend: false
```
According to the documentation this value is of the format `AARRGGBB`, and so contains:
```
AA: 0x0D (13)
RR: 0x0A (10)
GG: 0x0F (15)
BB: 0x04 (4)
```
This supposedly means that the color is (10, 15, 4), with an opacity of ~5.1%.
But if you actually look at this RGB value, it's nowhere near my desired snot green. Here is
- -

Rather than being `Lime` green, `DwmGetColorizationColor` returns an almost fully transparent .
So the question is: in Windows Vista/7?
i tried using `DwmGetColorizationColor`, but that doesn't work very well.
---
A [person with same problem, but a nicer shiny picture](http://www.withinwindows.com/2010/07/01/retrieving-aero-glass-base-color-for-opaque-surface-rendering/comment-page-1/#comment-7276) to attract you squirrels:

> So, it boils down to –
DwmGetColorizationColor is completely
unusable for applications attempting
to apply the current color onto an
opaque surface.
---
i love [this guy's screenshots](http://www.withinwindows.com/2010/07/01/retrieving-aero-glass-base-color-for-opaque-surface-rendering/) much better than mine. Using his screenshots as a template, i made up a few more sparklies:






---
## Undocumented/Unsupported/Fragile Workarounds
There is an undocumented export from `DwmApi.dll` at entry point 137, which we'll call `DwmGetColorizationParameters`:
```
HRESULT GetColorizationParameters_Undocumented(out DWMCOLORIZATIONPARAMS params);
struct DWMCOLORIZATIONPARAMS
{
public UInt32 ColorizationColor;
public UInt32 ColorizationAfterglow;
public UInt32 ColorizationColorBalance;
public UInt32 ColorizationAfterglowBalance;
public UInt32 ColorizationBlurBalance;
public UInt32 ColorizationGlassReflectionIntensity;
public UInt32 ColorizationOpaqueBlend;
}
```
We're interested in the first parameter: `ColorizationColor`.
We can also read the value out of the registry:
```
HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM
ColorizationColor: REG_DWORD = 0x6614A600
```
So you pick your poison of creating appcompat issues. You can
- [bad](http://blogs.msdn.com/b/oldnewthing/archive/2003/12/23/45481.aspx)[bad](http://blogs.msdn.com/b/oldnewthing/archive/2005/09/01/459023.aspx)[bad](http://blogs.msdn.com/b/oldnewthing/archive/2009/11/16/9922753.aspx)[and can go away at any time](http://blogs.msdn.com/b/oldnewthing/archive/2009/11/16/9922753.aspx)- [bad](http://blogs.msdn.com/b/oldnewthing/archive/2005/03/09/390706.aspx)[can go away at any time](http://blogs.msdn.com/b/oldnewthing/archive/2003/11/03/55532.aspx)
## See also
- [Is there a list of valid parameter combinations for GetThemeColor / Visual Styles API](https://stackoverflow.com/questions/1888361/is-there-a-list-of-valid-parameter-combinations-for-getthemecolor-visual-style)- [How does Windows change Aero Glass color?](https://stackoverflow.com/questions/1487919/how-does-windows-change-aero-glass-color)- [DWM - Colorization Color Handling Using DWMGetColorizationColor](http://www.codeproject.com/KB/vista/dwmcolorcolor.aspx)- [Retrieving Aero Glass base color for opaque surface rendering](http://www.withinwindows.com/2010/07/01/retrieving-aero-glass-base-color-for-opaque-surface-rendering/)
---
i've been wanting to ask this question for over a year now. i always knew that it's impossible to answer, and that the only way to get anyone to actually pay attention is to have colorful screenshots; developers are attracted to shiny things. But on the downside it means i had to put all kinds of work into making the lures.
| Vista/7: How to get glass color? | CC BY-SA 3.0 | 0 | 2010-08-24T20:47:41.530 | 2014-04-09T08:18:26.107 | 2017-05-23T12:10:30.090 | -1 | 12,597 | [
"winapi",
"aero",
"user-preferences",
"dwm"
] |
3,561,101 | 1 | 3,561,818 | null | 0 | 816 | As I've been integrating with PayPal, I've noticed that their sandbox UI is very different from their real UI.
When I set my button to post to `sandbox.paypal.com`, I get something like this:

But when I post to `paypal.com` from a browser that has never visited PayPal before, I get this:

Is there any way to setup the sandbox so its interface will be closer to the "real" PayPal's interface?
| PayPal: Sandbox UI is different from "real" UI? | CC BY-SA 2.5 | null | 2010-08-24T21:16:12.000 | 2010-10-26T13:38:29.503 | null | null | 71,522 | [
"paypal",
"sandbox"
] |
3,561,545 | 1 | 3,637,710 | null | 35 | 13,046 | Our unit tests fire off child processes, and sometimes these child processes crash. When this happens, a Windows Error Reporting dialog pops up, and the process stays alive until this is manually dismissed. This of course prevents the unit tests from ever terminating.
How can this be avoided?
---
Here's an example dialog in Win7 with the usual settings:

If I disable the [AeDebug](http://technet.microsoft.com/en-us/library/cc939482.aspx) registry key, the JIT debugging option goes away:

If I disable checking for solutions (the only thing I seem to have control over via the control panel), it looks like this, but still appears and still stops the program from dying until the user presses something. [WerAddExcludedApplication](http://msdn.microsoft.com/en-us/library/bb513617%28VS.85%29.aspx) is documented to also have this effect.

| How to terminate a program when it crashes? (which should just fail a unit test instead of getting stuck forever) | CC BY-SA 2.5 | 0 | 2010-08-24T22:33:06.743 | 2017-04-06T22:46:18.257 | 2010-09-03T16:46:42.973 | 33,080 | 33,080 | [
"unit-testing",
"language-agnostic",
"windows-7"
] |
3,561,878 | 1 | 5,859,505 | null | 3 | 1,634 | I got a problem I cannot manage to resolve.
I have a Basecamp alike list of items with a small menu on the left with Drag, Edit and Trash icons.
The handle is there. He is sitting outside of the scope of the sortable element, and this is why he doesn't influence the sorting at all.

As you can see, my dragging icon is on the left. He is outside of the {LI} scope. The LIs endings where the char ends, so the Handle is out from his parent and wont influence at all the sorting and wont initiate it.
When I drag it but move my mouse inside the LI's borders, than it influencing and sorting like it suppose to.
What can I do. I broke my head and searched for an property of an handle offset, or any way to define for him that my handle is outside of your scope.
I hope anyone faced this thing in the past and might help :)
I think to put a bullet image bg, and this way to give the LI more space to its left.
Might do the trick... :)
Thank you
| jquery sortable's absolutly positioned 'handle' problem- Doesn't influence the sorting while outsite of the sortable element scope | CC BY-SA 2.5 | 0 | 2010-08-24T23:45:36.903 | 2013-11-22T11:33:31.860 | null | null | 279,591 | [
"jquery",
"jquery-ui-sortable"
] |
3,561,948 | 1 | 3,561,952 | null | 3 | 313 | I'm trying to generate a string of a random length which consists out of random `char`s.
To do so I have this code:
```
class Program
{
static void Main(string[] args)
{
for (int i = 0; i < 1000; i++)
{
MyString test = new MyString();
test.Random();
Console.WriteLine(test.Value);
}
Console.ReadLine();
}
}
public class MyString
{
private string value = string.Empty;
private Random r = new Random();
public string Value
{
get { return this.value; }
set { this.value = value; }
}
public void Random()
{
int length = (r.Next() % (100)) + 1;
for(int i = 0; i < length; i++)
{
value = value + RandomChar();
}
}
public char RandomChar()
{
// 32 to 126
int c = (r.Next() % 95) + 32;
char ch = (char)c;
return ch;
}
}
```
Now, lets look at a part of the output:

As you can see, the output is far from random, it contains a lot of repeating strings. How is this possible, and how do I solve it?
| attempting to create string of random values | CC BY-SA 2.5 | null | 2010-08-25T00:04:57.167 | 2012-04-17T15:48:06.213 | 2011-01-25T20:22:25.627 | 1,288 | 341,877 | [
"c#",
"string",
"random"
] |
3,562,235 | 1 | 3,562,449 | null | 32 | 37,902 | I am continuing to program some kind of keyboard navigation in my simple graphic program (using C#). And I ran into trouble once again.

My problem is that I want to process the keyboard input to move a layer around. Moving the layer with the mouse already works quite well, yet the control doesn't get the focus ().
Since my class derives from Panel (and overwrites a couple of events), I've also overwritten the events mentioned above, but I can't succeed in getting those events triggered.
I think I could manage to implement keyboard response either using something like Keyboard.GetState() or ProcessCmdWnd or something. However: I still have to be able to tell when the control got the focus.
I've checked many threads in here and I might use [this approach](https://stackoverflow.com/questions/902767/c-tetris-clone-cant-get-block-to-respond-properly-to-arrow-key-combinations) for keyboard input. The focus problem however still remains.
Thank you very much for information in advance!
Igor.
p.s.: I am programming in C# .NET v3.5, using VS2008. It's a Windows.Forms application, .
| Panel not getting focus | CC BY-SA 2.5 | 0 | 2010-08-25T01:29:59.630 | 2020-10-05T00:58:59.200 | 2017-05-23T11:47:00.513 | -1 | 376,960 | [
"c#",
"winforms",
"keyboard",
"focus",
"panel"
] |
3,562,414 | 1 | 3,562,487 | null | 22 | 53,248 | How can I programmatically change the back color of a single cell in a listview using its own value?

The values in the ColorFlag Column Came from the database.
Here is my code:
```
foreach(DataRow dr in _dataTbl.Rows)
{
_markOW = dr["Mark"].ToString();
_stock = dr["Stock"].ToString();
_SteelSectio = dr["SteelSection"].ToString();
_colo = (Int32)dr["Color"];
ListViewItem _lvi = new ListViewItem(_markOW);
_lvi.SubItems.AddRange(new string[]{_SteelSectio, _stock, _colo.ToString()});
_myListView.Items.Add(_lvi); }
```
Here is the code that I have tried to change the backcolor of the cells:
```
for (int _i = 0; _i < _owLV.Items.Count; _i++)
{
_myListView.Items[_i].UseItemStyleForSubItems = false;
_myListView.Items[_i].SubItems[3].BackColor = Color.FromArgb(_colo);
}
```
Thanks in advance
| How to change the backcolor of a listview subitem using its own value | CC BY-SA 2.5 | 0 | 2010-08-25T02:17:10.333 | 2013-08-24T08:25:06.060 | 2010-08-25T02:38:05.517 | 416,801 | 416,801 | [
"c#",
"listview",
"backcolor",
"subitem"
] |
3,562,468 | 1 | 3,562,481 | null | 1 | 139 | I have no idea how to handle this code within a style attribute. How do I correctly code this markup or properly escape it? I could use a string.format and emit the entire div but that seems like an awkward solution.
(I figured all those slant brackets would pose an issue in this posting so I am including an image.)

| MVC2 Quote handling / escaping within a style attribute | CC BY-SA 2.5 | null | 2010-08-25T02:33:15.240 | 2010-08-25T02:37:04.220 | null | null | 64,262 | [
"asp.net-mvc-2"
] |
3,562,665 | 1 | 3,562,825 | null | 3 | 263 | How can I do modeling in reverse by parsing a C program and turning it in to a circuit diagram to be displayed.
Example


Except this is psedocode.
| How can I do modeling in reverse by parsing a C program and turning it in to a circuit diagram to be displayed | CC BY-SA 2.5 | 0 | 2010-08-25T03:25:26.123 | 2018-12-25T16:52:05.780 | null | null | 34,531 | [
"c",
"parsing",
"modeling",
"circuit"
] |
3,563,180 | 1 | 3,563,340 | null | 2 | 543 | I have a table view with 9 rows at minimum. The background colors of the cells will depend of the cell position. If it is bellow to 3 or below to 6 or below to 9, the background color changes (see the next image).

The problem is that this table view can be reordered and I have to maintain the same color pattern. Example: if i change the 4th row to the 3th position, its background color must change from yellow to red.
To get the different colors, I used the method `- (void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath`, but this method is called only when the cell will be displayed and isn't good for reordering issues (the cell is already displayed and the color don't change).
I already tried to create a method to change the background color that is called just after the row was moved, but the color didn't changed (it seems that changing the background color with `cell.backgroundColor` property just works in `- (void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath`). :(
Any ideas how I can do that?
Thanks in advance.
| How to change the background color of a table view cell after it was moved? | CC BY-SA 2.5 | 0 | 2010-08-25T05:52:33.233 | 2010-08-25T06:27:39.713 | null | null | 263,690 | [
"iphone",
"uitableview"
] |
3,563,688 | 1 | 3,564,702 | null | 5 | 15,047 | In my webapp I have a search box in a fixed toolbar on the top of webpage.
I implemented the fixed position of toolbar like this....
```
#toolbar {
position: fixed !important;
position: absolute;
height: 25px;
width: 100%;
top: 0px;
left: 0px;
margin: 0;
z-index: 100;
font-size: 12px;
}
```
Now, I am implementing a keyword autocomplete function on it using [a jQuery plugin](http://docs.jquery.com/Plugins/Autocomplete).
My problem is how to keep the autocomplete suggestions fixed/attached to the search box when the window is scrolled/resized.
The css for autocomplete suggestions box is....
```
element.style {
display:none;
left:166px;
position:absolute;
top:96px;
width:130px;
}
.ac_results {
background-color:white;
border:1px solid #C5DBEC;
overflow:hidden;
padding:0;
z-index:99999;
}
```
I have a problem when I perform these operations..
1. Type something in search box, causing the suggestions to appear
2. With search box open, I scroll the window.
3. This causes the autosuggestions box to be scrolled as well.
What can I do to solve this bug?
Here is how it looks.

The autocomplete have scrolled over the fixed positioned input box.
1: I tried adding the `position: fixed;` to the autocomplete.
That gives problem in a different case.
- - - - -
:

:
The following code added to autocomplete css does the trick.
```
.ac_results {
background-color:white;
border:1px solid #C5DBEC;
overflow:hidden;
padding:0;
z-index:99999;
position: fixed;
top: 0px;
margin: 20px 0px 0px 0px; /* The top margin defines the offset of textbox */
}
```
Regards
| Fixed positioned search box with Autocomplete suggestions | CC BY-SA 2.5 | 0 | 2010-08-25T07:26:00.530 | 2014-08-26T07:50:32.457 | 2010-08-25T11:07:10.477 | 206,613 | 206,613 | [
"jquery",
"css",
"jquery-autocomplete"
] |
3,563,908 | 1 | 3,629,056 | null | 15 | 6,259 | How do you create an animated dashed or dotted border of an arbitrary shape in Android? In XML (preferred) or programmatically.
See picture below for an example.

| Animated Dashed Border in Android | CC BY-SA 2.5 | 0 | 2010-08-25T07:58:29.787 | 2010-09-02T16:41:54.957 | 2010-08-26T01:45:44.347 | 143,378 | 143,378 | [
"android",
"animation",
"border"
] |
3,563,931 | 1 | 3,564,490 | null | 0 | 3,717 | Hi all my goal is to get the child menu expanded towards the left hand side instead of the right hand side.
The CSS is as follows,
```
/*<![CDATA[*/
/* page styling, unimportant for the menu. only makes the page looks nicer */
/* - - - ADxMenu: BASIC styles - - - */
/* remove all list stylings */
.menu, .menu ul {
margin: 0;
padding: 0;
border: 0;
list-style-type: none;
display: block;
}
/* move all list items into one row, by floating them */
.menu li {
margin: 0;
padding: 0;
border: 1px solid #000000;
display: block;
float: left; /* modified by poornima. (default float :right ) */
position:relative;
z-index:5;
}
/* define new starting point for the nested UL, thus making positioning it a piece of cake */
.menu li:hover {
position: relative;
}
/* align the submenus with the right edge */
.menu li ul {
right: 0;
margin-left:-385px; /* already setted value: -363px;*/ /* IE 7 & 8 Problem to bring the submenu for left side */
}
/* force the submenu items into separate rows, while still keeping float:left (which resolves IE6 white-gap problem) */
.menu li li {
width: 100%;
}
/* fix the position for 2nd level submenus.
first make sure no horizontal scrollbars are visible on initial page load by sliding them all into top-left corner */
.menu li li ul {
top: 0;
}
/* ...and then place the submenu where it should be when shown */
.menu li li:hover ul {
right: 100%;
padding-right:52px; /*Newly added property for submenu hover properly*/
}
/* initialy hide all sub menus */
.menu ul {
visibility: hidden;
position: absolute;
z-index: 10;
}
/* display them on hover */
.menu li:hover>ul {
visibility: visible;
}
/* -- float.clear -- force containment of floated LIs inside of UL */
.menu:after, .menu ul:after {
content: ".";
height: 0;
display: block;
visibility: hidden;
overflow: hidden;
clear: both;
}
/* IE7 float clear: */
.menu, .menu ul {
min-height: 0;
}
/* -- float.clear.END -- */
/* sticky submenu: it should not disappear when your mouse moves a bit outside the submenu
YOU SHOULD NOT STYLE the background of the ".menu UL" or this feature may not work properly!
if you do it, make sure you 110% know what you do */
.menu ul {
background-image: url(empty.gif);/* required for sticky to work in IE6 and IE7 - due to their (different) hover bugs */
padding: 10px 30px 30px 30px;
margin: -10px -30px 0 0;
/*background: #f00;*/ /* uncomment this if you want to see the "safe" area. you can also use to adjust the safe area to your requirement */
}
/* - - - ADxMenu: DESIGN styles - - - */
.menu, .menu ul li {
color: #fff;
background:transparent url(../../Images/Modern/bgnd_sel_2.jpg) repeat scroll 0 0;}
.menu li li {
text-align: right;
}
.menu ul {
width: 15em;
}
.menu li:hover>a {
color: #000;
}
.menu a {
text-decoration: none;
color: #000000;
padding: .2em .3em;/*padding: .2em .4em;*/
display: block;
position:relative;
}
li.inactive {
text-decoration: none;
color: #fff;
padding: .3em 1em;
display: block;
position: relative;
background-color: #000000;
}
li.inactive {color:#cccccc;}
.menu a:hover, .menu li:hover>a {
color: #000;
background:transparent url(../../Images/Modern/bgnd_sel_4.png) repeat scroll 0 0;
}
.menu li li { /* create borders around each item */
border: 1px solid #BBBBBB !Important;
margin-left:22px; /*Move menu to right side*/
text-align:right; /*Move menu to right side and the text align right*/
}
.menu ul>li + li { /* and remove the top border on all but first item in the list */
border-top: 0;
}
.menu li li:hover>ul { /* inset 2nd+ submenus, to show off overlapping */
top: 5px;
right: 100%;
visibility:visible; /* IE 7 & 8 Problem add visibility for 2nd+ submenus */
}
/* Fix for IE5/Mac \*//*/
.menu a {
float: left;
}
.menu {
display: inline-block;
}
/* End Fix */
/*]]>*/
</style>
<!--[if lte IE 6]>
<style type="text/css" media="screen, tv, projection">
/*<![CDATA[*/
/* - - - ADxMenu: BASIC styles - - - */
.menu, .menu ul {
height: 1%;
}
/* this style must be exact copy of: ".menu li li:hover ul" style above */
.menu li li.adxmhover ul {
right: 100%;
}
/* the following two rules simulate li:hover>ul selector
repeat enough times to cover all nested levels
look at www.aplus.co.yu/adxmenu/trouble/ if some of your submenus do now show up */
.adxmhover ul,
.adxmhover .adxmhover ul {
visibility: visible;
}
.adxmhover li ul,
.adxmhover .adxmhover li ul {
visibility: hidden;
}
/* - - - ADxMenu: DESIGN styles - - - */
.menu ul a { /* fix clickability-area problem */
zoom: 1;
}
.menu li li { /* fix white gap problem */
float: left;
width: 100%;
}
.menu li li { /* prevent double-line between items */
margin-top: -1px;
}
.menu a:hover, .menu .adxmhoverA { /* li:hover>a selector */
color: #000;
background:transparent url(../../Images/Modern/bgnd_sel_4.png) repeat scroll 0 0;
}
.adxmhover a, .adxmhover .adxmhover a {
color: #000;
}
.adxmhover li a, .adxmhover .adxmhover li a {
color: #000;
}
.menu .adxmhoverUL .adxmhoverUL { /* inset 2nd+ submenus, to show off overlapping */
top: 5px;
left: 100%;
}
/*]]>*/
/*</style>*/
<script type="text/javascript" src="../code/ADxMenu.v4.02.js"></script>
<![endif]-->
```
The page's screen shot is follows

When i mouse hover "user management" menu, the "create user" must get expanded onto the left hand side. Any help would be deeply appreciated.
Thanks
| CSS- How to create child menu towards leftern side | CC BY-SA 2.5 | null | 2010-08-25T08:02:03.237 | 2012-06-01T17:36:23.680 | 2012-06-01T17:36:23.680 | 480,659 | 313,126 | [
"html",
"css",
"menu",
"html-lists"
] |
3,564,388 | 1 | null | null | 0 | 216 | I have this on an html:
```
<input type="text" name="username" size="10" alt="Username" value="Username"
onfocus="if(this.value=='Username') this.value='';" />
```
But this prompts an irritating IE security box on browser.

It there anything I can do to get rid of that IE box? Or any other option to use to the same effect?
Thanks!
Maria
| Onfocus: How to stop it prompting IE security box? | CC BY-SA 2.5 | null | 2010-08-25T09:19:30.407 | 2010-08-25T10:06:23.893 | 2010-08-25T09:48:18.120 | 333,255 | 425,873 | [
"javascript",
"html",
"css"
] |
3,564,393 | 1 | 3,564,622 | null | 7 | 18,604 | I know this has been asked a lot of times in StackOverflow already, but I haven't quite found a solution yet. My app sends an email with a link in it that when clicked should launch the app.
According to @hackbod, the best way to do it is to make use of the Intent URI (see [this](https://stackoverflow.com/questions/2430045?tab=votes#tab-top)). Here's my code that sets the intent and puts it in the email body:
```
Intent customIntent = new Intent(CUSTOM_ACTION);
customIntent.setPackage(MY_PACKAGE);
customIntent.addCategory(MY_CAT_BROWSABLE);
customIntent.addCategory(MY_CAT_DEFAULT);
String customUri = customIntent.toUri(Intent.URI_INTENT_SCHEME);
String emailBody = getString(R.string.intent_link, customUri);
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/html");
intent.putExtra(Intent.EXTRA_SUBJECT, "Recommending vid");
intent.putExtra(Intent.EXTRA_TEXT , Html.fromHtml(emailBody));
try {
startActivity(Intent.createChooser(intent, "Choose email client:"));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(this, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
}
```
This is what I get from LogCat:
```
08-25 17:01:23.333: VERBOSE/Test URI(16987): intent:#Intent;action=com.test.project.action.VIEW_VID_FROM_LINK;category=android.intent.category.DEFAULT;category=android.intent.category.BROWSABLE;package=com.test.project;end
08-25 17:01:23.338: VERBOSE/Test email text(16987): Hi,<br><br>Testing intents from an email.<br><br> A standard website: <a href=http://www.google.com>Go to Google</a>.<br><br> This link should launch the app: <a href=intent:#Intent;action=com.test.project.action.VIEW_VID_FROM_LINK;category=android.intent.category.DEFAULT;category=android.intent.category.BROWSABLE;package=com.test.project;end>Click link to launch</a>.
```
When I view the email from my phone using the GMail app, I can click on the Google link and it launches the browser, no problem with that.
But the link for the intent is not even clickable (While from the draft it looks like it be clickable). Has anybody tried this and made it work?

EDIT #1: I have also tried setting the action to Intent.ACTION_VIEW but the link is still not clickable.
EDIT #2: Apparently, the link really clickable. I tried using another email client, and the links are clickable! Seems like there is a bug in GMail. Oh well. But apparently, this is harder than I thought. I tried using:
```
Uri.Builder builder = new Uri.Builder();
builder.scheme("my.own.scheme");
builder.authority("my.authority");
Uri newUri = builder.build();
Intent customIntent = new Intent(CUSTOM_ACTION, newUri);
```
As suggested by @CommonsWare, I tried checking if there are receivers of this `customIntent`. Apparently there is one, which is what I was expecting. So next step is to make this intent into a URI that I can use in the email. I used:
```
String customUri = customIntent.toUri(Intent.URI_INTENT_SCHEME);
```
which, based on my understanding of the documentation, should give me something like the usual http links, only with the scheme set to `intent`. I can then use this `customUri` as the value for the links in the email. BUT, it looks like this is not the case. Does anybody have an example of what `.toUri` must return?
| Launching my app using the intent URI | CC BY-SA 2.5 | 0 | 2010-08-25T09:20:02.053 | 2011-12-15T21:10:56.597 | 2017-05-23T11:48:24.333 | -1 | 395,576 | [
"android",
"email",
"uri",
"android-intent"
] |
3,564,455 | 1 | null | null | 2 | 127 | I am sick to death of assholes spamming my site, and I hate those stupid Captcha things, and my customers have had it up to their necks with the captcha on my site.
So, I had an idea. What if there was a small line. And all they had to do was simply drag a circle from the left of the line to the right. And once the circle reaches the drop-target (end of the line), the form will then submit. Sounds simple? No need to inconveniently type some random crap just to submit a form!
See demo pic:

Does anybody know how I would implement something like this? Can someone please help me? I need a little direction.
Thank you
| Implementing Drag-to-Submit Form | CC BY-SA 2.5 | null | 2010-08-25T09:28:26.817 | 2010-08-25T09:35:27.817 | null | null | null | [
"javascript",
"html",
"drag-and-drop",
"captcha"
] |
3,565,231 | 1 | null | null | 0 | 1,123 | I get this error while calling the web service hosted on the server.
The service has one web method with as string input and returns string (will be in XML format). The service is working fine but once in a while I get this error and can't predict. Can someone help me to get through this error.
Attached the screen shot of the error. Please let me know if you need additional info

| Error while calling webservice (Server was unable to process request. ---> PARAMETER_NAME) | CC BY-SA 2.5 | null | 2010-08-25T11:12:49.517 | 2010-08-25T21:05:27.933 | 2010-08-25T21:05:27.933 | 76,337 | 122,138 | [
"asp.net",
"web-services",
"asmx",
"webservice-client"
] |
3,565,223 | 1 | null | null | 1 | 8,477 |
I created Chart like the following image:

1. How can I customize the value on the top of each column from code-behind? Instead of showing 21, 49, 19 I'd like to show 21 hr, 49 hr, 19 hr
2. How can I show the those values on top of other lines? As you can see 19 is below the Line series.
3. Can I set draw the line across the Chart Area not just across the column? So, the line will start from Axis X to end of the Chart Area.
Here's the mark-up:
```
<asp:chart id="Chart1" runat="server" Height="296px" Width="500" ImageLocation="~/TempChartFiles/ChartPic_#SEQ(300,3)" Palette="BrightPastel" imagetype="Png" BorderDashStyle="Solid" BackSecondaryColor="White" BackGradientStyle="TopBottom" BorderWidth="2" backcolor="#D3DFF0" BorderColor="26, 59, 105">
<legends>
<asp:Legend IsTextAutoFit="False" Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold"></asp:Legend>
</legends>
<borderskin skinstyle="Emboss"></borderskin>
<series>
<asp:Series Name="Month" BorderColor="180, 26, 59, 105" IsValueShownAsLabel="true">
</asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
<area3dstyle Rotation="10" perspective="10" Inclination="15" IsRightAngleAxes="False" wallwidth="0" IsClustered="False"></area3dstyle>
<axisy linecolor="64, 64, 64, 64">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisy>
<axisx linecolor="64, 64, 64, 64">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisx>
</asp:ChartArea>
</chartareas>
</asp:chart>
```
Here's the code-behind:
Chart1.ChartAreas("ChartArea1").AxisX.Interval = 1
```
' Create new data series and set its visual attributes
Dim series As New Series("Minimum Hour")
series.ChartType = SeriesChartType.Line
series.BorderWidth = 2
series.ShadowOffset = 1
series.AxisLabel = 0
Dim monthyHour = 22
series.Name = "Min. Hour : " & monthyHour
Dim xValue() As String = {"Jun", "Jul", "Aug"}
Dim yValue() As Integer = {21, 49, 19}
'add value for Line series
For i = 0 To xValue.Length - 1 Step 1
series.Points.AddY(monthyHour)
Next
Chart1.Series(0).Points.DataBindXY(xValue, yValue)
' Add series into the chart's series collection
Chart1.Series.Add(Series)
```
| MS Chart customize value label and draw Line series across the chart area | CC BY-SA 2.5 | 0 | 2010-08-25T11:11:47.717 | 2013-10-18T16:46:46.837 | 2011-03-23T18:28:24.550 | 134,830 | 270,536 | [
"c#",
"vb.net",
"charts",
"data-visualization",
"mschart"
] |
3,566,436 | 1 | 3,573,970 | null | 1 | 593 | Well I built a page which is working absolutely fine as you can see below:

but when i copy my folder to `C:\wamp\www\myFolder` and run it through using it look something like this

the problem is that the attached Style Sheets are not working and the Java Script is not working.
see below

- - - -
| HTML Wamp - debugging required | CC BY-SA 2.5 | null | 2010-08-25T13:43:11.097 | 2010-08-26T09:54:21.533 | 2010-08-25T13:45:25.757 | 158,455 | 158,455 | [
"html",
"css",
"wamp",
"wampserver"
] |
3,566,632 | 1 | 3,604,057 | null | 5 | 4,295 | How do you make SMO release it's connections?
I have this code:
```
public static class SqlServerConnectionFactory
{
public static Server GetSmoServer()
{
using (var c = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString))
{
var s = new ServerConnection(c);
c.Close();
return new Server(s);
}
}
public static Database GetSmoDatabase(Server server)
{
var db = server.Databases[ConfigurationManager.AppSettings["Database"]];
db.AutoClose = true;
return db;
}
}
```
Called like this from an ASP.Net MVC app run in IIS...:
```
public ActionResult Index()
{
server = SqlServerConnectionFactory.GetSmoServer();
database = SqlServerConnectionFactory.GetSmoDatabase(server);
var vm = new SettingsIndexViewmodel(database);
return View(vm);
}
```
For every call I make to this index method a connection is spun up - and is not released again.
So after 20 calls to the page, I have 20 of the connections awaiting command. This eventually ends up with an exception, when I cannot make new connections, because the connection pool is full.

What do I need to avoid this happening? I cannot seem to find a method on the SMO Server object like Dispose, close or similar.
| Cleaning up after calls to SMO Server and Database | CC BY-SA 2.5 | 0 | 2010-08-25T14:02:27.277 | 2019-01-02T19:14:23.383 | 2010-09-02T23:45:47.183 | 77,884 | 77,884 | [
"asp.net",
"sql-server-2008",
"smo"
] |
3,567,001 | 1 | null | null | 5 | 382 | This [question](https://stackoverflow.com/questions/1565768/why-does-resharper-suggest-readonly-fields) is similar, but my question seems to get asked in an unanswered comment.
I create a C# class. I use - to add a constructor. I add an argument to the constructor, and then I use - to create and initialize a field from that argument, like so:

The problem is that my field gets created as a `readonly` field, and in many cases I do not want to create a readonly field.
```
readonly int my_int;
```
How can I tell ReSharper not to add make my field readonly? I've tried to do a pretty thorough search in the ReSharper options, but apparently I'm missing something!
| How can I tell ReSharper to stop creating readonly fields? | CC BY-SA 2.5 | 0 | 2010-08-25T14:37:21.633 | 2014-05-24T05:49:53.120 | 2017-05-23T12:13:30.460 | -1 | 404 | [
"resharper",
"resharper-5.0"
] |
3,567,018 | 1 | null | null | 47 | 75,107 | 
The above is the output of my current graph. However, I have yet to manage what I am trying to achieve. I need to output my graph in a larger size so that each node/edge can be viewed with ease.
I've tried `nx.draw(G, node_size=size)`, but that only increases the size of the nodes, not the distance between nodes and edges.
| How can I specify an exact output size for my networkx graph? | CC BY-SA 3.0 | 0 | 2010-08-25T14:39:26.530 | 2022-04-13T03:56:34.660 | 2015-03-05T12:11:24.040 | 3,621,464 | null | [
"python",
"image",
"networkx"
] |
3,567,019 | 1 | 3,567,385 | null | 2 | 2,177 | I'm trying to make a canvas where the client can sign his name. It works well in Chrome v6:

but on Android 1.5 instead of drawing the browser scrolls the page and draws nothing:

I borrows the code from [Opera's website](http://devfiles.myopera.com/articles/649/example2.js).
Can I disable the scrolling or how can I make this work?
Thank you!
using the events `touchstart`, `touchmove` and `touchend`:
on a LG GW620R using a stylus:

on a Motorola Milestone:

on a Samsung Galaxy:

works better whitout using the finger nail
| Paint on Canvas in Android's browser, page scroll? | CC BY-SA 2.5 | 0 | 2010-08-25T14:39:31.723 | 2011-07-22T12:32:13.747 | 2010-08-25T15:49:18.380 | 286,557 | 286,557 | [
"javascript",
"android",
"browser",
"html",
"canvas"
] |
3,567,182 | 1 | 3,567,427 | null | 4 | 20,706 | How can you write a program to open a like this one...

Is it possible or can apps only be ran from the ?
I'm using the compiler... Do I need something else like visual studio?
Can I do it just by writing code?
| C++ open window hello world | CC BY-SA 2.5 | null | 2010-08-25T14:55:25.990 | 2022-03-27T20:11:11.143 | 2014-05-12T01:15:09.397 | 2,615,252 | 1,246,275 | [
"c++",
"window"
] |
3,567,501 | 1 | 8,348,660 | null | 6 | 30,703 | Is there any workaround for IE which makes me able to use `border-image`? I'm developing a site and it's working properly in every browser but IE. I need to mimic these bars 
I could use the [ie-css3.htc](http://www.fetchak.com/ie-css3/) hack but `border-radius` works only with the four corners together (which doesn't apply here, 'cause the top border isn't rounded) and the `filter` css property (for gradient) doesn't work with `border-radius` at all (it fills the whole element ignoring the border radius limits). In case there's no workaround for this, how would be the best way for doing this?
| border-image: workaround for IE | CC BY-SA 2.5 | 0 | 2010-08-25T15:21:49.567 | 2016-06-15T11:43:44.950 | null | null | 336,945 | [
"css",
"internet-explorer"
] |
3,567,547 | 1 | 3,587,123 | null | 0 | 935 | im using a django app (django adzone), well, but im trying to add banners, and django zone tell me " please fix the errors" , but nothing more, i cant see where are the errors.
any idea how ill know ?
# EDITED
There's not trace about the error or something like that, is just a django admin message
see the images

thanks
| how know where is the error? | CC BY-SA 2.5 | null | 2010-08-25T15:25:50.137 | 2011-09-27T16:32:32.713 | 2020-06-20T09:12:55.060 | -1 | 147,424 | [
"django",
"django-admin"
] |
3,567,671 | 1 | 3,580,723 | null | 5 | 588 | Is there a way to render pixel fonts correctly in Silverlight 4? Without breaking text into paths or some sort of manual rendering because the text is dependent on data binding. Tweaks with UseLayoutRounding and .5px positioning shifting don't work.

| Pixel fonts in Silverlight 4 | CC BY-SA 2.5 | 0 | 2010-08-25T15:37:26.210 | 2010-08-27T01:29:48.440 | 2010-08-26T12:49:26.930 | 82,686 | 82,686 | [
"wpf",
"silverlight",
"fonts",
"silverlight-4.0",
"pixel"
] |
3,567,941 | 1 | 3,570,259 | null | 4 | 1,726 | A cashflow diagram is often used when explaining derivatives in financial engineering. It shows the payoffs at different times. I couldn't find a great example online, but it looks something like this:

I would like to make something roughly equivalent using `ggplot2`. My thought was to use a stacked [bar plot](http://had.co.nz/ggplot2/geom_bar.html), where the zero axis is somewhere in the middle. Does anyone know how to do this?
Here's some example data:
```
data.frame(time=c(1, 2, 3), positive=c(5, 0, 4), negative=c(-2, 0, 0))
```
Thanks to Hadley's answer; the resulting image looks like:

With boxes it looks like:

| Cashflow diagram in R? | CC BY-SA 2.5 | 0 | 2010-08-25T16:07:22.357 | 2010-08-26T02:52:07.730 | 2010-08-26T02:52:07.730 | 163,053 | 163,053 | [
"r",
"ggplot2"
] |
3,569,108 | 1 | 3,612,929 | null | 35 | 5,297 | We are migrating to .NET 4 and very interested in implementing new Design By Contract capabilities.
As we know [Code Contract](http://research.microsoft.com/en-us/projects/contracts/) engine requires installation of [Code Contract addin](http://msdn.microsoft.com/en-us/devlabs/dd491992.aspx)

and VS Ultimate or Premium (for static checking).
Here is my questions:
1. Can I use code contract rewriting without installing VS on CI build Server (TeamCity)?
2. Is there any msbuild tasks to execute Contract checking?
3. Do you use Code Contract's validation with CI builds?
| Microsoft Code Contracts and CI build server | CC BY-SA 2.5 | 0 | 2010-08-25T18:33:39.623 | 2014-09-18T13:44:10.107 | null | null | 127,409 | [
"c#",
".net",
"continuous-integration",
"teamcity",
"code-contracts"
] |
3,569,509 | 1 | 3,569,536 | null | 1 | 414 | I really like the toolbar in Astro app for Android and I was wondering: Do you know if it is reusable component, is it open source, if yes - where to find it; if not - can you provide a link to similar open source component.

| Reusable component: toolbar like in astro app for Android | CC BY-SA 2.5 | null | 2010-08-25T19:27:49.743 | 2010-08-25T19:30:54.400 | null | null | 425,183 | [
"android"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.