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,170,178 | 1 | 4,170,284 | null | 1 | 2,158 | I am creating a document in LateX and the following multivalued function has been giving me trouble for a while.

The Latex code for the above as I gave is
```
$\[delta \tau_{i,j}^{k}$ = $\left\{$
\begin{array}{l l}
\frac{1}{L_{k}} & \quad \mbox{if ant k travels on edge \textit{i,j}} \\
0 & \quad \mbox{otherwise}
\end{array} \right. \]
```
While compiling it gives me the following error
```
! LaTeX Error: Bad math environment delimiter.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.52 $\[
delta \tau_{i,j}^{k}$ = $\left\{$
?
```
Any help on fixing this error would be much appreciated.
| Error while writing multi-valued function in LateX | CC BY-SA 2.5 | null | 2010-11-13T00:24:41.933 | 2010-11-13T00:53:26.507 | null | null | 383,439 | [
"latex",
"document",
"mathematical-typesetting"
] |
4,170,578 | 1 | null | null | 1 | 663 | I recently started learning C++ and I installed Netbeans IDE 6.9.1 and also the Cygwin compiler packages and configured them, and added Cygwin to my environment variable PATH like the instructions told me to.
I wrote a basic "Hello World" program and when I press Ctrl+F5 to "Debug Main Project" it seems to build fine but the black console/command prompt window flashes then disappears.
Then when I go to Run > Run Main Project, it builds and then a command prompt window pops up with the directory to "sh.exe" in its title.
I took a screenshot of the error message:

Does anyone know why this is happening and why I can't get the program to run properly even in debug?
Notice that in the screenshot I switched over to the MinGW tools because I thought maybe Cygwin was the problem, but the same error still occurs.
Any help would be greatly appreciated. Thank you.
| Error in basic C++ program running in Netbeans IDE with Cygwin | CC BY-SA 3.0 | null | 2010-11-13T02:14:23.677 | 2011-12-04T00:41:47.340 | 2011-12-04T00:41:47.340 | 84,042 | 506,427 | [
"c++",
"netbeans",
"console",
"cygwin"
] |
4,170,976 | 1 | 4,171,042 | null | 0 | 95 | 
What's the UI element that is top of that number buttons to display number ? (which is in light blue color)
| What's this UI element? | CC BY-SA 3.0 | null | 2010-11-13T04:28:57.380 | 2013-12-18T16:58:43.970 | 2013-12-18T16:58:43.970 | 759,866 | 450,048 | [
"iphone"
] |
4,171,174 | 1 | null | null | 0 | 757 | I have a factorial code
```
class FactorialTest {
public static void main(String args[]){
System.out.println(factorial(10));
}
public static int factorial(int N){
if (N <= 1) return 1;
return N*factorial(N-1);
}
}
```
It was traced using [Trace](http://download.oracle.com/javase/1.5.0/docs/guide/jpda/trace.html), and this is the output:

Does that mean that recursion part always done first, and the multipication is later?
| Tracing order of execution in Java | CC BY-SA 2.5 | null | 2010-11-13T05:48:38.053 | 2010-11-13T06:01:20.643 | null | null | 132,127 | [
"java",
"recursion",
"trace"
] |
4,171,664 | 1 | 4,171,680 | null | 155 | 145,356 | I'd like to create an HTML form submit button with the `'add tag'`, however, the web page is in Swedish, so I'd like to have a different .
That is, I want to have a button like

but I want to have my code like
```
if (request.getParameter(cmd).equals("add tag"))
tags.addTag( /*...*/ );
```
| HTML Submit-button: Different value / button-text? | CC BY-SA 3.0 | 0 | 2010-11-13T08:35:01.257 | 2015-07-14T09:37:02.737 | 2015-07-14T09:37:02.737 | 276,052 | 276,052 | [
"html",
"forms"
] |
4,171,834 | 1 | 4,194,161 | null | 0 | 888 | In my iphone app i have implemented the SearchBar on TableView.
Now the SearchBar Searches the items but the searched items are not shown in the tableview as the NSMutableArray which fills up the table with the search results is not retaining the values.
I have put the screenshot of the code and the NSLog statements for the count of copyListOfItems always return 0 even though the NSLog(@"%@",sTemp); shows the searched items in Console.
I have created the property for the NSMutableArray copyListOfItems and also synthesized it but its count in the Console is always shown as Zero.
```
searchArray = [Food mutableCopy];
for (NSString *sTemp in searchArray)
{
NSLog(@"Value: %@",NSStringFromClass([sTemp class]));
NSRange titleResultsRange = [sTemp rangeOfString:searchText options:NSCaseInsensitiveSearch];
if (titleResultsRange.length > 0)
{
NSLog(@"sTemp is:%@",sTemp);
NSLog(@" is:%@",sTemp);
[copyListOfItems addObject:sTemp];
[copyListOfItems retain];
}
NSLog(@"Copy list count in Search Delegate Method inside For : %d",[copyListOfItems count]);
}
NSLog(@"Copy list count in Search Delegate Method : %d",[copyListOfItems count]);
[searchArray release];
searchArray = nil;
searching = YES;
[self.table reloadData];
```
de:

What should I do?
Please Help
Please Suggest
Thanks
| NSMutableArray not retaining the value even after setting the property | CC BY-SA 2.5 | 0 | 2010-11-13T09:25:37.063 | 2010-11-16T12:36:38.107 | 2010-11-13T09:46:24.917 | 463,857 | 463,857 | [
"iphone",
"objective-c",
"cocoa-touch",
"ios4",
"uisearchbar"
] |
4,172,183 | 1 | 4,172,200 | null | 0 | 207 | I am implementing search page in php.
I need to show the results like the following image

how can i achieve this kind of designing using css. I want it a fluid design using percentages with an addition i.e alternate row color changed.
Also let me know how can i limit a column to have not more than say 50 words. full detail will be available through a hyperlink on each row.
| tableless search results | CC BY-SA 2.5 | null | 2010-11-13T11:04:35.500 | 2010-11-13T11:23:32.977 | null | null | 356,188 | [
"php",
"css"
] |
4,172,246 | 1 | 4,172,431 | null | 16 | 49,686 | I'm trying to draw a grid on a `<canvas>` element with the ultimate goal of making a [Go board](http://upload.wikimedia.org/wikipedia/commons/d/df/Go_game_example.png).
For some reason the grid is looking stretched, with the lines being thicker than 1 pixel and the spacing being completely wrong. It doesn't even start in the `(10,10)` position..
It would be great if someone could take a look at tell me what I'm doing wrong.
## http://jsfiddle.net/h2yJn/

| Grid drawn using a <canvas> element looking stretched | CC BY-SA 3.0 | 0 | 2010-11-13T11:17:34.070 | 2019-01-14T05:40:31.807 | 2017-05-26T16:20:41.020 | 311,220 | 311,220 | [
"javascript",
"jquery",
"html",
"canvas",
"grid"
] |
4,172,317 | 1 | 4,175,030 | null | 7 | 3,910 | when adding a new record like this
```
ContentContacts c2 = new ContentContacts();
c2.updated_user = c2.created_user = loggedUserId;
c2.created_date = c2.updated_date = DateTime.UtcNow;
db.ContentContacts.AddObject(c2);
```
I'm getting
> Cannot insert the value NULL into column 'main_email_support', table 'SQL2008R2.dbo.ContentContacts'; column does not allow nulls. INSERT fails. The statement has been terminated.
but the default value in the database is an empty string like:

why am I getting such error? shouldn't the EF says something like:
> "ohh, it's a `null`value, so let's add the column default value instead"
| How to insert DB Default values under EF? | CC BY-SA 2.5 | 0 | 2010-11-13T11:35:43.750 | 2016-02-13T14:23:01.167 | 2010-11-13T14:23:46.297 | 28,004 | 28,004 | [
"entity-framework"
] |
4,172,650 | 1 | 4,175,219 | null | 5 | 6,903 | I've been following the polls tutorial up until the point where I should have a login page for the admin backend. [http://docs.djangoproject.com/en/dev/intro/tutorial02/](http://docs.djangoproject.com/en/dev/intro/tutorial02/)
Instead I get the welcome page like this:

I have enabled the admin app in INSTALLED_APPS, synced the db and tweaked urls.py so I'm not sure what the problem is.
Running apache2 with mod_wsgi.
urls.py:
from django.conf.urls.defaults import *
```
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^testproject/', include('testproject.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)
```
Settings.py:
```
...
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
'polls'
)
...
```
Tables:
Database changed
```
mysql> SHOW TABLES;
+----------------------------+
| Tables_in_django_test |
+----------------------------+
| auth_group |
| auth_group_permissions |
| auth_message |
| auth_permission |
| auth_user |
| auth_user_groups |
| auth_user_user_permissions |
| django_admin_log |
| django_content_type |
| django_session |
| django_site |
| polls_choice |
| polls_poll |
+----------------------------+
```
| Django admin page not showing | CC BY-SA 3.0 | 0 | 2010-11-13T13:09:54.673 | 2014-04-12T19:20:01.070 | 2014-04-12T19:20:01.070 | 663,064 | 181,637 | [
"python",
"django",
"mod-wsgi"
] |
4,173,057 | 1 | 4,173,068 | null | 1 | 215 | Hi I am facing a weird bug, I am writing a tag like
```
<div id="thecontent" dojoType="dojox.layout.ContentPane"></div>
```
Please see the "T" in dojoType it is in uppercase.Now I go and see my page not rendered properly, so I view source and I find that the source is correctly shown, but when I check firebug , I get this:-
```
<div id="thecontent" dojotype="dojox.layout.ContentPane"></div>
```
Please notice that t in dojotype here it is small. I went ahead and changed the entire dojotype to UpperCase , but it is still rendered as lower case.
I even checked in other browsers, and it is the same. Has someone faced anything like this. If so please tell me how to handle this.
I am tired of this.
{update:-Please find attached a screenshot of wireshark when I do a refresh.. unable to understand a thing}
| uppercase lowercase bug..web dev | CC BY-SA 2.5 | null | 2010-11-13T14:43:00.003 | 2010-11-13T18:11:52.077 | 2010-11-13T17:00:59.177 | 459,514 | 459,514 | [
"dojo"
] |
4,173,318 | 1 | 4,209,919 | null | 15 | 14,536 | I'm trying to set up my (iframe) Facebook application to use OAuth for authentication.
I used the [python-sdk](https://github.com/facebook/python-sdk) from Facebook, but I'm not really satisfied by the result, yet.
The problem is that when I redirect a user that never accessed my application to the login page, my iframe diplays an ugly intermediate page, such as the following one:

If the user clicks on "Go to Facebook.com" link, she is then redirected to the standard "Request for Permission" page.

This problem happens on the first access for users that haven't granted any permission to my application yet.
The login code is based on the OAuth example in the Python SDK:
```
class LoginHandler(BaseHandler):
def get(self):
verification_code = self.request.get("code")
args = dict(client_id=FACEBOOK_APP_ID, redirect_uri=self.request.path_url)
if self.request.get("code"):
args["client_secret"] = FACEBOOK_APP_SECRET
args["code"] = self.request.get("code")
raw_response = urllib.urlopen(
"https://graph.facebook.com/oauth/access_token?" +
urllib.urlencode(args)).read()
logging.debug("access_token raw response " + raw_response)
response = cgi.parse_qs(raw_response)
access_token = response["access_token"][-1]
# Download the user profile and cache a local instance of the
# basic profile info
graph = facebook.GraphAPI(access_token)
profile = graph.get_object("me")
user = User.get_by_key_name(profile["id"])
if not user:
user = User(key_name=str(profile["id"]),
id=str(profile["id"]),
name=profile["name"],
firstname=profile["first_name"],
profile_url=profile["link"],
access_token=access_token)
user.put()
elif user.access_token != access_token:
# we already know this user, but we need to update
user.access_token = access_token
user.put()
set_cookie(self.response, "fb_user", str(profile["id"]),
expires=time.time() + 30 * 86400)
self.response.headers["P3P"] = 'CP="IDC CURa ADMa OUR IND PHY ONL COM STA"'
self.redirect("/")
else:
self.redirect(
"https://graph.facebook.com/oauth/authorize?" +
urllib.urlencode(args))
```
| Facebook OAuth login for iframe canvas apps displays a logo image and a Go to Facebook.com caption instead of logging in | CC BY-SA 3.0 | 0 | 2010-11-13T15:43:11.787 | 2013-07-12T06:17:57.687 | 2013-07-12T06:15:11.190 | 1,656,977 | 27,565 | [
"authentication",
"oauth",
"facebook"
] |
4,173,684 | 1 | 4,173,731 | null | 1 | 137 | Anybody has an idea what the hell these characters in below screenshot are? Almost every key I press results in the characters in the screenshot. I get the issue very frequently (can't code 20 lines in a row without having it) and it seems to be triggered by intellisense use...
Seems I got it after installing the latest asp.net mvc 3 rc. But removing mvc3 doen't solve the problem.

| Eastern characters in VS 2010 code editor | CC BY-SA 2.5 | 0 | 2010-11-13T17:07:23.197 | 2010-11-13T17:17:40.977 | null | null | 26,579 | [
"visual-studio"
] |
4,173,923 | 1 | 4,173,941 | null | 1 | 287 | I have been doing lots of successful boolean searches however 1 word seems to be stopping it from displaying the expected results.
Below you can see the table structure at the top, with special attention to the tags content for this test product.

The code in text incase the screenshot is too small:
```
SELECT
id,
name,
description,
price,
image
FROM
products
WHERE
MATCH(tags,name,description)
AGAINST ('hot*' IN BOOLEAN MODE)
```
If I do a search for "hot" which is one of the tags, it returns 0 results.
However if I do a search for "drink" which is another tag it finds the product!
I can't seem to understand why!
| Boolean search ignoring word | CC BY-SA 2.5 | null | 2010-11-13T17:58:39.607 | 2010-11-13T18:08:03.767 | null | null | 241,465 | [
"mysql",
"boolean"
] |
4,173,961 | 1 | null | null | 6 | 3,341 | I'm sure this question or derivatives of it have been asked a bazillion times, but I couldn't find anything that helped me solve the problem, so I'm asking. Please feel free to direct me to the duplicate that I'm sure exists but I can't find. Apparently I'm not so great with keywords.
I have a Custom Control, it has it's own Resource Dictionary used only to define the control template. This dictionary is then merged into Generic.xaml.
The problem is that when this control shows up in the UI, it has nothing inside of it. I used [Snoop](http://snoopwpf.codeplex.com/) to find this out. The control is in the UI, but it is completely empty.
Below you'll find the items that I think are responsible for the problem. Any help or advice you can offer is greatly appreciated.
The relevant parts of my folder structure are like this:

```
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WPFSpecBuilder.Layouts.Templates">
<Style TargetType="{x:Type local:BasicTemplate}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:BasicTemplate}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<TextBlock Text="This is a basic template." />
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
```
```
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Layouts/Templates/XAML/BasicTemplate.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
```
| WPF Custom Control Template Not Applied | CC BY-SA 2.5 | null | 2010-11-13T18:05:36.890 | 2014-07-11T07:56:44.000 | 2011-09-16T16:37:07.447 | 305,637 | 177,547 | [
"wpf",
"custom-controls",
"controltemplate",
"resourcedictionary"
] |
4,174,209 | 1 | 4,174,240 | null | 3 | 2,129 | I would like to deconstruct the following polygon shown in blue removing all of the points from the polygon that cause concavity.

Currently, what I have been attempting to do is:
- - - -
This works in most cases, but in the previous case the points at (2,3) and (2,4) will not both be removed. In both cases either one of the points will be removed, but the other will not depending on the order which the array is passed in.
What I am wondering is this:
1. Is there some way to test to see if the polygon I am dealing with happens to have one of these cases (IE: 3 points of failure in a row?) or
2. Is there simply a more effective way of creating convex polygons?
Thank you.
| Polygon Decomposition - Removing Concave Points to Form Convex Polygons | CC BY-SA 2.5 | null | 2010-11-13T19:11:04.133 | 2010-11-13T22:11:10.007 | 2010-11-13T19:32:46.383 | 50,476 | 506,889 | [
"geometry",
"computational-geometry",
"convex-optimization",
"convex-polygon"
] |
4,174,523 | 1 | null | null | 1 | 827 | I need a simple shader code to use with my XNA application which just draws a given texture to the screen .. Essentially, I'm trying to do post processing, but my aim here is to not apply any post processing effect, but to just display the texture as itself ..
I tried the following pixel shader code but I'm getting some problem (explained below):
```
sampler textureSampler;
float4 PostProcessingPS(float2 texCoord: TEXCOORD0, float4 Position : POSITION0) : COLOR0
{
float4 color = tex2D(textureSampler,texCoord);
return color;
}
technique PostProcessingEffect
{
pass Pass1
{
PixelShader = compile ps_2_0 PostProcessingPS();
}
}
```
The issue I'm getting is that the texture is not drawn .. Only the borders are being drawn for some reason ?! And even regarding the borders, I'm not sure if they are being drawn properly .. I'm just saying they are being drawn because the pixel values there change as the scene itself changes ..
This is what it should be like:

And this is what I see:

Any ideas ?
| Need a simple pixel shader code which just draws an input texture to the screen (viewport) | CC BY-SA 2.5 | null | 2010-11-13T20:27:02.170 | 2011-03-28T18:37:18.570 | null | null | 366,207 | [
"c#",
"xna",
"shader"
] |
4,174,868 | 1 | 4,175,036 | null | 0 | 103 | 
As you see in the snapshot, variable names are shown e.g. "email_address", "email_message" and "email_subject". Instead i want to print "Email", "Message" and "Subject".
MM_validateForm() Javascript is used for validation.
| Form Validation Exposes Variable Name insead of Label Name on the Altert Box - MM_validateForm() | CC BY-SA 2.5 | null | 2010-11-13T21:38:12.790 | 2010-11-19T12:37:34.843 | 2010-11-19T12:37:34.843 | 372,445 | 372,445 | [
"php",
"javascript",
"html",
"webforms"
] |
4,175,050 | 1 | 4,175,075 | null | 0 | 2,790 | I have ( [http://www.rohanjain.in](http://www.rohanjain.in)) based on . It uses the new elements defined in html5 for page layout: , , , , etc. But I just checked that with old browsers and ie (dont care about this "non" browser) dont render the page properly.
:

The css markup (source of css at [http://www.rohanjain.in/media/css/style.src.css](http://www.rohanjain.in/media/css/style.src.css)) is not being followed maybe because it does not recognize the tags.
Currently for old browsers visitors are redirected to [this](http://www.rohanjain.in/old-browser/) and for ie [this](http://www.rohanjain.in/ie/) page.
Could not find a proper solution to this. Is there any workaround so that the page can be rendered properly and with html5?
| html5 new layout elements old browsers | CC BY-SA 2.5 | 0 | 2010-11-13T22:20:35.933 | 2010-11-13T23:00:42.670 | 2010-11-13T22:26:33.560 | 420,357 | 420,357 | [
"layout",
"html",
"cross-browser"
] |
4,175,184 | 1 | 4,175,816 | null | 4 | 11,603 | How to draw a chart which looks exactly the same as one on the picture using C# and .net 4 built-in chart control ?
Important are X and Y axis and there markings, and I don't want any graph line, just empty chart.

I'd be relly grateful for code snipet. Best regards, Primoz.
---
EDIT:
Problems that I have
- -
I'm using win forms and bult-in chart control.
| How to draw a chart using C# and .net 4 built-in chart control? | CC BY-SA 2.5 | 0 | 2010-11-13T23:01:13.870 | 2010-11-14T04:35:27.440 | 2010-11-13T23:49:36.497 | 423,278 | 423,278 | [
"c#",
".net",
".net-4.0",
"charts"
] |
4,175,222 | 1 | null | null | 2 | 1,831 | Could anyone help me to realize this kind of interesting javascript search form?

I need this form to realize search engine on my website. So by pushing arrow down it has to be shown drop down list of choosing another language flag. When chosen another language flag, it needs to be replaced current language flag.
Then I want to send input data to the text field and current chosen language flag with POST method to my php script.
Extra request: can this drop down list be taken from separated JS file? And can it be controlled from JS file in order to add / remove new language flags?
If anyone has time or who is really interested realizing this kind of javascript form, please, could you help to create it?
You can use this form on your own goals!
Please, download initial files from this link [http://igproject.ru/searchform/searchform.rar](http://igproject.ru/searchform/searchform.rar)
Thank you in advance.
| JavaScript search form | CC BY-SA 2.5 | 0 | 2010-11-13T23:12:40.477 | 2010-11-14T02:04:34.927 | null | null | 304,855 | [
"javascript",
"search",
"forms"
] |
4,175,819 | 1 | 4,175,846 | null | 6 | 769 | Ok, I searched the internet and stackoverflow but I just can't seem to find an answer for my problem.
I need to watermark images uploaded by users dynamically, but I don't want just text applied on an image. I need a real watermark like this:

The only way I can achieve this effect is by using Photoshop, adding shadow and decreasing the filling to 0%. But if my site is visited by 200 users who upload their images, I just can't make for everyone of them a new PNG file with their user name. That's why I'm looking for a dynamic solution for this problem.
I already found classes how to add a png file as a watermark to images, but like I said before this won't work if my site is visited by a lot of users.
I hope someone knows a way how to solve this and get the same effect on images dynamically.
Thank you very much.
| User name as Watermark | CC BY-SA 2.5 | 0 | 2010-11-14T02:01:04.163 | 2022-07-03T16:08:08.083 | 2010-11-14T02:52:17.393 | 126,562 | 483,262 | [
"php",
"image-processing",
"gd",
"imagick"
] |
4,175,826 | 1 | 4,175,838 | null | 0 | 187 | This is my problem:

The background of the progress indicator doesn't appear to be redrawing, and it's certainely not transparent. I'm using core animation to animate the image in the background; when I don't use core animation it looks fine. This is the code I am using:
```
[[NSAnimationContext currentContext] setDuration:0.25];
[[ViewImage animator] setAlphaValue:0.5f ];
[[statusText animator] setAlphaValue:0.1f ];
[progressIndicator usesThreadedAnimation ];
```
The progress indicator doesn't use core animation. I have also tried removing `[progressIndicator usesThreadedAnimation];` which doesn't help.
| Redraw issue objective-c | CC BY-SA 2.5 | null | 2010-11-14T02:02:36.280 | 2010-11-14T02:08:06.677 | null | null | 220,935 | [
"objective-c",
"cocoa"
] |
4,175,828 | 1 | 4,177,233 | null | 1 | 486 | I have a ListBox with custom styles applied. It seems sometimes, when I select a color then another (didn't press Ctrl/Shift) it seems like 2 items are selected, sometimes even more

Whats with this rendering? My XAML looks like
```
<ListBox ItemsSource="{Binding ThemeColors}" SelectedValue="{Binding Color}" SelectionChanged="ListBox_SelectionChanged" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Margin="3" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Padding" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Padding="1">
<Rectangle Width="20" Height="20">
<Rectangle.Fill>
<SolidColorBrush Color="{Binding}" />
</Rectangle.Fill>
</Rectangle>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="true"/>
<Condition Property="Selector.IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" TargetName="Bd" Value="#FF999999"/>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
```
# UPDATE: 14 Nov
So I followed @Meleak advice and removed all duplicates, there happen to be some. But now have another problem. Sometimes, when I select a color, the border doesn't show, the IsSelected style is not active? But the preview color updates, showing that the binding worked.
[http://screenr.com/18c](http://screenr.com/18c)
| WPF: More than 1 items rendered as Selected in a ListBox? | CC BY-SA 2.5 | null | 2010-11-14T02:03:34.087 | 2012-10-01T15:39:03.583 | 2010-11-14T14:07:40.970 | 292,291 | 292,291 | [
"wpf",
"templates",
"listbox",
"styles"
] |
4,176,283 | 1 | 4,177,142 | null | 3 | 1,006 | 
Why does the zoom control show like this? It only happens on QVGA resolution smulator. It works perfectly on HVGA resolution.
This is the code that I used.
```
ZoomControls zoomControls = (ZoomControls) findViewById(R.id.zoomcontrols);
zoomControls.setOnZoomInClickListener(new View.OnClickListener() {
public void onClick(View v) {
mc.zoomIn();
}
});
zoomControls.setOnZoomOutClickListener(new View.OnClickListener() {
public void onClick(View v) {
mc.zoomOut();
}
});
```
`zoomcontrols` defined in xml as:
```
<ZoomControls android:id="@+id/zoomcontrols"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"/>
```
| Android: Why is the zoom control like this? | CC BY-SA 2.5 | null | 2010-11-14T05:10:28.017 | 2010-11-14T10:43:20.927 | null | null | 481,239 | [
"android",
"maps",
"zooming"
] |
4,176,258 | 1 | 4,176,989 | null | 0 | 72 |
I need to find a way to implement some sort of "MessageCenter" where any control can register to receive messages from other controls, without knowing where those messages are coming from (or it can know, so long as it doesn't mean any extra work for me). After typing out this whole thing, I think I've helped myself come to the realization of what I'm after, but if you can recommend some pre-packaged solutions, that'd be great!
---
So, I'm working on this project where the user gets to make some selections and (more-or-less) layout a page. The rules are very strict, though. At every step, they are given a limited number of ways in which they can alter the page. Think of it as a templating system.
There are a number of interfaces:
ITemplate, IContentArea, and ISpecificControl
Each Template has some number of content areas. Each ContentArea has exactly three specific controls.
They get composited together something like this crude drawing:

The big light purple-ish box is the template.
The yellow, pink, and brown boxes are different concrete types of IContentArea.
The green, light blue, and dark purple boxes are different concrete types of ISpecificControl.
Each concrete implementation of these interfaces will have some number of public properties that I would like the user to be able to set.
For instance:
Green boxes might let you set the font size and font color.
Light blue boxes might let you set the background color.
Dark purple boxes might let you set the image size and margin.
Yellow, pink, and brown boxes let you pick which three specific controls you want to use.
The big light purple-ish box lets you choose how the content areas are laid out (some might have only two or three, maybe they're arranged in a diagonal).
I've made a custom attribute that I can apply to properties in the ViewModel that marks them as eligible for user-changes, and I've set aside some space to dynamically add settings controls. The idea is that the user can only edit EXACTLY ONE item at a time. When they select it, I'll use reflection to examine the public properties of the control's ViewModel and find all the properties that are marked with the editable attribute, look at their types, and dynamically generate controls to edit them (with bindings, of course). We'll call this the "SettingsWizard."
So the problem is really two-fold:
How would you recommend I limit the user to only selecting a SINGLE box at a time? Clearly I need some sort of application-wide event or messaging. What form would that take exactly? And how would I register my "SettingsWizard" to pick up on these messages. I feel like this is going to be something really simple, but I'm overlooking it because it doesn't feel right, or clean.
Anything that let one of these controls send out a message that says, "Hey, I'm the last one to get clicked on. If anyone else was selected, now you're not," would solve the problem, so long as the receiving controls didn't have to know about where the message was coming from.
I was thinking some sort of static "MessageCenter" where when each control is created it registers to be passed messages (in it's constructor) using a defined interface, and any control has the ability to send out a message to the MessageCenter, which would then pass it along. Does that sound about right? I feel like something of this nature already exists. Like the features in Prism (but I don't really have the need for any of the rest of the features).
How would I let my "SettingsWizard" know that he's got a new item he needs to display settings for? Presumably, a solution for the first item can also be used to solve this one. It's just a different kind of notification.
| WPF - Disjointed Controls Need to Communicate | CC BY-SA 2.5 | null | 2010-11-14T05:00:04.140 | 2011-09-28T00:38:43.670 | null | null | 177,547 | [
"wpf",
"events",
"communication",
"messaging"
] |
4,176,468 | 1 | 4,179,282 | null | 4 | 939 | I want to generate something like this - the alignment of the nodes is the important thing, not the angle of the edges:
```
+--------------+
| |
+--------------+
| |
V V
+-----+ +-----+ <--- alignment at top
| | | |
| |->| |
| | | |
+-----+ | |
| | |
V | |
+-----+ | |
| | | |
| |->| |
| | | |
+-----+ +-----+ <--- alignment at bottom
| |
V V
+--------------+
| |
+--------------+
```
The best I've been able to come up with is to stick the two left nodes into a cluster subgraph with a white (=> invisible) border, and set the weight of one of the edges to 0. But it's still not quite right:
```
digraph G {
// scale things down for example
size="5,5"
rankdir=TD
ranksep=1
nodesep=1
node [shape=box]
node [width=5 height=2]
top
subgraph cluster_left
{
color=white
node [width=2 height=2]
left1
left2
}
node [width=2 height=5]
right
node [width=5 height=2]
bottom
top->left1
top->right
left1->left2
left1->right
left2->right [weight=0]
left2->bottom
right->bottom
}
```
This comes out like this - poorly aligned:

Any ideas on how to get what I want?
| Lining up multiple short nodes in parallel with a single tall node in GraphViz | CC BY-SA 2.5 | 0 | 2010-11-14T06:33:01.763 | 2010-11-14T22:50:20.030 | null | null | 3,712 | [
"alignment",
"graphviz",
"dot"
] |
4,176,500 | 1 | 4,176,537 | null | 0 | 386 | 
Above is a screenshot of what I'm trying to accomplish. I tried setting `height:100%`, but I get an "overflow" caused by having `margin-top:48px`, causing me to scroll down even though the content fits on 1 screen.
Right now the content is only up to the colored part (I edited it out for clarity).
It's CSS is:
```
#main_area {
float: left;
width: 600px;
margin-top: 48px;
padding: 0px 20px;
}
.sidebar { /* this one here */
float: left;
left: 10px;
width: 278px;
padding-top: 48px;
padding-right: 20px;
padding-left: 20px;
background-color: #FFFFFF
}
```
| Fill remaining area with color? | CC BY-SA 3.0 | null | 2010-11-14T06:50:19.647 | 2012-03-15T19:14:24.273 | 2011-12-07T23:19:49.310 | 84,042 | 159,685 | [
"css"
] |
4,177,574 | 1 | 4,178,372 | null | 17 | 28,847 | I am creating a dashboard in WPF with a bunch of key performance indicators, each of which consists of three values.

Whenever the values change I would like the user control to blink for 5 seconds. I would like to make the background color of the control to switch the foreground color of the textblock, and the textblock foreground color to change to the background color of the user control.
This whole WPF animation is new to me, so any help would be much appreciated!
My user control looks like:
```
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="10" />
<RowDefinition Height="Auto" />
<RowDefinition Height="10" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock x:Name="TitleTextBlock" Text="Title" FontSize="32" HorizontalAlignment="Center" Grid.Row="0" FontFamily="OCR-A II" Foreground="White" VerticalAlignment="Bottom" />
<TextBlock x:Name="Value1TextBlock" Text="0" FontSize="192" HorizontalAlignment="Center" Grid.Row="2" FontFamily="OCR-A II" VerticalAlignment="Center" Foreground="White" />
<TextBlock x:Name="Value2TextBlock" Text="0" FontSize="32" HorizontalAlignment="Center" Grid.Row="4" FontFamily="OCR-A II" Foreground="White" VerticalAlignment="Top" />
</Grid>
```
| How to make a textblock blink in wpf? | CC BY-SA 2.5 | 0 | 2010-11-14T13:00:50.570 | 2013-01-10T10:53:59.610 | null | null | 1,768 | [
"wpf",
"animation"
] |
4,177,562 | 1 | 4,177,663 | null | 1 | 725 | I'm working on a ServerControl (SuperFish Menu).
Below is my codes.
Menu.cs
```
[AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[ParseChildren(true, "MenuItems")]
[PersistChildren(true)]
[ToolboxData("<{0}:Menu runat=\"server\"></{0}:Menu>")]
public class Menu : WebControl, INamingContainer
{
#region Fields
List<MenuItem> _MenuItems;
#endregion
#region Properties
public VerOrHor VerticalOrHorizontal { get; set; }
public string Main_ul_CssClass { get; set; }
[PersistenceMode(PersistenceMode.InnerDefaultProperty)]
public animation AnimationItems { get; set; }
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[PersistenceMode(PersistenceMode.InnerDefaultProperty)]
public List<MenuItem> MenuItems
{
get
{
if (_MenuItems == null)
{
_MenuItems = new List<MenuItem>();
}
return _MenuItems;
}
}
string _AnimationType
{
get
{
switch (this.AnimationItems.AnimationType)
{
case AnimationType.Opacity_Height:
return "animation:{opacity:'show',height:'show'}";
case AnimationType.Opacity:
return "animation:{opacity:'show'}";
case AnimationType.Height:
return "animation:{height:'show'}";
default:
return "animation:{opacity:'show',height:'show'}";
}
}
}
string _AnimationSpeed
{
get
{
switch (this.AnimationItems.AnimationSpeed)
{
case AnimationSpeed.Fast:
return "speed:Fast";
case AnimationSpeed.Normal:
return "speed:Normal";
case AnimationSpeed.Slow:
return "speed:Slow";
default:
return "speed:Fast";
}
}
}
#endregion
#region Methods
public override void RenderBeginTag(HtmlTextWriter writer)
{
}
public override void RenderEndTag(HtmlTextWriter writer)
{
}
protected override void AddAttributesToRender(HtmlTextWriter writer)
{
base.AddAttributesToRender(writer);
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
#region Adding Script & link Tags
HtmlGenericControl jquery = new HtmlGenericControl("script");
jquery.Attributes.Add("type", "text/javascript");
jquery.Attributes.Add("src", Page.ClientScript.GetWebResourceUrl(typeof(Menu), "JQueryMenu.JavaScriptFiles.jquery_1_4_3.js"));
jquery.EnableViewState = false;
Page.Header.Controls.Add(jquery);
HtmlGenericControl hoverIntent = new HtmlGenericControl("script");
hoverIntent.Attributes.Add("type", "text/javascript");
hoverIntent.Attributes.Add("src", Page.ClientScript.GetWebResourceUrl(typeof(Menu), "JQueryMenu.JavaScriptFiles.hoverIntent.js"));
hoverIntent.EnableViewState = false;
Page.Header.Controls.Add(hoverIntent);
HtmlGenericControl jquery_bgiframe_min = new HtmlGenericControl("script");
jquery_bgiframe_min.Attributes.Add("type", "text/javascript");
jquery_bgiframe_min.Attributes.Add("src", Page.ClientScript.GetWebResourceUrl(typeof(Menu), "JQueryMenu.JavaScriptFiles.jquery_bgiframe_min.js"));
jquery_bgiframe_min.EnableViewState = false;
Page.Header.Controls.Add(jquery_bgiframe_min);
HtmlGenericControl superfish = new HtmlGenericControl("script");
superfish.Attributes.Add("type", "text/javascript");
superfish.Attributes.Add("src", Page.ClientScript.GetWebResourceUrl(typeof(Menu), "JQueryMenu.JavaScriptFiles.superfish.js"));
superfish.EnableViewState = false;
Page.Header.Controls.Add(superfish);
HtmlGenericControl supersubs = new HtmlGenericControl("script");
supersubs.Attributes.Add("type", "text/javascript");
supersubs.Attributes.Add("src", Page.ClientScript.GetWebResourceUrl(typeof(Menu), "JQueryMenu.JavaScriptFiles.supersubs.js"));
supersubs.EnableViewState = false;
Page.Header.Controls.Add(supersubs);
HtmlGenericControl csslink = new HtmlGenericControl("link");
csslink.Attributes.Add("href", Page.ClientScript.GetWebResourceUrl
(typeof(Menu), "JQueryMenu.CSS.superfish.css"));
csslink.ID = "NavigationMenu";
csslink.Attributes.Add("type", "text/css");
csslink.Attributes.Add("rel", "stylesheet");
csslink.EnableViewState = false;
Page.Header.Controls.Add(csslink);
if (this.VerticalOrHorizontal == VerOrHor.Vertical)
{
HtmlGenericControl csslink01 = new HtmlGenericControl("link");
csslink01.Attributes.Add("href", Page.ClientScript.GetWebResourceUrl
(typeof(Menu), "JQueryMenu.CSS.superfish-vertical.css"));
csslink01.Attributes.Add("type", "text/css");
csslink01.Attributes.Add("rel", "stylesheet");
csslink01.EnableViewState = false;
Page.Header.Controls.Add(csslink01);
}
#endregion
}
protected override void RenderContents(HtmlTextWriter output)
{
output.Write(CreateMenuHtmlTags().ToString());
}
StringBuilder CreateMenuHtmlTags()
{
if (_MenuItems == null || _MenuItems.Count <= 0)
throw new Exception("Please Fill the control with <MenuItem> tags");
StringBuilder Html = new StringBuilder("");
#region Add <Script>
if (String.IsNullOrEmpty(Main_ul_CssClass))
Html.Append("<script>$(document).ready(function() { $(\"ul.sf-menu\").superfish({pathLevels: 1,");
else
Html.Append("<script>$(document).ready(function() { $(\"ul." + Main_ul_CssClass + "\").superfish({ pathLevels: 1,");
if (AnimationItems == null)
Html.Append("delay:1000, animation:{opacity:'show',height:'show'}, speed:'normal', autoArrows: true, dropShadows: true}); });</script>");
else
{
Html.Append("delay:" + AnimationItems.Delay.Trim() + ",");
Html.Append(_AnimationType + ",");
Html.Append(_AnimationSpeed + ",");
Html.Append("dropShadows: " + AnimationItems.DropShadow.ToString() + ",");
Html.Append(@"autoArrows: false});});</script>");
}
#endregion
if (String.IsNullOrEmpty(Main_ul_CssClass))
Html.Append("<ul class=\"sf-menu sf-js-enabled sf-shadow\" id='sample-menu-1'>");
else
Html.Append("<ul class=\"" + Main_ul_CssClass + "\" id='sample-menu-1'>");
foreach (MenuItem item in _MenuItems)
{
if (item.SubMenuItems != null || item.SubMenuItems.Count > 0)
{
if (!string.IsNullOrEmpty(item.li_CssClass))
Html.Append("<li class=\"" + item.li_CssClass + "\">");
else
Html.Append("<li>");
Html.Append("<a href=\"" + item.href + "\">" + item.Text.Trim() + "</a>");
ParseSubMenuItems(ref Html, item);
Html.Append("</li>");
}
else
Html.Append("<li><a href=\"" + item.href + "\">" + item.Text.Trim() + "</a></li>");
}
Html.Append("</ul>");
return Html;
}
void ParseSubMenuItems(ref StringBuilder Html, MenuItem menuItems)
{
if (menuItems == null || menuItems.SubMenuItems.Count == 0) return;
Html.Append("<ul class=\"" + menuItems.ul_CssClass.Trim() + "\" style=\"display: none; visibility: hidden;\">");
foreach (MenuItem item in menuItems.SubMenuItems)
{
if (item.SubMenuItems != null || item.SubMenuItems.Count > 0)
{
if (!string.IsNullOrEmpty(item.li_CssClass))
Html.Append("<li class=\"" + item.li_CssClass + "\">");
else
Html.Append("<li>");
Html.Append("<a href=\"" + item.href + "\">" + item.Text.Trim() + "</a>");
ParseSubMenuItems(ref Html, item);
Html.Append("</li>");
}
else
Html.Append("<li><a href=\"" + item.href + "\">" + item.Text.Trim() + "</a></li>");
}
Html.Append("</ul>");
}
#endregion
}
public enum VerOrHor
{
Vertical,
Horizontal
}
public class MenuItemsCollectionEditor : CollectionEditor
{
public MenuItemsCollectionEditor(Type type)
: base(type)
{
}
protected override bool CanSelectMultipleInstances()
{
return false;
}
protected override Type CreateCollectionItemType()
{
return typeof(MenuItem);
}
}
```
MenuItem.cs
```
[PersistChildren(true)]
[ParseChildren(true, "SubMenuItems")]
public class MenuItem : Control, INamingContainer
{
#region Fields
List<MenuItem> _SubMenuItems;
#endregion
#region Properties
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
//[Editor(typeof(SubMenuItemsCollectionEditor), typeof(UITypeEditor))]
[PersistenceMode(PersistenceMode.InnerDefaultProperty)]
public List<MenuItem> SubMenuItems
{
get
{
if (_SubMenuItems == null)
{
_SubMenuItems = new List<MenuItem>();
}
return _SubMenuItems;
}
}
[DefaultValue("MenuItem")]
public string Text { get; set; }
[DefaultValue("")]
[Description("<ul /> css class")]
public string ul_CssClass { get; set; }
[DefaultValue("")]
[Description("<li /> css class")]
public string li_CssClass { get; set; }
[DefaultValue("#")]
[Description("<a /> href attribute")]
public string href { get; set; }
[TemplateContainer(typeof(MenuItem))]
[PersistenceMode(PersistenceMode.InnerDefaultProperty)]
public ITemplate Template { get; set; }
#endregion
}
public class SubMenuItemsCollectionEditor : CollectionEditor
{
public SubMenuItemsCollectionEditor(Type type)
: base(type)
{
}
protected override bool CanSelectMultipleInstances()
{
return false;
}
protected override Type CreateCollectionItemType()
{
return typeof(MenuItem);
}
}
```
animation.cs
```
public class animation
{
[DefaultValue("1000")]
[NotifyParentProperty(true)]
public string Delay { get; set; }
[DefaultValue("Opacity_Height")]
[NotifyParentProperty(true)]
public AnimationType AnimationType { get; set; }
[DefaultValue("fast")]
[NotifyParentProperty(true)]
public AnimationSpeed AnimationSpeed { get; set; }
[DefaultValue("false")]
[NotifyParentProperty(true)]
public bool DropShadow { get; set; }
}
public enum AnimationType
{
Opacity_Height,
Opacity,
Height
}
public enum AnimationSpeed
{
Fast,
Normal,
Slow
}
```
It works fine with below code (Without `AnimationItems`):
```
<MdsMenu:Menu ID="Menu1" runat="server">
<MdsMenu:MenuItem Text="MenuItem 01"></MdsMenu:MenuItem>
<MdsMenu:MenuItem Text="MenuItem 02"></MdsMenu:MenuItem>
<MdsMenu:MenuItem Text="MenuItem 03" />
</MdsMenu:Menu>
```
But when I add `AnimationItems` tag like the following code I receive the Exception :
Exception : Error Creating Control - Menu1Type 'JQueryMenu.Menu' does not have a public property named 'MenuItem'.

```
<MdsMenu:Menu ID="Menu1" runat="server">
<AnimationItems AnimationSpeed="Fast" AnimationType="Opacity_Height" DropShadow="true" Delay="1000" />
<MdsMenu:MenuItem Text="MenuItem 01"></MdsMenu:MenuItem>
<MdsMenu:MenuItem Text="MenuItem 02"></MdsMenu:MenuItem>
<MdsMenu:MenuItem Text="MenuItem 03" />
</MdsMenu:Menu>
```
| Problem in creating a ServerControl in ASP.NET , C#? | CC BY-SA 2.5 | 0 | 2010-11-14T12:57:18.540 | 2010-11-20T11:11:41.443 | null | null | 191,647 | [
"c#",
"asp.net",
"menu",
"menuitem",
"servercontrols"
] |
4,177,898 | 1 | null | null | 0 | 1,700 | I need jquery drop down button plugin, like this
![alt text][1]
or

thx)
| jquery drop down button plugin - Somebody knows? | CC BY-SA 2.5 | 0 | 2010-11-14T14:22:26.053 | 2010-11-14T14:31:00.793 | 2010-11-14T14:31:00.793 | 266,644 | 266,644 | [
"jquery-plugins",
"drop-down-menu"
] |
4,178,258 | 1 | 4,178,752 | null | 2 | 581 | I have a blender model and below is a image of how my model renders when I load it into python. It looks like the normals are all messed up. I am using the correct normal for each vertex. I'm exporting them in the correct order. I test this in the blender console that the actual export file had the right data.
I know that I had to rotate the model in python because z axis is different, so I'm not sure if the normals z is pointing in the wrong direction.
I'm using pyglet. Has anyone ever had this problem before?
Any ideas of what I can do to try to fix it?
Im not sure if this a OpenGL or python problem.
opengl setup code:
```
glMatrixMode(GL_PROJECTION)
zNear = 0.01
zFar = 1000.0
fieldOfView = 45.0
size = zNear * math.tan(math.radians(fieldOfView) / 2.0)
glFrustum(-size, size, -size / (w / h), size /
(w / h), zNear, zFar);
glViewport(0, 0, w, h);
# Set-up projection matrix
# TODO
glMatrixMode(GL_MODELVIEW)
glShadeModel(GL_SMOOTH)
glEnable(GL_LIGHTING)
glEnable(GL_LIGHT0)
light0Ambient = (GLfloat * 4)(*[])
light0Ambient[0] = 0.2
light0Ambient[1] = 0.2
light0Ambient[2] = 0.2
light0Ambient[3] = 1.0
glLightfv(GL_LIGHT0, GL_AMBIENT, light0Ambient);
lightpos = (GLfloat * 3)(*[])
lightpos[0] = 5.0
lightpos[1] = 5.0
lightpos[2] = 5.0
glLightfv(GL_LIGHT0, GL_POSITION, lightpos)
tempLV = self.kjgCreateVectorWithStartandEndPoints((5.0,5.0,5.0), (0.0,0.0,-3.0))
lightVector = (GLfloat * 3)(*[])
lightVector[0] = tempLV[0]
lightVector[1] = tempLV[1]
lightVector[2] = tempLV[2]
glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION,lightVector);
glLoadIdentity( )
glTranslatef(0.0, 2.0, -18.0)
#glScalef(0.4, 0.4, 0.4)
glRotatef(-90, 1.0, 0.0, 0.0)
```
Draw Code:
```
for face in self.faces:
#print group
if len(face) == 3:
glBegin(GL_TRIANGLES)
elif len(face) == 4:
glBegin(GL_QUADS)
else:
glBegin(GL_POLYGON)
for i in face:
if i in (104,16,18,102):
glVertex3f(*self.vertices[i])
color = self.calculateVertexIntensity((.5,.5,.5),self.normals[i],self.vertices[i])
glColor3f(*color)
glNormal3f(*self.normals[i])
glEnd()
```

| OpenGL: Model doesn't look right when loaded in python | CC BY-SA 2.5 | 0 | 2010-11-14T15:53:52.237 | 2010-11-14T17:44:54.160 | null | null | 207,193 | [
"python",
"opengl",
"pyglet"
] |
4,178,400 | 1 | 4,186,560 | null | 1 | 8,297 | 
I have problem with creating border for an icon in JLabel. I have JPanel in which I set it into GridLayout. I added Jlabel on the JPanel. The size of the JLabel were according to the size of the icon. However when I tried to set the border on the icon, it created border according to the size of the grid and not the size of the icon inside the grid.
How can I create a border around the image not on the size of the grid?
```
JPanel panel= new JPanel(new GridLayout(ROWS,COLS,2,2));
panel.setsize(600,600);
....
JLabel = new JLabel(icon, JLabel.LEFT);
label.setVerticalAlignment(SwingConstants.TOP);
...
label.setborder(BorderFactory.createLineBorder(Color.RED,5));
panel.add(label);
```
| Creating border around ImageIcon on a JLabel, not around the Jlabel | CC BY-SA 2.5 | null | 2010-11-14T16:24:46.557 | 2010-11-16T01:44:21.757 | 2010-11-15T18:23:37.380 | 21,234 | 80,796 | [
"java",
"swing",
"border",
"jlabel"
] |
4,178,423 | 1 | 4,178,483 | null | 0 | 22,905 | While trying to start the Tomcat 7 process, the following logging is reported and the service does not start.
```
[2014-02-03 11:31:57] [info] Commons Daemon procrun (1.0.10.0 32-bit) started
[2014-02-03 11:31:57] [info] Running 'BOE120Tomcat7' Service...
[2014-02-03 11:31:57] [info] Starting service...
[2014-02-03 11:31:57] [error] FindClass org/apache/catalina/startup/Bootstrap failed
[2014-02-03 11:31:57] [error] Failed to start Java
[2014-02-03 11:31:57] [error] ServiceStart returned 4
[2014-02-03 11:31:57] [info] Run service finished.
[2014-02-03 11:31:57] [info] Commons Daemon procrun finished
```
JRE 5 (1.5.0_05) is referenced in the Tomcat Java Setup "Java Virtual Machine":

| Failed loading main org/apache/catalina/startup/Bootstrap class in tomcat 7 | CC BY-SA 3.0 | null | 2010-11-14T16:30:01.420 | 2014-02-03T18:58:44.667 | 2014-02-03T18:58:44.667 | 684,966 | 444,668 | [
"tomcat",
"tomcat7"
] |
4,178,636 | 1 | 4,201,877 | null | 3 | 5,383 | I have tweets and commenting system like this

This is the code block for one set of tweet and its comments and commenting box:
```
<li class="storyBlock">
<div>
<div class="grid userImageBlockL">
<div class="imgMedium"> <a href="/bakasura1/users/harshamv"><img width="44" height="44" alt="image" src="/bakasura1/files/images/medium/1288170363aca595cabb50.jpg"></a> </div>
</div>
<div class="grid userContentBlockL">
<div class="userContentHeader">
<h5> <a href="/bakasura1/users/harshamv">Harsha Vantagudi</a> <span class="storyMessage">Testing the Seconds</span></h5>
<span class="user-status-time">6 hours ago</span> <span><a href="#" class="user-status-buttons">Comment</a> <a href="#" class="user-status-buttons">Delete</a></span> </div>
<ul class="commentList">
<li class="commentBlock">
<div>
<div class="grid userImageBlockS">
<div class="imgSmall"> <a href="/bakasura1/users/harshamv"><img width="35" height="35" alt="image" src="/bakasura1/files/images/small/1288170363aca595cabb50.jpg"></a> </div>
</div>
<div class="grid userContentBlockS alpha omega">
<h5> <a href="/bakasura1/users/harshamv">Harsha Vantagudi</a> <span class="storyMessage">Write your comment...</span></h5>
<span class="user-status-time">27 minutes ago</span> <span><a href="#" class="user-status-buttons">Comment</a> <a href="#" class="user-status-buttons">Delete</a></span></div>
<div class="clear"></div>
</div>
</li>
<li class="commentBlock">
<div>
<div class="grid userImageBlockS">
<div class="imgSmall"> <img width="35" height="35" alt="image" src="/bakasura1/files/images/small/1288170363aca595cabb50.jpg"> </div>
</div>
<div class="grid userContentBlockS alpha omega">
<form accept-charset="utf-8" action="/bakasura1/account/saveComment" method="post">
<div style="display: none;">
<input type="hidden" value="POST" name="_method">
</div>
<input type="hidden" id="StatusMessageReplyPid" value="67" name="data[StatusMessageReply][pid]">
<input type="hidden" id="StatusMessageReplyItemId" value="1" name="data[StatusMessageReply][item_id]">
<input type="hidden" id="StatusMessageReplyCommentersItemId" value="1" name="data[StatusMessageReply][commenters_item_id]">
<textarea id="StatusMessageReplyMessage" name="data[StatusMessageReply][message]">Write your comment...</textarea>
<input type="submit" name="" value="Comment">
</form>
</div>
<div class="clear"></div>
</div>
</li>
</ul>
</div>
<div class="clear"></div>
</div>
</li>
```
I am a little confused as to how to create an Ajax from submit when the comment is saved the new comment should stack top to bottom. Since there is no unique tweet identifier. I am not sure how to address this problem.
Can some one recommend an easy solution for the same?
| Facebook Style Comment Box | CC BY-SA 2.5 | 0 | 2010-11-14T17:18:50.690 | 2017-02-17T11:50:22.497 | 2010-11-14T18:00:36.093 | 229,044 | 155,196 | [
"facebook",
"forms",
"jquery",
"twitter"
] |
4,179,069 | 1 | 4,179,965 | null | 11 | 7,569 | Is there any way to draw a line using javascript and the canvas with "better" antialiasing, like Flash does?
I know the Math.floor(coord)+0.5 trick to get an exactly 1 pixel line when you need it, but that's not what I mean. The following blue lines drawed using canvas look _ugly in supporting html5 and cavas, so they are probably using the same antialiasing algorithm (probably coded for speed, not for the best visual impression). It's the same no matter what the line width is (actually the thicker, the uglier):
1px blue lines screenshot crop:

and 3px:

As you can see, this is not the most beautiful way to draw , and only the lower line looks good. The client is demanding that the graph manipulation app I work on "look good" and is very demanding from the aesthetics pov and . Or maybe I could code a good antialiased lines drawing algorith in javascript (can anyone give me some resources for that?) Sorry for not adding a picture with lines drawn in Flash, but the point is that they just look good, the antialiasing is .
| Drawing GOOD LOOKING (like in Flash) lines on canvas (HTML5) - possible? | CC BY-SA 2.5 | 0 | 2010-11-14T18:56:23.207 | 2010-11-14T22:04:23.287 | 2010-11-14T21:45:51.920 | 507,537 | 507,537 | [
"javascript",
"html",
"canvas",
"drawing"
] |
4,179,910 | 1 | 4,180,745 | null | 7 | 4,159 | How do you make a gtk.ToolButton disabled so that it is 'greyed out'? Like this:

How do you make it enabled again?
| How to enable/disable toolbar items? | CC BY-SA 2.5 | null | 2010-11-14T21:52:41.737 | 2010-11-15T01:25:50.413 | null | null | 477,933 | [
"python",
"gtk",
"pygtk",
"toolbar"
] |
4,180,115 | 1 | 4,180,414 | null | 6 | 23,780 | Netbean 6.9 generated the following JPA entity class from this SQL Server 2008 table:

I want to get all the ProductDescriptors that have a specific SKU value. Something like this:
```
SELECT * FROM ProductDescriptors WHERE SKU='something'
```
Given the entity class, what's the Java code to get the results?
## Thanks.
```
@Entity
@Table(name = "ProductDescriptors")
@NamedQueries({
@NamedQuery(name = "ProductDescriptors.findAll", query = "SELECT p FROM ProductDescriptors p"),
@NamedQuery(name = "ProductDescriptors.findByDescriptorID", query = "SELECT p FROM ProductDescriptors p WHERE p.descriptorID = :descriptorID"),
@NamedQuery(name = "ProductDescriptors.findByLanguageCode", query = "SELECT p FROM ProductDescriptors p WHERE p.languageCode = :languageCode"),
@NamedQuery(name = "ProductDescriptors.findByTitle", query = "SELECT p FROM ProductDescriptors p WHERE p.title = :title"),
@NamedQuery(name = "ProductDescriptors.findByIsDefault", query = "SELECT p FROM ProductDescriptors p WHERE p.isDefault = :isDefault"),
@NamedQuery(name = "ProductDescriptors.findByBody", query = "SELECT p FROM ProductDescriptors p WHERE p.body = :body")})
public class ProductDescriptors implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "DescriptorID")
private Integer descriptorID;
@Basic(optional = false)
@Column(name = "LanguageCode")
private String languageCode;
@Basic(optional = false)
@Column(name = "Title")
private String title;
@Basic(optional = false)
@Column(name = "IsDefault")
private boolean isDefault;
@Basic(optional = false)
@Column(name = "Body")
private String body;
@JoinColumn(name = "SKU", referencedColumnName = "SKU")
@ManyToOne(optional = false)
private Products products;
```
...
| JPA: query to get results based on value of foreign key defined in the entity class? | CC BY-SA 2.5 | 0 | 2010-11-14T22:39:36.867 | 2010-11-14T23:44:36.313 | null | null | 3,401 | [
"java",
"jpa",
"entity"
] |
4,180,181 | 1 | 4,180,198 | null | 0 | 427 | I am floating a couple divs inside a container div & the first div has a border on the right. It works correctly WITHOUT the border, but when I add the border it all messes up & the text inside the container on the right displays itself under the border from the other div.
To show you what I mean here is a picture:

Here is my code:
```
<div style="margin: 0px auto; width: 500px; border: 1px solid #000;">
<div style="width: 500px; border-bottom: 1px solid #000;">
<div style="float: left; width: 250px;">Resolution/Megapixels</div>
<div style="float: right; width: 250px;">Average Quality Size/Best Quality Size</div>
<div style="clear: both;"></div>
</div>
<div style="width: 500px; border-bottom: 1px solid #000;">
<div style="float: left; width: 250px; border-right: 1px solid #000;">0.5 megapixels</div>
<div style="float: right; width: 250px;">3x5 inches/NA</div>
<div style="clear: both;"></div>
</div>
</div>
```
### Edit:
Please disregard. Worked it out as soon as I posted this.
| Using border-right with floats displays incorrectly | CC BY-SA 3.0 | null | 2010-11-14T22:55:01.630 | 2012-08-28T19:06:47.780 | 2012-08-28T19:06:47.780 | 5,640 | 472,501 | [
"css",
"css-float"
] |
4,180,629 | 1 | 4,180,664 | null | 5 | 6,409 | Hi all I have a collection of images that are similar to photos of car registration plates.
I am wondering how to pre process the image before sending it to an OCR engine to determine the text.
I would like to eventually be able to crop the input on only the white content of the registration plate.
The actual image would look something like this:

and should end up something like this (color depth not important)

Thank for any help.
Regards,
Bob
| ocr and image preprocessing techniques | CC BY-SA 2.5 | 0 | 2010-11-15T00:52:48.030 | 2010-11-15T01:03:52.483 | null | null | 180,487 | [
"image",
"image-processing",
"ocr"
] |
4,180,812 | 1 | null | null | 2 | 265 | I have the following DB structure, and I need to create the relevant nHibernate Mapping files. The problem I am having is one-one, many-one and bag mappings. My current mapping data is also below, any help is appreciated to figure it out.

```
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="FABMatrix" table="FABMatrix" lazy="true">
<cache usage="nonstrict-read-write"/>
<id name="id" column="ID">
<generator class="identity"/>
</id>
<property name="Name" column="ProductName"/>
<bag name="FABData" table="FABMatrix_to_FABMatrixData">
<key column="FABMatrixId"/>
<many-to-many class="FABMatrixData" column="FABDataId"/>
</bag>
<property name="DateCreated" column="DateCreated"/>
<property name="DateModified" column="DateModified"/>
</class>
</hibernate-mapping>
```
```
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="FabMatrixData" table="FABMatrixData" lazy="true">
<cache usage="nonstrict-read-write"/>
<id name="id" column="ID">
<generator class="identity"/>
</id>
<property name="Text" column="Text"/>
<one-to-one name="Type" class="FABType"></one-to-one>
<property name="DateCreated" column="DateCreated"/>
<property name="DateModified" column="DateModified"/>
</class>
</hibernate-mapping>
```
```
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="FABType" table="FABTypes" lazy="true">
<cache usage="nonstrict-read-write"/>
<id name="id" column="ID">
<generator class="identity"/>
</id>
<property name="Name" column="Name"/>
<many-to-one name="Data" class="FABMatrixData" column="FABTypeId">
</many-to-one>
<property name="DateCreated" column="DateCreated"/>
<property name="DateModified" column="DateModified"/>
</class>
</hibernate-mapping>
```
| Mapping DB structure to nHibernate mapping files | CC BY-SA 2.5 | 0 | 2010-11-15T01:39:38.343 | 2011-11-20T19:13:39.330 | null | null | 25,361 | [
"nhibernate",
"nhibernate-mapping"
] |
4,180,824 | 1 | 4,180,844 | null | 4 | 19,444 | I'm not sure where/how I specify this SQL Spatial Index hint on my query :-
```
SELECT Whatever
FROM Table1 a
INNER JOIN Table2 b ON a.Id = b.Id
WHERE @SomeBoundingBox.STIntersects(b.SomeGeographyShape) = 1
```
When I run the query, it's NOT using the Spatial Hint. Yes, I'm using the the latest version SQL Server 2008 r2 (v [10.5.1600.1](http://www.sqlsecurity.com/FAQs/SQLServerVersionDatabase/tabid/63/Default.aspx)).
So to compare the query speed by forcing the hint, I tried...
```
SELECT Whatever
FROM Table1 a
INNER JOIN Table2 b WITH (INDEX(MySpatialIndex)) ON a.Id = b.Id
WHERE @SomeBoundingBox.STIntersects(b.SomeGeographyShape) = 1
```
and that worked but it was really poor performance. I was wondering if it was trying to use my hint to do the `a.Id = b.Id` join (which i don't want to use the hint, for).
Any suggestions?
### UPDATE:
Added Query Plan. The bulk of the cost is the JOIN between the two tables. The Filter (where clause) takes up the 2nd most costly part.

| How can I specify this SQL Index Hint on my SQL Server 2008 query? | CC BY-SA 2.5 | 0 | 2010-11-15T01:42:58.063 | 2010-11-15T04:11:07.747 | 2020-06-20T09:12:55.060 | -1 | 30,674 | [
"sql",
"sql-server-2008",
"indexing",
"spatial",
"spatial-index"
] |
4,180,851 | 1 | 4,180,860 | null | 0 | 162 | please help:
I have a data set need to be stored like tree, following is stucture, I am not sure how to store this, the letters are not comparable, this is just a hierarchic structure

| What data structure should I use for hierarchical data? | CC BY-SA 3.0 | null | 2010-11-15T01:50:20.643 | 2011-08-03T13:58:42.307 | 2011-08-03T13:58:42.307 | 864,339 | 376,753 | [
"data-structures"
] |
4,180,905 | 1 | 4,182,424 | null | 5 | 4,893 | Given the following entity (some columns omitted from this long definition for brevity):
```
@Table(name = "Products")
public class Products implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "SKU")
private String sku;
@Basic(optional = false)
@Column(name = "ProductName")
private String productName;
private boolean allowPreOrder;
@ManyToMany(mappedBy = "productsCollection")
private Collection<Categories> categoriesCollection;
@JoinTable(name = "Products_CrossSell", joinColumns = {
@JoinColumn(name = "SKU", referencedColumnName = "SKU")}, inverseJoinColumns = {
@JoinColumn(name = "CrossSKU", referencedColumnName = "SKU")})
@ManyToMany
private Collection<Products> productsCollection;
@ManyToMany(mappedBy = "productsCollection")
private Collection<Products> productsCollection1;
@JoinTable(name = "Products_Related", joinColumns = {
@JoinColumn(name = "SKU", referencedColumnName = "SKU")}, inverseJoinColumns = {
@JoinColumn(name = "RelatedSKU", referencedColumnName = "SKU")})
@ManyToMany
private Collection<Products> productsCollection2;
@ManyToMany(mappedBy = "productsCollection2")
private Collection<Products> productsCollection3;
```
How do I get the set of related products for a given product SKU?
The products_related table looks like this:

I know how to get the answer using SQL but I'm new to JPA so I haven't quite grokked the API and query syntax yet.
| JPA: join table syntax | CC BY-SA 2.5 | 0 | 2010-11-15T02:07:18.177 | 2010-11-15T12:15:16.413 | null | null | 3,401 | [
"java",
"jpa"
] |
4,181,001 | 1 | 4,181,040 | null | 2 | 2,679 | I have Bloodshed Dev C++ 4.9.9.2.
Every time I stop typing for a second this hint pops up and I can't see a thing what I'm typing! I have a feeling that it waits for a most unsuitable moment to pop up. Then it disappears in 2 secs, or, sometimes, whenever it wants.

Is there a way to disable it? (haven't found one in the settings)
| How to disable hints in Dev C++? | CC BY-SA 2.5 | null | 2010-11-15T02:36:56.973 | 2011-12-18T05:55:35.720 | null | null | 420,376 | [
"c++",
"c",
"dev-c++",
"hints",
"type-hinting"
] |
4,181,029 | 1 | 4,181,702 | null | 5 | 5,470 | I'm subclassing NSScroller to try to make it look similar to how "scrollbars" look on iOS. I want it to just be an overlay representing the current position that is drawn OVER what is under it. For whatever reason if I override drawRect for the scroller, I get the bounds filled with white. Is there any way to prevent this so that way I can just be drawing on top of what my NSScroller sub class is over?
Edit:
Drawing with clear color seems to bring me close, but it is drawing "too clear" :P It's drawing right to the desktop, when I just want to be drawing down to the window. This picture might make it more clear

Any ideas?
| How to draw a transparent NSScroller | CC BY-SA 2.5 | 0 | 2010-11-15T02:44:21.217 | 2021-05-30T01:15:02.963 | 2010-11-16T05:09:00.497 | 95,636 | 95,636 | [
"objective-c",
"cocoa",
"nsview",
"nsscroller"
] |
4,181,241 | 1 | 4,181,383 | null | 1 | 63 | 
Hi!I have used UIBarButton Image but i have got such kind of issue.i mean Image+button on backside.for that i have written code below.
UIBarButtonItem *btnMap = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"mapbutton.png"] style:UIBarButtonItemStylePlain target:self action:@selector(btnMapClicked:)];
self.navigationItem.rightBarButtonItem = btnMap;
[btnMap release];
| why I have got such kind of BarButton one upon other? | CC BY-SA 2.5 | 0 | 2010-11-15T03:44:29.407 | 2010-11-15T04:24:42.127 | null | null | 198,680 | [
"ios4",
"uibarbuttonitem"
] |
4,181,607 | 1 | null | null | 0 | 212 | I am using the demo code from
[https://github.com/bengottlieb/Twitter-OAuth-iPhone](https://github.com/bengottlieb/Twitter-OAuth-iPhone)
When i build the demo code on iphone 3.0 it gives the 18 errors

It works on iphone 4.0
How can i solve these errors on iphone 3.0.??
| Twitter OAuth api on iphone 3.0? | CC BY-SA 2.5 | null | 2010-11-15T05:19:37.427 | 2010-11-15T15:01:02.387 | null | null | 446,029 | [
"iphone",
"twitter"
] |
4,181,898 | 1 | null | null | 0 | 1,781 | 
Dear all,
Actaully i am a admin user.i am trying to create a test user account for in app purchases...
when i log into the iOS Provisioning portal, i cant able to create test users.
also refer the screenshot i attched.in that it is mentioned that "Manage Your In App Purchases" module on the iTunes connect home page.but i dont find that kind of a module over there.it is given that "Manage your in app purchases" module will be shown if
> 1) you are an admin or Technical user
2) and your team agent has clicked
through the latest iOS developer
program License Agreement in the iOS
Developer provisioning portal.
can you please tell me why the "Manage your in app purchases" module is not shown to me?
And in the second point , i cant understand what they mean it actually ( related to team agent)
Please help me out , i have been searching a lot for this for the past 3 days...
Thank you for all your help and time.
| Help on creating test users on iTunes Connect Portal | CC BY-SA 2.5 | null | 2010-11-15T06:16:48.503 | 2011-03-26T22:31:55.057 | 2010-11-15T06:44:19.867 | 352,627 | 352,627 | [
"iphone",
"iphone-sdk-3.0"
] |
4,181,984 | 1 | null | null | 0 | 502 | If I am making a page using only the DIV elements - how would I go about aligning it to something shown in the picture below? What is the best approach (besides trial and error :)
I am not experienced in css and if you answer contains usage of this please provide brief explanation.

Bonus: How can I easily make the first column right-aligned as well?
| Formatting Divs for MVC - how to? | CC BY-SA 2.5 | null | 2010-11-15T06:35:05.823 | 2010-11-15T18:38:28.890 | null | null | 247,184 | [
"asp.net",
"asp.net-mvc-2",
"html"
] |
4,182,592 | 1 | 4,182,791 | null | 3 | 2,909 | I am building a simple site with extJS.
I can successfully attach click events from JQuery and from within extJS but only to elements which I create in the HTML in the body tag itself.
However, events that I attach to extJS-generated elements either have no effect or cause the extJS site not to be generated.
For example, all the examples on [in this tutorial](http://khaidoan.wikidot.com/extjs) simply don't work (and they show exactly what I want to do: manipulate DOM from inside extJS), but if I try to access a DOM element from inside extJS as it states, I simply get the error that that element "is null" as in the error screenshot below.
Here are the errors I get in Firebug:

although myPanel div does exist:

@Mchl, getCmp doesn't seem to work:

```
<html>
<head>
<title>New Backend Layout</title>
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css"/>
<script type="text/javascript" src="adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-all.js"></script>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<style type="text/css">
html, body {
font: normal 12px verdana;
margin: 0;
padding: 0;
border: 0 none;
overflow: hidden;
height: 100%;
}
.empty .x-panel-header {
background-color: #FFFF99;
}
.empty .x-panel-body {
text-align:left;
color: #333;
background-color: #FFFFCC;
padding: 10px;
font-size:11px;
}
.withtabs .x-panel-header {
background-color: #FFFF99;
}
.withtabs .x-panel-body {
text-align:left;
color: #333;
background-color: #FFFFCC;
font-size:11px;
}
.subpanel .x-panel-body {
padding: 5px;
}
.withtabs .x-tab-panel-header {
background-color: #CCFF99;
}
.withtabs .x-tab-strip {
background-color: #CCFF99;
}
</style>
<script type="text/javascript">
google.load("jquery", "1.4.3");
google.setOnLoadCallback(function() {
$('#testInHtml').css("background-color","yellow"); //changes color of element
$('#ext-gen9').css('background-color', 'red'); //does not change color of element
});
Ext.onReady(function() {
var item1 = new Ext.Panel({
title: 'Start',
html: 'Welcome',
cls:'empty'
});
var item2 = new Ext.Panel({
title: 'Application',
html: 'the application',
cls:'empty'
});
var accordion = new Ext.Panel({
region:'east',
margins:'5 5 5 0',
split:true,
width: 210,
bodyStyle: 'background: #FFFFCC',
layout:'accordion',
layoutConfig:{
animate:true
},
items: [item1, item2]
});
var content = new Ext.Panel({
id: 'myPanel',
region:'center',
margins:'5 0 5 5',
cls:'empty',
bodyStyle:'background:ivory; font-size: 13pt',
html:'<p id="test123">This is where the content goes for each selection.</p>',
// listeners: {
// click: function() {
// alert('was clicked333'); //has no effect
// }
// }
});
//Ext.get('myPanel').on('click', function() { alert('was clicked2');}); //causes extJS-generated site not to appear
Ext.get('testInHtml').on('click', function() {alert('was clicked');}); //works
//Ext.get('ext-gen9').on('click', function() {alert('was clicked');}); //causes extJS-generated site not to appear
var viewport = new Ext.Viewport({
layout:'border',
items:[content, accordion]
});
});
</script>
</head>
<body>
<p id="testInHtml">this is a test</p>
</body>
</html>
```
@arun, "this" seems to contain the right element, but it does not change the background color (although it does in a jquery-only example without extJS which I tested), and I cannot manipulate it in any way with any other css attributes:

| How can I get JQuery/Javascript access to elements generated by extJS? | CC BY-SA 2.5 | 0 | 2010-11-15T08:25:26.357 | 2010-12-15T11:27:43.880 | 2010-12-15T11:27:43.880 | 114,251 | 4,639 | [
"javascript",
"jquery",
"events",
"extjs",
"event-handling"
] |
4,183,287 | 1 | null | null | 0 | 320 | I want my tooltip to include a an active url link. Would it be possible in a MapView? Or do i have to place my MapView inside a WebView for this purpose? Any tutorial on the web? Any solution?
Here is something i require:

| Is it possible to have an active url in a tooltip in Google Map in Android | CC BY-SA 2.5 | null | 2010-11-15T10:07:42.843 | 2010-11-16T05:59:08.920 | 2010-11-15T11:13:27.833 | 2,355,649 | 2,355,649 | [
"android"
] |
4,183,854 | 1 | null | null | 2 | 2,610 | How can i make widgets overlap one another.
Lower most should be image, rest above can be other widgets like buttons.

| overlapping widgets gtk | CC BY-SA 2.5 | 0 | 2010-11-15T11:24:20.187 | 2010-11-15T12:46:06.487 | null | null | 276,989 | [
"gtk"
] |
4,184,141 | 1 | 4,184,341 | null | 4 | 1,480 | I've got a small clipping problem that I haven't been able to solve using an EditText view in a TableRow. Whatever I try, the EditText view is either clipped (attached screenshot), or, if I set shrinkColumns to either 0 or 1, the label text disappears (and the EditText view takes up the whole width). The layout is as follows:
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" android:padding="10dip">
<TableLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TableRow android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:paddingRight="10dip" android:layout_column="1"
android:text="Label Text" />
<EditText android:text="Very long text that makes the text view go on clipping frenzy"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
</LinearLayout>
```
I've tried it on a 2.2 emulator running at QVGA and HVGA, a HTC Hero on 2.1 and the Wildfire on 2.1 as well. I've also played around with the clipToPadding attribute which doesn't seem to help in my case. The same issue appears if I set the hint attribute with a long text and leave the text value empty.
As I am doing nothing particularly complex, I suspect a simple error on my side. Any ideas, hints or suggestions are highly appreciated.
Cheers!

| Android text clipping problem with EditView inside a TableLayout | CC BY-SA 2.5 | 0 | 2010-11-15T12:06:31.843 | 2010-11-15T12:35:23.637 | null | null | 249,893 | [
"android",
"text",
"tablelayout",
"clipping"
] |
4,184,315 | 1 | null | null | 5 | 10,088 | How can i customize gtk window title bar. I need to add custom buttons, and title bar image.
| customizing gtk window title bar | CC BY-SA 2.5 | 0 | 2010-11-15T12:29:23.393 | 2021-03-13T17:06:26.117 | 2010-11-15T13:00:54.903 | 276,989 | 276,989 | [
"gtk"
] |
4,184,323 | 1 | 4,184,339 | null | 2 | 1,778 | I'm really pulling my hair out, this must be a simple problem, but I just can't see it.
I'm just trying to assign a value to a variable from a text field.
In my h file I have
```
NSString *currentPass;
@property (nonatomic, retain) NSString *currentPass;
```
My m file.
```
@synthesize currentPass;
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:
(NSInteger)buttonIndex{
if (alertView.tag == AlertPasswordAsk) {
UITextField* theTextField = ((UITextField*)[alertView viewWithTag: 5]);
currentPass = [NSString stringWithFormat:@"%@", theTextField.text];
if ([theTextField isEditing]) {
[theTextField resignFirstResponder];
}
}
}
- (void)alertView:(UIAlertView *)alertView
didDismissWithButtonIndex:(NSInteger)buttonIndex{
NSLog(@"didDismissWithButtonIndex tag=%i", alertView.tag);
if (alertView.tag == AlertPasswordAsk) {
if(buttonIndex == 1){
NSUserDefaults *myDefaults = [NSUserDefaults standardUserDefaults];
NSString *strPassword = [NSString alloc];
strPassword = [myDefaults stringForKey:@"pass"];
// ######### ERROR OCCURS HERE #########
NSLog(@"currentPass=%@ strPassword=%@", currentPass, strPassword);
if (![currentPass isEqualToString:strPassword]) {
```

```
[6337:207] didDismissWithButtonIndex tag=10
Current language: auto; currently objective-c
(gdb) continue
Program received signal: “EXC_BAD_ACCESS”.
(gdb) bt
#0 0x02894903 in objc_msgSend ()
#1 0x00000000 in ?? ()
```
| NSString out of scope problem? | CC BY-SA 2.5 | 0 | 2010-11-15T12:30:58.497 | 2010-11-15T14:46:44.227 | null | null | 450,456 | [
"iphone",
"objective-c",
"xcode"
] |
4,184,605 | 1 | 4,185,141 | null | 4 | 2,009 | Notice in Xcode's symbols list (the NSPopUpButton directly above the editor, to the right of the recently edited documents), it shows `<No selected symbol>` when you're out of scope of any symbols it lists, but then when you click on it that option is not there. Is there a trick to making this "placeholder" magic happen, or is there a setter somewhere I'm not seeing?


| NSPopUpButton placeholder value? | CC BY-SA 2.5 | 0 | 2010-11-15T13:04:01.970 | 2010-11-15T15:34:25.100 | null | null | 322,122 | [
"objective-c",
"cocoa",
"macos",
"nspopupbutton"
] |
4,184,627 | 1 | 6,317,146 | null | 0 | 6,739 | I have a dataset which counts the number of produced pallets per hour, eg
11/11/2010 22:00 --> 22
11/11/2010 23:00 --> 12
11/12/2010 00:00 --> 18
11/12/2010 01:00 --> 19
11/12/2010 03:00 --> 20
As you may notice, there is a gap between 01:00 and 03:00 since there is no data for that hour. This data gets visualised in SSRS 2005 using a graph with a time-scale x-axis. When the graph type is 'Column', there is no problem at all since 02:00 gets visualised with no (0) value and the gap is well visible in the graph. When the graph type is 'Line' or 'Area', 02:00 is visualised on the graph as well but with no 0 value: there is a connection line between the value of 01:00 and 03:00. When looking to the line graph, one could conclude that there was production at 02:00 but this is not true, it is just the line that connects the value of 01:00 with the value of 03:00.
Example of the same data in an Area graph (original image: [http://img577.imageshack.us/img577/9616/area.jpg](http://img577.imageshack.us/img577/9616/area.jpg))
and a Column graph (original image: [http://img577.imageshack.us/img577/7590/column.jpg](http://img577.imageshack.us/img577/7590/column.jpg))
should explain the problem.
Does anyone know how to resolve this problem? Thank you!
| SSRS line graph: x-axis time-scale with gaps in data | CC BY-SA 2.5 | null | 2010-11-15T13:06:27.673 | 2011-06-11T16:35:52.453 | 2010-11-16T11:10:27.037 | null | 508,251 | [
"reporting-services",
"axis",
"scalar"
] |
4,184,837 | 1 | null | null | 2 | 129 | I used to be able to click on a StyleCop warning and select a "Show Help Menu" which would show me more info about the warning.
Can anyone suggest why I am not seeing it now?
D:\Users\UserName\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#
| StyleCop no longer shows "Show Help" context sensitive menu | CC BY-SA 2.5 | null | 2010-11-15T13:31:21.723 | 2011-03-03T13:40:16.853 | 2010-11-15T13:34:14.970 | 40,347 | 493,669 | [
"visual-studio",
"stylecop"
] |
4,185,267 | 1 | null | null | 1 | 661 | I have a BubbleSeries within a Chart. I bind data to the BubbleSeries and set a specific color to the bubbles.
What I want to do is to iterate over all the bubbles and set each bubble's color to specific color depending on the value.
My bubbles, two series:

The gray bubbles should always be gray, but the blue bubbles should have different colors depending on their SizeValue.
Any clues how to iterate over the bubbles and set their specific color? Possible?
| WPF BubbleSeries, iterate over the bubbles and set the style | CC BY-SA 2.5 | null | 2010-11-15T14:27:47.140 | 2010-11-16T12:15:31.207 | null | null | 452,861 | [
"c#",
"wpf",
"wpftoolkit"
] |
4,185,304 | 1 | null | null | 0 | 620 | I'm trying to make selectable NSToolbarItems. I've connected everything correctly in IB, but `toolbarSelectableItemIdentifiers:` is not working. It doesn't get called. The delegate is the File's Owner (subclass of NSWindowController), and the toolbar is in a sheet. Here's my code:
```
// TOOLBAR DLGT
- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar {
NSLog(@"Foo");
NSMutableArray *arr = [[NSMutableArray alloc] init];
for (NSToolbarItem *item in [toolbar items]) {
[arr addObject:[item itemIdentifier]];
}
return [arr autorelease];
}
```
Screenshot:

Can you help me please?
---
| toolbarSelectableItemIdentifiers: is not called | CC BY-SA 2.5 | null | 2010-11-15T14:32:16.280 | 2010-11-15T20:53:34.093 | 2020-06-20T09:12:55.060 | -1 | null | [
"objective-c",
"cocoa",
"delegates",
"nstoolbar",
"nstoolbaritem"
] |
4,185,426 | 1 | 4,185,446 | null | 2 | 93 | I have the following entities

AddressType is simply an enum field that define if the Email is Personal/Work/Other.
Is it possible to do a query that returns a flattened result like the one in the following sample?
```
CustomerID Full Name Personal Email Work Email
----------- -------------- ----------------- -----------------------
1 John Doe [email protected] [email protected]
```
| Join query with flattened result | CC BY-SA 2.5 | null | 2010-11-15T14:43:27.677 | 2010-11-15T14:59:54.203 | null | null | 431,537 | [
"sql-server-2008"
] |
4,185,532 | 1 | 4,210,476 | null | 2 | 17,641 | I am discovering Pentaho DI and i am stuck with this problem :
I want to insert data from a csv file to a custom DB, which does not support the "insert table" step. So i would like to use the sql script step, with one request :
```
INSERT INTO myTable
SELECT * FROM myInput
```
And my transformation would like this :

I don't know how to get all my data from the csv to be injected in the "myInput" field.
Could someone help me ?
Thanks a lot :)
| Pentaho kettle : how to execute "insert into ... select from" with the sql script step? | CC BY-SA 2.5 | 0 | 2010-11-15T14:55:00.080 | 2013-12-05T06:50:12.753 | null | null | 204,682 | [
"pentaho",
"kettle"
] |
4,185,838 | 1 | 4,191,004 | null | 2 | 3,446 | Hello awesome dev community.
I have looked for an answer to this for days now and just can't seem to find a handle, so decided to post Q myself.
I have a game that has menus for picking items.
The menus can have 2 -> 30+ items, so they need to scroll. There are also category menus, which when an item is clicked, a new menu with that category's items appears.
I figured that the most efficient way to go about it is by creating all the elements needed for the menu on a dedicated layer.
The issue is that I have no idea how to call my addNewItems:itemsArray function defined in the main game scene, from the CCLayer containing the menu.
Or, should I just use one layer? A bit messy and difficult to move multiple items together.
Thank you so much for any help - or pointing me in the direction of a clear tutorial or examples of how to do that since I honestly couldn't find any.
Below is a flowchart of what I'm looking to create.
Thanks!!
Hanaan

| Cocos2d: Calling function from one CCLayer in another (parent?) CCLayer | CC BY-SA 2.5 | 0 | 2010-11-15T15:23:34.773 | 2010-11-16T03:36:48.850 | null | null | 359,984 | [
"function",
"cocos2d-iphone",
"cclayer"
] |
4,186,053 | 1 | 8,631,922 | null | 23 | 11,131 | We are using and with the .
We use the for the like the query.
The problem is when we move to sprint 2 the "Current Sprint" still points to sprint 1.
Is there a way to to tell TFS that we are now currently in sprint 2 and have the queries use a variable to run against instead of hard-coding the sprint?
For example: If you look at the screen shot below you will notice that the definition of the query uses a variable called "@Project" for the team project. Is there a way to have a variable for the sprint?

| How to update current sprint team queries in TFS 2010? | CC BY-SA 2.5 | 0 | 2010-11-15T15:46:59.600 | 2018-03-02T19:57:26.947 | 2011-12-26T19:58:21.307 | 422,565 | 49,215 | [
"tfs",
"scrum",
"tfs-process-template"
] |
4,186,188 | 1 | 4,188,300 | null | 1 | 135 | I've created this contrived example to illustrate my problem. There are two paragraphs with a div in between. The div's height and line-height have been set to 0 and all margins are also 0. I would expect for the two paragraphs to be right next to each other without any spacing from the div at all, however this is not the case in IE6. It seems to work fine in all other browsers.
Here is the HTML with all styles inlined:
```
<!DOCTYPE html>
<html lang='en'>
<head>
<title>Test</title>
</head>
<body>
<div id="container" style="border: 1px solid blue;">
<p style="margin: 0;">
Some text
</p>
<div style="height: 0; line-height: 0; margin: 0; border: 1px solid red;">
</div>
<p style="margin: 0; border: 1px solid green">
Should be right below "Some text"
</p>
</div>
</body>
</html>
```
I've added in a few borders just so you can more easily see what's going on.
Here's a screenshot of what's happening in IE6:

Any ideas on how I can get rid of that little space between the bottom of the div (red) and the top of the paragraph (green)?
| IE6 renders spacing even when margin and padding are zero | CC BY-SA 2.5 | null | 2010-11-15T16:00:40.790 | 2010-11-15T20:01:08.207 | null | null | 1,247 | [
"css",
"whitespace",
"internet-explorer-6"
] |
4,186,282 | 1 | 4,186,318 | null | 3 | 6,525 | I have read through [Scott Hanselman's post](http://www.hanselman.com/blog/SplittingDateTimeUnitTestingASPNETMVCCustomModelBinders.aspx) on this topic. I found [another article](http://devblog.lundy.us/2010/09/28/date-time-picker-asp-net-mvc-jquery-part-1/) that seems to be a simpler approach. The second of which I decided to try.
However, the first portion in creating the EditorTemplates is not working for me. I copied DateTime.ascx and TimeSpan.ascx has the author had them written. Then I split the fields in my view.
```
<div class="editor-label">
<%= Html.LabelFor(model => model.LeaveRequest.DateOfLeave)%>
</div>
<div class="editor-field">
<div class="date-container">
<%= Html.TextBoxFor(model => model.LeaveRequest.DateOfLeave.Date)%>
</div>
<div class="time-container">
<%= Html.TextBoxFor(model => model.LeaveRequest.DateOfLeave.TimeOfDay)%>
</div>
<div class="clear">
<%= Html.ValidationMessageFor(model => model.LeaveRequest.DateOfLeave)%>
</div>
</div>
```
The problem I am having is that the behavior I am getting is not the same that that author explained as should happen. Here is a screenshot of my results.

I must be missing something, but I can't tell what. I have read this article several times and can't see what I am missing. I am guessing there needs to be something to tell the program to us the new EditorTemplates, but I don't know how.
| Split DateTime to Date and Time in ASP.NET MVC | CC BY-SA 2.5 | null | 2010-11-15T16:09:24.987 | 2010-11-15T16:20:24.673 | null | null | 2,535 | [
"asp.net-mvc",
"datetime",
"mvc-editor-templates"
] |
4,186,360 | 1 | 4,186,405 | null | 2 | 557 | I am facing a weird problem with a text field on my page. This HTML structure is generated by some Java code (which is very cluttered and written years back). The problem I am facing is, when I click on the text field (Highlighted in the snapshot), the cursor positions itself on the second field instead of the very first one. This happens only with this particular column only. I have shared the basic HTML structure of one of this table (though its cluttered please bear with me).
HTML: [http://jsfiddle.net/t3ch/yq4Xb/](http://jsfiddle.net/t3ch/yq4Xb/)

| Initial HTML text field cursor position | CC BY-SA 2.5 | null | 2010-11-15T16:16:04.220 | 2010-11-15T16:23:09.700 | 2010-11-15T16:23:09.700 | 157,247 | 449,035 | [
"java",
"html",
"css",
"jsp"
] |
4,186,520 | 1 | 4,188,972 | null | 2 | 1,947 | I've got a WinForm application with separate groupboxes and objects, but the code isn't sorted by groupbox and pretty messed up.
Can the code be split in 2 files or something with the objects on the same place?
EDIT:
this is my code:

how should i split it?
(i need everything with News and everything with Dir changed)
| Separate code in single Form [C#] | CC BY-SA 3.0 | null | 2010-11-15T16:29:20.813 | 2014-09-20T11:08:12.503 | 2014-09-20T11:08:12.503 | 759,866 | 508,081 | [
"c#",
"winforms"
] |
4,186,650 | 1 | 4,186,690 | null | 0 | 191 | Here is the relevant HTML:
```
<div class="row">
<div class="arrow box">◄</div>Month Year<div class="dayMonth box"></div>►<div class="arrow box"></div>
</div>
```
Here is the css which the .html file that the above HTML is in links to:
```
*
{
margin: 0;
padding: 0;
}
body
{
font-family: "Times New Roman";
font-size: 12pt;
}
.dayMonth
{
width: 80%;
}
.arrow
{
width: 10%;
}
.row
{
width: 58em;
background-color: gray;
margin-right: auto;
margin-left: auto;
}
.box
{
float: left;
text-align: center;
}
```
This is the output:

The "row" is centering in the browser right but the stuff inside it (the two arrows and the Month Year) aren't doing what I want.
What I think this should be doing is, because there are two arrows and both of their widths is sent to 10% and then the dayMonth width is 80% that all the divs should take up the entire "row" (because they sum to 100%) and that the text "Month Year" should be centered within the "row" because the .dayMonth css class says it should be centered in its div and because its div should be the center 80% of the "row". This, obviously, isn't happening though.
I don't want a different solution (per se) I want to know why the code I've written doesn't express the idea that I want it to express, doesn't work the way I want it to.
I think I must be misunderstanding how %'s governs widths. [http://www.w3schools.com/css/pr_dim_width.asp](http://www.w3schools.com/css/pr_dim_width.asp) says that %'s "Defines the width in percent of the containing block" though and that looks like %'s should do what I intend them to do so I'm thoroughly confused.
Where have I gone wrong?
| Setting the width of HTML div's with %'s | CC BY-SA 3.0 | null | 2010-11-15T16:40:16.170 | 2015-01-03T21:43:37.473 | 2015-01-03T21:43:37.473 | 2,065,702 | 282,315 | [
"html",
"css",
"margins"
] |
4,186,807 | 1 | 4,186,856 | null | 2 | 899 | I am making a program with graphics.h in C.I am trying to implement the matrix screen saver but I am stuck here in the code.The alphabets fall just once.I want them to keep on falling (removing the text before).Please guide me how to clear the old contents
```
void main_page(void)
{
int i,j,k,l,m,n,size;
setcolor(BLUE);
for(i=0;i<500;i+=50)
{
settextstyle(GOTHIC_FONT,1,1);
outtextxy(50,50+i,"a b c");
outtextxy(100,150+i,"H I J");
outtextxy(150,250+i,"X Y Z");
outtextxy(300,50+i,"D E F");
outtextxy(350,350+i,"D E F");
outtextxy(400,350+i,"D E F");
outtextxy(450,350+i,"D E F");
outtextxy(500,50+i,"D E F");
outtextxy(550,350+i,"D E F");
outtextxy(600,350+i,"D E F");
delay(100);
}
```

| matrix sort of graphics in C | CC BY-SA 2.5 | null | 2010-11-15T16:55:31.287 | 2022-04-06T20:56:02.007 | 2022-04-06T20:56:02.007 | 44,729 | null | [
"c",
"bgi"
] |
4,186,953 | 1 | 4,187,883 | null | 4 | 1,455 | How can I implement in my own custom windows control library like below?

| Custom Windows Control library in C# | CC BY-SA 2.5 | 0 | 2010-11-15T17:10:17.653 | 2011-09-11T03:39:19.403 | 2010-11-15T17:13:58.357 | 47,550 | 395,703 | [
"c#",
"custom-controls"
] |
4,187,031 | 1 | 4,187,055 | null | 0 | 3,832 | I want to create a PDF reader like iBooks. So that you can see the thumbnails for the pages, press on it and it opens the page etcetera. Also the bookshelf for showing the loaded PDF's
Does anyone know how I can create something like that? Is there a library or does somebody knows a good tutorial?
Thanks in advance!
What I need is something like this:

| PDF Reader like iBooks | CC BY-SA 2.5 | 0 | 2010-11-15T17:19:20.860 | 2012-02-08T17:20:47.500 | 2010-11-15T17:41:15.733 | 387,556 | 387,556 | [
"iphone",
"xcode",
"ios4",
"ipad"
] |
4,187,498 | 1 | null | null | 4 | 47,489 | I'm trying to make a simple alphabetical list to order items in my database. The thing I can't figure out is how to actually list it.
I would like it to be the same format as you have on miniclip.com
Here's an image

I looked around, but couldnt find an answer really.
(I would like it to finish even at the end of each vertical column, except the last one for sure)
Any help would be welcome!
| PHP Order in alphabetical order | CC BY-SA 2.5 | 0 | 2010-11-15T18:14:18.950 | 2015-10-13T06:35:33.510 | null | null | 460,033 | [
"php",
"list"
] |
4,187,695 | 1 | 4,187,755 | null | 3 | 1,558 | How can I create an interface similar like the following in Java (tweetie)?

I was thinking of using a JTable with one columns and customized cell that has an image in it...not sure how to do it though.
| creating a table interface in java | CC BY-SA 2.5 | null | 2010-11-15T18:43:22.097 | 2010-11-18T17:55:25.253 | 2010-11-18T17:55:25.253 | 2,598 | 95,265 | [
"java",
"swing",
"user-interface",
"jtable"
] |
4,187,840 | 1 | 4,208,442 | null | 0 | 3,953 | I have a chart in Report Builder 2.0 with multiple series values (the fields added to the box along the top side of the chart) and no series fields (box on right side of chart) or category fields (box along bottom side of chart). The different values belong to different categories but there is no one field that splits these values between categories, so I cannot put a particular field in the category fields segment of the chart. However, in the Series Properties window for my chart, I can set the Category Field property to some arbitrary string. I was trying to set this Category Field property differently in my different series, but only the first Category Field value shows up along the x-axis in my chart. I have edited the Axis Properties to have an interval of 1, but I still only see the first Category Field. Beyond that, all my different values get clumped together on the x-axis with no space between them, and the first Category Field value is centered under all the bars, making it look as if they all have the same Category Field. How can I change this? See the screenshot below.

The red circled series values all have the same value set for their Category Field, while the other series values have different values set for Category Field. Despite the dummy chart showing separate categories A, B, C, etc., my actual chart when I render the report shows a single category: the value for the first series value's Category Field
| chart in Report Builder 2.0 does not show all Category Fields in x-axis | CC BY-SA 2.5 | null | 2010-11-15T19:03:42.640 | 2010-11-17T19:42:42.610 | null | null | 38,743 | [
"reporting-services",
"charts",
"ssrs-2008",
"reportbuilder"
] |
4,188,482 | 1 | 4,188,574 | null | 2 | 1,448 | 
Is there any module that could aid me in producing something like this?
| Plotting 3D scatter with python? | CC BY-SA 3.0 | null | 2010-11-15T20:26:20.083 | 2019-08-07T15:33:23.343 | 2013-10-19T15:35:39.123 | 1,207,193 | 433,417 | [
"python",
"3d"
] |
4,188,741 | 1 | 4,253,371 | null | 0 | 1,240 | I have a portal in my contacts table layout that shows related mention in a second "mentions" table. This related table has a relationship to a third "sources" table that I want the user to select from when they view the data in the "mentions" portal of my "contacts" layout. This works for the most part. The problem comes when the user changes the "source" in the portal then attempts to change the "source" in the next portal row t will change the "source" to the last select source regardless to make a selection
any ideas ?
here are some screen shots of how I have it setup
portal and specified field

and field control setup 
and the relationship

| FileMaker Pro pop up values from related table | CC BY-SA 2.5 | null | 2010-11-15T20:57:12.377 | 2011-09-29T13:02:18.223 | 2010-11-18T13:54:06.397 | 234,670 | 234,670 | [
"portal",
"filemaker"
] |
4,188,859 | 1 | 4,188,880 | null | 61 | 55,874 | I want to put a button next to a EditText and I want their heights to match.
For example, from the built in Android browser:

The Go button is the same height as the EditText field. I know I could wrap both these views in a parent layout view, and set both of their heights to fill_parent, and that would make them match. However, I would like to do this without having to give the layout a static size. I would rather have the EditText take whatever height it needs based on the font size and then have the button next to it match whatever height that might be.
Is this possible with an xml layout?
| How to get a button's height to match another element's height? | CC BY-SA 2.5 | 0 | 2010-11-15T21:13:07.577 | 2020-06-10T10:06:36.460 | null | null | 445,348 | [
"android",
"layout",
"height",
"match"
] |
4,189,234 | 1 | 4,217,726 | null | 5 | 691 | I want to draw a variable number of equidistant points on a HTML5 canvas element, using JavaScript. How do I calculate the X/Y position of each point?
I want the distance from one point to its direct neighbours and to the edges of the canvas to be the same.
If I had an 8px x 8px canvas and 4 points, the distace from a point to it's direct neighbours and to the edges of the canvas would be 2px.
But what if i had an uneven number of points and not a square canvas?
(i think an image might help to understand my problem a little better)

| Equidistant points on canvas | CC BY-SA 2.5 | 0 | 2010-11-15T21:58:45.460 | 2010-11-18T17:27:07.007 | 2010-11-15T22:53:15.850 | 229,189 | 229,189 | [
"javascript",
"math",
"html",
"canvas"
] |
4,189,393 | 1 | 4,192,088 | null | 1 | 669 | I'm trying to rehost the designer, but every time I slap a workflow into the designer:
```
_workflowDesigner = new WorkflowDesigner();
// added to UI here
Properties.Content = _workflowDesigner.PropertyInspectorView;
_workflowDesigner.Load(myWorkflowInstance);
```
where `myWorkflowInstance` is a workflow defined in a referenced assembly. I have done the magic `Register` to get the default activity metadata registered:
```
new DesignerMetadata().Register();
```
and I've registered all my custom NativeActivities:
```
public static void Register(IEnumerable<Type> activityTypes)
{
// activityTypes are all my custom NativeActivities
// and all workflows (root of System.Activities.Activity)
var builder = new AttributeTableBuilder();
var attrGroups =
from x in activityTypes
from y in x.GetCustomAttributes(true).OfType<Attribute>()
group y by x into g
select g;
foreach (var typeGroup in attrGroups)
builder.AddCustomAttributes(typeGroup.Key, typeGroup.ToArray());
MetadataStore.AddAttributeTable(builder.CreateTable());
}
```
yet, when I load an activity in the designer this is what I get:

What am I missing here?
---
I'm thinking it has something to do with the fact that these workflows are compiled and only exist within the Implementation property of an Activity...
| Activities are always collapsed in rehosted designer | CC BY-SA 2.5 | 0 | 2010-11-15T22:17:08.380 | 2010-11-17T11:37:51.807 | 2010-11-15T22:40:58.373 | null | null | [
"android-activity",
"designer",
"workflow-foundation-4",
"rehosting"
] |
4,189,736 | 1 | 5,087,427 | null | 5 | 4,347 | I have this problem that a week ago, when debugging, suddently the "Locals" window is blank, the "Immediate Window" and Watches don't work and all return "Unable to evaluate the expression."
Also the standard debugger display stopped giving me any info when I break the execution to check out stuff :-(

I have played around with all the debugger settings, but none of them seems to have any effect what so ever on my problem.
I did install the MVC3 RC1 and the Nupack just before my problem started, but removing them haven't solved anything.
I also removed all extensions and addons one by one to find the cause, but no result..
Does anybody have an idea?
I'm running on Win7 x64 on a Standard Core2 based laptop.
| Visual Studio 2010: suddently Locals, Immediate Window and Watches don't work | CC BY-SA 2.5 | 0 | 2010-11-15T23:03:48.263 | 2011-05-05T04:54:48.623 | null | null | 454,714 | [
"debugging",
"visual-studio-2010",
"immediate-window"
] |
4,190,128 | 1 | 4,190,216 | null | 5 | 310 |
### Updates : 3 updates added below
The following sql statement takes 5 mins to complete. I. Just. Don't. Get. It :(
First table has 6861534 rows in it. Second table has a little bit less .. and third table (which contains 4 GEOGRAPHY FIELDS) has the same as the first.
Those `GEOGRAPHY` fields in the 3rd table .. they shouldn't be messin' with the sql statement ... should it? Could it be because the table is so large (due to the `GEOGRAPHY` fields) that it has huge page sizes or something .. thus destroying the table scan a COUNT does?
```
SELECT COUNT(*)
FROM [dbo].[Locations] a
inner join [dbo].[MyUSALocations] b on a.LocationId = b.LocationId
inner join [dbo].[GeographyBoundaries] c on a.locationid = c.LocationId
```




### Update
As requested, here's some more info about the GeographyBoundaries table...

```
/****** Object: Index [PK_GeographyBoundaries] Script Date: 11/16/2010 12:42:36 ******/
ALTER TABLE [dbo].[GeographyBoundaries] ADD CONSTRAINT [PK_GeographyBoundaries] PRIMARY KEY CLUSTERED
(
[LocationId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
```
### Update #2 - After adding the Non-Clustered Index
After adding the non-clustered index, it's now dropped down to 4 seconds! Which is awesome. But ?

What Zee Frak?
### Update 3 - even more interesting and confusing info!
Now, when i just do ONE join and force the INDEX .. it goes back to 5 mins. I did this to
- -
.
```
SELECT COUNT(*)
FROM [dbo].[Locations] a
INNER JOIN [dbo].[GeographyBoundaries] c
WITH (INDEX(PK_GeographyBoundaries)) ON a.locationid = c.LocationId
```
| Why does this Sql Statement (with 2 table joins) takes 5 mins to complete? | CC BY-SA 2.5 | 0 | 2010-11-16T00:19:12.397 | 2011-05-11T10:30:52.490 | 2011-05-11T10:30:52.490 | 440,502 | 30,674 | [
"sql",
"sql-server",
"performance",
"sql-server-2008"
] |
4,190,405 | 1 | 4,190,427 | null | 0 | 233 | In the interest of eliminating as many nested queries as possible, I'm trying to optimize the following query:
```
SELECT fp.id,
fp.user_id,
COUNT(c.id) AS num_replies,
c2.created AS latest_activity_time, c2.user_id AS latest_activity_user_id
FROM forum_posts fp
LEFT JOIN comments c ON c.object_id = fp.id
LEFT JOIN (SELECT created, user_id
FROM comments
ORDER BY created DESC
LIMIT 1) AS c2 ON fp.id = c2.object_id
WHERE fp.deleted != 1
GROUP BY fp.id
```
So basically, what we have here is a table of forum posts and a table of comment replies to those posts. Each forum post can have multiple replies. The first join is used for counting the total number of replies, and the second join is used to get the most recent reply's information. What I get back from this query is something like this:

So, I'm basically trying to figure out how I can do this without having to resort to this nested query. Any help you guys can provide would be extremely useful.
Thanks!
: I've adjusted the query slightly to reflect the fact that I need to pull back not just the `latest_activity_time`, but also the `latest_activity_user_id`. Sorry for the confusion!
| Reading most recent values in a join without performing a nested SELECT | CC BY-SA 2.5 | null | 2010-11-16T01:22:15.770 | 2010-11-16T19:00:36.533 | 2010-11-16T01:43:30.807 | 385,950 | 385,950 | [
"sql",
"mysql",
"join",
"greatest-n-per-group",
"subquery"
] |
4,190,457 | 1 | 4,982,228 | null | 0 | 951 | Given a collection of Word objects, I want to display a scrollable tag cloud similar to what is shown below. My Word class has properties for Name and Rank from which I will determine sorting and weighting of the fonts. Each word should be a selectable object (for invoking some event). Since the collection can contain thousands of objects, I only need to manage words that are currently presented in the view (i.e., as they scroll off the bottom or top of the screen, I no longer care about them).
How would you approach this?

| Ideas for programming a scrolling tag cloud on iPhone? | CC BY-SA 2.5 | 0 | 2010-11-16T01:35:49.197 | 2011-02-13T03:34:31.757 | 2010-11-16T01:49:29.350 | 413,631 | 413,631 | [
"iphone",
"objective-c",
"tag-cloud"
] |
4,190,506 | 1 | 4,190,547 | null | 2 | 4,599 | I have a difference of time execution between a 1-minute query and the same one in a table-valued function.
But the most weired thing is that running the UDF with another (valid) company_id argument
gives me a result in ~40 seconds and as soon as I change this company_id for 12 (valid again), it never stops. and of course, the long one is the most complicated. BUT the execution plan between the batch version and the UDF version are the same AND the batch version is fast...!
If I do the following query "by hand", the execution time is 1min36s with 306 rows:
```
SELECT
dbo.date_only(Call.date) AS date,
count(DISTINCT customer_id) AS new_customers
FROM
Call
LEFT OUTER JOIN
dbo.company_new_customers(12, 2009, 2009) new_customers
ON dbo.date_only(new_customers.date) = dbo.date_only(Call.date)
WHERE
company_id = 12
AND year(Call.date) >= 2009
AND year(Call.date) <= 2009
GROUP BY
dbo.date_only(Call.date)
```
I stored this exactly same query in a function and ran it like that :
```
SELECT * FROM company_new_customers_count(12, 2009, 2009)
```
13 minutes for now that it is running... And I am sure that it will never give me any result.
Yesterday, I had the exact same infinite-loop-like behaviour during more than 4h (so I stopped it).
Here is the definition of the function:
```
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION company_new_customers_count
(
@company_id int,
@start_year int,
@end_year int
)
RETURNS TABLE
AS
RETURN
(
SELECT
dbo.date_only(Call.date) AS date,
count(DISTINCT customer_id) AS new_customers
FROM
Call
LEFT OUTER JOIN
dbo.company_new_customers(@company_id, @start_year, @end_year) new_customers
ON dbo.date_only(new_customers.date) = dbo.date_only(Call.date)
WHERE
company_id = @company_id
AND year(Call.date) >= @start_year
AND year(Call.date) <= @end_year
GROUP BY
dbo.date_only(Call.date)
)
GO
```
I would be very happy to understand what is going on.
Thanks
Additional:
```
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Description: Create the list of new customers of @company_id
-- in the given period.
-- =============================================
CREATE FUNCTION company_new_customers
(
@company_id int,
@start_year int,
@end_year int
)
RETURNS TABLE
AS
RETURN
(
SELECT
customer_id,
date
FROM
( -- select apparition dates of cutomers before @end_year
SELECT
min(date) AS date,
customer_id
FROM
Call
JOIN
Call_Customer ON Call_Customer.call_id = Call.call_id
WHERE
company_id = @company_id
AND year(date) <= @end_year
GROUP BY
customer_id
) new_customers
WHERE
year(date) >= @start_year -- select apparition dates of cutomers after @start_year
)
GO
```
```
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Julio Guerra
-- Create date: 14/10/2010
-- Description: Return only the date part of a datetime value
-- Example: date_only('2010-10-25 13:00:12') returns 2010-10-25
-- =============================================
CREATE FUNCTION date_only
(
@datetime datetime
)
RETURNS datetime
AS
BEGIN
RETURN dateadd(dd, 0, datediff(dd, 0, @datetime))
END
GO
```


| SQL Server 2005 Table-valued Function weird performance | CC BY-SA 2.5 | null | 2010-11-16T01:47:07.467 | 2010-11-16T18:43:04.367 | 2010-11-16T18:43:04.367 | 24,995 | 303,726 | [
"sql",
"sql-server",
"sql-server-2005",
"tsql",
"user-defined-functions"
] |
4,191,195 | 1 | 4,191,391 | null | 1 | 13,782 | How can I create below type of gridview with merge merged header columns? If anybody have example share with me.

Thanks in advance.
| Merge Merger header columns in gridview? | CC BY-SA 2.5 | 0 | 2010-11-16T04:21:11.987 | 2016-06-19T15:21:21.697 | null | null | 158,008 | [
"c#",
"asp.net"
] |
4,191,262 | 1 | 4,191,332 | null | 3 | 30,006 | I want to set header column width for grid view. I tried `HeaderStyle-Width="30px"`. But it is depending on Item columns. The column width is setting based on item value. But I want fixed width even if it has value or empty.

| Fixed header column width in gridview? | CC BY-SA 2.5 | 0 | 2010-11-16T04:34:43.533 | 2019-12-18T07:41:40.140 | null | null | 158,008 | [
"c#",
"asp.net",
"vb.net"
] |
4,191,400 | 1 | 4,192,365 | null | 1 | 303 | I'm guessing it is using a custom `NSWindow, NSTextField, NSSecureTextField, NSButton`? I don't necessarily want to replicate it, I would just like to know what would be involved in customizing my app's UI to this level.

| Cocoa / Interface Builder: What do I need to subclass to replicate this window? | CC BY-SA 2.5 | null | 2010-11-16T05:14:35.240 | 2010-11-16T08:44:19.100 | null | null | 435,405 | [
"objective-c",
"cocoa",
"interface-builder",
"customization",
"nswindow"
] |
4,191,437 | 1 | null | null | 0 | 2,337 | I have created two gtkmm button and added to HBox object. I called pack_end, and maintained the size as 21,20. But, the sizes are not maintained. Here is the code i have written and the window that i got while running the program.

Note: MYWindow is subclass of Gtk::Window
void MYWindow::customizeTitleBar()
{
//create a vertical box
Gtk::VBox *vBox = new Gtk::VBox(FALSE,0);
```
//create a horizontal box
Gtk::HBox *hBox = new Gtk::HBox(TRUE,0);
hBox->set_border_width(5);
//create title bar image
Gtk::Image *titleBarImage = new Gtk::Image("src/WindowTitleBar.png");
titleBarImage->set_alignment(Gtk::ALIGN_LEFT);
```
// hBox->pack_start(*titleBarImage,Gtk::PACK_EXPAND_WIDGET,0);
```
//create cloze button for window
mButtonClose = new Gtk::Button;
(*mButtonClose).set_size_request(21,20);
Gtk::Image *mImage = new Gtk::Image("src/Maximize.jpeg");
(*mButtonClose).add(*mImage);
(*mButtonClose).set_image_position(Gtk::POS_TOP);
// connecting close window function when cliked on close button
//(*mButtonClose).signal_clicked().connect( sigc::mem_fun(this, &MYWindow::closeWindow));
hBox->pack_end(*mButtonClose,Gtk::PACK_EXPAND_WIDGET,0);
Gtk::Button * mBtton = new Gtk::Button;
mBtton->set_size_request(21,20);
Gtk::Image *img = new Gtk::Image("src/Maximize.jpeg");
mBtton->add(*img);
mBtton->set_image_position(Gtk::POS_TOP);
hBox->pack_end(*mBtton,Gtk::PACK_EXPAND_WIDGET,0);
vBox->add(*hBox);
//drawing area box
Gtk::HBox *hBoxDrawingArea = new Gtk::HBox;
Gtk::DrawingArea *mDrawingArea = new Gtk::DrawingArea;
hBoxDrawingArea->pack_start(*mDrawingArea,Gtk::PACK_EXPAND_WIDGET,0);
vBox->add(*hBoxDrawingArea);
//status bar hBox
Gtk::HBox *hBoxStatusBar = new Gtk::HBox;
vBox->add(*hBoxStatusBar);
this->add(*vBox);
this->show_all();
```
}
| gtkmm button not maintaining size and location | CC BY-SA 2.5 | null | 2010-11-16T05:23:58.293 | 2013-07-15T03:04:16.837 | 2010-11-16T05:32:44.503 | 276,989 | 276,989 | [
"gtk"
] |
4,191,674 | 1 | 4,205,685 | null | 13 | 964 | I'm working on a piece of software which needs to implement the wiggliness of a set of data. Here's a sample of the input I would receive, merged with the lightness plot of each vertical pixel strip:

It is easy to see that the left margin is wiggly (i.e. has a ton of minima/maxima), and I want to generate a set of critical points of the image. I've applied a Gaussian smoothing function to the data ~ 10 times, but it seems to be pretty wiggly to begin with.
Any ideas?
Here's my original code, but it does not produce very nice results (for the wiggliness):
```
def local_maximum(list, center, delta):
maximum = [0, 0]
for i in range(delta):
if list[center + i] > maximum[1]: maximum = [center + i, list[center + i]]
if list[center - i] > maximum[1]: maximum = [center - i, list[center - i]]
return maximum
def count_maxima(list, start, end, delta, threshold = 10):
count = 0
for i in range(start + delta, end - delta):
if abs(list[i] - local_maximum(list, i, delta)[1]) < threshold: count += 1
return count
def wiggliness(list, start, end, delta, threshold = 10):
return float(abs(start - end) * delta) / float(count_maxima(list, start, end, delta, threshold))
```
| Determine "wiggliness" of set of data - Python | CC BY-SA 2.5 | 0 | 2010-11-16T06:23:36.307 | 2010-11-17T18:26:23.650 | 2010-11-17T18:26:23.650 | 478,206 | 464,744 | [
"python",
"list",
"statistics",
"frequency-analysis",
"frequency-distribution"
] |
4,191,905 | 1 | 4,191,916 | null | 1 | 80 | I'm using selenium-rc with php. I want to show in my test the value of CLASSNAME. How can i present the var? I tried to do `$this['drivers']['CLASSNAME']` but this is not working for me.

(This is from the debug)
Thank you!
| How to access var in PHP | CC BY-SA 2.5 | null | 2010-11-16T07:08:14.073 | 2010-11-16T07:10:15.587 | null | null | 429,248 | [
"php",
"selenium-rc"
] |
4,191,902 | 1 | 4,235,189 | null | 0 | 4,233 | I have a vertically oriented `LinearLayout` that has a child `LinearLayout` that includes a `TextView`, an `EditText`, and a `Button`, and a child `ImageView`.
So something like:
```
<LinearLayout>
<LinearLayout>
<TextView>
<EditText>
<Button>
<ImageView>
```
And the problem I am experiencing is that the seperation between the LinearLayout and the ImageView (displaying a .png as a background with android:background="@drawable/sun") is displaying a visible crease in between them. I have the LinearLayout using the same background color as the .png so that it looks like they flow together, but the crease ruins that aspect.
Edit: Here's a screenshot!

Do you see the thin line under the submit button?
Here is the xml:
```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/lightblue"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/welcome"
android:textSize="17sp"
android:textColor="@color/black"
/>
<EditText
android:id="@+id/entry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_text"
android:textSize="25sp"
android:inputType="text"
/>
<Button
android:id="@+id/submitButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="25sp"
android:text="Submit"
/>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="0px"
>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/sunclouds"
android:layout_marginBottom="20dip"/>
<TextView
android:id="@+id/marq"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
android:layout_gravity="center_horizontal|bottom"
android:textColor="@color/black"
android:text="@string/provider"
android:marqueeRepeatLimit="marquee_forever"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:scrollHorizontally="true"
/>
</FrameLayout>
</LinearLayout>
```
How can I fix this?
(side note, my sun and cloud have rough edges, any quick fixes with gimp?)
| Removing ImageView border | CC BY-SA 2.5 | 0 | 2010-11-16T07:07:46.653 | 2010-11-20T21:50:11.677 | 2010-11-16T15:31:19.267 | 487,840 | 487,840 | [
"android",
"imageview",
"android-linearlayout"
] |
4,192,863 | 1 | 4,192,886 | null | 3 | 255 | Ok, so I want to have the characters from below in my html page. Seems easy, except I can't find the HTML encoding for them.

Note: I would like to do this without having sized elements, plain ol' text would be fine ^_^.
Cheers.
| Special HTML Characters | CC BY-SA 2.5 | null | 2010-11-16T09:52:56.513 | 2010-11-16T10:00:32.570 | null | null | 285,178 | [
"html",
"character-encoding"
] |
4,193,158 | 1 | 4,193,740 | null | 4 | 7,689 | I am working through [this extJS tutorial](http://www.sencha.com/learn/Tutorial:Playing_With_Ext_The_Easy_Way) where you type in code into Firebug, press CTRL-Enter and it renders it for you, it worked for the simple example but then I got this error:
## Instructions:

## What happens:

| Why does extJS give me "Ext.Panel is not a constructor" error in Firebug? | CC BY-SA 2.5 | null | 2010-11-16T10:28:07.377 | 2013-05-03T14:32:30.820 | null | null | 4,639 | [
"extjs"
] |
4,193,493 | 1 | null | null | 19 | 3,304 | Ok this is kind of a weird issue and I am hoping someone can shed some light. I have the following code:
```
static void Main(string[] args)
{
try
{
Console.WriteLine("in try");
throw new EncoderFallbackException();
}
catch (Exception)
{
Console.WriteLine("in Catch");
throw new AbandonedMutexException();
}
finally
{
Console.WriteLine("in Finally");
Console.ReadLine();
}
}
```
NOW when I compile this to target 3.5(2.0 CLR) it will pop up a window saying "XXX has stopped working". If I now click on the button it will run the finally, AND if I wait until it is done looking and click on the button it will also run the finally.
Now what is interesting and confusing is IF I do the same thing compiled against 4.0 Clicking on the button will run the finally block and clicking on the button will not.
My question is: Why does the finally run on 2.0 and not on 4.0 when hitting the button? What are the repercussions of this?
EDIT: I am running this from a command prompt in release mode(built in release mode) on windows 7 32 bit. Error Message: First Result below is running on 3.5 hitting close after windows looks for issue, second is when I run it on 4.0 and do the same thing.

| Finally Block Not Running? | CC BY-SA 2.5 | 0 | 2010-11-16T11:07:52.863 | 2010-11-16T20:55:38.037 | 2010-11-16T13:22:01.373 | 406,784 | 406,784 | [
"c#",
"exception",
"c#-4.0"
] |
4,193,643 | 1 | 4,193,697 | null | 1 | 4,506 | When I execute the following extJS code, it shows me "undefined" instead of the text that I want to insert into the div.

## result

```
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css">
<style type="text/css">
body {
padding: 20px;
}
div#message {
margin: 10px 0 0 0;
}
</style>
<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all-debug.js"></script>
<title>Simple extJS</title>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = 'ext/resources/images/default/s.gif';
Ext.onReady(function() {
console.info('check to see if this shows up in firebug');
Ext.get('buttonInfo').on('click', function() {
var message = Ext.get('message');
message.insertHtml('this is the information');
});
});
</script>
</head>
<body>
<button id="buttonInfo">Info</button>
<div id="message"></div>
</body>
</html>
```
@flo, if i use `innerHTML` it is not recognized on the extJS object:

## More attempts that didn't work

| Why does insertHTML('text') render as "undefined"? | CC BY-SA 2.5 | null | 2010-11-16T11:28:11.340 | 2010-11-17T09:00:30.610 | 2010-11-16T11:46:22.517 | 4,639 | 4,639 | [
"extjs"
] |
4,193,870 | 1 | 4,194,159 | null | 5 | 440 | at the top of my template workflow I put a ReceiveRequest / SendReply block where I'd like to perform synchronous operations, enabling then the user client to receive a timely response of the workflow being started.
Client knows about the status of the current request with status of an entry on my application database.
For example, I create an order, call a PlaceOrderWF, set the status of the order on DB to "Accepted". The client can then perform whatever he wants while the WF is doing checks, controls, etc, ..., setting the final value of the order to "Completed" or "Error".
To test it, just put a Delay activity after the SendResponde activity and you should be able to reproduce the behaviour I am talking about.
Any hints on how to avoid this unwanted error?

| Behaviour of SendResponse in WF4 | CC BY-SA 2.5 | 0 | 2010-11-16T11:59:40.140 | 2010-11-16T12:36:10.240 | null | null | 201,116 | [
"xaml",
"workflow",
"workflow-foundation-4",
"xamlx"
] |
4,193,912 | 1 | null | null | 0 | 348 | 
a.why is there so many wait states in the in the vms/vax process states ?
| homework questions from stallings book | CC BY-SA 2.5 | null | 2010-11-16T12:04:18.620 | 2010-11-16T15:45:39.173 | null | null | 327,249 | [
"process",
"operating-system",
"vax"
] |
4,193,968 | 1 | 4,194,052 | null | 0 | 622 | Greetings!
I'm attempting to build an iPhone application that makes use of an iOS4-only function: 'UIGraphicsBeginImageContextWithOptions'.
I'm building for iPhone device 3.1.3 in XCode 3.2.1 and getting errors about that function not being defined.
[This stackoverflow page](https://stackoverflow.com/questions/3607082/checking-if-uigraphicsbeginimagecontextwithoptions-is-supported) already showed me that I should link weakly against UIKit and check that function for NULL, I am already doing this:


However, build still fails with:

Anyone have any idea?
| UIGraphicsBeginImageContextWithOptions undeclared | CC BY-SA 2.5 | null | 2010-11-16T12:10:16.733 | 2010-11-16T12:21:01.877 | 2017-05-23T12:13:41.910 | -1 | 51,133 | [
"iphone"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.