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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,253,989 | 1 | 4,254,032 | null | 2 | 9,435 | A friend of mine gave me this task so I can learn advance programming a little bit easier. I am currently doing convertion of an html page to pdf using itext sharp and email the pdf as an attachement. My idea is to save the pdf first to the server machine in the folder name ToBeEmailedPDF folder before using it as an email attachment. The thing that bothers me is that this dialog as what you can see in the picture shows up using the code that I have below. 
```
StringBuilder sb = new StringBuilder();
StringWriter tw = new StringWriter(sb);
HtmlTextWriter hw = new HtmlTextWriter(tw);
pnlPDF.RenderControl(hw); // pnlPDF contains the html contents to be converted to pdf
string htmlDisplayText = sb.ToString();
Document document = new Document();
MemoryStream ms = new MemoryStream();
PdfWriter writer = PdfWriter.GetInstance(document, ms);
StringReader se = new StringReader(htmlDisplayText);
HTMLWorker obj = new HTMLWorker(document);
document.Open();
obj.Parse(se);
// step 5: we close the document
document.Close();
Response.Clear();
Response.AddHeader("content-disposition", "attachment; filename=report.pdf");
Response.ContentType = "application/pdf";
Response.Buffer = true;
Response.OutputStream.Write(ms.GetBuffer(), 0, ms.GetBuffer().Length);
Response.OutputStream.Flush();
Response.End();
```
I know many of you out there knows a better way or know how to solve my problem. Please help me. Thank you!
| Save the generated pdf directly to the server directory folder without user prompt | CC BY-SA 2.5 | null | 2010-11-23T08:20:56.830 | 2012-11-12T03:39:06.453 | null | null | 249,580 | [
"c#",
"asp.net",
"sendmail"
] |
4,254,207 | 1 | 4,254,699 | null | 0 | 835 | i have a start point and a end point. I want to work out the angle i have this formula that seems to work
```
double dx = end.X - start.X;
double dy = end.Y - start.Y;
double degrees = Math.Acos((-Math.Pow(dy, 2) + Math.Pow(dx, 2) + Math.Pow(dx, 2)) / (2 * Math.Pow(dx, 2)));
degrees = degrees * 180 / Math.PI;
```
Then i want to take the angle and extend the line's length. i have this so far
```
end.Y = (start.Y + (len * Math.Sin(angle)));
end.X = (start.X + (len * Math.Cos(angle)));
```
now this does not give me the right value.
white is original line and red is the extending

what am i doing wro
| Trig triangles angle | CC BY-SA 2.5 | null | 2010-11-23T08:51:23.317 | 2010-11-23T09:49:01.443 | null | null | 106,955 | [
"c#",
"trigonometry"
] |
4,254,515 | 1 | null | null | 0 | 1,603 | I'm using `cfchart` tag to draw my in ColdFusion.
My x-axis range is from 1 to 24 and it is fix number of labels for all my charts.
But in my chart, I may have values for first 10 (or any fix number from 1 to 24) points. I mean, my query row count will be 10.
So query with 24 points will show full graph ad query with 10 points will show x-axis values from 0 to 10. But I want to scale the chart for 24 points regardless of query count.
`cfchart` has an option called `scaleFrom` and `scaleTo` to fix the y-axis series, Is there any option for x-axis series?
Following is a chart and it should scale it for 24 points on x-axis (lines from the 10th point will not be there).
```
<cfchart format="jpg"
xaxistitle=""
yaxistitle="" chartwidth="600" chartheight="120">
<cfchartseries type="line" paintstyle="shade"
query="qChart1" markerstyle="circle"
itemcolumn="CHARTLABEL"
valuecolumn="INTCHART1" />
</cfchart>
```

| ColdFusion Chart x-axis label limits | CC BY-SA 2.5 | null | 2010-11-23T09:29:11.720 | 2012-10-10T23:07:51.527 | null | null | 415,865 | [
"coldfusion",
"charts"
] |
4,254,853 | 1 | 4,255,032 | null | 1 | 2,690 | I am showing an image of differences in presenting borders for `div` elements between IE and FireFox. IE displays border in a correct way but FireFox not. As you might notice, the black border for `BorderDiv` seams to not respect the fact that its parent `div` has height of 78 pixels. Instead of it respects the height of most outer div. To complicate things, the right side of the border is drawn without respecting the most outer `div` also.

I am lost here. What do I need to do to achieve in FireFox the same result as in IE? Please note, that I want to have width and height for `BorderDiv` equal to 100%, I do not want to set it explicitly.
Here is my code:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
<HEAD>
</HEAD>
<BODY>
<div id = "MasterDiv" style = "float: left; width: 200px; height: 80px; background-color: Red">
<div id = "RightDiv" style = "float: left; width: 100%; height: 78px; background-color: Blue;">
<div id = "ContentColumn" style = "margin-left: 50px; height: 78px;">
<div id = "BorderDiv" style = "border: solid 1px Black; height: 100%; width: 100%">right</div>
</div>
</div>
<div id = "LeftDiv" style = "float: left; margin-left: -100%; width: 50px; height: 78px; background-color: Green;">left</div>
</div>
</BODY>
</HTML>
```
Thanks.
| Help with CSS DIV borders needed, different view between IE and FireFox | CC BY-SA 2.5 | null | 2010-11-23T10:06:40.143 | 2010-11-23T10:33:26.230 | null | null | 110,603 | [
"css",
"internet-explorer",
"firefox",
"html",
"border"
] |
4,255,022 | 1 | 4,256,331 | null | 0 | 5,668 | Hay, I've made a simple application where users upload content to a MySQL database, however some entities are not being encoded. Things like this appear
```
ââ¬Å
```
instead of quotes and what not. I know is should had encoded these values into HTML entities when they were being inserted into the database, however there is now a few thousand rows containing data.
Do we have a PHP function to encode these values when the data is returned back to the browser?
---
update. Since encoding may be an issue here, too, here's what I see:

| MySQL storing ââ¬Å in field | CC BY-SA 2.5 | 0 | 2010-11-23T10:23:09.670 | 2010-11-23T13:12:40.530 | 2010-11-23T10:26:03.693 | 121,332 | 164,230 | [
"php",
"mysql",
"decode",
"encode"
] |
4,255,096 | 1 | 4,255,213 | null | 1 | 312 | We're just starting with SVN (were using CVS before :shame:) and I have a problem with merging my branch back to trunk.
I've created Branch1 from trunk, made some changes and merged it back (without any problem).
Then I decided to make another branch for second feature, and I made it from Branch1 by mistake. (I should've made it from Trunk).

Now I'm at the X point on my picture. Branch2 is finished and I'd like to merge it back.
But if I try merging Branch2 to Trunk I get lots of `tree conflicts`. I easily can merge Branch2 back to Branch1, but then again there are `tree conflicts` when merging Branch1 to Trunk.
No changes were made in Trunk directly, neither on Branch1 after it was merged back.
So, my question: is this situation normal for SVN? Am I doing something wrong (I'm just starting :)).
I use latest TortoiseSVN, and I'm doing merge by choosing Merge - "Reintegrate a branch"
| Problems with merging branch back to trunk in SVN | CC BY-SA 2.5 | 0 | 2010-11-23T10:32:26.550 | 2012-03-08T10:13:23.557 | null | null | 291,695 | [
"svn",
"tortoisesvn"
] |
4,255,120 | 1 | null | null | 11 | 12,053 | Suppose I have the following `<httpErrors>` collection in a `web.config`:
```
<httpErrors>
</httpErrors>
```
Yep, nice 'n empty.
And in IIS 7, my HTTP errors page looks like this:

Beautiful! (I've highlighted 404 simply because that's the example I'll use in a sec).
Now, I run the following code:
```
errorElement["statusCode"] = 404;
errorElement["subStatusCode"] = -1;
errorElement["path"] = "/404.html";
httpErrorsCollection.Add(errorElement);
```
Lovely. I now have, as expected this in my `web.config`:
```
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" subStatusCode="-1" prefixLanguageFilePath="" path="/404.html" />
</httpErrors>
```
Couldn't be happier. Now, in IIS 7 my HTTP errors section looks, as expected, like below:

Life couldn't be sweeter at this point. Now, down the line, I want to programmatically revert my 404 error back to the state shown in the original screenshot. Logic dictates that I should `remove` my new error:
```
httpErrorsCollection.Remove(errorElement);
```
But alas, if I do this, my `web.config` looks a lot like this:
```
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
</httpErrors>
```
And my IIS looks a bit like this:

This is expected because of my `web.config` - but how, using `ServerManager` and all it's useful IIS 7 API, do I remove the `httpError` element entirely and revert my `web.config` back to:
```
<httpErrors>
</httpErrors>
```
Any ideas?
| How to revert an HttpError ConfigurationElement back to "Inherited" using IIS 7 API | CC BY-SA 2.5 | null | 2010-11-23T10:34:17.413 | 2016-06-14T14:48:25.957 | 2016-06-14T00:34:26.423 | 2,498,017 | 64,519 | [
".net",
"iis-7",
"servermanager",
"configurationelement"
] |
4,255,259 | 1 | null | null | 0 | 1,751 | I am rephrasing a question asked few days back .[click this](https://stackoverflow.com/questions/4222421/with-activerecord-how-can-i-select-records-based-on-the-highest-value-of-a-field/4222914#4222914) to see the previous question
I have answered this question.But it is not correct.
Records in the table

```
Revision.find(:all,:select => "id,name,max(revision) as revision", :conditions => ["saved=1"],:group => 'name')
```
which would result

Actually the result should have been id 3,6,8.
what modification in query will lead this result?
| Rails 2.3.8 : how can I select records based on the highest value of a field? | CC BY-SA 2.5 | null | 2010-11-23T10:50:55.167 | 2015-06-02T07:21:46.440 | 2017-05-23T12:13:26.330 | -1 | 352,619 | [
"ruby-on-rails",
"ruby-on-rails-3"
] |
4,255,337 | 1 | 4,255,431 | null | 0 | 306 | I hope this question is not too stupid. I need to make a button like the +/- button on the new print function in iOS4.2.
[http://www.geeky-gadgets.com/wp-content/uploads/2010/09/Airprint.jpg](http://www.geeky-gadgets.com/wp-content/uploads/2010/09/Airprint.jpg)

Would that be a segmented control ?
Thanks
| How to make a +/- button in the iphone sdk? | CC BY-SA 2.5 | null | 2010-11-23T11:03:10.733 | 2011-03-29T09:39:22.443 | 2010-11-23T11:09:02.690 | 121,332 | 158,768 | [
"iphone"
] |
4,255,436 | 1 | 4,255,945 | null | 2 | 2,875 | I developed a for the process of
it is a model profile page. Its has two links in the bottom of the page if I click the
link it will display in English and i have a link which will display in Arabic
I am able to insert the Non-English values in to the and can retrieve it back.
I downloaded and changed the in Firefox and also made changes for my
computer input language. but it is not working in
and . its not even changing to Arabic language when i click the 'Arabic" link in bottom
What is the problem in the other browsers. What should I do to make my Web-App work in
all of the browsers.
: My will Look Like this.

When I click the it will change as 
You can see the changes in label. Now i want two things to understand
1. I want see the same changes happening in all the browsers. what should I do?
2. If i am sending this web app to a person who doesnot have a locale installed in his
system should be able to access both the links.
How should i achieve this? i am clueless.
```
try{
con = LanguageTranslation.getConnection();
System.out.println("Inside try");
PreparedStatement pstmt = con.prepareStatement("INSERT INTO TRANSLATE SET NAME= ?, SEX= ?, CITY= ?, COMMENTS= ?, BMONTH= ?, BDATE= ?, BYEAR= ? ");
pstmt.setString(1, details.getName());
pstmt.setInt(2, details.getSex());
pstmt.setString(3, details.getCity());
pstmt.setString(4, details.getComment());
pstmt.setString(5, details.getMonth());
pstmt.setString(6, details.getDate());
pstmt.setString(7, details.getYear());
i=pstmt.executeUpdate();
}
catch(SQLException e){
e.printStackTrace();
}
return details;
```
My page corresponding to both the links(English and Arabic is)
```
<input type="button" id="clearbutton" value="clear" onclick="clearprofile()">
<input type="button" id="findbutton" value="find" onclick="finddetails()">
</div>
<a id="EnglishLanguageLink" name="en-US" href="#"> English</a>
<a id="ArabicLanguageLink" name="ar-SA" href="#"> Arabic</a>
```
My
function Intialize(){
$('#EnglishLanguageLink').click(this.changelanguage);
$('#ArabicLanguageLink').click(this.changelanguage);
}
```
this.changelanguage=function(){
var name = this.name;
$(this).translate("languages/UserPortal.json", name);
};
```
Inside the name attribute I will pass the languages en-US and ar-SA. which will see the json file and make the corresponding changes for the language.
| My Language translation does not work in Google chrome and IE | CC BY-SA 2.5 | null | 2010-11-23T11:12:44.003 | 2010-11-23T14:35:40.833 | 2010-11-23T14:35:40.833 | 427,376 | 427,376 | [
"java",
"javascript",
"jquery",
"html",
"translation"
] |
4,256,272 | 1 | 4,256,301 | null | 10 | 18,996 | I would like to display a `<div>` element inline so that it is surrounded with text.
My code is:
```
<span>Here is some <div class="a"></div> text</span>
```
Let's say, the class `"a"` is defined as below:
```
.a {
width:20px;
height:20px;
background-color:#f00;
}
```
The result should be like this:

Is it doable? Thank you for any suggestions.
| How to display <div> inline surrounded with text? | CC BY-SA 2.5 | 0 | 2010-11-23T13:05:11.283 | 2010-11-23T13:11:42.813 | null | null | 171,375 | [
"css",
"html",
"inline"
] |
4,256,371 | 1 | 4,257,118 | null | 0 | 1,388 | I am trying to develop a Customize TabControl in which I'll divide the Whole TabControl into three Parts:
1)Tab Header
2)Common Region(for all Tab) and
3)Tab Content region for specific Tab
Update:

Please provide your best answers or samples if you have then, any type of help will be appreciated.
Thanks in Advance
| How can I change the default Control template of a TabControl according to my choice | CC BY-SA 2.5 | null | 2010-11-23T13:15:32.160 | 2010-11-25T06:49:10.580 | 2010-11-25T06:49:10.580 | 384,353 | 384,353 | [
"c#",
"wpf",
"custom-controls",
"controltemplate"
] |
4,256,404 | 1 | 4,256,598 | null | 0 | 175 | I am trying to create a dimension for the organisation (called ), but I am not sure what to use as the key.
Here is a diagram of the organisation tables...

Enterprises is the top parent table. All data relating to Stock is stored by LocationID (this is called the Stock hierarchy) and all data relating to sales is stored by RevenueCentreID (this is called the Revenue Hierarchy). At the moment, the cubes are only required to show data by ProfitCentreID (we would group the dimension by ProfitCentreID in a view before loading the cube).
Here are a few solutions that I have been considering:
1. Create a composite key (RevenueCentreLocationKey). You would never want to see the data like that, but I would link the fact table to the correct key when building the cubes (e.g. ProfitCentreKey)
2. Only go as far a ProfitCentreID, because that is all that we need. The source data is stored in the data warehouse (together with the fact and dimension tables), so we can get to the more granular data later.
3. Create a separate RevenueCentre and Location dimension in the database. However, in the cube, you would only see a dimension going to ProfitCentreKey
I know this is quite subjective, but I would like any advice or ideas that you think might be helpful. Thanks.
I'm using SQL Server 2008 (both for the data warehouse database and the Analysis Services cubes)
| How to build a dimension from two separate hierarchies in the source data | CC BY-SA 2.5 | null | 2010-11-23T13:19:52.697 | 2010-11-23T13:43:14.470 | null | null | 16,279 | [
"database-design",
"business-intelligence"
] |
4,256,441 | 1 | 4,256,495 | null | 1 | 922 | In SQL 2008, I have below table and need to convert into following table creating one record for each
```
Date Name Colors
Nov01 John Red
Nov02 Mike Green
Nov02 Mike Blue
Nov02 Mike Grey
Nov03 Melissa Yellow
Nov03 Melissa Orange
Nov10 Rita Pink
Nov10 Rita Red
```
Converted
```
Date Name Red Green Blue Grey Yellow Orange
Nov01 John Red
Nov02 Mike Green Blue Grey
Nov03 Melissa Yellow Orange
Nov10 Rita Red Pink
```
See below pic, as I do not know how to format table here

Many thanks.
| Convert multiple records into one column | CC BY-SA 2.5 | null | 2010-11-23T13:23:35.707 | 2010-11-23T13:56:36.597 | 2010-11-23T13:56:36.597 | 41,956 | 219,628 | [
"sql-server",
"tsql",
"pivot"
] |
4,256,455 | 1 | 4,259,339 | null | 1 | 1,246 | I have some troubles doing some simple customizations with javascript on the form assistant (MS CRM 4.0).
What I am trying to achieve is when I open the form assistant to have different selected than the current (default) ones in the look ups.
For example as in the picture below, when I select Customer I want my default selection to be "Contact", instead of Account the current and default one.

So far for the main look up (Form assitant) I managed to change the focus like this:
```
crmForm.all.customer.SetFocus();
```
But somehow I can't get to the id of the other look up.
I tried to dig it out of the html, but nothing I tried seemed to work.
I do appreciate any help, articles, documentation.
Thanks!
| CRM 4.0 Customizing form assistant | CC BY-SA 2.5 | 0 | 2010-11-23T13:25:18.887 | 2011-02-25T16:49:48.620 | 2011-02-25T16:49:48.620 | 73,785 | 185,081 | [
"dynamics-crm",
"dynamics-crm-4"
] |
4,256,834 | 1 | null | null | 6 | 14,779 | I'm attempting to use the Excel 2007 XML Developers tools, but I'm not able to export a simple set of simple repeating data.
I have a worksheet with headers, and columns of data.
I have an xsd which describes (I think) a map of the data, with the first element repeating.
```
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://tempuri.org/FeedbackLookup.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/XMLSchema.xsd" xmlns:mstns="http://tempuri.org/XMLSchema.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="FeedbackLookup">
<xs:complexType>
<xs:sequence>
<xs:element name="RevieweeInfo" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="RevieweeName" type="xs:string">
</xs:element>
<xs:element name="RevieweeTitle" type="xs:string">
</xs:element>
<xs:element name="ReviewLevel" type="xs:string">
</xs:element>
<xs:element name="RecipientName" type="xs:string" />
<xs:element name="RecipientEmail" type="xs:string" />
<xs:element name="RecipientTitle" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
```
And mapped that to the headings in my xml file.

But when I click `Verify Map for Export` I get the following error popup:

The elements are all mapped to the same page, and are all regular data columns.

What am I doing wrong? At this point would it be faster to write the naive VBA to create the XML?
| How can I export simple repeating data from excel as xml? | CC BY-SA 2.5 | 0 | 2010-11-23T14:13:09.070 | 2016-06-09T21:17:51.123 | null | null | 16,487 | [
"xml",
"excel",
"xsd",
"excel-2007"
] |
4,257,107 | 1 | 4,260,320 | null | 4 | 1,867 | Some time ago I had a problem with Uploadify plugin for which I did found a solution described in this [answer](https://stackoverflow.com/questions/3791724/getting-uploadify-to-work-with-asp-net-mvc/3816084#3816084).
The problem in that question was substantially due to the fact that Uploadify uses a flash plugin and the flash plugin does not share the authentication cookie with the server-side code.
The solution was to use a custom version of the Authorize attribute (the code was published within that answer).
The attribute [TokenizedAuthorize] was placed on the controller class as follow
```
[TokenizedAuthorize]
[CheckForActiveService]
public partial class DocumentController : BaseController
{
}
```
Some days ago I have added the `<%: Html.AntiForgeryToken() %>` inside the form and the
`[ValidateAntiForgeryToken]` to the action method as in the following sample:
```
[HttpPost]
[ValidateAntiForgeryToken]
public virtual ActionResult Upload( HttpPostedFileBase fileData ) {
}
```
Anyway I am not anymore able to upload files to the server. Using the debugger I have been able to check that after the last line in the `TokenizedAuthorize` code
```
return base.AuthorizeCore( httpContext );
```
I get an exception handled by Elmah that says
```
System.Web.Mvc.HttpAntiForgeryException: invalid or not specified anti forgery token
in System.Web.Mvc.ValidateAntiForgeryTokenAttribute.OnAuthorization(AuthorizationContext filterContext)
in System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor)
in System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
```
This exception seems to confirm that the `[ValidateAntiForgeryToken]` attribute is being called... but I cant understand where is the issue with my code.
Any help?
:
Using the debugger I have checked the value of the `__RequestVerificationToken` form parameter and, as you can see, it is correctly populated with the value from `<%: Html.AntiForgeryToken() %>`

:
I can also confirm that if I comment the `[ValidateAntiForgeryToken]` on the Post Action
everything works as expected
:
As the post function is an ajax call done by the uploadify plugin the AntiForgeryToken is added to the post parameters using a small js function as in the following code
```
$('#fileInput').uploadify({
//other uploadify parameters removed for brevity
scriptData: AddAntiForgeryToken({ AuthenticationToken: auth }),
});
```
where `AddAntiForgeryToken()` is a javascript function defined in my master page to support all the ajax post to the server
```
<%-- used for ajax in AddAntiForgeryToken() --%>
<form id="__AjaxAntiForgeryForm" action="#" method="post">
<%: Html.AntiForgeryToken() %>
</form>
// Encapsulate the Anti Forgery Token fetching
AddAntiForgeryToken = function (data) {
data.__RequestVerificationToken = $('#__AjaxAntiForgeryForm input[name=__RequestVerificationToken]').val();
return data;
};
```
:
[Darin](https://stackoverflow.com/users/29407/darin-dimitrov) intuition is correct. The Uploadify script is not sending any cookie to the server and so the server cannot validate the AntiForgeryToken. How can I add the cookie inside the Uploadify scriptData section?
| Uploadify problem with Authentication Token and Html.AntiforgeryToken (plugin does not send cookies) | CC BY-SA 2.5 | 0 | 2010-11-23T14:40:26.597 | 2010-11-24T21:28:04.610 | 2017-05-23T12:30:36.590 | -1 | 431,537 | [
"asp.net-mvc",
"asp.net-mvc-2",
"uploadify",
"antiforgerytoken"
] |
4,257,513 | 1 | 4,304,831 | null | 5 | 9,478 | I have downloaded Netbeans 7.0 beta as I wanted to give the PhpDoc functionality a bash, but can't get it to work.
I seem to be falling over on the configuration options for PhpDoc in netbeans. It is asking for the script location,

but whatever I enter I get the error;
```
** ERROR *****************************************************************
* Sorry, can't find the php.exe file.
* You must edit this file to point to your php.exe (CLI version!)
* [Currently set to C:\usr\local\php\cli\php.exe]
*
* NOTE: In PHP 4.2.x the PHP-CLI used to be named php-cli.exe.
* PHP 4.3.x renamed it php.exe but stores it in a subdir
* called /cli/php.exe
* E.g. for PHP 4.2 C:\phpdev\php-4.2-Win32\php-cli.exe
* for PHP 4.3 C:\phpdev\php-4.3-Win32\cli\php.exe
**************************************************************************
Press any key to continue . . .
```
The set-up is Netbeans and xampp running on a windows machine.
Any and all help greatly appreciated.
| Netbeans and PhpDocumentor | CC BY-SA 2.5 | 0 | 2010-11-23T15:15:52.893 | 2012-03-29T11:05:49.747 | null | null | 355,375 | [
"windows",
"user-interface",
"netbeans",
"phpdoc"
] |
4,257,700 | 1 | 4,257,746 | null | 0 | 466 | im mapping an xml on a custom nsobject.
when the user hits reload the function is called again.
i get several memory leaks on all strings:

UPDATE this is the current code.
```
- (void)mapDataOnModel
{
if(mixesArr != nil)
{
//[mixesArr release];
[mixesArr removeAllObjects];
[playListArr removeAllObjects];
}
else
{
mixesArr = [[NSMutableArray alloc]init];
playListArr = [[NSMutableArray alloc] init];
}
MixVO *tmpMix;
AudioVO *tmpAudio;
for (DDXMLElement *node in nodes)
{
tmpMix = [[MixVO alloc] init];
tmpMix.uuid = [[node attributeForName:@"uuid"] stringValue];
tmpMix.name = [[[node elementsForName:@"name"] objectAtIndex:0] stringValue];
tmpMix.artist = [[[node elementsForName:@"artist"] objectAtIndex:0] stringValue];
tmpMix.path = [[[node elementsForName:@"file"] objectAtIndex:0] stringValue];
tmpMix.headline = [[[node elementsForName:@"headline"] objectAtIndex:0] stringValue];
tmpMix.teaser = [[[node elementsForName:@"teaser"] objectAtIndex:0] stringValue];
tmpMix.copy = [[[node elementsForName:@"copy"] objectAtIndex:0] stringValue];
tmpMix.isHighlight = NO;
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"HH:mm:ss"];
tmpMix.duration = [dateFormat dateFromString:[[[node elementsForName:@"duration"] objectAtIndex:0] stringValue]] ;
[dateFormat release];
// CHECK IF IT IS A HIGHLIGHT MIX
for (int i = 0; i < [[highlightsNode elementsForName:@"member"] count]; i++)
{
NSString *highlightID;
highlightID = [[[highlightsNode elementsForName:@"member"] objectAtIndex:i] stringValue] ;
if([tmpMix.uuid isEqualToString:highlightID])
{
tmpMix.isHighlight = YES;
}
}
if([[node elementsForName:@"image_standard"] count] > 0)
tmpMix.image_standard = [[[node elementsForName:@"image_standard"] objectAtIndex:0] stringValue] ;
if([[node elementsForName:@"image_artist"] count] > 0)
tmpMix.image_artist = [[[node elementsForName:@"image_artist"] objectAtIndex:0] stringValue] ;
if([[node elementsForName:@"image_teaser"] count] > 0)
tmpMix.image_teaser = [[[node elementsForName:@"image_teaser"] objectAtIndex:0] stringValue] ;
if([[node elementsForName:@"image_player"] count] > 0)
tmpMix.image_player = [[[node elementsForName:@"image_player"] objectAtIndex:0] stringValue] ;
/*
tmpAudio = [[AudioVO alloc] init];
tmpAudio.file = tmpMix.path;
NSString *tmpDuration;
tmpDuration = [[[node elementsForName:@"duration"] objectAtIndex:0] stringValue];
tmpAudio.duration = tmpDuration;
// PARSE TRACKS
NSArray *track = NULL;
track = [node elementsForName:@"tracks"];
DDXMLElement *trackElems = [track objectAtIndex:0];
NSArray *tracks = NULL;
tracks = [trackElems elementsForName:@"track"];
NSMutableArray *tracksArray;
tracksArray = [[NSMutableArray alloc]init];
TrackVO *tmpTrack;
for (DDXMLElement *node2 in tracks)
{
tmpTrack = [[TrackVO alloc] init];
tmpTrack.timecode = [[node2 attributeForName:@"timecode"] stringValue];
tmpTrack.name = [node2 stringValue];
[tracksArray addObject:tmpTrack];
[tmpTrack release];
}
tmpAudio.tracksArr = tracksArray;
[tracksArray release];
tmpMix.audioVO = tmpAudio;
[tmpAudio release];
*/
[mixesArr addObject:tmpMix];
[tmpMix release];
}
// SORT PROGRAMM
/*
NSSortDescriptor *lastDescriptor =
[[[NSSortDescriptor alloc]
initWithKey:@"artist"
ascending:YES
selector:@selector(localizedCaseInsensitiveCompare:)] autorelease];
NSArray * descriptors =
[NSArray arrayWithObjects:lastDescriptor, nil];
NSArray * sortedArray = [mixesArr sortedArrayUsingDescriptors:descriptors];
//[mixesArr release];
mixesArr = [[NSMutableArray alloc]initWithArray:sortedArray];
// PARSE PLAYLIST
for (DDXMLElement *node in nodesPl)
{
SchedVO *tmpSched;
tmpSched = [[SchedVO alloc] init];
NSString *timeStr;
timeStr = [[node attributeForName:@"timestamp"] stringValue];
tmpSched.date = [NSDate dateWithTimeIntervalSince1970:timeStr.intValue];
tmpSched.uid = [node stringValue];
[playListArr addObject:tmpSched];
//[tmpSched release];
}
*/
[self updateDone];
}
```
MixVO:
```
@interface MixVO : NSObject
{
NSString *uuid;
NSString *name;
NSString *artist;
NSString *path;
NSString *headline;
NSString *teaser;
NSString *copy;
NSString *image_standard;
NSString *image_artist;
NSString *image_teaser;
NSString *image_player;
NSDate *duration;
AudioVO *audioVO;
BOOL isHighlight;
}
@property (nonatomic,retain) NSString *uuid;
@property (nonatomic,retain) NSString *name;
@property (nonatomic,retain) NSString *artist;
@property (nonatomic,retain) NSString *path;
@property (nonatomic,retain) NSString *headline;
@property (nonatomic,retain) NSString *teaser;
@property (nonatomic,retain) NSString *copy;
@property (nonatomic,retain) NSString *image_standard;
@property (nonatomic,retain) NSString *image_artist;
@property (nonatomic,retain) NSString *image_teaser;
@property (nonatomic,retain) NSString *image_player;
@property (nonatomic,retain) NSDate *duration;
@property (nonatomic,retain) AudioVO *audioVO;
@property BOOL isHighlight;
@end
```
maybe someone can help me with this.
thanks in advance
alex
| objective-c cant find memory leak | CC BY-SA 2.5 | null | 2010-11-23T15:30:32.637 | 2010-11-23T16:24:02.440 | 2010-11-23T16:21:35.907 | 333,373 | 333,373 | [
"objective-c",
"memory-leaks",
"nsmutablearray"
] |
4,257,865 | 1 | null | null | 4 | 8,781 | I am trying to run a HOST script which I have build in KSH shell using an Oracle Concurrent Program.
My Test script is as follows:
```
echo "System Parameters passed by Concurrent Manager"
echo "+--------------------------------------------+"
XXWIN_PROGRAM=$0
XXWIN_LOGIN=$1
XXWIN_USERID=$2
XXWIN_USERNAME=$3
XXWIN_REQUEST_ID=$4
echo "XXWIN_PROGRAM :"$XXWIN_PROGRAM
echo "XXWIN_LOGIN :"$XXWIN_LOGIN
echo "XXWIN_USERID :"$XXWIN_USERID
echo "XXWIN_USERNAME :"$XXWIN_USERNAME
echo "XXWIN_REQUEST_ID :"$XXWIN_REQUEST_ID
shift 4
echo ""
echo "User Parameters passed by Concurrent Manager"
echo "+------------------------------------------+"
echo "1 :"$1
echo "2 :"$2
echo "3 :"$3
echo "4 :"$4
echo "5 :"$5
echo "6 :"$6
echo "7 :"$7
echo "8 :"$8
echo "9 :"$9
echo ""
# Generic Script Begins
# Declaring Constants, Data File Path, Control File Path etc
CTL_FILE_NAME=$1 # Control File Name(s)
CTL_FILE_PATH=$2 # Control File Path
DATA_FILE_NAME=$3 # Data File Name(s)
DATA_FILE_PATH=$4 # Data File Path
COMPONENT_NAME=$5 # Interface Component Name
SEQ_VALIDATION=$6 # Sequence Name
SUPPORT_EMAIL= $7 # Support e-mail(s) List
# Printing the User Parameters
echo "1 :"$CTL_FILE_NAME
echo "2 :"$CTL_FILE_PATH
echo "3 :"$DATA_FILE_NAME
echo "4 :"$DATA_FILE_PATH
echo "5 :"$COMPONENT_NAME
echo "6 :"$SEQ_VALIDATION
echo "7 :"$SUPPORT_EMAIL
# Assigning the Archive, IN and Prog Dir Paths
ARCHIVE_DIR="$XXWIN_TOP/bin/TEMP/archive"
XXWIN_IN_DIR="$XXWIN_TOP/bin/TEMP/in"
XXWIN_PROG_DIR="$XXWIN_TOP"
# Printing the directories
echo "Archive Directory :" $ARCHIVE_DIR
echo "IN Directory :" $XXWIN_IN_DIR
echo "Program Directory :" $XXWIN_PROG_DIR
i=10
k=5
j=`expr $i + $k`
echo $j
echo $i
echo "Out of Concurrent Program"
```
Shell Script program name ends with ".prog"
I am running the concurrent request with the following parameters:

The program completes normal but I am getting the following log messages.


If I am using `#!/usr/bin/ksh` the program completes in error so I am running the host file with out that. From the log its clear that when ever a space is encountered in the script, its throwing an error saying "Command not found". Also as you can see that I am doing a simple addition, even that is also not recognized.
Any help in this regards is much appreciated.
Thanks :)
| Issue while running UNIX shell script from Oracle concurrent Program | CC BY-SA 2.5 | null | 2010-11-23T15:44:25.633 | 2014-11-23T16:36:11.393 | 2010-11-23T16:09:30.690 | 119,634 | 501,511 | [
"oracle",
"unix",
"oracle11g",
"oracle-apps"
] |
4,258,163 | 1 | 4,610,796 | null | 6 | 2,565 | What does a small stop sign icon on a file in solution explorer mean? Someone asked the same question a year ago [Original Question](https://stackoverflow.com/questions/1659298/small-stop-sign-at-the-right-bottom-of-the-file-solution-explorer-vs2005) but the answer provided is of no help.
The icon looks like this:

Suffice to say that the sign is not one presented in the VS documentation and is a UK Stop sign (red circle with a white horizontal bar) not a US one.
The project is WebKit and the build process cannot find AuthenticationCF.h even though the file is present. I presume the sign might shed some light on this.
Thanks,
Andy
| Stop sign icon in VS2005 Express solution explorer | CC BY-SA 2.5 | 0 | 2010-11-23T16:14:58.523 | 2011-01-06T00:48:53.840 | 2017-05-23T11:53:08.060 | -1 | 429,328 | [
"visual-studio-2005",
"visual-studio-express",
"solution-explorer"
] |
4,258,295 | 1 | null | null | 31 | 4,089 | Using GDI+ to draw various colors:
```
brush = new SolidBrush(color);
graphics.FillRectangle(brush, x, y, width, height);
```
You'll notice that no opaque color shows properly on glass:

How do i draw solid colors on glass?
---
You'll also notice that a fully opaque color is handled differently depending on what color it is:
- - -

Can anyone point me to the documentation on the desktop compositor that explains how different colors are handled?
---
## Update 3
You'll also notice that `FillRectangle` behaves differently than `FillEllipse`:
- `FillEllipse`- `FillRectangle`

Explanation for non-sensical behavior please.
## Update 4
[Alwayslearning](https://stackoverflow.com/users/390122/alwayslearning) suggested i change the compositing mode. From [MSDN](http://msdn.microsoft.com/en-us/library/ms534093(v=VS.85).aspx):
> The enumeration specifies how rendered colors are combined with background colors. This enumeration is used by the [Graphics::GetCompositingMode](http://msdn.microsoft.com/en-us/library/ms535700(v=VS.85).aspx) and ['Graphics::SetCompositingMode'](http://msdn.microsoft.com/en-us/library/ms535808(v=VS.85).aspx) methods of the class.```
CompositingModeSourceOver
```
Specifies that when a color is rendered, it is blended with the background color. The blend is determined by the alpha component of the color being rendered.```
CompositingModeSourceCopy
```
Specifies that when a color is rendered, it overwrites the background color. This mode cannot be used along with TextRenderingHintClearTypeGridFit.
From the description of `CompositingModeSourceCopy`, it sounds like it's not the option i want. From the limitations it imposes, it sounds like the option i want. And with composition, or transparency disabled it the option i want, since it performs a , rather than :

Fortunately it's not an evil i have to contemplate because it doesn't solve my actual issue. After constructing my `graphics` object, i tried changed the compositing mode:
```
graphics = new Graphics(hDC);
graphics.SetCompositingMode(CompositingModeSourceCopy); //CompositingModeSourceCopy = 1
```
The result has no effect on the output:

## Notes
- - - -
## See also
- [Aero: How to draw ClearType text on glass?](https://stackoverflow.com/questions/4258330/aero-how-to-draw-cleartype-text-on-glass)- [Windows Aero: What color to paint to make “glass” appear?](https://stackoverflow.com/questions/1870139/windows-aero-what-color-to-paint-to-make-glass-appear)- [Vista/7: How to get glass color?](https://stackoverflow.com/questions/3560890/vista-7-how-to-get-glass-color)
| Aero: How to draw solid (opaque) colors on glass? | CC BY-SA 2.5 | 0 | 2010-11-23T16:26:52.847 | 2015-01-28T13:54:48.603 | 2017-05-23T10:30:21.840 | -1 | 12,597 | [
"aero",
"dwm",
"aero-glass"
] |
4,258,459 | 1 | 4,258,617 | null | 1 | 213 | in the database I have this:
[alt text http://www.balexandre.com/temp/2010-11-23_1739.png](http://www.balexandre.com/temp/2010-11-23_1739.png)
in my , I output like:
```
defaultMsg: '<%: facebook.Social.PostWallDefaultMsg %>',
```
and like
```
defaultMsg: '<%: System.Web.HttpUtility.HtmlDecode(facebook.Social.PostWallDefaultMsg) %>',
```
The is:
```
defaultMsg: 'Tilmeld dig Citroëns Positive Power julekalender',
```
and in I get:

it decodes the correct output in all other parts/variables, but never in the message.
> that I can, either in MVC or through FB Javascript to get this correctly display?
Thank you.
test link: [http://jul.citroen.dk/citroen/Subscriber/Register](http://jul.citroen.dk/citroen/Subscriber/Register)
---
I also tried changing the charset from `UTF-8` to `windows-1252` with no effect whatsoever.
| Facebook window html encoding problem under MVC | CC BY-SA 2.5 | null | 2010-11-23T16:40:56.073 | 2010-11-23T16:55:55.100 | 2020-06-20T09:12:55.060 | -1 | 28,004 | [
"asp.net-mvc",
"facebook",
"asp.net-mvc-2"
] |
4,258,462 | 1 | null | null | 1 | 780 | I'm attempting to read the lines off of a control in an unmanaged application. I've been using the ManagedWinapi to wrap pinvokes, and for the most part it's gotten me where I need to be. I can find the control (it's a ProBrowser class, not sure exactly what that is) and view properties, but none of the information I need is available. Instead, the ProBrowser has nine child elements, all textboxes with matching properties: `Password: false, MultiLine: false`, and `Text: <blank>`. I'm assuming these are the column headers, but there's not much to go off of. This is as far down the chain as I'm able to get, and at no level do I seem to have access to the actual contents of the list.
```
SystemWindow list = new SystemWindow(ptr); // latching onto the ProBrowser
SystemWindow[] pieces = list.AllDescendantWindows; // same results if using .AllChildWindows
foreach (SystemWindow y in pieces) {
ManagedWinapi.Windows.Contents.TextContent tc = (ManagedWinapi.Windows.Contents.TextContent)y.Content; // ListContent returns null here and on the parent control
Console.WriteLine(tc.LongDescription);
Console.WriteLine(tc.ComponentType);
foreach (KeyValuePair<string, string> kvp in tc.PropertyList) {
Console.WriteLine("\t" + kvp.Key + ", " + kvp.Value);
}
Console.WriteLine("\tText: " + GetText(y.HWnd));
}
```
`GetText` is simply a wrapper for `GetWindowText`. It returns text for other controls like buttons just fine, but it doesn't pull anything from the ProBrowser.
Now I'm stuck. I'm not sure how else to grab the data from the list, as it doesn't seem to be appearing anywhere accessible. I've included a screenshot of the window in question, if its any help.

| Capturing data from a ProBrowser control with WinAPI | CC BY-SA 2.5 | null | 2010-11-23T16:41:02.607 | 2012-01-05T07:20:09.800 | null | null | 140,055 | [
"c#",
"windows",
"winapi"
] |
4,259,009 | 1 | 4,259,278 | null | 2 | 836 | I'm trying to use `setDividerLocation` on JSplitPane to size the two panels in a "best size" fashion so that the vertical scroll bar doesn't appear in the top panel. The split location should be just after the last of the data in the top panel.
Using `jSplitPane1.setResizeWeight(1D)` reserves too much space for the top component, resulting in empty space beneath the data.
I'm trying to get it

| Calculating "nice" looking position for divider in JSplitPane | CC BY-SA 2.5 | null | 2010-11-23T17:36:19.350 | 2010-11-23T19:58:16.267 | 2010-11-23T18:03:32.783 | 203,600 | 72,437 | [
"java",
"swing"
] |
4,259,108 | 1 | 4,261,276 | null | 0 | 267 | How in the world do I get rid of these buttons?
| Qt - remove menu from bottom? | CC BY-SA 2.5 | null | 2010-11-23T17:46:35.837 | 2010-11-23T21:44:59.703 | 2010-11-23T18:17:17.807 | 256,138 | null | [
"c++",
"qt",
"mobile",
"qt4"
] |
4,259,251 | 1 | 4,259,333 | null | 8 | 3,467 | I currently have it setup like below. I had tried checking 'Perform Runtime Contract Checking' and then selecting 'None' but that seems unnecessary. If I have my project setup like below are code contracts completely disabled?

| How can i completely disable Code Contracts? | CC BY-SA 2.5 | 0 | 2010-11-23T18:03:45.403 | 2011-09-01T19:16:50.490 | null | null | 226,897 | [
"visual-studio",
"visual-studio-2010",
"code-contracts"
] |
4,259,444 | 1 | null | null | 1 | 1,552 | ok for anyone else experiencing this in future it was a permissions issue with iis i had to set permissions on the whole tree for the style sheet to render
How do I attach a stylesheet? I've tried the usual way:
```
<LINK REL=StyleSheet HREF="../../Content/Site.css" TYPE="text/css" MEDIA=screen>
```
with various file paths. I've also tried with vb url.content scripts. For some reason nothing I try is displayed in the browser.
I get various results:
- -
What else could be the problem?
Its attached to the master file, so i dont know what else is wrong here.

| How do I attach a stylesheet? | CC BY-SA 2.5 | 0 | 2010-11-23T18:27:37.627 | 2010-11-26T15:12:40.720 | 2010-11-26T15:12:40.720 | 474,691 | 474,691 | [
"css",
"asp.net-mvc",
"vb.net",
"stylesheet"
] |
4,259,688 | 1 | null | null | 0 | 12,205 | Searching the, Internet ,I found [http://blog.insicdesigns.com/2009/03/parsing-xml-file-using-codeigniters-simplexml-library/](http://blog.insicdesigns.com/2009/03/parsing-xml-file-using-codeigniters-simplexml-library/), but I have a lot of questions. I am new to codeigniter, and I am trying to adapt my code to this xml. I want to display once a user logins, but the question is, how would I iterate through a series of child nodes with attributes?

| Parsing XML files using CodeIgniter? | CC BY-SA 2.5 | 0 | 2010-11-23T18:57:54.807 | 2010-11-23T20:35:24.223 | 2010-11-23T20:26:05.267 | 74,311 | 464,686 | [
"php",
"codeigniter"
] |
4,259,891 | 1 | 4,260,393 | null | 2 | 5,887 | I'm creating a page that allows the user to select a time slot from a schedule. I would prefer to do this with some sort of table layout (vs. using drop down/combo boxes). But I'm having trouble figuring out which path to take because the schedule is layed out like this.

So M,W,F are the same and T,TR are the same layout. I was hoping to do this with some sort of table instead of pure graphic because I want to be able to update information displayed in the cells. Is there a method other than doing rowspans to get the uneven layout like the picture. Or should I take a completely different approach. All my javascript needs to know is what information(text) is displayed in the cell and which one is being clicked.
| HTML table with fixed uneven rows | CC BY-SA 2.5 | 0 | 2010-11-23T19:20:53.163 | 2010-11-23T20:18:35.640 | null | null | 186,359 | [
"javascript",
"html",
"layout",
"tablelayout"
] |
4,259,906 | 1 | 4,259,980 | null | 0 | 1,402 | I keep getting this error in my windows logs:
```
SharePointSocialNetworking.Facebook
b0ceb144-b183-4b66-aa10-39fd9ee42bd4
Could not load file or assembly 'Microsoft.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=736440c9b414ea16' or one of its dependencies. The system cannot find the file specified.
```
But the assembly it's talking about already shows in my GAC:

Am I missing something here? Everything in the GAC matches the error message. How could windows not find this?
| How is windows not finding this assembly? | CC BY-SA 2.5 | 0 | 2010-11-23T19:22:34.770 | 2011-01-24T16:21:10.440 | 2010-11-23T21:12:48.397 | 107,862 | 226,897 | [
"asp.net",
"sharepoint",
"gac",
"global-assembly-cache"
] |
4,259,994 | 1 | 4,260,210 | null | 4 | 5,198 | I tried using a `QFileDialog` in a program of mine, but I prefer the default file dialog that is used by the host's OS. In my case, since I use Windows 7, it should look like this:

Is there a way to make Qt use the default file dialog that is used by the host's OS?
---
My code:
```
QFileDialog saveDialog(this);
saveDialog.setAcceptMode(QFileDialog::AcceptSave);
if (!saveDialog.exec())
return;
```
| QFileDialog alternative that uses default file dialog defined by OS? | CC BY-SA 2.5 | 0 | 2010-11-23T19:31:36.630 | 2015-10-28T12:58:02.927 | 2010-11-23T19:54:20.210 | 217,649 | 217,649 | [
"c++",
"qt"
] |
4,260,202 | 1 | null | null | 3 | 2,399 | I have an existing web application that creates a .war file. I want to convert the directory structure to maven's conventions. And I'm a bit lost.
In particular, the current .war, created by an ant target, doesn't copy to the .war anything in the site/statics directory subtree; this is copied by ant target.
But if I want to run, e.g., jetty from maven (and I do!), I'll need to copy site/statics/**/ to somewhere in maven's `target` directory. I don't know how to do that given maven's conventions.
Thanks.
Here's the existing directory structure as a (sorry) screenshot form Eclipse:

| Convert existing web-app file structure to maven file structure? | CC BY-SA 2.5 | null | 2010-11-23T19:50:38.117 | 2010-12-04T21:03:33.827 | null | null | 85,931 | [
"directory",
"maven",
"structure",
"web-applications"
] |
4,260,238 | 1 | 4,260,377 | null | 10 | 8,927 | I've got a UIView with a NavigationBar and I'd like to add a button which looks like the style of a Back Button. I'm not using a UINavigationController and was wondering if this could be done without it?
The style of the button should look like this: 
Thanks
| Draw custom Back button on iPhone Navigation Bar | CC BY-SA 2.5 | 0 | 2010-11-23T19:53:05.730 | 2013-02-19T02:52:11.797 | null | null | 143,979 | [
"iphone",
"objective-c",
"uinavigationcontroller",
"uinavigationbar",
"back-button"
] |
4,260,623 | 1 | 4,260,685 | null | 4 | 6,526 | I am trying to create and manage SQL Server Compact databases. The problem is that I can't change the "server type" from database engine. I tried following the directions here: [link text](https://stackoverflow.com/questions/577222/how-can-i-manage-sql-ce-databases-in-sql-server-management-studio).

| Unable to change server type in SQL Management Studio 2008 | CC BY-SA 2.5 | 0 | 2010-11-23T20:34:44.260 | 2010-11-23T20:58:04.640 | 2017-05-23T12:07:06.850 | -1 | 88,396 | [
"sql-server",
"ssms",
"sql-server-2008-r2"
] |
4,260,698 | 1 | null | null | 27 | 95,483 | I am trying to produce a series of box plots in that is grouped by 2 factors. I've managed to make the plot, but I cannot get the boxes to order in the correct direction.
My data farm I am using looks like this:
```
Nitrogen Species Treatment
2 G L
3 R M
4 G H
4 B L
2 B M
1 G H
```
I tried:
```
boxplot(mydata$Nitrogen~mydata$Species*mydata$Treatment)
```
this ordered the boxes alphabetically (first three were the "High" treatments, then within those three they were ordered by species name alphabetically).

I want the box plot ordered Low>Medium>High then within each of those groups G>R>B for the species.
So i tried using a factor in the formula:
```
f = ordered(interaction(mydata$Treatment, mydata$Species),
levels = c("L.G","L.R","L.B","M.G","M.R","M.B","H.G","H.R","H.B")
```
then:
```
boxplot(mydata$Nitrogen~f)
```
however the boxes are still shoeing up in the same order. The labels are now different, but the boxes have not moved.
I have pulled out each set of data and plotted them all together individually:
```
lg = mydata[mydata$Treatment="L" & mydata$Species="G", "Nitrogen"]
mg = mydata[mydata$Treatment="M" & mydata$Species="G", "Nitrogen"]
hg = mydata[mydata$Treatment="H" & mydata$Species="G", "Nitrogen"]
etc ..
boxplot(lg, lr, lb, mg, mr, mb, hg, hr, hb)
```
This gives what i want, but I would prefer to do this in a more elegant way, so I don't have to pull each one out individually for larger data sets.
---
Loadable data:
```
mydata <-
structure(list(Nitrogen = c(2L, 3L, 4L, 4L, 2L, 1L), Species = structure(c(2L,
3L, 2L, 1L, 1L, 2L), .Label = c("B", "G", "R"), class = "factor"),
Treatment = structure(c(2L, 3L, 1L, 2L, 3L, 1L), .Label = c("H",
"L", "M"), class = "factor")), .Names = c("Nitrogen", "Species",
"Treatment"), class = "data.frame", row.names = c(NA, -6L))
```
| R - ordering in boxplot | CC BY-SA 3.0 | 0 | 2010-11-23T20:42:30.177 | 2019-01-25T07:48:52.673 | 2019-01-25T07:48:52.673 | 712,765 | 518,016 | [
"r",
"boxplot"
] |
4,260,700 | 1 | 4,260,738 | null | 4 | 5,534 | I'm learning a bit C and i'm doing an exercise where i use structures and functions to collect employee infos and just print them out.
I'm declaring the functions and the struct in the header since i need them in both of the other files.
```
//employee.h
int addEmployee(void);
int printEmployee(int i);
struct employeelist
{
char last [20];
char first[20];
int pnumber;
int salary;
};
```
The "core" file is executing the both functions. The first function asks for the number of employees and gives a value back for the second function where the information is collected and stored. There are no errors and i've checked the code several times.
```
//employee.c
#include "employee.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
int numE;
int i;
int addEmployee(void)
{
struct employeelist employee[5];
int numE;
printf("How many employees do you want to add to the list?: ");
scanf("%d", &numE);
printf("Please type in the last name, the first name,\nthe personal number and the salary of your employees.\n");
for (i=0; i < numE; i++)
{
printf("Last name: ");
scanf("%s", employee[i].last);
printf("First name: ");
scanf("%s", employee[i].first);
printf("Personal number: ");
scanf("%d", &employee[i].pnumber);
printf("Salary: ");
scanf("%d", &employee[i].salary);
}
return numE;
}
int printEmployee(int emp)
{
struct employeelist employee[5];
for (i=0; i < emp; i++)
{
printf("Last name: {%s}\nFirst name: {%s}\nPersonal number: {%d}\nSalary: {%d}\n",employee[i].last,employee[i].first, employee[i].pnumber, employee[i].salary);
}
getchar();
getchar();
return emp;
}
```
The last file contains the main() function to execute the functions above.
```
#include "employee.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
int emp;
int main ()
{
struct employeelist employee[5];
int emp = addEmployee();
printEmployee(emp);
return 0;
}
```
Now my problem is that everything works only the output is incorrect. I can't even say what it is. Some kind of random mix of signs, letters and numbers. Since i have no idea where my mistake is, i would be glad about any advise to solve this problem. Thank you.
I have added a screenshot of my output. Maybe it helps.
| Programming with functions and structures using C, getting strange output, no errors | CC BY-SA 2.5 | 0 | 2010-11-23T20:42:57.050 | 2013-01-29T12:05:24.140 | 2010-11-23T20:50:35.160 | 483,859 | 483,859 | [
"c"
] |
4,260,786 | 1 | 4,261,073 | null | 2 | 2,862 | For once, ff and ie comply. But in this instance chrome doesnt like it.
We have a field, with autosuggest attached, that appears after x amount of letters. Cannot really put a demo on fiddle, as its db driven.
However here is the css
```
.suggestionsBox {
z-index: 2;
position: absolute;
margin: 70px 0px 0px 146px;
width: 207px;
background-color: #ffffff;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border: 1px solid #cccccc;
color: #000;
box-shadow:-1px -1px 7px #ccc, 1px 1px 7px #ccc;
-webkit-box-shadow:-1px -1px 7px #ccc, 1px 1px 7px #ccc;
-moz-box-shadow:-1px -1px 7px #ccc, 1px 1px 7px #ccc;
}
.suggestionList {
margin: 0px;
padding: 0px;
}
.suggestionList li {
list-style: none;
margin: 3px 3px 3px 3px;
padding: 3px;
cursor: pointer;
}
.suggestionList li:hover {
background-color: #ffffcc;
}
```
And screenpic of ff , ie chrome appearance. Any suggestions, I am usually bloody good with css. But this has me stumped.

As requested here is html for this element:
```
<div class="field"><label for="propertysuburb">Suburb </label> <input name="propertysuburb" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" size="50" type="text" class="medium" /></div>
<div class="suggestionsBox" id="suggestions" style="display: none;">
<div class="suggestionList" id="autoSuggestionsList">
</div>
</div>
```
| position of element screwed in Chrome | CC BY-SA 2.5 | 0 | 2010-11-23T20:51:09.763 | 2010-11-23T21:45:11.123 | 2010-11-23T20:58:51.793 | 501,173 | 501,173 | [
"css",
"google-chrome"
] |
4,260,836 | 1 | 4,261,225 | null | 4 | 939 | Can anyone help me convert this to C#. It's literally hurting my brain.
[http://www.evanmiller.org/how-not-to-sort-by-average-rating.html](http://www.evanmiller.org/how-not-to-sort-by-average-rating.html)

```
require 'statistics2'
def ci_lower_bound(pos, n, power)
if n == 0
return 0
end
z = Statistics2.pnormaldist(1-power/2)
phat = 1.0*pos/n
(phat + z*z/(2*n) - z * Math.sqrt((phat*(1-phat)+z*z/(4*n))/n))/(1+z*z/n)
end
```
What does this mean?
```
Statistics2.pnormaldist(1-power/2)
```
| C# from Ruby Wilson score | CC BY-SA 2.5 | 0 | 2010-11-23T20:56:35.303 | 2019-09-16T15:02:45.553 | null | null | 259,594 | [
"c#",
"ruby"
] |
4,261,254 | 1 | 4,299,643 | null | 1 | 4,297 | then I run `cmd /c net use h: /d` from the powershell command line it all succeeds
but when I run the same command in the powershell $profile script it asks for a manual confirmation.

Anyone know how to prevent the confirmation please?
| Running a command in power shell profile script has different behaviour than command line | CC BY-SA 2.5 | null | 2010-11-23T21:42:05.783 | 2013-01-27T23:52:42.507 | 2011-03-30T19:31:49.500 | 64,046 | 30,225 | [
"powershell"
] |
4,261,356 | 1 | null | null | 1 | 838 | There's an web service and it depends on the sent by the browser for its operations. The service works fine as long as it is being accessed by a browser, but fails when it is accessed by another service or program.
The aspx file that I want to introduce in step 2.a has full access to the original cookies. I need a way so that the cookies in 2.a are forwarded in step 2.b
(step 3 is not required after 2.a and 2.b are developed )
Thanks

Thanks
| Web Services and cookie handling | CC BY-SA 2.5 | null | 2010-11-23T21:55:30.963 | 2013-11-19T09:20:23.197 | 2013-11-19T09:20:23.197 | 199,048 | 331,225 | [
"asp.net",
"cookies",
"webmethod",
"forwarding"
] |
4,261,332 | 1 | 4,261,803 | null | 12 | 2,043 | Do you think there is room for optimizations in the function haswon (see below)?
I recognized that changing the argument type from `__int64` to `unsigned __int64` made the function faster, thus i thougt maybe there is still a chance for optimization.
I am writing a [connect four](http://en.wikipedia.org/wiki/Connect_Four) game. Recently i used the Profiler and recognized that the function uses much of the cpu-time. The function uses a bitboard-representation of the connect-four-board for one player. The function itself i found in the sources of the [fourstones](http://homepages.cwi.nl/~tromp/c4/fhour.html) benchmark. The bitboard representation is following:
```
. . . . . . . TOP
5 12 19 26 33 40 47
4 11 18 25 32 39 46
3 10 17 24 31 38 45
2 9 16 23 30 37 44
1 8 15 22 29 36 43
0 7 14 21 28 35 42 BOTTOM
```
The function:
```
// return whether newboard includes a win
bool haswon(unsigned __int64 newboard)
{
unsigned __int64 y = newboard & (newboard >> 6);
if (y & (y >> 2 * 6)) // check \ diagonal
return true;
y = newboard & (newboard >> 7);
if (y & (y >> 2 * 7)) // check horizontal -
return true;
y = newboard & (newboard >> 8);
if (y & (y >> 2 * 8)) // check / diagonal
return true;
y = newboard & (newboard >> 1);
if (y & (y >> 2)) // check vertical |
return true;
return false;
}
```
Thanks!
CPU is x86, 32 Bit Architecture, i'm using the Compiler from the Visual Studio 2008 Express Edition. Optimization Flags are /O2 /Oi /GL.
I tried the function haswon2 which Ben Jackson suggested. The assemblies from the Microsoft Compiler, with the default optimization flags for release versions (/O2 /Oi /GL), showing nearly no runtime differences. It looks like that the VC-Compiler in comparison to gcc can not take advantage that it must not evaluate each condition in strict order.
haswon original:

haswon2 from Ben Jackson:

Assembly of haswon:
```
00401A10 mov eax,dword ptr [esp+4]
00401A14 mov ecx,dword ptr [esp+8]
00401A18 push ebx
00401A19 push esi
00401A1A push edi
00401A1B mov edx,eax
00401A1D mov edi,ecx
00401A1F shrd edx,edi,6
00401A23 mov esi,edx
00401A25 shr edi,6
00401A28 and esi,eax
00401A2A and edi,ecx
00401A2C mov edx,esi
00401A2E mov ebx,edi
00401A30 shrd edx,ebx,0Ch
00401A34 shr ebx,0Ch
00401A37 and edx,esi
00401A39 and ebx,edi
00401A3B or edx,ebx
00401A3D je `anonymous namespace'::haswon+35h (401A45h)
00401A3F mov al,1
00401A41 pop edi
00401A42 pop esi
00401A43 pop ebx
00401A44 ret
00401A45 mov edx,eax
00401A47 mov edi,ecx
00401A49 shrd edx,edi,7
00401A4D mov esi,edx
00401A4F shr edi,7
00401A52 and esi,eax
00401A54 and edi,ecx
00401A56 mov edx,esi
00401A58 mov ebx,edi
00401A5A shrd edx,ebx,0Eh
00401A5E shr ebx,0Eh
00401A61 and edx,esi
00401A63 and ebx,edi
00401A65 or edx,ebx
00401A67 jne `anonymous namespace'::haswon+2Fh (401A3Fh)
00401A69 mov edx,eax
00401A6B mov edi,ecx
00401A6D shrd edx,edi,8
00401A71 mov esi,edx
00401A73 shr edi,8
00401A76 and esi,eax
00401A78 and edi,ecx
00401A7A mov edx,esi
00401A7C mov ebx,edi
00401A7E shrd edx,ebx,10h
00401A82 shr ebx,10h
00401A85 and edx,esi
00401A87 and ebx,edi
00401A89 or edx,ebx
00401A8B jne `anonymous namespace'::haswon+2Fh (401A3Fh)
00401A8D mov edx,eax
00401A8F mov esi,ecx
00401A91 shrd edx,esi,1
00401A95 shr esi,1
00401A97 and esi,ecx
00401A99 and edx,eax
00401A9B mov eax,edx
00401A9D mov ecx,esi
00401A9F shrd eax,ecx,2
00401AA3 shr ecx,2
00401AA6 and eax,edx
00401AA8 and ecx,esi
00401AAA or eax,ecx
00401AAC jne `anonymous namespace'::haswon+2Fh (401A3Fh)
00401AAE pop edi
00401AAF pop esi
00401AB0 xor al,al
00401AB2 pop ebx
00401AB3 ret
```
| Optimization chance for following Bit-Operations? | CC BY-SA 2.5 | 0 | 2010-11-23T21:53:00.127 | 2012-04-18T17:33:13.517 | 2010-11-24T22:23:51.960 | 237,483 | 237,483 | [
"c++",
"c",
"optimization",
"64-bit",
"bit-manipulation"
] |
4,261,387 | 1 | 4,265,372 | null | 1 | 6,805 | In an image like this, I want to remove the white background but keep the grayness of the dropshadow. Reomving mapping the actual image is not a problem!

| Turning white background transparent, but keeping dropshadow? | CC BY-SA 2.5 | 0 | 2010-11-23T21:58:27.320 | 2010-11-24T09:44:50.563 | null | null | 350,080 | [
"adobe",
"photoshop"
] |
4,261,593 | 1 | 4,261,899 | null | 1 | 1,783 | I'm attempting to create a procedure in Oracle Express Server (Application Express 2.1.0.00.39) using the web interface.
This is the SQL I'm running via the `SQL Commands` option in the web interface
```
CREATE OR REPLACE PROCEDURE my_procedure (listOfNumbers num_list,
v_value varchar2)
IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
UPDATE my_table
SET my_column = v_value
WHERE my_row_id IN (SELECT column_value
FROM TABLE(listOfNumbers));
COMMIT;
END;
```
## UPDATE:
Changed `SELECT column_value FROM TABLE` to `SELECT column_value FROM TABLE(listOfNumbers)` but now I get the following error:
> PLS-00201: identifier 'num_list' must
be declared
## UPDATE 2:
Here is how I created my type:
```
CREATE OR REPLACE TYPE "num_list" as table of NUMBER(38,1)
/
```
Seems the error is being caused on the parameter declaration line:
```
(listOfNumbers num_list, v_value varchar2)
```
Below is the object details as displayed by the Oracle Database Express Edition web interface.

| Create Oracle procedure error - declare custom type | CC BY-SA 2.5 | null | 2010-11-23T22:23:45.977 | 2010-11-24T21:23:10.330 | 2010-11-24T19:59:06.437 | 160,823 | 160,823 | [
"oracle",
"stored-procedures"
] |
4,261,672 | 1 | 4,270,991 | null | 2 | 462 | I'm trying some S-IDE tests in Firefox 4 beta 7 that work fine in 3.6. One thing I can't seem to figure out is an automated way to interact with FF4's new built-in dialog:

Anybody solve this one yet?
| Dealing with Firefox 4's new "data entered" confirmation dialog in Selenium IDE | CC BY-SA 2.5 | null | 2010-11-23T22:32:46.427 | 2011-05-05T08:36:03.580 | 2010-11-23T22:50:51.713 | 16,777 | 16,777 | [
"firefox",
"modal-dialog",
"selenium-ide",
"confirmation",
"firefox4"
] |
4,262,214 | 1 | 4,263,264 | null | 0 | 180 | I'm not really sure what tools I should be using to create a desired outcome...
At the bottom of the screen I would like to have three buttons, something like what is at the bottom of this screen except only using text instead of icons, and only having three options, not four.

Is this a tab view? I don't need a tab view because I don't need the tabs to stay on screen after one is clicked.
| Making tabs, buttons, or neither? | CC BY-SA 2.5 | 0 | 2010-11-23T23:45:57.850 | 2010-11-24T03:39:44.887 | null | null | 487,840 | [
"android",
"button",
"android-tabhost"
] |
4,262,239 | 1 | 4,262,363 | null | 1 | 178 | I got a new task for a different kind of gridview. How do I create this type of gridview?

| How to make this gridview in ASP.NET? | CC BY-SA 3.0 | 0 | 2010-11-23T23:50:42.737 | 2011-05-06T08:05:53.343 | 2020-06-20T09:12:55.060 | -1 | 158,008 | [
"c#",
"asp.net",
"vb.net",
"gridview"
] |
4,262,624 | 1 | 4,262,768 | null | 2 | 801 | I have some Irrlicht code that generates a rectangular mesh given a width and height. Here is the code that generates the vertices and indices:
```
int iNumVertices = (width + 1) * (height + 1);
S3DVertex * vertices = new S3DVertex[iNumVertices];
memset(vertices,0,sizeof(S3DVertex) * iNumVertices);
for(int i=0;i<=height;++i)
{
for(int j=0;j<=width;++j)
{
int iIndex = (i*(width + 1)) + j;
vertices[iIndex].Pos.X = i * 2.0f;
vertices[iIndex].Pos.Y = 0.0f;
vertices[iIndex].Pos.Z = j * 2.0f;
vertices[iIndex].Color.color = 0xFFFFFFFF;
vertices[iIndex].TCoords.X = i;
vertices[iIndex].TCoords.Y = j;
}
}
int iNumIndices = 6 * width * height;
u16 * indices = new u16[iNumIndices];
for(int i=0;i<height;++i)
{
for(int j=0;j<width;++j)
{
int iIndex = ((i*width) + j) * 6;
int tmp_offset = j + (i * (width + 1));
indices[iIndex + 0] = tmp_offset + 1;
indices[iIndex + 1] = tmp_offset + width + 1;
indices[iIndex + 2] = tmp_offset;
indices[iIndex + 3] = tmp_offset + 1;
indices[iIndex + 4] = tmp_offset + width + 2;
indices[iIndex + 5] = tmp_offset + width + 1;
}
}
```
Then the vertices and indices are added to the mesh and the bounding box is recalculated:
```
SMeshBuffer * buffer = new SMeshBuffer();
buffer->append(vertices,iNumVertices,indices,iNumIndices);
buffer->recalculateBoundingBox();
```
However, when rendered, the bounding box is nowhere close to the right size:

The end result of this is that the mesh doesn't get rendered when the small bounding box goes behind the camera.
| How come the bounding box isn't being set properly in this mesh? | CC BY-SA 2.5 | null | 2010-11-24T01:09:23.850 | 2012-07-28T17:44:50.370 | 2012-07-28T17:44:50.370 | 50,776 | 193,619 | [
"c++",
"bounding-box",
"irrlicht"
] |
4,262,860 | 1 | 4,263,664 | null | 0 | 227 | This is what happens:

code here:
```
self.connectAction = createAction(
self, "设备连接(&C)", self.setupDevice,
icon_id = QStyle.SP_DialogNoButton)
```
and this the createAction:
```
def createAction(parent,
text,
slot=None,
shortcut=None,
icon=None,
tip=None,
checkable=False,
signal="triggered()",
whatis=None,
icon_id=None):
action = QAction(text, parent)
if icon:
if isinstance(icon, QIcon):
action.setIcon(icon)
else:
action.setIcon(QIcon(":/%s.png" % icon))
if icon_id:
action.setIcon(app.style().standardIcon(icon_id))
if slot:
connect(action, signal, slot)
return action
```
| pyqt icon overlap with word | CC BY-SA 2.5 | null | 2010-11-24T01:59:19.817 | 2010-12-22T15:54:29.073 | 2010-12-22T15:54:29.073 | 98,494 | 73,048 | [
"pyqt"
] |
4,262,920 | 1 | 4,262,930 | null | 2 | 353 | Unfortunately I'm working in an obscure platform called uniPaaS so I'm probably after some platform-agnostic advice.
I've got a Web Service request where the XML document contains those irritating smart quotes. The byte data for the character is `E2 80 99` (which is a [00002019 RIGHT SINGLE QUOTATION MARK](http://www.tachyonsoft.com/uc0020.htm))

When I write the XML file to disk on our staging server, it writes it correctly. When I write it on our production server, it totally changes the values of those bytes and malforms the XML document:

`E2 80 99` becomes `92`. Has anyone ever seen this sort of behaviour before? It seems to only be that one byte string (but the SOAP resonse is 50Mb large, so I haven't had a chance to diff the entire file).
| XML UTF-8 data being written differently | CC BY-SA 3.0 | null | 2010-11-24T02:13:41.217 | 2014-06-20T02:15:20.490 | 2014-06-20T02:15:20.490 | 65,863 | 69,683 | [
"xml",
"utf-8"
] |
4,263,430 | 1 | 4,269,134 | null | 7 | 2,265 | Could any one help me to remove the "Nullsoft" label in NSIS installer? Please refer the image below.

| Removing branding from NSIS installer | CC BY-SA 2.5 | 0 | 2010-11-24T04:23:43.803 | 2010-11-24T16:34:12.217 | 2010-11-24T04:26:00.187 | 23,897 | 505,406 | [
"nsis"
] |
4,263,546 | 1 | 4,282,801 | null | 10 | 2,884 | I currently have a Entity Framework 4.0 model in place with Table Per Type (TPT), but there are a few performance issues (lots of LOJ's/CASE statements), as well as an issue mapping between two particular domain areas (many-to-many).
I've decided to try out TPH.
I have an entity called "" which is , and the base for all other entities.
I then have "", "", "", "", etc which all derive from Location.
"" is the .
That part is working fine, but i'm having issues trying to define navigational properties for the derived types.
For instance, a "" has a single "", so i should be able to do this:
```
var state = _ctx.Locations.OfType<State>().Include("Country").First();
var countryForState = state.Country;
```
But this would require a navigational property called "Country" on the "State" derived entity. How do i do this? When i generate the model from the database, i have a single table with all the FK's pointing to records in the same table:

(NOTE: I created those FK's manually in the DB).
But the FK's are placed as nav's on the "" entity, so how do i move these navigational properties down to the derived entities? I can't copy+paste the navs across, and i can't "create new navigational property", because it won't let me define the start/end role.
How do we do this?
It's also not clear with TPH if we can do it model-first, or we HAVE to start with a DB, fix up the model then re-generate the DB. I am yet to find a good example on the internet about how to define navs on children with TPH.
NOTE: . My current solution has TPT with the EDMX, and pure POCO's, i am hoping to not affect the domain model/repositories (if possible), and just update the EF Model/database.
Still no solution - however im trying to do model-first, and doing Add -> New Association, which does in fact allow me to add a nav to the derived entities. But when i try and "Generate database from Model", it still tries to create tables for "Location_Street", "Location_Country" etc. It's almost like TPH cannot be done model first.
Here is my current model:

The validation error i am currently getting:
> Error 1 Error 3002: Problem in mapping
fragments starting at line
359:Potential runtime violation of
table Locations's keys
(Locations.LocationId): Columns
(Locations.LocationId) are mapped to
EntitySet NeighbourhoodZipCode's
properties
(NeighbourhoodZipCode.Neighbourhood.LocationId)
on the conceptual side but they do not
form the EntitySet's key properties
(NeighbourhoodZipCode.Neighbourhood.LocationId,
NeighbourhoodZipCode.ZipCode.LocationId).
Just thought i'd keep editing this question with edit's regarding where i am currently at. I'm beginning to wonder if TPH with self-referencing FK's is even possible.
So i figured out the above error, that was because i was missing the join-table for the Neighbourhood-ZipCode many to many.
Adding the join table (and mapping the navs to that) solved the above error.
But now im getting this error:
> Error 3032: Problem in mapping
fragments starting at lines 373,
382:Condition members
'Locations.StateLocationId' have
duplicate condition values.
If i have a look at the CSDL, here is the association mapping for "CountyState" (a State has many counties, a County has 1 state):
```
<AssociationSetMapping Name="CountyState" TypeName="Locations.CountyState" StoreEntitySet="Locations">
<EndProperty Name="State">
<ScalarProperty Name="LocationId" ColumnName="StateLocationId" />
</EndProperty>
<EndProperty Name="County">
<ScalarProperty Name="LocationId" ColumnName="LocationId" />
</EndProperty>
<Condition ColumnName="StateLocationId" IsNull="false" />
</AssociationSetMapping>
```
It's that `Condition ColumnName="StateLocationId"` which is complaining, because `ZipCodeState` association also this condition.
But i don't get it. The discriminators for all entities are unique (i have triple checked), and i would have thought this was a valid scenario:
1. County has a single State, denoted by StateLocationId (Locations table)
2. ZipCode has a single State, denoted by StateLocationId (Locations table)
Is that not valid in TPH?
| Entity Framework 4 Table Per Hierarchy - How To Define Navigational Properties On Children? | CC BY-SA 3.0 | 0 | 2010-11-24T04:47:47.957 | 2013-04-25T15:14:32.500 | 2013-04-25T15:14:32.500 | 15,394 | 321,946 | [
"c#",
"sql-server-2008",
"entity-framework",
"entity-framework-4",
"table-per-hierarchy"
] |
4,263,630 | 1 | null | null | 6 | 879 | I'm facing a strange issue. My application plays movies from specific positions, so even a position mentioned in milliseconds matters for me. I'm assigning a position to a media element but it's showing the wrong frame. I don't know why media player is not playing from the position that I'm giving.
Here is some sample code:
```
TimeSpan oTimeSpan = TimeSpan.FromMilliseconds(16800200); // This shows 04:40:00.2000000
MediaPlayer.Position = oTimeSpan; // But after assigning, value is 04:40:00.1990000
```
Here is a screenshot before and after assigning:


Can anybody tell me what I'm doing wrong here?
| Silverlight media player position problem | CC BY-SA 2.5 | 0 | 2010-11-24T05:05:04.640 | 2011-03-16T04:28:42.613 | 2011-02-09T08:25:00.040 | 38,403 | 494,543 | [
"c#",
"asp.net",
"wpf",
"silverlight",
"timespan"
] |
4,263,890 | 1 | 4,263,962 | null | 0 | 1,654 | I've got a select list and I want people to be directed to id tags once they choose their respective options.

I know that I'm going to have to use some kind of onClick() but what is the JavaScript that I should use to forward to the anchor of the value?
| Forwarding to Anchor Tag After Using select | CC BY-SA 3.0 | null | 2010-11-24T06:01:02.783 | 2014-12-22T11:30:24.460 | 2014-12-22T11:30:24.460 | 4,186,297 | 516,833 | [
"html",
"onclick",
"html-select"
] |
4,263,955 | 1 | 4,298,522 | null | 0 | 1,861 | I am new to Android. Well the problem I am facing is that I have two layouts. One is main.xml and another that I made was relative_layout.xml.
I did not give it an @+id/ to this layout so the default id was relative_layout01.xml but when I gave this an id the old one still remain in my R.java and when I edit R.java it again generated the old version of file.
I want to delete relative_layout01.xml reference as it does not exists as I have given a name to my layout.
Attaching an image for reference.
| unable to edit R.java Android using Eclipse | CC BY-SA 3.0 | null | 2010-11-24T06:15:17.127 | 2017-02-03T08:56:46.207 | 2017-02-03T08:56:46.207 | 155,005 | 185,022 | [
"android-layout",
"r.java-file"
] |
4,264,123 | 1 | null | null | 0 | 839 | i have one listview contain menu based on the selected item in listview i want to display new view(add or edit or delete) that is defferent add.xml or edit.xml or delete.xml file.I want to show below like this.Also how to back in to main menu from child view.
i tried using tag using ViewFlipper.showNext() but it display only add view all the time.
Thanks in advance..






| Menu Navigation using ViewFlipper in android? | CC BY-SA 2.5 | null | 2010-11-24T06:44:50.303 | 2010-11-24T07:27:48.750 | null | null | 489,902 | [
"android",
"viewflipper"
] |
4,264,100 | 1 | null | null | 32 | 10,813 | ([xkcd](http://xkcd.com/303/))
I know that compiling nowadays is much faster than it was before. Yet, for me, it seems that compiling and especially .
Since the beginning of last summer, I've been working heavily on ASP.NET MVC projects. Of course, the best way to debug them is by using the web server that comes with Visual Studio. When doing that, I get horrendously slow loading times. Chrome dev tools typically report that loading one of my pages had a , followed by a short loading time.
I've seen [these](https://stackoverflow.com/questions/24959/debugging-asp-net-with-firefox-and-visual-studio-net-very-slow-compared-to-ie) [two](https://stackoverflow.com/questions/4260399/debugging-asp-net-with-chrome-and-visual-studio-net-very-slow-compared-to-ie) questions, but they don't help. While I do most of my debugging work in Chrome, the same happens in IE.
Has anyone else had this problem before? If so, any tips?
Also, I doubt that the problem lies with the speed of my machine. This computer is really fast running Windows 7 and Visual Studio 2010, so I don't see why ASP.NET debugging should be so slow.
---
In his answer below, Jon Skeet suggested attempting to identify whether the problem is being caused by the environment or by the code itself. I created a brand new MVC project and ran it. The first test appeared to be much faster. However, after testing it a few more times, it's safe to say that the first test was an anomaly - usually, it takes as long as my big project (2 - 3 minutes). Thus, . Thanks in advance for any help!
---
It's been a while since I updated this question. Here are some details I've gathered since my last update:
- - - - -
I haven't found a solution for this problem, so I've been stuck with huge wait times. Does anyone know how to solve this?
| Why is the ASP.NET/Visual Studio Web Development Server so slow? | CC BY-SA 3.0 | 0 | 2010-11-24T06:40:26.337 | 2016-04-04T21:37:31.963 | 2017-05-23T12:24:59.333 | -1 | 130,164 | [
"c#",
"asp.net",
"asp.net-mvc",
"visual-studio",
"debugging"
] |
4,264,191 | 1 | null | null | 1 | 577 | I'm new to NHibernate, but have managed to get it all running fine for my latest project. But now I've reached the inevitable performance problem where I need to get beyond the abstraction to fix it.
I've created a nunit test to isolate the method that takes a long time. But first a quick overview of my domain model is probably a good idea:
I have a 'PmqccForm' which is an object that has a 'Project' object, which contains Name, Number etc and it also has a 'Questions' object, which is a class that itself contains properties for various different 'Question' objects. There is a JobVelocityQuestion object which itself has an answer and some other properties, and a whole bunch of similar Question objects.
This is what I'm talking about with my PmqccForm having a Questions object

This is the questions part of the model:

The key point is that I want to be able to type
form.Questions.JobVelocityQuestion
as there is always exactly 1 JobVelocityQuestion for each PmqccForm, its the same for all the other questions. These are C# properties on the Questions object which is just a holding place for them.
Now, the method that is causing me issues is this:
```
public IEnumerable<PmqccForm> GetPmqccFormsByUser(StaffMember staffMember)
{
ISession session = NHibernateSessionManager.Instance.GetSession();
ICriteria criteria = session.CreateCriteria(typeof(PmqccForm));
criteria.CreateAlias("Project", "Project");
criteria.Add(Expression.Eq("Project.ProjectLeader", staffMember));
criteria.Add(Expression.Eq("Project.IsArchived", false));
return criteria.List<PmqccForm>();
}
```
A look in my console from the Nunit test which just runs this method shows that there is nearly 2000 sql queries being processsed!
[http://rodhowarth.com/otherstorage/queries.txt](http://rodhowarth.com/otherstorage/queries.txt) is the console log.
The thing is, at this stage I just want the form object, the actual questions can be accessed on a need to know basis. I thought that NHibernate was meant to be able to do this?
Here is my mapping file:
[http://rodhowarth.com/otherstorage/hibernatemapping.txt](http://rodhowarth.com/otherstorage/hibernatemapping.txt)
Can anyone hint me as to what I'm missing? or a way to optimize what I'm doing in relation to NHibernate?
What if I made the questions a collection, and then made the properties loop through this collection and return the correct one. Would this be better optimization from nhibernates point of view?
| NHibernate lazy loading doesn't appear to be working for my domain? | CC BY-SA 2.5 | null | 2010-11-24T06:55:49.737 | 2011-06-12T05:37:35.133 | 2010-11-25T01:16:42.507 | 126,597 | 126,597 | [
"c#",
".net",
"nhibernate"
] |
4,264,288 | 1 | 4,271,864 | null | 1 | 959 | I have a problem with a simple combobox rendering on XP.
The code is just:
```
<ComboBox Cursor="Hand" customCommands:ComboBoxSelectionChange.Command="{Binding StatusChange}" ItemsSource="{Binding AvailabilityStatusList}"/>
```
However, the result on different OSs is not quite i've expected:
Vista: 
XP: 
| WPF Combobox rendering on XP | CC BY-SA 2.5 | 0 | 2010-11-24T07:14:51.513 | 2010-11-24T21:51:56.783 | null | null | 478,442 | [
"wpf",
"combobox",
"windows-xp",
"rendering"
] |
4,264,693 | 1 | 4,265,194 | null | 1 | 5,020 | I just want to place images in a fixed-height container: images must not exceed container's height and must be centered vertically.
So I have
```
<div id="partenaires">
<img src="images/partenaires/Debian.png" alt="Debian" />
<img src="images/partenaires/Fedora.png" alt="Fedora" />
...
</div>
```
with
```
#partenaires {
height:3em;
line-height:3em;
white-space:nowrap;
overflow:hidden;
clear:both;
}
#partenaires img {
vertical-align:middle;
margin:0 1em;
max-height:100%;
}
```
But it appears big images are truncated on bottom like this (for all browsers) because `vertical-align`:

How I should do to what I want? I really don't understand this behaviour...
Thanks in advance!
EDIT: you can try all you want [here](http://jsfiddle.net/RgTaY/)!
| vertical-align:middle doesn't work as expected | CC BY-SA 3.0 | null | 2010-11-24T08:19:51.967 | 2012-07-15T11:39:38.757 | 2012-07-15T11:39:38.757 | 1,494,505 | 465,233 | [
"css",
"vertical-alignment"
] |
4,264,896 | 1 | 4,265,000 | null | 2 | 2,103 | As we know, local variables is located on stack. However, what is their order? Are they arranged as the order of their declaration? This means that the first declared variable is arrange on the higher address of stack (stack grows to lower address) ? As an example:
```
void foo(){
int iArray[4];
int iVar;
}
```
On stack, the local variable-- `iArray` and `iVar` are arranged as followed?

| How does compiler arrange local variables on stack? | CC BY-SA 2.5 | null | 2010-11-24T08:51:55.623 | 2017-12-29T14:06:59.837 | 2010-11-24T08:59:05.997 | 500,638 | 500,638 | [
"variables",
"stack"
] |
4,264,960 | 1 | 4,265,085 | null | 2 | 914 | I use the following code, to animate to my UIView.
```
[UIView beginAnimations: @"hi"context: nil];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
[UIView commitAnimations];
```
But when the UIViewAnimationTransitionFlipFromLeft processes that time, the background will be displayed as white. I need to change that white place and i will add somecolor to that place.
The output is as follows:

| How to Change Background color when uiview is animating | CC BY-SA 3.0 | 0 | 2010-11-24T08:59:40.317 | 2017-12-07T19:17:15.563 | 2017-12-07T19:17:15.563 | 472,495 | 409,571 | [
"iphone"
] |
4,265,228 | 1 | 4,265,324 | null | 88 | 120,046 | I am developing an application,In my application,I am using Listview for displaying data using dom parsing,I want to footer in listview,when i click footer additional more data add to list view,I attached image,i would like that design and process,please refer image1 and imgae2.I mention footer in red rectangle


Fig2-Add additional 10 record added in listview
| How to add a footer in ListView? | CC BY-SA 3.0 | 0 | 2010-11-24T09:29:41.577 | 2022-08-04T05:27:02.233 | 2020-06-20T09:12:55.060 | -1 | 500,595 | [
"android",
"android-listview",
"footer"
] |
4,265,578 | 1 | 4,265,629 | null | 1 | 1,127 | I am exercising some problems in Expresion blend.
My problem is with textbox property.I want it to show strings as multiline text,
but it goes horizontally right and I should put cursor on string and go to right along
with text.This is very annoying.
Any suggestions?
Here a picture of it:

My best regards and thanks in advance.
| Set Text Box property to MultiLine | CC BY-SA 2.5 | null | 2010-11-24T10:09:19.237 | 2010-11-24T10:15:16.580 | null | null | 457,136 | [
"wpf",
"expression-blend"
] |
4,265,588 | 1 | 4,388,164 | null | 3 | 93 | I'm experiencing issues with both this dialog and another Activity - where it's an EditText control that looks wrong - and in both cases it seems that the center of the control is shifted up by one pixel, or the sides down by one. I'm guessing that the regions in question are defined by a 9-patch.
Has anyone else experienced this, and knows how it might be resolved? Could it be something to do with sub-pixel rendering - as with the iPhone, where non-integer positioning of UI controls causes blurriness? I've also noticed issues with table dividers disappearing at certain offsets (surely a subpixel issue) - but on both this phone and an HTC device.

| Why do these Android controls look peculiar on Galaxy S? | CC BY-SA 2.5 | null | 2010-11-24T10:10:08.363 | 2010-12-08T13:46:59.523 | null | null | 148,206 | [
"android",
"view",
"android-activity",
"rendering"
] |
4,265,638 | 1 | 5,860,056 | null | 5 | 1,067 | In Visual Studio I would like to break on certain exception while in debug mode. This is configured through the "Debug >> Exceptions" dialog window (see image below). Can enabling and disabling these checkboxes be controlled through a macro? I would like to add a button to a toolbar to control the enable/disable of these with just one click.

| Visual Studio enable debug exceptions through macro | CC BY-SA 2.5 | 0 | 2010-11-23T22:45:52.203 | 2011-05-02T17:04:59.070 | null | null | 47,226 | [
"visual-studio-2010",
"visual-studio-2008",
"macros",
"visual-studio",
"exception"
] |
4,265,872 | 1 | 4,266,277 | null | 4 | 1,409 | So I'm extremely new to ASP.NET MVC and Interface design. I've been asking a lot of questions and reading a lot of articles trying to make sense of it all. Due to a crisis at work, I have been called upon to do my best and learn this environment. And although it's been frustrating to grasp, I am slowly getting it.
I have created an image in photoshop that shows my basic understanding of how the Repository Pattern works and why it's very much recommended. I'm trying to deploy this pattern at work and I want to make sure I get the major points

I ask you to point out any glaring (not anal or unrelated) mistakes... I hope there aren't any.
| ASP.NET MVC & Repository Pattern Understanding | CC BY-SA 2.5 | 0 | 2010-11-24T10:42:49.140 | 2011-08-31T17:20:27.177 | null | null | 337,806 | [
"asp.net-mvc-2",
"repository-pattern"
] |
4,265,918 | 1 | 4,266,344 | null | 5 | 4,482 | I created a custom control (inherited from UserControl) with some controls in it (label, textbox, slider) and assigned it a supertooltip (from devComponents dotnetbar; same problem with normal; check picture) in Designer.
But the tooltip doesn't come up. On "normal" controls it works, so it's a problem with the custom control.
Any idea what's wrong?
Edit: Here's a sample: [Download](http://www.admirandis.bplaced.net/files/Sample.zip)
While making the sample i think I found the failure. The tooltip comes only up if the mouse hovers the parent. Possible? If yes: Any idea how to fix?

| Tooltip on custom control | CC BY-SA 2.5 | 0 | 2010-11-24T10:47:28.997 | 2015-09-18T16:03:28.767 | 2010-11-24T11:45:46.853 | 7,922 | 3,580,213 | [
"c#",
"winforms",
"user-controls",
"tooltip"
] |
4,266,077 | 1 | null | null | 1 | 503 | 
This is my graph. I capture media from Pinnacle Capture Card into MPEG-2 Encoder, but the output of this graph (test.mpeg) is wrong. The video and audio in this file doesn't match. The video will play faster than audio.
How to capture video from source into several format? (In example, I can see only AVI and ASF)
| Why doesn't capture graph in Directshow work? | CC BY-SA 2.5 | null | 2010-11-24T11:08:48.637 | 2010-11-24T12:46:33.867 | null | null | 484,523 | [
"c++",
"directshow",
"media",
"video-capture",
"directshow.net"
] |
4,266,215 | 1 | 4,266,730 | null | 4 | 5,066 | I'm trying to create a border with rounded corners and a highlight on its top half. I'm using an ellipse with a radial gradient, overlapping the top half of the border, to give the highlight, but I can't figure out how to prevent the ellipse coloring the corners of the border. Here's a screenshot from Kaxaml:

And here's the XAML code:
```
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="DarkGray">
<Grid Width="256" Height="256">
<Border CornerRadius="16" Background="Black" Margin="4">
<Border Background="Gray" Margin="32">
<TextBlock Foreground="Black" Text="1" FontFamily="Trebuchet MS" FontSize="96pt"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</Border>
<Border CornerRadius="16" ClipToBounds="True">
<Ellipse>
<Ellipse.Fill>
<RadialGradientBrush>
<GradientStop Color="White" Offset="0"/>
<GradientStop Color="Transparent" Offset="1"/>
</RadialGradientBrush>
</Ellipse.Fill>
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="3" ScaleY="2" CenterX="128" CenterY="128"/>
<TranslateTransform Y="-235"/>
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
</Border>
<Border CornerRadius="16" BorderThickness="8" BorderBrush="Black"/>
</Grid>
</Page>
```
How can I stop the top corner areas being affected by the ellipse's shading?
I've tried playing around with `OpacityMask`, but I have to confess I don't really understand how to use it, especially with the ellipse being transformed for rendering. Whatever I try, the ellipse either disappears entirely or is completely unaffected.
Any help would be greatly appreciated.
Thanks in advance.
| How to clip rendering to be within a rounded border? | CC BY-SA 2.5 | null | 2010-11-24T11:25:14.610 | 2010-11-24T14:14:21.240 | 2010-11-24T14:00:04.300 | 8,705 | 8,705 | [
"wpf",
"xaml",
"opacity",
"clipping"
] |
4,266,225 | 1 | 4,266,724 | null | 39 | 13,401 | It is most probably a stupid mistake, but can anyone tell me why my icons are showing in Blend, but not in the simulator (and not in VS10, but that's not really an issue)?

- Here is my XAML :
```
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton IconUri="/Images/share.png" Text="Partager"/>
<shell:ApplicationBarIconButton IconUri="/Images/appbar.edit.rest.png" Text="Note"/>
<shell:ApplicationBarIconButton IconUri="/Images/appbar.feature.camera.rest.png" Text="Photos/Vidéos"/>
<shell:ApplicationBarIconButton IconUri="/Images/calendar.png" Text="Rendez-vous"/>
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="MenuItem 1"/>
<shell:ApplicationBarMenuItem Text="MenuItem 2"/>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
```
My four .png files are 48x48, transparent .png with foreground, since the `appbar.*.rest.png` files where like that and found in the Microsoft icons folder
| WP7 Application Bar Icons not showing on Simulator (but works in Blend) | CC BY-SA 3.0 | 0 | 2010-11-24T11:26:36.257 | 2015-03-25T01:40:11.617 | 2015-03-25T01:40:11.617 | 918,624 | 123,011 | [
"c#",
"vb.net",
"xaml",
"windows-phone-7",
"windows-phone-8"
] |
4,266,298 | 1 | null | null | 1 | 152 | Trying to learn TSQL once and for all :P
I'd like to select a list of Productos ordered by Category.
Here is the query I created with your help, but it's still not showing exactly what I'd like:
```
select p.Nombre as Nombre, c.Nombre as Categoria FROM Producto as p
inner join Subcategoria as s ON p.IDSubcategoria = s.ID
inner join Categoria as c on s.IDCategoria = c.ID
group by p.Nombre, c.Nombre
order by p.Nombre
```
Result:

So it would show:
```
Product Name, Product count, that has category X
Product Name, Product count, that has category X
Product Name, Product count, that has category X
Product Name, Product count, that has category X
```
| If I have the following SQL database, how can I get this information? | CC BY-SA 3.0 | null | 2010-11-24T11:35:27.020 | 2012-01-20T22:09:26.470 | 2012-01-20T22:09:26.470 | 529,548 | null | [
"sql-server",
"tsql"
] |
4,266,311 | 1 | 4,267,236 | null | 6 | 9,624 | First, [here](https://stackoverflow.com/questions/4259230/wpf-data-binding-how-to-data-bind-a-collection) is the previous post that deals with the `ListBox` AccountListBox data binding to my `ObservableCollection<Account>` Accounts from the `AccountsCollection.cs` class.
So now I have a binding object AccountsCollection and a DataTemplate named AccountTemplate for my ListBox defined in the resources:
```
<Window.Resources>
<controller:AccountsWindowController x:Key="AccountsCollection" />
<DataTemplate x:Key="AccountTemplate">
<DockPanel>
<Button Name="EditButton"
DockPanel.Dock="Right"
Margin="3 0 3 0"
VerticalAlignment="Center"
Content="Edit" />
<Button Name="DeleteButton"
DockPanel.Dock="Right"
Margin="3 0 3 0"
VerticalAlignment="Center"
Content="Delete" />
<TextBlock Name="AccountName"
VerticalAlignment="Center"
Text="{Binding Name}"
TextWrapping="NoWrap"
TextTrimming="CharacterEllipsis" />
</DockPanel>
</DataTemplate>
<Window.Resources>
```
And here is the code related to the LisBox itself:
```
<ListBox Name="AccountsListBox"
Margin="12,38,12,41"
HorizontalContentAlignment="Stretch"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ItemsSource="{Binding Accounts,
Source={StaticResource ResourceKey=AccountsCollection}}"
ItemTemplate="{StaticResource ResourceKey=AccountTemplate}"
MouseDoubleClick="AccountsListBox_MouseDoubleClick">
</ListBox>
```
I want my list to be designed to group all accounts by starting letter and to show that letter in the list (Also I want to apply some design to that ). The final result should be something like this:

Thanks for all the help!
Here's the code with grouping successfully implemented.
```
<Window x:Class="Gui.Wpf.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:entities="clr-namespace:Entities.Accounts;assembly=Entities"
xmlns:contollers="clr-namespace:Gui.Wpf.Controllers"
xmlns:converters="clr-namespace:Gui.Wpf.Converters"
xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
Title="MainWindow"
Width="525"
Height="350" >
<Window.Resources>
<!-- Main window controller -->
<contollers:MainWindowController
x:Key="MainWindowController" />
<!-- Converter for first letter extraction from the account name -->
<converters:FirstLetterConverter x:Key="FirstLetterConv" />
<!-- View source for the AccountsListBox -->
<CollectionViewSource
x:Key="AccountsView"
Source="{Binding Accounts, Source={StaticResource ResourceKey=MainWindowController}}">
<!-- Sorting -->
<CollectionViewSource.SortDescriptions>
<componentModel:SortDescription PropertyName="AccountName" />
</CollectionViewSource.SortDescriptions>
<!-- Grouping -->
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="AccountName" Converter="{StaticResource ResourceKey=FirstLetterConv}" />
</CollectionViewSource.GroupDescriptions>
</CollectionViewSource>
<!-- Data template for the type Account -->
<DataTemplate
DataType="{x:Type entities:Account}">
<DockPanel>
<Button
Name="DeleteButton"
DockPanel.Dock="Right"
Margin="3, 1, 3, 1"
VerticalAlignment="Center"
Content="Delete" />
<Button
Name="EditButton"
DockPanel.Dock="Right"
Margin="3, 1, 3, 1"
VerticalAlignment="Center"
Content="Edit" />
<TextBlock
Name="AccountNameTextBlock"
VerticalAlignment="Center"
Text="{Binding AccountName}"
TextWrapping="NoWrap"
TextTrimming="CharacterEllipsis" />
</DockPanel>
</DataTemplate>
<!-- Data template for AccountListBox grouping -->
<DataTemplate x:Key="GroupingHeader">
<TextBlock Text="{Binding Path=Name}" Background="Black" Foreground="White" />
</DataTemplate>
</Window.Resources>
<Grid>
<ListBox
Name="AccountsListBox"
Width="300"
Height="200"
HorizontalAlignment="Center"
VerticalAlignment="Center"
ItemsSource="{Binding Source={StaticResource ResourceKey=AccountsView}}"
HorizontalContentAlignment="Stretch" >
<ListBox.GroupStyle>
<GroupStyle
HeaderTemplate="{StaticResource ResourceKey=GroupingHeader}" />
</ListBox.GroupStyle>
</ListBox>
</Grid>
```
| How to group ListBoxItems by first letter in WPF using XAML? | CC BY-SA 2.5 | 0 | 2010-11-24T11:37:30.350 | 2010-11-25T18:24:48.967 | 2017-05-23T12:07:01.127 | -1 | 119,093 | [
"wpf",
"xaml",
"listboxitem",
"itemtemplate"
] |
4,266,656 | 1 | 4,267,351 | null | 29 | 18,526 | Currently working with PHP and iMagick to develop a poster printing Web application.
This is the example image I am using to test upload/image editing features of the application:

The image contains the following EXIF data:
```
[FileName] => 1290599108_IMG_6783.JPG
[FileDateTime] => 1290599109
[FileSize] => 4275563
[FileType] => 2
[MimeType] => image/jpeg
[SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, EXIF, INTEROP, MAKERNOTE
[COMPUTED] => Array
(
[html] => width="3504" height="2336"
[Height] => 2336
[Width] => 3504
[IsColor] => 1
[ByteOrderMotorola] => 0
[CCDWidth] => 22mm
[ApertureFNumber] => f/5.6
[UserComment] =>
[UserCommentEncoding] => UNDEFINED
[Thumbnail.FileType] => 2
[Thumbnail.MimeType] => image/jpeg
)
[Make] => Canon
[Model] => Canon EOS 30D
[Orientation] => 6
[XResolution] => 72/1
[YResolution] => 72/1
[ResolutionUnit] => 2
[DateTime] => 2009:08:31 08:23:49
[YCbCrPositioning] => 2
[Exif_IFD_Pointer] => 196
```
However - iMagick, when __construct'ed with this image, automatically rotates it an additional 90 degrees CCW as per `[Orientation] => 6` (I think!). Resulting in this...

What I'd like to know is...
How can I maintain the original orientation of the image seen at the top of the page? And is this possible through disabling the auto-rotation performed by iMagick?
Many thanks
```
public function fixOrientation() {
$exif = exif_read_data($this->imgSrc);
$orientation = $exif['Orientation'];
switch($orientation) {
case 6: // rotate 90 degrees CW
$this->image->rotateimage("#FFF", 90);
break;
case 8: // rotate 90 degrees CCW
$this->image->rotateimage("#FFF", -90);
break;
}
}
```
| How to stop PHP iMagick auto-rotating images based on EXIF 'orientation' data | CC BY-SA 2.5 | 0 | 2010-11-24T12:17:35.097 | 2020-01-16T17:46:55.533 | 2010-11-26T10:44:01.423 | 484,099 | 484,099 | [
"php",
"image",
"web-applications",
"exif",
"imagick"
] |
4,266,813 | 1 | null | null | 0 | 430 | In managed Exchange Web Services there is a class [PostItem](http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.postitem_members(v=EXCHG.80).aspx), which can be instantiate with ExchangeService object.
But after assigning all properties including with and From, and calling Save(folderId) method:
```
PostItem newPost = new PostItem(mService);
newPost.InReplyTo = originalPost.Id.UniqueId;
newPost.From = new EmailAddress( "Max Gontar", "[email protected]" );
newPost.Subject = msg.Subj;
newPost.Body = msg.TextBody;
newPost.Save(mCurrentFolderId);
```
It still creates a separate Post, not a Reply Post:
Other way I have tried:
```
PostReply reply = originalPost.CreatePostReply();
reply.Subject = msg.Subj;
reply.Body = msg.TextBody;
reply.Save( currentFolder.Id )
```
There is no way to set From property, so it should create Post Reply with current credentials Contact email address.

Can you help me?
Thank you!
| Managed EWS - Reply Post with alternative From property | CC BY-SA 2.5 | null | 2010-11-24T12:34:04.983 | 2010-12-08T16:55:18.173 | 2010-11-25T23:59:48.253 | 151,249 | 67,407 | [
"exchange-server",
"exchangewebservices",
"ews-managed-api",
"public-folders"
] |
4,267,051 | 1 | null | null | 120 | 328,690 | I'm getting this error when I try to start a windows service I've created in C#:

My Code so far:
```
private ServiceHost host = null;
public RightAccessHost()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
host = new ServiceHost(typeof(RightAccessWcf));
host.Open();
}
protected override void OnStop()
{
if (host != null)
host.Close();
host = null;
}
```
## Update #1
I solved the issue above by granting permissions to the account but now I have an another problem:

## Update #2
> Service cannot be started. System.InvalidOperationException: Service 'RightAccessManagementWcf.RightAccessWcf' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.
at System.ServiceModel.Description.DispatcherBuilder.EnsureThereAreNonMexEndpoints(ServiceDescription description)
at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost)
at System.ServiceModel.ServiceHostBase.InitializeRuntime()
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at RightAccessHosting.RightAccessHost.OnStart(String[] args) in C:\Users....
| Error 5 : Access Denied when starting windows service | CC BY-SA 3.0 | 0 | 2010-11-24T13:00:37.530 | 2021-09-13T10:45:09.667 | 2016-07-15T14:25:51.913 | 3,336,376 | 118,584 | [
"c#",
".net",
"wcf",
"windows-services"
] |
4,267,090 | 1 | 4,268,216 | null | 0 | 1,872 | In the Magento default theme's page we see the following totals box towards the right mid of the screen:

My Problem is to show the Tax and Grand Total Including tax fields to appear in the cart, because the tax is calculated once we know the shipping address. So, we want to show it only in the under . However, when overriding the template/ file mentioned above, also modifies the field in , so that it looks like this:

and onepage checkout order review screen like

which means that these fields are being controlled from one set of file(s). However, I want these two (totals box in cart AND order review in checkout) to be different.
By turning on the template path hints I know that the child templates for each of subtotal, tax, total... are being called from:
> Cart: /checkout/cart.phtmlCheckout (One page): /checkout/onepage/review/info.phtml
Both of these have this common line, which I believe does the trick
>
Can someone help me in knowing how does getChildHtml looks up the 'totals' file. I am confused because there is a totals.phtml in checkout/onepage/review folder, while both of them are actually using template files in /tax/checkout
I am using Magento 1.4.1.1 and background to this question is [a previous question](https://stackoverflow.com/questions/4242962/magento-modify-labels-for-cart-and-checkout-order-review-screens)
| Magento - Have different set of fields and labels for cart and checkout (order review) screens | CC BY-SA 2.5 | null | 2010-11-24T13:05:02.587 | 2010-11-25T08:15:11.320 | 2017-05-23T10:32:35.693 | -1 | 365,188 | [
"magento",
"e-commerce"
] |
4,267,174 | 1 | null | null | 2 | 39 | I have a website has already hosted on EasyCgi (suppose that it's called website1).
I have to host another one (website2). So I created a folder called "website2" under the website1 root folder. then I FTP all the content of website2 to the "website2" folder.
After that, I tried to request the URL: and nothing happen...
Just an error page display that contains:

Any help appreciated.
| Could I host a website under an old one? | CC BY-SA 2.5 | null | 2010-11-24T13:15:30.687 | 2010-11-24T13:25:33.293 | null | null | 355,328 | [
"asp.net",
"sql-server",
"vb.net",
"shared-hosting"
] |
4,267,822 | 1 | 4,268,218 | null | 2 | 4,343 | I have a combobox that is bound to a dataset that then uses a datatrigger to insert a separator when it encounters a '-' in the data (example [in this question)](https://stackoverflow.com/questions/4261208/disable-separator-selection-in-data-bound-combo-box-in-wpf).
The background of the menu has custom color, set by using a resource dictionary. The color in this case is #FFF8F4C5
If I add a separator to a non databound simple combo box, it appears correctly. But when adding it using the datatrigger, it does not look like the rest of the menu, as you can see below (it has a white background).

If I set the background of the separator, it actually changes the darker line to whatever color. I can't seem to find how to change the white area to match the same color as the menu.
| Changing background color of a separator in WPF data bound combo box | CC BY-SA 2.5 | null | 2010-11-24T14:23:04.220 | 2010-11-24T15:10:02.663 | 2017-05-23T12:07:06.850 | -1 | 159,699 | [
"wpf",
"xaml",
"separator",
"databound"
] |
4,268,262 | 1 | 4,268,351 | null | 5 | 15,722 | I'm trying to figure out a formula on how to calculate the size of a distant object at a viewing pane closer to me. I'm sure I had this in high school, but I couldn't find any resources on what the correct calculation is.
I found the following page explaining the correct way to DRAW such a thing, but I don't see a fomula (e.g. size of object, distance): [Calculating diminishing size in perspective](http://studiochalkboard.evansville.edu/lp-diminish.html).
I also know I can calculate the angle of view, like shown in this [angular size calculator](http://www.1728.com/angsize.htm) - however this assumes a triangle, not a rectangle.
Pictures are worth more than words, behold for my drawing skills:

Explanation: How would I go about and calculate the size of the target, when looked at from the viewing pane (marked red). When you look through the scope, the target sure looks a lot smaller - how much smaller in terms of size/relation?!
Is it as simple as dividing 30cm/1000cm to know the size of the target at a distance of 10m? Don't I have to do some sin/cos kung-fu? What about the scope of 2cm, assuming it is my entire field of view - it surely must go somewhere in the equation.
I'm not trying to reinvent the wheel here and all ego shooter do this already automatically, but I just can't figure out a reference to the correct formula, some pointers? , either in numbers (5mm) or in numbers assuming the scope is 100% of the field of view, the target will take up 1/10th of the scope's field of view.
| Calculating diminishing size in perspective | CC BY-SA 2.5 | 0 | 2010-11-24T15:09:54.073 | 2014-02-27T16:30:36.277 | 2014-02-27T16:30:36.277 | 914 | 266,453 | [
"language-agnostic",
"size",
"perspective"
] |
4,268,362 | 1 | null | null | 1 | 1,235 | I am currently working on an IT helpdesk application (MANAGE ENGINE) which uses a SQL Server 2005 backend; I would like to dynamically produce data with a chart. How do I create a chart in Qlikview with the two (2) columns in my SELECT statement as the X and Y axes?
Anytime I try creating charts, it automatically gives 3 options (sum, average or count). Can it just pick the values from the fields directly without doing any calculation on it?
Please find attached an example of the sheet I am interested in building.
Many thanks for your audience.
Kind Regards,
Tunde

| Reporting data into Qlikview dynamically from SQL Server 2005 | CC BY-SA 2.5 | null | 2010-11-24T15:18:28.553 | 2011-02-24T09:38:36.907 | null | null | 197,945 | [
"sql-server-2005",
"qlikview"
] |
4,268,427 | 1 | 4,268,645 | null | 2 | 5,460 | I'm trying to align an input button with a link (class "button"), but in Safari and Chrome there is like 1 pixel difference at the top and I can't figure out why.

```
<input class="button" name="commit" type="submit" value="Enrol" />
<a href="#" class="button" id="cancel">Cancel</a>
input.button {
height: 38px;
font-size: 18px;
color: white;
font-weight: normal;
font-style: normal;
background: #4D28B2;
border: 1px solid gray;
padding: 5px;
}
a.button {
display: inline-block;
padding: 5px;
height: 24px;
font-size: 18px;
color: white;
text-decoration: none;
font-weight: normal;
font-style: normal;
text-align: left;
background-color: #4D28B2;
border: 1px solid gray;
}
```
What's the problem and how can I solve it?
| How to align HTML buttons with links? | CC BY-SA 2.5 | 0 | 2010-11-24T15:24:01.473 | 2010-11-24T15:48:13.977 | 2010-11-24T15:39:08.590 | 459,329 | 459,329 | [
"html",
"css"
] |
4,268,745 | 1 | 4,269,082 | null | 11 | 1,435 | I converted a Subversion repository to Mercurial, using the Convert extension. When I look at the new repository with Tortoise HG, I see in each changeset the corresponding source path and revision (see image). 
Is there a way to write those two out to the console? Ideally I'd like an output like this:
```
hg:1147 svn:trunk@7201
hg:1146 svn:trunk@7200
...
```
I know that I can use `hg log` with the template option to customize the output, but don't know how to get the Subversion source path/revision.
It looks like the way I wanted to go is not possible. The svn source path/revision is in a field called `extras` within the changeset (thanks @Ry4en) and neither `hg log` nor `hg export` output this value. What I will try now is to use the file `.hg/shamap` in combination with
```
hg log --template 'hg:{rev} nodeid:{node}'
```
To map the Mercurial revision to the SVN source path/revision.
My Mercurial version is 1.4.3.
With Mercurial 1.7.1 it's possible to use this command (thanks @ Wim Coenen): `hg log --template {node}\n{extras}\n\n`
| SVN to HG: Now output SVN revision number from HG changeset | CC BY-SA 2.5 | 0 | 2010-11-24T15:56:53.143 | 2010-12-02T20:00:17.113 | 2010-12-02T20:00:17.113 | 29,694 | 29,694 | [
"svn",
"mercurial"
] |
4,268,943 | 1 | 4,270,600 | null | 0 | 91 | ```
create procedure sp_DescuentoCategoriaInvierno
as
declare @IDProductoOfertado int, @ProductoNombre nvarchar(256), @CategoriaNombre nvarchar(256), @SubcategoriaNombre nvarchar(256), @Precio float
declare cursorProducto cursor for
select o.IDProducto, p.Nombre, c.Nombre, s.Nombre, o.Precio from OfertaProducto as o
inner join Producto as p on o.IDProducto = p.ID
inner join Subcategoria as s on p.IDSubcategoria = s.ID
inner join Categoria as c on s.IDCategoria = c.ID
order by p.Nombre
open cursorProducto
fetch next from cursorProducto into @IDProductoOfertado, @ProductoNombre, @CategoriaNombre, @SubcategoriaNombre, @Precio
while @@FETCH_STATUS = 0
begin
if(@CategoriaNombre='Invierno')
begin
select @Precio --TROUBLE IS HERE.
from OfertaProducto --WHAT SHOULD I DO?
update OfertaProducto set Precio = @Precio * 0.5
end
fetch next from cursorProducto into @IDProductoOfertado, @ProductoNombre, @CategoriaNombre, @SubcategoriaNombre, @Precio
end
close cursorProducto
deallocate cursorProducto
```
This one is simple enough, I'm just trying to have every OferredProduct in my dabase that has a Category of 'invierno' have a reduced price:
Here's the model:

So what I'd like it to iterate through each OfferedProduct, if it has a category of 'Invierno' reduce the price of it to 50%. I'm missing something small I'm sure. :P
Thanks!
| Trouble with this simple stored procedure | CC BY-SA 2.5 | null | 2010-11-24T16:15:07.170 | 2010-11-24T19:13:48.250 | null | null | null | [
"sql-server",
"tsql"
] |
4,269,439 | 1 | null | null | 6 | 4,172 | Is there a .NET based (WinForm or WPF) control that allows simple visual programming (assignments, boolean expressions, and math expressions)? Something like [Microsoft VPL](http://msdn.microsoft.com/en-us/library/bb483088.aspx), only embeddable and supported.

| Visual Programming Language Control | CC BY-SA 2.5 | 0 | 2010-11-24T17:01:38.567 | 2015-08-14T11:14:48.373 | null | null | 632 | [
"c#",
".net",
"simulation",
"visual-programming"
] |
4,269,540 | 1 | 4,270,204 | null | 2 | 9,505 | I have a JLayeredPane, and inside the JLayeredPane is a JInternalFrame. What I need are the bounds (x position, y position, width, height) of the content pane in the JInternalFrame. The bounds need to be in relation to the JLayeredPane. My problem is the borders, title bar, and I'm not sure what else of the JInternalFrame are messing with my calculation. It's a few pixels off.
Here is how I try to calculate it. This code is in the JInternalFrame:
```
Rectangle area = new Rectangle(
getX() + 2, //The x coordinate of the JInternalFrame + 2 for the border
getY() + ((javax.swing.plaf.basic.BasicInternalFrameUI) getUI()).getNorthPane().getHeight(), //The Y position of the JinternalFrame + theheight of the title bar of the JInternalFrame
getContentPane().getWidth() - 2, //The width of the Jinternals content pane - the border of the frame
getContentPane().getHeight() //the height of the JinternalFrames content pane
);
```
I need to get the location of the content pane of the internal frame.

| Getting coordinates of a component in java | CC BY-SA 2.5 | null | 2010-11-24T17:14:43.347 | 2010-11-24T18:21:56.390 | 2010-11-24T17:31:57.570 | 82,118 | 489,041 | [
"java",
"swing",
"coordinates"
] |
4,269,591 | 1 | 4,271,117 | null | 1 | 8,983 | i have a 7x6 grid.here i have to populate the calendar for the selected month.
i have date,month and year.with the help of these value is it possible to populate my grid view with the help of any algorithm? same like this
| how to populate a gridview for a calendar? | CC BY-SA 2.5 | 0 | 2010-11-24T17:20:55.860 | 2010-12-14T09:13:59.223 | null | null | 430,652 | [
"android",
"algorithm",
"gridview",
"calendar",
"populate"
] |
4,269,714 | 1 | 4,269,835 | null | 0 | 3,034 | I have a menu:
```
<ul>
<li>Tab 01</li>
<li>Tab 02</li>
<li>Tab 03</li>
<li>Tab 04</li>
</ul>
```
I want to put as many tabs as I need, and I want to keep them on the same line. I want to create a control to slide the tabs:
 Right arrow click
 Left arrow click
What do I have to do on CSS to get this behavior? All elements on the same line regardless of the number of elements...
[An example of my problem on jsFiddle](http://jsfiddle.net/HrffC/)
| How to put unlimited number of elements on the same line? | CC BY-SA 2.5 | null | 2010-11-24T17:32:10.450 | 2015-03-16T09:53:23.527 | 2010-11-24T17:48:07.270 | 340,760 | 340,760 | [
"html",
"css"
] |
4,270,271 | 1 | 4,270,315 | null | 3 | 1,837 | In my web.config I have:
```
<sessionState configSource="SessionState.config">
</sessionState>
```
In SessionState.config I have:
```
<sessionState timeout="90" mode="SQLServer" allowCustomSqlDatabase="true" cookieless="false" sqlConnectionString="Data Source=.;Persist Security Info=True;Integrated Security=True">
</sessionState>
```
I've tried various incantations but can't seem to get it to work. I get this error:
> Parser Error Message: Unable to open
configSource file
'SessionState.config'.
From MSDN:

Of course they don't show an actual example.
I verified that the file is in the bin directory. I also have this working fine for the connection strings section.
How do I use a remote config file for sessionState?
Thanks,
Rick
| Configuring SessionState with remote configSource file | CC BY-SA 2.5 | null | 2010-11-24T18:31:52.987 | 2010-11-24T18:50:49.420 | null | null | 131,818 | [
"asp.net",
"session-state",
"sql-session-state"
] |
4,270,424 | 1 | 4,270,506 | null | 0 | 1,763 | I have the following chart for displaying "virtual money" in a weekly game tournament (player money is dark blue, compared to best player money values in light blue):

[http://chart.apis.google.com/chart?chs=700x280&cht=bvo&chco=4D89F9,C6D9FD&chd=t:713,-647,-1202,-1830|3927,6133,8053,2576&chxl=0:|2010-44|2010-45|2010-46|2010-47&chxt=x,y&chxr=1,-1830,8053&chds=-1830,8053&chbh=140&chm=N,,0,,12|N,,1,,12](http://chart.apis.google.com/chart?chs=700x280&cht=bvo&chco=4D89F9,C6D9FD&chd=t:713,-647,-1202,-1830|3927,6133,8053,2576&chxl=0:|2010-44|2010-45|2010-46|2010-47&chxt=x,y&chxr=1,-1830,8053&chds=-1830,8053&chbh=140&chm=N,,0,,12|N,,1,,12)
1) Is there please a way to the X-axis up a bit,
so that the negative dark blue bars appear below it?
2) Is there a way to append a "$" to the values (instead of prepending with )?
3) Is there a way to paint values red? Can't find this in [the doc](http://code.google.com/apis/chart/docs/gallery/bar_charts.html), I only see how to make them all red with
Thank you!
Alex
| Google bar chart: moving zero axis up, painting negative valuse red | CC BY-SA 2.5 | 0 | 2010-11-24T18:53:40.143 | 2012-03-21T03:01:11.463 | null | null | 165,071 | [
"google-visualization"
] |
4,270,541 | 1 | 4,271,059 | null | 12 | 11,149 | I have a theoretical grid of overlapping rectangles that might look something like this:

But all I have to work with is a collection of Rectangle objects:
```
var shapes = new List<Rectangle>();
shapes.Add(new Rectangle(10, 10, 580, 380));
shapes.Add(new Rectangle(15, 20, 555, 100));
shapes.Add(new Rectangle(35, 50, 40, 75));
// ...
```
What I'd like to do is build a DOM-like structure where each rectangle has a ChildRectangles property, which contains the rectangles that are contained within it on the grid.
The end result should allow me to convert such a structure into XML, something along the lines of:
```
<grid>
<shape rectangle="10, 10, 580, 380">
<shape rectangle="5, 10, 555, 100">
<shape rectangle="20, 30, 40, 75"/>
</shape>
</shape>
<shape rectangle="etc..."/>
</grid>
```
But it's mainly that DOM-like structure in memory that I want, the output XML is just an example of how I might use such a structure.
The bit I'm stuck on is how to efficiently determine which rectangles belong in which.
No rectangles are partially contained within another, they're always completely inside another.
There will typically be hundreds of rectangles, should I just iterate through every rectangle to see if it's contained by another?
Someone has suggested Contains (not my finest moment, missing that!), but I'm not sure how best to build the DOM. For example, take the grandchild of the first rectangle, the parent does indeed contain the grandchild, but it shouldn't be a direct child, it should be the child of the parent's first child.
| How can I determine if one rectangle is completely contained within another? | CC BY-SA 2.5 | 0 | 2010-11-24T19:06:42.290 | 2017-01-30T07:34:46.973 | 2010-11-24T19:22:29.997 | 40,050 | 40,050 | [
"c#",
".net",
"geometry"
] |
4,270,780 | 1 | 4,270,804 | null | 2 | 2,998 | For a class exercise on [game trees](http://en.wikipedia.org/wiki/Game_tree), I have to write code that works with a file. I haven't used Java in this way before. My Eclipse project tree looks like this:

To run the code, I was told to do this on the command line:
> java -jar VierOpEenRij.jar Mens spel.speler.Random 5 5
How do I debug this code? I have tried tinkering with Eclipse's debug configurations and I also tried executing `jdb -jar VierOpEenRij.jar Mens spel.speler.Random 5 5` but I can't figure out a way to start the debugger.
How do I debug my code when a file contains the main method?
| Debugging Java projects where a .jar file contains the main method | CC BY-SA 2.5 | 0 | 2010-11-24T19:35:33.503 | 2015-05-26T17:07:17.990 | null | null | 217,649 | [
"java",
"eclipse",
"debugging",
"jdb"
] |
4,271,241 | 1 | 4,774,131 | null | 5 | 275 | I am designing an autosuggest feature on a quick-search box. Suggestions will include small icons, multiline text, etc. The application is handling orders. The search field will recognize a variety of different meaningful terms - e.g. customer surname, order id, etc. But when an order ID is input, I want users to get an opportunity to view either the order, or the person. I was thinking that I would like a hierarchy within the list - so if i type 1234, and it matches 5 orders for 3 different people, the 3 people are returned at the top level, and their 5 orders underneath the respective customer.
Quick mockup:

Has anyone seen something like this implemented elsewhere? Don't want to re-invent the wheel. Also interested in any other feedback.
| Hierarchical Autosuggest | CC BY-SA 2.5 | 0 | 2010-11-24T20:29:42.857 | 2011-01-23T13:43:16.963 | null | null | 225,253 | [
"search",
"user-experience",
"autosuggest"
] |
4,271,390 | 1 | null | null | 14 | 25,354 | I'm wondering why google charts add a blank padding when not specifying the top/right/left axises.

Select the image and you'll find a huge padding except the bottom which is already filled & that's why, how to remove that?
Specifically, Talking about the right and left paddings.
Thank you.
| Remove padding in google chart? | CC BY-SA 2.5 | 0 | 2010-11-24T20:47:33.907 | 2019-01-18T17:51:44.580 | 2010-12-10T23:32:28.157 | 241,654 | 241,654 | [
"charts",
"google-visualization"
] |
4,271,452 | 1 | 4,271,497 | null | 2 | 1,693 | I have seen some applications having such a rich layout that a person starts hating desktop applications like traditional c#.I was wondering how to make applications having GUI like this is it possible to make it in c#? 
| In what language these are made | CC BY-SA 2.5 | null | 2010-11-24T20:53:17.670 | 2010-11-24T21:03:05.283 | 2010-11-24T21:00:47.017 | 41,153 | 430,167 | [
"c#",
"wpf",
"user-interface",
"desktop-application"
] |
4,271,521 | 1 | 4,271,609 | null | 4 | 1,405 | I have seen some questions related to topic, but could not find answer for this scenario.
I have structure like

Part of my controller
```
//
// GET: /Person/Edit/5
public ActionResult Edit(int id)
{
var viewModel = new PersonViewModel(PersonRepository.Get(id));
return View(model);
}
//
// POST: /Person/Edit
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(PersonViewModel model)
{
PersonRepository.Update(model.Person, model.Phones);
return RedirectToAction("Index");
}
```
In my repository im doing something like this:
```
public void Update(Person person, ICollection<Phone> phones)
{
using (var unitOfWork = UnitOfWork.Current)
{
Attach(contact);
UpdatePhones(contact, phones);
unitOfWork.Commit();
}
}
public Person Attach(Person person)
{
Context.AttachTo("Persons", entity);
Context.ObjectStateManager.ChangeObjectState(entity, EntityState.Modified);
return entity;
}
public void UpdatePhones(Person person, ICollection<Phone> phones)
{
if (phones == null || phones.Count == 0) return;
foreach (var phone in phones.Where(o => o.IsDeleted && !o.IsNew))
{
PhoneRepository.Delete(phone);
}
foreach (var phone in phones.Where(o => !o.IsDeleted && o.IsNew))
{
party.Phones.Add(phone);
}
foreach (var phone in phones.Where(o => !o.IsDeleted && !o.IsNew))
{
phone.PartyID = party.ID;
PhoneRepository.Attach(phone);
}
}
```
IsDeleted and IsNew are not persisted into db and used in dynamic form. PhonesRepository Attach() is same.
Im doing all of my updates like this because i need to reduce number of db calls as much as possible. Maybe there is a known best practice for this?
Thanks=)
| Best practice for updating related entities in ASP.NET MVC + EF4 without loading entity first | CC BY-SA 2.5 | 0 | 2010-11-24T21:02:12.727 | 2010-11-24T21:17:40.547 | null | null | 157,794 | [
".net",
"asp.net-mvc",
"asp.net-mvc-2",
"orm",
"entity-framework-4"
] |
4,271,679 | 1 | 4,274,975 | null | 8 | 1,597 | I'm hoping to create a custom panel or control that creates a very particular type of item.
Basically, the intent is to have a control that you can give a list of objects to, and it will put each of those objects into a button. The catch is that the buttons should be laid out in a circle like a doughnut. Similar to the image below.

But now imagine, if you can, that each of those colored sections was a button. They would have all of the functionality of buttons too, like mouseovers and events.
So, the brunt of the question is:
What sort of techniques should I be looking at to create this kind of control?
Is there a way to do some sort of "curvature" transform on a button?
It really seems like I'm looking for two separate things here, right?
I mean, I could put each item in the list into an ItemsControl that had a button as its ItemTemplate. So all I would need is two things:
The first of which is a radial layout Panel (I've seen a few of those around).
The second of which is a way to have each button have some sort of rotation and curvature transform.
Any ideas?
| WPF Custom Panel/Control Creation -- "The Doughnut" | CC BY-SA 2.5 | 0 | 2010-11-24T21:24:35.523 | 2011-09-28T00:34:55.637 | null | null | 177,547 | [
"wpf",
"panel",
"itemscontrol",
"radial"
] |
4,272,004 | 1 | 4,304,067 | null | 1 | 500 | I have a partial view which contains a form, and this partial view exists in a view which contain some other forms and html.
When I press submit and the validation fails, it show this partial view form action in the URL instead of the original URL.
Parent View "User Account":
- Login partial view
- Register partial view
Original URL when the page open is: / users/account
URL when register validation fail become: /users/register
Here is my partial view:
```
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PicGhost.Website.ViewModels.RegisterViewModel>" %>
<% using (Html.BeginForm("Register", "Users", FormMethod.Post)) {%>
<%: Html.ValidationSummary(true) %>
<fieldset>
<legend>Fields</legend>
<div class="editor-label">
<%: Html.LabelFor(model => model.UserName) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(model => model.UserName) %>
<%: Html.ValidationMessageFor(model => model.UserName) %>
</div>
<div class="editor-label">
<%: Html.LabelFor(model => model.Email) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(model => model.Email) %>
<%: Html.ValidationMessageFor(model => model.Email) %>
</div>
<div class="editor-label">
<%: Html.LabelFor(model => model.Password) %>
</div>
<div class="editor-field">
<%: Html.PasswordFor(model => model.Password)%>
<%: Html.ValidationMessageFor(model => model.Password) %>
</div>
<div class="editor-label">
<%: Html.LabelFor(model => model.ConfirmPassword) %>
</div>
<div class="editor-field">
<%: Html.PasswordFor(model => model.ConfirmPassword) %>
<%: Html.ValidationMessageFor(model => model.ConfirmPassword) %>
</div>
<p>
<input type="submit" value="Register" />
</p>
</fieldset>
<% } %>
```
And register action:
```
[HttpPost]
public ActionResult Register(RegisterViewModel model)
{
if (ModelState.IsValid)
{
IUser user = _factory.CreateUser(model.UserName, model.Email, model.Password);
UserRepository.Add(user);
return RedirectToAction("Index");
}
return View(model);
}
```
How to avoid showing this wrong URl and keep the original URL?
Original URL:

After validation URL:

| Partial view Shows its action in the URL instead of the container view action | CC BY-SA 2.5 | null | 2010-11-24T22:12:43.370 | 2010-11-29T13:13:18.737 | 2010-11-26T13:03:07.770 | 20,126 | 20,126 | [
"c#",
"asp.net-mvc-2",
".net-4.0",
"partial-views"
] |
4,272,694 | 1 | 4,389,936 | null | 12 | 3,554 | I have two circles which move around the screen. The circles are both UIViews which contain other UIViews. The area outside each circle is transparent.
I have written a function to create a CGPath which connects the two circles with a quadrilateral shape. I fill this path in a transparent CALayer which spans the entire screen. Since the layer is behind the two circular UIViews, it appears to connect them.
Finally, the two UIViews are animated using Core Animation. The of both circles change during this animation.

So far the only method that I have had any success with is to interrupt the animation at regular intervals using an NSTimer, then recompute and draw the beam based on the location of the circle's presentationLayer. However, the quadrilateral the circles when the animation speeds up.
Is there a better way to accomplish this using Core Animation? Or should I avoid Core Animation and implement my own animation using an NSTimer?
| Tracking a Core Animation animation | CC BY-SA 2.5 | 0 | 2010-11-25T00:12:28.053 | 2015-09-08T00:54:45.600 | 2010-11-29T18:47:44.870 | 18,091 | 18,091 | [
"cocoa-touch",
"core-animation"
] |
4,273,055 | 1 | 4,275,074 | null | 0 | 651 | I have one Map on my main activity and It works fine. Recently I added another small map view on one of my sub activities using the same google map key. Now when I press back after looking at the map on sub activity, it returns to the main view and bottom of the map on main activity turns black. See the attached image. 
Is there anyone who has faced this problem and know why sometimes bottom of map turns balck?
| Android: Bottom of Google Maps gets black inside the application | CC BY-SA 2.5 | null | 2010-11-25T01:34:51.207 | 2010-11-25T08:36:55.390 | null | null | 343,679 | [
"android",
"google-maps"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.