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,931,555 | 1 | 4,931,846 | null | 0 | 75 | 
This is the screen shot. Faraz is coming from address book contact name. When I click on template button I switch to that Arabic part(next page). What I wanted is to add faraz + selected template into mutable array. How can i make this happen so my selected template will be added with selected contact name.
| iphonesdk button+table issue | CC BY-SA 2.5 | null | 2011-02-08T09:50:40.967 | 2011-02-08T11:21:02.673 | 2011-02-08T10:26:25.323 | 106,435 | 599,876 | [
"iphone",
"cocoa-touch"
]
|
4,931,667 | 1 | 7,498,962 | null | 3 | 5,240 | I was trying to find out the problem in one web design I had and remembered to use a simple javascript to get the browser version as I had completly 2 different behaviors
so I add this:
```
<div id="example"></div>
<script type="text/javascript">
txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt+= "<p>Browser Name: " + navigator.appName + "</p>";
txt+= "<p>Browser Version: " + navigator.appVersion + "</p>";
txt+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt+= "<p>Platform: " + navigator.platform + "</p>";
txt+= "<p>User-agent header: " + navigator.userAgent + "</p>";
document.getElementById("example").innerHTML=txt;
</script>
```
and found out this:

[original image](https://i.stack.imgur.com/Cijur.png)
even though I have installed on this machine, the webbrowser control loads a version of IE (Internet Explorer 7) that is not the one installed.
> How can I using the correct version?
| How to force a IE version in a Winform WebControl? | CC BY-SA 2.5 | 0 | 2011-02-08T10:04:53.627 | 2015-07-24T16:26:00.223 | null | null | 28,004 | [
".net",
"winforms",
".net-3.5",
"web-controls"
]
|
4,931,774 | 1 | 4,931,917 | null | 2 | 8,627 | I am trying to extract a value from the windows registry of type `REG_SZ`, using `RegQueryValueEx`, I got the value except it was riddled with strange "\000" before each letter.To show you what I mean here are some images:
Value I want(It is a device name of a wireless adapter)

Value I got:

here is the code:
```
HKEY hlistkey = NULL;
HKEY hkey = NULL;
int dwIndex=0;
string devName = returndevName(); //return current selected device name using iphlpapi.h
WCHAR KeyNameBuf[512];
DWORD keyNameSizBuf = 512;
char buffer[512];
RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002bE10318}") ,0,KEY_READ, &hlistkey );
if(!hlistkey)
{
cout << "failed" << endl;
}
while(RegEnumKeyEx(hlistkey,dwIndex++,KeyNameBuf,&keyNameSizBuf,0,NULL,NULL,NULL) == ERROR_SUCCESS )
{
RegOpenKeyEx(hlistkey, KeyNameBuf, 0, KEY_READ | KEY_SET_VALUE, &hkey);
if(hkey)
{
keyNameSizBuf = 512;
if(RegQueryValueEx(hkey,TEXT("NetCfgInstanceId"), 0,NULL,(LPBYTE)buffer,&keyNameSizBuf ) == ERROR_SUCCESS )
{
if(strcmp(buffer,devName.c_str() ) ==0)
{
//set value here
}
}
RegCloseKey(hkey);
}
}
}
```
comparing `buffer` and `devName` would not be the same because of the extra null characters .If I cast buffer to a string I simply got a "{" which is the first value.I need to get the value of the `devename` in the registry before I can change the "NetworkAddress" in the registry.
| Getting a proper value from RegQueryValueEx | CC BY-SA 4.0 | null | 2011-02-08T10:16:31.300 | 2018-06-24T07:08:39.197 | 2018-06-24T07:08:39.197 | 1,971,003 | 553,304 | [
"c++",
"windows",
"registry"
]
|
4,931,811 | 1 | null | null | 0 | 730 | Good day to all. I have a strange problem.
I created a PHP script that inserts into a database the unix timestamp when it was accessed (PHP - time() function).
When a user is viewing a certain page a ajax request is send at every 57 seconds to the mentioned script.
I also created a cronjob that runs a PHP script that checks if the difference between the current time and the time logged in database for a certain user is higher than 2 minutes. The cron is set to run the script every 2 minutes, if is higher I mark the user as idle.
Now the problem is: Even though both seem to work fine, sometimes (seems very random to me) a user that is viewing the page is marked as idle. I can't find any explanation... perhaps any1 have an idea?
Unfortunately I can't provide an online version... but I answer any questions in max 10 mins.
The ajax script:

The insert script:

The cron:

Thank you for help.
| PHP, javascript, cronjobs - Ajax test if user is online fail | CC BY-SA 2.5 | null | 2011-02-08T10:20:46.803 | 2011-02-08T10:41:55.083 | 2011-02-08T10:41:55.083 | 569,872 | 569,872 | [
"php",
"javascript",
"ajax",
"random",
"cron"
]
|
4,932,086 | 1 | 4,933,517 | null | 2 | 1,129 | I'm trying to get some data about myself (logged in) through the facebook.php API.
`SELECT name FROM user WHERE sex='female' AND uid IN ( SELECT uid2 FROM friend WHERE uid1= me() )`
`SELECT eid, name, location, start_time, pic_big, host, description FROM event WHERE eid IN ( SELECT eid FROM event_member WHERE uid = me() )`
I have the following permissions setup:

| Facebook: What's wrong with this FQL statement? | CC BY-SA 2.5 | 0 | 2011-02-08T10:48:22.653 | 2011-02-09T21:43:18.827 | 2011-02-09T21:43:18.827 | 289,666 | 289,666 | [
"php",
"facebook",
"facebook-graph-api",
"facebook-fql"
]
|
4,932,181 | 1 | 4,932,321 | null | 127 | 373,640 | I have searched and searched, but haven't been able to find a solution for my requirement.
I have a plain ol' HTML table. I want round corners for it, using images or JS, i.e. pure . Like this:

Rounded corners for corner cells, and `1px` thick border for the cells.
So far I have this:
```
table {
-moz-border-radius: 5px !important;
border-collapse: collapse !important;
border: none !important;
}
table th,
table td {
border: none !important
}
table th:first-child {
-moz-border-radius: 5px 0 0 0 !important;
}
table th:last-child {
-moz-border-radius: 0 5px 0 0 !important;
}
table tr:last-child td:first-child {
-moz-border-radius: 0 0 0 5px !important;
}
table tr:last-child td:last-child {
-moz-border-radius: 0 0 5px 0 !important;
}
table tr:hover td {
background-color: #ddd !important
}
```
But that leaves me without any borders for the cells. If I add borders, they aren't rounded!
Any solutions?
| Rounded table corners CSS only | CC BY-SA 3.0 | 0 | 2011-02-08T10:58:03.183 | 2022-06-01T19:53:41.983 | 2016-12-07T20:47:16.840 | 3,478,852 | 322,522 | [
"html",
"css",
"html-table",
"rounded-corners"
]
|
4,932,624 | 1 | 4,932,748 | null | 0 | 2,107 | I am using imagemagick DLL (Refer: [http://www.imagemagick.org](http://www.imagemagick.org)) for the resize image,
But when I re-sized animated GIF image then it going screw.
I using below code for re-size image ( image type are png, gif, jpg, bmp, tif ...)
```
ImageMagickObject.MagickImage imgLarge = new ImageMagickObject.MagickImage();
object[] o = new object[] { strOrig, "-resize", size, "-gravity", "center", "-colorspace", "RGB", "-extent", "1024x768", strDestNw };
imgLarge.Convert(ref o);
```
How can I fixed it.
see the result image 
| How to resize animated gif file using imagemagick without destroying animation using C#? | CC BY-SA 2.5 | 0 | 2011-02-08T11:47:33.833 | 2011-02-09T13:58:04.033 | null | null | 568,085 | [
"c#",
"asp.net",
"imagemagick",
"resize",
"image-resizing"
]
|
4,932,771 | 1 | null | null | 11 | 5,962 | I have a controller that controls a contact us form on a contact page. Inside the `routes.rb` file I have a line that says `match '/contact', :to => 'feedback#new'`. Now when the form is filled out correctly, everything works fine; the url is '/contact'. However, when the form isn't filled out correctly, my controller `renders 'new'` and the url changes from `'/contact'` to `'/feedback'`. Can someone tell me why this happens and how I can fix it so that if the validations are triggered and the page is rendered, the url will be `/contact` still and not `/feedback`? Thanks!
My controller code:

| Rails: Why does custom url change when `render 'new'` is called? | CC BY-SA 2.5 | 0 | 2011-02-08T12:04:57.573 | 2011-06-13T19:57:19.860 | 2011-06-13T17:13:41.917 | 370,927 | 427,494 | [
"ruby-on-rails",
"ruby-on-rails-3",
"controller",
"url-routing"
]
|
4,932,795 | 1 | 4,933,201 | null | 0 | 87 | I want to float lists (DL) left, like the image at the bottom of this post.
If i use this:
```
dl {
float: left;
margin-bottom: 25px;
vertical-align: top;
width: 50%;
}
```
...Then the lists, that a shorter than the long one, will be placed at the bottom of the long one. They will not continue after the above list.

Can any of you guys tell me what i'm doing wrong??
Thank you in advance... :-)
| Left floated list | CC BY-SA 2.5 | null | 2011-02-08T12:08:27.530 | 2011-02-08T19:50:47.850 | 2011-02-08T19:50:47.850 | 271,353 | 315,200 | [
"css",
"list",
"position",
"css-float"
]
|
4,932,900 | 1 | null | null | 0 | 837 | I have images with many different ratios that are being resized (downscaled) to iPhone/iPad screen size.
What I need to achieve is to create full screen bitmaps (960x640, 480x320, 1024x768) with this image centered & resized and including the black border. Scaling is done automatically by AspectFit but how do I turn the result to fullscreen image?
On Android I'm using `imageview.buildDrawingCache();` and `imageview.getDrawingCache();`. Not the fastest solution but is good enough for me.
For example:
- - -
Any idea how to solve this problem?
I will need this image in memory for like 2 minutes and then I can clean it.
EDIT:
This is what I need - change bitmap scaled into bitmap scaled WITH the surrounding.

| iPhone - turn resized image into full screen bitmap | CC BY-SA 2.5 | null | 2011-02-08T12:21:00.213 | 2011-02-09T10:16:48.420 | 2011-02-09T10:16:48.420 | 475,861 | 475,861 | [
"iphone",
"image",
"bitmap",
"scaling"
]
|
4,932,954 | 1 | null | null | 2 | 281 | I want to obtain an authorization similar to MSCRM:

In this rappresentation we see:
- - -
I have 2 Entities + 8 Allowed Operations + 4 Scopes.
I want to represent the same situation in a .NET Application. . In the example I need 2*8*4 = 64 groups handled in my code using methods in RoleProvider.
It seems a little bit strange for me. I'm missing some security concepts or creating 64 groups is the only way to express this level of configurability?
Thanks
| How to obtain fine-grained Authorization with .NET | CC BY-SA 2.5 | 0 | 2011-02-08T12:26:02.637 | 2011-02-08T16:44:38.453 | 2011-02-08T16:33:28.910 | 20,409 | 20,409 | [
".net",
"security",
"roles"
]
|
4,933,282 | 1 | 4,993,467 | null | 0 | 82 | How can one optimize the database structure that currently has two tables "tbl_incoming" and "tbl_outgoing" .The data the tables are going to hold is pretty much obvious .tbl_incoming is saving all the incoming messages to a server while the server's replies are stored in the tbl_outgoing for a particular incoming message .
Lets say that I found myself handling a large amount of data for both tables. A 1 to many relationship from tbl_incoming to tbl_outgoing .
What is the best way to do the optimization if i have a million+ incoming messages and for each message tons of outgoing message and i want to retrieve them all .

| Sql Server Email servers | CC BY-SA 2.5 | null | 2011-02-08T12:57:27.233 | 2011-02-14T14:41:00.530 | 2011-02-08T15:27:29.597 | 73,226 | 243,718 | [
"sql",
"sql-server",
"sql-server-2005",
"tsql"
]
|
4,933,306 | 1 | 4,934,629 | null | 47 | 4,922 | I am sure many of you have already checked on today's (2011-02-08) [Google's doodle](http://www.google.com/logos/verne.html) ([link to article on CNN if doodle changes](http://edition.cnn.com/2011/TECH/web/02/08/google.doodle.verne.mashable/)). It was awesome and I tried figuring out about its implementation in , some things I found out was that it has about 3 layers of images (for 3D effect) which are pan and rotated (`-moz-transform:rotate()`), etc. What I didn't found about were (and my questions):
- How it hid our mouse cursor when you hold on the handle, I know it's `cursor:none` in CSS but I still saw this CSS for the handle:```
#verne-drag {
background: url("logos/2011/verne-hp.png") no-repeat scroll 1000px 1000px transparent;
cursor: pointer;/*here its pointer not none*/
height: 150px;
left: 565px;
position: absolute;
top: 15px;
width: 150px;
z-index: 700;
}
```
- How it allowed dragging of handle so and swapping between 9 images according to position at the same time.- Shed some light on its Javascript (I didn't find one in firebug...only that usual script for search, and this little code which just calculates mod (what about possible code other tasks)```
google.doodle.mod = function (a, n) {return a % n;};
2 /* !eval(new String("google.doodle.mod = function(a,n);)) */
```
So simply point me out how its implemented (I have mentioned 3 but include other points which might not be that obvious).
---
Image Resources for reference:

Link to other 3 images (They were so long that was not feasible to show here)
[Big Fishes, shark](http://www.google.co.in/logos/2011/verne-hp-1.png)
[Giant Tail](http://www.google.co.in/logos/2011/verne-hp-2.png)
[Under water fauna](http://www.google.co.in/logos/2011/verne-hp-3.png)
[Sky](http://www.google.co.in/logos/2011/verne-hp-4.png)
---
[Myles Gray](https://stackoverflow.com/questions/4933306/how-does-todays-jules-verne-googles-doodle-work/4934629#4934629) here has made a great contribution by re-implementing (and making it more readable) the Javascript Code, CSS and HTML to show us how Doodle was implemented.
Here is the link for you all to check it out:
[http://jsfiddle.net/Mutant_Tractor/jRkND/16/](http://jsfiddle.net/Mutant_Tractor/jRkND/16/) <-- Latest Revision
| How does today's (Jules Verne) Google's Doodle work? | CC BY-SA 2.5 | 0 | 2011-02-08T12:59:44.673 | 2013-08-03T20:29:35.000 | 2017-05-23T10:32:36.017 | -1 | 399,722 | [
"javascript",
"google-doodle"
]
|
4,933,446 | 1 | null | null | 1 | 1,009 | I need following view structure, with embedded 2 UIWebViews and 1 UIView (loaded from other xib).
But the problem is, because this need to be inside UIScrollView, with same impression like this is single page. (only vertical scrolling need to be enabled).
In those UIWebViews, html content is loaded from NSString.
Size (height) of UIWebViews and child view is variable.

Any advice, how to do that?
| Two resizable UIWebViews inside UIScrollView | CC BY-SA 2.5 | null | 2011-02-08T13:12:05.463 | 2011-02-08T13:27:33.530 | null | null | 310,262 | [
"iphone",
"cocoa-touch",
"xcode",
"uiwebview",
"uiscrollview"
]
|
4,934,093 | 1 | null | null | 0 | 346 | Items are colored in green on mouse-over and on keyboard focused. How can i return the colouring of the selected items to white while the mouse is over some item?
it's like I have to separated mechanisms.

XAML:
```
<Window.Resources>
<SolidColorBrush x:Key="ListBorder" Color="Green"/>
<SolidColorBrush x:Key="Brush_ListItem_MO" Color="Green"/>
<SolidColorBrush x:Key="Brush_Tree_Item_Border" Color="Green"/>
<Style TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Grid x:Name="container">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition SharedSizeGroup="A" Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border x:Name="Border" Grid.ColumnSpan="3" Height="35"
HorizontalAlignment="Stretch" />
<TextBlock Text="{TemplateBinding Content}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ListBorder}" />
<Setter Property="Background" TargetName="Border" Value="{DynamicResource Brush_ListItem_MO}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource Brush_Tree_Item_Border}" />
<Setter Property="BorderThickness" TargetName="Border" Value="1" />
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ListBorder}" />
<Setter Property="Background" TargetName="Border" Value="{DynamicResource Brush_ListItem_MO}" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="true" />
<Condition Property="Selector.IsSelectionActive" Value="false" />
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" TargetName="Border" Value="Red" />
<Setter Property="Background" TargetName="Border" Value="Red" />
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource Brush_Tree_Item_Border}" />
<Setter Property="BorderThickness" TargetName="Border" Value="1" />
</MultiTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
</Trigger>
<!--fgdfgdfgfdgfdgfg-->
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<ListBox >
<ListBox.Items>
<ListBoxItem>1</ListBoxItem>
<ListBoxItem>2</ListBoxItem>
<ListBoxItem>3</ListBoxItem>
<ListBoxItem>4</ListBoxItem>
<ListBoxItem>5</ListBoxItem>
</ListBox.Items>
</ListBox>
</Grid>
```
| Conflicting ListView Item Colouring | CC BY-SA 2.5 | null | 2011-02-08T14:14:08.650 | 2011-08-12T19:48:03.373 | 2011-08-12T19:48:03.373 | 305,637 | 138,627 | [
"wpf",
"triggers",
"styles",
"listviewitem"
]
|
4,934,146 | 1 | null | null | 1 | 246 | Noob to MVC question! Consider the following I'm using for an action filter
```
public override void OnResultExecuting(ResultExecutingContext filterContext)
{
var model = filterContext.Controller.ViewData.Model;
}
```
var model contains a section I want to access. I know it's there because when I breakpoint at that point I can see.

However, when i want to :
```
string tempStr = model.Companydetails.Address;
```
I get ' object does not contain a definition ' error. Any thoughts to what im missing here. Thanks in advance for your time.
S
EDIT: @Leniel Macaferi. Scr shot! 
| Cannot access local var in action filter: object does not contain a definition for error | CC BY-SA 2.5 | null | 2011-02-08T14:18:59.787 | 2011-03-24T18:27:06.003 | 2011-03-24T18:27:06.003 | 52,626 | 97,827 | [
"model-view-controller",
"local-variables",
"action-filter"
]
|
4,934,259 | 1 | 4,936,313 | null | 2 | 3,302 | I'm currently implementing a listbox in WPF that will have 2 alternative layouts for its items:

So far, I've done this using a `DataTrigger` to switch the `ItemTemplate` for the `ListBox` and it's working well:
```
<ListBox ItemsSource="{Binding Runs}" SelectedItem="{Binding SelectedRun}">
<ListBox.Style>
<Style TargetType="ListBox">
<Setter Property="ItemTemplate" Value="{StaticResource tileTemplate}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding ShowRunsAsIcons}" Value="True">
<Setter Property="ItemTemplate" Value="{StaticResource iconTemplate}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ListBox.Style>
</ListBox>
```
However, the `Runs` collection to which the list is bound will also contain different of object:
```
interface IRunItem
{
// ...
}
class CompletedRunItem : IRunItem
{
// ...
}
class PendingRunItem : IRunItem
{
// ...
}
```
Each of the object types should have its own 'tile' and 'icon' templates (making 4 templates in total). What's the best way of switching on these two properties to according to the boolean `ShowRunsAsIcons` and the type of the list item?
I've considered using a pair of `DataTemplateSelector` subclasses -- one to choose between tile templates based on item type, and one to choose between icon templates based on item type -- but this just feels horribly clunky. I feel as though I should be taking advantage of WPF's ability to choose the correct template based on the object's type, but in this instance, I don't see how to combine that with the list's different view options.
Any ideas of how to do this that's more in the spirit of WPF?
Thanks.
| Switching ListBox ItemTemplate based on both item type and view option | CC BY-SA 2.5 | 0 | 2011-02-08T14:29:59.220 | 2011-02-08T17:36:03.427 | null | null | 8,705 | [
"c#",
"wpf",
"listbox",
"datatemplateselector"
]
|
4,934,351 | 1 | 4,934,435 | null | 3 | 1,014 | I'm trying to implement a layout for a website. Actually it is a simple 2-column layout where each column has its own background color. The content, however has a fixed width and it should be centered. The breaking point is the background, which should not be limited by the content width.
To illustrate the situation I have also made a picture:

I already had the idea to use a centered background image that I could tile vertically, but this solution would make the website's maximum width dependent on the width of the image.
What do you think, is there a better solution?
Thanks in advance
David
| 2-column layout with fixed content width, unlimited background width | CC BY-SA 2.5 | null | 2011-02-08T14:38:24.490 | 2011-02-08T15:57:41.940 | 2011-02-08T14:44:40.023 | 287,047 | 608,280 | [
"html",
"css",
"layout"
]
|
4,934,442 | 1 | 4,934,849 | null | 1 | 191 | I am trying to customize a titles in a Microsoft share point portal and found these 4 css classes to control the title design:
```
.ms-WPTitle {font-weight: bold; font-family: verdana, arial, helvetica, sans-serif; color: #003399; padding-left: 6px; padding-right: 7px; padding-top: 2px; padding-bottom: 2px; font-size: 8pt; }
.ms-WPTitle A:link, .ms-WPTitle A:visited { color:#003399; text-decoration:none; cursor:hand; }
.ms-WPTitle A:hover { color:red; text-decoration:underline; cursor:hand; }
.ms-toolbar { font-family: verdana; font-size: .68em; text-decoration: none; color: #003399; }
```
here is the problem i am trying to solve in IE 6 and IE 7 the blue square around the first letter is not working in IE. MY css used is:
```
<style>
.FirstLetter:first-letter{font-family: arial; font-size: 14pt; font-weight: bold;color:White; background:Blue; border:1px black solid; padding-top:8px; padding-left:8px; padding-bottom:3px;}
.Spaced{letter-spacing: 5px;font-family: arial; font-size: 14pt; font-weight: bold;}
</style>
<div class="FirstLetter Spaced headerFont">
Executive Summary
</div>
```

| how can i update these css classes to generate a blue box behind the first letter of a word? | CC BY-SA 2.5 | null | 2011-02-08T14:46:39.117 | 2011-02-08T16:08:35.680 | 2011-02-08T16:08:35.680 | 405,015 | 352,157 | [
"html",
"css",
"internet-explorer-6"
]
|
4,934,628 | 1 | 4,937,865 | null | 2 | 134 | I have a query with 'group by':
```
SELECT date_audience,
Sum( If( quality_apuration = '1', 1, 0 ) ) AS very_good,
Sum( If( quality_apuration = '2', 1, 0 ) ) AS good,
Sum( If( quality_apuration = '3', 1, 0 ) ) AS bad,
Sum( If( quality_apuration = '4', 1, 0 ) ) AS no_apuration,
Count(quality_apuration) AS total
FROM pp_base
WHERE date_audience >= '2011-01-01' AND date_audience <= '2011-02-28'
GROUP BY date_audience ORDER BY date_audience ASC
```
Where to return the following result (or see [http://jsbin.com/imuru5/](http://jsbin.com/imuru5/)):

As the table X has foreign key to another table Y, eventually someone will ask to include one more item in the table Y, for example: 'exccelent', 'regular', etc. And I will also have to adjust the schedule as php $query[0]['very_good'], $query[0]['good'], $query[0]['bad'], etc, adding among other items, spending more time .
Does anyone have any idea how I can improve this query, in order to automate the results?
Thanks, Vinicius.
| Mysql - Improving consultation query in 'group by' | CC BY-SA 2.5 | null | 2011-02-08T15:00:33.337 | 2011-02-08T20:13:28.697 | 2011-02-08T17:18:12.067 | 555,617 | 555,617 | [
"sql",
"mysql",
"group-by",
"sum"
]
|
4,934,854 | 1 | null | null | 0 | 511 | I have tested everything but I cant get it to work.
This is how I set up my program:
```
CGRect contentRect = CGRectMake(0, 0, 480, 320);
CGRect screenBounds = [[UIScreen mainScreen] bounds];
_window = [[UIWindow alloc] initWithFrame: contentRect];
_view = [[GLView alloc] initWithFrame: screenBounds];
CGAffineTransform transform = CGAffineTransformMakeRotation(3.14159/2);
_view.transform = transform;
_window.frame = contentRect;
_window.bounds = contentRect;
_window.window.bounds = contentRect;
_window.frame = contentRect;
_view.window.bounds = contentRect;
_view.bounds = contentRect;
_view.bounds = contentRect;
_view.frame = contentRect;
[_window addSubview: _view];
[_window makeKeyAndVisible];
```
I set up my opengl like this:
```
glViewport(0, 0, 480, 320);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrthof( 0, 480, 0, 320, -1, 1 );
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
```
and as you can see one third from the right is black? what am i missing?

| iphone landscape mode problem again | CC BY-SA 2.5 | null | 2011-02-08T15:18:57.793 | 2011-02-08T15:35:50.470 | 2011-02-08T15:35:50.470 | 588,809 | 334,688 | [
"iphone",
"objective-c",
"opengl-es"
]
|
4,935,015 | 1 | 4,935,157 | null | 1 | 177 | i want to show the StudentNo, SubjectCode,SubjectDescription and grade but when ever students get failing grade it generates another entry for all the fields so what i want is to show the studentNo, SubjectCode, and SubjectDescription once while showing the 2 grades in that particular subject of that student..
Example:

I want to show only like this:(
07-08-061 EN110 5 / 1)
Here's my Code:
**
```
mysql_select_db($database_strawman, $strawman);
$query_Recordset1 = "SELECT curriculum.SCode, curriculum.SDesc, grade.Grade, students.StudNo FROM students INNER JOIN (curriculum INNER JOIN grade ON curriculum.SCode = grade.GSCode) ON students.StudNo = grade.GStudNo GROUP BY StudNo";
$Recordset1 = mysql_query($query_Recordset1, $strawman) or die(mysql_error());
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="200" border="1">
<tr>
<td>Subject Code</td>
<td>Subject Description</td>
<td>Grade</td>
<td>Student Number</td>
</tr>
<?php while($row_Recordset1 = mysql_fetch_assoc($Recordset1)){ ?>
<tr>
<td><?php echo $row_Recordset1['SCode']; ?></td>
<td><?php echo $row_Recordset1['SDesc']; ?></td>
<td><?php echo $row_Recordset1['Grade']; ?></td>
<td><?php echo $row_Recordset1['StudNo']; ?></td>
</tr>
<?php } ?>
</table> </p>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
**
```
| How can i view the double entry of a field and show only one entry of the other fields? | CC BY-SA 2.5 | null | 2011-02-08T15:34:18.580 | 2011-02-08T16:07:39.113 | 2011-02-08T15:54:47.510 | 590,256 | 590,256 | [
"php",
"mysql",
"join",
"group-by"
]
|
4,935,193 | 1 | 4,947,586 | null | 7 | 4,104 | I'm trying to determine whether or not I have a memory leak in my webapp. I'm using VisualVM and JMeter to load test and watch the heap.
I saved a heap dump to file and downloaded Eclipse Memory Analyzer yesterday...after much frustration with VisualVM, I thought Eclipse would pinpoint the leak, if any, better than VisualVM.
I opened the heap file in Eclipse and ran what they call a Leak Suspects Report. I thought it would point to a particular class in my webapp, but it doesn't. So I have no clue how to use the info its provided in order to find out where in any particular class of mine the leak suspect is.
Here's the results of the Leak Suspect Report for one of my heap dump files.
The rest of the Details in the report are as shown in the attached image. I hope the image can be expanded for a closer look....

I know that Eclipse is supposed to be really good software. This is my last attempt to use something like this to find a memory leak - I just have very, very, limited knowledge in HOW this software can be used for such. Tutorial and help pages describe things as though you should know what to do after a few clicks... I need more help than that.
| Eclipse Memory Analyzer - Leak Suspects Report doesn't point to MY classes - why? | CC BY-SA 2.5 | 0 | 2011-02-08T15:50:52.053 | 2021-09-26T18:22:45.173 | 2021-09-26T18:22:45.173 | 5,459,839 | 490,337 | [
"java",
"eclipse",
"memory-leaks",
"eclipse-rcp",
"heap-memory"
]
|
4,935,235 | 1 | 4,935,282 | null | 4 | 3,993 | I have a web application in ExtJS and used the .

Now I want to it to a specific layout design, e.g. I want to change the color and add a graphic behind the word "Application". I've been reading information on [how to edit ExtJS Themes](http://www.sencha.com/products/extjs/themes/) but it's not the components that I want to change but on the screen, e.g. this page header.
So the is looking at the HTML output in Firebug:

and then in an extra CSS file styling the tags that I think are going to effect my style change, e.g.
```
.x-panel-body-noheader {
background-color: #307E7E;
}
```
which for the most part works but this but this seems to be very , e.g. in some places the only way I can style the area I need is to use the seemingly arbitrary , e.g.
```
div#ext-comp-1003 {
background-color: #307E7A;
}
```
This seems very fragile, as if these id numbers might change in the future etc.
| Is this the right way to restyle an ExtJS application? | CC BY-SA 2.5 | 0 | 2011-02-08T15:54:49.820 | 2012-05-09T23:24:15.607 | null | null | 4,639 | [
"css",
"extjs"
]
|
4,935,391 | 1 | 4,980,083 | null | 10 | 15,528 | When I do an explain on my query

I see that it has "Using temporary; Using filesort" under "Extra" for the first row. I understand this is bad but I don't know what exactly it means or how to fix it.
If you want to see my query, here's a more general question I asked about the same query: [MySQL query optimization and EXPLAIN for a noob](https://stackoverflow.com/questions/4934614/mysql-query-optimization-and-explain-for-a-noob).
For reference, the query involves 24 tables and 23 joins.
My questions now are:
- -
| Getting rid of "Using temporary; Using filesort" | CC BY-SA 3.0 | 0 | 2011-02-08T16:09:34.283 | 2017-03-09T09:36:45.680 | 2017-05-23T12:31:52.330 | -1 | 199,712 | [
"sql",
"mysql",
"query-optimization"
]
|
4,935,399 | 1 | null | null | 0 | 206 | In an HTML table using center alignment, the text is aligned slightly to the left of the center. How can I remedy the situation?
```
td { border:1px solid #000; text-align:center; white-space: nowrap; }
```
This is the result:

| Table cell text is aligned slightly to the left of the center | CC BY-SA 2.5 | null | 2011-02-08T16:10:26.937 | 2019-01-24T22:24:17.833 | 2019-01-24T22:24:17.833 | 4,370,109 | 608,229 | [
"html",
"css",
"css-tables"
]
|
4,935,394 | 1 | 5,080,060 | null | 2 | 324 | I'm dealing with an annoying problem in core data I've got a table named , which is made
as follows

I'm filling the table in various steps:
1) fill the attributes of the table
2) fill the Character Relation ()
FYI charRel is defined as follows

I'm feeding the contents by pulling the data from an xml,
the feeding code is this
```
curStr = [[NSMutableString stringWithString:[curStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]] retain];
NSLog(@"Parsing relation within these keys %@, in order to get'em associated",curStr);
NSArray *chunks = [curStr componentsSeparatedByString: @","];
for( NSString *relId in chunks ) {
NSLog(@"Associating %@ with id %@",[currentCharacter valueForKey:@"character_id"], relId);
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"character_id == %@", relId];
[request setEntity:[NSEntityDescription entityForName:@"Character" inManagedObjectContext:[self managedObjectContext] ]];
[request setPredicate:predicate];
NSerror *error = nil;
NSArray *results = [[self managedObjectContext] executeFetchRequest:request error:&error];
// error handling code
if(error != nil)
{
NSLog(@"[SYMBOL CORRELATION]: retrieving correlated symbol error: %@", [error localizedDescription]);
} else if([results count] > 0) {
Character *relatedChar = [results objectAtIndex:0]; // grab the first result in the stack, could be done better!
[currentCharacter addCharRelObject:relatedChar];
//VICE VERSA RELATIONS
NSArray *charRels = [relatedChar valueForKey:@"charRel"];
BOOL alreadyRelated = NO;
for(Character *charRel in charRels) {
if([[charRel valueForKey:@"character_id"] isEqual:[currentCharacter valueForKey:@"character_id"]])
{
alreadyRelated = YES;
break;
}
}
if(!alreadyRelated)
{
NSLog(@"\n\t\trelating %@ with %@", [relatedChar valueForKey:@"character_id"], [currentCharacter valueForKey:@"character_id"]);
[relatedChar addCharRelObject:currentCharacter];
}
} else {
NSLog(@"[SYMBOL CORRELATION]: related symbol was not found! ##SKIPPING-->");
}
[request release];
}
NSLog(@"\t\t### TOTAL OF REALTIONS FOR ID %@: %d\n%@", [currentCharacter valueForKey:@"character_id"], [[currentCharacter valueForKey:@"charRel"] count], currentCharacter);
error = nil;
/* SAVE THE CONTEXT */
if (![managedObjectContext save:&error]) {
NSLog(@"Whoops, couldn't save the symbol record: %@", [error localizedDescription]);
NSArray* detailedErrors = [[error userInfo] objectForKey:NSDetailedErrorsKey];
if(detailedErrors != nil && [detailedErrors count] > 0) {
for(NSError* detailedError in detailedErrors) {
NSLog(@"\n################\t\tDetailedError: %@\n################", [detailedError userInfo]);
}
}
else {
NSLog(@" %@", [error userInfo]);
}
}
```
at this point when I print out the values of the currentCharacter, everything looks perfect. every relation is in its place.
in example in this log we can clearly see that this element has got 3 items in charRel:
```
<Character: 0x5593af0> (entity: Character; id: 0x55938c0 <x-coredata://67288D50-D349-4B19-B7CB-F7AC4671AD61/Character/p86> ; data: {
catRel = "<relationship fault: 0x9a29db0 'catRel'>";
charRel = (
"0x9a1f870 <x-coredata://67288D50-D349-4B19-B7CB-F7AC4671AD61/Character/p74>",
"0x9a14bd0 <x-coredata://67288D50-D349-4B19-B7CB-F7AC4671AD61/Character/p109>",
"0x558ba00 <x-coredata://67288D50-D349-4B19-B7CB-F7AC4671AD61/Character/p5>"
);
"character_id" = 254;
examplesRel = "<relationship fault: 0x9a29df0 'examplesRel'>";
meaning = "\n Left";
pinyin = "\n zu\U01d2";
"pronunciation_it" = "\n zu\U01d2";
strokenumber = 5;
text = "\n \n <p>The most ancient form of this symbol";
unicodevalue = "\n \U5de6";
})
```
then when I'm in need of retrieving this item I perform an extraction, like this:
```
// at first I get the single Character record
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSError *error;
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"character_id == %@", self.char_id ];
[request setEntity:[NSEntityDescription entityForName:@"Character" inManagedObjectContext:_context ]];
[request setPredicate:predicate];
NSArray *fetchedObjs = [_context executeFetchRequest:request error:&error];
```
when, for instance, I print out in NSLog the contents of charRel
```
NSArray *correlations = [singleCharacter valueForKey:@"charRel"];
NSLog(@"CHARACTER OBJECT \n%@", correlations);
```
I get this
```
Relationship fault for (<NSRelationshipDescription: 0x5568520>), name charRel, isOptional 1,
isTransient 0, entity Character, renamingIdentifier charRel, validation predicates (), warnings (),
versionHashModifier (null), destination entity Character, inverseRelationship (null), minCount 1,
maxCount 99 on 0x6937f00
```
hope that I made myself clear.
this thing is driving me insane, I've googled all over world, but
I couldn't find a solution (and this make me think to as issue related to bad coding somehow :P).
thank you in advance guys.
k
| Self-relation messes up contents in fetching | CC BY-SA 2.5 | null | 2011-02-08T16:10:11.153 | 2011-02-22T15:23:20.907 | 2011-02-09T12:24:06.820 | 596,983 | 596,983 | [
"objective-c",
"core-data",
"relational-database"
]
|
4,935,583 | 1 | 4,937,429 | null | 0 | 1,611 | Button Layout

I have 3 labels inside of a div. I want to make the div clickable and trigger a postback from clicking the div. . So far the only way I found out of doing this is either having the div onclick event trigger javascript, or do some custom usercontrol magic, which i cant get to work.
User Control
```
<div class="meetingContainer" >
<div class="meetingCityState">
<asp:Label ID="lblMeetingCityState" runat="server" Text='<%# Eval("City") %>'></asp:Label>
</div>
<div>
<asp:Label ID="lblMeetingDate" runat="server" Text='<%# Eval("MeetingDate") %>'></asp:Label>
</div>
<div>
<asp:Label ID="lblMeetingSite" runat='server' Text='<%# Eval("Location") %>'></asp:Label>
</div>
</div>
```
code behind
```
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Partial Public Class MeetingButton
Inherits System.Web.UI.UserControl
Implements System.Web.UI.IPostBackEventHandler
Public Event Click As EventHandler
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Overridable Sub OnClick(ByVal E As EventArgs)
RaiseEvent Click(Me, E)
End Sub
Public Sub RaisePostBackEvent(ByVal eventArgument As String) _
Implements IPostBackEventHandler.RaisePostBackEvent
OnClick(New EventArgs())
End Sub
End Class
```
| asp.net custom buttons | CC BY-SA 2.5 | null | 2011-02-08T16:29:29.140 | 2011-02-08T19:33:01.777 | 2011-02-08T16:32:08.473 | 143,327 | 525,672 | [
"asp.net",
"custom-controls"
]
|
4,935,888 | 1 | null | null | 2 | 528 | In my app, I have part of a view sticking out from the right. I would like the user to be able to swipe that to the left, to pull/reveal the rest of that view, which would basically almost cover the screen. See below:


I am figuring my best option is to use UIScrollView for two reasons. That I can lock the movement to horizontal only, and the animation for swiping is already built it.
| UIScrollView - A way to make one scroll view smaller than the other? | CC BY-SA 2.5 | 0 | 2011-02-08T16:55:59.763 | 2011-02-08T17:02:24.140 | null | null | 144,695 | [
"iphone",
"ios",
"uiview",
"uiscrollview",
"core-animation"
]
|
4,936,018 | 1 | 4,954,941 | null | 0 | 3,330 | How to create the multilevel vertical menu in drupal,
somthing like thi screen shot
is there any module available for this
| drupal multilevel menu | CC BY-SA 2.5 | 0 | 2011-02-08T17:07:31.543 | 2011-02-11T03:45:21.573 | 2011-02-11T03:45:21.573 | 318,158 | 246,963 | [
"drupal",
"drupal-6",
"drupal-modules",
"drupal-7"
]
|
4,935,901 | 1 | 4,936,831 | null | 4 | 2,021 | I'm attempting to use a jQuery script I've found on
[http://swip.codylindley.com/DOMWindowDemo.html](http://swip.codylindley.com/DOMWindowDemo.html)
on my website to create a lightbox/domwindow popup when a visitor clicks a link.
Unfortunately, it appears the script isn't releasing memory when the user closes the dom window. If the user opens and closes the window several times, it causes the page to slow down dramatically and crash the user's browser.
Here is the jQuery script from the above website:
```
(function($){
//closeDOMWindow
$.fn.closeDOMWindow = function(settings){
if(!settings){settings={};}
var run = function(passingThis){
if(settings.anchoredClassName){
var $anchorClassName = $('.'+settings.anchoredClassName);
$anchorClassName.fadeOut('fast',function(){
if($.fn.draggable){
$anchorClassName.draggable('destory').trigger("unload").remove();
}else{
$anchorClassName.trigger("unload").remove();
}
});
if(settings.functionCallOnClose) {
settings.functionCallAfterClose();
}
}else{
var $DOMWindowOverlay = $('#DOMWindowOverlay');
var $DOMWindow = $('#DOMWindow');
$DOMWindowOverlay.fadeOut('fast',function(){
$DOMWindowOverlay.trigger('unload').unbind().remove();
});
$DOMWindow.fadeOut('fast',function(){
if($.fn.draggable){
$DOMWindow.draggable("destroy").trigger("unload").remove();
}else{
$DOMWindow.trigger("unload").remove();
}
});
$(window).unbind('scroll.DOMWindow');
$(window).unbind('resize.DOMWindow');
if($.fn.openDOMWindow.isIE6){$('#DOMWindowIE6FixIframe').remove();}
if(settings.functionCallOnClose){settings.functionCallAfterClose();}
}
};
if(settings.eventType){//if used with $().
return this.each(function(index){
$(this).bind(settings.eventType, function(){
run(this);
return false;
});
});
}else{//else called as $.function
run();
}
};
//allow for public call, pass settings
$.closeDOMWindow = function(s){$.fn.closeDOMWindow(s);};
//openDOMWindow
$.fn.openDOMWindow = function(instanceSettings){
var shortcut = $.fn.openDOMWindow;
//default settings combined with callerSettings////////////////////////////////////////////////////////////////////////
shortcut.defaultsSettings = {
anchoredClassName:'',
anchoredSelector:'',
borderColor:'#ccc',
borderSize:'4',
draggable:0,
eventType:null, //click, blur, change, dblclick, error, focus, load, mousedown, mouseout, mouseup etc...
fixedWindowY:100,
functionCallOnOpen:null,
functionCallOnClose:null,
height:500,
loader:0,
loaderHeight:0,
loaderImagePath:'',
loaderWidth:0,
modal:0,
overlay:1,
overlayColor:'#000',
overlayOpacity:'85',
positionLeft:0,
positionTop:0,
positionType:'centered', // centered, anchored, absolute, fixed
width:500,
windowBGColor:'#fff',
windowBGImage:null, // http path
windowHTTPType:'get',
windowPadding:10,
windowSource:'inline', //inline, ajax, iframe
windowSourceID:'',
windowSourceURL:'',
windowSourceAttrURL:'href'
};
var settings = $.extend({}, $.fn.openDOMWindow.defaultsSettings , instanceSettings || {});
//Public functions
shortcut.viewPortHeight = function(){ return self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;};
shortcut.viewPortWidth = function(){ return self.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;};
shortcut.scrollOffsetHeight = function(){ return self.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;};
shortcut.scrollOffsetWidth = function(){ return self.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft;};
shortcut.isIE6 = typeof document.body.style.maxHeight === "undefined";
//Private Functions/////////////////////////////////////////////////////////////////////////////////////////////////////////
var sizeOverlay = function(){
var $DOMWindowOverlay = $('#DOMWindowOverlay');
if(shortcut.isIE6){//if IE 6
var overlayViewportHeight = document.documentElement.offsetHeight + document.documentElement.scrollTop - 4;
var overlayViewportWidth = document.documentElement.offsetWidth - 21;
$DOMWindowOverlay.css({'height':overlayViewportHeight +'px','width':overlayViewportWidth+'px'});
}else{//else Firefox, safari, opera, IE 7+
$DOMWindowOverlay.css({'height':'100%','width':'100%','position':'fixed'});
}
};
var sizeIE6Iframe = function(){
var overlayViewportHeight = document.documentElement.offsetHeight + document.documentElement.scrollTop - 4;
var overlayViewportWidth = document.documentElement.offsetWidth - 21;
$('#DOMWindowIE6FixIframe').css({'height':overlayViewportHeight +'px','width':overlayViewportWidth+'px'});
};
var centerDOMWindow = function() {
var $DOMWindow = $('#DOMWindow');
if(settings.height + 50 > shortcut.viewPortHeight()){//added 50 to be safe
$DOMWindow.css('left',Math.round(shortcut.viewPortWidth()/2) + shortcut.scrollOffsetWidth() - Math.round(($DOMWindow.outerWidth())/2));
}else{
$DOMWindow.css('left',Math.round(shortcut.viewPortWidth()/2) + shortcut.scrollOffsetWidth() - Math.round(($DOMWindow.outerWidth())/2));
$DOMWindow.css('top',Math.round(shortcut.viewPortHeight()/2) + shortcut.scrollOffsetHeight() - Math.round(($DOMWindow.outerHeight())/2));
}
};
var centerLoader = function() {
var $DOMWindowLoader = $('#DOMWindowLoader');
if(shortcut.isIE6){//if IE 6
$DOMWindowLoader.css({'left':Math.round(shortcut.viewPortWidth()/2) + shortcut.scrollOffsetWidth() - Math.round(($DOMWindowLoader.innerWidth())/2),'position':'absolute'});
$DOMWindowLoader.css({'top':Math.round(shortcut.viewPortHeight()/2) + shortcut.scrollOffsetHeight() - Math.round(($DOMWindowLoader.innerHeight())/2),'position':'absolute'});
}else{
$DOMWindowLoader.css({'left':'50%','top':'50%','position':'fixed'});
}
};
var fixedDOMWindow = function(){
var $DOMWindow = $('#DOMWindow');
$DOMWindow.css('left', settings.positionLeft + shortcut.scrollOffsetWidth());
$DOMWindow.css('top', + settings.positionTop + shortcut.scrollOffsetHeight());
};
var showDOMWindow = function(instance){
if(arguments[0]){
$('.'+instance+' #DOMWindowLoader').remove();
$('.'+instance+' #DOMWindowContent').fadeIn('fast',function(){if(settings.functionCallOnOpen){settings.functionCallOnOpen();}});
$('.'+instance+ '.closeDOMWindow').click(function(){
$.closeDOMWindow();
return false;
});
}else{
$('#DOMWindowLoader').remove();
$('#DOMWindow').fadeIn('fast',function(){if(settings.functionCallOnOpen){settings.functionCallOnOpen();}});
$('#DOMWindow .closeDOMWindow').click(function(){
$.closeDOMWindow();
return false;
});
}
};
var urlQueryToObject = function(s){
var query = {};
s.replace(/b([^&=]*)=([^&=]*)b/g, function (m, a, d) {
if (typeof query[a] != 'undefined') {
query[a] += ',' + d;
} else {
query[a] = d;
}
});
return query;
};
//Run Routine ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
var run = function(passingThis){
//get values from element clicked, or assume its passed as an option
settings.windowSourceID = $(passingThis).attr('href') || settings.windowSourceID;
settings.windowSourceURL = $(passingThis).attr(settings.windowSourceAttrURL) || settings.windowSourceURL;
settings.windowBGImage = settings.windowBGImage ? 'background-image:url('+settings.windowBGImage+')' : '';
var urlOnly, urlQueryObject;
if(settings.positionType == 'anchored'){//anchored DOM window
var anchoredPositions = $(settings.anchoredSelector).position();
var anchoredPositionX = anchoredPositions.left + settings.positionLeft;
var anchoredPositionY = anchoredPositions.top + settings.positionTop;
$('body').append('<div class="'+settings.anchoredClassName+'" style="'+settings.windowBGImage+';background-repeat:no-repeat;padding:'+settings.windowPadding+'px;overflow:auto;position:absolute;top:'+anchoredPositionY+'px;left:'+anchoredPositionX+'px;height:'+settings.height+'px;width:'+settings.width+'px;background-color:'+settings.windowBGColor+';border:'+settings.borderSize+'px solid '+settings.borderColor+';z-index:10001"><div id="DOMWindowContent" style="display:none"></div></div>');
//loader
if(settings.loader && settings.loaderImagePath !== ''){
$('.'+settings.anchoredClassName).append('<div id="DOMWindowLoader" style="width:'+settings.loaderWidth+'px;height:'+settings.loaderHeight+'px;"><img src="'+settings.loaderImagePath+'" /></div>');
}
if($.fn.draggable){
if(settings.draggable){$('.' + settings.anchoredClassName).draggable({cursor:'move'});}
}
switch(settings.windowSource){
case 'inline'://////////////////////////////// inline //////////////////////////////////////////
$('.' + settings.anchoredClassName+" #DOMWindowContent").append($(settings.windowSourceID).children());
$('.' + settings.anchoredClassName).unload(function(){// move elements back when you're finished
$('.' + settings.windowSourceID).append( $('.' + settings.anchoredClassName+" #DOMWindowContent").children());
});
showDOMWindow(settings.anchoredClassName);
break;
case 'iframe'://////////////////////////////// iframe //////////////////////////////////////////
$('.' + settings.anchoredClassName+" #DOMWindowContent").append('<iframe frameborder="0" hspace="0" wspace="0" src="'+settings.windowSourceURL+'" name="DOMWindowIframe'+Math.round(Math.random()*1000)+'" style="width:100%;height:100%;border:none;background-color:#fff;" class="'+settings.anchoredClassName+'Iframe" ></iframe>');
$('.'+settings.anchoredClassName+'Iframe').load(showDOMWindow(settings.anchoredClassName));
break;
case 'ajax'://////////////////////////////// ajax //////////////////////////////////////////
if(settings.windowHTTPType == 'post'){
if(settings.windowSourceURL.indexOf("?") !== -1){//has a query string
urlOnly = settings.windowSourceURL.substr(0, settings.windowSourceURL.indexOf("?"));
urlQueryObject = urlQueryToObject(settings.windowSourceURL);
}else{
urlOnly = settings.windowSourceURL;
urlQueryObject = {};
}
$('.' + settings.anchoredClassName+" #DOMWindowContent").load(urlOnly,urlQueryObject,function(){
showDOMWindow(settings.anchoredClassName);
});
}else{
if(settings.windowSourceURL.indexOf("?") == -1){ //no query string, so add one
settings.windowSourceURL += '?';
}
$('.' + settings.anchoredClassName+" #DOMWindowContent").load(
settings.windowSourceURL + '&random=' + (new Date().getTime()),function(){
showDOMWindow(settings.anchoredClassName);
});
}
break;
}
}else{//centered, fixed, absolute DOM window
//overlay & modal
if(settings.overlay){
$('body').append('<div id="DOMWindowOverlay" style="z-index:10000;display:none;position:absolute;top:0;left:0;background-color:'+settings.overlayColor+';filter:alpha(opacity='+settings.overlayOpacity+');-moz-opacity: 0.'+settings.overlayOpacity+';opacity: 0.'+settings.overlayOpacity+';"></div>');
if(shortcut.isIE6){//if IE 6
$('body').append('<iframe id="DOMWindowIE6FixIframe" src="blank.html" style="width:100%;height:100%;z-index:9999;position:absolute;top:0;left:0;filter:alpha(opacity=0);"></iframe>');
sizeIE6Iframe();
}
sizeOverlay();
var $DOMWindowOverlay = $('#DOMWindowOverlay');
$DOMWindowOverlay.fadeIn('fast');
if(!settings.modal){$DOMWindowOverlay.click(function(){$.closeDOMWindow();});}
}
//loader
if(settings.loader && settings.loaderImagePath !== ''){
$('body').append('<div id="DOMWindowLoader" style="z-index:10002;width:'+settings.loaderWidth+'px;height:'+settings.loaderHeight+'px;"><img src="'+settings.loaderImagePath+'" /></div>');
centerLoader();
}
//add DOMwindow
$('body').append('<div id="DOMWindow" style="background-repeat:no-repeat;'+settings.windowBGImage+';overflow:auto;padding:'+settings.windowPadding+'px;display:none;height:'+settings.height+'px;width:'+settings.width+'px;background-color:'+settings.windowBGColor+';border:'+settings.borderSize+'px solid '+settings.borderColor+'; position:absolute;z-index:10001"></div>');
var $DOMWindow = $('#DOMWindow');
//centered, absolute, or fixed
switch(settings.positionType){
case 'centered':
centerDOMWindow();
if(settings.height + 50 > shortcut.viewPortHeight()){//added 50 to be safe
$DOMWindow.css('top', (settings.fixedWindowY + shortcut.scrollOffsetHeight()) + 'px');
}
break;
case 'absolute':
$DOMWindow.css({'top':(settings.positionTop+shortcut.scrollOffsetHeight())+'px','left':(settings.positionLeft+shortcut.scrollOffsetWidth())+'px'});
if($.fn.draggable){
if(settings.draggable){$DOMWindow.draggable({cursor:'move'});}
}
break;
case 'fixed':
fixedDOMWindow();
break;
case 'anchoredSingleWindow':
var anchoredPositions = $(settings.anchoredSelector).position();
var anchoredPositionX = anchoredPositions.left + settings.positionLeft;
var anchoredPositionY = anchoredPositions.top + settings.positionTop;
$DOMWindow.css({'top':anchoredPositionY + 'px','left':anchoredPositionX+'px'});
break;
}
$(window).bind('scroll.DOMWindow',function(){
if(settings.overlay){sizeOverlay();}
if(shortcut.isIE6){sizeIE6Iframe();}
if(settings.positionType == 'centered'){centerDOMWindow();}
if(settings.positionType == 'fixed'){fixedDOMWindow();}
});
$(window).bind('resize.DOMWindow',function(){
if(shortcut.isIE6){sizeIE6Iframe();}
if(settings.overlay){sizeOverlay();}
if(settings.positionType == 'centered'){centerDOMWindow();}
});
switch(settings.windowSource){
case 'inline'://////////////////////////////// inline //////////////////////////////////////////
$DOMWindow.append($(settings.windowSourceID).children());
$DOMWindow.unload(function(){// move elements back when you're finished
$(settings.windowSourceID).append($DOMWindow.children());
});
showDOMWindow();
break;
case 'iframe'://////////////////////////////// iframe //////////////////////////////////////////
$DOMWindow.append('<iframe frameborder="0" hspace="0" wspace="0" src="'+settings.windowSourceURL+'" name="DOMWindowIframe'+Math.round(Math.random()*1000)+'" style="width:100%;height:100%;border:none;background-color:#fff;" id="DOMWindowIframe" ></iframe>');
$('#DOMWindowIframe').load(showDOMWindow());
break;
case 'ajax'://////////////////////////////// ajax //////////////////////////////////////////
if(settings.windowHTTPType == 'post'){
if(settings.windowSourceURL.indexOf("?") !== -1){//has a query string
urlOnly = settings.windowSourceURL.substr(0, settings.windowSourceURL.indexOf("?"));
urlQueryObject = urlQueryToObject(settings.windowSourceURL);
}else{
urlOnly = settings.windowSourceURL;
urlQueryObject = {};
}
$DOMWindow.load(urlOnly,urlQueryObject,function(){
showDOMWindow();
});
}else{
if(settings.windowSourceURL.indexOf("?") == -1){ //no query string, so add one
settings.windowSourceURL += '?';
}
$DOMWindow.load(
settings.windowSourceURL + '&random=' + (new Date().getTime()),function(){
showDOMWindow();
});
}
break;
}
}//end if anchored, or absolute, fixed, centered
};//end run()
if(settings.eventType){//if used with $().
return this.each(function(index){
$(this).bind(settings.eventType,function(){
run(this);
return false;
});
});
}else{//else called as $.function
run();
}
};//end function openDOMWindow
//allow for public call, pass settings
$.openDOMWindow = function(s){$.fn.openDOMWindow(s);};
})(jQuery);
```
And here is the hyperlink tag from my HTML that opens up the light box.
```
<a href="/php/ajax/edit_map_pin.htm?mAddressBox0=FALSE&mPin_ID=foo" class="AjaxDOMWindow">Change Icon</a>
```
Here is a screenshot from siege detailing the memory step increase every time the user opens and closes the DOM window from that link. Any help is greatly appreciated. Thanks!

| jQuery DOMWindow script doesn't release memory | CC BY-SA 2.5 | 0 | 2011-02-08T16:56:48.337 | 2011-02-08T22:32:31.617 | null | null | 480,807 | [
"javascript",
"jquery",
"dom",
"memory-management"
]
|
4,936,076 | 1 | 4,936,227 | null | 0 | 1,315 | How to find the number for sentences in a String data ?
Edit: Ok I came up with this after following Wipqozn's method
```
Dim str As String = "This . is . a . text."
Dim maxCount As Integer = str.Count
Dim intSent As Integer = 1
Dim singleChar As Char
For i = 1 To maxCount
singleChar = str.Chars(i) ' Getting an error here
If singleChar = "." Then
intSent = intSent + 1
End If
Next
MsgBox("Number of sentence = " & intSent)
```

| how to find the number sentences in a string | CC BY-SA 2.5 | null | 2011-02-08T17:13:16.193 | 2011-02-08T19:54:37.903 | 2011-02-08T19:48:15.370 | 590,666 | 590,666 | [
"vb.net"
]
|
4,936,075 | 1 | null | null | 0 | 642 | I have a report which basically shows time info.
There are three levels or groups:
```
Route
Fleet
Vehicle
```
Under the Vehicle level, the report shows time info for each trip performed by the vehicle, and a time average for the vehicle.
Inside the Fleet level, the report shows time info for each vehicle, and an average for that Fleet.
The same applies for the Route level. It lists time info for all the Fleets that travel through that route, and an average for that route.
The problem is that I am getting some weird Route averages. And I am using the standard `Avg` function for all the average fields.

For instance, the first line is supposed to show an average of the times in bold.
On the second column, it brings the time average value of . What I wished was
I guess that instead of considering only the Fleet times in the average, all the times below the first row are being considered.
Any way of achieving what I want?
Thanks in advance
| SQL 2005 Reporting Services - Wrong Average Values | CC BY-SA 2.5 | null | 2011-02-08T17:13:08.620 | 2011-02-10T22:42:17.477 | null | null | 244,189 | [
"reporting-services",
"reportingservices-2005",
"average"
]
|
4,936,106 | 1 | 4,936,699 | null | 0 | 2,105 | I would like to make a custom button, that will display 3 data bound labels and some other text. I would like this button to act fully like a asp:button control. Currently The only idea I have is to surround the labels with a div, trigger the divs click event to use a javascript event which causes a postback. I do not want this,
```
<div class="someClass">
<div>
<asp:Label ID="lblONE" runat="server" Text='ONE'></asp:Label>
</div>
<div>
<asp:Label ID="lblTWO" runat="server" Text='TWO'></asp:Label>
</div>
<div>
<asp:Label ID="lblTHREE" runat='server' Text='THREE'></asp:Label>
</div>
</div>
```
I have applied css to the elements and want the button to end up looking like this. Except where it says bob steve mark you can sub in ONE TWO THREE respectively
Button Layout

| .net div trigger postback | CC BY-SA 2.5 | null | 2011-02-08T17:16:21.783 | 2011-02-08T18:14:04.130 | 2011-02-08T17:34:32.283 | 525,672 | 525,672 | [
".net"
]
|
4,936,108 | 1 | 4,937,436 | null | 1 | 2,790 | I was following the tutorial here:
[http://www.sencha.com/learn/Tutorial:Grid_PHP_SQL_Part3](https://i.stack.imgur.com/Zyi6Z.png)
But I have not been able to load my gridPanel. I've been struggling with this for quite a while now and I keep changing my code around and nothing is working. I can see that the JSON loads if I look in FireBug, and yes I have tried disabling FireBug and still I've yet to have any luck...
I've have followed the above tutorial, referenced the ExtJS Cookbook, and have looked through the various examples and API docs on the Sencha site.
I appreciate any help and thank you very much,
elshae

```
function getList()
{
global $DBConnect;
$place_name_result = @pg_query($DBConnect, "SELECT place_names.location, place_names.name, language.name AS language, place_names.transliteration,
place_names.english_translation, place_names.place_group, place_names.located_true, place_names.id AS place_names_id, category.name AS category,
category.id AS category_id FROM place_names, place_location, category,
language WHERE place_names.location = place_location.id AND place_location.category = category.id AND place_names.language = language.id;");
$number_of_rows = pg_num_rows($place_name_result);
if( $number_of_rows > 0 ){
$place_names = array("total" => $number_of_rows, "results" => array());
$i = 0;
while (($place_name_records = pg_fetch_row($place_name_result)) && ($i < 100)) {
//$place_names[] = $place_name_records;
$place_names['results'][$i] = $place_name_records;
$i++;
}
$jsonresult = JEncode($place_names);
//echo '({"total":"'.$number_of_rows.'","results":'.$jsonresult.'})';
//echo '{"total":'.$number_of_rows.',"results":'.$jsonresult.'}';
echo $jsonresult;
} elseif( $number_of_rows = 0 ) {
echo '({"total":"0", "results":""})';
} elseif(!$place_name_result){
echo "An error occurred upon getting data from the place_names, place_location and category tables.\n";
exit;
}
}//End getList()
function JEncode($arr){
if (version_compare(PHP_VERSION,"5.2","<"))
{
require_once("./JSON.php"); //if php<5.2 need JSON class
$json = new Services_JSON(); //instantiate new json object
$data=$json->encode($arr); //encode the data in json format
} else
{
$data = json_encode($arr); //encode the data in json format
}
return $data;
}//End JEncode($arr)
//getList();
$task = '';
if (isset($_POST['task']) ){
$task = $_POST['task']; // Get this from Ext
}
switch($task){
case "LISTING": // Give the entire list
getList();
break;
default:
echo "{failure:true}"; // Simple 1-dim JSON array to tell Ext the request failed.
break;
}
```
```
var placeNamesDataStore;
var placeNamesColumnModel;
var placeNamesListingEditorGrid;
var placeNamesListingWindow;
Ext.BLANK_IMAGE_URL = "../ext-3.3.1/resources/images/default/s.gif";
/*placeNamesDataStore = new Ext.data.JsonStore({
storeId: 'placeNamesDataStore',
url: 'tibetTestAdmin.php', // File to connect to
//method: 'POST',
baseParams: {task: "LISTING"}, // this parameter asks for listing
// we tell the datastore where to get data from
root: 'results',
totalProperty: 'total',
idProperty: 'place_names_id',
fields: [
{name: 'location', type: 'int', mapping: 'location'},
{name: 'name', type: 'string', mapping: 'name'},
{name: 'language', type: 'string', mapping: 'language'},
{name: 'transliteration', type: 'string', mapping: 'transliteration'},
{name: 'english_translation', type: 'string', mapping: 'english_translation'},
{name: 'place_group', type: 'int', mapping: 'place_group'},
{name: 'located_true', type: 'bool', mapping: 'located_true'},
{name: 'place_names_id', type: 'int', mapping: 'place_names_id'},
{name: 'category', type: 'string', mapping: 'category'},
{name: 'category_id', type: 'int', mapping: 'category_id'}
],
sortInfo:{field: 'place_names_id', direction: "ASC"}
});*/
Ext.onReady(function(){
Ext.QuickTips.init();
placeNamesDataStore = new Ext.data.Store({
id: 'placeNamesDataStore',
proxy: new Ext.data.HttpProxy({
url: 'tibetTestAdmin.php', // File to connect to
method: 'POST'
}),
baseParams: {task: "LISTING"}, // this parameter asks for listing
reader: new Ext.data.JsonReader({
// we tell the datastore where to get data from
root: 'results',
totalProperty: 'total',
idProperty: 'place_names_id',
fields: [
{name: 'location', type: 'int', mapping: 'location'},
{name: 'name', type: 'string', mapping: 'name'},
{name: 'language', type: 'string', mapping: 'language'},
{name: 'transliteration', type: 'string', mapping: 'transliteration'},
{name: 'english_translation', type: 'string', mapping: 'english_translation'},
{name: 'place_group', type: 'int', mapping: 'place_group'},
{name: 'located_true', type: 'bool', mapping: 'located_true'},
{name: 'place_names_id', type: 'int', mapping: 'place_names_id'},
{name: 'category', type: 'string', mapping: 'category'},
{name: 'category_id', type: 'int', mapping: 'category_id'}
]}),
sortInfo:{field: 'place_names_id', direction: "ASC"}
});
placeNamesColumnModel = new Ext.grid.ColumnModel(
[{
header: 'Location',
readOnly: true,
dataIndex: 'location', // this is where the mapped name is important!
width: 80,
hidden: false
},{
header: 'Place Name',
dataIndex: 'name',
width: 100,
editor: new Ext.form.TextField({ // rules about editing
allowBlank: false,
maxLength: 100,
maskRe: /([a-zA-Z0-9\s]+)$/ // alphanumeric + spaces allowed
})
},{
header: 'Language',
dataIndex: 'language',
width: 70,
editor: new Ext.form.TextField({
allowBlank: false,
maxLength: 50,
maskRe: /([a-zA-Z0-9\s]+)$/
})
},{
header: 'Transliteration',
dataIndex: 'transliteration',
width: 150,
editor: new Ext.form.TextField({ // rules about editing
allowBlank: false,
maxLength: 150,
maskRe: /([a-zA-Z0-9\s]+)$/ // alphanumeric + spaces allowed
})
},{
header: 'English Translation',
dataIndex: 'english_translation',
width: 200,
editor: new Ext.form.TextField({ // rules about editing
allowBlank: false,
maxLength: 200,
maskRe: /([a-zA-Z0-9\s]+)$/ // alphanumeric + spaces allowed
})
},{
header: "Place Group",
dataIndex: 'place_group',
width: 80,
readOnly: true
},{
header: 'Located True',
dataIndex: 'located_true',
width: 80,
readOnly: true
},{
header: 'Place Names ID',
dataIndex: 'place_names_id',
width: 100,
readOnly: true
},{
header: 'Category',
dataIndex: 'category',
width: 100,
editor: new Ext.form.TextField({ // rules about editing
allowBlank: false,
maxLength: 100,
maskRe: /([a-zA-Z0-9\s]+)$/ // alphanumeric + spaces allowed
})
},{
header: "Category ID",
dataIndex: 'category_id',
width: 70,
readOnly: true,
hidden: true
}
]
);
placeNamesColumnModel.defaultSortable= true;
placeNamesListingEditorGrid = new Ext.grid.EditorGridPanel({
id: 'placeNamesListingEditorGrid',
store: placeNamesDataStore, // the datastore is defined here
cm: placeNamesColumnModel, // the columnmodel is defined here
enableColLock:false,
clicksToEdit:1,
selModel: new Ext.grid.RowSelectionModel({singleSelect:false})
});
placeNamesListingWindow = new Ext.Window({
id: 'placeNamesListingWindow',
title: 'Place Names of points in the Tibetan Autonomous Region',
closable:true,
width:1100,
height:500,
plain:true,
layout: 'fit',
items: placeNamesListingEditorGrid // We'll just put the grid in for now...
});
placeNamesDataStore.load({// store loading is asynchronous, use a load listener or callback to handle results
callback: function(){
Ext.Msg.show({
title: 'Store Load Callback',
msg: 'store was loaded, data available for processing',
modal: false,
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
}
}); // Load the data
placeNamesListingWindow.show(); // Display our window
});
```
| ExtJS gridPanel is not loading JSON | CC BY-SA 2.5 | null | 2011-02-08T17:16:29.070 | 2011-11-24T09:55:01.073 | null | null | 469,497 | [
"json",
"extjs",
"gridpanel",
"jsonreader"
]
|
4,936,547 | 1 | 4,937,411 | null | 6 | 12,380 | I have a simple HTML table of options here:
```
<table>
<tr>
<td>blue</td>
<td>green</td>
</tr>
<tr>
<td>red</td>
<td>cream</td>
</tr>
</table>
```
The CSS with the relevant styles:
```
td { background-color: #FFF; border: 1px solid #3F3F3F; cursor: pointer; }
td.selected { color: #D93A2C; border: 1px solid #D93A2C; }
```
Looks like this:

When I click on one of the table cells, I want the border and text to be red. So I use jQuery to toggle the '.selected' class using the following code.
```
$('td').each(function(){
$(this).click(function(){
$(this).toggleClass('selected');
});
});
```
However the result is this:

The first table cell (blue) is the only one that looks as I want when selected. I need all the borders of the selected cell to be highlighted.
Any ideas on how to achieve this? I'm not opposed to ditching tables if someone can suggest a better way.
| jQuery: Change the border color of ONE table cell | CC BY-SA 2.5 | null | 2011-02-08T17:59:30.157 | 2011-02-08T19:30:41.477 | null | null | 143,911 | [
"javascript",
"jquery",
"html",
"css"
]
|
4,936,553 | 1 | 4,936,732 | null | 79 | 85,412 | I want to have a button at the bottom of the listview.
If I use relativeLayout/FrameLayout, it aligns but listView goes down to very botton.
(Behind the button at the bottom)

FrameLayout:
```
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentBottom="true">
<Button
android:id="@+id/btnButton"
android:text="Hello"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" />
</FrameLayout>
</FrameLayout>
```
RelativeLayout:
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<Button
android:id="@+id/btnButton"
android:text="Hello"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" />
</RelativeLayout>
</RelativeLayout>
```
Above two codes only work like the first image. What I want is second image.
Can anybody help?
Thank you.
| Android: How can you align a button at the bottom and listview above? | CC BY-SA 2.5 | 0 | 2011-02-08T18:00:11.053 | 2019-09-13T11:25:22.617 | null | null | 432,056 | [
"android",
"listview",
"layout",
"alignment"
]
|
4,936,780 | 1 | null | null | 0 | 1,180 | I am currently creating an application that needs to implement the "Dry Brush" Filter of Adobe Photoshop on a Bitmap.
I have absolutely no idea where to begin.
Here is an example of the original image and what i need the outcome to be:
(Since i am a new user i cannot directly post images)
Before:

After:

*Alternatively i would like to have the image to look like an oil painting like you can see in the example.
Any help would be appreciated!
| How can the "Dry Brush" Filter from Adobe Photoshop can be implemented in C#? | CC BY-SA 3.0 | null | 2011-02-08T18:23:19.370 | 2013-03-27T07:41:40.447 | 2013-03-27T07:41:40.447 | 1,581,050 | 608,589 | [
"c#",
"image",
"bitmap",
"photoshop"
]
|
4,936,788 | 1 | 4,938,323 | null | 10 | 7,220 | There are three ways to measure impurity:



What are the differences and appropriate use cases for each method?
| Decision Tree Learning and Impurity | CC BY-SA 3.0 | 0 | 2011-02-08T18:23:55.267 | 2016-11-08T17:19:34.713 | 2016-11-08T17:19:34.713 | 2,721,160 | 275,674 | [
"machine-learning",
"data-mining",
"random-forest",
"decision-tree"
]
|
4,936,830 | 1 | 4,936,881 | null | 1 | 435 | :
I've created a website under IIS and have successfuly pointed it to my project. The path to my project under IIS is:
[http://localhost:36011/cartoon/](http://localhost:36011/cartoon/)
I, then created a virtual directory under website cartoon named cartoon_images but it creates it under localhost:36011/cartoon_images/ instead of localhost:36011/cartoon/cartoon_images/

As you can see, virtual directory is under the website "cartoon" but I can't access it as cartoon/cartoon_images/
I'll need to give links to this virtual folder but I can't do it in this case if I'm not mistaken.
Thank you.
| How to create a Virtual Directory under a Site | CC BY-SA 2.5 | null | 2011-02-08T18:28:26.780 | 2011-02-08T18:34:40.243 | 2011-02-08T18:34:40.243 | 521,278 | 521,278 | [
"asp.net",
"iis",
"web",
"iis-7.5"
]
|
4,936,956 | 1 | null | null | 2 | 727 | I want to create my own editor with my own style, I tried to edit a couple jquery editors but I can't get what I want.
Here is a sample pic of what I want:

I finished this bar in HTML and its look exactly what I want so the next step is to add actions to these buttons.
I don't have any idea how to do it but let's say that we added a textarea like other editors and attach this textarea with the top buttons - that is what I don't know how to do it.
if there is some way to make the text bold when the user click bold button for example.
We can do it easy with jQuery if this is some DIV element but this is textarea and I don't know to do it with it.
sorry for bad english.
| How I can create my own wysiwyg editor with my own style? | CC BY-SA 2.5 | 0 | 2011-02-08T18:41:07.423 | 2011-02-08T19:46:09.830 | null | null | 308,745 | [
"javascript",
"jquery",
"wysiwyg"
]
|
4,937,163 | 1 | 4,937,182 | null | 6 | 374 | Title edit: capitalization fixed and 'for python' added.
Is there a better or more standard way to do what I'm describing?
I want input like this:
`[1, 1, 1, 0, 2, 2, 0, 2, 2, 0, 0, 3, 3, 0, 1, 1, 1, 1, 1, 2, 2, 2]`
to be transformed to this:
`[0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 2, 0]`
or, even better, something like this (describing similar output differently, but now not limited to integers):
labels: `[1, 2, 3, 1, 2]`
positions(where 1 identified the first occupiable position, as per my matplotlib plot): `[2, 7, 12.5, 17, 21]`
The input data is categorical data that classified a plot - in the picture below, grouped plots share a categorical feature which I'd like to label only once for the group. I'll be using 2 axes for two different variables, but I think that's besides the point for now.
Note: This image does not reflect either set of sample data - it's just to get across the idea of grouping together categories. Group a should be labeled at x=5, since there's a blank space between the first two and second to vertical data groups, and 0 is the line on the right side.

Here's what I've got:
```
data = [1, 1, 1, 2, 2, 2, 2, 2, 3, 4, 3, 2, 2, 1, 1, 1, 1]
last = None
runs = []
labels = []
run = 1
for x in data:
if x in (last, 0):
run += 1
else:
runs.append(run)
run = 1
labels.append(x)
last = x
runs.append(run)
runs.pop(0)
labels.append(x)
tick_positions = [0]
last_run = 1
for run in runs:
tick_positions.append(run/2.0+last_run/2.0+tick_positions[-1])
last_run = run
tick_positions.pop(0)
print tick_positions
```
| Grouping a series in Python | CC BY-SA 2.5 | 0 | 2011-02-08T19:03:58.980 | 2011-02-08T20:06:12.400 | 2011-02-08T19:11:44.327 | 398,212 | 398,212 | [
"python",
"matplotlib"
]
|
4,937,492 | 1 | 4,937,929 | null | 2 | 2,852 | I am using jquery selectable plugin and running it to a situation as follows.
Please take a look at this image

The html5 canvas is enclosed inside a DIV. But the canvas is bigger than the DIV size on purpose. The round rectangle is always of the size of the DIV. The canvas is bigger by say 10 pixel on each side of the DIV boundary. In the above image, the blue boundary represents the canvas.
I have jquery selectable and it selects all objects that are of class ="mt_obj".
The DIV is assigned this class but the canvas is not assigned this class.
The side effect is when I use the marquee selection (rubberband) and if it falls in the canvas region then the object gets selected. So if I click between the blue border and the rounded square border, the object gets selected. The desired behavior is to select only when the user clicks on the gray rounder square.
Here is the HTML code. . I think the canvas selection propogates to the DIV since the div is the parent of canvas.
```
<div style="display: block; position: absolute;
top: 181px; left: 217px; width: 398px; height: 34px; z-index: 1;"
class="mt_obj ui-resizable ui-draggable ui-selected ui-resizable-autohide">
<canvas style="position: relative;
top: -10px; left: -17.4561px;" width="432" height="54">
</canvas>
</div>
```
| jquery selectable - Div and Canvas | CC BY-SA 2.5 | null | 2011-02-08T19:38:48.420 | 2011-02-08T20:18:09.853 | null | null | 341,933 | [
"jquery",
"jquery-selectors"
]
|
4,937,568 | 1 | 4,937,604 | null | 0 | 394 | I am looking for ways to browse sites that are blocked by proxy filters at my location.
One solution i came up with was to build a page that would take a input of a URL and display the site in an iframe. Thus i would have a window into a browser on a page that is being displayed by my proxy. I was going to host this on my personal web site and use it to access restricted content. this way i have access to blogs, and forums where there is a wealth of information that is blocked by a backwards blanketed restriction list.
How can i make a web page similar to this? Would it be simple html and javascript, do I need .Net?

| web page needed for bypassing proxy restricted sites | CC BY-SA 2.5 | null | 2011-02-08T19:45:36.460 | 2014-02-14T01:07:40.913 | 2011-02-08T19:47:39.750 | 6,521 | 352,157 | [
"html"
]
|
4,937,844 | 1 | 4,937,887 | null | 9 | 11,817 | Just finished installing libevent(1.4.8), memcached(1.4.5), pear, and libmemcached(0.40) to my lamp server (running PHP 5.2.10 & Centos 5.5 Final), and as far as I can tell, everything installed correctly (was able to address all errors during installation).
However, after finally getting everything updated and installed... upon attempting either of the following:
```
$test=memcache_connect('127.0.0.1', 11211); // OR
$memcache = new Memcache;
$memcache->connect('127.0.0.1', 11211)
```
I get the errors:
Fatal error: Class 'Memcache' not found (or) Fatal error: Call to undefined function memcache_connect()
I'm (admittedly) not very good with linux at this point, although after setting this server up completely from scratch, i'm certainly making headway in the education process :) Any help would be much appreciated!

| Memcached installed (In theory), PHP unable to use memcache_connect() | CC BY-SA 2.5 | null | 2011-02-08T20:11:24.300 | 2011-02-08T20:16:24.880 | null | null | 603,702 | [
"php",
"caching",
"memcached",
"centos",
"pear"
]
|
4,937,971 | 1 | 4,937,999 | null | 2 | 5,370 | I have a one-to-one relationship, and have a combobox for selecting the other one. How do I change the display name of the combo box?
Here's a screenshot of the combo box, to make myself clear:

I'm new to grails, and are attempting to create a simple data-driven app for in house use.
Edit: My toString():
```
def toString = { "${naam} [${gemeente}]" }
```
| Change display name of Grails Domain Class | CC BY-SA 2.5 | null | 2011-02-08T20:22:37.487 | 2016-06-26T04:43:54.860 | 2011-02-08T20:28:30.667 | 254,850 | 254,850 | [
"grails",
"combobox",
"grails-domain-class"
]
|
4,938,008 | 1 | 8,131,731 | null | 1 | 438 | This is the dialog that appears when a NetBeans user selects the 'Attach Debugger...' item from the Debug menu.

I want to preset the value of the Port field so users just need to click OK to start debugging the process that my module has started.
| How do I change the default value of the Port field on the Attach dialog programmatically? | CC BY-SA 2.5 | null | 2011-02-08T20:26:34.677 | 2011-11-15T05:05:04.297 | 2011-11-15T04:51:53.830 | 843,318 | 111,331 | [
"netbeans",
"netbeans-plugins"
]
|
4,938,155 | 1 | 4,938,204 | null | 0 | 249 | i've got the following problem:

here is my sql for the update
```
public void editEvent(String eventName, String eventCategory, String longitude, String latitude, String pricesFrom, String startDate, String endDate, String eventDescription, String address, String postcode){
String query = "update `mtgultas`.`Event` SET `Event` VALUES(`eventName` = '"+eventName+"', `eventCategory` = '"+eventCategory+"', `longitude` = '"+longitude+"', `latitude` = '"+latitude+"', `pricesFrom` = '"+pricesFrom+"', `startDate` = '"+startDate+"', `endDate` = '"+endDate+"', `eventDescription` = '"+eventDescription+"', `address` = '"+address+"', `postcode` = '"+postcode+"')";
db.update(query);
System.out.println(query);
}
```
what i am trying to do is update the database entry. i can populate my frame with the current details however when i click save to update it has a "paddy"
any help would be appreciated
| sql syntax error | CC BY-SA 2.5 | null | 2011-02-08T20:40:51.330 | 2011-02-09T08:15:43.783 | null | null | 229,616 | [
"java",
"sql",
"netbeans"
]
|
4,938,178 | 1 | 4,938,262 | null | 0 | 4,092 | i've created large vector graphics in Illustrator to be imported in Flash as display assets.
the application i'm building will target different screen sizes (including Television with AIR 2.5) and the display assets will be scaled down at runtime to fit the target screen.
the largest of vector graphic imports is 5000 x 1250 pixels. however, i can't import the graphic (either as a native vector or a bitmap conversion) because of the stage size limitation in Flash Professional CS5:

from the flash.display.BitmapData class documentation:
> In AIR 1.5 and Flash Player 10, the
maximum size for a BitmapData object
is 8,191 pixels in width or height,
and the total number of pixels cannot
exceed 16,777,215 pixels. (So, if a
BitmapData object is 8,191 pixels
wide, it can only be 2,048 pixels
high.) In Flash Player 9 and earlier
and AIR 1.1 and earlier, the
limitation is 2,880 pixels in height
and 2,880 in width.
i'm targeting Air 2.5 for the Publish Settings Player and i still can not increase the stage size above 2880 x 2880 or import graphics larger than 2880 x 2880.
if the BitmapData limitation has been increased for Flash Player 10 and AIR 1.5 or higher, why can't i import graphics and/or increase the size of the stage within that limit?
| Flash CS5 - Stage Size Limitation? | CC BY-SA 2.5 | null | 2011-02-08T20:42:24.630 | 2011-02-08T20:50:05.813 | null | null | 336,929 | [
"flash",
"actionscript-3",
"air",
"size",
"stage"
]
|
4,938,232 | 1 | 4,938,295 | null | 1 | 1,359 | I'm using Core Data, fetching some data into a NSArray and then looping thru it.
```
......
NSMutableArray *persons = [[NSMutableArray alloc] init];
NSError *error;
NSManagedObjectContext *context = [self managedObjectContext];
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Person" inManagedObjectContext:context];
[fetchRequest setEntity:entity];
NSArray *fetchedObjects = [context executeFetchRequest:fetchRequest error:&error];
for (NSManagedObject *info in fetchedObjects) {
ToggleButtonInfo *btn = [[ToggleButtonInfo alloc] init];
btn.buttonName = [info valueForKey:@"name"];
[persons addObject:btn];
}
[fetchRequest release];
return persons;
```
Then I send persons to a component that renders the buttons. In instruments I'm getting the folloging memory leak

if I replace with the leak despairs. Notice that NSSQLCore. The leaks increments every time I call this method to refresh the view. I want to mention that the "Person" table has a relationship with another table, one-to-many. In the component, when I'm about to load new data, I release the NSMutableArray, and it doesn't look to be the problem. should I release something else here? what am I missing?
UPDATE *******************************************
here is a screenshot of Instruments. It looks like the custom objects are ben released correctly. the problem is associated with Core Data, doesn't it?

.. and going into the NSString:

| Core data and memory leak | CC BY-SA 2.5 | null | 2011-02-08T20:47:19.813 | 2012-04-09T06:44:53.403 | 2011-02-08T23:15:13.787 | 440,243 | 440,243 | [
"iphone",
"objective-c",
"memory-leaks"
]
|
4,938,300 | 1 | 4,938,579 | null | 4 | 5,942 | I'm adding a button column to my databound datagridview. The column gets created, and the button is clickable, but it doesn't really show. Its kinda hard to explain so I'm posting a screenshot below.
Here's the code
```
private void LoadDataGridView()
{
dgvClients.DataSource = null;
dgvClients.DataSource = Clients;
DataGridViewButtonColumn btnDelete = new DataGridViewButtonColumn();
btnDelete.Name = "btnDelete";
btnDelete.Text = "Delete";
btnDelete.HeaderText = "Delete";
dgvClients.Columns.Add(btnDelete);
//set column sizes. Total width of dgv w/o scrollbar is 544
dgvClients.Columns[0].Width = 100;
dgvClients.Columns[1].Width = 344;
dgvClients.Columns[2].Width = 100;
dgvClients.Columns[3].Width = 100;
dgvClients.Show();
dgvClients.ClearSelection();
}
```
Screenshot:

| Adding button column to DataGridView but it won't show | CC BY-SA 2.5 | 0 | 2011-02-08T20:53:54.163 | 2011-02-08T21:19:28.557 | null | null | 315,828 | [
"c#",
"winforms",
"datagridview"
]
|
4,938,387 | 1 | 4,938,417 | null | 0 | 2,694 | I was wondering if it was possible if I had an image like: 
I would be able to change certain parts of the images colors. For example if I wanted the bow green and the present red with yellow stripes, would I have to make a new image that had that or is there a way to program something (elegantly) along the lines of that? I'm just asking to see if its possible and if it is, what language would be best to do this?
Keep in mind this would be a feature on a website.
| Changing colors of an image dynamically | CC BY-SA 2.5 | 0 | 2011-02-08T21:01:08.643 | 2011-02-08T21:42:02.700 | null | null | 297,663 | [
"php",
"javascript"
]
|
4,938,540 | 1 | 4,947,991 | null | 8 | 864 | I've got a situation where my CSS is applying styles that don't apply to the object being styled. Here is code from my site.css file...
```
.rules aside {
width: 270px;
right: 0px;
top: 0px;
float: left;
}
.rules aside h3 {
border-bottom-width: 2px;
border-bottom-style: solid;
border-bottom-color: #2A2A2A;
padding-bottom: 6px;
padding-top: 11px;
margin-bottom: 0px;
color: #F0E29A;
font-size: 14px;
letter-spacing: -0.5px;
text-transform: uppercase;
}
```
Now here is some HTML that utilizes it...
```
<article class="content rules">
<section>
// ...
</section>
<aside>
Some Content
</aside>
</article>
```
And here is the CSS markup that Chrome's Inspector shows for the `<aside>` element..
```
.rules aside {
border-bottom-width: 2px;
border-bottom-style: solid;
border-bottom-color: #2A2A2A;
padding-bottom: 6px;
padding-top: 11px;
margin-bottom: 0px;
color: #F0E29A;
font-size: 14px;
letter-spacing: -0.5px;
text-transform: uppercase;
width: 270px;
right: 0px;
top: 0px;
float: left;
}
```
This doesn't make any sense. Only an `<h3>` element should be styled from the `.rules aside h3` selector. Yet it is cascading down into the root `<aside>` element. I have other instances of this happening as well. This is happening in Google Chrome (latest version)
Including screenshots for proof.


---
> [jsfiddle.net/2hnLx](http://jsfiddle.net/2hnLx) - running this
exact same code from an .html file on
my machine yields the problem results,
but running it from jsFiddle yields
the expected results. – Stacey
The code from the jsFiddle:
```
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>jsFiddle Example</title>
<style type="text/css">
article, section, aside, header, nav { display: block; }
#container {
margin: 0px auto;
width: 960px;
position: relative;
}
section {
float: left;
width: 685px;
left: 0px;
background-color: #ccc;
}
section h2 {
padding: 10px;
}
section h3 {
font-size: 32px;
color: #ffcc00;
font-weight: bold;
padding: 10px;
border-bottom-width: 2px;
border-bottom-style: solid;
border-bottom-color: #2A2A2A;
margin-bottom: 18px;
margin-left: 10px;
margin-right: 10px;
}
.rules aside {
width: 270px;
right: 0px;
top: 0px;
float: left;
background-color: #000;
}
aside h3 {
border-bottom-width: 2px;
border-bottom-style: solid;
border-bottom-color: #2A2A2A;
padding-bottom: 6px;
padding-top: 11px;
margin-bottom: 0px;
color: #F0E29A;
font-size: 14px;
letter-spacing: -0.5px;
text-transform: uppercase;
background-color: #fff;
}
</style>
</head>
<body>
<div id="container">
<article>
<section>
<p>Section Text</p>
</section>
<aside>
<p>Aside Text</p>
</aside>
</article>
</div>
</body>
</html>
```
| Peculiar Reverse Cascading in CSS | CC BY-SA 2.5 | 0 | 2011-02-08T21:15:59.053 | 2011-02-09T18:56:42.730 | 2011-02-08T22:14:46.487 | 405,015 | 84,685 | [
"html",
"css",
"google-chrome"
]
|
4,938,716 | 1 | 4,938,802 | null | 165 | 379,897 | I know this is a rather simple question, but I can't figure it out for the life of me. I have two links which I've applied a background image to. Here's what it currently looks like (apologies for the shadow, just a rough sketch of a button):

However, I want those two buttons to be side by side. I can't really figure out what needs to be done with the alignment.
```
<div id="dB"}>
<a href="http://notareallink.com" title="Download" id="buyButton">Download</a>
</div>
<div id="gB">
<a href="#" title="Gallery" onclick="$j('#galleryDiv').toggle('slow');return false;" id="galleryButton">Gallery</a>
</div>
```
```
#buyButton {
background: url("assets/buy.png") 0 0 no-repeat;
display:block;
height:80px;
width:232px;
text-indent:-9999px;
}
#buyButton:hover{
width: 232px;
height: 80px;
background-position: -232px 0;
}
#buyButton:active {
width: 232px;
height: 80px;
background-position: -464px 0;
}
#galleryButton {
background: url("images/galleryButton.png") 0 0 no-repeat;
display:block;
height:80px;
width:230px;
text-indent:-9999px;
}
#galleryButton:hover{
width: 230px;
height: 80px;
background-position: -230px 0;
}
#galleryButton:active {
width: 230px;
height: 80px;
background-position: -460px 0;
}
```
| Align <div> elements side by side | CC BY-SA 4.0 | 0 | 2011-02-08T21:32:13.520 | 2021-03-25T16:40:02.593 | 2021-03-25T16:40:02.593 | 101,290 | 456,851 | [
"css",
"html",
"alignment"
]
|
4,938,853 | 1 | null | null | 0 | 87 | I'm in the middle of making my own custom forum system software. Much like phpbb, mybb, vbulletin, etc. except it's obviously quite less advanced. It's just a personal project for myself and I've run into some problems since I've never had to develop something that can be repackaged for others.
The file structure is as follows:

So, config.php is the end all be all of including files. It has the database connection information, it instantiates my database class as well, and none of the function files require/include any files since they'll always be accessed where config.php is required.
HERE'S THe QUESTION!
However I'm running into simple but very annoying problems, for example I call a function in config.php towards the top that checks the users cookies values and makes sure they all belong to the same user, and if not it deletes the cookies. However, it has to be after the database files require. And things like, a variable declared in config.php isn't always accessible, so sometimes I have to declare it in the header files.
Seems like it's not much of a question, but I guess it's just asking for how I can include/require in general without running into issues.
| Open source software - How to setup files | CC BY-SA 3.0 | null | 2011-02-08T21:46:11.473 | 2012-06-26T22:34:47.143 | 2012-06-26T22:34:47.143 | 773,690 | 608,855 | [
"php",
"file",
"filesystems"
]
|
4,938,895 | 1 | null | null | 2 | 291 | I'm attempting to synchronize a [DOMRange](http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html) (representing a user-selection from a [Cocoa WebView](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/WebKit/Classes/WebView_Class/Reference/Reference.html)) to the original HTML source currently rendered in that view, as a kind of Dreamweaver-split-editor:

My first idea was to get the DOMRange object's `startContainer` and `offset` and walk up the DOM tree from there, accumulating the overall character offset up to the body tag.
Unfortunately this task presents some problems:
1. Clearly the document's outerHTML will differ from the original HTML source if the DOM was manipulated via Javascript or the parser needed to clean up malformed tags.
2. I can't figure out how to get the offset of a node within its parent text node (e.g., 4 characters to target in <p>some<div>target</div>text</p>), and normalize doesn't seem to make this any easier.
3. Trying to account for some of the problems in #1, or just going from HTML source to WebView will probably require separately parsing the HTML and then correlating the two DOM-trees.
One ray of hope is that HTML5 specifies a standard parsing algorithm for dealing with invalid HTML (which WebKit has since adopted), so in theory it should be possible to use an off-the-shelf HTML5 parser to generate the same tree as WebKit — right?
This is the most similar existing question I could find, but it's for a slightly different problem:
[Getting source HTML from a WebView in Cocoa](https://stackoverflow.com/questions/2046381/getting-source-html-from-a-webview-in-cocoa)
| Determine character index in HTML source given a DOMRange from a WebKit selection | CC BY-SA 3.0 | 0 | 2011-02-08T21:50:58.173 | 2011-12-23T11:45:46.597 | 2017-05-23T12:01:17.083 | -1 | 53,034 | [
"cocoa",
"dom",
"webkit",
"html-parsing",
"html-editor"
]
|
4,939,054 | 1 | 4,939,353 | null | 1 | 4,682 | I have a UINavigationController that pushes on another UIViewController. In this UIViewController I am going to show a UITableView when in portrait mode and another view in landscape mode.
Therefore in my viewDidLoad I am creating UIView and then adding 2 ViewControllers to this. My problem is that when it loads up I get the following white margin at the top.

I think this is because of (in my Step 3 below ) the
```
CGRect appFrame = [[UIScreen mainScreen] applicationFrame];
[[self view] setFrame:appFrame];
```
is not returning the full screen, minus the navigation bar. Is this right? If so how can I make it return the full size so there is no white margin?
```
- (void)viewDidLoad
{
[super viewDidLoad];
// Step 1 - Set up the tableDataView for vertical layout
TableDataViewController *tableController = [[TableDataViewController alloc] init];
self.tableDataViewController = tableController;
[tableController release];
// Step 2 - Set up the graphView for horizontal layout
GraphViewController *graphController = [[GraphViewController alloc]
initWithNibName:@"GraphViewController" bundle:nil];
self.graphViewController = graphController;
[graphController release];
// Step 3 - Get the screen size
CGRect appFrame = [[UIScreen mainScreen] applicationFrame];
[[self view] setFrame:appFrame];
// Step 4 - Add the vertical view to the containerView
// and then add the containerView to this controller
containerView = [[[UIView alloc] initWithFrame:appFrame] autorelease];
[[self view] addSubview:containerView];
[containerView addSubview:[tableDataViewController view]];
// Step 5 - Add to the active view so we can test for it later
activeView = [tableDataViewController view];
}
```
Many thanks
Mike
| UIViewController not filling screen | CC BY-SA 2.5 | 0 | 2011-02-08T22:05:42.630 | 2011-02-08T23:45:49.280 | 2020-06-20T09:12:55.060 | -1 | 570,498 | [
"iphone",
"uiview",
"uiviewcontroller",
"uinavigationcontroller",
"uinavigationbar"
]
|
4,939,119 | 1 | 4,944,479 | null | 2 | 584 | I'm trying to create 3d effect using vertex and index buffers in 2d (z-coord is 0) using DirectX7.
It's easier to explain with a picture:

The problem is that the lines are broken. They should be straight. To render this image it gets break up in triangles and rendered using DrawIndexedPrimitiveVB. Obviously each of the triangle is skewed a little differently and I don't see why.
Am I missing something trivial here?
I'm not sure if this will help, but the source and destination quads are as follow:
```
SPoint4:= pBounds4(1, 1, W - 2, H - 2);
DPoint4:= Point4(ProjTo2dX(i, FlyDist + DeepDist, W), ProjTo2dY(0, FlyDist + DeepDist, H), ProjTo2dX(W - i, FlyDist, W), ProjTo2dY(0, FlyDist, H), ProjTo2dX(W - i, FlyDist, W), ProjTo2dY(H, FlyDist, H), ProjTo2dX(i, FlyDist + DeepDist, W), ProjTo2dY(H, FlyDist + DeepDist, H));
```
| Directx vertex rendering: unable to get texture to display correctly for trapetzoids | CC BY-SA 2.5 | null | 2011-02-08T22:13:15.857 | 2012-05-26T09:07:55.033 | null | null | 205,489 | [
"directx",
"textures",
"vertex"
]
|
4,939,877 | 1 | 4,940,067 | null | 0 | 757 | I have a tab bar application and when I display a modal view controller, the content screen is offset by about 20 pixels to the top and left. It looks like this: 
I'm presenting this view from the child view controller (detail view) of navigation controller (main view) of the tabview.
When I show the view, I'm hiding the tab bar and navigation bar but status bar is kept visible. Adjusting the view to be centered (through Interface Builder's Simulated Interface Elements->View Mode : Center) and changing the view's frame after a call to 'viewDidLoad' in the controller doesn't seem to shift it.
```
- (void)viewDidLoad {
// this still doesn't cause it to shift
self.view.frame = CGRectMake(0, 20, 320, 460);
}
```
What's the way to adjust this so that the content area is shown correctly?
I launch the child view like this:
```
[detailController presentModalViewController:tvc animated:NO];
```
The app's view controller hierarchy:
Tab view with two child navigation controllers are created in the app delegate and the nav controllers added to the TabBar's view controllers:
```
tabBarController = [[UITabBarController alloc] init];
tabBarController.viewControllers = [NSArray arrayWithObjects:tab1ViewController,
tab2ViewController, nil];
[window addSubview:tabBarController.view];
```
Each view controllers of the tab is created as a NavigationController with 1 view controller:
```
// MainViewController inherits from UIViewController
[MainViewController *viewController = [[MainViewController alloc] initWithNib..];
tab1ViewController.viewControllers = [NSArray arrayWithObject:viewController];
```
A detail view controller is launched with 'pushViewController' as a result of some action on tab1ViewController :
```
DetailController *detailController = [[DetailController alloc]
initWithNibName:@"DetailView"
bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:detailController animated:YES];
[detailController release];
```
It's from the detailController that I'm trying to launch the problem controller.
| Child view offset by 20 pixels in TabBar application | CC BY-SA 2.5 | 0 | 2011-02-08T23:50:55.160 | 2011-02-09T00:14:46.030 | null | null | 566,281 | [
"iphone",
"uiviewcontroller",
"uitabbarcontroller"
]
|
4,940,119 | 1 | 4,940,163 | null | 0 | 152 | 
If you add only one button in a whole new Activity, the screen looks like this:

```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:id="@+id/Button01"
android:layout_height="wrap_content"
android:text="false"
android:layout_width="wrap_content" ></Button>
</LinearLayout>
```
But if you add a ListView, then everything is OK:

```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:layout_width="fill_parent"
android:id="@+id/contactList"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<Button android:id="@+id/Button01"
android:layout_height="wrap_content"
android:text="false"
android:layout_width="wrap_content" ></Button>
</LinearLayout>
```
This only happened in QVGA mode. HVGA mode worked fine.
| A bug of the 2d layout engine of Android? | CC BY-SA 2.5 | 0 | 2011-02-09T00:21:24.497 | 2011-02-09T01:01:37.483 | 2011-02-09T01:01:37.483 | 23,897 | 84,325 | [
"android",
"android-layout"
]
|
4,940,253 | 1 | 4,940,423 | null | 1 | 641 | There are two things going on at once in my application. A timer fires off a request to update a data grid every few seconds in a background thread. Here is the code that is run by that thread:
```
// Query
var qryPickupRequests = from pr in objDataContext.pickupRequests
.Include("toLocation")
.Include("fromLocation")
.Include("person")
orderby pr.creationDate ascending
select pr;
// Refresh from server?
if (boolRefreshFromServer)
(qryPickupRequests as ObjectQuery).MergeOption = MergeOption.PreserveChanges;
// Limit?
if (intLimit > 0)
return qryPickupRequests.Take(intLimit).ToList<pickupRequest>();
else
return qryPickupRequests.ToList<pickupRequest>();
```
Now, in the UI thread, there is another form open that is updating a grid of locations:
```
/// <summary>
/// Refreshes the specified location data grid
/// </summary>
/// <param name="sender">Instance of GridLookupEdit to update</param>
private static void RefreshLocations(object sender) {
GridLookUpEdit objEditor = sender as GridLookUpEdit;
objEditor.Properties.DataSource = BRData.Models.LocationModel.GetLocationList(true);
objEditor.Properties.DisplayMember = "locationName";
objEditor.Properties.ValueMember = "locationID";
}
```
The issue I'm having is when both of these code blocks are executed at the exact same time. I get the following error:

The inner exception is as follows:
> There is already an open DataReader
associated with this Connection which
must be closed first.
Any ideas why concurrent database operations are not handled correctly by the Entity Framework----or by me?
| Entity Framework - Error when multiple queries are executed at the same time | CC BY-SA 2.5 | null | 2011-02-09T00:42:54.317 | 2011-02-09T01:15:34.523 | null | null | 277,757 | [
"c#",
".net",
"entity-framework"
]
|
4,940,478 | 1 | 4,940,511 | null | 0 | 560 | I'm using a CMS called 'Nukeviet' and I installed it on my localhost. I'm facing a very strange problem, I've tried to search for the solution but nothing found.
I can see that css files are not working at all. When I use Firebug to find the problem, I switch to the tab 'CSS' and... all the required css files are there but it says... there're no rules! When I use the Developer tools of Google Chrome, in Resources tab, Chrome can see all the css files, but the contents of them are abnormal, like in this image:
.
I checked the encoding but it's normally ANSI. And, of course, the contents in all the css files are normal ANSI, no international text.
I tried copying the css files to a new place and write a new HTML for testing, those CSS works perfectly as usual without any problem.
So I can't understand why there're "ugly" question marks like that. Something... encrypted it?
Javascript files get the exact same problem, but image files are ok, all the others are ok, just problem with CSS and Javascript.
| CSS and Javascript not working! Browser cannot read css and javascript files | CC BY-SA 3.0 | null | 2011-02-09T01:25:50.747 | 2012-12-24T09:48:57.427 | 2012-12-24T09:48:57.427 | 367,456 | 557,232 | [
"php",
"javascript",
"css"
]
|
4,940,566 | 1 | null | null | 0 | 2,753 | - how to get process information like this format
my develop tools is visual c++ 2008
I would like to get process name,process id ,Process Path,Product Name Window Title
but i don't know how to connect those information toghter

| I would like to get process name,process id ,Process Path,Product Name Window Title | CC BY-SA 2.5 | null | 2011-02-09T01:47:47.220 | 2011-07-04T11:18:57.043 | 2011-02-09T01:53:43.440 | 515,662 | 515,662 | [
"visual-c++"
]
|
4,940,603 | 1 | 4,947,153 | null | 5 | 5,429 | 
A network volume's name can be changed.
I changed the name to


To change a network name, I do
- - - -
It works, but sometimes doesn't work even though I use SHChangeNotify and WM_DEVICECHANGE to be sure. Sometimes, the new name is not applied in Windows Explorer.
But if I terminate Explorer and re-execute, the name applied.
I'm finding an interface having Windows Explorer refreshed.(Is it correct syntax? Sorry, I can't express this sentence well.)
Is there a proper function? Explorer should re-read registry and be refreshed.
| How to refresh Windows Explorer | CC BY-SA 2.5 | 0 | 2011-02-09T01:58:41.713 | 2020-01-09T20:20:39.257 | 2011-02-11T06:38:23.087 | 252,047 | 252,047 | [
"windows",
"winapi",
"com",
"windows-explorer",
"windows-shell"
]
|
4,941,636 | 1 | 4,944,187 | null | 2 | 1,178 | when I am using my own background theme for spinner it is stretching icon.

my spinner code is:
```
<Spinner android:id="@+id/spinnerCategory" style="@style/spinner"
android:entries="@array/category_array" android:prompt="@string/category_prompt"
android:background="@drawable/spinner" />
```
my spinner.xml is:
```
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:state_enabled="true"
android:drawable="@drawable/btn_dropdown_normal" />
<item android:state_pressed="true" android:drawable="@drawable/btn_dropdown_pressed" />
<item android:state_focused="true" android:state_enabled="true"
android:drawable="@drawable/btn_dropdown_selected" />
<item android:state_enabled="true" android:drawable="@drawable/btn_dropdown_normal" />
</selector>
```
and images I copied from the sdk 4.
How can I stop spinner icon stretching?
| stretching spinner icon | CC BY-SA 4.0 | null | 2011-02-09T05:28:17.003 | 2023-01-22T13:11:56.920 | 2018-09-17T05:26:03.180 | 1,033,581 | 309,990 | [
"android"
]
|
4,941,753 | 1 | 4,941,932 | null | 292 | 433,391 | I'm looking to see if built in with the math library in python is the nCr (n Choose r) function:

I understand that this can be programmed but I thought that I'd check to see if it's already built in before I do.
| Is there a math nCr function in python? | CC BY-SA 4.0 | 0 | 2011-02-09T05:51:13.150 | 2022-06-25T03:10:57.853 | 2022-06-25T03:10:57.853 | 523,612 | 447,015 | [
"python",
"function",
"math"
]
|
4,941,940 | 1 | 4,942,294 | null | 0 | 282 | I've got an array of buttons in a UITableViewCell.
I populated them all through the cellForRowAtIndexPath method, but my tableview gets sluggish even though I have released everything.
Should I be using a custom UITableViewCell to populate?
Any suggestions on how to make this as smooth as possible for the user would be great.
Screenshot below.

| Best way to avoid memory leaks for Multiple Buttons in UITableViewCell | CC BY-SA 2.5 | null | 2011-02-09T06:27:27.037 | 2011-02-09T07:21:40.360 | null | null | 188,710 | [
"iphone",
"memory",
"uitableview",
"uibutton"
]
|
4,941,953 | 1 | 4,985,209 | null | 18 | 8,598 | I'm working on a small game written in Java (but the question is language-agnostic). Since I wanted to explore various design patterns, I got hung up on the [Composite pattern](http://en.wikipedia.org/wiki/Composite_pattern)/Entity system (which I originally read about [here](http://t-machine.org/index.php/2010/05/09/entity-system-1-javaandroid/) and [here](http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/)) as an alternative to typical deep hierarchical inheritance.
Now, after writing several thousand lines of code, I'm a bit confused. I think understand the pattern and I enjoy using it. I think it's very cool and Starbucks-ish, but it feels that the benefit it provides is somewhat short-lived and (what irks me most) heavily dependent on your granularity.
Here's a picture from the second article above:

I love the way objects (Game entities, or whatever you want to call them) have a minimal set of components and the inferred idea is that you could write code that looks something like:
```
BaseEntity Alien = new BaseEntity();
BaseEntity Player = new BaseEntity();
Alien.addComponent(new Position(), new Movement(), new Render(), new Script(), new Target());
Player.addComponent(new Position(), new Movement(), new Render(), new Script(), new Physics());
```
.. which would be really nice... but in REALITY, the code ends up looking something like
```
BaseEntity Alien = new BaseEntity();
BaseEntity Player = new BaseEntity();
Alien.addComponent(new Position(), new AlienAIMovement(), new RenderAlien(), new ScriptAlien(), new Target());
Player.addComponent(new Position(), new KeyboardInputMovement(), new RenderPlayer(), new ScriptPlayer(), new PhysicsPlayer());
```
It seems that I end up having some very specialized components that are made up of lesser components. Often times, I have to make some components that have dependencies of other components. After all, how can you render if you have no position? Not only that, but the way you end up rendering a player vs. an alien vs. a grenade can be fundamentally different. You can't have ONE component that dictates all three, unless you make a very big component (in which case... why are you using the composite pattern anyway?)
To give another real-life example. I have characters in my game that can equip various gear. When a piece of gear is equipped, some statistics are changed as well as what's displayed visually. Here's what my code looks like right now:
```
billy.addControllers(new Movement(), new Position(), new CharacterAnimationRender(), new KeyboardCharacterInput());
billy.get(CharacterAnimationRender.class).setBody(BODY.NORMAL_BODY);
billy.get(CharacterAnimationRender.class).setFace(FACE.BLUSH_FACE);
billy.get(CharacterAnimationRender.class).setHair(HAIR.RED_HAIR);
billy.get(CharacterAnimationRender.class).setDress(DRESS.DRAGON_PLATE_ARMOR);
```
The above `CharacterAnimationRender.class` only affects what's displayed VISUALLY. So I clearly need to make another Component that handles gear stats. However, why would I do something like:
```
billy.addControllers(new CharacterStatistics());
billy.get(CharacterAnimationRender.class).setBody(BODY.NORMAL_BODY);
billy.get(CharacterStatistics.class).setBodyStats(BODY_STATS.NORMAL_BODY);
```
When I can just make a `CharacterGearStuff` controller/component that handles BOTH the distribution of stats as well as the visual change?
Bottom line, I'm not sure how this is supposed to help productivity since unless you want to handle everything manually, you still have to create "meta-components" that depend on 2+ components (and modify/cross-modify all of their sub-components - bringing us back to OOP). Or maybe I'm thinking about it completely wrong. Am I?
| The composite pattern/entity system and traditional OOP | CC BY-SA 2.5 | 0 | 2011-02-09T06:30:10.127 | 2016-02-12T05:45:59.453 | 2016-02-12T05:45:59.453 | 634,576 | 243,613 | [
"java",
"design-patterns",
"language-agnostic",
"composite"
]
|
4,942,209 | 1 | 4,942,401 | null | 2 | 14,527 | i want to deploy my django site to apache , but i cant find a website to download "mod_wsgi.so" file ,
i download modwsgi in [http://code.google.com/p/modwsgi/](http://code.google.com/p/modwsgi/) , but i cant find "mod_wsgi.so" too,
this is the file :

so what can i do ,
thanks!
| where can i to download the "mod_wsgi.so" | CC BY-SA 2.5 | null | 2011-02-09T07:09:05.390 | 2016-10-12T21:47:15.773 | null | null | 420,840 | [
"django",
"apache",
"wsgi"
]
|
4,942,259 | 1 | 4,942,453 | null | 1 | 507 | Example I have set the master div with `100px` the height. In the div have one logo which I want it to be `vertical-align:middle;`
Here an example [http://jsfiddle.net/c7Me7/](http://jsfiddle.net/c7Me7/)
I want the logo will be auto align to middle without have a `padding` or `margin`.
Output should be like

Let me know
| How do I set correctly vertical align middle on image | CC BY-SA 2.5 | 0 | 2011-02-09T07:16:11.547 | 2011-02-09T10:39:06.423 | 2011-02-09T07:24:09.187 | 520,725 | 520,725 | [
"html",
"css"
]
|
4,942,950 | 1 | null | null | 0 | 42 | i am trying to see the datasource that was added previously. but while trying to see..there is not any configure data source option..how to get it.. my screen shot is below.

| when selecting the datasource it is not showing properly | CC BY-SA 2.5 | null | 2011-02-09T09:09:02.603 | 2011-02-09T09:49:29.117 | null | null | 526,095 | [
"asp.net"
]
|
4,943,124 | 1 | null | null | 1 | 1,009 | I was trying to figure out how I can create simple 3D walls like this in openGL. I dont want to create any fancy stuff just a basic 3D wall where i can move fwd and backwards imagine it as Wolf 3D game with only map no killing etc.

Is there any framework which I can use to do this?? I want to do it in openGL so that I can create/render this thing on my iphone.
Thanks
Pranay
If any body can point me to some sample source code it will be helpful.
| How to create wolf 3D kind of basic 3D walls in openGL | CC BY-SA 2.5 | 0 | 2011-02-09T09:41:44.840 | 2011-02-09T18:03:55.680 | 2011-02-09T17:48:18.483 | 44,729 | 443,694 | [
"iphone",
"opengl-es",
"3d"
]
|
4,943,556 | 1 | null | null | 9 | 1,236 |
We are developing a . The application at a high level looks like below:

Our developene scope involves widget and the ENS.
"" acts as a central point of collection for certain types of events that are of interest to users.
Any user who wants to know when these types of events occur registers with ENS,
which identifies events in order and matches notifications with subscriptions.
The user who wants to subscibe should be a valid user of the intergrated application(db, sap system etc)
The sequence of events:

Now my question is:
What is the best pracitces in storing the Users db, sap etc credentials.
How often should the user be authenticated? Should be everytime the messages are delivered?(As @duffymo mentioned, if I use this strategy, it will affect the source system)
ENS are the web-services.
ENS polls the SAP(and other applications) and this is where the problem is becoming more complex.
In SAP there is data-level authorization. So not all users are allowed to see all the events/data.
If the SAP has PUSHed the data, along with the User info who has authorized to see, then no issues at all.
Case 1: Scheduler is initiated by the ENS
1. User subscribes to a subscription. At the time of subscription, user is checked for his authorization in the SAP system. If OK, then he will be allowed for Subscription.
2. The scheduler runs at the scheduled time.
3. The scheduler identifies the users who are subscribed.
4. The scheduler uses the stored credentials of the users(stroed in ENS) to POLL if the event occured.
5. Notify users if there are changes.
Disadvs here:
- -
Case 2: Scheduler is intitated by the WIDGET. User creds will be stored in the users local machine only.
Diadv:
- -
| where to store the user credentials in an enterprise application(EAI)? | CC BY-SA 2.5 | 0 | 2011-02-09T10:25:20.497 | 2011-02-18T10:42:43.760 | 2011-02-18T10:42:43.760 | 157,705 | 157,705 | [
"java",
"notifications",
"credentials",
"store"
]
|
4,943,938 | 1 | 5,339,759 | null | 2 | 1,775 | Does anybody know how slicing effects work in the Fruit Ninja game?

Or any other way to achieve a similar effect?
How to get that all swipe point at how to draw line on that
please help ....
| How do the slicing effects work in the Fruit Ninja game? | CC BY-SA 2.5 | 0 | 2011-02-09T10:59:35.737 | 2013-02-25T14:27:22.040 | 2011-02-10T08:06:51.480 | 461,346 | 461,346 | [
"iphone",
"slice"
]
|
4,944,033 | 1 | 4,944,717 | null | 1 | 229 | I have the following directory structure in my asp.net webdirectory !

i want when any body access anypage inside my admin folder then it auto redirect to login page of admin folder until they login ... using login page ...
| how to create a authentication rule if i use seperate login for two folders say admin folder and vendor folder | CC BY-SA 2.5 | 0 | 2011-02-09T11:08:37.620 | 2011-07-14T15:10:14.513 | 2011-07-14T15:10:14.513 | 97,010 | 594,849 | [
".net",
"asp.net",
"vb.net",
"visual-studio",
"web-config"
]
|
4,944,067 | 1 | 4,945,225 | null | 1 | 485 | Is there any difference? I do not see. The first doesn't work, the second works.
It is the same file (other files are not touched).

If I comment with `/* */` the first part (the second will be used by web-browser), all works, but if I comment with `/* */` the second part (the first will be used by web-browser), nothing works.
Is it magic?
I've tried it on different web-browsers. I was resetting the browsers cleaning all their caches. But... no result.
May be there are some utilities exist that can do a binary comparison? Could you please give me examples of such programs?
UPDATE: I apologise, the screenshot is little mislead. I use only one of the parts when I do testing (one of the parts is commented with `/* */` when I test).

Now look, I've added `display: none` to the original `#items` block. (do not say me about cache, I've tried on different browsers, different laptops, was reseting and cleaning all the caches of web-browsers). Just notice that `display: none` has been added:

`display: none`
Now let's try the following:

`display: none`
| CSS: Is there any difference between these two parts? | CC BY-SA 2.5 | 0 | 2011-02-09T11:12:49.813 | 2011-02-09T15:01:03.250 | 2011-02-09T15:01:03.250 | 560,215 | 554,823 | [
"css"
]
|
4,944,244 | 1 | 4,944,276 | null | 1 | 356 | I followed [this guide](http://php.about.com/od/finishedphp1/ss/php_login_code.htm) as an attempt to write a login script for my hobby webpage.
Problem is when I want to incorporate it into my page, problems occur.
I'm trying to make an admin panel.
In the top of the frame I want the login form to be

When I log in, I'd like the `Login form area` to change into `Logout fields`.
My problem is that all cookie-related calls has to be done before the HTML code starts...
So:
- - -
How can this be done (give examples like pseudo code)?
PS. Im not a PHP nerd, still learning.
| Function in PHP to set cookie, for my login script | CC BY-SA 2.5 | null | 2011-02-09T11:28:26.027 | 2011-02-09T20:09:26.830 | 2011-02-09T20:09:26.830 | 392,632 | 515,772 | [
"php",
"html",
"session"
]
|
4,944,354 | 1 | 4,944,597 | null | 1 | 8,182 | I have 3 text-boxes, how do I find out which text-box is currently selected (has focus). I am unable to come up with anything.
```
Public Class Form1
Public activeTextBox As TextBox = CType(Me.ActiveControl, TextBox)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
activeTextBox.Text = activeTextBox.Text & "This is text 1"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
activeTextBox.Text = activeTextBox.Text & "This is the text 2"
End Sub
End Class
```

| how to find out which textbox is currenlty selected | CC BY-SA 2.5 | 0 | 2011-02-09T11:40:32.520 | 2011-02-09T15:57:00.327 | 2011-02-09T12:44:39.843 | 590,666 | 590,666 | [
"vb.net"
]
|
4,944,393 | 1 | 4,944,430 | null | -1 | 1,407 | I want to access google maps in iphone to show the multiple locations of the Branch-centers in 1 city/area,
any help?Please have look at the following image.

thanks,
| Show multiple locations on google map | CC BY-SA 3.0 | 0 | 2011-02-09T11:44:10.520 | 2012-04-17T09:42:45.930 | 2012-04-17T09:42:45.930 | 304,839 | 304,839 | [
"iphone",
"objective-c",
"ios"
]
|
4,945,004 | 1 | 4,945,563 | null | 2 | 559 | I have designed an application that will load the information from an XML File to a Pie Chart.
First my XML looked like this
```
<books>
<stock>
<booktype>Novels</booktype>
<amountofbooks>100</amountofbooks>
</stock>
</books>
```
And my AS code looked like
```
[Bindable]
private var bookStock:ArrayCollection = new ArrayCollection();
var myPieSeries:PieSeries = new PieSeries();
myPieSeries.nameField = "booktype";
myPieSeries.field = "amountofbooks";
```
in the `result` event I do this
```
bookStock = evt.result.books.stock;
```
Now this works perfectly and I can see the generated Pie Chart.
But now let's say that I changed the XML in the following manner.
```
<books>
<stock>
<bookinfo>
<booktype>Fiction</booktype>
<amountofbooks>150</amountofbooks>
</bookinfo>
</stock>
<stock>
<bookinfo>
<booktype>Novels</booktype>
<amountofbooks>100</amountofbooks>
</bookinfo>
</stock>
</books>
```
in the results event how do I access it?
`bookStock = evt.result.books.stock.bookinfo;`
doesn't work. I get a "Error: Unknown Property: 'bookinfo'."
When I analysed the bookStock object I get this.

How do I access the XML element now? Does anything needs to be changed here?
```
myPieSeries.nameField = "booktype";
myPieSeries.field = "amountofbooks";
```
Here is the project that I am working with.
[http://min.us/mvkoXsU](http://min.us/mvkoXsU)
| Retrieving Sub-XML Elements to display a Pie Chart | CC BY-SA 2.5 | null | 2011-02-09T12:46:18.113 | 2011-02-10T05:13:19.083 | 2011-02-10T05:13:19.083 | 286,204 | 286,204 | [
"xml",
"apache-flex",
"actionscript-3",
"actionscript",
"pie-chart"
]
|
4,945,148 | 1 | 4,955,771 | null | 3 | 3,411 | I am using tesseract 3.0.0 and I bumped into the following problem:
When there is something too small for tesseract to recognize it seems it's merged with
other fragments. As a result nothing relevant is returned.
The image below shows 3 cases. Only the rectangle with the dashed line is passed to tesseract. Over the rectangle is the result (V over T means new line).
The last case is the problem one. Is there someway to improve tesseract in situations like this?

| How to make tesseract to give relevant results in the presence of noise? | CC BY-SA 2.5 | 0 | 2011-02-09T12:57:46.043 | 2012-03-02T15:36:30.447 | null | null | 593,591 | [
"ocr",
"tesseract"
]
|
4,945,178 | 1 | 4,945,413 | null | 331 | 675,092 | 
I just append
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
in eclipse.ini then I try to start eclipse again and got this error. Give me how to solve or link that actually solve it.
this is my eclipse.ini
```
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize 256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
-vmargs
-Xms40m
-Xmx384m
```
Thank you
| Cannot run Eclipse; JVM terminated. Exit code=13 | CC BY-SA 2.5 | 0 | 2011-02-09T13:00:39.033 | 2021-12-02T18:45:14.410 | 2011-02-09T13:51:12.723 | 480,716 | 480,716 | [
"eclipse",
"startup"
]
|
4,945,308 | 1 | 4,945,440 | null | 3 | 6,565 | I have VBA code to run a query in SQL-Server 2008. It runs fine and displays the table that I need. The code that does this is here:
```
Set db = CurrentDb
Set qdf = db.QueryDefs("MyStoredProcedure")
qdf.SQL = "exec [WCNS_Ops].[dbo].MyStoredProcedure [plus a bunch of parameters]"
DoCmd.OpenQuery "MyStoredProcedure"
```
which displays this table:

My question is this: How do I programmatically return these values to VBA code without displaying the table?
| Return values from a pass-through query via VBA | CC BY-SA 2.5 | null | 2011-02-09T13:12:11.113 | 2011-02-09T13:24:23.133 | null | null | 106,941 | [
"sql-server-2008",
"ms-access",
"stored-procedures",
"vba",
"pass-through"
]
|
4,945,624 | 1 | 4,945,665 | null | 0 | 239 |
I missed this in my original explanation. I set this up yesterday, and it ran over night. No data populated in my profile overnight. So, either my regex is wrong, or Google cannot see internal traffic IPs.
It seems that everyone has their own variation on the syntax for regular expressions.
I'm trying to include only internal traffic on one of my profiles in Google Analytics

Can someone verify for me what they expect that regular expression to match? In CIDER notation?
| Help decoding a regular expression for use with Google Analytics | CC BY-SA 2.5 | null | 2011-02-09T13:41:12.173 | 2011-02-09T13:53:25.670 | 2011-02-09T13:49:11.023 | 564,083 | 564,083 | [
"regex",
"google-analytics"
]
|
4,945,634 | 1 | null | null | 0 | 1,045 | I'd like to have a manual speedometer control where a user can drag the needle to a particular speed setting, like the following:

From the angle of the above needle, how would I read back the speed that corresponds to? For example, the above would read back a speed of 100.
| For a manual speedometer control, how do I convert needle angle to speed? | CC BY-SA 2.5 | 0 | 2011-02-09T13:41:54.000 | 2011-02-09T15:28:40.580 | 2011-02-09T15:01:08.503 | 19,679 | 575,620 | [
"iphone",
"cocoa-touch"
]
|
4,945,652 | 1 | 9,325,771 | null | 0 | 249 | I am storing an image locally but my image is store in small size. i want to store this image in orignal size how can i do this ?
my code for store image is like this ..
```
NSString *myurl = [[NSString alloc]init];
myurl =[data valueForKey:@"large_image"];
NSData *mydata = [[[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:myurl]] retain];
UIImage *myimage = [[[UIImage alloc] initWithData:mydata] retain];
NSData *imageData = UIImagePNGRepresentation(myimage);
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
// NSString *imageName = [NSString stringWithFormat:@"image.png",documentsDirectory];
NSString *fullPathToFile = [documentsDirectory stringByAppendingPathComponent:Imagename];
[imageData writeToFile:fullPathToFile atomically:YES];
```
this is stored image

and this is orignal image

| How to store image in big size in local? | CC BY-SA 2.5 | 0 | 2011-02-09T13:43:23.397 | 2012-02-17T09:29:49.283 | 2011-02-09T13:53:55.917 | null | null | [
"iphone",
"image"
]
|
4,946,421 | 1 | 4,952,200 | null | 17 | 4,472 | 
The highlighted text is the array in which I want to move. I have to press g before pressing j to move a line down. Is there some mapping for my .vimrc that I can just use hjkl to move in screen lines without pressing g every time.
Thanks for your help
Matthias
| vim moving with hjkl in long lines (screen lines) | CC BY-SA 2.5 | 0 | 2011-02-09T14:47:46.757 | 2012-04-25T04:03:28.143 | null | null | 317,487 | [
"vim"
]
|
4,946,964 | 1 | 4,947,033 | null | 44 | 32,505 | I can't find a description of what the end points of the lines of a boxplot represent.
For example, here are point values above and below where the lines end.

(I realize that the top and bottom of the box are 25th and 75th percentile, and the centerline is the 50th). I assume, as there are points above and below the lines that they do not represent the max/min values.
| In ggplot2, what do the end of the boxplot lines represent? | CC BY-SA 2.5 | 0 | 2011-02-09T15:32:52.087 | 2021-08-17T21:06:39.203 | 2012-03-20T21:30:13.723 | 203,420 | 258,755 | [
"r",
"ggplot2",
"boxplot"
]
|
4,946,988 | 1 | 4,948,544 | null | 11 | 12,710 | We have an XCode project that was first build as an universal app, and then on the road we changed our mind on having the two app in the same binary, so we created two targets.
1. The first one is called: AppName and is for iPhone: the base SDK is 4.2 and deployment target is 3.1.3. Targeted Device is iPhone.
2. The second is called: AppNameHD and is for iPad: the base SDK is 3.2 and targeted device is iPad.
It's been a few weeks now we are easily building for each of those platform and able to deploy on the both iPad and iPhone.
Now we are ready to submit to the app store and i'm worried about potential rejection of the code. We want to submit the iPad only app for now, but i've looked around there is nowhere in the itunesconnect site i can specify the targeted device, and as the project was structured first to be an universal app. I'm wondering how they determine on which device to test the binary.
More informations about the architecture:
We are using the default generated info.plist file for both targets. Should we have a separate info.plist for each of the target? what differences should be present between the two .plist files.
Here is attached the actual info.plist file we are using.
Thanks for your help in advance.
| One XCode project, two target, two apps (iPhone/iPad) not universal app | CC BY-SA 2.5 | 0 | 2011-02-09T15:34:50.813 | 2014-03-27T09:38:06.590 | 2011-02-09T15:49:13.557 | 267,980 | 267,980 | [
"iphone",
"xcode",
"ipad",
"universal-binary"
]
|
4,947,054 | 1 | 5,060,715 | null | 1 | 2,235 | 
I install the tomcat server on my openSuse port 8080, but I can connect to [http://127.0.0.1:8080](http://127.0.0.1:8080) only in my local machine.
| Cannot connect to tomcat externally | CC BY-SA 2.5 | 0 | 2011-02-09T15:41:57.660 | 2013-11-20T10:51:14.060 | null | null | 484,523 | [
"linux",
"tomcat",
"opensuse"
]
|
4,947,148 | 1 | 5,228,373 | null | 40 | 24,340 | I successfully implemented a pinch a zoom of a view. However, the view doesn't position itself where I wished it to be. For the stackoverflowers with an iPad, I would like my view to be centered like on the iPad Photos.app : when you pinch&zoom on an album, the photos present themselves in a view that is expanding. This view is approximately centered with the top right hand corner on the first finger and the bottom left hand finger on the other finger. I mixed it with a pan recognizer, but this way the user always has to pinch, and then pan to adjust.
Here are so graphic explanation, I could post a video of my app if that's unclear (no secret, i'm trying to reproduce the Photos.app of the iPad...)
So for an initial position of the fingers, begining zooming :

This is the actual "zoomed" frame for now. The square is bigger, but the position is below the fingers

Here is what I would like to have : same size, but different origin.x and y :

(sorry about my poor photoshop skills ^^)
| UIPinchGestureRecognizer position the pinched view between the two fingers | CC BY-SA 2.5 | 0 | 2011-02-09T15:49:21.893 | 2014-03-11T12:05:08.823 | 2011-02-10T08:52:30.677 | 123,011 | 123,011 | [
"ipad",
"ios",
"multi-touch"
]
|
4,947,492 | 1 | 7,960,565 | null | 0 | 2,287 | I have an image and two points,
and I want to read the pixels between these two points,
and resample them into a small 1x40 array.
I'm using EMGU which is a C# wrapper for OpenCV.
thanks,
SW

| How to extract a linear slice from an image in OpenCV / EMGU | CC BY-SA 2.5 | null | 2011-02-09T16:15:48.117 | 2011-10-31T22:32:05.323 | null | null | 233,001 | [
"image",
"image-processing",
"opencv",
"computer-vision",
"emgucv"
]
|
4,947,513 | 1 | null | null | 0 | 642 | I have the following class
```
public class NavigationIEntity
{
public int CurrentId { get; set; }
public string View { get; set; }
public string Controller { get; set; }
public IPagination<IEntity> Entities { get; set; }
}
```
I have the following helper to instantiate
```
public static NavigationIEntity Create<T>(int currentId, string view, string controller, IPagination<T> entities) where T : IEntity
{
return new NavigationIEntity {
Entities = entities, View = view, Controller = controller, CurrentId = currentId
};
}
```
However i get the following error.

EDIT: I've tried the following, "IPagination entities" ie not T
```
public static NavigationIEntity Create(int currentId, string view, string controller, IPagination<IEntity> entities)
{
return new NavigationIEntity { Entities = entities, View = view, Controller = controller, CurrentId = currentId };
}
```
but don't know how best resolve

DistributionUnit implements IEntity
| Using <T> on IPagination | CC BY-SA 2.5 | null | 2011-02-09T16:18:35.630 | 2011-05-06T16:19:10.397 | 2011-02-09T16:53:30.063 | 461,880 | 461,880 | [
"asp.net",
".net-4.0",
"asp.net-mvc-3",
"mvccontrib"
]
|
4,947,824 | 1 | 4,947,856 | null | 1 | 283 | Is the calendar used in the Win7 clock display available as a reusable control to other applications? If so, do you know of a .NET wrapper for it?

| Is the win7 clock calendar available as a control for applications? | CC BY-SA 2.5 | null | 2011-02-09T16:41:39.970 | 2011-02-09T16:44:17.303 | null | null | 33,080 | [
".net",
"calendar",
"controls"
]
|
4,948,062 | 1 | 4,948,307 | null | 2 | 3,119 | ```
SELECT
0x0000987C As col1,
substr(BinaryData,1,4) As col2,
CAST(0x0000987C AS SIGNED) As col3,
CAST(substr(BinaryData,1,4) AS SIGNED) As col4
FROM
(
SELECT 0x0000987C00000000 AS BinaryData
) d
```
Returns
```
col1 col2 col3 col4
---- ---- ----- ----
BLOB BLOB 39036 0
```
When I look at the BLOB viewer for `col1` and `col2` they both appear identical (screenshot below).
So why the different results for col3 and col4?

| Working with Binary Data in MySQL | CC BY-SA 2.5 | null | 2011-02-09T17:03:43.543 | 2011-02-09T18:54:21.217 | null | null | 73,226 | [
"mysql",
"varbinary"
]
|
4,948,761 | 1 | 4,950,257 | null | 2 | 2,637 | I have a database table called `tbl_event` with the non-clustered indexes `IDX_Event_Folder` and `IDX_Event_Time` defined as:
```
CREATE NONCLUSTERED INDEX [IDX_Event_Folder]
ON [dbo].[tbl_event]([nobjectid] ASC)
CREATE NONCLUSTERED INDEX [IDX_Event_Time]
ON [dbo].[tbl_event]([tetime] ASC)
```
I ran the following simple queries and got the execution plans displayed directly underneath:
```
SELECT *
FROM tbl_event
WHERE tbl_event.nobjectid = 1410000
ORDER BY tetime
```

```
SELECT *
FROM tbl_event
WHERE tbl_event.nobjectid = 1410000
```

My question is, why is the index on never utilized? I would expect there to be an index seek or scan when nobjectid is specified in the where clause of these select statements. Is my understanding of this analysis incorrect?
| SQL Server non-clustered Index never shows up in execution plan | CC BY-SA 2.5 | null | 2011-02-09T18:12:06.343 | 2011-02-09T20:46:18.437 | 2011-02-09T18:15:02.270 | 13,302 | 213,159 | [
"sql-server",
"indexing",
"sql-execution-plan",
"query-performance"
]
|
4,949,160 | 1 | 4,949,456 | null | 2 | 2,074 | I have [a PHP-script](http://preferans.de/top20.php) listing up to 20 card game players per page:

I also have photo/avatar-URLs for the most of players and I'd like to display them - as a floating image when the mouse hovers over corresponding link/name. I do not have the dimensions of the photos though.
How could I do it with the means of jQuery core (without plugins) please?
I probably need to create an image holder and hide it first?
```
$('body').append('<div id="avatar"><img src="no_avatar.gif"</div>').hide();
```
And then on mouse hover event replace the img's src attribute and make the #avatar visible? Please help me with the code
Should I store the URL of each photo as an attribute of the corresponding
`<a href="player_profile.php">player name</a>` while generating them by my PHP-script?
And how to deal with situations when the mouse is hovering near the bottom of the web page (i.e. how do place the image best, so that it is visible)
Thank you!
Alex
| jQuery core: display a floating image | CC BY-SA 2.5 | null | 2011-02-09T18:53:23.130 | 2011-02-09T19:22:41.193 | 2011-02-09T19:00:00.107 | 165,071 | 165,071 | [
"jquery",
"image"
]
|
4,949,308 | 1 | 4,950,269 | null | 0 | 1,214 | I’im programing in Java with Netbeans.
I have a table who list patients. I read the information in XML file.
Here you have the code:
```
package digiscope;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
/**
*
* @author Daniel
*/
public class TabelaPaciente extends javax.swing.JPanel {
String numero_processo;
int localizador = 0;
/** Creates new form TabelaPaciente */
public TabelaPaciente() {
initComponents();
load_table();
}
public void setNumeroProc(String numero) {
numero_processo = numero;
}
public String getNumeroProc() {
return numero_processo;
}
public int getLocalizador() {
return localizador;
}
String[][] concat(String[][] A, String[][] B) {
String[][] C = new String[A.length + B.length][A.length + B.length];
System.arraycopy(A, 0, C, 0, A.length);
System.arraycopy(B, 0, C, A.length, B.length);
return C;
}
private void load_table() {
File dir;
String[] filenames;
//dir = new File(System.getProperty("user.dir")+ "/XML");
dir = new File(System.getProperty("user.dir") + "/Processos");
filenames = dir.list();
String[][] table_final = new String[][]{};
for (int i = 0; i < filenames.length; i++) {
String n_proc = filenames[i];//filenames[i].substring(0,filenames[i].length()-4);
//System.out.println(filenames[i]);
Ler_XML xml = new Ler_XML(n_proc);
String nome_utente = xml.getNome();
String[][] line = new String[][]{
{n_proc, nome_utente, null, "ir para formulario"}
};
table_final = concat(table_final, line);
}
tabela_pacientes.setModel(new javax.swing.table.DefaultTableModel(
table_final,
new String[]{
"Process Nº", "Name", "Date", "Form state"
}));
}
void executa_accao(int column, int row) {
if (column == 3) {
Object numero_proc = tabela_pacientes.getValueAt(row, 0);
localizador = 1;
numero_processo = numero_proc.toString();
JanelaPrincipal cont = (JanelaPrincipal) this.getParent() // Internal Pane
.getParent() // ???
.getParent() // ???
.getParent() // ???
.getParent(); // Frame
cont.loadPanel(new Formulario(1));
Preencher_FormPaciente new_xml = new Preencher_FormPaciente(numero_processo, 1);
}
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
tabela_pacientes = new javax.swing.JTable();
btnMenu1 = new javax.swing.JButton();
setPreferredSize(new java.awt.Dimension(1000, 550));
tabela_pacientes.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent event) {
int row = tabela_pacientes.rowAtPoint(event.getPoint());
int column = tabela_pacientes.columnAtPoint(event.getPoint());
if (row >= 0 && column >= 0) {
executa_accao(column, row);
}
}
});
jScrollPane1.setViewportView(tabela_pacientes);
btnMenu1.setBackground(new java.awt.Color(255, 153, 0));
btnMenu1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
btnMenu1.setText("MENU");
btnMenu1.setPreferredSize(new java.awt.Dimension(105, 75));
btnMenu1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnMenu1ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnMenu1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(885, Short.MAX_VALUE))
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1000, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnMenu1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 446, Short.MAX_VALUE))
);
}// </editor-fold>
private void btnMenu1ActionPerformed(java.awt.event.ActionEvent evt) {
JanelaPrincipal cont = (JanelaPrincipal) this.getParent() // Internal Pane
.getParent() // ???
.getParent() // ???
.getParent() // ???
.getParent(); // Frame
cont.loadPanel(new Menu());
}
// Variables declaration - do not modify
private javax.swing.JButton btnMenu1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable tabela_pacientes;
// End of variables declaration
}
```
I would like to know if it’s possible to increase the letter size?
You can see here a preview of the table.

Thank you for your collaboration.
Best regards.
| Java table formatting | CC BY-SA 3.0 | null | 2011-02-09T19:07:10.380 | 2011-09-11T11:22:39.340 | 2011-09-11T11:22:39.340 | 203,657 | 452,011 | [
"java",
"swing",
"formatting",
"jtable"
]
|
4,949,714 | 1 | 4,949,857 | null | 1 | 4,623 | I have two div classes, say A and B. When the mouse is over div A, div B should appear, then if the mouse is over A or B, div B should stay opened. If the mouse is out of both, A and B divs, B should disappear. (As you probably guess this is a simple tooltip script)

This is the jquery code I wrote:
```
$(document).ready(function() {
function show() {
$("BBB").css({'display':'block'});
}
$("AAA").each(function() {
$(this).mouseover(function() {
show();
});
$(this).mouseleave(function() {
time = setTimeout("hide()", 200);
});
$("BBB").mouseleave(function() {
setTimeout("hide()", 200);
});
$("BBB").mouseenter(function() {
clearTimeout(time);
});
});
});
function hide() {
$("BBB").css({'display':'none'});
}
```
The problem is that when I move from B to A, B disappears! I want to it to disappear only if the mouse is neither over A, nor B. How can I fix this problem?
| Cancel setTimeout if mouse is over div | CC BY-SA 2.5 | null | 2011-02-09T19:49:38.190 | 2018-05-14T12:27:27.307 | null | null | 352,959 | [
"javascript",
"jquery"
]
|
4,949,843 | 1 | 5,175,196 | null | 0 | 455 | Has anybody else had an issue with the new Intellij HG4IDEA not working in Windows? Whenever I try to pull from a remote repository it just hangs, never asking for my ssh username/password.
My initial thought was that I should set my username/password in mercurial.ini somehow.
It just sits like this indefinably, if I try to cancel it it will not stop.
| HG4Idea hangs on windows | CC BY-SA 2.5 | null | 2011-02-09T20:03:42.890 | 2011-03-03T00:24:35.703 | 2011-02-09T20:12:08.710 | 97,901 | 97,901 | [
"mercurial",
"intellij-idea"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.