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,137,722 | 1 | null | null | 19 | 730 | When customizing my Visual Studio color scheme I am often confounded by the "Fonts and Colors" area.

Often, I want to change a specific color, say: the color used for `TODO` lines, but I need to read through 100s of color names just to figure out what that is. Often I am unable to figure what what color is what.
Is there any documentation out there that lists which colors are which?
Or even better, is there a plugin that allow me to highlight text in the editor and change the scheme of the selected text (figure out what color/s it is)?
| What color is that? Building a color theme for Visual Studio | CC BY-SA 2.5 | 0 | 2011-02-28T02:35:36.437 | 2011-03-01T20:15:31.797 | null | null | 17,174 | [
"visual-studio",
"visual-studio-2010"
]
|
5,137,741 | 1 | 5,137,850 | null | 5 | 18,487 | I need to implement two rank queries [`rank(k)` and `select(r)`]. But before I can start on this, I need to figure out how the two functions work.
As far as I know, `rank(k)` returns the rank of a given key `k`, and `select(r)` returns the key of a given rank `r`.
So my questions are:
1.) How do you calculate the rank of a node in an AVL(self balancing BST)?
2.) Is it possible for more than one key to have the same rank? And if so, what woulud `select(r)` return?
I'm going to include a sample AVL tree which you can refer to if it helps answer the question.

Thanks!
| How to find the rank of a node in an AVL tree? | CC BY-SA 2.5 | 0 | 2011-02-28T02:40:59.150 | 2015-10-03T16:52:21.460 | null | null | 609,030 | [
"algorithm",
"binary-tree",
"binary-search-tree"
]
|
5,137,772 | 1 | 5,137,794 | null | 12 | 31,915 | I want to design a tab header. The html code is,
```
<div class="tab-header">
<a href="" class="current">tab1-title</a>
<a href="">tab2-title</a>
</div>
```
Now I need to apply a background image to the current class, too make effect like this,

But the inline element a is not big enough for this background image, so I adjust the width and height of the element a. But the adjustment failed, the width/height of the element did not change.
How could I get the right effect?
Thanks.
| How to set width of a inline element? | CC BY-SA 2.5 | 0 | 2011-02-28T02:49:01.847 | 2011-02-28T02:54:36.543 | null | null | 193,251 | [
"css"
]
|
5,137,800 | 1 | 5,137,876 | null | 12 | 8,469 | Okay, I've never done win32 programming before, and I have a question that seems fairly stupid..

How do I rename `IDR_MENU1` to, for example, `IDR_MAIN_MENU`? I tried everything couldn't find a way.
| How to rename a resource in Visual Studio? | CC BY-SA 2.5 | 0 | 2011-02-28T02:57:09.447 | 2013-12-27T06:13:46.693 | null | null | 95,135 | [
"c++",
"windows",
"visual-studio",
"resources"
]
|
5,137,910 | 1 | 5,299,016 | null | 4 | 1,839 | Platform:
Website development on ASP.NET 4.0(Webforms) with C#.
Situation:
My rendered ASP.NET Menu control is horizontal and has three levels of data.
And I have set StaticDisplayLevels="1" so that the menu shows Level1 data horizontally and onmouseover of level1, the menu displays the level2 data and onmouseover of level2, the menu displays level3 data.
Requirement:
To display level2 and level3 data in a single list, with the children of first level2(if any) get displayed below the first level2 data. Then comes second level2 and its children(if any) and so on.
Consider the above image. What i would like to have, is a display like the one on the left. But the ASP.NET Menu control renders it like the image on the right side.
I have searched high and low in the net for a solution. I even tried [replacing the markup of the generated asp.net control using Menu's DataBound event and then injecting javascript hack to it](http://www.ramto.com/blog/post/Mega-Dropdown-Menu-with-ASPNET-and-jQuery-in-C.aspx). I succeeded in it but it lacks reusability.
What I would like to have is with static level2 (and level3) after dynamic level1 which acts like a megadropdown. I am sure that there should be a way and that I am going the wrong way. Any ideas?
| Tweaking ASP.NET Menu control like a mega dropdown | CC BY-SA 2.5 | null | 2011-02-28T03:25:47.217 | 2011-03-14T13:13:12.883 | 2011-02-28T03:30:54.593 | 17,447 | 17,447 | [
"c#",
"asp.net",
"rendering",
"aspmenu"
]
|
5,137,973 | 1 | 5,137,990 | null | 0 | 58 | I usually do just fine, but for some reason I cannot figure out why this particular query is defeating me.
For simplicity here is the database(Brand and PageTitle):

PageTitle is just a table to hold SEO data(there is only one row per `Brand`)
I want to : Select one row from `PageTitle` where brands = p (variable that holds the query string value)
This is an example of what I'm trying to do (If there are no records for the brand in `PageTitle` I don't want to throw an error).
```
var pages = da.PageTitles.Where(x => x.Brands.Single(z => z.BrandID == p)).SingleOrDefault();
if (pages.Any())
{
txtSeoTitle.Text = pages.Title;
txtSeoMetaKeywords.Text = pages.Keywords;
txtSeoMetaDesc.Text = pages.Description;
}
```
| Help with LINQ to SQL query | CC BY-SA 2.5 | null | 2011-02-28T03:42:26.563 | 2011-02-28T03:46:32.233 | null | null | 445,303 | [
"c#",
"linq-to-sql"
]
|
5,138,027 | 1 | 5,139,462 | null | 2 | 3,246 | I am working with the EF Code First library trying to work on an appointment scheduling app.
The model's I have are going to be a Client, Appointment, and AppointmentType...
Basically each Client can have a set of Appointments, and each Appointment can have a single AppointmentType...
The code is as follows:
```
public class Client
{
[ScaffoldColumn(false)]
public int ClientID { get; set; }
[Required]
public string FirstName { get; set; }
[Required]
public string LastName { get; set; }
[EmailAddress]
[Required]
public string Email { get; set; }
[DataType("DateTime")]
public DateTime Birthday { get; set; }
[Required]
public string CellPhone { get; set; }
public string HomePhone { get; set; }
public string Notes { get; set; }
public virtual ICollection<Appointment> Appointments{ get; set; }
public string Name {
get{
return FirstName + " " + LastName;
}
}
public class Appointment
{
[ScaffoldColumn(false)]
public int AppointmentID { get; set; }
[ScaffoldColumn(false)]
public int ClientID { get; set; }
[ScaffoldColumn(false)]
public int AppointmentTypeID { get; set; }
[Required]
public DateTime AppointmentDate { get; set; }
public string Notes { get; set; }
public virtual AppointmentType AppointmentType { get; set; }
public virtual Client Client { get; set; }
}
public class AppointmentType
{
[ScaffoldColumn(false)]
public int AppointmentTypeID { get; set; }
[Required]
public string Name { get; set; }
public string Description { get; set; }
public virtual Appointment Appointment { get; set; }
}
```
Everything works well when I create an appointment type, and a client, but when I create an appointment I get the following error...
-
If more details are needed, please let me know...I am just trying to figure out if I am missing anything in the setup.


This is what happens when I debug on the post to create the Appointment...All the ID's are as 0 which is correct, but should the other fields not be null?? Or does it matter...Just not very familiar with how things should look this being my first EF Code First project...
| EF Code First Foreign Key's | CC BY-SA 2.5 | null | 2011-02-28T03:54:45.477 | 2011-02-28T08:01:32.643 | 2011-02-28T04:20:37.747 | 558,672 | 558,672 | [
"asp.net-mvc",
"entity-framework",
"code-first"
]
|
5,138,155 | 1 | 5,138,186 | null | 1 | 292 | how is the main div content of the facebook home page changed when the user clicks on the links in the navigation pane? any ideas on how to achieve this using jquery?

| facebook side pane navigation | CC BY-SA 2.5 | null | 2011-02-28T04:22:50.363 | 2011-06-30T04:15:57.837 | null | null | 436,493 | [
"jquery"
]
|
5,138,291 | 1 | 5,138,346 | null | 1 | 745 | I have 2 divs nested within a parent div, and I cant figure out how to get these to appear side-by-side. I've tried float:left for the left div, and float:right for the right div but to no avail. Apparently the margins were set in all 3 divs which caused a meltdown.

Here is the corrected CSS:
```
#mid-feature
{
margin:350px 0 0 16px;
width:848px;
height:318px;
background-color:Olive;
position:relative;
overflow:hidden;
}
#mid-featureleft
{
height:318px;
width:552px;
background-color:Purple;
float:left;
position:relative;
}
#mid-featureright
{
height:318px;
width:296px;
/*background-color:#B9C1CC;*/
background-color: red;
float:left;
position: relative;
}
```
Here is the relevent HTML:
```
<div id="mid-feature">
<div id="mid-featureleft">
things<br />
things<br />
things<br />
things<br />
things<br />
things<br />
things<br />
</div>
<div id="mid-featureright">
cosas
<br />
cosas
<br />
cosas
<br />
cosas
<br />
cosas
<br />
cosas
<br />
</div>
</div>
```
| Problem with 2 Divs appearing side-by-side | CC BY-SA 2.5 | null | 2011-02-28T04:46:42.803 | 2011-04-27T07:51:29.143 | 2011-02-28T05:45:33.290 | 598,931 | 598,931 | [
"css"
]
|
5,138,719 | 1 | 5,139,316 | null | 286 | 578,163 | I want to change default text on button that is "`Choose File`" when we use `input="file"`.

How can I do this? Also as you can see in image button is on left side of text. How can I put it on right side of text?
| Change default text in input type="file"? | CC BY-SA 2.5 | 0 | 2011-02-28T05:58:50.600 | 2022-08-17T22:59:24.707 | 2019-11-13T18:20:36.607 | 5,320,906 | 559,070 | [
"html",
"file",
"input",
"default-value"
]
|
5,138,762 | 1 | 5,138,781 | null | 4 | 8,798 | i am fallowing this path for adding app Config to my project
> #On the Project menu, click Add New
Item.The Add New Item dialog box appears.
#Select the Application Configuration
File template and then click Add.A file named app.config is added to
your project
but there is no app.config in Add New ITem Dialog!
why?
i am using visual Studio 2010
VB.NET WIndows Form.
| Add App Config To Windows Form app | CC BY-SA 2.5 | null | 2011-02-28T06:06:42.180 | 2011-02-28T06:10:45.917 | null | null | 369,161 | [
".net",
"winforms",
"app-config"
]
|
5,138,722 | 1 | 5,148,423 | null | 0 | 9,058 | I am using the teleriks treeview control (asp.net mvc extensions), where I may have up to three children nodes, like so (drumroll...... awesome diagram below):

it has its own formatting, looking a bit like this:
```
<%=
Html.Telerik().TreeView()
.Name("TreeView")
.BindTo(Model, mappings =>
{
mappings.For<Node1>(binding => binding
.ItemDataBound((item, Node1) =>
{
item.Text = Node1.Property1;
item.Value = Node1.ID.ToString();
})
.Children(Node1 => Node1.AssocProperty));
mappings.For<Node2>(binding => binding
.ItemDataBound((item, Node2) =>
{
item.Text = Node2.Property1;
item.Value = Node2.ID.ToString();
})
.Children(Node2 => Node2.AssocProperty));
mappings.For<Node3>(binding => binding
.ItemDataBound((item, Node3) =>
{
item.Text = Node3.Property1;
item.Value = Node3.ID.ToString();
}));
})
%>
```
which causes it to render like this. I find it unsual that when I set the value it is rendered in a hidden input ? But anyway:...
```
<li class="t-item">
<div class="t-mid">
<span class="t-icon t-plus"></span>
<span class="t-in">Node 1</span>
<input class="t-input" name="itemValue" type="hidden" value="6" /></div>
<ul class="t-group" style="display:none">
<li class="t-item t-last">
<div class="t-top t-bot">
<span class="t-icon t-plus"></span>
<span class="t-in">Node 1.1</span>
<input class="t-input" name="itemValue" type="hidden" value="207" />
</div>
<ul class="t-group" style="display:none">
<li class="t-item">
<div class="t-top">
<span class="t-in">Node 1.1.1</span>
<input class="t-input" name="itemValue" type="hidden" value="1452" />
</div>
</li>
<li class="t-item t-last">
<div class="t-bot">
<span class="t-in">Node 1.1.2</span>
<input class="t-input" name="itemValue" type="hidden" value="1453" />
</div>
</li>
</ul>
</li>
</ul>
```
What I am doing is updating a div after the user clicks on a certain node. But when the user clicks on a node, I want to send the ID not the Node text property. Which means I have to get it out of the value in these type lines `<input class="t-input" name="itemValue" type="hidden" value="1453" />`, but it can be nested differently each time, so the existing code I ahve doesn't ALWAYS work:
```
<script type="text/javascript">
function TreeView_onSelect(e) {
//`this` is the DOM element of the treeview
var treeview = $(this).data('tTreeView');
var nodeElement = e.item;
var id = e.item.children[0].children[2].value;
...
</script>
```
So based on that, what is a better way to get the appropriate id each time with javascript/jquery?
:
Sorry to clarify a few things
1) Yes, I am handling clicks to the `li`s of the tree & want to find the value of the nested hidden input field. As you can see, from the telerik code, setting `item.Value = Node2.ID.ToString();` caused it to render in a hidden input field.
I am responding to clicks anywhere in the tree, therefore I cannot use my existing code, which relied on a set relationship (it would work for first nodes (Node 1) not for anything nested below)
What I want is, whenever there is something like this, representing a node, which is then clicked:
```
<li class="t-item t-last">
<div class="t-bot">
<span class="t-in">Node 1.1.2</span>
<input class="t-input" name="itemValue" type="hidden" value="1453" />
</div>
</li>
```
I want the ID value out of the input, in this case `1453`.
Hope this now makes a lot more sense.
| Getting value from input control using jQuery | CC BY-SA 4.0 | null | 2011-02-28T05:59:28.367 | 2019-08-09T03:33:14.797 | 2019-08-09T03:33:14.797 | 4,751,173 | 212,639 | [
"javascript",
"jquery",
"json",
"model-view-controller",
"dom"
]
|
5,138,931 | 1 | 5,139,357 | null | 0 | 639 | I want to show some amount in outlook with £ sign on selectindexchanged even of a dropdownlist client side.
Amount is displaying with sign in Win XP IE 7,8 but not in Windows 7 IE as given below:

```
if($(this[this.selectedIndex]).val() == "A")
{
var mailsubject="New win";
var toEmail="[email protected]";
var vSign = "Amount: £" + $(this).parent().siblings()[4].nextSibling.all[0].value;
var mailbody = escape(vSign);
window.open("mailto:"+ toEmail + "?subject=" + mailsubject + "&body=" + mailbody);
}
```
Does anyone know how to do it?
| Pound sign displaying problem in outlook in asp.net | CC BY-SA 2.5 | null | 2011-02-28T06:37:19.900 | 2011-02-28T07:44:55.607 | 2011-02-28T06:50:49.270 | 503,125 | 503,125 | [
"jquery",
"asp.net",
"outlook",
"selectedindexchanged"
]
|
5,138,982 | 1 | 8,186,957 | null | 17 | 12,686 | I'm using Eclipse Helios 3.6.2 for Android development and whenever I design a layout in the graphical layout mode (not the XML layout), I can't see the entire content of a ScrollView in the graphical layout.
Specifically, when I'm using a ScrollView and the height of the ScrollView exceeds the height of the content view area (i.e., the phone screen visible in the graphical layout mode), I am not able to see the items that I have at the bottom of the screen.
In Eclipse Helios 3.6.1 there was an option called "expand to fit"; whenever I used to click on it, the phone screen increased in size to encompass all the elements that I had added. How do i achieve the same thing in 3.6.2?

| View entire content of ScrollView in Eclipse's graphical layout | CC BY-SA 3.0 | 0 | 2011-02-28T06:45:57.450 | 2015-12-20T18:55:50.493 | 2014-02-16T22:34:39.023 | 154,306 | 590,849 | [
"android"
]
|
5,139,056 | 1 | 5,139,090 | null | 1 | 1,630 | Im trying to determine why there would be space between 2 Containing Divs as shown, and I would appreciate any insight as to why this is occurring:

The unknown space occurs between the mid-feature div (olive) and bottom-wrap div (orange)
I have no heights set anywhere.
I would like to see the orange div up against the olive div just above it.
I can post all of the CSS, or you can FireBug this: [www.davincispainting.com](http://www.davincispainting.com)
Here is all of the CSS:
```
*{ margin:0; padding:0 }
body
{
/*background: url("/images/blueback5.jpg") repeat-x scroll 0 0 transparent;*/
background-color: #9EB0C8;
font-family: Arial,Helvetica,sans-serif;
font-size: 62.5%;
}
#top-wrap {
height: 126px;
width: 940px;
/*background-color: Yellow;*/
margin: 5px 0 0 0;
}
#head-logo {
background: url("/images/logo3.png") no-repeat scroll 0 0 transparent;
/*background-color: Green;*/
height: 126px;
width: 214px;
margin: 0px 0 0 58px;
position: absolute;
z-index: 100;
}
#submenu1 {
border: 0 solid #000000;
color: #FFFFFF;
/*background-color:Green;*/
font-family: Arial,Impact,Impact5,Charcoal6,sans-serif;
font-size: 1.6em;
height: 35px;
width: 155px;
/*padding: 10px 0 0;*/
margin: 7px 0 0 774px;
position: absolute;
}
#submenu2 {
/*border: 0 solid #000000;*/
color: #FFFFFF;
/*background-color:Blue;*/
font-family: Arial,Impact,Impact5,Charcoal6,sans-serif;
font-size: 1.8em;
text-align: right;
height: 20px;
width: 114px;
margin: 30px 0 0 818px;
/*padding: 5px 0 0;*/
}
a.contact
{
background-image: url("/images/RapidButton2.png");
/*border: 1px solid #CCCCCC;*/
/*clear: both;*/
/*color: #FFFFFF;*/
display: block;
font-size: 11px;
/*margin-bottom: 1px;*/
/*padding: 3px 5px;*/
text-align: center;
width: 165px;
height: 27px;
}
a.contact:hover
{
background-image: url("/images/RapidButtonHov2.png");
}
#navigation-primary {
margin: 12px 0 0 276px;
position: absolute;
}
#global-wrap {
margin: 0 auto;
text-align: left;
width: 880px;
overflow: hidden;
}
#global-inner {
background: url("/images/main_bg.gif") repeat-y scroll 0 0 #E4EAEF;
font-family: Arial;
font-size: 1.2em;
margin: 15px 0 55px 0;
overflow: hidden;
text-align: left;
width: 880px;
}
#global-inner .topleft {
background: url("/images/main_left_top_corner2.jpg") no-repeat scroll left top transparent;
float: left;
height: 9px;
width: 9px;
}
#global-inner .topright {
background: url("/images/main_right_top_corner2.jpg") no-repeat scroll right top transparent;
float: right;
height: 9px;
width: 9px;
}
#global-inner .bottomleft {
background: url("/images/main_left_bottom_corner.jpg") no-repeat scroll left bottom transparent;
float: left;
height: 9px;
margin-top: -8px;
/*margin: 776px 0 0 0;*/
width: 9px;
}
#global-inner .bottomright {
background: url("/images/main_right_bottom_corner.jpg") no-repeat scroll right bottom transparent;
float: right;
height: 9px;
margin-top: -8px;
/*margin: 776px 0 0 0;*/
width: 9px;
}
#top-feature {
height:330px;
width: 848px;
margin: 12px 0 0 16px;
background: #E4EAEF;
/*background: orange;*/
/*padding: 10px 0 0 10px;*/
position: absolute;
text-align: left;
}
.slideshow {
height: 330px;
width: 848px;
margin: 0 0 0 0;
/*background: blue;*/
position: absolute;
}
#mid-feature
{
margin:350px 0 0 16px;
width:848px;
height:318px;
background-color:Olive;
position:relative;
overflow:hidden;
}
#mid-featureleft
{
height:318px;
width:552px;
/*background-color:Purple;*/
float:left;
position:relative;
}
#mid-featureright
{
height:318px;
width:296px;
background-color:#B9C1CC;
/*background-color: red;*/
float:left;
position: relative;
}
#mid-featureleft h1
{
color: #FF0000;
font-family: Arial,Helvetica,sans-serif;
font-size: 2.1em;
}
#mid-featureleft .contentbox
{
padding:7px 7px 7px 7px;
}
#mid-featureleft p
{
color: #0C2A55;
margin:0px 0 11px 0px;
/*font-style:normal;*/
/*width: 97%;*/
/*font-size: .5em;*/
font-size: 12px;
}
#bottom-wrap
{
height:60px;
width: 868px;
margin: auto 0 0 6px;
background:orange;
position: relative;
}
#copyright
{
float: left;
/*background-color:Teal;*/
width: 260px;
height: 60px;
text-align: left;
position: absolute;
margin:0 0 0 6px;
}
#bottom-logos
{
height:60px;
width:596px;
margin:0 0 0 267px;
background: url("/images/logos2.png") no-repeat scroll 0 0 transparent;
/*background-color:red;*/
position:absolute;
}
```
| Unknown Space between 2 Container Divs | CC BY-SA 2.5 | null | 2011-02-28T06:59:20.130 | 2011-02-28T07:22:43.383 | 2011-02-28T07:04:32.150 | 287,047 | 598,931 | [
"css"
]
|
5,139,170 | 1 | null | null | 1 | 2,535 | I have a single pdf file with three pages in it I need to turn this pdf into three seperate pdf pages is there any command line tool or script to do this. I am trying with pdftk, pdfcrop, and GS but so far nothing has worked out
Example: one.pdf has 1 page and that page has 3 pages in it. I need to divide this page into 3 seperate pages
| How to crop a single pdf file into separate page pdf's using command line tools? | CC BY-SA 2.5 | null | 2011-02-28T07:19:12.457 | 2012-06-04T12:32:38.767 | 2011-02-28T08:50:44.933 | 532,312 | 532,312 | [
"pdf"
]
|
5,139,358 | 1 | 5,182,421 | null | 0 | 1,015 | I have a program that scans an image and converts gems to specific numbers. Look at the picture below:

So i have a table with numbers. Number 1 is for yellow gem, 2 for blue, etc...
Like:
```
A B C D E
1 | 1 2 3 4 5
2 | 3 5 2 4 1
3 | 1 4 4 1 2
4 | 3 3 2 1 5
5 | 5 1 5 2 5
```
I want to calculate a step, to get 3 equal numbers (gems) horizontally or vertically. For example, in this table if i swap E2 with D2, D2 will be 1, and D2,D3,D4 creates a valid step, because it's all 1.
At now i'm just have the values in multiple variables (A1=1, A2=3, so on..)
I hope you understand my question, any help would be appreciated.
| Gems game step calculation, in other word some math | CC BY-SA 2.5 | 0 | 2011-02-28T07:45:01.297 | 2011-03-08T17:47:24.943 | 2011-02-28T10:45:57.663 | 117,870 | 637,309 | [
"vb.net",
"algorithm",
"vb.net-2010"
]
|
5,139,399 | 1 | 5,139,493 | null | 2 | 1,665 | I try to achieve the following output:


i want to achieve this with HTML and CSS. I do not want to use CSS3(as my client do not want me to!). I try the following code:
HTML:
```
<div class="menu">
<ul>
<li><a href="">registration</a></li>
<li><a href="">Contact</a></li>
<li><a href="">Sch's direc</a></li>
<li><a href="">faculty & staff</a></li>
<li><a href="">Campuses</a></li>
<li><a href="">History</a></li>
<li><a href="" >Mission</a><img src="images/right_menu.png" /></li>
<li style="margin:0;padding:0;"><img src="images/left_menu.png" /></li>
</ul>
</div>
```
CSS:
```
.menu ul{
list-style:none;
}
.menu li{
float:right;
background:url('images/menuBGrepX.png') repeat-x ;
margin-right:10px;
text-transform:uppercase;
}
.menu a{
display:block;
text-decoration:none;
color:#fff;
padding:5px 2px;
float:left;
}
.menu li.selected{
background:#A07E4E;
}
.menu li:hover{
background:#A07E4E;
color:#313131;
}
```
As you can expect the background color of `li` is changing when some one hover over it but the left and right image which I use for give a rounded border feel, it remain same. Please help me. You can check temporary work here : [http://www.examplecode.info/enam/pleasehelp/](http://www.examplecode.info/enam/pleasehelp/).Thanks in advance.
| rounded corner menu item in css without CSS3! | CC BY-SA 2.5 | null | 2011-02-28T07:51:04.520 | 2011-03-08T03:55:02.667 | 2011-03-08T03:55:02.667 | 560,735 | 453,556 | [
"javascript",
"jquery",
"html",
"css",
"xhtml"
]
|
5,139,525 | 1 | 5,188,380 | null | 0 | 404 | I have downloaded an application from internet(from Chrome browser) named "a.app", and there will be an alert window shown if I launch it, see the bellow figure.

The problem is, when I double click on a.app, the alert dialog will show up immediately, but if using the following AppleScript, the dialog will wait up to 20 seconds before it appears.
```
tell application "a.app" to launch
```
20 seconds go beyond my patience, so I wonder if it is possible for AppleScript to perform just as manually double click on a.app, that is, how to show up the alert dialog the moment I launch a.app by way of AppleScript.
Any ideas, thanks in advance.
| AppleScript - alert window issue when using launch command | CC BY-SA 2.5 | null | 2011-02-28T08:08:43.190 | 2012-06-27T01:30:43.540 | 2012-06-27T01:30:43.540 | 844,882 | 435,657 | [
"dialog",
"applescript"
]
|
5,139,776 | 1 | 5,139,895 | null | 0 | 3,227 | 
I have the following pages structure in my asp.net 3.5 website ...
i want if anybody directly access any page of my site as [http://mysite.com/cancellation.aspx](http://mysite.com/cancellation.aspx) then it will automatically redirected to [http://mysite.com/Default.aspx](http://mysite.com/Default.aspx)
How to do this using vb.net, asp.net
| How to auto redirect user to Default.aspx if they directly access any page of website? | CC BY-SA 2.5 | null | 2011-02-28T08:45:44.803 | 2011-02-28T09:02:57.323 | null | null | 594,849 | [
"asp.net",
"vb.net",
"visual-studio-2008"
]
|
5,140,009 | 1 | 5,140,504 | null | 0 | 187 | HI,
I am creating an App in which countdown will be running. I want to lock the iPhone when user taps on the button to start the countdown. Can anyone of you tell me how to do it. Any sample App or code will be very helpful.
here is the image which will make clear what I am asking for.

When I will slide the "lock" from left to right user will be ale to further interact with the App
Thanks in Advance!
| How to implemenmt locking / unlocking feature in iPhone App? | CC BY-SA 2.5 | null | 2011-02-28T09:13:06.833 | 2011-02-28T10:00:22.567 | 2011-02-28T09:48:31.517 | 390,423 | 390,423 | [
"iphone"
]
|
5,140,359 | 1 | 5,140,635 | null | 0 | 174 | Can you guys point out what I am doing wrong on with the navigation on this site? It works fine on webkit, but not firefox!
[http://datatables.dyndns-web.com/](http://datatables.dyndns-web.com/)

vs intended

| why is this nav broken on firefox? | CC BY-SA 2.5 | null | 2011-02-28T09:47:47.257 | 2011-02-28T10:23:28.317 | 2011-02-28T10:23:28.317 | 416,554 | 416,554 | [
"css",
"firefox",
"html",
"webkit",
"cross-browser"
]
|
5,140,532 | 1 | 5,140,589 | null | 0 | 664 | I hope make a gauge like in this as image.

I don`t find sample souce or article.
thanks
| How can i make a gauge like this? | CC BY-SA 2.5 | null | 2011-02-28T10:02:44.200 | 2011-02-28T10:20:18.697 | 2011-02-28T10:20:18.697 | 5,752 | 611,647 | [
"iphone",
"uiprogressview"
]
|
5,140,573 | 1 | null | null | 1 | 3,348 | I am writing a program GUI in java. I want to hava a JLayeredPane as ContentPane of my JFrame. On my JLayeredPane there are two layers : one layer a Canvas(canvas1) and another layer has a JPanel(jPanel5). I use Netbeans IDE and this code is generated:
```
canvas1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
canvas1.setBounds(0, 0, -1, -1);
jLayeredPane1.add(canvas1, javax.swing.JLayeredPane.PALETTE_LAYER);
jPanel5.setBounds(0, 0, 670, 550);
jLayeredPane1.add(jPanel5, javax.swing.JLayeredPane.DEFAULT_LAYER);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 670, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 553, Short.MAX_VALUE)
);
```
pack();
when I run my program I saw a strange event! When I change size of tje JFrame; the size of main JLayeredPane did not change. I used diffrerent backGround colours for components and it is obvious to me that the size of JLayered is permanent however I set it vertical and horizonal resizable in it's properties. The JFrame is resizable but main jLayeredPane's size is permamnet.
How can I cause the jLayeredPane to resize as my JFrame ?!
thank you

| Java : JLayeredPane resize problem | CC BY-SA 2.5 | null | 2011-02-28T10:05:52.957 | 2011-06-15T12:15:07.580 | null | null | 411,186 | [
"java",
"user-interface",
"jlayeredpane"
]
|
5,140,656 | 1 | null | null | 0 | 3,661 | I have to add image on the header and background I added header image using following code
```
<div data-role="header" data-nobackbtn="false" data-theme="a" style="height:30px;background-image:url(test.jpg);background-repeat:no-repeat;">
```
the image perfectly fixed in the portrait but when the screen changed to the landscape, image not fixed perfectly there will be some blank space added after the image. So how to set the image same for both portrait and landscape screen orientation. This problem occur in Android,iphone ,blackberry ,etc. For more clarification please check the image header.


| How to set the image size same for portrait and landscape screen orientation in jquery mobile web application? | CC BY-SA 4.0 | 0 | 2011-02-28T10:14:27.850 | 2018-11-30T05:03:36.773 | 2018-11-30T05:03:36.773 | 1,033,581 | 450,596 | [
"jquery-ui",
"landscape",
"jquery-mobile",
"portrait"
]
|
5,141,239 | 1 | 5,145,589 | null | 5 | 8,917 | I can put HTML elements such as text and images in a panel header like this:
```
var grid = new Ext.grid.GridPanel({
region: 'center',
style: 'margin: 10px',
store: new Ext.data.Store({
data: myData,
reader: myReader
}),
headerCfg: {
tag: 'div',
cls: 'x-panel-header',
children: [
{ tag: 'div', cls: 'panel_header_main', 'html': 'Shopping Cart' },
{ tag: 'div', cls: 'panel_header_icon1', 'html': '<img src="images/icon_plus.png" />' },
{ tag: 'div', cls: 'panel_header_icon2', 'html': '<img src="images/icon_pencil.png" />' },
{ tag: 'div', cls: 'panel_header_extra', 'html': 'Order Number: 2837428347' }
]
},
```
which looks fine:

but when I add dropdown element that is not plain HTML like this:
```
var grid = new Ext.grid.GridPanel({
region: 'center',
style: 'margin: 10px',
store: new Ext.data.Store({
data: myData,
reader: myReader
}),
headerCfg: {
tag: 'div',
cls: 'x-panel-header',
children: [
{ tag: 'div', cls: 'panel_header_main', 'html': 'Shopping Cart' },
{ tag: 'div', cls: 'panel_header_icon1', 'html': '<img src="images/icon_plus.png" />' },
{ tag: 'div', cls: 'panel_header_icon2', 'html': '<img src="images/icon_pencil.png" />' },
{ tag: 'div', cls: 'panel_header_extra', 'html': 'Order Number: 2837428347' },
{
width: 100,
xtype: 'combo',
mode: 'local',
value: 'en',
triggerAction: 'all',
forceSelection: true,
editable: false,
fieldLabel: 'Produkt',
name: 'language',
hiddenName: 'language',
displayField: 'name',
valueField: 'value',
store: new Ext.data.JsonStore({
fields : ['name', 'value'],
data : [
{name : 'German', value: 'de'},
{name : 'English', value: 'en'},
{name : 'French', value: 'fr'}
]
})
}
]
},
```
it renders script into the header:

| How can I put a dropdown in the header of an ExtJS panel? | CC BY-SA 2.5 | 0 | 2011-02-28T11:14:36.060 | 2014-11-10T18:09:37.130 | 2011-02-28T11:55:42.673 | 4,639 | 4,639 | [
"javascript",
"extjs",
"header"
]
|
5,141,515 | 1 | 5,142,029 | null | 0 | 35 | I am developing a flash games in which a letter symbol flies from right side of the screen and ends at left i need to process some keyboard events i.e when a letter is on the vertical
bar the letter should stop there. Can any one guide me how can i achieve this 
Abdul Khaliq
| Flash actionscript guidance needed? | CC BY-SA 2.5 | null | 2011-02-28T11:44:26.363 | 2011-02-28T12:33:37.297 | null | null | 100,751 | [
"flash",
"actionscript-3"
]
|
5,141,630 | 1 | 5,141,693 | null | 15 | 17,953 | I have a tbar inside a grid panel like this:

This is the code that produces it:
```
var grid = new Ext.grid.GridPanel({
region: 'center',
style: 'margin: 10px',
store: new Ext.data.Store({
data: myData,
reader: myReader
}),
title: 'Testing',
tbar: ['Filters:', {
width: 100,
xtype: 'combo',
mode: 'local',
value: 'en',
triggerAction: 'all',
forceSelection: true,
editable: false,
fieldLabel: 'Produkt',
name: 'language',
hiddenName: 'language',
displayField: 'name',
valueField: 'value',
store: new Ext.data.JsonStore({
fields : ['name', 'value'],
data : [
{name : 'German', value: 'de'},
{name : 'English', value: 'en'},
{name : 'French', value: 'fr'}
]
})
}],
```
# Addendum
thanks @dogbane, that works perfectly, here's how I right aligned both text and dropdown:
```
tbar: [
{xtype: 'tbfill'},
'Filters:',
{
width: 100,
xtype: 'combo',
mode: 'local',
...
```
| How can I right-align the contents of a ExtJS tbar? | CC BY-SA 2.5 | null | 2011-02-28T11:54:34.933 | 2016-05-26T10:32:11.303 | 2011-02-28T12:52:57.357 | 4,639 | 4,639 | [
"javascript",
"extjs"
]
|
5,141,690 | 1 | 5,142,064 | null | 1 | 775 | I am trying to create Rectangle programmaticallyin silverlight as fallows.
```
private Boolean Working = false;
const int scale = 4;
const int size = 50;
Int32[] data = new Int32[size];
Rectangle[] lines = new Rectangle[size];
private void button1_Click(object sender, RoutedEventArgs e)
{
canvas1.Children.Clear();
for (int i = 0; i < data.Length; i++)
{
data[i] = i;
lines[i] = new Rectangle()
{
Height=i*scale,
Width = 10,
StrokeThickness=5,
Stroke = new SolidColorBrush(Colors.Red),
Name=i.ToString(),
};
canvas1.Children.Add(lines[i]);
}
}
```
Now the problem is that all the rectangle are created with the same height and width?.
```
<UserControl x:Class="SilverlightApplication1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="500">
<Canvas x:Name="canvas2" Background="White">
<Canvas x:Name="canvas1" Background="White"></Canvas>
<Button Content=" Generate" Height="38" Name="button1" Width="75" Click="button1_Click" Margin="0,352,245,24" HorizontalAlignment="Right" Canvas.Left="12" Canvas.Top="85" />
<Button Content="Shuffle" Height="38" HorizontalAlignment="Left" Name="button2" Margin="12,352,0,24" Click="button2_Click_1" Canvas.Left="81" Canvas.Top="85" Width="71" />
<Button Canvas.Left="181" Canvas.Top="437" Content="Bubble Sort" Height="38" Name="button3" Width="109" Click="button3_Click" />
</Canvas>
</UserControl>
```

| Dynamically create Rectange in silverlight? | CC BY-SA 2.5 | null | 2011-02-28T12:00:37.137 | 2011-02-28T12:42:02.000 | 2011-02-28T12:26:19.117 | 449,897 | 449,897 | [
"c#",
"silverlight"
]
|
5,141,735 | 1 | 5,141,764 | null | 0 | 37 | I just cant seem to get my head around this problem, so thought I would ask it here.
The system I'm making is a system where farmers can claim subsidy for the crops / animals. Each farmer is allocated to a specific region. What I need to do is to get the total claims made by each region. Here's my tables:

So what I need to do again is to take the sum of total from the claims table but group that by region. I already know how to do it for one specific region, but I would like to select all the regions in one query.
Thanks for your help, much appreciated!
| Problem with MySQL join query | CC BY-SA 2.5 | null | 2011-02-28T12:04:36.990 | 2011-02-28T12:08:46.313 | null | null | 543,920 | [
"mysql",
"join"
]
|
5,141,743 | 1 | 5,141,936 | null | 5 | 7,986 | I want to make an request from
```
webapp.mysite.net
```
to
```
mysite.net/request.php?param=...
```
The response is plain text. But I keep getting an error

The `async` param must be set to `false`.
I assume my request is called `cross-domain request`. So I setup a [simple php proxy](https://github.com/cowboy/php-simple-proxy/raw/master/ba-simple-proxy.php) to solve the problem, but this does not work for me. It gives me an emtpy response.
I try to solve this problem for about two days now but without success. Any ideas?
| Ajax request returns 0x80004005 (NS_ERROR_FAILURE) | CC BY-SA 2.5 | 0 | 2011-02-28T12:05:56.387 | 2012-12-12T20:37:08.920 | 2011-02-28T12:36:16.757 | 401,025 | 401,025 | [
"jquery"
]
|
5,142,301 | 1 | 5,142,559 | null | 1 | 342 | Icefaces has a method for positioning a popup WHERE you click the . I disabled the portion of the code where the coordinates of the mouse click are taken because I want to put this menuPopup at the position where my targComp (which is actually a div) is located (so fixed location iso mouse location).
The javascript method called is:
```
function contextMenuPopup(event, popupMenu, targComp) {
var dynamic = $(popupMenu + "_dynamic");
if (!event) {
event = window.event;
}
if (event) {
event.returnValue = false;
event.cancelBubble = true;
if (event.stopPropagation) {
event.stopPropagation();
}
var posx = 0; // Mouse position relative to
var posy = 0; // the document
/*
* if (event.pageX || event.pageY) { posx = event.pageX; posy =
* event.pageY; } else if (event.clientX || event.clientY) { posx =
* event.clientX + document.body.scrollLeft +
* document.documentElement.scrollLeft; posy = event.clientY +
* document.body.scrollTop + document.documentElement.scrollTop; }
*/
alert(Left(targComp));
Ice.Menu.showIt(posX, posY, popupMenu, targComp);
}
}
```
You see that I only commented old code and add an alert to find out if my methods which return the position of the targComp are correctly calculating the value.
```
function Left( el ) {
var _x = 0;
while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) {
_x += el.offsetLeft - el.scrollLeft;
el = el.parentNode;
}
return _x;
}
function Top( el ) {
var _y = 0;
while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) {
_y += el.offsetTop - el.scrollTop;
el = el.parentNode;
}
return _y;
}
```
I do not understand why when I surely know that my targComp div is not at that left coordinate...
Do you see any problem? (yeah, I know I have to replace the posX and posY at the showIt method, but I'll do that after I am sure that Left and Top are correct (which by the way are copied from [here](https://stackoverflow.com/questions/442404/dynamically-retrieve-html-element-x-y-position-with-javascript) so already confirmed that these methods are working fine...)
Then where it's the problem?
Html code:
```
<div class="icePnlGrp graMainMenuTabDefault" id="frmMainMenu:divMenuPopupAP" onmouseover="contextMenuPopup(event, 'frmMainMenu:menuPopupAP_sub', 'frmMainMenu:divMenuPopupAPSmall');return false;">
<label class="iceOutLbl graMainMenuTabText" id="frmMainMenu:j_id54">Application Portfolio</label>
<div class="icePnlGrp" id="frmMainMenu:divMenuPopupAPSmall" style="border-style:solid; border-width:1px;">
</div>
</div>
```
(after solving the above problem): I attach a screenshot wondering why the mouse position is calculated correctly when I press click inside that targetComp div but the position of the div is wrong...?

seems that I do need
instead of calliny those Top and Left functions.
where
```
targCompObject = document.getElementById(targComp);
```
So the final call is:
```
Ice.Menu.showIt(targCompObject.offsetLeft, targCompObject.offsetTop,
popupMenu, targComp);
```
| javascript - position functions returns 0 | CC BY-SA 2.5 | null | 2011-02-28T12:58:55.800 | 2011-08-05T11:40:28.703 | 2017-05-23T12:13:26.330 | -1 | 174,349 | [
"javascript"
]
|
5,142,556 | 1 | 5,144,132 | null | 11 | 3,018 | I'm playing with GD library for a while and more particuraly with Bezier curves atm.
I used [some existant class](http://www.dreamstube.com/post/Bezier-Curves-In-PHP!.aspx) which I modified a little (seriously `eval()`...). I found out it was a algorithm used in and convert for GD.
Now I want to take it to another level: I want some colors.
No problem for but with it's harder.
My question is:
Is there any existant algorithm for that? I mean mathematical algorithm or any language doing it already so that I could transfer it to PHP + GD?
So, I tried @MizardX solution with a curve :
- - - -
Which should show this :

And gives this :

`imagefilledpolygon`- - - - 
| Algorithm to add Color in Bezier curves | CC BY-SA 2.5 | 0 | 2011-02-28T13:26:02.427 | 2011-03-13T19:01:28.053 | 2011-03-07T12:54:27.097 | 460,368 | 460,368 | [
"php",
"algorithm",
"gd",
"bezier"
]
|
5,143,301 | 1 | 5,143,368 | null | 9 | 522 | 
I have to click two times, each time I want to read the doc. I have found that this increases my development time incredibly.
Unfortunately the Visual Studio team doesn't seem to notice or care about my request/questions, that's why I ask here. Any way to configure this so it shows all the text by default or replace it with the old tooltip system?
| How do I disable VS PowerTools tooltips? | CC BY-SA 2.5 | 0 | 2011-02-28T14:33:41.300 | 2011-02-28T14:39:42.397 | null | null | 335,355 | [
".net",
"visual-studio-2010"
]
|
5,143,555 | 1 | 5,143,987 | null | 5 | 23,925 | I have div that has exact width (280px) and inside it there are 2 hyperlinks and one input text box. The hyperlinks take just a little space. I want the input text box to fill the remaing space in the `div`. How can I do that ?
Html:
```
<div class="notificationArea">
<a>A</a> <a>B</a>
<input id="Text1" type="text" />
</div>
```
CSS:
```
.notificationArea
{
width: 280px;
vertical-align: middle;
text-align:left;
}
```
Note: I can replace the outer `div` by something else (for example `span`) but I'm trying to avoid tables.
---
EDIT: All elements (both hyperlinks and input) should be on the same line.
---
I want the same think to work when I replace both hyperlinks with images. That is I want a `div` of fixed width that contains 2 images (fixed size) and `input` textboxt that will fill the remainig space.
Http:
```
<div class="notificationArea">
<img src="someImage" />
<img src="someImage2" />
<input id="Text1" type="text" />
</div>
```
CSS:
```
.notificationArea
{
border-style: solid;
width: 330px;
}
.notificationArea input
{
width: 100%;
}
```
What I got is:

---
But what I is:

So I don't want the input box to wrap. The solution on the picture uses tables that I'd like to avoid if possible.
| How to make content fill space inside <div> tag in html? | CC BY-SA 2.5 | null | 2011-02-28T14:55:40.587 | 2021-03-24T23:22:12.600 | 2011-03-04T19:53:46.670 | 311,865 | 311,865 | [
"html",
"css"
]
|
5,143,749 | 1 | null | null | 0 | 1,624 | We created new TFS work item. After some time, we began to have issues with controls UI layout. (Screen shot is attached as an example). Spaces between controls are VERY big. If we re-run the query - everything becomes good. After another re-run, the layout again becomes corrupted.
The UI Layout is modified in the way as suggested with this answer: [Is it possible to customize "History" tab for Bug/Task work item types?](https://stackoverflow.com/questions/3823526/is-it-possible-to-customize-history-tab-for-bug-task-work-item-types).

What is a reason of that and how to fix it?!
EDITED: layout was added
```
<FORM>
<Layout>
<Group Label="General" Margin="(1,1,1,1)">
<Column FixedWidth="100">
<Control FieldName="Custom.IssueType" Type="FieldControl" Label="Issue Type:" LabelPosition="Left" />
<Control FieldName="Custom.Priority" Type="FieldControl" Label="Priorit&y:" LabelPosition="Left" />
</Column>
<Column PercentWidth="100">
<Group Margin="(2,2,2,2)">
<Column PercentWidth="100">
<Control FieldName="System.Title" Type="FieldControl" Label="&Title:" LabelPosition="Left" />
</Column>
</Group>
<Group Margin="(2,2,2,2)">
<Column PercentWidth="50">
<Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="&Area:" LabelPosition="Left" />
</Column>
<Column PercentWidth="50">
<Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="&Iteration:" LabelPosition="Left" />
</Column>
</Group>
</Column>
</Group>
<Group Margin="(1,1,1,1)">
<Column PercentWidth="70">
<Group Label="Status" Margin="(1,1,1,1)">
<Column PercentWidth="50">
<Control FieldName="System.State" Type="FieldControl" Label="&State:" LabelPosition="Left" />
<Control FieldName="System.AssignedTo" Type="FieldControl" Label="Assi&gned to:" LabelPosition="Left" />
</Column>
<Column PercentWidth="50">
<Control FieldName="System.Reason" Type="FieldControl" Label="&Reason:" LabelPosition="Left" />
<Control FieldName="Custom.CustomerIssue" Type="FieldControl" Label="&Customer Issue:" LabelPosition="Left" />
</Column>
</Group>
</Column>
<Column FixedWidth="400">
<Group Label="Details" Margin="(1,1,1,1)">
<Column PercentWidth="50">
<Control FieldName="Custom.FoundInBuild" Type="FieldControl" Label="&Found in build:" LabelPosition="Left" />
<Control FieldName="Custom.ResolvedInBuild" Type="FieldControl" Label="Resolved in &build:" LabelPosition="Left" />
</Column>
<Column PercentWidth="50">
<Control FieldName="Custom.HelpAuthoring" Type="FieldControl" Label="Help Authoring:" LabelPosition="Left" />
<Control FieldName="Custom.RankInt" Type="FieldControl" Label="Ran&k:" LabelPosition="Left" NumberFormat="WholeNumbers" MaxLength="10" />
</Column>
</Group>
</Column>
</Group>
<TabGroup Margin="(1,1,1,1)">
<Tab Label="Content">
<Group>
<Column PercentWidth="50">
<Control FieldName="System.Description" Type="HtmlFieldControl" Label="Des&cription:" LabelPosition="Top" Dock="Fill" />
</Column>
<Column PercentWidth="50">
<Control FieldName="System.History" Type="WorkItemLogControl" Label="&History:" LabelPosition="Top" Dock="Fill" />
</Column>
</Group>
</Tab>
<Tab Label="Links">
<Control Type="LinksControl" LabelPosition="Top" />
</Tab>
<Tab Label="File Attachments">
<Control Type="AttachmentsControl" LabelPosition="Top" />
</Tab>
<Tab Label="Misc.">
<Group>
<Column PercentWidth="50">
<Group Label="">
<Column PercentWidth="50">
<Group Label="Estimated Time">
<Column PercentWidth="100">
<Control FieldName="Custom.EstimatedTimeTotal" Type="FieldControl" Label="Total:" LabelPosition="Left" />
<Control FieldName="Custom.EstimatedTimeLeft" Type="FieldControl" Label="Left:" LabelPosition="Left" />
</Column>
</Group>
</Column>
<Column PercentWidth="50">
<Group Label="Other">
<Column PercentWidth="100">
<Control FieldName="Custom.Localization" Type="FieldControl" Label="Localization:" LabelPosition="Left" />
<Control FieldName="Custom.Rebrand" Type="FieldControl" Label="Rebrand:" LabelPosition="Left" />
</Column>
</Group>
</Column>
</Group>
</Column>
</Group>
</Tab>
</TabGroup>
</Layout>
</FORM>
```
| UI issue in TFS custom work item | CC BY-SA 2.5 | 0 | 2011-02-28T15:11:21.423 | 2011-03-01T13:24:50.447 | 2017-05-23T12:24:45.570 | -1 | 159,179 | [
"tfs"
]
|
5,144,391 | 1 | 5,144,599 | null | 1 | 2,377 | I have a form with a button at the end like this:
```
var simple_form_right = new Ext.FormPanel({
frame:true,
labelWidth: 90,
labelAlign: 'right',
title: 'Orderer Information',
bodyStyle:'padding:5px 5px 0',
width: 300,
height: 600,
autoScroll: true,
itemCls: 'form_row',
defaultType: 'displayfield',
items: [{
fieldLabel: 'Customer Type',
name: 'customerType',
allowBlank:false,
value: 'Company'
}, .... {
fieldLabel: 'Item 21',
name: 'item21',
value: 'test'
},
new Ext.Button({
text: "Cancel Order",
style: 'width: 100%; color: red',
handler: function() {
alert('pressed');
}
})
]
});
```
The button works but as the style information attempt indicates, I would like the button to and have .

# Addendum
Robby's solution works 100%:
```
...
}, {
fieldLabel: 'Item 20',
name: 'item20',
value: 'test'
}, {
fieldLabel: 'Item 21',
name: 'item21',
value: 'test'
}, {
xtype: 'button',
text: '<span style="color:red">Cancel Order</span>',
anchor: '100%',
handler: function() {
alert('pressed');
}
}
```

| How do I make a button in an Ext.FormPanel be width=100% with red text? | CC BY-SA 2.5 | 0 | 2011-02-28T16:06:00.273 | 2011-03-01T08:03:37.550 | 2011-03-01T08:03:37.550 | 4,639 | 4,639 | [
"javascript",
"forms",
"button",
"extjs"
]
|
5,144,605 | 1 | null | null | 2 | 698 | I have a CALayer instance for which I've set a png file as content. After setting the various shadow properties, the shadow is drawn above/on top of the image and not below it.
Here's the code:
```
CALayer *boardLayer = [CALayer layer];
boardLayer.frame = CGRectMake(self.layer.frame.origin.x,
self.layer.frame.origin.y, self.layer.frame.size.width, BOARD_HEIGHT);
boardLayer.shadowColor = CGColorCreateGenericRGB(100.0, 100.0, 0.0, 1.0);
boardLayer.shadowOffset = CGSizeMake(10, 10);
boardLayer.shadowOpacity = 0.99f;
boardLayer.shadowRadius = 5.0f;
boardLayer.contents = (id)[self imageToImageRef:[NSImage imageNamed:@"board.png"]
withMaxWidth: 0
andMaxHeight: 0];
boardLayer.contentsGravity = kCAGravityResize;
boardLayer.masksToBounds = NO;
```
In the screenshot you can see that the yellow shadow is above the content:

Is there something I'm missing in setting up the CALayer?
Thanks, Mark.
EDIT: I also tried the above code with a negative Y offset, same result, the shadow is above the image.
| CALayer draws shadow on top of content image | CC BY-SA 2.5 | null | 2011-02-28T16:24:14.217 | 2011-02-28T17:23:02.333 | 2011-02-28T17:23:02.333 | 458,669 | 458,669 | [
"core-animation",
"calayer",
"shadow"
]
|
5,144,830 | 1 | 5,149,002 | null | 7 | 16,475 | I'm trying to implement a folder viewer to view the structure of a specific path. and this folder view should look like a the tree widget in PyQT , i know that the file dialog can help , but i need to have it inside my main window.
i tried to implement this using QTreeWidget and i used a recursed function to loop inside folders, but this is too slow. since it needs to recurse around huge number of folders.
is this the right way to do it? or there is a ready qt solution for this problem.
Check the figure below.

| how to create folder view in pyqt inside main window | CC BY-SA 3.0 | 0 | 2011-02-28T16:42:39.960 | 2017-05-19T19:08:58.737 | 2012-12-13T16:52:32.707 | 288,280 | 222,829 | [
"python",
"pyqt",
"pyqt4"
]
|
5,145,300 | 1 | 5,146,301 | null | 3 | 1,990 | How can I hide the grid lines separating empty cells from the adjacent cells in a TListView control? It would be like the HTML `colspan` table attribute, or Excel's "merge cells" command. I would like for cells with text in them to retain their normal borders.

| How can I omit the grid lines of empty cells in a list view? | CC BY-SA 2.5 | 0 | 2011-02-28T17:25:14.220 | 2019-07-30T11:43:18.323 | 2011-02-28T19:26:12.870 | 33,732 | 381,979 | [
"delphi",
"listview",
"gridlines"
]
|
5,145,499 | 1 | 5,146,885 | null | 0 | 444 | The underlying table has a int, guid and Filestream column in SQL Server 2008 R2. The filestream shows up as byte[]. What I observe is that the memory consumption keeps on increasing. What should I do?
```
MyEntities bh = new MyEntities ();
foreach (var s in bh.TaskGraphs)
{
try
{
using (var x = new MemoryStream(s.TaskGraph1))
{
//var t = TaskGraph.Load(x);
//Validate(t);
}
}
catch (Exception e)
{
}
}
```
Here's the memory usage pattern

I now observed that doing bh.TaskGraphs.Select(p => new { p.TaskGraph1, p.StreamId } makes the exception go away. Is it due to the child table linked to this table?
BTW, each BLOB is ~ 3MB
| ADO.NET Entities throws OutOfMemoryException. How to prevent that | CC BY-SA 2.5 | null | 2011-02-28T17:43:18.683 | 2011-03-01T09:23:56.993 | 2011-02-28T19:03:48.573 | 30,546 | 30,546 | [
"c#",
".net",
"memory-management",
"ado.net"
]
|
5,145,501 | 1 | 5,146,453 | null | 2 | 6,660 | I'm a Drupal newbie, but have successfully installed it at a CentOS 5.5 Linux, PostgreSQL 8.4.7, PHP 5.3 machine.
I've chosen minimal installation and then enabled following modules: Block, Image, Locale, OpenID (hope to add Google accounts later...) and Search. The User module etc. are enabled by default anyway.
My problem is:
I don't know how to add Gender/City fields and make them mandatory.
As a SPAM-fighting measure at [my old phpBB 3 site](http://preferans.de) I have a mandatory question for new users about their gender: and the first answer is default and prevents the new user from registering.
Is it possible to do the same in Drupal 7?
And I hope it is doable without installing any additional modules as the stock install is easier to update. (That is what I was doing with my old phpBB site - with no mods installed).
Thank you for your answers! Alex
Here is my Field module screenshot, does it look ok?
Maybe my problem is that List is shown as ?

| Drupal 7 user registration: creating mandatory gender/city fields | CC BY-SA 2.5 | null | 2011-02-28T17:43:52.310 | 2011-03-01T12:12:14.287 | 2011-03-01T12:12:14.287 | 165,071 | 165,071 | [
"drupal",
"drupal-7",
"user-registration"
]
|
5,146,152 | 1 | null | null | 1 | 455 | I am trying my hands on the MeeGo and I have downloaded the `MeeGo 1.1 SDK for Windows` and followed everything step by step given in the [MeeGo wiki](http://wiki.meego.com/SDK/Docs/1.1/Getting_started_with_the_MeeGo_SDK_for_Windows) to install SDK on my Windows 7 System and everything was fine. But when I start the emulator from the `Qt Creator IDE or MADDE terminal` the emulator screens appears and nothing happens after a startup welcome message as given in below image.

My System configurtion are as follows:
> Operating System : Microsoft Windows 7 Ultimate 32 BitProcessor : Intel(R) Core(TM)2 Duo CPU [email protected] GHz
I have also refered the [thread](http://forum.meego.com/showthread.php?p=18357) on the MeeGo developer site but seems this is not a workaround of for my problem. I know this SDK is in beta version but as far as many developers are using it on Windows system, so I don't know if there is something wrong with my emulator.
Kindly post your valueable feedback.
| MeeGo Handset Emulator not starting on Windows 7 | CC BY-SA 2.5 | null | 2011-02-28T18:43:10.977 | 2011-03-25T13:50:40.187 | 2020-06-20T09:12:55.060 | -1 | 457,982 | [
"windows-7",
"emulation",
"qt-creator",
"meego"
]
|
5,146,174 | 1 | 5,146,303 | null | 1 | 4,933 | How would one pass a NSMutableArray via method return.
I have it passing the array "spaces" so an array of 10 objects passes the 10 blocks but none of the information contained in those objects.
Thanks in advance
Edit: Basically I created another class that contains path information because my controller was getting a bit cluttered. So this new class I want call the "create" method which returns an NSMutableArray. The array is created fine in the path class but when the return statement fires it only passes the spaces and not the values or even a pointer.
currently it's
```
return path;
```
I've tried
```
return &path;
```
and that fails epically.
Edit2: Here is the issue I'm having unfortunately.


Still crashing
calling
```
newNode = [newNode copy];
```
causes a crash
| iOS - Passing a NSMutableArray via method return | CC BY-SA 2.5 | null | 2011-02-28T18:45:18.723 | 2011-02-28T21:14:54.343 | 2011-02-28T21:14:54.343 | 584,994 | 584,994 | [
"iphone",
"objective-c",
"ipad",
"ios",
"nsmutablearray"
]
|
5,146,560 | 1 | 5,156,726 | null | 0 | 1,415 | I have Excel Export functionality in my MVC App. The way this works is, I use this line:
```
window.open((actionUrl + "?id=" + guid + "&viewName=" + viewUrl + "&fileName=" + fileName), null, null, null);
```
This enables me to pass all of my parameters to the MVC action through the URL. The action looks like this:
```
public ActionResult ExportToExcel(Guid? id, string viewName, string fileName)
{
IndicationBase indication = CachedTransactionManager<IndicationBase>.GetCachedTransactions(id.Value);
return new ExcelResult<Chatham.Web.Models.Indications.ModelBase>
(
ControllerContext,
viewName,
fileName,
indication.Model
);
}
```
It then calls the Excel Result which looks like this:
```
public class ExcelResult<Model> : ActionResult
{
string _fileName;
string _viewPath;
Model _model;
ControllerContext _context;
public ExcelResult(ControllerContext context, string viewPath, string fileName, Model model)
{
this._context = context;
this._fileName = fileName;
this._viewPath = viewPath;
this._model = model;
}
protected string RenderViewToString()
{
using (var writer = new StringWriter())
{
var view = new WebFormView(_viewPath);
var vdd = new ViewDataDictionary<Model>(_model);
var viewCxt = new ViewContext(_context, view, vdd, new TempDataDictionary(), writer);
viewCxt.View.Render(viewCxt, writer);
return writer.ToString();
}
}
void WriteFile(string content)
{
HttpContext context = HttpContext.Current;
context.Response.Clear();
context.Response.AddHeader("content-disposition", "attachment;filename=" + _fileName);
context.Response.Charset = "";
context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
context.Response.ContentType = "application/ms-excel";
context.Response.Write(content);
context.Response.End();
}
public override void ExecuteResult(ControllerContext context)
{
string content = this.RenderViewToString();
this.WriteFile(content);
}
}
```
All of this works in Firefox but not in IE. Could it be something with the Response headers? That was my first guess but I wouldn't even know where to begin looking for something wrong.
The error that comes back from IE is this:

Any help would be greatly appreciated. Thanks!
| Excel Export working in Firefox but not IE | CC BY-SA 2.5 | null | 2011-02-28T19:24:18.727 | 2011-03-01T15:43:53.077 | null | null | 534,101 | [
".net",
"asp.net-mvc-2",
"firefox",
"internet-explorer-8",
"export-to-excel"
]
|
5,146,684 | 1 | 5,235,805 | null | 0 | 1,591 | Im using image sprites across my site.
in IE6 and IE7 a gray border appears around the images..
works fine in the other browsers +IE8
how can i remove it?
here it is the bottom one is a div:

| ie6 and ie7 remove border around image sprites | CC BY-SA 2.5 | null | 2011-02-28T19:35:12.150 | 2014-01-14T15:49:30.247 | 2014-01-14T15:49:30.247 | 881,229 | 66,975 | [
"html",
"css",
"internet-explorer-7",
"internet-explorer-6"
]
|
5,146,724 | 1 | 6,049,805 | null | 5 | 2,775 | Microsoft SQL Server Management Studio (SSMS) corrupts the display results and query window in both versions 2005 and 2008 as shown in the screenshot. It seems like the window drawing / re-drawing display system repeats the scroll bars and does not draw / re-draw the content areas. This occurs on Windows 7 x64 on both a 2-monitor setup on a workstation and on a laptop.
[MS Connect](http://connect.microsoft.com/SQLServer/feedback/details/533311/display-corruption-on-ssms-at-large-resolutions-on-second-screen)
A few add-ons such as Tabs Studio and a few screen capture utilities are in use, but the behavior persists even if these are disabled and/or unloaded and on reboot.
My question is if this is caused by something that is within my control and how the behavior may be fixed. In the meantime I am using Linqpad (wonderful) but we still need to use SSMS for a number of reasons and this is driving us nuts.
At least one other person has had this happen and has posted on MS's connect site, but it has not be resolved or address by MS as far as I can tell.

| Display corrupted with repeated scrollbar in SSMS Microsoft SQL Server Management Studio | CC BY-SA 3.0 | 0 | 2011-02-28T19:39:30.280 | 2013-03-01T19:39:33.177 | 2011-05-18T19:01:47.227 | 369,601 | 369,601 | [
"sql-server",
"ssms"
]
|
5,146,754 | 1 | 5,160,532 | null | 0 | 1,535 | I am trying to use [TCPCatcher](http://www.tcpcatcher.org) to capture & decrypt my gmail SSL traffic and it's not working for me.
In Tunnel SSL mode nothing is being captured and the page renders fine. The Firefox add-on seems to set the regular http proxy only.
Below are my TCPCatcher & Firefox settings. In the Monitor SSL mode I either get a "The connection was reset" or a "The proxy server is refusing connections" error. I managed to get it to work in Transparent Proxy mode where I modify the hosts file. I am trying to get the non transparent mode to work. I never get the untrusted cert page as mentioned in [this tutorial](http://www.tcpcatcher.org/monitoring_SSL.php).
Is there a setting not set properly?
(Note: if you know of other free sniffers which decrypt SSL traffic I can take a look at them. Other than Fiddler. I don't think WireShark decrypts SSL. )


| Can't get TcpCatcher to capture SSL traffic | CC BY-SA 2.5 | null | 2011-02-28T19:43:20.973 | 2011-03-01T21:25:04.430 | null | null | 129,001 | [
"https",
"tcp",
"packet-sniffers"
]
|
5,147,258 | 1 | 5,147,278 | null | 3 | 3,678 | I have three links:
```
<a href="/about" class="f_link"> About </a>
<a href="/Login" class="f_link"> Login </a>
<a href="/Create Account" class="f_link"> Create Account </a>
```
I have some CSS styling for them:
```
.f_link{
height:38px;
padding-top:12px;
margin:0px;
color:gray;
}
.f_link:hover{
color:black;
text-decoration:none;
}
```
How this html is displayed in FF 3.6, IE 8, and some version of Google Chrome:

And this is how I would like it to be displayed in my three major browers:

I used firebug and it said there is no padding or margin between these links. What is that space there for then, and how can I get rid of it? I'm open to suggestions!
| Unknown space between links | CC BY-SA 2.5 | null | 2011-02-28T20:34:08.603 | 2013-09-04T20:39:59.887 | null | null | 552,067 | [
"html",
"css",
"hyperlink"
]
|
5,147,371 | 1 | 5,147,772 | null | 3 | 3,370 | I have User Control
```
<table style="border-width: 0">
<tr>
<td style="vertical-align: middle;">
<asp:RadioButton ID="rdOption" runat="server" Text="I m testing"
GroupName="Questions" oncheckedchanged="rdOption_CheckedChanged"
AutoPostBack="True"/>
</td>
<td style="vertical-align: middle; padding-left: 10px">
<asp:TextBox ID="txtOthers" runat="server" CssClass="txtbox" Visible="false"></asp:TextBox>
</td>
</tr>
</table>
protected void Page_Load(object sender, EventArgs e)
{
rdOption.GroupName = "myGroup";
rdOption.Text = Option.OptionDesc;
}
```
on Survery.aspx I loaded that user control dynamically
```
foreach (clsOptions option in _CurrentQuestion.Options)
{
UserControls_OptionField ctrl = Page.LoadControl("~/UserControls/OptionField.ascx") as UserControls_OptionField;
ctrl.Option = option;
pnlOption.Controls.Add(ctrl);
}
```
```
<input id="ContentPlaceHolder1_ctl01_rdOption" type="radio" name="ctl00$ContentPlaceHolder1$ctl01$myGroup" value="rdOption">
<input id="ContentPlaceHolder1_ctl02_rdOption" type="radio" name="ctl00$ContentPlaceHolder1$ctl02$myGroup" value="rdOption">
```

| Radio option GroupName problem in Dynamic loading user Control ASP.net | CC BY-SA 2.5 | 0 | 2011-02-28T20:45:05.760 | 2016-10-26T13:35:53.900 | 2011-02-28T20:57:23.163 | 389,200 | 389,200 | [
".net",
"asp.net",
"user-controls",
"radio-button"
]
|
5,147,384 | 1 | 9,142,724 | null | 6 | 1,155 | I would like to provide another button beside "Save & Close" button on site Page Editor that will trigger save and publish action once pressed.
I went to core and made a copy of "Save & Close" button that I'm planning to modify.

I would call this button "Save & Publish", but now I'm kinda curious if I have to modify javascript to include my custom call (let's say `javascript:scSave("myPublish:saveAndPublish")`)
I'm following [this](http://adeneys.wordpress.com/2008/08/27/creating-and-running-custom-pipelines-in-sitecore/) article to hook into pipeline and complete the action but not sure if that is proper way.
Any advice?
| Adding a Page Editor 'Save and Publish' Button | CC BY-SA 3.0 | null | 2011-02-28T20:47:13.393 | 2014-01-02T00:29:51.147 | 2014-01-02T00:29:51.147 | 2,124,993 | 39,715 | [
".net",
"sitecore",
"customization",
"sitecore6",
"page-editor"
]
|
5,147,460 | 1 | 5,147,528 | null | 6 | 2,913 | I'm following the [ASP.NET MVC Tutorial](http://www.asp.net/mvc/tutorials/mvc-music-store-part-3) and having started in VB.NET I'm having trouble converting the following razor code:

I have got
```
<ul>
@For Each g As MvcApplication1.Genre In Model
<li> @g.Name </li>
Next
</ul>
```
but getting
> Attribute Sepcifier is not a complete
statement
on both the `<li>` tags. I understand I need to use line continuation but can't figure out where. I'd be greatful if you can point out the problem.
| Converting C# Razor to VB | CC BY-SA 2.5 | null | 2011-02-28T20:54:31.500 | 2013-03-23T04:19:32.030 | null | null | 436,028 | [
"asp.net",
"asp.net-mvc",
"vb.net",
"razor"
]
|
5,148,376 | 1 | 5,148,432 | null | 8 | 15,414 | I have an `ArrayAdapter` which is hooked up to my `ListView`. I really like the "separators" feature in the Evernote Android application, where they separate items using a datestamp:
   
I assume what they're doing is having a view immediately above the list which is set to the value of the current separator, as you can see in the screenshots. (As you scroll past a separator, the text at the top is set to the value of the current separator, ie "January 2011") How would I actually insert the separators into my `ListView`?
| "Separators" in ListView | CC BY-SA 2.5 | 0 | 2011-02-28T22:34:11.873 | 2017-11-28T08:15:53.257 | null | null | 128,967 | [
"android",
"listview",
"android-layout"
]
|
5,148,411 | 1 | 5,148,581 | null | 0 | 808 | I got the following linq query:
```
var invadersOrderedInColumns = from i in invaders
group i by i.GetPosition().X;
```
This will order the invaders with the same X position. The next thing I want to do is retrieve the invader with the highest Y value from each of those columns.
Imagine if you will each invader as a black blok in the following image. This will represent the invaders after the above linq query. Each X = is the key.

Now, from each of these groups (columns), I want to get the invaders with the highest Y position (so the bottom invader of each column when you look at the picture):

How can I get this done with a Linq query?
| Get objects with max value from grouped by linq query | CC BY-SA 2.5 | null | 2011-02-28T22:37:53.490 | 2011-02-28T22:58:21.670 | null | null | 543,269 | [
"c#-4.0",
"linq-to-objects"
]
|
5,148,436 | 1 | null | null | 0 | 210 | I made an Mac OS X cocoa app, and when I click the red button the main window disappears.

However, when I clicked the icon in dock, it doesn't show the main window anymore.

What's wrong? How do i redraw the main window by catching what message?
| Redrawing the cocoa app's main window when clicked | CC BY-SA 2.5 | null | 2011-02-28T22:39:52.547 | 2011-02-28T22:52:40.867 | null | null | 260,127 | [
"objective-c",
"cocoa",
"sendmessage"
]
|
5,148,500 | 1 | 5,148,863 | null | 1 | 1,098 | UITableView custom cell showing weird results? I have my code below. Everything was showing fine until I put enough data to go off the initial screen then it started going crazy? My custom cell is shown below.

```
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"customCell"; // This is identifier given in IB jason set this.
PostTableCustomCellController *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSLog(@"Cell created");
NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"PostTableCustomCellController" owner:nil options:nil];
for(id currentObject in nibObjects)
{
if([currentObject isKindOfClass:[PostTableCustomCellController class]])
{
cell = (PostTableCustomCellController *)currentObject;
}
}
}
Post *post = [postsArray objectAtIndex:indexPath.row];
cell.authorName.text = post.author;
cell.deadline.text = post.deadline;
cell.description.text = post.description;
Post *myPost = [postsArray objectAtIndex:[indexPath row]];
NSString *text = myPost.description;
// Configure the cell...
// [[cell authorName] setText:@"1 day"];
// [[cell distance] setText:@"Austin, TX"];
// [[cell description] setText:@"dd" ];
// Might can remove these
UILabel *locationLabel = (UILabel *) [cell distance];
UILabel *postTextView = (UILabel *) [cell description];
//CGSize maximumLabelSize = CGSizeMake(254,88.0f);
CGSize constraint = CGSizeMake(CELL_CONTENT_WIDTH - (CELL_CONTENT_MARGIN * 2), 88.0f);
CGSize size = [text sizeWithFont:[UIFont systemFontOfSize:FONT_SIZE] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap];
CGFloat height = MAX(size.height, 35.0f);
CGFloat realHeight = height + 36.0f - (10);
CGSize expectedLabelSize = [text sizeWithFont:postTextView.font
constrainedToSize:constraint
lineBreakMode:postTextView.lineBreakMode];
CGRect newFrame = postTextView.frame;
newFrame.size.height = expectedLabelSize.height;
postTextView.frame = newFrame;
[[cell description] sizeToFit];
CGRect locationRect = locationLabel.frame; // calls the getter
locationRect.origin.y = realHeight;
/* CGFloat locRectHeight = postTextView.bounds.size.height; */
/* locationRect.origin.y = cell.bounds.size.height; */
locationLabel.frame = locationRect;
//[[cell authorName] setText:@"jgervin"];
[[cell viewForBackground] sizeToFit];
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
{
Post *myPost = [postsArray objectAtIndex:[indexPath row]];
NSString *text = myPost.description;
CGSize constraint = CGSizeMake(CELL_CONTENT_WIDTH - (CELL_CONTENT_MARGIN * 2), 88.0f);
CGSize size = [text sizeWithFont:[UIFont systemFontOfSize:FONT_SIZE] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap];
CGFloat height = MAX(size.height, 35.0f);
return height + (CELL_CONTENT_MARGIN * 2) + 36.0f;
}
```
| UITableView custom cell showing weird results? | CC BY-SA 2.5 | null | 2011-02-28T22:47:23.743 | 2011-02-28T23:33:01.473 | 2011-02-28T22:56:33.653 | 307,428 | 307,428 | [
"iphone",
"ios",
"uitableview"
]
|
5,148,944 | 1 | 5,149,028 | null | 2 | 1,264 | I would like to apply a "stroke" or outline to a png, identically to how Photoshop does it. I have a feeling this can be done with CALayer, but after some tinkering, it is not immediately obvious. setBorderWidth + setBorderColor is almost what I want, except that it only adds a border to the entire dimension of the image, rather than the outline of the png image itself.
Once the stroke is applied, I'd like to also knockout the fill of the png, leaving only an outlined border of the initial shape.

| Creating a stroke/outline of a .PNG with CALayer? | CC BY-SA 2.5 | 0 | 2011-02-28T23:44:56.070 | 2011-03-01T00:04:48.667 | 2011-03-01T00:04:48.667 | 625,709 | 625,709 | [
"iphone",
"objective-c",
"ios"
]
|
5,149,092 | 1 | 5,149,221 | null | 2 | 920 | I'm modeling my app in Core Data. I have an object called 'stats' that will have a 'player', a 'team', and a 'game' associated with each object. Once these stats objects are stored, I imagine querying for them by any one or more of these attributes (player, team, game). See model below.

Question 1: Does it make sense to model these as 'relationships' as opposed to 'attributes'.
Question 2: When retrieving I would like to form my NSPredicates using objects and not have to keep track of unique IDs names for each player, team, or game. If I store the player, team, and game objects (as opposed to unique IDs or names) with each entity, what is the best way to retrieve them. Would the following work if I wanted to retrieve all stats objects for a particular 'team' (someTeamObject) or do I need to query by ObjectID?
```
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"team == %@", someTeamObject];
```
Thanks
| Core Data modeling of relationships | CC BY-SA 2.5 | 0 | 2011-03-01T00:08:34.033 | 2011-03-01T00:28:32.543 | null | null | 407,203 | [
"iphone",
"ipad",
"core-data"
]
|
5,149,284 | 1 | 5,149,315 | null | 4 | 7,540 | I created a C# Project in Visual Studio and used an assembly on the SQLite 4.0 ADO Library from [http://sqlite.phxsoftware.com/](http://sqlite.phxsoftware.com/).
The program runs fine on the development machine, but when I try to run it on another system, there always occurs an error, stating that System.Data.SQLite.dll cannot be found. I placed the file into the program directory. I also tried to put it into a directory that is listed under PATH. Any suggestions?
I'm using an openFileDialog to open the database. Here's the according code:
```
con = new SQLiteConnection();
OpenFileDialog ofd1 = new OpenFileDialog();
ofd1.Filter = "db Datei (*.db)|*.db|Alle Dateien (*.*)|*.*";
if (ofd1.ShowDialog() == DialogResult.OK)
filepath = ofd1.FileName;
filepath.Replace("\\", "\\\\");
con.ConnectionString = "Data Source= \"" + filepath + "\"";
[...]
```
As already mentioned, this works on the development machine (Windows 7, 64bit).
The test machine runs in a virtualbox (Windows 7, 32bit).
The following exception occurs:
```
System.IO.FileNotFoundException: Die Datei oder Assembly "System.Data.SQLite.dll" oder eine Abhängigkeit davon wurde nicht gefunden. Das angegebene Modul wurde nicht gefunden.
Dateiname: "System.Data.SQLite.dll"
bei WindowsFormsApplication1.Form1.button2_Click(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Geladene Assemblys **************
mscorlib
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.1 (RTMRel.030319-0100).
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll.
----------------------------------------
WindowsFormsApplication1
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Users/andi/Documents/My%20Dropbox/Own%20Public%20Folders/Public%20(Andy%20Malessa)/juralookup(Wir%20brauchen%20dringend%20nen%20Namen)/DataManagementTool/WindowsFormsApplication1.exe.
----------------------------------------
System.Windows.Forms
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.1 built by: RTMRel.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System.Drawing
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.1 built by: RTMRel.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.1 built by: RTMRel.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Windows.Forms.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.1 built by: RTMRel.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------
mscorlib.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.1 (RTMRel.030319-0100).
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.
----------------------------------------
```
So basically it says: "System.Data.SQLite.dll" or a dependency was not found.
The file is present in the application directory. Here's a file listing:

| System.Data.SQLite not found on non-development PC | CC BY-SA 2.5 | 0 | 2011-03-01T00:40:56.540 | 2013-02-22T08:42:43.577 | 2011-03-01T17:08:30.557 | 632,997 | 632,997 | [
"c#",
"visual-studio-2010",
"sqlite"
]
|
5,149,301 | 1 | null | null | 27 | 13,727 | : Give me the resources or help fix the below code to transform path commands for SVG `<path>` elements by an arbitrary matrix.
:
I'm writing a library to convert any arbitrary SVG shape into a `<path>` element. I have it working when there are no `transform="..."` elements in the hierarchy, but now I want to bake the local transform of the object into the [path data](http://www.w3.org/TR/SVG/paths.html#PathData) commands themselves.
This is mostly working when dealing with the simple moveto/lineto commands. However, I'm not sure of the appropriate way to transform the bezier handles or arcTo parameters.
For example, I am able to convert this rounded rectangle to a `<path>`:
```
<rect x="10" y="30" rx="10" ry="20" width="80" height="70" />
--> <path d="M20,30 L80,30 A10,20,0,0,1,90,50 L90,80 A10,20,0,0,1,80,100
L20,100 A10,20,0,0,1,10,80 L10,50 A10,20,0,0,1,20,30" />
```
And I get a valid result when transforming without any round corners:
```
<rect x="10" y="30" width="80" height="70"
transform="translate(-200,0) scale(1.5) rotate(50)" />
--> <path d="M10,30 L90,30 L90,100 L10,100 L10,30" />
```
However, transforming only the x/y coords of the [elliptical arc](http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands) commands yields amusing results:

Following is the code I have so far (slightly pared-down). I also have a [test page](http://phrogz.net/SVG/transform_to_path.xhtml) where I'm testing various shapes. Please help me determine how to properly transform the `elliptical arc` and various other bezier commands given an arbitrary transformation matrix.
```
function flattenToPaths(el,transform,svg){
if (!svg) svg=el; while(svg && svg.tagName!='svg') svg=svg.parentNode;
var doc = el.ownerDocument;
var svgNS = svg.getAttribute('xmlns');
// Identity transform if nothing passed in
if (!transform) transform= svg.createSVGMatrix();
// Calculate local transform matrix for the object
var localMatrix = svg.createSVGMatrix();
for (var xs=el.transform.baseVal,i=xs.numberOfItems-1;i>=0;--i){
localMatrix = xs.getItem(i).matrix.multiply(localMatrix);
}
// Transform the local transform by whatever was recursively passed in
transform = transform.multiply(localMatrix);
var path = doc.createElementNS(svgNS,'path');
switch(el.tagName){
case 'rect':
path.setAttribute('stroke',el.getAttribute('stroke'));
var x = el.getAttribute('x')*1, y = el.getAttribute('y')*1,
w = el.getAttribute('width')*1, h = el.getAttribute('height')*1,
rx = el.getAttribute('rx')*1, ry = el.getAttribute('ry')*1;
if (rx && !el.hasAttribute('ry')) ry=rx;
else if (ry && !el.hasAttribute('rx')) rx=ry;
if (rx>w/2) rx=w/2;
if (ry>h/2) ry=h/2;
path.setAttribute('d',
'M'+(x+rx)+','+y+
'L'+(x+w-rx)+','+y+
((rx||ry) ? ('A'+rx+','+ry+',0,0,'+(rx*ry<0?0:1)+','+(x+w)+','+(y+ry)) : '') +
'L'+(x+w)+','+(y+h-ry)+
((rx||ry) ? ('A'+rx+','+ry+',0,0,'+(rx*ry<0?0:1)+','+(x+w-rx)+','+(y+h)) : '')+
'L'+(x+rx)+','+(y+h)+
((rx||ry) ? ('A'+rx+','+ry+',0,0,'+(rx*ry<0?0:1)+','+x+','+(y+h-ry)) : '')+
'L'+x+','+(y+ry)+
((rx||ry) ? ('A'+rx+','+ry+',0,0,'+(rx*ry<0?0:1)+','+(x+rx)+','+y) : '')
);
break;
case 'circle':
var cx = el.getAttribute('cx')*1, cy = el.getAttribute('cy')*1,
r = el.getAttribute('r')*1, r0 = r/2+','+r/2;
path.setAttribute('d','M'+cx+','+(cy-r)+' A'+r0+',0,0,0,'+cx+','+(cy+r)+' '+r0+',0,0,0,'+cx+','+(cy-r) );
break;
case 'ellipse':
var cx = el.getAttribute('cx')*1, cy = el.getAttribute('cy')*1,
rx = el.getAttribute('rx')*1, ry = el.getAttribute('ry')*1;
path.setAttribute('d','M'+cx+','+(cy-ry)+' A'+rx+','+ry+',0,0,0,'+cx+','+(cy+ry)+' '+rx+','+ry+',0,0,0,'+cx+','+(cy-ry) );
break;
case 'line':
var x1=el.getAttribute('x1')*1, y1=el.getAttribute('y1')*1,
x2=el.getAttribute('x2')*1, y2=el.getAttribute('y2')*1;
path.setAttribute('d','M'+x1+','+y1+'L'+x2+','+y2);
break;
case 'polyline':
case 'polygon':
for (var i=0,l=[],pts=el.points,len=pts.numberOfItems;i<len;++i){
var p = pts.getItem(i);
l[i] = p.x+','+p.y;
}
path.setAttribute('d',"M"+l.shift()+"L"+l.join(' ') + (el.tagName=='polygon') ? 'z' : '');
break;
case 'path':
path = el.cloneNode(false);
break;
}
// Convert local space by the transform matrix
var x,y;
var pt = svg.createSVGPoint();
var setXY = function(x,y,xN,yN){
pt.x = x; pt.y = y;
pt = pt.matrixTransform(transform);
if (xN) seg[xN] = pt.x;
if (yN) seg[yN] = pt.y;
};
// Extract rotation and scale from the transform
var rotation = Math.atan2(transform.b,transform.d)*180/Math.PI;
var sx = Math.sqrt(transform.a*transform.a+transform.c*transform.c);
var sy = Math.sqrt(transform.b*transform.b+transform.d*transform.d);
// FIXME: Must translate any Horizontal or Vertical lineto commands into absolute moveto
for (var segs=path.pathSegList,c=segs.numberOfItems,i=0;i<c;++i){
var seg = segs.getItem(i);
// Odd-numbered path segments are all relative
// http://www.w3.org/TR/SVG/paths.html#InterfaceSVGPathSeg
var isRelative = (seg.pathSegType%2==1);
var hasX = seg.x != null;
var hasY = seg.y != null;
if (hasX) x = isRelative ? x+seg.x : seg.x;
if (hasY) y = isRelative ? y+seg.y : seg.y;
if (hasX || hasY) setXY( x, y, hasX && 'x', hasY && 'y' );
if (seg.x1 != null) setXY( seg.x1, seg.y1, 'x1', 'y1' );
if (seg.x2 != null) setXY( seg.x2, seg.y2, 'x2', 'y2' );
if (seg.angle != null){
seg.angle += rotation;
seg.r1 *= sx; // FIXME; only works for uniform scale
seg.r2 *= sy; // FIXME; only works for uniform scale
}
}
return path;
}
```
| Baking transforms into SVG Path Element commands | CC BY-SA 2.5 | 0 | 2011-03-01T00:44:27.213 | 2017-09-14T18:15:30.903 | 2011-03-01T17:24:51.897 | 405,017 | 405,017 | [
"javascript",
"svg",
"2d",
"transform"
]
|
5,150,030 | 1 | null | null | 0 | 459 | i have a crossdomain.xml on my server. but it not in "/". and i use `loadPolicyFile` to load this crossdomain.xml.
```
Security.allowDomain("*")
Security.allowInsecureDomain("*");
Security.loadPolicyFile(AddressContext.getCurrentEnv().split("rest")[0]+"crossdomain.xml")
```
the PolicyFile's url is like this : `http://siteA.com/aop/crossdomain.xml`.
and my restful webservices address is like this : `http://siteA.com/aop/rest/start`
crossdomain.xml include my flash's host url.
the weird thing is flash still tried to load the `http://siteA.com/crossdomain.xml` like this

first is right and response 200. the second response 400 .
finally, the flash still told me SecrityError#2048
i don't know why?
| Flash SecurityError about sandbox. force to loadPolicyFile ,but it didn't work | CC BY-SA 2.5 | null | 2011-03-01T02:56:46.913 | 2012-02-09T11:12:40.190 | null | null | 478,944 | [
"apache-flex",
"actionscript-3",
"sandbox",
"crossdomain.xml"
]
|
5,150,033 | 1 | 5,150,039 | null | 2 | 955 | I am thinking of making an iou (i owe you) web app where I can keep track of who owes me and what. I am doing this as a side project. Anyways, I have no experience with database schema design. The app design is shown in the img below:

Right now, I know that I need to have a user table with at least the following:
```
UserTable:
username, usernameId (pk), password, passwordHint, email
```
Then, I get confused on how to proceed from there. Should I make a new table for every single Person#1, Person#2, etc? Or, should I have another table IouTable with all the "transactions" and use the username as the fk?
```
IouTable:
usernameId, personName, amount, description, date
```
So, when, user Yko logs on, it will run this query:
`SELECT * FROM IouTable WHERE usernameId = username` (may have gotten it wrong here)
Then, I would take the rows and separate out each person individually and have each transaction for each person on its own page.
Thanks in advance for any help/advice/suggestions!!!
| Help me design a database schema for an iou web application | CC BY-SA 2.5 | 0 | 2011-03-01T02:58:13.807 | 2011-03-17T16:50:58.710 | null | null | 384,964 | [
"php",
"mysql",
"database",
"database-design",
"schema"
]
|
5,150,244 | 1 | 5,152,437 | null | 2 | 3,644 | ```
<div id="wrapper">
<div id="content" style="background-color: white;">
...
</div>
</div>
#content{
float: left;
width: 540px;
padding: 30px 30px 0px 30px;
background-color:#19252f;
text-align: left;
min-height: 500px;
}
#wrapper {
margin: 0 auto;
width: 800px;
}
```

Firefox look

Internet Explorer 8 look
| CSS horizontal centering, and min-height not working in IE | CC BY-SA 2.5 | 0 | 2011-03-01T03:43:20.210 | 2014-07-29T16:50:07.063 | 2011-03-01T14:55:55.373 | 240,337 | 240,337 | [
"css",
"internet-explorer",
"firefox",
"google-chrome"
]
|
5,150,405 | 1 | 5,150,551 | null | 0 | 160 | Anyone have any ideas why this might be failing? The URL is accessible from my browser, but I get a host-not-found exception when I try to POST from within my app.
```
public void postData() {
//http://www.softwarepassion.com/android-series-get-post-and-multipart-post-requests/
File f = new File(filename);
try {
HttpClient client = new DefaultHttpClient();
String postURL = "http://dragonox.cs.ucsb.edu/Mosaic3D/clientupload.php";
HttpPost post = new HttpPost(postURL);
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("project", "globetrotter-test-00"));
nameValuePairs.add(new BasicNameValuePair("name", "globetrotter-test-00.jpg"));
post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
FileBody bin = new FileBody(f);
MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
reqEntity.addPart("file", bin);
post.setEntity(reqEntity);
HttpResponse response = client.execute(post);
HttpEntity resEntity = response.getEntity();
if (resEntity != null) {
Log.i("RESPONSE",EntityUtils.toString(resEntity));
}
} catch (Exception e) {
e.printStackTrace();
}
}
```

| UnknownHost on trying to POST -- Android | CC BY-SA 2.5 | null | 2011-03-01T04:17:52.353 | 2011-03-01T04:46:12.433 | 2011-03-01T04:27:01.927 | 387,064 | 387,064 | [
"android",
"networking",
"http-post"
]
|
5,151,089 | 1 | 5,152,069 | null | 1 | 295 | When you call Coderush to refactor something, sometimes it pulls options altogether with those that we already got in VS by default, like here in the picture.

That kinda bothers me. Is it possible to remove VS stuff and keep only that belongs to CodeRush?
Coderush 10.2.5
Visual Studio 2010
| Can I remove unnecessary items from Coderush menus? | CC BY-SA 2.5 | null | 2011-03-01T06:06:17.837 | 2011-03-01T08:35:21.597 | null | null | 116,395 | [
"visual-studio-2010",
"ide",
"devexpress",
"coderush"
]
|
5,151,244 | 1 | 5,151,294 | null | 4 | 17,938 | I want to draw a rectangle. Thing what I want is that show the user to rectangle on the mouse event.
Like in the image. This is for C# .net Forms application.
Help me to achieve this. Any help is appreciated.
Thank You
Yohan
| C# Drawing Rectangle On the mouse event | CC BY-SA 2.5 | 0 | 2011-03-01T06:30:14.683 | 2017-11-30T09:59:46.027 | null | null | 441,628 | [
"c#",
".net",
"graphics",
"windows-forms-designer"
]
|
5,151,433 | 1 | null | null | 3 | 1,271 | I have a Winforms application that uses `Graphics.DrawImage` to stretch and draw a bitmap, and I need help understanding precisely how the source pixels map to the destination.
Ideally I want to write a function like:
```
Point MapPixel(Point p, Size src, Size dst)
```
which takes a pixel coordinate on the source image and returns the coordinate of the "upper-left" pixel corresponding to it on the scaled destination.
For clarity, here's a trivial example where a 2x2 bitmap is scaled to 4x4:

The arrow illustrates how feeding the point (1,0) into MapPixel:
```
MapPixel(new Point(1, 0), new Size(2, 2), new Size(4, 4))
```
should give a result of (2,0).
It's simple to make MapPixel work for the above example, using logic like:
```
double scaleX = (double)dst.Width / (double)src.Width;
x_dst = (int)Math.Round((double)x_src * scaleX);
```
However I've noticed this naive implementation produces errors due to rounding when `dst.Width` is not an even multiple of `src.Width`. In this case DrawImage needs to pick some pixels to draw larger than others in order to make the image fit, and I'm having trouble duplicating its logic.
The following code demonstrates the trouble by scaling a 2x1 bitmap to a few different widths:
```
Bitmap src = new Bitmap(2, 1);
src.SetPixel(0, 0, Color.Red);
src.SetPixel(1, 0, Color.Blue);
Bitmap[] dst = {
new Bitmap(3, 1),
new Bitmap(5, 1),
new Bitmap(7, 1),
new Bitmap(9, 1)};
// Draw stretched images
foreach (Bitmap b in dst) {
using (Graphics g = Graphics.FromImage(b)) {
g.InterpolationMode = InterpolationMode.NearestNeighbor;
g.PixelOffsetMode = PixelOffsetMode.Half;
g.DrawImage(src, 0, 0, b.Width, b.Height);
}
}
```
Here's what the original `src` image and the output `dst` images look like, along with some numbers showing how MapPixel needs to map the blue pixel:

I can't for the life of me figure out how DrawImage decides which pixel to make bigger. It seems to sometimes round up, and sometimes round down. I don't care which it chooses, but I need it to be predictable for my function to work correctly.
I've tried modifying my MapPixel example above to use `MidpointRounding.AwayFromZero`, and even replaced `Math.Round` with a function that rounds to the nearest number (slightly improves the results but still isn't perfect). I've also tried letting the Graphics class handle the scaling - i.e. I set `ScaleTransform`, call `DrawImageUnscaled` and then try to use `TransformPoints` to convert the coordinates. Interestingly, the results of the TransformPoints method aren't always consistent with what DrawImage and DrawImageUnscaled do, either.
I've also tried digging into GDI+ for hints, but haven't turned up anything useful yet.
I don't want to have to resort to painting each pixel individually just to maintain predictability of where it will land.
In case you're wondering, the reason I'm using `InterpolationMode.NearestNeighbor` is to avoid anti-aliasing (I need to maintain fidelity of the individual pixels), and `PixelOffsetMode.Half` is included because if it's not there then DrawImage pans my bitmap by half a pixel.
A couple more examples of problem points include x=7 when scaling 4px to 13px, and x=8 when scaling 4px to 17px.
I can post complete unit test code if desired which allows you to drop in and verify a MapPixel function. So far the only way I've been able to achieve 100% accuracy is through an ugly hack that generates a "hint" source image where each pixel is set to a unique color. It maps a coordinate by checking what color it is in the hint image, then looking for that color in a scaled version of the hint image. Optimizations are possible (e.g. hint images are of single-pixel width or height, and the naive logic above is used to guess the approximate answer and work outward from there) but it's still ugly.
I'd appreciate if someone could shed some light on the plumbing behind DrawImage and help me come up with a simpler (but still accurate) implementation for MapPixel.
| Accurately mapping pixels scaled by Graphics.DrawImage | CC BY-SA 2.5 | 0 | 2011-03-01T07:03:09.823 | 2011-03-29T21:42:07.207 | 2011-03-01T07:24:21.810 | 589,059 | 589,059 | [
"bitmap",
"gdi+",
"scaling",
"drawimage",
"stretchblt"
]
|
5,152,012 | 1 | 5,152,690 | null | 2 | 3,867 | I am doing a PHP tutorial that uses the code below to insert a new user into a database. In the video tutorial I am following, the code works, but when I tried it I got the following error message
```
Database query failed: Unknown column
'password' in 'field list'
```
Can someone explain what's wrong? Why is there only a problem with password? but it worked o.k. in the tutorial?
```
$sql = "INSERT INTO users (id, username, password, first_name, last_name) ";
$sql .= "VALUES (1, 'kskoglund', 'secretpwd', 'Kevin', 'Skoglund')";
$result = $database->query($sql);
public function query($sql) { $result
= mysql_query($sql, $this->connection);
return $result;
}
```


| MySQL "unknown column" error message | CC BY-SA 3.0 | null | 2011-03-01T08:27:40.113 | 2011-06-14T22:23:24.473 | 2011-06-14T22:23:24.473 | 26,535 | 577,455 | [
"mysql"
]
|
5,152,450 | 1 | 5,152,840 | null | 0 | 936 | i have done up a method to return a string values of a textfile which is hosted on a site
but i cant seem to get the value out when i call the method
```
private String DownloadFromUrl() //this is the downloader method
{
String strFileContents = null;
try
{
String webURL = "http://www.example.net/test/file.txt";
URL url = new URL(webURL);
/* Open a connection to that URL. */
URLConnection ucon = url.openConnection();
/*
* Define InputStreams to read from the URLConnection.
*/
InputStream is = ucon.getInputStream();
BufferedInputStream bis = new BufferedInputStream(is);
//create a byte array
byte[] contents = new byte[1024];
int bytesRead=0;
while( (bytesRead = bis.read(contents)) != -1){
strFileContents += new String(contents, 0, bytesRead);
}
}
catch (IOException e)
{
}
return strFileContents;
}
```
i got a null pointer exception thrown from the stringreader
```
//Read text from file
StringBuilder text = new StringBuilder();
String test = DownloadFromUrl();
try {
StringReader sr = new StringReader(test);
String line="";
int c,counter =0;
while ((c = sr.read()) != -1)
{
line+=(char)c;
counter++;
}
char[] singleText = line.toCharArray();
for (int i = 0; i < counter; i++)
{
classifier(singleText[i]);
}
text.append(line);
}
catch (IOException e) {
//You'll need to add proper error handling here
}
```
i tested my code and the error was thrown form the stringreader with a null pointer
but works correctly when i test with a string text.
so the problem would lie on the DownloadFromUrl method not returning the string of text from the online .txt file
added the error message hope this helps


| downloading a text file from a website | CC BY-SA 2.5 | null | 2011-03-01T09:13:21.707 | 2011-03-01T13:15:00.583 | 2011-03-01T12:50:57.137 | 578,198 | 578,198 | [
"java",
"android"
]
|
5,152,558 | 1 | null | null | 2 | 3,737 | Is anyone aware of a way to create graphs like Task Manager's in C#, that represent
real-time performance data?

Thanks!
| Creating Task Manager's like Graphs | CC BY-SA 3.0 | null | 2011-03-01T09:23:42.093 | 2013-10-13T03:02:30.730 | 2013-10-13T03:02:30.730 | 2,708,152 | 639,066 | [
"c#",
".net",
"graph",
"diagram"
]
|
5,153,302 | 1 | null | null | 11 | 24,507 | How should I make this with CSS:
I would like to have 2 `divs` or more and their `width` should be in `percent`, but the margin between the divs should be fixed, in this example `30px`

The problem for me is the margin between the two divs because I can put the divs into a bigger div and set left and right padding to 30px and thats ok, but what should I do with the margin between the two divs?
If I try to add for example to the first div `margin-right:30px;` then the width of the div will be `70% + 30px` what will be overall greater than 100% and the second div will fall down.
So what is the solution for this?
| HTML / CSS : Fixed Margin & Fluid Width | CC BY-SA 2.5 | 0 | 2011-03-01T10:34:00.927 | 2013-03-25T20:27:05.013 | 2011-03-01T10:45:38.580 | 380,562 | 380,562 | [
"css",
"html",
"fixed",
"fluid"
]
|
5,153,414 | 1 | 24,949,694 | null | 5 | 3,057 | I recently switched to Visual Studio 2010.
I have always used good old pixelized fonts as I find it easier to read (One pixel is Black, the other is white... Perfect).
In Visual Studio 2005 I was using bitmap fonts. In VS 2010 It seems that you must use TTF Fonts, so I switched to [proggy fonts TTF format](http://www.proggyfonts.com/index.php?menu=download).
But now my text is blurry. Here is a screenshot:

How can I disable this useless feature?
I don't want my code to look "pretty" i just want to work with it :)
| Why are my fonts blurry in Visual Studio 2010? | CC BY-SA 3.0 | 0 | 2011-03-01T10:45:43.473 | 2014-07-25T06:50:50.053 | 2011-12-26T23:02:40.033 | 116,923 | 621,242 | [
"visual-studio-2010",
"fonts"
]
|
5,153,446 | 1 | 5,155,189 | null | 2 | 1,681 | I want to create a custom picker view controller. When user selects the particular data in the picker list, then will displayed the check mark image for selected category. How do i set the custom image as selected the category. I have created a label and displayed the contents are in the custom label. But i want to displayed the images only, when selects the category.
I have searched for many docs and sample programs in the google. But i didn't get any clear idea. So please help me out.
see my screen shot

Thanks.
| How to create a custom Picker view controller in iPhone? | CC BY-SA 2.5 | null | 2011-03-01T10:49:23.227 | 2011-03-01T13:35:31.100 | 2011-03-01T11:25:47.283 | 249,916 | 249,916 | [
"iphone",
"uipickerviewcontroller"
]
|
5,153,566 | 1 | 5,158,390 | null | 1 | 1,412 | I have two problems I would greatly appreciate if someone could help me with.
I'm developing a mobile website with a column of image link elements on the page. I have some problem though, as the picture below describes in blue, the link elements surrounding the image elements bleeds outside and fills the entire div in width.

Markup:
```
<body>
<div id="vinranka">
<img id="vinrankaIMG" src="img/vinrankaCrop.png">
<img id="vinkattenText" src="img/vinkattenText.png">
</div>
<div id="pageFull">
<div id="searchBox">
<form id="searchForm" method="post" action="">
<div id="searchFieldBg">
<input id="searchField" type="text" value="Sök dryck.." name="query">
<input id="searchButton" type="submit" value="Sök" />
</div>
</form>
</div>
<div id="btContainer">
<a class="imgLink" href="redWhine.html"> <img class="buttons" src="img/redWhineBt.png"></a>
<a class="imgLink" href="whiteWhine.html"> <img class="buttons" src="img/whiteWhineBt.png"></a>
<a class="imgLink" href="sparkelingWhine.html"> <img class="buttons" src="img/sparkelingWhineBt.png"></a>
<a class="imgLink" href="champagne.html"> <img class="buttons" src="img/champagneBt.png"></a>
<a class="imgLink" href="roseWhine.html"> <img class="buttons" src="img/rosevinBt.png"></a>
<a class="imgLink" href="glogg.html"> <img class="buttons" src="img/gloggBt.png"></a>
</div>
</div>
</body>
```
Edit:
Here's the CSS:
```
html, body {
margin: 0px;
padding: 0px;
background-color: #aed604;
}
#vinrankaIMG {
position: absolute;
z-index: 2;
}
#vinkattenText {
margin-left: 220px;
margin-top: 10px;
}
#pageFull {
position: absolute;
margin-left: 20px;
width: 454px;
height: 889px;
background-image: url('../img/pageFull.png');
z-index: 1;
}
#btContainer {
display: block;
z-index: 10;
}
img.buttons {
display: block;
vertical-align: top;
border: 0px;
margin-left: auto;
margin-right: auto;
margin-top: 40px;
}
a.imgLink {
margin: 0px;
padding: 0px;
}
```
I found a topic with a similar problem where the solution was to add 'vertical-align: top' to the image CSS. This however did not work for me, and I'm not sure we even had the same problem.
Another problem is the area described in red. I have an image that overlaps the white background div with z-index. Problem is it overlaps the top image link as well, even when the image link has a higher z-index, meaning it becomes unclickable in the area marked with red. Is the image link locked to be under every element that is above the white background which it is inside of..?
I really hope I have described my problems well enough... =)
If anyone could help me it would be greatly appreciated! I will answer any questions you ask!
Thank you!
/Max
| Link bleeding outside image? | CC BY-SA 3.0 | null | 2011-03-01T11:01:40.110 | 2016-09-21T16:59:46.953 | 2020-06-20T09:12:55.060 | -1 | 603,151 | [
"html",
"css",
"image",
"z-index",
"hyperlink"
]
|
5,153,610 | 1 | null | null | 0 | 264 | 
In the following image, there is a transparent image, but the thing is that I have to remove the black screen, but not I remove this black screen , I set the layer opacity to zero, but not get the output.???
HOw Can I remove that black image;
| how can I remove the black screen comes in my game | CC BY-SA 2.5 | null | 2011-03-01T11:04:54.970 | 2011-03-02T10:11:10.987 | null | null | 2,075,384 | [
"iphone",
"cocos2d-iphone"
]
|
5,153,637 | 1 | 5,153,944 | null | 0 | 3,409 | i am trying to generate a pdf file using itextsharp in asp.net c#.
I came across table concept in itextsharp n i am trying to use it ie my application. I am having the following problem while using tables.

The pdf cell which contains `Name of treasery` the word treasery comes on next line. I am setting width for each cell. if i increase the width than also no changes come. The gap which is shown using arrow in below image remain as it is al the time. Why is that gap?How to remove that gap?
I want a dotted line as a border to only one cell. how to do that?here is my code
```
PdfPTable line6table = new PdfPTable (3);
float[] width = new float[] { 2.5F, 1.5F, 3.0F };
line6table.SetWidths(width);
line6table.HorizontalAlignment = 0;
line6table.WidthPercentage = 100.0f;
line6table.SpacingBefore = 6.0f;
PdfPCell a1 = new PdfPCell(new Phrase("Head Of Account"));
a1.Border = 1;
a1.Indent = 2.2f;
a1.PaddingTop = 5.0f;
line6table.AddCell(a1);
PdfPCell a2 = new PdfPCell(new Phrase("CHARGED"));
a2.Border = 1;
a2.PaddingTop = 5.0f;
line6table.AddCell(a2);
PdfPCell a3 = new PdfPCell(new Phrase("Name of the treasry"));
a3.Border = 0;
a3.Indent = 15.0f;
a3.RightIndent = 0.0f;
a3.HorizontalAlignment = 1;
line6table.AddCell(a3);
pdfDocument.Add(line6table);
```
Please help me to resolve my problem.
| Problem using tables in itextsharp | CC BY-SA 2.5 | null | 2011-03-01T11:06:58.737 | 2020-03-12T22:18:20.857 | 2011-03-01T11:35:57.247 | 243,680 | 243,680 | [
"c#",
"asp.net",
"pdf-generation",
"itext"
]
|
5,154,168 | 1 | 5,154,440 | null | 3 | 751 | I am developing for an existing web application on an internal server, I can't really post all the code here as it's very very messy but I can show you guys a screenshot of the problem and the relevant css code:

The languages menu should be on top of the blue bordered box, but instead it's beneath.
blue bordered box css:
```
.categoryBox {
width:100px;
background-color:#000;
border-style:solid;
border-width:1px;
border-color:#007CF7;
padding:5px;
float:left;
height:260px;
margin-right:25px;
margin-bottom:20px;
text-align:center;
width:200px;
position:relative;
}
```
language menu css:
```
#ChooseLanguageDlg
{
display: none;
position: absolute;
width: 87px;
height: 180px;
padding-left: 10px;
padding-right: 10px;
padding-top:0;
margin-top: -9px;
border: none 1px White;
left: 751px;
top: 10px;
font-size:11px;
overflow:hidden;
text-align:center;
}
```
Note: the languages menu is using a javascript toggle to show/hide.
Adding z-index to the language box does not change the visibility in IE
| div layering problems | CC BY-SA 2.5 | null | 2011-03-01T11:54:34.413 | 2011-03-02T00:39:25.063 | 2011-03-01T11:58:51.993 | 407,943 | 407,943 | [
"html",
"css"
]
|
5,154,498 | 1 | 5,160,854 | null | 0 | 541 | I have ran into quite an interesting mapping scenario. I have two entities (`Task` and `ProjectEmployeeFile`) that has two identical foreign keys (`ProjectId` and `EmployeeId`).
I am trying to find an elegant way to map a `Tasks` property to the `ProjectEmployeeFile` entity.
I think that the solution for one foreign key relationship would be by using a ternary association but I have no idea how to project this into multiple foreign keys.
I am using fluent nhibernate but if solving this issue with classic hbm files is the way to go I have no problem with mapping those classes manually.
Any help would be greatly appreciated.
I have drawn a basic diagram to try to illustrate the scenario:

I have mixed property names with database column names freely here but I think the general idea is clear.
In order to clarify the domain model, here is the current entities and mappings, stripped to the minimum:
```
public class Task
{
public virtual int Id { get; private set; }
public virtual Project Project { get; set; }
public virtual Employee Employee { get; set; }
}
public class ProjectEmployeeFile
{
public virtual int Id { get; private set; }
public virtual Project Project { get; set; }
public virtual Employee Employee { get; set; }
}
public class Project
{
public virtual int Id { get; private set; }
public virtual IList<Task> Tasks { get; set; }
}
public class Employee
{
public virtual int Id { get; private set; }
public virtual IList<Task> Tasks { get; set; }
}
public class TaskMap : ClassMap<Task>
{
public TaskMap()
{
Table("Tasks");
Id(x => x.Id);
References(x => x.Project).Column("ProjectId");
References(x => x.Employee).Column("EmployeeId");
}
}
public class ProjectEmployeeFileMap : ClassMap<ProjectEmployeeFile>
{
public ProjectEmployeeFileMap()
{
Table("ProjectEmployeeFiles");
Id(x => x.Id);
References(x => x.Project).Column("ProjectId");
References(x => x.Employee).Column("EmployeeId");
}
}
```
| Nhibernate mapping two ternary associations (I think) | CC BY-SA 2.5 | null | 2011-03-01T12:26:37.923 | 2011-03-01T21:54:44.260 | 2011-03-01T20:02:30.060 | 340,128 | 340,128 | [
"nhibernate",
"fluent-nhibernate",
"nhibernate-mapping"
]
|
5,154,537 | 1 | 5,155,571 | null | 2 | 1,718 | I want to show box that contains information when user hovers on an item in list. Something like follows:

How can I do this? This can be seen in chat app like pidgin or spark.
| Show box on hover of item in jlist | CC BY-SA 2.5 | null | 2011-03-01T12:30:27.857 | 2011-03-02T13:27:44.003 | 2011-03-01T12:36:20.353 | 559,070 | 559,070 | [
"swing",
"jlist",
"onhover"
]
|
5,154,530 | 1 | 5,154,685 | null | 2 | 1,367 | I'm trying to look into wxPython and sizers, and I put together the following example:
```
import wx
class MyTestFrame(wx.Frame):
def __init__(self, parent, title):
super(MyTestFrame, self).__init__(parent, title=title,
size=(250, 150))
# the master panel of the frame - "Add a panel so it looks correct on all platforms"
self.panel = wx.Panel(self, wx.ID_ANY)
# self.panel.SetBackgroundColour(wx.Colour(124, 224, 124)) # to confirm the square is the panel
# want these buttons absolutely positioned
btn_A = wx.Button(self, id=1, label='A', pos=(10, 10), size=(30, 30))
btn_A.SetBackgroundColour(wx.Colour(224, 124, 124))
btn_B = wx.Button(self, id=2, label='B', pos=(45, 10), size=(30, 30))
btn_C = wx.Button(self, id=3, label='C', pos=(80, 10), size=(30, 30))
# additional object
mastersizer = wx.BoxSizer(wx.VERTICAL)
btnsizer = wx.BoxSizer(wx.HORIZONTAL)
btnsizer.Add(btn_A, 0)
btnsizer.Add(btn_B, 0)
btnsizer.Add(btn_C, 0)
mastersizer.Add(btnsizer, 1, wx.EXPAND)
self.panel.SetSizer(mastersizer)
#~ mastersizer.Fit(self) # makes the window as large as the buttons
self.Centre()
self.Show()
if __name__ == '__main__':
app = wx.App()
MyTestFrame(None, 'Test')
app.MainLoop()
```
When I run this, I get a window like on the image:

Can someone explain, why do I get that gray little square in the upper left corner - and what would be the correct way to implement the code? (The button is deliberately colored, so it can be obvious.. ) I'm on Ubuntu Lucid, in case this is platform specific.
EDIT: That square is apparently the panel itself, but then I cannot tell why doesn't it resize and become the 'parent' for the buttons, as intended?
| wxpython: nested sizers, and little square in top left corner? | CC BY-SA 3.0 | null | 2011-03-01T12:29:53.940 | 2015-01-09T18:59:14.017 | 2015-01-09T18:59:14.017 | 1,015,495 | 277,826 | [
"wxpython",
"sizer"
]
|
5,154,739 | 1 | null | null | 4 | 3,528 | When I generate telerik Pie chart. I want to concatenate lable value with %data value but I am not getting both values.my code-
```
ChartSeries objChartSeries = new ChartSeries("Pie");
objChartSeries.Type = ChartSeriesType.Pie;
objChartSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;
objChartSeries.Appearance.LabelAppearance.Visible = true;
objChartSeries.Appearance.ShowLabelConnectors = true;
objChartSeries.Appearance.ShowLabels = true;
objChartSeries.Appearance.DiameterScale = 0.6;
objChartSeries.DataLabelsColumn = Xtext + "#Y";
//objChartSeries.DefaultLabelValue = "#Y";
//RadChart1.Legend.TextBlock.Text = ddlX.SelectedItem.Text.Trim();
//RadChart1.Legend.Visible = true;
RadChart1.Series.RemoveSeries();
RadChart1.Series.Add(objChartSeriesBlank);
RadChart1.Series.Add(objChartSeries);
RadChart1.Series[1].DataYColumn = Yval;
RadChart1.DataSource = dsResult;
RadChart1.DataBind();
```

| how to set lable value with their % value in telerik Pie chart | CC BY-SA 2.5 | 0 | 2011-03-01T12:50:34.937 | 2012-03-22T04:34:27.887 | null | null | 473,028 | [
"asp.net",
"pie-chart",
"telerik-reporting"
]
|
5,154,847 | 1 | null | null | 46 | 33,155 | This problem has been bugging me for ages and I can't seem to fix it or fully localize the source of the problem (although at times I can force it by allowing the phone to Standby while connected to Eclipse, but sometimes that doesn't even cause a problem).
Let's go through the steps.
I connect my device, it pops up and seems to be working fine:

I double-click it to ensure LogCat is logging it at which point 1 of 2 things happen:
1. It seems to work, I swap to LogCat window which sliiides through a bunch of text and then goes white, I swap back to Devices and see
2. Device goes offline immediately

Now if I leave it for a while and do random things around Eclipse, the number of offline devices slowly increase (they all have the same ID, mine):

:
I have Googled and looked at other questions regarding this and only managed to find a few "guides" that tell me to restart the adb server.
I've done that through the use of the commands:
```
adb kill-server
adb start-server
```
The problem is, that only fixes it very rarely. At times a complete PC reboot will fix it, but not always...
Also, turn off Standby mode on your phone when it's plugged in. For me, this is achieved by going
-
Does anyone have a true solution for this? I've tried most of what I could find on Google and had zero luck yet and it's really starting to annoy me.
EDIT: Holy crap, this is !
EDIT 2: Adding a bounty to this as soon as I can.
: Probably related to the fact that it's connected through a USB hub as our machines are located in another room to keep noise & heat levels down in our offices. I have gotten it stable enough to deploy applications and test very quickly, but it still goes Offline at times. Oh well, done with my project for now.
| Device going offline randomly (and appearing multiple times as offline) in Eclipse - fixes? | CC BY-SA 3.0 | 0 | 2011-03-01T13:03:05.563 | 2021-02-22T09:01:39.790 | 2011-05-19T07:16:55.397 | 608,242 | 608,242 | [
"android",
"eclipse",
"device"
]
|
5,154,959 | 1 | 5,165,681 | null | 1 | 3,292 | I have searched on Google (may be with wrong keyword) and visited the tutorials of ASP.NET/MVC website. But didn't understand the routing of MVC properly.
I have a scenario of the following figure. I want to display the Index.cshtml when the website lunched. 
I have changed the RegisterRoutes method of Global.asax.cs file in various ways. The latest code (not working) is below
```
routes.MapRoute(
"App", // Route name
"App/{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
```
I will be very happy if someone explains the MapRoute method with different example along with answering my problem.
| ASP.NET MVC Custom Routing in Sub Folder | CC BY-SA 2.5 | null | 2011-03-01T13:14:11.120 | 2013-03-24T20:19:43.710 | 2013-03-24T20:19:43.710 | 727,208 | 326,597 | [
"c#",
"asp.net-mvc",
"asp.net-mvc-routing"
]
|
5,155,069 | 1 | 5,155,265 | null | 1 | 2,401 | I have a listview where I add several columns:
```
LVCOLUMN column;
column.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM | LVCF_IDEALWIDTH;
column.fmt = LVCFMT_LEFT;
for(size_t i = 0; i < columns.size(); ++i)
{
const string columnName = Format("{0}. {1} ({2})", i + 1, columns[i].Name.empty() ? "?" : columns[i].Name, boost::to_lower_copy(columns[i].GetTypeName()));
column.iSubItem = i;
column.pszText = (char *)columnName.c_str();
column.cchTextMax = columnName.length();
column.cx = column.cxIdeal = (columns[i].Type == COLUMN_TYPE_STRING) ? 130 : 100;
ListView_InsertColumn(mListView, i, &column);
++mColumnCount;
}
```
Notice in particular `column.cx = column.cxIdeal = (columns[i].Type == COLUMN_TYPE_STRING) ? 130 : 100;`.
This is not respected; this is how the listview looks like:

It's also worth mentioning that without targeting Windows Common Controls 6.0 in the manifest file the code works perfectly and the columns have the correct width.
: Setting cxMin to the width works, but then I can't manually resize the columns so that they have less width (at runtime).
| Width of listview columns not respected | CC BY-SA 2.5 | null | 2011-03-01T13:22:57.077 | 2011-03-01T13:41:42.467 | 2011-03-01T13:40:49.393 | 95,135 | 95,135 | [
"c++",
"windows",
"winapi",
"listview"
]
|
5,155,143 | 1 | null | null | 7 | 7,227 | I want to change the color of the entire line, regardless of whether the text is there is or no. Here is some explaining image:
.
I found some solution [here](http://social.msdn.microsoft.com/forums/en-US/vblanguage/thread/06a5ef18-ca15-4be5-8bb0-b081927cc984/), but I hope that there is a simpler solution.
| How to change background color of the certain line in the RichTextBox? | CC BY-SA 2.5 | null | 2011-03-01T13:29:36.100 | 2018-04-27T14:11:24.393 | 2011-03-01T13:38:12.713 | 27,615 | 639,409 | [
".net",
"winforms",
"c#-4.0"
]
|
5,155,379 | 1 | 5,158,753 | null | 6 | 9,738 | I have a html snippet below which renders perfectly in all browsers. However in webkit on an iphone and ipad, when I pinch the page (so that its smaller), I see a black border which is the background color of the body shining through only on the right edge. This only happens when I specifiy the width of the .headerpic div. Since this is the only place in the document I specify the width, I was wondering why it stops short of rendering all the way to the right edge (since this is theoretically the widest part of the document?).
I've attached a photo of what it looks like from my ipad.
```
<!doctype html>
<html>
<head>
<style>
body {background-color:#000;color:#231f20;margin:0;}
#wrapper {background-color:#fff;min-height:1000px;}
#header .headerpic {height:102px;padding-top:80px;margin:0 auto;width:986px;}
#footer {color:#fff;}
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<div class="headerpic">
</div>
</div>
</div>
<div id="footer">
</div>
</body>
</html>
```

| Browser rendering right margin iPhone/iPad/webkit | CC BY-SA 2.5 | 0 | 2011-03-01T13:50:16.040 | 2016-03-12T18:00:32.167 | null | null | 541,744 | [
"iphone",
"html",
"css",
"ipad",
"webkit"
]
|
5,155,386 | 1 | null | null | 1 | 1,182 | I want to store the following code into the database:
```
fun(...);
int main()
{
fun(3, 7, -11.2, 0.66);
return 0;
}
fun(...)
{
va_list ptr;
int num;
va_start(ptr, n);
num = va_arg(ptr, int);
printf("%d", num);
}
```
and then get it back in the dataset and display on a page.
As of now I have successfully stored the questions with `varchar(MAX)` datatype but when I try to get it in the dataset i get the following error:
`Failed To Enable Constraints. One Or More Rows Contain Values Violating Non-null, Unique, Or Foreign-key Constraints.`
I am doing this in a ASP.NET web application.
Here is the Table definition of the table I am inserting the data into

The query I am using to insert the data into the table:
```
con.ConnectionString = constr;
cmd.Connection = con;
cmd.CommandText = "insert into QuesTable values(@D1,@D2,@D3,@D4,@D5,@D6,@D7, NULL)";
cmd.Parameters.Add("@D1", SqlDbType.Int).Value = txtQID.Text;
cmd.Parameters.Add("@D2", SqlDbType.VarChar).Value = txtques.Text;
cmd.Parameters.Add("@D3", SqlDbType.VarChar).Value = txtansa.Text;
cmd.Parameters.Add("@D4", SqlDbType.VarChar).Value = txtansb.Text;
cmd.Parameters.Add("@D5", SqlDbType.VarChar).Value = txtansc.Text;
cmd.Parameters.Add("@D6", SqlDbType.VarChar).Value = txtansd.Text;
cmd.Parameters.Add("@D7", SqlDbType.VarChar).Value = txtcorr.Text;
con.Open();
int i = cmd.ExecuteNonQuery();
con.Close();
```
And finally the code by which I am extracting the data from the dataset
```
DataSet1.QuesTableDataTable dt = new DataSet1.QuesTableDataTable();
DataSet1TableAdapters.QuesTableTableAdapter adp = new DataSet1TableAdapters.QuesTableTableAdapter();
dt = adp.GetData();
DataTable dtUser = dt.Clone();
```
Hope the information is helpful.
| How do I store source code lines in SQL Server Database and access it via DataSet | CC BY-SA 2.5 | null | 2011-03-01T13:51:20.347 | 2011-03-02T08:10:59.683 | 2011-03-01T16:59:04.923 | 502,926 | 502,926 | [
"c#",
"asp.net",
"dataset"
]
|
5,155,673 | 1 | 5,155,738 | null | 0 | 157 | I am sure many of you would have seen Jamie's Receipe app.
In that, they have a shopping list. If you click on an item in the shopping it, it animates and strikes off that item from the list.
I would like to know how do they do that? How can we have such a strike off?
Thanks!

| iPhone App: How do they do that? | CC BY-SA 2.5 | null | 2011-03-01T14:15:23.127 | 2011-03-01T20:42:01.320 | null | null | 480,346 | [
"iphone",
"objective-c",
"cocoa",
"ios4",
"iphone-sdk-3.0"
]
|
5,155,869 | 1 | 5,155,892 | null | 1 | 145 | I have a collection of objects that I group with a L2O linq query.
The results of that query are as follows:

Now, I want to transform this query into a query that returns
The only thing I got until now is the following:
```
var orderStuff = from i in collection
group i by i.Letter;
```
But I am having a real hard time to expand on this.
| Selecting objects from a grouped linq query | CC BY-SA 2.5 | null | 2011-03-01T14:31:12.453 | 2011-03-01T14:33:55.210 | null | null | 543,269 | [
"c#-4.0",
"linq-to-objects"
]
|
5,155,940 | 1 | 5,157,456 | null | 1 | 3,270 | 
Hi experts, can you please suggest me how can i start the work to get only that image+text swipping effect. Actually, we have an RSS link, from that link we need to fetch and display the images and description as shown above. I have completed RSS data fetching and image displaying with respect to left/right arrows but i could not able to add swiping effect on images. In many examples, onTouchEvent() method is used but it applies to entire layout swipping, i dont want that effect.
Thanks
venu
| How to swipe image + text in android | CC BY-SA 2.5 | null | 2011-03-01T14:37:51.090 | 2013-11-25T10:51:58.023 | null | null | 461,975 | [
"android",
"android-layout"
]
|
5,156,446 | 1 | 5,248,635 | null | 2 | 715 | I am managing to construct a form (with FuelCMS) that has a look-up table, and the look-up table has a field that must be inserted at the same time as the relation (Figure 1).
Using a model inside my module I have finished the form to insert the data, I have a control (Figure 2) to select the relation between the two tables, and here is where my question comes. I need to show a pop-up (like the one when you press the "ADD" or "EDIT" button that allow the user to insert the value of the "objetivo" field (Figure 1) at the time you assign "Hitos" to the "indicadores".
What is the best way to do this? Can I attach a JS file to the form from the module to be able to capture the button click and show the pop-up? There are another better way already to achieve that task?
I hope I made my point clear, if not, please tell me and I will try to explain myself better.
Thanks :)


| Insert relational data in lookup table | CC BY-SA 2.5 | null | 2011-03-01T15:19:58.980 | 2011-03-12T15:09:56.287 | 2011-03-12T15:09:56.287 | 124,378 | 489,806 | [
"codeigniter",
"fuelcms"
]
|
5,156,468 | 1 | 5,156,902 | null | 0 | 225 | I am trying to learn ruby, and i am trying to do the exercise on this site and need help
[learn ruby](http://ruby.activeventure.com/tutorial/part_02/user_input.html)
Write a program that asks for a number and a sentence and prints the sentence backwards that many times. It should:

```
puts "Enter A Number?"
repeatHello = gets
i = 0
begin
puts "hello world!" + i
end while i > repeatHello
```
| new to ruby, help with simple output | CC BY-SA 2.5 | null | 2011-03-01T15:21:26.213 | 2011-03-01T18:27:04.603 | 2011-03-01T15:36:06.207 | 497,470 | 497,470 | [
"ruby"
]
|
5,156,484 | 1 | 5,157,859 | null | 3 | 699 | There are errors hanging around, but at runtime everything works.
Right now, I'm getting `Cannot locate resource 'img/icons/silk/arrow_refresh.png'.`

I've got a simple UserControl called ImageButton (doesn't everyone?):
```
<UserControl x:Class="MyProj.src.controls.ImageButton"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d">
<Button Name="btnButton" Click="btnButton_Click">
<StackPanel Orientation="Horizontal">
<Image Name="btnImage" Stretch="None" />
<TextBlock Name="btnText" />
</StackPanel>
</Button>
</UserControl>
```
Which does what you'd expect:
```
[ContentProperty("Text")]
public partial class ImageButton : UserControl
{
public String Image { set { btnImage.Source = GuiUtil.CreateBitmapImage(value); } }
public String Text { set { btnText.Text = value; } }
public double Gap { set { btnImage.Margin = new Thickness(0, 0, value, 0); } }
public bool ToolBarStyle { set { if (value) {
btnButton.Style = (Style)FindResource(ToolBar.ButtonStyleKey); } }
}
public bool IsCancel { set { btnButton.IsCancel = value; } }
public bool IsDefault { set { btnButton.IsDefault = value; } }
public event RoutedEventHandler Click;
public ImageButton()
{
InitializeComponent();
}
private void btnButton_Click(object sender, RoutedEventArgs e)
{
if (Click != null)
{
Click(sender, e);
}
}
}
```
Where CreateBitmapImage is the following:
```
public static BitmapImage CreateBitmapImage(string imagePath)
{
BitmapImage icon = new BitmapImage();
icon.BeginInit();
icon.UriSource = new Uri(String.Format("pack://application:,,,/{0}", imagePath));
icon.EndInit();
return icon;
}
```
I can't see the design view of any xaml file that uses an ImageButton like such:
```
<Window
foo="bar"
xmlns:wpfControl="clr-namespace:MyProj.src.controls">
<Grid>
<wpfControl:ImageButton ToolBarStyle="True" Gap="3"
Click="btnRefresh_Click" Text="Refresh"
Image="img/icons/silk/arrow_refresh.png" />
</Grid>
</Window>
```
Why is VS complaining?
| Bogus WPF / XAML errors in Visual Studio 2010 | CC BY-SA 2.5 | null | 2011-03-01T15:22:51.440 | 2011-03-01T21:35:19.583 | 2011-03-01T21:35:19.583 | 9,664 | 466,011 | [
"c#",
"wpf",
"visual-studio-2010",
"xaml"
]
|
5,156,724 | 1 | null | null | 2 | 2,425 | I've recently developed an android game using Eclipse. I'm really a newbie at this so forgive me if what I will ask is too simple. >.<
The application runs and looks perfectly in the Android emulator installed in Eclipse. However, when we tried to install it in a Samsung Galaxy tab which obviously has a bigger screen than the emulator, the layout gets messed up. Buttons are not in their right order etc. I do have screens using XML layouts and some are simple canvases with sprites. Any idea how I could retain the original layout in the emulator to the tablet? I've tried using `RelativeLayout` instead of `LinearLayout` but it still doesn't work.
Any help would be appreciated. Thank you!
One XML file code and it's corresponding screen from emulator shown below.
```
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/MenuLayout" >
<Button android:id="@+id/btnNew"
android:layout_width="140px"
android:layout_height="65px"
android:layout_marginTop="160px"
android:background="@drawable/newgame"/>
<Button android:id="@+id/btnInst"
android:layout_width="140px"
android:layout_height="65px"
android:background="@drawable/instructions" />
<Button android:id="@+id/btnCredits"
android:layout_width="140px"
android:layout_height="65px"
android:background="@drawable/credits"/>
<Button android:id="@+id/btnExit"
android:layout_width="140px"
android:layout_height="65px"
android:background="@drawable/exit"/> </LinearLayout>
```

| ANDROID layout gets messed up from emulator to tablet | CC BY-SA 2.5 | null | 2011-03-01T15:43:49.843 | 2015-03-04T10:05:05.170 | 2011-03-01T16:01:43.517 | 534,074 | 534,074 | [
"android",
"eclipse",
"android-layout",
"tablet"
]
|
5,156,878 | 1 | 5,157,469 | null | 0 | 3,429 | I'm working on my first Drupal 7 project. I'm having a problem about vocabulary term listing :/ I hope you can advise...
I created Vocabulary named , and terms are 2 level as below (there will be many more);

and I have a Services page to list all these services as in-2-level look. exactly how it looks above.
I googled and found some PHP codes to display all terms [http://drupal.org/node/623644](http://drupal.org/node/623644)
But I need to make it with , I tired the VIEW below, and it only list the some of level 1 terms.

Any idea how to make this with Views Module?
Appreciate helps!!!
Thanks a lot!
| how to use views to display taxonomy vocabulary list in 2 level on Drupal 7 | CC BY-SA 2.5 | null | 2011-03-01T15:54:43.327 | 2011-06-03T13:37:24.093 | null | null | 150,225 | [
"drupal",
"drupal-modules",
"taxonomy",
"drupal-7",
"vocabulary"
]
|
5,157,133 | 1 | 5,157,186 | null | 2 | 57 | I am having trouble getting the text to center inside of a list item. This seems to only be happening in internet explorer and I just can't figure out why... Any help would be greatly appreciated.

[https://img.skitch.com/20110301-p9hg9ihgimd6srraa9cirnqcdp.jpg](https://img.skitch.com/20110301-p9hg9ihgimd6srraa9cirnqcdp.jpg)
Site (see problem area at bottom): [http://www.levelsetsolutions.com/optimize/swa/](http://www.levelsetsolutions.com/optimize/swa/)
| Text centering in all browsers but Internet Explorer (Link included) | CC BY-SA 3.0 | null | 2011-03-01T16:15:21.730 | 2011-12-01T07:56:14.420 | 2011-12-01T07:56:14.420 | 234,976 | 435,295 | [
"html",
"css",
"internet-explorer"
]
|
5,157,543 | 1 | 5,157,749 | null | 0 | 391 | Referring to this PageControl example could somebody please explain the code flow? Instruments is giving me a leak here so looking for some help.
Re: this tutorial:
[http://www.edumobile.org/iphone/iphone-programming-tutorials/pagecontrol-example-in-iphone/](http://www.edumobile.org/iphone/iphone-programming-tutorials/pagecontrol-example-in-iphone/)
We init an array to Null objects in our AppDidFinishLaunching method...
```
NSMutableArray *controllers = [[NSMutableArray alloc] init];
for (unsigned i = 0; i < kNumberOfPages; i++) {
[controllers addObject:[NSNull null]];
}
self.viewControllers = controllers;
[controllers release];
```
and then call:
```
[self loadScrollViewWithPage:0];
[self loadScrollViewWithPage:1];
```
Here is the implementation for :
```
- (void)loadScrollViewWithPage:(int)page {
if (page < 0) return;
if (page >= kNumberOfPages) return;
PageControlExampleViewControl *controller = [viewControllers objectAtIndex:page];
if ((NSNull *)controller == [NSNull null]) {
controller = [[PageControlExampleViewControl alloc] initWithPageNumber:page];
[viewControllers replaceObjectAtIndex:page withObject:controller];
[controller release];
}
if (nil == controller.view.superview) {
CGRect frame = scrollView.frame;
frame.origin.x = frame.size.width * page;
frame.origin.y = 0;
controller.view.frame = frame;
[scrollView addSubview:controller.view];
}
}
```
Instruments is giving me a leak in this implementation on the following line:
Anyone know why this would be a reported leak in Instruments? My code is identical.
Also after the initial call , on the first pass through and creating the object, are passed and entered.
How is this possible? we enter the first , we alloc and create our controller and end by **releasing* it ().
Shouldn't the next line () produce an EXC_BAD_ACCESS error seeing as we just RELEASED above?
SCREENSHOT FROM INSTRUMENTS:

| Possible to explain code flow in this example ?? Memory leak? Where? | CC BY-SA 2.5 | null | 2011-03-01T16:47:29.300 | 2011-03-01T18:35:51.200 | 2011-03-01T18:35:51.200 | 312,411 | 312,411 | [
"iphone",
"objective-c",
"memory-management",
"ios4"
]
|
5,157,927 | 1 | 5,157,996 | null | 4 | 10,272 | How do I show the title or tooltip when the mouse on the list box value, as in the following picture?
.
| Show the tooltip in the list box selected value using jQuery | CC BY-SA 2.5 | null | 2011-03-01T17:17:39.873 | 2017-01-31T10:38:50.163 | 2011-03-22T12:17:49.600 | 63,550 | 246,963 | [
"jquery"
]
|
5,157,953 | 1 | 5,158,609 | null | 1 | 1,793 | After much problems with using 'group by' in linq2nhibernate, I have tried to switch to HQL, but I am struggeling with a simple example.
I have the following table (ForumThreadRatings):

I would like to retrieve a list of the highest rated forum threads, which means I need to do a sum with the positive column and a group by the forumthread. I have tried for an example just to do a simple group by in HQL with no luck:
```
select ftr.ForumThread from ForumThreadRating ftr group by ftr.ForumThread
```
But I receive the following error:
```
Column 'ForumThreads.Id' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
```
What might I be missing?
| HQL and grouping | CC BY-SA 2.5 | 0 | 2011-03-01T17:19:20.223 | 2011-03-02T23:08:04.740 | null | null | 79,465 | [
"nhibernate",
"hql"
]
|
5,157,958 | 1 | null | null | 0 | 785 | Does anyone know some way to cancel any further broadcasting of a message on the Prism event aggregator?
I'm trying to do some fairly standard command/event messaging - let me explain with a sequence diagram:

Now I want to add in validation. It makes sense that the validation should intercept the command, determine whether it is a valid command to apply, and if not cancel its broadcast. In essence this is what I want:

Does anyone know how to do something along the lines of
```
public class Validator : ISubscribe<ChangePropertyCommand>
public void Handle(ChangePropertyCommand cmd) {
if(IsNotValid(cmd))
_events.Cancel(cmd);
else
...
}
}
```
Or is there another better pattern to use?
| Cancel a message with the Prism Event Aggregator or any other pattern for intercepting commands? | CC BY-SA 2.5 | 0 | 2011-03-01T17:19:40.747 | 2011-03-03T15:41:50.227 | null | null | 5,056 | [
"c#",
"prism",
"messaging",
"cqrs",
"eventaggregator"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.