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
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,099,565 | 1 | 5,099,686 | null | 3 | 176 | As far as I know this isn't possible.
I would like to draw an outline around text that is flowing around a floated picture on a web page. Any CSS or Javascript tricks that could help with this would be appreciated.
Horrible Mockup: [http://i.stack.imgur.com/Wf7BW.png](https://i.stack.imgur.com/Wf7BW.png)
.
This link to a demo for the Aloha Editor will give you an idea of the purpose of the outline: [http://www.aloha-editor.org/demos/wordpress-demo/](http://www.aloha-editor.org/demos/wordpress-demo/)
## Why?
In a CMS I'm working on, users can edit information in contentEditable divs on the front end of the website. In the situation above having an outline around the entire div would create confusion for the user as they cannot edit that black block.
Currently I have been adding a class to create an outline around content that can be edited. This worked well at first, but as soon as I got even a little creative with the formatting (e.g. no margin on the bottom of a div, content wrapped in a div with an outline) things started getting hacky and ugly. If there were some way to just wrap the text of div with an nicely spaced outline and I could apply that consistently on the site it would make things so much easier. Plus I'm at an impasse with the content structure that I outlined above.
I'm also open to other ideas besides an outline to convey to the users what text can be edited on the page. I'm experimenting with setting the background color on inner `<p>` elements in the contentEditables, but it doesn't seem as nice as having the outlines.
| Looking for a way to render an outline around flowing text on a web page | CC BY-SA 2.5 | 0 | 2011-02-24T01:58:01.463 | 2011-02-24T02:39:37.980 | 2011-02-24T02:39:37.980 | 492,254 | 492,254 | [
"javascript",
"css",
"contenteditable"
]
|
5,099,655 | 1 | 5,099,790 | null | 2 | 823 | I've found a gorgeous switch that I'd like to implement in iOS. The artist (@jasonlong) has kindly shared his PSD of the components at [365psd.com](http://365psd.com/day/329/), along with a crafty little [javascript](http://preation.blackantmedia.com/switches.html) as a demo.
Now, here's where I get into trouble... The custom UISlider and UISwitch examples I've found seem to rely on a track that's stationary with a movable knob/toggle. In the switch below, it would require a knob/track to animate behind a mask that also passes through touch events.
I've never been much of an interface coder, but this cute little bugger is just to awesome to leave alone. Can someone point me in the right direction?

| UISlider or UISwitch with a stationary mask? | CC BY-SA 2.5 | 0 | 2011-02-24T02:17:25.630 | 2011-02-24T02:43:20.307 | null | null | 136,582 | [
"cocoa-touch",
"ios4",
"core-graphics",
"uislider",
"uiswitch"
]
|
5,099,687 | 1 | 5,099,693 | null | 1 | 569 | 
I want to `require_once()` `dbconnect.php` in `register.php` . How do I do that? I tried `require_once('../dbconnect.php')` but that does not work (though it does work at the `register` level.
| How do I require_once() this file? | CC BY-SA 2.5 | null | 2011-02-24T02:24:12.740 | 2014-09-25T07:38:09.143 | null | null | 407,756 | [
"php",
"file",
"hierarchy"
]
|
5,099,881 | 1 | 5,112,198 | null | 2 | 779 | I have a custom NSView that lives inside of a `NSScrollView` that is in a `NSSplitView`. The custom view uses the following drawing code:
```
- (void)drawRect:(NSRect)dirtyRect {
NSGraphicsContext *ctx = [NSGraphicsContext currentContext];
[ctx saveGraphicsState];
// Rounded Rect
NSRect rect = [self bounds];
NSRect pathRect = NSMakeRect(rect.origin.x + 3, rect.origin.y + 6, rect.size.width - 6, rect.size.height - 6);
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:pathRect cornerRadius:kDefaultCornerRadius];
// Shadow
[NSShadow setShadowWithColor:[NSColor colorWithCalibratedWhite:0 alpha:0.66]
blurRadius:4.0
offset:NSMakeSize(0, -3)];
[[NSColor colorWithCalibratedWhite:0.196 alpha:1.0] set];
[path fill];
[NSShadow clearShadow];
// Background Gradient
NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:[UAColor darkBlackColor] endingColor:[UAColor lightBlackColor]];
[gradient drawInBezierPath:path angle:90.0];
[gradient release];
// Image
[path setClip];
NSRect imageRect = NSMakeRect(pathRect.origin.x, pathRect.origin.y, pathRect.size.height * kLargeImageRatio, pathRect.size.height);
[self.image drawInRect:imageRect
fromRect:NSZeroRect
operation:NSCompositeSourceAtop
fraction:1.0];
[ctx restoreGraphicsState];
[super drawRect:dirtyRect];
}
```
I have tried every different type of `operation` but the image still draws on top of the other half of the `NSSplitView` like so:

…instead of drawing under the `NSScrollView`. I think this has to do with drawing everything instead of the `dirtyRect` only, but I don't know how I could edit the image drawing code to only draw the part of it that lies in the `dirtyRect`.
| Image inside NSScrollView drawing on top of other views | CC BY-SA 2.5 | 0 | 2011-02-24T02:59:06.367 | 2011-02-25T00:18:45.140 | 2011-02-24T22:29:11.817 | 69,634 | 69,634 | [
"cocoa",
"drawing",
"core-graphics",
"nsimage",
"nsscrollview"
]
|
5,099,917 | 1 | null | null | 22 | 13,259 | I am using QDockWidgets and placing two of them on the left side of my application so that tabs can be used to select between them. However, Qt's default behavior for this looks horrible and is unintuitive. Instead of being able to drag the tabs to move the widgets, it places another bar below the selected tab (with the same name) that must be dragged instead. As a user, it would be hard to figure this out.

(My QDockWidgets are "Attributes" and "Library")
Is there a way to get rid of this second bar and make it so I can move my QDockWidgets by dragging the tabs themselves?
| QDockWidget Draggable Tabs | CC BY-SA 2.5 | 0 | 2011-02-24T03:04:33.790 | 2020-10-06T08:45:41.987 | 2019-07-17T14:35:59.670 | 1,163,786 | 187,523 | [
"c++",
"qt",
"tabs",
"qdockwidget"
]
|
5,100,111 | 1 | 5,100,128 | null | 11 | 7,481 | I turned on the setting "Treat Warnings as Errors" used it for a while and then turned it off however warnings still build as errors. I have restarted xcode and my pc.
| xcode showing warnings as errors | CC BY-SA 2.5 | 0 | 2011-02-24T03:40:20.457 | 2013-02-24T18:24:28.767 | 2013-02-24T18:24:28.767 | 491,239 | 86,524 | [
"iphone",
"ios",
"objective-c",
"xcode",
"ios4"
]
|
5,100,356 | 1 | 5,100,448 | null | 4 | 1,784 | I'm looking to integrate this expression:

However I seem to be having problems setting up the function. As outlined in [this](http://www.mathworks.com/help/techdoc/ref/quad.html) MATLAB explanation, I've defined a separate function named 'NDfx.m' which looks like this:
```
function [ y ] = NDfx(x)
y = (1/sqrt(2*pi))*exp(-.5*x^2); % Error occurs here
end
```
However when I call it within my main function I get an error at the commented line above. My main function looks like this:
```
function[P] = NormalDistro(u,o2,x)
delta = x-u;
dev = abs((delta)/o2); % Normalizes the parameters entered into function
P_inner = quad(@NDfx,-dev,dev); % Integrates function NDfx from -dev to dev (error here)
P_outer = 1 - P_inner; % Calculation of outer bounds of the integral
if delta > 0
P = P_inner + (P_outer/2);
elseif delta < 0
P = P_outer/2;
elseif dev == 0
P = .5;
end
end
```
The specific error that I get is:
> Error in ==> mpowerInputs must be a scalar and a square matrix
| How do I properly setup numerical integration in MATLAB? | CC BY-SA 2.5 | null | 2011-02-24T04:29:35.013 | 2011-02-24T11:27:25.777 | 2020-06-20T09:12:55.060 | -1 | 447,015 | [
"matlab",
"numerical-integration"
]
|
5,100,525 | 1 | 5,165,182 | null | 5 | 3,642 | I have a 1..* relationship between and . (one user has many posts)
has a FK called "UserId", which maps to the "UserId" field on table.
I tried to set this FK as Cascade UPDATE/DELETE, but i get this error:
> 'Users' table saved successfully
'Posts' table
- Unable to create relationship 'FK_Posts_Users'.
Introducing FOREIGN KEY constraint 'FK_Posts_Users' on table 'Posts' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint. See previous errors.
I have a table called One Post has many Helpful's.
Helpful has a cascading FK to User (so when a User is deleted, their Helpful's are also deleted).
But i think this is the cause of complaint for "multiple cascade paths".
Because if i delete a User (currently), it will delete their helpfuls. But im trying to add a cacade to Post also, do it would delete the Post, then try and delete the Helpful's for that Post (as Helpful also has a cascading FK to Post). In that scenario, which cascading FK would SQL choose?
Here is the database diagram of the three tables in question:

As you can see, "PostHelpful" is a child to both "Post" and "User" (has FK's to both).
So i can't make both keys cascading? Do i need a trigger on "Users" (AFTER DELETE) to manually delete the helpfuls (and other tables referencing User).
| SQL Server 2008 - Multiple Cascading FK's - Do i need a trigger? | CC BY-SA 2.5 | 0 | 2011-02-24T04:56:00.747 | 2013-04-12T12:05:27.393 | 2011-02-24T22:44:13.253 | 321,946 | 321,946 | [
"sql-server",
"sql-server-2008",
"foreign-keys",
"cascading-deletes",
"relationships"
]
|
5,100,874 | 1 | 5,270,340 | null | -1 | 3,577 | Hi i want to integrate facebook,twitter and linkedin in iphone.I dont know coding for this to happen.Please tell me where the sample codes are available or tel me how to do this.......please help me
Edit:

| How to integrate Linkedin,facebook,twitter in ipad or iphone? | CC BY-SA 2.5 | null | 2011-02-24T05:49:59.190 | 2015-05-08T10:59:39.927 | 2011-03-11T11:27:51.450 | 525,206 | 525,206 | [
"objective-c",
"ios4",
"ios-simulator"
]
|
5,100,978 | 1 | 5,101,800 | null | 2 | 177 | I am using images to provide rounded corners for internet explorer but the images are a slightly different shade than the actual border is in IE. This is not the case in Google Chrome or Firefox.

In IE the image corners are a slightly different shade than the rest of the border. I think this is because of "color profiles" but I still don't know how to fix the issue.

| Internet Explorer Issue with color profiles on rounded corners using images | CC BY-SA 2.5 | null | 2011-02-24T06:02:36.223 | 2011-12-22T03:35:21.840 | 2011-02-24T07:06:38.277 | 287,047 | 552,067 | [
"css",
"internet-explorer",
"colors",
"rounded-corners"
]
|
5,101,326 | 1 | 5,102,084 | null | 1 | 3,079 | I just installed weka in eclipse, and then I got the following java_cup error.

What should I do? Where can I get this java_cup so I can reference it as a part in the project
| java_cup cannot be resolved | CC BY-SA 2.5 | 0 | 2011-02-24T06:48:16.310 | 2015-12-24T08:26:38.510 | null | null | 95,265 | [
"java",
"eclipse",
"weka"
]
|
5,101,708 | 1 | 5,101,911 | null | 0 | 350 | ,This is my
```
<div style="width:220px;float:left;" id="radio_text">
<ul style="width:20px;float:left;display:block;">
<li style="list-style:none;line-height:13px;height:13px;float:left;"><input type="radio" name="radio_flag" checked="true" /></li>
<li style="list-style:none;line-height:13px;height:13px;float:left;"><input type="radio" name="radio_flag" /></li>
<li style="list-style:none;line-height:13px;height:13px;float:left;"><input type="radio" name="radio_flag" /></li>
</ul>
<ul style="width:200px;float:left;">
<li style="list-style:none;line-height:13px;height:13px;width: 200px;float:left;">Show All</li>
<li style="list-style:none;line-height:13px;height:13px;width: 200px;float:left;">Show Only Members</li>
<li style="list-style:none;line-height:13px;height:13px;width: 200px;float:left;">Show Only Accepted Contacts</li>
</ul>
</div>
```
My
```
#radio_text ul{float:left;}
#radio_text ul li{background: none;border:none;color: #000000;float: left;font-family: Arial,Helvetica,sans-serif;font-size: 11px;font-weight: normal;margin-right: 2px;padding: 1px 7px;text-align: left;}
```
and My

Please Help me to show it properly in
| design issues in IE 7 | CC BY-SA 2.5 | null | 2011-02-24T07:37:32.167 | 2011-02-24T08:06:47.987 | null | null | 440,694 | [
"html",
"css",
"internet-explorer-7",
"html-lists"
]
|
5,101,727 | 1 | null | null | 0 | 1,449 | i have this problem where i create a x number of textview in my layout to store 1 character in each text view.
however when the text gets too long, the text would not go to the next line and it will get overflowed out of the screen
is there anyway for me to keep the textviews in 1 screen?
```
LinearLayout linearLayout = new LinearLayout(this);
linearLayout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
TextView[] tv = new TextView[counter];
float textSize = 65;
for (int i = 0; i < counter; i++)
{
tv[i] = new TextView(this);
tv[i].setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
tv[i].setTextSize(textSize);
tv[i].setText(""+singleText[i]);
linearLayout.addView(tv[i]);
}
setContentView(linearLayout);
```

| textview overflowing out of the screen | CC BY-SA 2.5 | null | 2011-02-24T07:40:04.890 | 2011-02-24T09:13:00.930 | 2011-02-24T07:48:13.617 | 578,198 | 578,198 | [
"android"
]
|
5,101,788 | 1 | null | null | 0 | 1,256 |
I have a HTML form on a webpage

I want to collect all data of form ( Data, which user will submit) in Excel or CSV sheet.?

Is it possible with HTML 5 only? or will be required Mysql, php, apache etc?
Browser I will use is : Google Chrome , no other browser need to consider
Application will run on local PC. if it's not possible with HTML5 local database, I will install portable XAMPP.
| Is it possible to collect from data in excel or CSV file using HTML5 Local database only, without using Mysql? | CC BY-SA 2.5 | null | 2011-02-24T07:49:13.193 | 2011-02-24T09:11:15.387 | 2011-02-24T09:02:40.433 | 84,201 | 84,201 | [
"php",
"database",
"html",
"xhtml",
"local-storage"
]
|
5,101,809 | 1 | null | null | 0 | 921 | i try to write a custom user control to filter data to reflect to GridView.if you look USAGE i try to write:

important: i am using DynamicLinq!!!!!
But Error return me when Clicking Search Button:
### Error:
No property or field 'Chai' exists in type 'Product'
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls.WebParts; // Ekle
using System.Web.UI.WebControls; // Ekle
using System.Web.UI;
using System.Reflection;// Ekle
namespace MyControl2
{
public class TestControl : WebPart
{
internal List<Content> list { get; set; }
public Button BtnSearch { get; set; }
public event EventHandler Click;
public TestControl()
{
list = new List<Content>();
BtnSearch = new Button();
BtnSearch.ID = "btnSearch";
BtnSearch.Text = "Search";
this.Controls.Add(BtnSearch);
BtnSearch.Click += new EventHandler(BtnSearch_Click);
}
void BtnSearch_Click(object sender, EventArgs e)
{
this.Controls.Add(new LiteralControl("</tr><table>"));
foreach (var item in this.Controls)
{
if (item is MyTextBoxControl)
{
MyTextBoxControl t1 = (MyTextBoxControl)item;
if (t1.Text != "")
{
Add(new Content() { FieldName = t1.ID, Data = t1.Text, ID = Guid.NewGuid().ToString(), DataType=t1.DataType });
}
}
}
Click(this, e);
}
public string QueryParameters()
{
string Qry=String.Empty;
int i = 0;
foreach (var item in list)
{
Qry += item.FieldName + "=" + item.Data + " and ";
i++;
}
Qry = Qry.TrimEnd('A', 'n', 'd',' ');
return Qry;
}
protected override void CreateChildControls()
{
base.CreateChildControls();
this.Controls.Add(new LiteralControl("<table><tr>"));
}
public string id { get; set; }
public void AddItem(ContentItem content )
{
this.Controls.Add(new LiteralControl("<td>"));
this.Controls.Add(new Label() { ID = Guid.NewGuid().ToString(), Text = content.LabelName });
this.Controls.Add(new LiteralControl(":</td>"));
this.Controls.Add(new LiteralControl("<td>"));
this.Controls.Add(new MyTextBoxControl() { ID = content.FieldName, DataType= content.DataType });
this.Controls.Add(new LiteralControl("</td>"));
}
private void Add(Content content)
{
list.Add(new Content() { ID = content.ID, Data = content.Data, FieldName = content.FieldName });
}
}
internal class Content
{
internal string ID { get; set; }
public string Data { get; set; }
public string FieldName { get; set; }
public string DataType { get; set; }
}
public class ContentItem
{
private string ID { get; set; }
public string LabelName { get; set; }
public string FieldName { get; set; }
public string DataType { get; set; }
}
public class MyTextBoxControl : TextBox
{
public string DataType { get; set; }
}
}
```
### USAGE
```
namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
FilterControl1.AddItem(new FlyAntFilterControl.ContentItem() { LabelName = "Product", FieldName = "ProductName" });
FilterControl1.Click += new EventHandler(FilterControl1_Click);
}
void FilterControl1_Click(object sender, EventArgs e)
{
using (DataClasses1DataContext DataCtx = new DataClasses1DataContext())
{
var qry = DataCtx.Products.Where(FilterControl1.QueryParameters());
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
```
### ScreenShoots:


| How to write a custom Control in asp.net? | CC BY-SA 2.5 | null | 2011-02-24T07:51:52.333 | 2011-02-24T09:21:56.590 | 2011-02-24T08:00:41.900 | 52,420 | 52,420 | [
"c#",
".net",
"asp.net",
"visual-studio"
]
|
5,101,879 | 1 | 5,387,681 | null | 3 | 2,497 | Today I've been presented with a fun challenge and I want your input on how you would deal with this situation.
So the problem is the following (I've converted it to demo data as the real problem wouldn't make much sense without knowing the company dictionary by heart).
We have a decision table that has a minimum of 16 conditions. Because it is an impossible feat to manage all of them (2^16 possibilities) we've decided to only list the exceptions. Like this:

As an example I've only added 10 conditions but in reality there are (for now) 16. The basic idea is that we have one baseline (the default) which is valid for everyone and all the exceptions to this default.
You have a foreigner who is also a pirate.
If you go through all the exceptions one by one, and condition by condition you remove the exceptions that have at least one condition that fails. In the end you'll end up with the following two exceptions that are valid for our case. The match is on the IsPirate and the IsForeigner condition. But as you can see there are 2 results here, well 3 actually if you count the default.

Now what we came up with on how to solve this is that in the GUI where you are adding these exceptions, there should run an algorithm which checks for such cases and force you to define the exception more specifically. This is only still a theory and hasn't been tested out but we think it could work this way.
I'm looking for alternative solutions that make the rules manageable and prevent the problem I've shown in the example.
| How to start working with a large decision table | CC BY-SA 2.5 | 0 | 2011-02-24T08:00:57.617 | 2016-03-15T21:28:48.937 | 2012-04-05T18:45:39.280 | 3,043 | 83,528 | [
"rule-engine"
]
|
5,102,169 | 1 | 5,116,695 | null | 2 | 694 | I have implemented core-plot in my iPhone app. I am using the gradient scatter plot as shown below:

How to remove the horizontal markers that appear on Y Axis of the graph in the above core plot?
| iPhone SDK : How to remove the horizontal markers from Core-Plot? | CC BY-SA 2.5 | null | 2011-02-24T08:32:55.943 | 2011-02-25T11:30:22.343 | 2011-02-25T05:11:43.517 | 463,857 | 463,857 | [
"iphone",
"objective-c",
"cocoa-touch",
"ios4",
"core-plot"
]
|
5,102,306 | 1 | 5,102,622 | null | 2 | 1,243 | by using flash cs5 with a huge internal image library (over 300+ small png-files) i need ! the as code is pretty well, also my computer (quad core, 4gigs of ram). i've found out, that by exporting the files to "stage 1" (bild 1 in my screenshot) flash starts to hang around, but i don't know why...
.

so i've played around and ended up creating *.as-files for each single bitmap, but the speed-result is the same (maybe 10% - 15% faster than before)...

```
package
{
import flash.display.*;
dynamic public class MY_BITMAP_NAME extends BitmapData
{
public function MY_BITMAP_NAME(width:int = 500, height:int = 135)
{
super(width, height);
return;
}
}
}
```
i can not work fast enough to debug my project files :-(
| flash cs5: compiling fla with huge internal library takes YEARS ! | CC BY-SA 2.5 | null | 2011-02-24T08:47:53.880 | 2012-09-16T03:13:32.913 | null | null | 365,265 | [
"actionscript-3",
"actionscript",
"flash",
"flash-cs5"
]
|
5,102,474 | 1 | null | null | 4 | 15,376 | I want to rotate an UIImage (not UIImageView) in custom degree
I followed [this post](https://stackoverflow.com/questions/917713/uiimage-rotation-custom-degrees) but it didn't work for me.
Anyone can help? Thanks.
UPDATE:
The code below does some of the job, but I lose some of the image after rotating it:

What should I change to get it right? (btw the yellow color in the screenshots is my UIImageView bg)
```
- (UIImage *) rotate: (UIImage *) image
{
double angle = 20;
CGSize s = {image.size.width, image.size.height};
UIGraphicsBeginImageContext(s);
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextTranslateCTM(ctx, 0,image.size.height);
CGContextScaleCTM(ctx, 1.0, -1.0);
CGContextRotateCTM(ctx, 2*M_PI*angle/360);
CGContextDrawImage(ctx,CGRectMake(0,0,image.size.width, image.size.height),image.CGImage);
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
}
```
| Rotate UIImage custom degree | CC BY-SA 3.0 | 0 | 2011-02-24T09:04:12.390 | 2015-03-02T11:10:27.680 | 2017-05-23T12:10:09.080 | -1 | 631,997 | [
"iphone",
"uiimage",
"rotation"
]
|
5,102,811 | 1 | 5,112,952 | null | 3 | 1,605 | I have a web page with lots of framesets and frames (don't ask), and I want to be able to show frame borders where the red borders appear in the mockup below (The vertical borders must be scrollable).
If I set `frameborder="0"` to the `#outer` frameset (i don't want any border to appear there), this prevents me from overriding it in the `#middle` frameset. Please not that there should not be a border in the `#innerXXX` framesets.
So, how can I show frame borders on the `#innerXXX` framesets? (only where the red lines are visible in the mockup)
Thanks.
P.S. Don't ask.

```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Frame desperation</title>
</head>
<frameset id="outer" rows="23, *" frameborder="0" border="0">
<frame noresize="noresize" scrolling="no" src="http://www.bing.com">
<frameset id="middle" cols="20,30%,35%,35%" frameborder="5" border="5" bordercolor="red" id="sizingControl">
<frame name="minimizeBar" noresize="noresize" id="minimizeBar" scrolling="no" src="http://www.bing.com">
<frameset id="inner1" rows="146,*,20" border-top="0" border-bottom="0" id="treePanel">
<frame id="treeToolbar" name="treeToolbar" scrolling="no" src="http://www.bing.com">
<frame id="treeContent" name="treeContent" src="http://www.bing.com">
<frame id="treeStatus" name="treeStatus" scrolling="no" src="http://www.bing.com">
</frameset>
<frameset id="inner2 rows="146,*,20" frameborder="0" border="0" >
<frame id="leftToolbar" name="leftToolbar" scrolling="no" src="http://www.bing.com">
<frame id="leftDocumentContent" name="leftDocumentContent" src="http://www.bing.com">
<frame id="leftStatus" name="leftStatus" scrolling="no" src="http://www.bing.com">
</frameset>
<frameset id="inner3 rows="146,*,20" frameborder="0" border="0" >
<frame id="rightToolbar" name="rightToolbar" scrolling="no" src="http://www.bing.com">
<frame id="rightDocumentContent" name="rightDocumentContent" src="http://www.bing.com">
<frame id="rightStatus" name="rightStatus" scrolling="no" src="http://www.bing.com">
</frameset>
</frameset>
</frameset>
<noframes></noframes>
```
| Frameset in frameset border hell | CC BY-SA 2.5 | 0 | 2011-02-24T09:39:00.237 | 2011-02-25T07:30:28.223 | 2011-02-24T14:52:25.643 | 125,713 | 125,713 | [
"html",
"coding-style",
"border",
"frame",
"frameset"
]
|
5,103,016 | 1 | 5,796,576 | null | 7 | 1,860 | I am using the [following link](http://docs.google.com/gview?embedded=true&url=http://174.136.1.35/dev/android/1_android-Survey-Report-for-pdf-1200-x-768.pdf) inside a `WebView` to show a `pdf file` in my android application:
- [http://docs.google.com/gview?embedded=true&url=http://174.136.1.35/dev/android/1_android-Survey-Report-for-pdf-1200-x-768.pdf](http://docs.google.com/gview?embedded=true&url=http://174.136.1.35/dev/android/1_android-Survey-Report-for-pdf-1200-x-768.pdf)
This works, and displays the PDF, as you can see in the attached images. The problem I have is that
> I want to disable the zoom controls, and the desktop and download
links.
Is this possible, and if so, how?


| How can I change the way the google docs website displays a PDF in Android? | CC BY-SA 3.0 | null | 2011-02-24T09:57:32.677 | 2014-09-02T06:36:46.253 | 2014-09-02T06:36:46.253 | 1,999,155 | 489,762 | [
"android",
"google-docs",
"google-docs-api"
]
|
5,103,198 | 1 | 5,114,015 | null | 2 | 1,884 | I am using gRaphael JS lib to draw line chart.
and have some problem with haverColumn function.
this is my simplified hoverColumn function.
```
var line = raphael.g.linechart(50, 20, 650, 120, xAry, yAry, options).hoverColumn(function (){
...
console.log(this.x+","+this.y);
....
}
```
When mouse is hovering on the chart,
hoverColumn function is called, and log function is executed.
But, some area doesn't call hoverColumn function.
So, I did debugging using firebug, I found the reason.
There was some big rect area on the line chart,
when mouse is on the area, hoverColumn doesn't be call despite
mouse is on the chart's column.
here is a captured image to help understanding.
fire bug, and the rect.

when I remove the rect manually using firebug,
hoverColumn function works well~ -_-;
the area code is made by gRaphael-js automatically.
so, is there any way to solve this problem?
any idea please~
| g.raphael js(graphaeljs), line, hoverColumn problem | CC BY-SA 2.5 | null | 2011-02-24T10:11:58.120 | 2011-02-25T05:41:28.863 | null | null | 505,345 | [
"javascript",
"graphael"
]
|
5,103,231 | 1 | 5,103,259 | null | 0 | 1,456 | do you know how to make a certain part of a picture (jpg) semitransparent, like in the attached image?
| android transparent picture | CC BY-SA 2.5 | 0 | 2011-02-24T10:15:36.547 | 2011-02-25T14:12:54.837 | null | null | 517,558 | [
"android",
"transparency",
"image"
]
|
5,103,359 | 1 | 5,105,348 | null | 0 | 355 | I have a scrollView and i want to scroll it automatically when i select an textField
(i am filling a form here)
i am using following method to scroll it
```
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
[scrollView setContentOffset:CGPointMake(0,50*(textField.tag-1))];
}
```
Now the problem is that i have more than 10 text fields and when i reached to the seventh textField the scrollView scrolls more .
I also tried to print the CGPointMake()'s values...and it is showing correct values..but the scroller goes beyond the range what is expected..
Look at following images
The following 2 images showing control on textFields tag <7


But when control reaches to 7th textField it scrolls more

and after this it goes beyond bounds.
This problem occurs only when i move from one textFields to another without pressing that return button(i mean with `resignFirstResponder`).But when i press that return button and then go to the next field then all works fine.
Can anyone suggest where should be the problem..?
| Problem with scrollview, it scrolls more | CC BY-SA 2.5 | null | 2011-02-24T10:27:15.807 | 2013-03-29T09:55:33.720 | 2011-02-24T10:42:14.343 | 426,006 | 426,006 | [
"iphone",
"uiscrollview",
"scroll",
"uitextfield"
]
|
5,103,404 | 1 | 5,106,606 | null | 11 | 42,133 | I am generating a pdf file in asp.net c# using itextsharp. i am not able to draw a horizontal line/verticle line/dotted line.
i tried to draw a line using the following code,i am getting no errors but the line is also not getting displayed in the pdf file
```
PdfContentByte cb = wri.DirectContent;
cb.SetLineWidth(2.0f); // Make a bit thicker than 1.0 default
cb.MoveTo(20, pdfDocument.Top - 40f);
cb.LineTo(400, pdfDocument.Top - 40f);
cb.Stroke();
```
What is the problem in the code.Is it because of the position of x y co-ordinates? I had used rough points to know approximate position in pdf,but the line never apears in the pdf file.
The output i am looking out for is as shown in image below.
| problem in drawing a line in a pdf file using itextsharp | CC BY-SA 2.5 | 0 | 2011-02-24T10:31:25.967 | 2014-10-07T11:42:37.403 | null | null | 243,680 | [
"c#",
"asp.net",
"pdf-generation",
"itext"
]
|
5,103,973 | 1 | null | null | 0 | 1,390 | Im trying to use imagemagick with php.
Im using the following binary file : `ImageMagick-6.4.1-0-Q8-windows-dll.exe`
im using the following php extension : `php_imagick_dyn-Q8.dll`
I have copied the extension to `C:\wamp\bin\php\php5.3.0\ext`
I have edited the `php.ini` file located at `C:\wamp\bin\php\php5.3.0` and included the following line: `extension=php_imagick_dyn-Q8.dll`
I have installed imagemagick in : `C:/imagemagick`
I have set Environmental variable: `MAGICK_HOME` to `C:/imagemagick`
I have edited the `httpd.conf`file which is located at `C:\wamp\bin\apache\Apache2.2.11\conf` and included : `SetEnv MAGICK_HOME “C:/imagemagick"` in it.
Im using `windows 7 service pack 1`.
`Apache2.2.11` and
`php5.3.0`
But when i start the wamp server i get the following error message.

| imagemagick with php,wamp server giving problems | CC BY-SA 2.5 | 0 | 2011-02-24T11:24:14.447 | 2020-12-07T08:04:41.273 | 2012-12-24T01:00:31.270 | 367,456 | 462,951 | [
"php",
"apache",
"imagemagick",
"wampserver"
]
|
5,104,113 | 1 | 5,107,630 | null | 0 | 1,492 | ```
Try
Dim SQLconnect As New SQLite.SQLiteConnection()
Dim SQLcommand As SQLiteCommand
SQLconnect.ConnectionString = "Data Source=" & Application.StartupPath & "\Database\db" & ";"
SQLconnect.Open() ' VS highlights this line
SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = "INSERT INTO Table1 (Status) VALUES ('Enabled')"
SQLcommand.ExecuteNonQuery()
SQLcommand.Dispose()
SQLconnect.Close()
Catch ex As Exception
MsgBox("Error: Operation unsuccessfull")
End Try
```
Getting an error when I try to insert data in to the databse,
Error: The type initializer for 'System.Transactions.Diagnostics.DiagnosticTrace' threw an exception.
How Can I solve this problem ?

I tried it without using Try Catch Block
```
Dim sqlConnection As New SQLite.SQLiteConnection()
Dim sqlCommand As New SQLiteCommand
sqlConnection.ConnectionString = "Data Source=db.s3db" 'is it because of the extension of the database ?
sqlConnection.Open()
sqlCommand = sqlConnection.CreateCommand()
sqlCommand.CommandText = "INSERT INTO Table1 (Status) VALUES ('Enabled')"
sqlConnection.Close()
```
Is it because of the database extension ? I used sqlite Admin to create tables
I just tried it out in VS 2008, it works flawlessly. Why is it not working in VS 2010. Does it something have to do with app.config file ? or .net framework 4 ?
This is what I added in the app.config file
```
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
<configSections>..................
```
| Getting an error when I try to insert data into the database in VS-2010 | CC BY-SA 2.5 | null | 2011-02-24T11:38:25.187 | 2011-02-24T16:40:31.030 | 2011-02-24T16:02:59.397 | 590,666 | 590,666 | [
"database",
"vb.net",
"sqlite"
]
|
5,104,165 | 1 | 5,104,194 | null | 6 | 2,225 | I need a random number generator that generates various number between n and m, but no with a equal probability. I want to set a value x between n and m where the possibility is the highest:

Is there an easy way to do that using the Random class? The likelihood should have the form of a binominal distribution or something similar (it is not important that its an exact binominal distributon, rough approximations are also ok)
## EDIT
Maybe I have to clarify: I'm not looking for a binominal or gaussian distribution but also for something like this:

I want to to define the value x where the highest likelihood should be.
## EDIT
Unfortunately the previously accepted answer [does not seem to work](https://stackoverflow.com/q/5281672/329637) how i suspected. So I'm still looking for an answer!
| How to implement a random number generator that is not random? | CC BY-SA 2.5 | 0 | 2011-02-24T11:43:26.083 | 2011-03-12T10:58:26.000 | 2017-05-23T12:01:09.963 | -1 | null | [
"c#",
".net",
"algorithm",
"random"
]
|
5,104,186 | 1 | 5,110,689 | null | 1 | 527 | I need to build a simulation application in Java and i need to build QGraphicsView like component in Java Swing or SWT.
My requirements are
1. building map
2. enabling mice object to go around so - called map.
3. zoomin/zoomout
4. rotating coordinate system like this.

I have mainly two questions.
First question is which (Swing, SWT or Something else) is more suitable for developing this.
Latter is you know any open source library like QGraphicsView except than Qt Jambi
Maybe it can be weird question but i want to learn your opinions coming from your experience.
Any idea will be appreciated
thanks
--İbrahim
| How to build QGraphicsView like components in Java | CC BY-SA 2.5 | null | 2011-02-24T11:46:13.010 | 2011-02-24T21:27:46.100 | 2011-02-24T12:08:32.350 | 115,890 | 115,890 | [
"java",
"user-interface",
"swing",
"swt",
"simulation"
]
|
5,104,204 | 1 | 5,104,346 | null | 1 | 716 | i have a view that shows the user a form and the user should upload a file and choose all the categories associated with it.
the controller that is responsible in submitting the data should
- retrieve the file info and
insert data in the file category - retrieve the related category ids and
insert them as well in the just
insert the file and the category ids.
this is my problem the controller just gets some info about the category not all of it. basically it only needs the ids for the insertion
i can't use
```
[HttpPost]
public ActionResult SaveFile(File file, List<Category> Checkbox, HttpPostedFileBase FileUpload)
{
//some stuff
//for example got the first category and named it to category1
file.Categories.Add(category1)
}
```
i asked someone and he told me you have to select the category you want to insert
is this really necessary ? i only need a category id and a file id to make the insert why would i fire another request to the database that i don't really need

---
i am using
- -
| Entity framework many to many relation bottleneck in inserting data | CC BY-SA 2.5 | null | 2011-02-24T11:47:33.320 | 2011-02-24T11:59:47.643 | null | null | 386,941 | [
"asp.net-mvc",
"entity-framework"
]
|
5,104,681 | 1 | null | null | 1 | 3,210 | I'm trying to implement a RadioButton that has a TextView on the top right part of it, like so:

The Textview will hold a number, once I've clicked something in the app.
I understand that I will have to extend RadioButton and add a TextView in there somehow, but I don't really understand how. I'd like to be able to configure all aspects of the button in xml (background of textview, if textview is visible and so on).
How do I go about this? Where do I start?
| Android extending views, specifically RadioButton | CC BY-SA 2.5 | 0 | 2011-02-24T12:30:53.170 | 2011-02-24T19:01:29.750 | null | null | 397,060 | [
"android",
"radio-button",
"extend",
"custom-view"
]
|
5,104,684 | 1 | 5,117,831 | null | 2 | 304 | i have following search form field,
```
<form class="explore">
<input type="text" name="find" id="find" class="in-put find-field" size="50" />
<input type="submit" id="find" value="Find" class="sub_but" /> or just
<a href="index.php?pg=explore">Explore</a>
</form>
```
everything in a row with following css,
```
.explore{ background:#3F3F3F; border:2px solid #F2F2F2; padding:4px 0; text-align:center; margin:0 35px 0 35px; }
.explore .find-field{ background:#fff; border:3px solid #539D09; font-weight:bold; padding:4px 0; }
.explore .sub_but{ background:url('img/stripe_grn.png'); border:0px solid #89A8EF; font-weight:bold; display:inline; padding:5.5px 15px; }
.explore .sub_but:hover{ background:#539D09; }
.explore a{ background:url('img/stripe_blu.png'); border:0px #89A8EF solid; color:#E9E9E9; font-weight:bold; padding:5px 15px; }
.explore a:hover{ background:#89A8EF; text-decoration:none; }
```
it appears very much uniformed in all browsers except Internet explorer. i can not understand the problem..

| Improper alignment of <input> and <a> tag in Internet Explorer | CC BY-SA 2.5 | null | 2011-02-24T12:31:06.500 | 2011-02-25T13:33:02.113 | 2011-02-25T09:32:35.663 | 77,090 | 329,605 | [
"html",
"css",
"xhtml"
]
|
5,104,687 | 1 | 5,104,786 | null | 1 | 1,513 | I have used a custom array adapter to populate my list view.The problem i face is that the separator is missing out in between the fourth and fifth list item.
Here's the code:
```
public class Clubs extends ListActivity{
private static class EfficientAdapter extends BaseAdapter {
private LayoutInflater mInflater;
private Bitmap mIcon1;
private Bitmap mIcon2;
public EfficientAdapter(Context context) {
// Cache the LayoutInflate to avoid asking for a new one each time.
mInflater = LayoutInflater.from(context);
// Icons bound to the rows.
mIcon1 = BitmapFactory.decodeResource(context.getResources(), R.drawable.yellow_offline);
mIcon2 = BitmapFactory.decodeResource(context.getResources(), R.drawable.green_online);
}
/**
* The number of items in the list is determined by the number of speeches
* in our array.
*
* @see android.widget.ListAdapter#getCount()
*/
public int getCount() {
return DATA.length;
}
/**
* Since the data comes from an array, just returning the index is
* sufficent to get at the data. If we were using a more complex data
* structure, we would return whatever object represents one row in the
* list.
*
* @see android.widget.ListAdapter#getItem(int)
*/
public Object getItem(int position) {
return position;
}
/**
* Use the array index as a unique id.
*
* @see android.widget.ListAdapter#getItemId(int)
*/
public long getItemId(int position) {
return position;
}
/**
* Make a view to hold each row.
*
* @see android.widget.ListAdapter#getView(int, android.view.View,
* android.view.ViewGroup)
*/
public View getView(int position, View convertView, ViewGroup parent) {
// A ViewHolder keeps references to children views to avoid unneccessary calls
// to findViewById() on each row.
ViewHolder holder;
// When convertView is not null, we can reuse it directly, there is no need
// to reinflate it. We only inflate a new View when the convertView supplied
// by ListView is null.
if (convertView == null) {
convertView = mInflater.inflate(R.layout.people_list_item, null);
// Creates a ViewHolder and store references to the two children views
// we want to bind data to.
holder = new ViewHolder();
holder.text = (TextView) convertView.findViewById(R.id.textpeople);
holder.icon = (ImageView) convertView.findViewById(R.id.image);
convertView.setTag(holder);
} else {
// Get the ViewHolder back to get fast access to the TextView
// and the ImageView.
holder = (ViewHolder) convertView.getTag();
}
// Bind the data efficiently with the holder.
holder.text.setText(DATA[position]);
holder.icon.setImageBitmap((position & 1) == 1 ? mIcon1 : mIcon2);
return convertView;
}
static class ViewHolder {
TextView text;
ImageView icon;
}
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setListAdapter(new EfficientAdapter(this));
}
private static final String[] DATA = {
"Abbaye de Belloc", "Abbaye du Mont des Cats", "Abertam",
"Abondance", "Ackawi", "Acorn", "Adelost", "Affidelice au Chablis",
};
}
```
Here's the xml:
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/widget31"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<LinearLayout
android:id="@+id/widget321"
android:layout_width="479dip"
android:layout_height="54dip"
android:layout_marginTop="16dip"
>
<ImageView
android:id="@+id/image"
android:layout_width="24dip"
android:layout_height="24dip"
android:layout_marginLeft="14dip"
android:layout_marginTop="5dip"
android:src="@drawable/green_online">
</ImageView>
<TextView
android:id="@+id/textpeople"
android:layout_marginLeft="10dip"
android:textColor="#FFF5EE"
android:layout_height="29dip"
android:textSize="16sp"
android:layout_width="400dip"
android:layout_marginTop="7dip"
>
</TextView>
</LinearLayout>
</LinearLayout>
```
Here is the screen shot 
can someone tell me where i have gone wrong?
Thanks
:
:
Here's the code to be added to get it working
```
ListView lv=getListView();
lv.setDividerHeight(2);
```
| Separator missing out between list items in Android | CC BY-SA 2.5 | null | 2011-02-24T12:31:11.303 | 2011-02-24T13:05:10.460 | 2011-02-24T13:05:10.460 | 598,714 | 598,714 | [
"android",
"android-layout"
]
|
5,104,774 | 1 | 5,104,825 | null | 0 | 405 | I just installed Visual SourceSave (VSS) and need some help. Please take a look at the screenshot. Is this VSS server or client? I assume this is server. So I need client which I will install on other PCs which will access this server? Or this is server/client both and I just need to install this on all machines?

And please guide me to some nice VSS tutorial.
Thanks
| Visual Source Safe (VSS) help required | CC BY-SA 2.5 | null | 2011-02-24T12:38:23.390 | 2011-02-24T12:44:30.207 | 2011-02-24T12:44:12.757 | 603,444 | 532,527 | [
"visual-sourcesafe"
]
|
5,104,798 | 1 | null | null | 0 | 1,013 | I have made a custom `ListView` like the following

Currently I am showing only 2 views and updating the `ListView` adapter when user clicks on the navigation button and calling `notifyDataSetChanged`.Is it possible to make default implementation on the navigation so that we get the default behavior of `ListView`?
| Android ListView Navigation With Up and Down Button | CC BY-SA 2.5 | null | 2011-02-24T12:40:51.553 | 2011-02-24T18:42:51.063 | null | null | 463,721 | [
"android"
]
|
5,104,885 | 1 | 5,104,941 | null | 2 | 1,496 | I want to create a layout like the below picture. How can I set the drop-down like this with cancel option. I am using spinner to show the drop-down but cannot set the layout like this.

Can anyone help me to create a drop-down like this. I also want to create an expand button for a list item which will open the content in a new page. My aim is to set all the available settings in a single page.
| How to set a layout using spinner | CC BY-SA 2.5 | 0 | 2011-02-24T12:49:51.860 | 2011-02-24T12:59:34.080 | 2011-02-24T12:59:00.583 | 244,296 | 395,959 | [
"android",
"android-layout"
]
|
5,105,125 | 1 | 5,105,174 | null | 2 | 430 | I am having problems debugging a Windows Phone XNA game application. I can build it, but when emulator shows up I get the error:
I've read many topics on the same issue and in most cases the reason was not good enough graphics card. I don't think that's why I get this error. I would also like to mention that run Silverlight applications for WP7. Here are some screenshots:
[DxDiag window](https://i.stack.imgur.com/6xQR5.png)
[DxDiag display window](https://i.stack.imgur.com/SzrtM.png)
I also downloaded latest ATI Catalyst package today but it didn't help. Any ideas?
Thanks!
This is what I have just found out:

Is this maybe causing a problem. I am not sure because the error says the issue with display adapter.
| WP7 XNA Framework application requirements | CC BY-SA 2.5 | null | 2011-02-24T13:12:43.223 | 2011-02-24T13:32:56.193 | 2011-02-24T13:32:56.193 | 307,352 | 307,352 | [
"windows-phone-7",
"xna",
"directx"
]
|
5,105,314 | 1 | 5,106,693 | null | 0 | 498 | I am importing youtube video into my flash project but when I click the CC button I get an error image like this one

I have not seen anything in the [AS3 youtube api](http://code.google.com/apis/youtube/flash_api_reference.html) for any special parameters needed to use closed captioning. Also if I copy and paste the url it calls it works fine in a web browser.
any idea what I might be missing ?
| youtube as3 api closed captioning error | CC BY-SA 2.5 | null | 2011-02-24T13:31:56.497 | 2011-09-21T22:36:05.710 | 2011-09-21T22:36:05.710 | 211,160 | 234,670 | [
"actionscript-3",
"youtube",
"embedded-video",
"closed-captions"
]
|
5,105,469 | 1 | 5,105,510 | null | 1 | 679 | I m converting a template and everything is fine in ff. Problem is when i open converted template into internet explorer. I am using an image to make curve in navigation. That image's color matches with div's background color in ff but does not match in ie. another problem with ie is that back ground image of top navigation appears for a while and then disappears. I even tried a 1px image as background of div without any luck.
{note: problem1 is solved. it was because of ddroundies script that i m using to roundify divs.}

| image and CSS color in ie 8 problem | CC BY-SA 2.5 | 0 | 2011-02-24T13:47:04.403 | 2011-02-24T13:51:21.140 | null | null | 395,206 | [
"css",
"internet-explorer-8"
]
|
5,105,521 | 1 | null | null | 1 | 401 | I have a `Map<Category, List<Link>>` that i'm iterating over in my jsp:
```
<c:forEach var='entry' items='${categoryToLinkMap}'>
<div class="category_section">
<h2>${entry.key.name}</h2>
<ul>
<c:forEach var='item' items='${entry.value}'>
<li>
<a href="${item.href}">${item.label}</a>
</li>
</c:forEach>
</ul>
</div>
</c:forEach>
```
With the following CSS
```
.category_section {
float: left;
width: 300px;
height: 200px;
}
```
What I'm trying to achieve is a maximum of 3 sections horizontally, any more than that wrapping under. My CSS works as I want with the one drawback being I have to set the height or the div sections are all over the place. If I set the height and a category contains many items then the links overlap.
What's the best way to achieve this using CSS? Any thoughts on a different approach? I'm very new to front-end stuff so if it could be done better please let me know.
Edit: Here's a quick mock-up of what I'm trying to do:

| Styling map of lists using CSS | CC BY-SA 2.5 | null | 2011-02-24T13:52:43.607 | 2011-02-24T15:16:10.623 | 2011-02-24T15:16:10.623 | 344,079 | 344,079 | [
"css",
"jsp"
]
|
5,105,558 | 1 | null | null | 2 | 1,597 | I would like to have PyUnit stop showing up each time I hit . It's distracting and I don't understand it's output anyways, nor did I (knowingly) elect to enable it. I can't find anything in PyDev settings.

| How to stop/disable PyUnit when using PyDev | CC BY-SA 2.5 | 0 | 2011-02-24T13:56:06.177 | 2012-09-08T08:33:07.017 | 2012-09-08T08:33:07.017 | 1,077,601 | 321,731 | [
"eclipse",
"pydev",
"python-unittest"
]
|
5,105,781 | 1 | null | null | 0 | 189 | I have a query that takes ~20x as long for SQL server to execute when it comes from a web request, as it does from when the exact same query is ran via SQL Server Management Studio
The following screenshot is from the SQL Server Profiler. The first two records relate to the receipt and execution of query that's come in via the web request, whilst the third record is the exact same query run from SSMS. Why would there be a such a huge difference between the two?
A point: The query is generated from LINQ. I took a copy of the generated SQL and ran it in SSMS to get these results.

| Performance discrepancy in SQL Server Profiler between web query and the same query ran in SSMS | CC BY-SA 2.5 | null | 2011-02-24T14:15:38.167 | 2013-04-15T16:16:55.557 | null | null | 177,694 | [
"sql",
"sql-server-2005",
"linq-to-sql",
"sql-server-profiler"
]
|
5,105,812 | 1 | 5,105,895 | null | 1 | 560 | I am trying to prepare a layout which is same as the below attached image.
1. I try to set-up buttons exactly same(width) as indicated as 1 in image
2. I try to set "save" and "Cancel" buttons at below with equal width.

I have tried it with the below XML Layout:
```
<RelativeLayout
android:id="@+id/widget38"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="5dp">
<TextView
android:layout_width="wrap_content"
android:id="@+id/textView1"
android:text="Event"
android:layout_alignParentLeft="true"
android:layout_height="wrap_content">
</TextView>
<EditText
android:layout_width="fill_parent"
android:id="@+id/editText1"
android:layout_alignParentLeft="true"
android:hint="Tap to enter title"
android:layout_marginTop="5dp"
android:layout_height="wrap_content"
android:layout_below="@+id/textView1">
</EditText>
<View
android:id="@+id/separator"
android:background="#ffffff"
android:layout_width = "fill_parent"
android:layout_height="1dip"
android:layout_centerVertical ="true"
android:layout_below="@+id/editText1"/>
<TextView
android:layout_width="wrap_content"
android:id="@+id/textView2"
android:text="From"
android:layout_alignParentLeft="true"
android:layout_height="wrap_content"
android:layout_below="@+id/separator"
android:layout_marginTop="5dp">
</TextView>
<Button
android:layout_width="wrap_content"
android:id="@+id/button1"
android:layout_alignParentLeft="true"
android:text="Button"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2">
</Button>
<Button
android:layout_width="wrap_content"
android:id="@+id/button2"
android:text="Button"
android:layout_marginLeft="10dp"
android:layout_alignTop="@+id/button1"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/button1"
android:layout_below="@+id/button1">
</Button>
<View
android:id="@+id/separator1"
android:background="#ffffff"
android:layout_width = "fill_parent"
android:layout_height="1dip"
android:layout_centerVertical ="true"
android:layout_below="@+id/button2"/>
<TextView
android:layout_width="wrap_content"
android:id="@+id/textView3"
android:text="To"
android:layout_alignParentLeft="true"
android:layout_height="wrap_content"
android:layout_below="@+id/separator1"
android:layout_marginTop="5dp">
</TextView>
<Button
android:layout_width="wrap_content"
android:id="@+id/button3"
android:layout_alignParentLeft="true"
android:text="Button"
android:layout_height="wrap_content"
android:layout_below="@+id/textView3">
</Button>
<Button
android:layout_width="wrap_content"
android:id="@+id/button4"
android:text="Button"
android:layout_marginLeft="10dp"
android:layout_alignTop="@+id/button3"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/button3"
android:layout_below="@+id/button3">
</Button>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/relativeLayout1"
android:layout_alignParentBottom="true">
<Button android:layout_width="wrap_content" android:id="@+id/button5" android:layout_alignParentBottom="true" android:text="Save" android:layout_height="wrap_content"></Button>
<Button android:layout_width="wrap_content" android:id="@+id/button6" android:layout_alignParentBottom="true" android:text="Cancel" android:layout_height="wrap_content" android:layout_toRightOf="@+id/button5"></Button>
</RelativeLayout>
</RelativeLayout>
```
| android - problem in Layout | CC BY-SA 2.5 | null | 2011-02-24T14:18:16.020 | 2011-02-24T22:00:18.190 | 2011-02-24T22:00:18.190 | 21,234 | 379,693 | [
"android",
"android-layout",
"android-relativelayout"
]
|
5,105,901 | 1 | 5,106,223 | null | 5 | 3,491 | I'm having an issue finding out how to calculate an average over "x" days. If I try to plot this csv file over 1 year, it's too much data to display correctly on a plot line (screenshot attached). I'm looking to average the data over every few days (maybe 2, a week, etc..) so the line graph is not so hard to read. Any advice on how I would solve this issue with R?
results.csv
```
POSTS,PROVIDER,TYPE,DATE
29337,FTP,BLOG,2010-01-01
26725,FTP,BLOG,2010-01-02
27480,FTP,BLOG,2010-01-03
31187,FTP,BLOG,2010-01-04
31488,FTP,BLOG,2010-01-05
32461,FTP,BLOG,2010-01-06
33675,FTP,BLOG,2010-01-07
38897,FTP,BLOG,2010-01-08
37122,FTP,BLOG,2010-01-09
41365,FTP,BLOG,2010-01-10
51760,FTP,BLOG,2010-01-11
50859,FTP,BLOG,2010-01-12
53765,FTP,BLOG,2010-01-13
56836,FTP,BLOG,2010-01-14
59698,FTP,BLOG,2010-01-15
52095,FTP,BLOG,2010-01-16
57154,FTP,BLOG,2010-01-17
80755,FTP,BLOG,2010-01-18
227464,FTP,BLOG,2010-01-19
394510,FTP,BLOG,2010-01-20
371303,FTP,BLOG,2010-01-21
370450,FTP,BLOG,2010-01-22
268703,FTP,BLOG,2010-01-23
267252,FTP,BLOG,2010-01-24
375712,FTP,BLOG,2010-01-25
381041,FTP,BLOG,2010-01-26
380948,FTP,BLOG,2010-01-27
373140,FTP,BLOG,2010-01-28
361874,FTP,BLOG,2010-01-29
265178,FTP,BLOG,2010-01-30
269929,FTP,BLOG,2010-01-31
```
R Script
```
library(ggplot2);
data <- read.csv("results.csv", header=T);
dts <- as.POSIXct(data$DATE, format="%Y-%m-%d");
attach(data);
a <- ggplot(dataframe, aes(dts,POSTS/1000, fill = TYPE)) + opts(title = "Report") + labs(x = NULL, y = "Posts (k)", fill = NULL);
b <- a + geom_bar(stat = "identity", position = "stack");
plot_theme <- theme_update(axis.text.x = theme_text(angle=90, hjust=1), panel.grid.major = theme_line(colour = "grey90"), panel.grid.minor = theme_blank(), panel.background = theme_blank(), axis.ticks = theme_blank(), legend.position = "none");
c <- b + facet_grid(TYPE ~ ., scale = "free_y");
d <- c + scale_x_datetime(major = "1 months", format = "%Y %b");
ggsave(filename="/root/results.png",height=14,width=14,dpi=600);
```
Graph Image

| R Script to average value over every <x> days | CC BY-SA 2.5 | 0 | 2011-02-24T14:25:09.213 | 2012-04-27T08:17:18.767 | 2011-02-24T15:11:08.850 | 370,756 | 632,468 | [
"r"
]
|
5,106,039 | 1 | 5,106,146 | null | 0 | 286 | This is a example Price Plan (See image).

Matrix £15 and Matrix £20 is a contract plan for mobile phone. Every plan has different point for each phone.
This is what I came up with database design tables. Is this correct?
# Phones
- -
4, iPhone
9, Blackberry
# phone_plan
- - -
1, 4, 6
2, 4, 7
3, 9, 6
4, 9, 7
# plan_packag
- - -
6, Matrix, 15.00
7, Matrix, 20.00
# points
- - - -
1, 4, 6, 6.0
2, 4, 7, 6.6
3, 9, 6, 8.3
4, 9, 7, 9.2
| Price plan, feedback on database design | CC BY-SA 2.5 | null | 2011-02-24T14:36:00.760 | 2011-02-24T14:44:18.787 | null | null | 622,378 | [
"mysql",
"database",
"database-design"
]
|
5,106,216 | 1 | 5,945,207 | null | 0 | 614 | A "simple" situation:
Assembly1 contains:
-
Calling Assembly contains:
- `ElementHost`- `UserControl`
The WinForm uses the `NavigationService` from the MainFrame to navigate to an absolute Uri in a like this:
```
NavigationService.Navigate(new Uri("pack://application:,,,/Assembly1;component/Page1.xaml", UriKind.Absolute);
```
Navigated page is displayed, all fine until now. Now when I look at the `NavigationService.CurrentSource` (which is the Uri of the currenlty loaded page) it looks like this:

All kinds of Exceptions...And what is also weird is that the property `IsRelative` is `True` and the `OriginalString` property states : "/Assembly1;component/Page1.xaml". The whole "pack-part" is lost. So when using the Uri again (what i would like) results in errors because this Uri doesn't give me a correct path anymore.
Am I missing some essential part of the NavigationModel in WPF? Any help would be appreciated!
| Why is my URI messed up when using NavigationService? | CC BY-SA 2.5 | 0 | 2011-02-24T14:50:37.997 | 2011-05-10T04:36:59.680 | null | null | 468,910 | [
"wpf",
"navigation",
"uri"
]
|
5,106,268 | 1 | 5,107,343 | null | 2 | 295 | I'm using C#2.0 and I want to create a facebook style tooltip window. I currently made it with 2 windows and transparent key. One for the triangle arrow pointer and one for the square. The whole picture looks like that:

I have problem with the redrawing (as shown in the picture).
Is there a way to use whole shaped window on that? (While I need to make it sizeable)
If no, is this the proper way to make that? Or I need to 'glue' the triangle to the rectangle
| Redrawing and custom shaped windows question | CC BY-SA 2.5 | null | 2011-02-24T14:54:43.937 | 2011-02-24T22:31:24.240 | null | null | 309,145 | [
"c#",
".net",
"winforms",
"winapi",
"c#-2.0"
]
|
5,106,578 | 1 | 5,106,731 | null | 5 | 10,967 | I would like to display a row of tow divs next to each other while in the next row, the next div sits directly under the last one. Like this:

Because the layout has to be built into an CMS, I can't put Box 1,3 and 2,4 in a separat div. Is there a way to achieve this kind of behavior without extra wrapping elements? (Normal float behavior doesn't work, display inline/inline-block also doesn't do the trick.) Or is some JavaScript required to build a layout like this?
| Position floated elements directly under each other | CC BY-SA 2.5 | 0 | 2011-02-24T15:17:48.373 | 2012-05-11T14:00:49.277 | 2012-05-11T14:00:49.277 | 44,390 | 461,992 | [
"css",
"positioning",
"css-float"
]
|
5,106,716 | 1 | 5,108,670 | null | 7 | 1,468 | I'm writing a Win32 plug-in DLL for a third-party MFC app. The DLL needs to display a modal dialog. When I do this using `DialogBox()` or other plain Win32 API (e.g. I tried to write my own modal loop), the main application's window doesn't redraw all elements: it redraws standard elements, but not the client area. Modeless dialogs display just fine.

I suspect this happens because MFC doesn't really have modal dialogs in Win32 sense. It can only have one message loop and a separate loop in `DialogBox()` disrupts its delicate machinery. Here's [a CodeProject article](http://www.codeproject.com/KB/dialog/notmodaldialogs.aspx?msg=3289022) that explains this. But this CodeProject article is 9 years old, so maybe things have changed since then. Could somebody shed some light on this? The app uses MFC 8 (i.e. `mfc80.dll`).
. Here's a link to the [original question](https://stackoverflow.com/questions/5058929/win32-modal-dialog-leaves-a-trail-in-the-client-area-of-parent-owner); it may contain some additional information.
. Thanks everyone; I really appreciate all the advice, it certainly helps me to get the big picture of how things fit together. The first path I'm going to explore is to use native MFC 'modal' dialogs. (Since I do all this from Python, I'll use Python bindings for MFC, `pywin32`). This will take some time; when it's ready, I'll update the post with results.
| MFC application and a non-MFC modal dialog | CC BY-SA 2.5 | 0 | 2011-02-24T15:28:36.327 | 2011-02-25T08:17:11.673 | 2017-05-23T12:30:36.590 | -1 | 478,521 | [
"winapi",
"mfc",
"modal-dialog"
]
|
5,106,939 | 1 | 5,107,096 | null | -1 | 245 |
So I followed the simple "Hello Android" tutorial:
[http://developer.android.com/resources/tutorials/hello-world.html](http://developer.android.com/resources/tutorials/hello-world.html)
got everything set up fine.....stuff works but when I go to actually run it.....it just says "Android_" in my virtual device....
I tried running it on 2.1 2.2 2.3.1 and 2.3.3 VD's and get the same thing?
```
package com.example.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
}
}
```
Any ideas? My first venture into android is a failing one ;_;
PIC:

bigger:[http://img.photobucket.com/albums/v720/bmw_pyro/Untitled-2.png](http://img.photobucket.com/albums/v720/bmw_pyro/Untitled-2.png)
MANIFEST:
```
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloandroid"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".HelloAndroid"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
```
| Simple Hello Android.....not workign | CC BY-SA 2.5 | null | 2011-02-24T15:47:59.783 | 2011-02-24T16:09:08.587 | 2011-02-24T16:09:08.587 | null | null | [
"android"
]
|
5,107,023 | 1 | 5,107,226 | null | 30 | 16,079 | In Eclipse it is possible to configure certain "favorite" classes which will be looked up when code completetion is invoked to see if a static import can be added for a method (this is under ).
For example, I can begin to type `assertT`, and Eclipse will ask if I want to add a static import of `org.junit.Assert.assertTrue;`.

Is it possible to do the same thing in IntelliJ?
[The method detailed in this question](https://stackoverflow.com/questions/4387134/intellij-static-import-completion) will add a `*` import for the type (`static import org.junit.Assert.*`), but I do not want to add star-imports. I'd prefer to import just the methods I am using.
| Add favorite methods to static import in IntelliJ? | CC BY-SA 3.0 | 0 | 2011-02-24T15:53:53.933 | 2015-05-15T16:26:05.487 | 2017-05-23T12:34:41.050 | -1 | 4,249 | [
"java",
"intellij-idea"
]
|
5,108,291 | 1 | 5,108,740 | null | 1 | 2,389 | I have a series of data that is produced by state and information type. For each state I have, for example, 3 files that have an identifier in the file name to tell me which information group it is for. The data in these files consists of rows of data that have varying lengths depending on the file type. Type 1 always has 245 comma separated values, Type 2 has 215, Type 3 has 300.
I have 3 separate SSIS 2005 packages set up to import this data but I was wondering if there is a way to do this in one package with either a Conditional Split or a Scripting Task.
I have tried the Conditional Split but it looks to me like it is expecting to have to check a row value. I then looked at the code [here](http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/) that uses a Scripting Task. I cannot get this code to compile as it complains about "DTS not being defined." This is probably one of those cases where the author assumes I have knowledge in some, for him, basic SSIS idea - and that I do not have that knowledge.
I have modified the code there to be:
```
Imports System
Imports System.Data
Imports System.Math
Imports System.IO
Imports Microsoft.SqlServer.Dts.Runtime
Public Class ScriptMain
' Created: Zack Bethem – AmberLeaf
Public Sub Main()
Dim fileLoc, fileName As String
If Dts.Variables.Contains("User::fileName") = True Then
fileName = CStr(Dts.Variables.Item("User::fileName").Value)
If fileName.Contains("0074000") Then
Dts.Variables.Item("User::SexByInd").Value = True
ElseIf fileName.Contains("0072000") Then
Dts.Variables.Item("User::SexByOcc").Value = True
ElseIf fileName.Contains("0022000") Then
Dts.Variables.Item("User::Migration").Value = True
End If
Dts.TaskResult = Dts.Results.Success
Else
Dts.TaskResult = Dts.Results.Failure
End If
End Sub
End Class
```
As you can see from the code:
I am looping over the files in a directory using a For Each loop.
I am assigning the file name for each file to `User::fileName` and then checking if the file name contains one of 3 string elements.
If it contains Type 1 then it goes to a different branch than Type2/Type3, etc.
Since this code does not compile I am cannot check to see if the rest of his example will work. I am not sure what kind of Scripting Task he is using either since I was presented with 3 options but all involved some kind of manipulation of a row or row element of data from as the Input to the Scripting Task. What I want to do is pass the `User::fileName` as the input and get then test the boolean values of the other 3 `User::` variables to make the 3 branches.
My current thinking is this:
Inside a single For Each Loop there is this Data Flow Task:
```
Scripting Task
/ | \
(Type1) (Type2) (Type3)
| | |
CSV_Files1 CSV_Files2 CSV_Files3
| | |
OLEDB_Dest1 OLEDB_Dest2 OLEDB_Dest3
```
Where the CSV_Files1-3 use a unique SourceConnectionFlat file to read/map the columns to the OLEDB_Dest tables.
EDITS:

| Conditional Data Flow Based on Source CSV Filename | CC BY-SA 2.5 | null | 2011-02-24T17:33:12.740 | 2011-02-24T18:29:48.287 | 2011-02-24T18:29:48.287 | 33,727 | 33,727 | [
"sql-server-2005",
"ssis"
]
|
5,108,880 | 1 | 5,109,320 | null | 0 | 573 | i would like my spinner to be as in the picture.i can do it if i follow the android.developers example,but in my app,its necessary to get the spinner items from the java file and not from the strings.xml.this is my code(my code creates a spinner as in the photo but there is radiobutton when the spinner is closed,next to the first spinner item.i want this radio to disappear)
```
array_spinner=new String[4];
array_spinner[0]="a";
array_spinner[1]="b";
array_spinner[2]="c";
array_spinner[3]="d";
Spinner s = (Spinner) findViewById(R.id.spinner);
ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_spinner_item, array_spinner);
s.setAdapter(adapter);
```

WHEN THE SPINNER IS OPEN:
now:

I would like to be:

| Appearance of the spinner | CC BY-SA 2.5 | null | 2011-02-24T18:30:44.387 | 2012-09-29T11:16:19.783 | 2012-09-29T11:16:19.783 | 1,465,910 | 519,526 | [
"java",
"android"
]
|
5,108,921 | 1 | 5,110,332 | null | 36 | 8,759 | I am trying to draw a color wheel for an iPhone, but I can't get the gradient to rotate around a point. I am trying to use gradients but objective-c provides a linear gradient, which draws a gradient in a straight line like this:

and a radial gradient, which draws the gradient starting at point and radiating out in all directions like this:

I want to draw a linear gradient that rotates around a point like this:

| How to draw a color wheel in objective-c | CC BY-SA 2.5 | 0 | 2011-02-24T18:33:45.790 | 2019-02-22T08:40:51.057 | 2011-02-24T19:19:34.580 | 473,902 | 473,902 | [
"iphone",
"objective-c"
]
|
5,109,007 | 1 | 5,109,044 | null | 0 | 272 | Is there a simple way to add a styled line of small text next to the first line in a select box?
For example:

I'm using code like the following:
```
<select name="textarea" size="10" multiple="multiple" id="textarea">
<option>something</option>
<option>something else</option>
<option>another thing</option>
</select>
```
The text would only ever need to be displayed next to what ever data was on the first line. If you could help that would be brilliant!
| Line of text next to the first line in a select box? | CC BY-SA 2.5 | 0 | 2011-02-24T18:42:12.140 | 2011-02-24T18:46:54.277 | null | null | 539,939 | [
"javascript",
"css"
]
|
5,109,256 | 1 | null | null | 0 | 76 | See the following Photo :

How can I programmatically separate the three photos?
| Separate photos of Photo | CC BY-SA 2.5 | null | 2011-02-24T19:07:13.470 | 2011-02-24T19:26:40.167 | 2011-02-24T19:16:00.553 | 102,937 | 617,348 | [
"c#",
"winforms"
]
|
5,109,666 | 1 | 5,110,372 | null | 2 | 247 | I have two tables in my database - gl_weather_locations and gl_weather_data.




I need to select location name, latitude and longitude from the locations table, then get only the most recent set of records for the corresponding lat/long in the data table - there can be multiple sets, as the database is populated from a web service that's updated every 2 hours. We need to keep archival data, so we can't keep only the most recent set of records, we need to keep all of them. But I'm a little confused as to how to limit my query to only the most recent set (there are multiples of 3 data records for each location - one for wind speed, one for wind direction, and one for wave height - we need to get the most recent of all three.)
What I have so far is:
```
SELECT l.location_name, l.location_lat, l.location_long, d.weather_type,
d.weather_value, d.weather_unit
FROM gl_weather_locations l
LEFT JOIN gl_weather_data d ON l.location_lat = d.weather_lat
```
(In our case, we're working with a limited number of locations and it's absolutely confirmed that we do not have more than one location with the exact same latitude, so we can safely do the join on only the latitude, rather than needing to also compare longitude.)
I'm confused as to how I can make sure I only get the most recent set of records for each latitude. If it helps, the weather_time field is identical for all of the records in a set (i.e. we have 10 locations, 3 records per location per run of the web service, so we have 30 records with identical values in weather_time.) Could I somehow use that in an order by or group by or something?
| Help with join query and return limit | CC BY-SA 2.5 | 0 | 2011-02-24T19:48:14.643 | 2011-02-25T17:01:17.997 | 2011-02-24T21:06:18.083 | 135,152 | 341,611 | [
"mysql",
"sql",
"join",
"greatest-n-per-group"
]
|
5,109,737 | 1 | 5,109,774 | null | 5 | 16,614 | !Hi
I have a hard time trying to copy vector of pointers to Point.
I have a
```
vector<Point*> oldVector
```
and I want to copy this vector into other vector. So I used a copying constructor. I did this that way
```
vector<Point*> newVector = vector<Point*>(oldVector.begin(),oldVector.end());
```
Unfortunately I get an exception/error if I ran this function.
> vector interators incompatible
What may be the problem ??
EDIT
There must be a bigger problem with iterators, it seems that I can't use iterators at all. I wanted to add two stl vectors into each other so I used wrote sth like this
```
vector<int> a, b;
b.insert(b.end(), a.begin(), a.end());
```
and I get the sama exception/error during execution of this line

| STL cloning a vector | CC BY-SA 2.5 | null | 2011-02-24T19:55:37.837 | 2011-02-26T14:13:18.823 | 2011-02-26T14:13:18.823 | 392,521 | 392,521 | [
"c++",
"stl",
"vector"
]
|
5,109,956 | 1 | null | null | 1 | 656 | Basically, I'm looking for something like this awesome research project: [Gmap](http://www.cs.arizona.edu/~kobourov/PROJECTS/maps.html), which was referenced in [this related SO question](https://stackoverflow.com/questions/5074024/algorithm-from-adjacency-list-to-visual-map/).
It's a rather novel data visualization that combines a network graph with an imaginary set of regions that looks like a map. Basically, the map-ification helps humans comprehend the enormous data set better.

Cool, huh? GMap doesn't appear to be open source, though I plan to contact the authors.
I already know how to create a network graph with a force-directed layout (currently using Prefuse/Flare), so an answer be a way to layer a mapping algorithm on top of an existing graph. I'm also not concerned about the client-side right now - this would be a backend process, and I am flexible about technology stack and data output at this stage.
There's also [this paper](http://arxiv.org/pdf/0907.2585v1) that describes the algorithm backing GMap. If you have heard of Voronoi diagrams (which rock, but make my head hurt), this paper is for you. I quit after Calc 1, though, so I'm hoping to avoid remembering what sigmas and epsilons are.
| How can I produce visualizations combining network graphs and imaginary maps? | CC BY-SA 2.5 | 0 | 2011-02-24T20:19:38.020 | 2011-04-07T06:56:38.107 | 2017-05-23T10:30:23.117 | -1 | 286,599 | [
"graph",
"dictionary",
"mapping",
"data-visualization",
"prefuse"
]
|
5,110,952 | 1 | 5,111,194 | null | 2 | 11,442 | I know i can use imagebutton for image buttons. But i want to use css sprites to decrease downloaded image count. So i want to assign normal buttons to image via css class. But it seems like not working.
Here is the code and image i try

the button codes
```
<asp:Button ID="btn1" CssClass="filter-tr" runat="server" />
<br />
<br />
<br />
<asp:Button ID="Button2" CssClass="filter-en" runat="server" />
<br />
<br />
<br />
<asp:Button ID="Button3" CssClass="flying" runat="server" />
<br />
<br />
<br />
<asp:Button ID="Button1" CssClass="fire" runat="server" />
```
here the css class code
```
.filter-tr, .filter-en, .flying, .fire
{ display: block; background: url('images/image1.png') no-repeat; }
filter-tr { background-position: -0px -0px; width: 60px; height: 25px; }
filter-en { background-position: -0px -25px; width: 60px; height: 25px; }
flying { background-position: -0px -50px; width: 44px; height: 16px; }
fire { background-position: -0px -66px; width: 44px; height: 16px; }
```
but this way it works
```
.filter-tr { display: block; background: url('images/image1.png') no-repeat; background-position: -0px -0px; width: 60px; height: 25px; border-width:0px; }
```
| Assign ASP.net Button image via css class | CC BY-SA 2.5 | null | 2011-02-24T21:54:05.910 | 2011-02-24T22:16:16.540 | 2011-02-24T21:59:25.867 | 310,370 | 310,370 | [
"c#",
"asp.net",
"css",
"class",
"button"
]
|
5,111,125 | 1 | 5,111,379 | null | 2 | 1,001 | We have `UnhandledExceptionEventHandler` in place and unexpected exceptions were caught by that handler. But why we still see the following screen? I thought if we handled the exception, it will not go up to the OS. If no exception reach the system level, why that screen still show up?

| how to avoid windows crash screen | CC BY-SA 2.5 | 0 | 2011-02-24T22:09:19.250 | 2014-08-19T18:23:01.750 | null | null | 117,039 | [
"c#",
".net",
"wpf",
"windows"
]
|
5,111,277 | 1 | 5,119,972 | null | 3 | 2,859 | I'm trying to implement the wmd-editor from the [google code repository](http://code.google.com/p/wmd-new/) (like the one used on stackoverflow right here) and I'm running into an issue.
As you type into the textarea, it kicks off two paint operations in the browser. One to repaint the textarea itself, and one to repaint the preview panel. You can watch this happening on stackoverflow by opening the chrome inspector and using the timeline tab while typing some text into a question field.
But on my page, the browser repaints the entire viewport when it has to do these paint operations. And that takes much longer... about 100ms for each paint operation on my page versus about 1ms on stackoverflow.
In my testing this seems to be css related... I can recreate this behavior in the wmd-new example page by stripping all styles.
My page isn't public yet, but hopefully I can ask in a generic way... what will cause the browser to repaint the entire viewport on a dom change instead of just repainting that portion of the dom?
A view of what I'm talking about here.

| What actions and events cause a browser to repaint its entire viewport? | CC BY-SA 2.5 | 0 | 2011-02-24T22:23:16.330 | 2011-02-25T16:44:18.507 | null | null | 100,506 | [
"javascript",
"css",
"dom",
"wmd",
"wmd-editor"
]
|
5,111,577 | 1 | null | null | 5 | 2,599 | Developing an iPhone app.
I've got a really strange problem where, every once in a while, the status bar at the top of my app screen will turn solid black. Not like the black version of the status bar, but like a solid black rectangle with NO text/icons. It's very rare, but usually seems to occur after returning to the app via multi-tasking or from a locked device (the app has been running in the background). I've seen it occur on both 3GS and iPhone4. Here's a screenshot:

I can never reproduce it when trying, it just seems to eventually happen at some point (sometimes it will go for days without happening).
Once it does occur, the app seems to continue functioning fine, even with the status bar gone, except for when I do one specific action in the app which will cause everything to freeze up all the sudden (the app doesn't crash, but everything on screen is frozen and non-interactive). Without explaining the design in detail, the specific action that causes it to freeze up (after the bug appears) is performing a simple upload in the background to a SQL database. Resetting the app is the only way to fix the problem once the black status bar appears.
Anyone else ever experienced this? I can't find a single thread anywhere explaining similar behavior, and it's driving me nuts.
| iOS - status bar randomly turns solid black | CC BY-SA 2.5 | 0 | 2011-02-24T22:56:05.583 | 2018-03-19T13:18:42.977 | 2011-02-25T00:34:33.447 | 149,316 | 591,520 | [
"iphone",
"ios",
"statusbar",
"uistatusbar"
]
|
5,111,701 | 1 | null | null | 1 | 618 | I want to implement something like this on my site:

The slider should appear when the user scrolls to the end of an article
Is there a jQuery plugin that handles this? [jQuery Waypoints](http://imakewebthings.github.com/jquery-waypoints/#documentation) looks promising, but I was hoping someone had a more specific solution.
| Implementing a nytimes-style "end of article suggestion slider" | CC BY-SA 2.5 | 0 | 2011-02-24T23:09:19.930 | 2012-04-23T06:13:34.750 | 2017-02-08T14:31:38.927 | -1 | 25,068 | [
"jquery"
]
|
5,111,748 | 1 | 5,111,837 | null | 7 | 12,192 | How is a basic footer set to a UITableView programmatically?
Just a centered text?
EDIT:
How can the bar color be set and the footer bar position fixed to the bottom of the screen or if the thumbs dont fill a screen, the footer isnt above the bottom of the screen.

| Setting a basic footer to a UITableView | CC BY-SA 2.5 | 0 | 2011-02-24T23:14:22.257 | 2011-02-25T00:24:33.573 | 2011-02-25T00:17:03.200 | 356,387 | 356,387 | [
"iphone",
"uitableview"
]
|
5,111,745 | 1 | 5,115,366 | null | 1 | 401 | Let's say I got a collection (simple grid) of invaders:

In this image, only invader type C can shoot.
Shots are fired, an invader gets destroyed:

Now, invader type B in the third column in the second row can fire as well. Note that there can only be three random invader shots on the screen at the same time. So only three of the invaders in the set {C, C, B, C, C, C} can shoot.
How would I go about implementing this? I am thinking of two solutions:
1. Use an array of arrays [][] (or [,]). When an invader get shot, the place where the invader was gets set to null. Then, when it's time for the invaders to fire, there's a loop going over the first row. Encountering a null makes it check the space above the null. Is it null? Then do the same for the space above that. Is the space in the uppermost row null? Go to the next column in the first row.
2. Each invader type has a position (I use Point for that). Assign to each position the row number (the collection used will be some sort of dictionary). So, when looking at the image, all C's get a 1, all B's get a 2, and all A's get a 3. In this picture, C at position (2, 2) is destroyed. It should then subtract 1 from it the Y value of the point, which will be (2, 1). If there's a position like that in the collection, then assign the invader at that position (2, 1) to the position of the invader that got destroyed (2, 2).. Like this, I don't have to have a jagged array containing a bunch of nulls.
My thoughts about how it should look like -> when the game starts the first set is {C C C C C C} and then it will be {C C B C C C}. From this set, three will be randomly chosen to fire.
So, any thoughts?
| A grid based layout game and removing items | CC BY-SA 2.5 | null | 2011-02-24T23:14:06.560 | 2011-02-25T20:39:12.963 | 2011-02-24T23:19:56.327 | 543,269 | 543,269 | [
"algorithm",
"c#-4.0",
"xna"
]
|
5,111,764 | 1 | null | null | 0 | 166 | 
I am trying to see if my understanding of "othello" fame is correct or not. According to the rules, we flip the dark/light sides if we get some sequence like X000X => XXXXX. The question I have is if in the process of flipping 0->X or X-> 0, do we also need to consider the rows/columns/diagonals of newly flipped elements? e.g. consider board state as shown in above image(New element X is placed @ 2,3)
When we update board, we mark elements from 2,3 to 6,3 as Xs but in this process elements like horizontal 4,3 to 4,5 and diagonal 2,3 to 4,5 are also eligible for update? so do we update those elements as well? or just the elements which have starting as 2,3 (i.e update rows/column/diagonal whose starting point is the element we are dealing with, in our case 2,3?)
Please help me understand it
| "Othello" game needs some clarification | CC BY-SA 2.5 | null | 2011-02-24T23:16:30.820 | 2011-02-24T23:30:24.110 | 2011-02-24T23:22:27.783 | 608,853 | 608,853 | [
"language-agnostic"
]
|
5,112,043 | 1 | 5,112,436 | null | 1 | 630 | Mix 1 look at the source-code of my site with 19 chars of byte-wasting letters `background-position`, for the sprite icons positions, and you get a feel of my little frustration on this long word:
`background-position`
Using it singularly is fine, but when setting hundreds of sprite icons it's just silly byte-wasting. So my question is: that can replace this long word? If so, it would save me half my page's bytes!
Just have a look at the insanity of it on the pic below...
Cheers and much appreciated!
# update:
notice that every single icon has its own, unique icon and unique background offset.
---

| How can I minify CSS? Shorthand for property [ background-position ]? | CC BY-SA 2.5 | 0 | 2011-02-24T23:53:32.740 | 2011-02-25T00:53:28.627 | 2011-02-25T00:42:04.440 | 509,670 | 509,670 | [
"css",
"background",
"minify",
"background-position"
]
|
5,112,357 | 1 | 5,112,407 | null | 0 | 630 | I was under the impression that every View in your application has it's own unique URL. For example:
Home/Index
Home/Test
Home/Error
Home/Help
In my Upload controller I call on the Error view. Yet the URL stays on what it was before, not changing to reflect the error url.
```
[HttpPost]
public ActionResult Index(HttpPostedFileBase excelFile)
{
if (excelFile != null)
{
*Snip for brevity, everything is peachy here.*
return View();
}
else
{
return View("Error");
}
}
```
Any suggestions why this is the case?



Shouldn't the URL be /Upload/Error? Thank you for your help. :)
| Why is this URL like this in MVC3? | CC BY-SA 2.5 | null | 2011-02-25T00:41:55.970 | 2011-02-25T01:05:22.607 | 2011-02-25T00:55:41.067 | null | null | [
"c#",
"asp.net-mvc-3",
"view"
]
|
5,112,448 | 1 | 5,112,487 | null | 5 | 2,655 | I'm trying to implement a gauge widget for a website. The spec says only HTML/CSS is allowed, so I can't use JavaScript (don't ask me why -- maybe if there's a simple way of doing it with JavaScript I could persuade the project lead).
So far I have a `div` with a background image that shows the back of the gauge. Inside this div is an `img` that is rotated, depending on the gauge value. This value is dynamically injected into the HTML using PHP.
, but breaks in IE. If I add a border to the image I can see why -- it appears that the IE rotation also includes an automatic translation so that the needle is off-center (see screenshot below).
So, here's the question: how do I shift the needle back to the center of the gauge in IE?

```
<div style="background: url('genies/gauge.png'); background-repeat: no-repeat; height: 235px; overflow: hidden;">
<img src="genies/gauge-needle.png"
style="-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678118655, M12=-0.70710678118655,M21=0.70710678118655, M22=0.70710678118655, sizingMethod='auto expand'); zoom: 1;" />
</div>
```
| Image rotation in IE causes automatic translation. How do I remove the translation? | CC BY-SA 2.5 | 0 | 2011-02-25T00:55:05.417 | 2012-08-22T12:19:47.317 | 2011-02-25T01:03:54.217 | 336,419 | 336,419 | [
"html",
"css",
"image",
"internet-explorer",
"rotation"
]
|
5,112,504 | 1 | 5,123,401 | null | 1 | 1,723 |
## Background
Use Ajax to fire an event to the web server when a list of items are selected. The element is a JSF `rich:orderingList` item.
## Problem
The class that must receive the event:
```
public class BusinessAreaListHandler extends ListHandler<ListElement> {
private static final long serialVersionUID = -581048454118449233L;
public BusinessAreaListHandler() { load(); }
public List<ListElement> getBusinessAreas() { return getList(); }
public Set<ListElement> getSelection() { return getSet(); }
public void select() {
System.out.println( "Clicked Element" );
}
protected void load() {
appendList( new ListElement( "employee" ) );
appendList( new ListElement( "company" ) );
appendList( new ListElement( "payroll" ) );
}
}
```
The `ListElement` container object:
```
public class ListElement implements Serializable {
private static final long serialVersionUID = 5396525520175914504L;
public final static char SEPARATOR = ':';
private String id, value;
protected ListElement( String value ) {
this( Integer.toString( value.hashCode() ), value );
}
public ListElement( String id, String value ) {
setId( id );
setValue( value );
}
@Override
public int hashCode() {
return (53 * (getId().hashCode() + 5)) + (53 * (getValue().hashCode() + 5));
}
@Override
public boolean equals( Object obj ) {
ListElement le = null;
if( obj != null && obj instanceof ListElement ) {
le = (ListElement)obj;
}
return le == null ? false : compare( le );
}
private boolean compare( ListElement le ) {
return getId().equals( le.getId() ) && getValue().equals( le.getValue() );
}
public String getId() {
return this.id == null ? "" : this.id;
}
public void setId( String id ) {
this.id = id;
}
public String getValue() {
return this.value == null ? "" : this.value;
}
public void setValue( String value ) {
this.value = value;
}
@Override
public String toString() {
return getValue();
}
}
```
The `ListConverter`:
```
public class ListConverter implements Converter {
@Override
public Object getAsObject( FacesContext fc, UIComponent ui, String value ) {
ListElement result = new ListElement( value );
int index = value.lastIndexOf( ListElement.SEPARATOR );
System.out.println( "Convert FROM: " + value );
if( index > 0 ) {
String id = value.substring( 0, index );
String v = value.substring( index + 1 );
result = new ListElement( id, v );
}
System.out.println( "Convert TO : " + result.toString() );
return result;
}
@Override
public String getAsString( FacesContext fc, UIComponent ui, Object value ) {
return value.toString();
}
}
```
The XHTML fragment that sets up the list and event actions:
```
<h:panelGrid columns="2">
<h:panelGroup>
<rich:orderingList value="#{businessAreas.list}" var="businessArea" converter="businessAreaConverter" immediate="true" orderControlsVisible="false" fastOrderControlsVisible="false" selection="#{businessAreas.selection}" id="BusinessAreas">
<f:facet name="caption">
<h:outputText value="Business Areas" />
</f:facet>
<rich:column>
<h:outputText value="#{businessArea}" />
</rich:column>
<a4j:support event="onclick" ignoreDupResponses="true" requestDelay="500" action="#{businessAreas.select}" reRender="ColumnClusters" />
<a4j:support event="onkeyup" ignoreDupResponses="true" requestDelay="500" action="#{businessAreas.select}" reRender="ColumnClusters" />
</rich:orderingList>
</h:panelGroup>
<h:panelGroup>
<rich:listShuttle sourceValue="#{columnClusters.list}" targetValue="#{domainContent.list}" var="columnCluster" converter="columnClusterConverter" sourceRequired="false" targetRequired="true" moveControlsVisible="true" orderControlsVisible="false" fastOrderControlsVisible="false" sourceCaptionLabel="Column Clusters" targetCaptionLabel="Domain Content" copyTitle="Move" copyControlLabel="Move" copyAllControlLabel="Move All" copyAllTitle="Move All" id="ColumnClusters">
<rich:column>
<h:outputText value="#{columnCluster}" />
</rich:column>
</rich:listShuttle>
</h:panelGroup>
<h:panelGroup>
<h:commandButton action="action" value="Create Domain" />
</h:panelGroup>
</h:panelGrid>
```
The corresponding managed bean is set in `faces-config.xml` correctly.
Browser output:

## Error Message
The following error message is displayed:
> INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=j_id2:ColumnClusters[severity=(ERROR 2), summary=(j_id2:ColumnClusters:
Validation Error: Value is required.), detail=(j_id2:ColumnClusters: Validation Error:
Value is required.)]
## Logging
```
New Element (Hash:Value): 1193469614:employee
New Element (Hash:Value): 950484093:company
New Element (Hash:Value): -786522843:payroll
New Element (Hash:Value): 3373707:name
New Element (Hash:Value): -1147692044:address
New Element (Hash:Value): 114603:tax
New Element (Hash:Value): 1193469614:employee
Convert FROM: employee
Convert TO : employee
New Element (Hash:Value): 950484093:company
Convert FROM: company
Convert TO : company
New Element (Hash:Value): -786522843:payroll
Convert FROM: payroll
Convert TO : payroll
New Element (Hash:Value): 3373707:name
Convert FROM: name
Convert TO : name
New Element (Hash:Value): -1147692044:address
Convert FROM: address
Convert TO : address
New Element (Hash:Value): 114603:tax
Convert FROM: tax
Convert TO : tax
```
## Question
What is required to trigger a call to `select()` in `BusinessAreaListHandler` when users select (or deselect) items?
## References
- [http://anonsvn.jboss.org/repos/richfaces/branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java](http://anonsvn.jboss.org/repos/richfaces/branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java)- [http://anonsvn.jboss.org/repos/richfaces/branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml](http://anonsvn.jboss.org/repos/richfaces/branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml)- [http://livedemo.exadel.com/richfaces-demo/richfaces/orderingList.jsf](http://livedemo.exadel.com/richfaces-demo/richfaces/orderingList.jsf)- [Richfaces combobox on selection changed event](https://stackoverflow.com/questions/3169661/richfaces-combobox-on-selection-changed-event)
Thank you!
| Validation Error: Value is required error for list selection event | CC BY-SA 2.5 | null | 2011-02-25T01:06:03.277 | 2011-03-01T00:17:32.073 | 2017-05-23T12:30:36.930 | -1 | 59,087 | [
"java",
"ajax",
"events",
"jsf",
"richfaces"
]
|
5,112,543 | 1 | 5,159,637 | null | 6 | 4,202 | I need direct-to-printer functionality for my website, with the ability to distinguish a physical printer from a virtual printer (file).
Coupons.com has this functionality via a native binary which must be installed by the user. I'd prefer to avoid that.
SmartSource.com does it via Java applet:

Does anybody know how this is done? I dug through that Java APIs a bit, and don't see anything that would let you determine physical vs virtual, except looking at the name (that seems prone to misidentification). It would be nice to be able to do it in Java, because I already know how to write Java applets. Failing that, is there a way to do this in Flash or Silverlight?
Thanks in advance.
Well deserved bounty awarded to Jason Sperske who worked out an elegant solution. Thanks to those of you who shared ideas, as well as those who actually investigated SmartSource.com's solution (like Adrian).
| Portable way to determining of printer is physical or virtual | CC BY-SA 2.5 | 0 | 2011-02-25T01:13:58.873 | 2011-03-03T23:22:12.267 | 2011-03-03T23:22:12.267 | 501,459 | 501,459 | [
"java",
"silverlight",
"flash",
"printing",
"hardware"
]
|
5,112,607 | 1 | 5,112,638 | null | 36 | 87,992 | How do I import libraries in my Java program without using an IDE, like [NetBeans](https://en.wikipedia.org/wiki/NetBeans)?
In NetBeans I do it this way:

How can I achieve the same thing by just using [Notepad++](https://en.wikipedia.org/wiki/Notepad%2B%2B) or [Programmer's Notepad](https://github.com/simonsteele/pn).
As much as possible I don't want to use NetBeans because it would be overkill since I'm only working on simple projects.
| How to include libraries in Java without using an IDE | CC BY-SA 4.0 | 0 | 2011-02-25T01:26:59.733 | 2022-11-24T20:40:34.123 | 2022-11-18T00:28:20.127 | 63,550 | 225,269 | [
"java",
"libraries"
]
|
5,113,005 | 1 | 5,113,159 | null | 3 | 2,111 | Please take a look at the following content:

I understand how to convert a double to a binary based on IEEE 754. But I don't understand what the formula is used for.
Can anyone give me an example when we use the above formula, please?
Thanks a lot.
| Question regarding IEEE 754, 64 bits double? | CC BY-SA 2.5 | 0 | 2011-02-25T02:36:51.850 | 2011-03-02T18:14:52.153 | null | null | 253,656 | [
"c",
"ieee-754"
]
|
5,113,409 | 1 | 5,135,269 | null | 1 | 1,284 | In the following images, the first character of each line is an NSAttributed string drawn in a subview. The rest of the line is drawn in a regular NSTextView.
The subviews have the exact same height and origin as the line fragments in the NSTextView.
These are the results calling [NSATtributedString drawAtPoint:lineFragment.origin]

These are the results calling [NSAttributedString drawInRect:lineFragmentRect]

Can anyone explain the discrepancies to me?
| NSAttributedString drawAtPoint and drawInRect - Discrepancies | CC BY-SA 2.5 | null | 2011-02-25T03:51:24.257 | 2011-02-27T19:13:03.250 | 2011-02-25T04:35:29.947 | 211,350 | 211,350 | [
"cocoa",
"macos",
"fonts",
"nsview",
"nstextview"
]
|
5,113,453 | 1 | 5,113,478 | null | 3 | 1,760 | XAML
```
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<DataGrid Height="117" HorizontalAlignment="Left" Margin="43,12,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="200"
ItemsSource="{Binding}" AutoGenerateColumns="False" >
<DataGrid.Columns>
<DataGridTextColumn
Header="Id" Binding="{Binding Id}"/>
<DataGridTextColumn
Header="Name" Binding="{Binding Name}"/>
</DataGrid.Columns>
</DataGrid>
```
```
<DataGrid AutoGenerateColumns="True" Height="117" HorizontalAlignment="Left" ItemsSource="{Binding}" Margin="43,135,0,0" Name="dataGrid2" VerticalAlignment="Top" Width="429">
</DataGrid>
</Grid>
</Window>
```
DATA
```
namespace WpfApplication1
{
public class Foo
{
public int Id { get; set; }
public string Name { get; set; }
}
class Data
{
public static IEnumerable<Foo> Foos
{
get
{
for (int i = 0; i < 5; i++)
{
yield return new Foo { Id = i, Name = "Foo" + i.ToString() };
}
}
}
}
}
```
INIT
```
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
dataGrid1.DataContext = Data.Foos;
dataGrid2.DataContext = Data.Foos; // corrected thanks to post/answer
}
}
```
RESULT
After correction from poster (thanks!) I have the right number of rows but no columns. (this is what I was seeing before I put together this post and would have been the original question if I hadn't goofed up)

| noob WPF data binding - why isn't my DataGrid autogenerating columns? | CC BY-SA 2.5 | null | 2011-02-25T04:00:08.610 | 2011-02-25T04:19:26.750 | 2011-02-25T04:09:52.243 | 398,546 | 398,546 | [
"c#",
"wpf",
"data-binding"
]
|
5,113,585 | 1 | 5,113,687 | null | 3 | 5,850 | Warm greetings,
I'm using the below code to show an annotation on an iOS [mkmapview](/questions/tagged/mkmapview) when tapping on the map.
```
MKPointAnnotation *aAnnotationPoint = [[MKPointAnnotation alloc] init];
aAnnotationPoint.title = @"Virginia";
aAnnotationPoint.subtitle = @"This is a test code .this is a test code. This is a test codeThis is a test code .this is a test code. This is a test code";
// Add the annotationPoint to the map
[myMapView addAnnotation:aAnnotationPoint];
```
The problem is that the annotation is not displaying the text fully - it cuts it off with `...`. This is the result:

I have searched for this kind of sample over the internet but no with no luck. How can I accomplish this?
| Customize an MKAnnotation | CC BY-SA 3.0 | 0 | 2011-02-25T04:24:01.807 | 2013-02-18T14:44:02.157 | 2013-02-18T14:44:02.157 | 247,763 | 352,627 | [
"ios",
"objective-c",
"mkmapview",
"mkannotation"
]
|
5,113,679 | 1 | null | null | 3 | 448 | Using MacVim with [https://github.com/carlhuda/janus](https://github.com/carlhuda/janus) installed, when I select a visual or insert block and hit backspace, the cursor jumps back an extra 3 spaces. Anyone else see this? Makes it real annoying to do my favorite shift-cmd-up to select and delete empty lines.
```
set backspace=indent,eol,start
```
is the only reference to backspace I see in vimrc and gvimrc.
Selection made:

After hitting backspace:

Anyone know of a quick way to fix this? I'm working through [http://vim.wikia.com/wiki/Backspace_and_delete_problems](http://vim.wikia.com/wiki/Backspace_and_delete_problems) to see if any of the remedies there can help but I don't see anything at first glance.
| MacVim Visual Selection Delete moves back 3 extra chars | CC BY-SA 2.5 | null | 2011-02-25T04:38:56.827 | 2011-10-08T02:25:46.583 | null | null | 124,563 | [
"vim",
"selection",
"backspace"
]
|
5,113,848 | 1 | 5,114,807 | null | 0 | 1,001 | I installed latest openX ad server(publisher server) with postgres 9.x version.
After successful installation and configuration i login and click at "Statistics" tab i see the following error.
PEAR Error
MDB2 Error: unknown error
_doQuery: [Error message: Could not execute statement]
[Last executed query: SELECT m.clientid AS advertiser_id,d.campaignid AS placement_id,s.ad_id AS ad_id,SUM(s.impressions) AS sum_views,SUM(s.clicks) AS sum_clicks,SUM(s.revenue) AS sum_revenue, m.campaignid || IF( LENGTH(market_advertiser_id) > 0, ('_' || market_advertiser_id || '') || ad_width || ' x ' || ad_height AS ad_id,( m.campaignid || IF( LENGTH(market_advertiser_id) > 0, ('_' || market_advertiser_id || '') || ad_width || ' x ' || ad_height ) AS pkey FROM "ox_ext_market_stats" AS s INNER JOIN "ox_banners" AS d ON (d.bannerid=s.ad_id) INNER JOIN "ox_zones" AS z ON (z.zoneid=s.zone_id) INNER JOIN "ox_campaigns" AS m ON (m.campaignid=d.campaignid) INNER JOIN "ox_affiliates" AS p ON (p.affiliateid=z.affiliateid) INNER JOIN "ox_clients" AS a ON (a.clientid=m.clientid) WHERE s.ad_id IN (1,2) AND a.type = 1 AND s.zone_id <> 0 AND s.date_time>='2011-02-22 00:00:00' AND s.date_time<='2011-02-22 23:59:59' GROUP BY advertiser_id,placement_id,pkey]
[Native message: ERROR: column "s.ad_id" must appear in the GROUP BY clause or be used in an aggregate function at character 65]
PEAR Error
MDB2 Error: unknown error
_doQuery: [Error message: Could not execute statement]
[Last executed query: SELECT m.clientid AS advertiser_id,d.campaignid AS placement_id,s.ad_id AS ad_id,SUM(s.impressions) AS sum_views,SUM(s.clicks) AS sum_clicks,SUM(s.revenue) AS sum_revenue, m.campaignid || IF( LENGTH(market_advertiser_id) > 0, ('_' || market_advertiser_id || '') || ad_width || ' x ' || ad_height AS ad_id,( m.campaignid || IF( LENGTH(market_advertiser_id) > 0, ('_' || market_advertiser_id || '') || ad_width || ' x ' || ad_height ) AS pkey FROM "ox_ext_market_stats" AS s INNER JOIN "ox_banners" AS d ON (d.bannerid=s.ad_id) INNER JOIN "ox_campaigns" AS m ON (m.campaignid=d.campaignid) INNER JOIN "ox_clients" AS a ON (a.clientid=m.clientid) WHERE s.ad_id IN (1,2) AND s.zone_id = 0 AND a.type = 1 AND s.date_time>='2011-02-22 00:00:00' AND s.date_time<='2011-02-22 23:59:59' AND s.zone_id = 0 GROUP BY advertiser_id,placement_id,pkey]
[Native message: ERROR: column "s.ad_id" must appear in the GROUP BY clause or be used in an aggregate function at character 65]

| openx adserver statistics tab error with postgres db version 9.x | CC BY-SA 2.5 | null | 2011-02-25T05:09:47.183 | 2011-02-25T09:39:17.220 | null | null | 216,431 | [
"postgresql",
"openx",
"advertisement-server"
]
|
5,113,901 | 1 | 5,121,105 | null | 0 | 1,498 | I am trying to write program that displays a window with simulated "tv static". I have it mostly working but when I expand the window grid lines form. I have no idea what could be causing this as this is my first OpenGL (glut) program. Any suggestions? thanks in advance
```
#include <GLUT/glut.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
void display(void){
/* clear window */
glClear(GL_COLOR_BUFFER_BIT);
int maxy = glutGet(GLUT_WINDOW_HEIGHT);
int maxx = glutGet(GLUT_WINDOW_WIDTH);
glBegin(GL_POINTS);
for (int y = 0; y <= maxy; ++y) {
for (int x = 0; x <= maxx; ++x) {
glColor3d(rand() / (float) RAND_MAX,rand() / (float) RAND_MAX,rand() / (float) RAND_MAX);
glVertex2i(x, y);
}
}
glEnd();
/* flush GL buffers */
glFlush();
}
void init(){
/* set clear color to black */
glClearColor (0.0, 0.0, 0.0, 1.0);
/* set fill color to white */
glColor3f(1.0, 1.0, 1.0);
/* set up standard orthogonal view with clipping */
/* box as cube of side 2 centered at origin */
/* This is default view and these statement could be removed */
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
glOrtho(0, glutGet(GLUT_WINDOW_WIDTH), glutGet(GLUT_WINDOW_HEIGHT), 0, 0, 1);
glDisable(GL_DEPTH_TEST);
glMatrixMode (GL_MODELVIEW);
glLoadIdentity ();
}
int main(int argc, char** argv){
srand(time(NULL));
/* Initialize mode and open a window in upper left corner of screen */
/* Window title is name of program (arg[0]) */
glutInit(&argc,argv);
//You can try the following to set the size and position of the window
glutInitWindowSize(500,500);
glutInitWindowPosition(0,0);
glutCreateWindow("simple");
glutDisplayFunc(display);
init();
glutIdleFunc(display);
glutMainLoop();
}
```
Edit: I can remove the lines by using `glRecti`; however the pixels get bigger the larger the window gets.
| OpenGL (glut)- increase pixel placement precision | CC BY-SA 2.5 | null | 2011-02-25T05:21:33.827 | 2011-02-25T18:39:30.733 | 2011-02-25T18:34:44.273 | 501,557 | 394,267 | [
"c++",
"opengl",
"glut"
]
|
5,114,067 | 1 | null | null | 1 | 921 | I'm trying to use Android's built-in [Search Dialog](http://developer.android.com/guide/topics/search/search-dialog.html), and it's working fine except when I try to use it with a [ProgressDialog](http://developer.android.com/reference/android/app/ProgressDialog.html). The basic chain of events it his:
1. User press the search button, enters a query and submits it.
2. The SearchManager calls the search Activity's onCreate method.
3. In the onCreate method, I call an AsyncTask that runs a query and shows a ProgressDialog in the onPreExecute method and hides it in the onPostExecute method.
This all happens fine except as soon as I submit the query the screen looks like this:

... which is pretty ugly. How can I prevent this from happening?
[You can find the source code for the project at Google Code.](http://code.google.com/p/mediawikiprovider/source/browse/#hg%2Fsrc%2Forg%2Fcdmckay%2Fandroid%2Fprovider%2Fdemo)
| Android Search Dialog soft keyboard stays open for too long | CC BY-SA 2.5 | 0 | 2011-02-25T05:48:16.603 | 2013-03-16T03:15:06.757 | null | null | 62,571 | [
"java",
"android"
]
|
5,114,195 | 1 | null | null | 1 | 576 | I am developing a web application in java. I am using personal domain appspot (googleappengine). I have implemented 3-legged OAuth. And the authentication is working fine.
The problem here is at the first run of application. Though, I am logged in my gmail, it doesn't detect username. And it redirects to login page. After getting logged in, I am getting the data available in appspot datastore. But, I cannot append that data to my home page :(
My code is like :
- ```
$(document).ready(function(){
jQuery.ajax({
type: "get",
url: "http://searcegadget2.appspot.com/RequestTokenServlet",
success: function(msg){
if(msg.search('tr') != -1){
id = msg.split('</tr>').length - 1;
$('#gadget').css('display', 'block');
$("tbody").append(msg);
difference();
}else if(msg.search('form') != -1){
$('#gadget').css('display', 'none');
document.write(msg);
}else if(msg.search('http') != -1){
$('#gadget').css('display', 'none');
document.location = msg;
}
},error: function(XMLHttpRequest, textStatus, errorThrown){
//alert(XMLHttpRequest.responseText);
}
});
});
```
My table div id is & it has block block display. And as you can see, I have also set the OAuth Callback Parameter to home.html
- ```
GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
oauthParameters.setOAuthConsumerKey(CONSUMER_KEY);
oauthParameters.setOAuthConsumerSecret(CONSUMER_SECRET);
oauthParameters.setScope("https://spreadsheets.google.com/feeds/");
oauthParameters.setOAuthCallback("http://searcegadget2.appspot.com/home.html");
oauthParameters.setOAuthType(OAuthParameters.OAuthType.THREE_LEGGED_OAUTH);
UserService userService = UserServiceFactory.getUserService();
if (userService.isUserLoggedIn()) {
//fetch row
} else {
out.print(userService.createLoginURL(request.getRequestURI()));
}
```
I mean, the appspot returns the html table row, & it displays the row only . While I want that row get appended to my home page table, but I can't.

Also, this happens only when I loggin first time. Later when I through my application url again, it returns the homepage with the row appended to table ! But, the issue repeats when I the browser !

I want the second screen to be displayed at first call.
How do I solve this issue ? Is there any other way to check if the user is login or not in Java ?
| How to handle authentication callback? | CC BY-SA 2.5 | null | 2011-02-25T06:09:38.457 | 2011-02-25T19:35:04.577 | 2011-02-25T08:09:59.553 | null | null | [
"java",
"jquery",
"google-app-engine",
"web-applications",
"authentication"
]
|
5,114,788 | 1 | 5,115,122 | null | 0 | 442 | I have a method on my client side. And I pass as data and I got a small problem with double quotes ):
But on server I got zero:

What am I doing wrong?
and attributes for WCF method:

| Can not receive proper parameters in my WCF service (jQuery, ajax) | CC BY-SA 3.0 | null | 2011-02-25T07:42:45.700 | 2018-03-12T08:42:05.207 | 2018-03-12T08:42:05.207 | 508,330 | 508,330 | [
"ajax",
"wcf",
"jquery",
"parameters"
]
|
5,115,185 | 1 | 5,115,695 | null | 0 | 682 | i try to write my own control.But my control' html has problem: Look like


```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls.WebParts; // Ekle
using System.Web.UI.WebControls; // Ekle
using System.Web.UI;
using System.Collections;
using System.Threading;
namespace MyFilterControl
{
public class FilterControl : WebPart
{
internal List<Content> list { get; set; }
public Button BtnSearch { get; set; }
public event EventHandler Click;
public string FilterButtonText { get; set; }
public String PhID { get; set; }
internal PlaceHolder PlhControl { get; set; }
private string controlWidth = "10";
public FilterControl()
{
list = new List<Content>();
BtnSearch = new Button();
PlhControl = new PlaceHolder();
PlhControl.ID = Guid.NewGuid().ToString();
if (string.IsNullOrEmpty(PhID))
{
BtnSearch.ID = "btnSearch";
}
else
BtnSearch.ID = PhID;
if (string.IsNullOrEmpty(FilterButtonText))
{
BtnSearch.Text = "Search";
}
else
BtnSearch.Text = FilterButtonText;
BtnSearch.Click += new EventHandler(BtnSearch_Click);
}
private Table mainTable = new Table();
protected override void CreateChildControls()
{
base.CreateChildControls();
TableRow tblRow = new TableRow();
TableCell tblCell1 = new TableCell();
PlhControl.Controls.Add(new LiteralControl("<table><tr>"));
tblCell1.Controls.Add(PlhControl);
TableCell tblCell2 = new TableCell();
tblCell2.Controls.Add(BtnSearch);
tblRow.Cells.Add(tblCell1);
tblRow.Cells.Add(tblCell2);
mainTable.Rows.Add(tblRow);
this.Controls.Add(mainTable);
}
void BtnSearch_Click(object sender, EventArgs e)
{
PlhControl.Controls.Add(new LiteralControl("</tr><table>"));
foreach (var item in PlhControl.Controls)
{
if (item is MyTextBoxControl)
{
MyTextBoxControl t1 = (MyTextBoxControl)item;
if (t1.Text != "")
{
Add(new Content() { FieldName = t1.ID, Data = t1.Text, ID = Guid.NewGuid().ToString(), dataType = t1.dataType, filter=t1.filter });
}
}
}
Click(this, e);
}
public string Query()
{
string Qry = String.Empty;
int i = 0;
foreach (var item in list)
{
switch (item.filter)
{
case Filter.BeginsWith: Qry += String.Format(item.FieldName.ToString() + ".StartsWith({0}) && ", "@" + i.ToString());
break;
case Filter.EndsWith: Qry += String.Format(item.FieldName.ToString() + ".EndsWith({0}) && ", "@" + i.ToString());
break;
case Filter.Contains: Qry += String.Format(item.FieldName.ToString() + ".Contains({0}) && ", "@"+i.ToString());
break;
case Filter.Default: Qry += String.Format("{0}=={1} && ", item.FieldName, "@" + i.ToString());
break;
default:
break;
}
i++;
}
Qry = Qry.TrimEnd('&', '&', ' ');
return Qry;
}
public object[] QueryParams()
{
ArrayList arrList = new ArrayList();
foreach (var item in list)
{
if (item.dataType == DataType.String)
arrList.Add(item.Data);
else if (item.dataType == DataType.Int32)
{
int intVal = Convert.ToInt32(item.Data);
arrList.Add(intVal);
}
}
object[] strArray = arrList.ToArray(typeof(object)) as object[];
return strArray;
}
public string id { get; set; }
public void AddItem(ContentItem content)
{
PlhControl.Controls.Add(new LiteralControl("<td style=\"text-align:left\">"));
PlhControl.Controls.Add(new Label() { ID = Guid.NewGuid().ToString(), Text = content.LabelName });
PlhControl.Controls.Add(new LiteralControl(":</td>"));
PlhControl.Controls.Add(new LiteralControl("<td style=\"text-align:left\">"));
PlhControl.Controls.Add(new MyTextBoxControl() { ID = content.FieldName, dataType = content.dataType, filter = content.filter });
PlhControl.Controls.Add(new LiteralControl("</td>"));
}
private void Add(Content content)
{
list.Add(new Content() { ID = content.ID, Data = content.Data, FieldName = content.FieldName, dataType=content.dataType, filter= content.filter });
}
}
internal class Content
{
internal string ID { get; set; }
public string Data { get; set; }
public string FieldName { get; set; }
public DataType dataType { get; set; }
public Filter filter { get; set; }
}
public class ContentItem
{
private string ID { get; set; }
public string LabelName { get; set; }
public string FieldName { get; set; }
public DataType dataType { get; set; }
public Filter filter { get; set; }
}
public class MyTextBoxControl : TextBox
{
public DataType dataType { get; set; }
public Filter filter { get; set; }
}
public enum DataType
{
String,Int32
}
public enum Filter
{
BeginsWith,EndsWith,Contains,Default
}
}
```
| how to create my custom control C#? | CC BY-SA 2.5 | null | 2011-02-25T08:41:06.750 | 2011-02-25T10:31:44.337 | 2011-02-25T08:48:31.447 | 72,746 | 52,420 | [
"c#",
".net",
"asp.net",
"html",
"visual-studio-2008"
]
|
5,115,637 | 1 | null | null | 17 | 2,078 | Assume you need to present a list of colors to the user. The colors must be displayed in a list with a fixed height, with each color occupying an equal fraction of that height.
Here is what it should look like with four colors, a list height of 90 pixels and a thick border around:

The image above is rendered in Firefox 3.6.13 from the follow source:
```
<ul style="height: 90px; border: 5px solid black; padding: 0;">
<li style="height: 25%; background: red;">
<li style="height: 25%; background: blue;">
<li style="height: 25%; background: yellow;">
<li style="height: 25%; background: green;">
</ul>
```
This is all fine. The list is indeed 90 pixels heigh – within the borders – and each color gets an (seemingly) equal share of this space. Now, let's render the same HTML/CSS in Safari or Chrome:

Notice the narrow white row between the green row and the border. There is a pretty simply explanation for what we are seeing here: `0.25 × 90 = 22.5`
WebKit in Safari and Chrome does not really like non-integer pixel heights and drops the decimal. With four rows of height 22 we get 2 pixels of nothing in the bottom of the list: `90 - 4 × 22 = 2`
In the context of a static HTML file, we could easily set the height of the elements to 23, 22, 23, 23 pixels respectively, and the list would show up fine in any browser. If, on the other hand, the colors are loaded from a database and the count varies with each request, a more flexible solution is needed.
I know how to solve this by computing and setting an integer value height on each row `onload` using Javascript, and I will post this solution if nothing else shows up. I would, however, prefer a purely CSS-based solution to the problem. Can you think of one?
| Evenly distributed height of child elements with CSS | CC BY-SA 2.5 | 0 | 2011-02-25T09:36:14.713 | 2011-02-25T12:46:00.177 | null | null | 121,364 | [
"css",
"webkit"
]
|
5,115,705 | 1 | 5,116,851 | null | 0 | 74 | How come the same query with and without variables generates different queryplans?
For example the following query:
```
DECLARE @p0 Int = 103
DECLARE @p1 Int = 1
DECLARE @p2 Int = 38
DECLARE @p3 Int = 103
DECLARE @p4 Int = 1
SELECT [t5].[pkCompanyID] AS [CompanyID], [t5].[name] AS [Name], [t5].[imageurl] AS [ImageURL]
FROM (
SELECT [t0].[pkCompanyID], [t0].[name], [t1].[imageurl],
(CASE
WHEN EXISTS(
SELECT NULL AS [EMPTY]
FROM [tblCompany] AS [t2]
WHERE ([t2].[fkCompToCompID] = ([t0].[pkCompanyID])) AND (EXISTS(
SELECT NULL AS [EMPTY]
FROM [tblUserToGroupToCompany] AS [t3]
INNER JOIN [tblGroupToApplication] AS [t4] ON [t3].[fkGroupID] = [t4].[fkGroupID]
WHERE ([t3].[fkCompanyID] = [t2].[pkCompanyID]) AND ([t3].[fkUserID] = @p0) AND ([t4].[fkApplicationID] = @p1)
))
) THEN 1
ELSE 0
END) AS [value], [t0].[fkCompToCompID]
FROM [tblCompany] AS [t0]
LEFT OUTER JOIN [tblNodeTypes] AS [t1] ON [t1].[pkNodeTypeID] = [t0].[fkNodeTypeID]
) AS [t5]
WHERE (([t5].[value] = 1) OR (EXISTS(
SELECT NULL AS [EMPTY]
FROM [tblUserToGroupToCompany] AS [t6]
WHERE [t6].[fkCompanyID] = [t5].[pkCompanyID]
))) AND ([t5].[fkCompToCompID] = @p2) AND (EXISTS(
SELECT NULL AS [EMPTY]
FROM [tblUserToGroupToCompany] AS [t7]
INNER JOIN [tblGroupToApplication] AS [t8] ON [t7].[fkGroupID] = [t8].[fkGroupID]
WHERE ([t7].[fkCompanyID] = [t5].[pkCompanyID]) AND ([t7].[fkUserID] = @p3) AND ([t8].[fkApplicationID] = @p4)
))
```
Generates this plan (part of plan)

But the same query if I exchange the variables for values directly in the query.
eg.
```
...WHERE ([t7].[fkCompanyID] = [t5].[pkCompanyID]) AND ([t7].[fkUserID] = 103) AND ([t8].[fkApplicationID] = 1)
```
generates this plan (same part as other)

There are other changes in the plan also, but I cant fit the whole image here.
The first query is about 50% faster than the second.
| Using variables in query generates different queryplan | CC BY-SA 2.5 | null | 2011-02-25T09:43:44.177 | 2011-02-25T12:50:39.620 | 2020-06-20T09:12:55.060 | -1 | 468,973 | [
"sql",
"performance",
"sql-server-2008"
]
|
5,115,898 | 1 | 5,116,295 | null | 0 | 723 | I have a question regarding a platform I'm developing called [e-cidadania](http://gitorious.org/e-cidadania) (GPL). One of the applications will be something like a blackboard where you can put messages. I've been requested to do it like a cartesian grid (p.e. x = good/bad, y = expensive/cheap). My question is, does anybody know about an application like that for django? Or in case that there isn't, how can I do it? I have no idea where to start.
I'll explain a use case, if someone didn't understand: You are in a classroom, the teacher draws on the blackboard the axis and tells the students to write a note. After that every student will put his note according to the axis.

| Create interactive cartesian grid in django | CC BY-SA 2.5 | null | 2011-02-25T10:04:32.903 | 2011-02-25T17:33:12.933 | 2011-02-25T11:29:44.290 | 270,293 | 270,293 | [
"django",
"django-models",
"cartesian",
"blackboard"
]
|
5,116,052 | 1 | 5,117,732 | null | -1 | 2,458 | I'm having trouble redirecting my root domain to a www subdomain ((e.g. blahblahblah.com to www.blahblahblah.com). I've a web app hosted on Heroku for which I've modified DNS settings through Zerigo DNS.
These are my current settings:


However, this is the error I am getting when I type in, say, blahblahblah.com:

Is there a problem with how things are currently set up, or is there anything else that I need to do in order for the redirect to work?
| How could I redirect a root level domain to www subdomain with Zerigo DNS on Heroku? | CC BY-SA 2.5 | null | 2011-02-25T10:20:45.513 | 2018-02-04T04:17:43.940 | null | null | 342,259 | [
"networking",
"url",
"dns",
"heroku"
]
|
5,116,067 | 1 | null | null | 1 | 2,902 | In a foreach loop, I set `curMonth` and `curDisplayedMonth` as follows:
```
<fmt:formatDate value="${curDate}" type="date" pattern="m" var="curMonth" />
<fmt:formatDate value="${curDate}" type="date" pattern="MMM" var="curDisplayedMonth" />
```
and use them in the dropdown list as
```
<option value="<c:out value="${curMonth}"/>" <c:if test="${selectedMonth == curMonth}">selected</c:if>>
<c:out value="${curDisplayedMonth}"/>
</option>
```
but it formats all to Jan:
---

---
and the values in the options are correct:
---

| JSTL formatDate always format the patten "MMM" to "Jan" | CC BY-SA 3.0 | null | 2011-02-25T10:22:38.687 | 2018-02-13T18:35:44.350 | 2018-02-13T18:33:30.250 | 4,084,574 | 633,912 | [
"java",
"date",
"jsp",
"format",
"jstl"
]
|
5,116,064 | 1 | 5,177,646 | null | 1 | 2,772 | I have a table name AVUKAT and it's columns (`AVUKAT`, `HESAP`(Primary KEY), `MUSTERI`)
All `MUSTERI` has a one unique `HESAP` (int).
Simple I have a page like this.

First dropdown is selected MUSTERI, second is AVUKAT
And i automaticly calculating HESAP (`int` and `Primary KEY`) with this code. (On the background.)
```
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string strConnectionString = ConfigurationManager.ConnectionStrings["SqlServerCstr"].ConnectionString;
SqlConnection myConnection = new SqlConnection(strConnectionString);
myConnection.Open();
string hesapNo = DropDownList1.SelectedItem.Value;
string query = "select A.HESAP_NO from YAZ..MARDATA.S_TEKLIF A where A.MUS_K_ISIM = '" + hesapNo + "'";
SqlCommand cmd = new SqlCommand(query, myConnection);
if (DropDownList1.SelectedValue != "0" && DropDownList2.SelectedValue != "0")
{
Add.Enabled = true;
Label1.Text = cmd.ExecuteScalar().ToString();
}
else
{
Add.Enabled = false;
}
Label1.Visible = false;
myConnection.Close();
}
```
I just calculating `HESAP` with this code.
And my `ADD` button click function is;
```
protected void Add_Click(object sender, EventArgs e)
{
try
{
string strConnectionString = ConfigurationManager.ConnectionStrings["SqlServerCstr"].ConnectionString;
SqlConnection myConnection = new SqlConnection(strConnectionString);
myConnection.Open();
string hesap = Label1.Text;
string musteriadi = DropDownList1.SelectedItem.Value;
string avukat = DropDownList2.SelectedItem.Value;
SqlCommand cmd = new SqlCommand("INSERT INTO AVUKAT VALUES (@MUSTERI, @AVUKAT, @HESAP)", myConnection);
cmd.Parameters.AddWithValue("@HESAP", hesap);
cmd.Parameters.AddWithValue("@MUSTERI", musteriadi);
cmd.Parameters.AddWithValue("@AVUKAT", avukat);
cmd.Connection = myConnection;
SqlDataReader dr = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection);
Response.Redirect(Request.Url.ToString());
myConnection.Close();
}
catch (Exception)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), " ", "alert('Bu Müşteri Zaten Mevcut!')", true);
}
}
```
The reason use `try catch` , if anybody try to add add with same HESAP (int) value for the MUSTERI i want show an error message and don't add the table.
But when i try to add same MUSTERI (also same HESAP) adding same MUSTERI with HESAP=0 value.

How can i prevent this situation? I select HESAP column is Primary KEY, but still add same MUSTERI.
| Adding Data with Same Primary Key Data in ASP.Net | CC BY-SA 2.5 | 0 | 2011-02-25T10:22:25.643 | 2011-03-08T08:42:34.540 | null | null | 447,156 | [
"c#",
".net",
"asp.net",
"sql",
"gridview"
]
|
5,116,554 | 1 | 5,116,697 | null | 1 | 626 | I'm having problem with the border on grouped UITableViewCell, see the screenshot

the upper border above "add to contacts" is thicker as the lower border as you can see. when man clicks on it, it becomes the same as the lower border. Can anyone tell me how i can make the upper always the same as the lower?
above the cell "add to contacts" is another cell with height 0 and i tried the code
```
for(UIView* v in cell.subviews)
[v removeFromSuperview];
```
and
```
cell.backgroundView.hidden=TRUE;
```
but both don't work, the thicker border remains!
all I did to the cell was first to
```
UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier: nil ] autorelease];
```
and
```
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
```
and add some labels/images to it.
so can anyone give me some hints? Thank you!
updated: why is there a line for cell with height 0?

| strange border of grouped UITableViewCell | CC BY-SA 2.5 | null | 2011-02-25T11:16:49.747 | 2011-05-30T02:38:30.267 | 2011-02-25T11:30:47.237 | 106,224 | 353,044 | [
"iphone",
"ios4",
"uitableview"
]
|
5,116,558 | 1 | null | null | 3 | 4,512 | I have a linearlayout which have a textbox(multiline, nearly 5 lines) and image view. Is it possible to draw a image on textview(overlapping)?
Note: I have to specify the coordinates of the image, which are not static, and may be anywhere above text.
Something like this mockup:

| Overlap views in android? | CC BY-SA 3.0 | null | 2011-02-25T11:17:12.497 | 2014-03-20T07:49:44.340 | 2012-08-25T14:26:40.283 | 440,536 | 430,652 | [
"android",
"graphics",
"imageview",
"android-canvas",
"overlapping"
]
|
5,117,000 | 1 | 5,117,090 | null | 16 | 28,146 | I am using maven in eclipse (m2 eclipse)
When i execute mvn:install i want my jar(artifact) to be installed in the nexus repository which is located on the server(right now the installed jar is placed in the local system repository).. how can i do that ?

I even changed this to my local repository address
| mvn:install to place my jar in nexus remote repository | CC BY-SA 2.5 | 0 | 2011-02-25T12:04:00.957 | 2011-02-25T12:25:01.280 | null | null | 410,693 | [
"maven",
"repository",
"nexus"
]
|
5,117,029 | 1 | 5,139,531 | null | 1 | 696 | 
I want to create logins & users for my c#.net winforms application which uses sql server 2005 express .& upto my knowledge i have built these steps.
So , I want to ask that are these steps correct or am i making a lot of mistakes.
Also, if am missing any step then please add new steps.
Also, in the last step, what should i do, do i have to grant permissions to both ,USERS & SCHEMA, OR to only USER, OR to only SCHEMA.
I am seeking improvements in this model or a new model if anybody can provide. Would be a great help.
I want to GRANT & DENY permissions of DATABASE LEVEL such as CREATE, DROP, ALTER DATABASE ; of TABLE LEVEL such as INSERT , DELETE, ALTER, UPDATE & of COLUMN LEVEL.
Also, is creation of schema necessary?
As far as i know:
CREATION OF LOGIN is necessary
CREATION OF USER for the above created login is necessary
CREATION OF SCHEMA is or is not necessary? i don't know.
| logins , users, permissions in sql express 2005 , with diagram , flowchart | CC BY-SA 2.5 | null | 2011-02-25T12:06:57.093 | 2011-02-28T08:22:23.253 | 2011-02-28T06:49:53.467 | 613,929 | 613,929 | [
"c#",
"sql",
"sql-server",
"diagram",
"flowchart"
]
|
5,117,044 | 1 | null | null | 0 | 74 | Hello guys I am retriving a mail and add to the some perticular string,
but the time of the inserting the content it will give me error like this.
text/html; ISO-8859-1
so how I can resolve this.
Thanks
I am attching image of error so just see it and what is the solution for this.
| Text adding issue into the string | CC BY-SA 2.5 | null | 2011-02-25T12:09:01.907 | 2011-02-25T12:20:38.770 | 2011-02-25T12:11:38.783 | 21,234 | 181,254 | [
"c#",
"string"
]
|
5,117,337 | 1 | 5,128,084 | null | 6 | 10,111 | I'm trying to implement "[Stochastic gradient descent](http://en.wikipedia.org/wiki/Stochastic_gradient_descent)" in MATLAB. I followed the algorithm exactly but I'm getting a VERY VERY large w (coffients) for the prediction/fitting function. Do I have a mistake in the algorithm ?
The Algorithm :

```
x = 0:0.1:2*pi // X-axis
n = size(x,2);
r = -0.2+(0.4).*rand(n,1); //generating random noise to be added to the sin(x) function
t=zeros(1,n);
y=zeros(1,n);
for i=1:n
t(i)=sin(x(i))+r(i); // adding the noise
y(i)=sin(x(i)); // the function without noise
end
f = round(1+rand(20,1)*n); //generating random indexes
h = x(f); //choosing random x points
k = t(f); //chossing random y points
m=size(h,2); // length of the h vector
scatter(h,k,'Red'); // drawing the training points (with noise)
%scatter(x,t,2);
hold on;
plot(x,sin(x)); // plotting the Sin function
w = [0.3 1 0.5]; // starting point of w
a=0.05; // learning rate "alpha"
// ---------------- ALGORITHM ---------------------//
for i=1:20
v = [1 h(i) h(i).^2]; // X vector
e = ((w*v') - k(i)).*v; // prediction - observation
w = w - a*e; // updating w
end
hold on;
l = 0:1:6;
g = w(1)+w(2)*l+w(3)*(l.^2);
plot(l,g,'Yellow'); // drawing the prediction function
```
| Stochastic gradient Descent implementation - MATLAB | CC BY-SA 2.5 | 0 | 2011-02-25T12:41:34.877 | 2011-02-26T16:21:29.833 | 2011-02-25T12:56:22.127 | 278,973 | 278,973 | [
"matlab",
"artificial-intelligence",
"machine-learning",
"regression",
"mathematical-optimization"
]
|
5,117,477 | 1 | 5,121,480 | null | 0 | 1,762 | I found solution on this site(How can I input separator between items in an ItemsControl([click](https://stackoverflow.com/questions/2511227/how-can-a-separator-be-added-between-items-in-an-itemscontrol)) And found bug=(((
Here is it:

It hapens when I trying to resize ItemsControl(I've set property "HorizontalScrollBarVisibility" to "Disable") Any ideas How should I fix this bug?
| (WPF) How can a separator be added between items in an ItemsControl - Bug Fixing | CC BY-SA 2.5 | null | 2011-02-25T12:54:23.287 | 2011-02-27T16:48:23.337 | 2017-05-23T12:13:29.270 | -1 | 398,429 | [
"c#",
"wpf",
"xaml"
]
|
5,117,660 | 1 | 5,117,898 | null | 0 | 218 | what is the best way fetch mysql data into Multi-Dimensional Arrays?
SQL:
```
SELECT tariff, monthly_cost, point, phones.name FROM phoneplanpoint
LEFT JOIN phones on phoneplanpoint.phone_id = phones.phone_id
LEFT JOIN price_plans on price_plans.priceplan_id = phoneplanpoint.priceplan_id
```
Output:
```
tariff monthly_cost point name
Matrix 15.00 6.0 Blackberry
Matrix 20.00 10.0 Blackberry
Lion 15.00 12.5 Blackberry
Lion 20.00 14.5 Blackberry
Matrix 15.00 6.5 Iphone
Matrix 20.00 7.5 Iphone
```
I am trying put that data into Multi-Dimensional Arrays, so it will be easy to prepare for layout view to output data.
This is a quick example for testing, is this correct way? Ofcourse I will use loop.
```
$Priceplan['Blackberry'] = array();
$Priceplan['Blackberry']['tariff'][] = array("Name" => "Matrix 15.00", "Point" => "6.0");
$Priceplan['Blackberry']['tariff'][] = array("Name" => "Matrix 20.00", "Point" => "10.0");
```
I want the view layout data look like this:

| Use Multi-Dimensional Arrays for data layout? | CC BY-SA 2.5 | 0 | 2011-02-25T13:14:51.557 | 2012-12-24T01:01:40.240 | 2012-12-24T01:01:40.240 | 367,456 | 622,378 | [
"php",
"arrays"
]
|
5,117,657 | 1 | 5,117,846 | null | 0 | 7,070 | I am really struggling with this one.
Below is an image of a layout I am wanting to achieve.
It has a few overlay's etc. Hopefully the image will explain more about the look, I am having real trouble with the two cols inside the content. I can't seem to get them together, with the background going to the bottom, and the footer displaying below.
I hope this makes sense.
One more thing the two cols should be a little higher than they way its displayed on the image, they should appear above the #mainImage div still within the content, just not below.

I have updated the code, hopefully giving you a better understanding with what i'm after and the problems i'm having.
```
<html>
<head>
<style type="text/css">
body {
background-color: #c0cdd7;
color: #444444;
background-repeat: no-repeat;
margin: 0px;
padding: 0px;
text-align: left;
font: normal normal 13px Arial, 'Lucida Grande', Verdana, Sans-Serif;
}
.wrapper {
width: 960px;
margin-left: auto;
margin-right: auto;
}
#logo {
position: absolute;
background-color: white;
margin-left: 30px;
z-index: 10;
background-position: 0px 0px;
background-repeat: no-repeat;
background-image: url(../images/logo.gif);
height: 100px;
width: 300px;
}
#header {
background-color: white;
height: 50px;
text-align: right;
width: 100%;
}
#navigation {
margin-left: 330px;
position: absolute;
margin-right: 30px;
font-weight: bold;
letter-spacing: 1px;
word-spacing: 5px;
font-size: 11px;
color: #6caddf;
margin-top: 25px;
text-transform: uppercase;
text-align: right;
padding-bottom: 5px;
padding-top: 5px;
width: 600px;
}
#navigation li {
padding-left: 10px;
padding-right: 10px;
border-right-color: #cccccc;
border-right-width: 1px;
border-right-style: solid;
list-style-type: none;
display: inline;
}
#navigation li.last {
border-right-style: none;
list-style-type: none;
}
#navigation li.active a {
font-weight: bold;
color: #6caddf;
list-style-type: none;
}
#mainImage {
background-color: #0b0b0b;
position: relative;
height: 400px;
width: 960px;
z-index: 1;
margin-top: 0px;
}
#content {
position: relative;
padding: 30px;
margin-top: -60px;
width: 840px;
margin-left: 30px;
margin-right: 30px;
background-color: white;
z-index: 15;
}
#content .col1 {
text-overflow: ellipsis;
z-index: 0;
width: 250px;
}
#content .col2 {
float: right;
padding-left: 30px;
margin-left: 250px;
z-index: 0;
width: 570px;
}
#footer {
border-top-color: #888888;
border-top-width: 1px;
border-top-style: dotted;
color: #888888;
padding: 30px;
clear: both;
}
#copyright {
color: #888888;
padding: 30px;
clear: both;
text-align: left;
font-size: 9px;
}
</style>
<body>
<div id="header">
<div class="wrapper">
<div id="logo"></div>
</div></div>
<div class="wrapper">
<div id="mainImage">
</div>
<div id="content">
<div class="col1"><h1>Title</h1><p>Heights on these columns do not matter, just the positioning<br/>Hopefully you can see from this example that the columns aren't aligned, and the white background doesn't flow all the way down.</p></div>
<div class="col2"><h1>Title</h1><p>Aliqui sita sint omnimaio corporporem. Nequam, nobis nis endam, omnis porecto experuptatae plitibus aped moditaquo te velia ventemporro commolu ptatum re pa si que cullaborem et molupta tiorit vendam, ulliquu ndeserc idest, optur? Quide cusdandel ipsandunt as ipsum reria corehendae vendipi ciisqui omnia nis re coriatu resciis eaquam fuga. Nam, sit res evendamus diam fuga. Odis quae num quibus consequamus expera alit fugiam, odis et volut ant aut vollaborae conecum rem quam fuga. Quis dolut poribus solorias sincias est velestiberum as quo tem ipsandit quaescienist volore dolum fuga. Ovid magnatque volum faciten imusam elentis auta quisquae parum quatur, optatur? At vitati ulpa velendis none preicit, sita quiatiaes evenihi llorum dis issimpe rchicitior solorepelit ut veliciant. Ur? Quia acime omniendipiet andis</p></div>
</div>
<div id="footer">
<p>Just you standard footer/copyright info to go here 2011</p>
</div>
</div>
</div>
</body>
</head>
</html>
```
| Problems with css layout, div positioning, alignment and z-index's | CC BY-SA 2.5 | null | 2011-02-25T13:14:28.313 | 2014-06-26T21:13:17.403 | 2012-06-27T19:30:39.770 | 44,390 | 164,769 | [
"html",
"css",
"css-float",
"z-index"
]
|
5,117,770 | 1 | 5,132,269 | null | 65 | 34,543 | ```
AVCaptureVideoPreviewLayer *avLayer =
[AVCaptureVideoPreviewLayer layerWithSession:session];
avLayer.frame = self.view.frame;
[self.view.layer addSublayer:avLayer];
```
I use AVCaptureVideoPreviewLayer to display video on the view.
But the video's view didn't fill up the full iPhone4's screen.(two grey bar at the right&left side)
I want the video fills up full screen.
How can I deal with it? Thank you very much!

| AVCaptureVideoPreviewLayer doesn't fill up whole iPhone 4S Screen | CC BY-SA 4.0 | 0 | 2011-02-25T13:25:00.547 | 2019-09-05T18:21:20.060 | 2018-11-13T09:01:56.600 | 8,126,260 | 495,873 | [
"iphone",
"ios4",
"avfoundation"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.