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,843,239 | 1 | 4,846,446 | null | 1 | 114 | I've tried almost all the possible permutations... I'm trying to make something like this:
[http://www.amateurinmotion.com/articles/2009/01/24/creating-uitabbarcontroller-based-app-using-interfacebuilder.html](http://www.amateurinmotion.com/articles/2009/01/24/creating-uitabbarcontroller-based-app-using-interfacebuilder.html)
It's fairly simple and I tried running the program and it works. Now I'm trying to customise my current app so that it uses IB to load the xib file. My view hierarchy is like this:

So what I did is I selected the view controller and then I go to the view controller attributes and set the nib name to be a nib file name. I also changed the view controller identity to load my custom class.
| Nib file does not load from UITabBarViewController | CC BY-SA 3.0 | null | 2011-01-30T13:45:53.840 | 2018-02-08T14:50:41.200 | 2018-02-08T14:50:41.200 | 1,033,581 | 361,247 | [
"iphone",
"uiviewcontroller",
"interface-builder",
"uitabbarcontroller"
]
|
4,843,516 | 1 | 4,843,960 | null | 10 | 267 | I've recently been developing an app that processes a large amount of data very frequently (~15 times a minute). To do so, I allocated a large chunk of memory, then freed it for each batch of data.
Here's a screen of my Memory Allocations from Instruments:

The Memory usage oscillates from about 3MB to about 30MB pretty quickly. I was just wondering, is this "healthy," per se for the iPhone.
Is it risky to allocate and free so much memory so quickly? Is it unsustainable, or just bad practice?
Thanks!
| Is Spiky Memory "Healthy" for App? | CC BY-SA 2.5 | 0 | 2011-01-30T14:51:50.047 | 2020-12-14T18:41:55.317 | null | null | 218,263 | [
"iphone",
"objective-c",
"cocoa-touch",
"memory-management",
"iphone-sdk-4.0.1"
]
|
4,843,531 | 1 | 8,611,698 | null | 1 | 648 | How to solve this problem?
Netbeans top menu fonts has been changed.
Default language is still en_US.
My netbeans version is 6.9.1.
I have added an screenshot.

Any help would be appreciated.
| Problems with netbeans top menu font | CC BY-SA 2.5 | 0 | 2011-01-30T14:55:36.523 | 2011-12-23T02:36:01.067 | 2011-01-30T14:58:40.433 | 142,162 | 303,182 | [
"netbeans",
"netbeans-6.9"
]
|
4,843,768 | 1 | 4,843,826 | null | -2 | 2,105 | ```
int a=0;
while (a<2)
{
//infos.stops is point to one array, called abc[10]
output = output + QString::fromStdString(*infos.stops)+ "." ;
infos.stops++;
a++;
}
ui->showMsg->setText(output);
```
The problem is infos.stops did show, but some funny characters appear like:

I have uploaded all my source code which is designed in QT Designer
[http://uploading.com/files/eaddfaf8/bus.zip/](http://uploading.com/files/eaddfaf8/bus.zip/)
The problem line is at manager.cpp line 133.
| Using QString get strange characters in the output | CC BY-SA 3.0 | 0 | 2011-01-30T15:46:30.287 | 2017-05-22T23:56:05.167 | 2017-05-22T23:56:05.167 | null | 594,649 | [
"c++",
"qt",
"qstring"
]
|
4,843,775 | 1 | 4,845,609 | null | 1 | 2,163 | I have an image example here of this feature that is now available in Excel 2010's spark lines:

Ideally I'd like to have a vertical line as well indicating a max/min for each row.
Any resources to this effect (I'm here to learn) would be great.
| How can I create this inline bar chart like excel spark lines in Javascript? | CC BY-SA 2.5 | null | 2011-01-30T15:47:43.467 | 2011-01-30T21:20:01.590 | null | null | 328,397 | [
"javascript",
"html",
"graph",
"spreadsheet",
"bar-chart"
]
|
4,843,830 | 1 | 4,843,889 | null | 0 | 733 | I am using Watin to copy a image to the clipboard, I am getting this error when I do so,
is there a work around to this using AlertDialogHandler?
```
public System.Drawing.Image GetPicture(WatiN.Core.Image image, ref IE browser)
{
if (image == null || !image.Exists || string.IsNullOrEmpty(image.Src))
return null;
const string t_js =
@"var div = document.images[{0}];
div.contentEditable ='true';
var controlRange;
if(document.body.createControlRange)
{{
controlRange = document.body.createControlRange();
controlRange.addElement(div);
controlRange.execCommand('Copy');
}}
div.contentEditable = 'false';";
var cnt = -1;
foreach (var image1 in browser.Images)
{
cnt++;
if (image1 != null && image1.Exists && !string.IsNullOrEmpty(image1.Src) && image1.Src.ToLower() == image.Src.ToLower())
break;
}
var script = string.Format(t_js, cnt);
WatiN.Core.DialogHandlers.AlertDialogHandler alertDialogHandler = new WatiN.Core.DialogHandlers.AlertDialogHandler ();
using (new WatiN.Core.DialogHandlers.UseDialogOnce(browser.DialogWatcher, alertDialogHandler ))
{
browser.RunScript(script); // Exception comes here !!
alertDialogHandler.WaitUntilExists();
alertDialogHandler.OKButton.Click();
browser.WaitForComplete();
}
var data = Clipboard.GetDataObject();
if (data == null)
return null;
var q = data.GetFormats();
q.ToString();
var q2 = data.GetFormats(true);
q2.ToString();
if (data.GetDataPresent(DataFormats.Bitmap))
{
var img = data.GetData(DataFormats.Bitmap, true);
return img as System.Drawing.Image;
}
if (data.GetDataPresent(DataFormats.Dib))
{
var img = data.GetData(DataFormats.Dib, true);
return img as System.Drawing.Image;
}
if (data.GetDataPresent(DataFormats.EnhancedMetafile))
{
var img = data.GetData(DataFormats.EnhancedMetafile, true);
return img as System.Drawing.Image;
}
if (data.GetDataPresent(DataFormats.MetafilePict))
{
var img = data.GetData(DataFormats.MetafilePict, true);
return img as System.Drawing.Image;
}
if (data.GetDataPresent(DataFormats.Tiff))
{
var img = data.GetData(DataFormats.Tiff, true);
return img as System.Drawing.Image;
}
if (data.GetDataPresent(DataFormats.Serializable))
{
var img = data.GetData(DataFormats.Serializable, true);
return img as System.Drawing.Image;
}
return null;
}
```
Thanks!
image of the security exception:

| WatiN security exception solution? | CC BY-SA 2.5 | null | 2011-01-30T15:57:45.593 | 2011-01-30T16:10:42.877 | 2011-01-30T16:00:14.630 | 142,162 | 192,901 | [
"c#",
"watin"
]
|
4,843,865 | 1 | null | null | 4 | 3,186 | I have a spinner in my Android app, that allows users to select countries. The spinner shows the ISO2 code of the selected country when folded. Here an example:

Once the user opens the selection pop-up list, I want to display a more extensive text for each item. So instead of displaying just "AT", the item should read "AT - Austria" as shown in the following screen-shot.

Any ideas how I could achieve this?
| Spinner - different item text in pop-up/list view | CC BY-SA 2.5 | null | 2011-01-30T16:05:32.960 | 2011-01-30T16:19:23.893 | 2011-01-30T16:08:58.573 | 244,296 | 400,334 | [
"android",
"spinner"
]
|
4,844,000 | 1 | 4,844,041 | null | 0 | 254 | I'm using PHP to access the Wikipedia API. This is the URL I'm getting:
`http://en.wikipedia.org/w/api.php?action=query&prop=revisions|links&titles=google&rvprop=ids|timestamp|user|comment|content&rvlimit=1&format=xml`
The results are very strange:

I added `header('Content-type:text/html; charset=utf-8');` at the top of the page, but that didn't seem to help. Is this a character encoding issue?
| Why do I get strange results when I get the Wikipedia API via PHP? | CC BY-SA 3.0 | null | 2011-01-30T16:32:03.183 | 2015-02-12T04:59:58.700 | 2015-02-12T04:59:58.700 | 3,191,599 | 499,587 | [
"php",
"wikipedia"
]
|
4,844,296 | 1 | 4,846,989 | null | 3 | 8,307 | How could I work with hierarchical Grid in WPF like below one 
Is there any way to work with this type of grid through which we can show hierarchical data.
please discuss or give me any url from where I can download the source of sample code which help me to work with hierarchical grid.
| Tree-ish Grid/hierarchical Grid in WPF | CC BY-SA 3.0 | 0 | 2011-01-30T17:21:27.243 | 2019-05-11T02:39:04.963 | 2013-12-20T06:52:34.847 | 3,041,194 | 508,127 | [
".net",
"wpf",
"gridview",
"hierarchy"
]
|
4,844,558 | 1 | 4,844,595 | null | 8 | 14,585 | I am trying to use a custom item for the back button in my navigation bar.
```
UIImage *backButtonImage = [UIImage imageNamed:@"backbutton.png"];
UIBarButtonItem *customItem = [[UIBarButtonItem alloc] initWithImage:backButtonImage style:UIBarButtonItemStylePlain target:nil action:nil];
[self.navigationItem setBackBarButtonItem: customItem];
[customItem release];
```
What I end up getting is my image with a border around it. It looks like this (My image is the back button):

How can I get rid of the border? What am I doing wrong?
| iphone - Custom UIBarButtonItem for back button | CC BY-SA 3.0 | 0 | 2011-01-30T18:09:29.393 | 2013-05-30T11:20:11.367 | 2013-03-28T22:58:04.533 | 224,988 | 579,326 | [
"iphone",
"uibarbuttonitem",
"uinavigationitem"
]
|
4,844,569 | 1 | 4,844,678 | null | 2 | 5,664 | Hi i have an android spinner populated from and array that i want to increase the text size of when it actually pops up. See at the moment it looks like this when it expands:

Which on an actual device is impractically small and doesn't look very good. I've tried changing the spinner xml properties But it doesn't seem to make a difference at all.
```
<Spinner
android:id="@+id/frequencyspinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
>
```
| How can i change text size in an android spinner? | CC BY-SA 2.5 | null | 2011-01-30T18:11:01.290 | 2011-01-30T18:30:22.860 | null | null | 523,874 | [
"android",
"text",
"view",
"size",
"spinner"
]
|
4,844,734 | 1 | 4,844,999 | null | 0 | 306 | Good Day!
i want to ask that if i want to bring a uiview in front on another view, but i want to bring it by keeping its 1 points constant so that it looks like that only 1 (top) portion moved down. i put my uiview on 90 degrees but i could not figure out the way to bring it horizontal. here is code for uiview
```
clView.frame = CGRectMake(0,100,258,171);
clView.transform = CGAffineTransformIdentity;
clView.transform = CGAffineTransformMakeRotation(degreesToRadians(90));
[self.view addSubview:clView];
```
Now it puts my view to 90 degrees but i could not bring it down with animation keeping one point constant. like projectile motion. Can somebody help me out ?
Yellow circle part i want to be still and other moving, 90 degress and back to normal

| uiview rotation keeping 1 coordinate constant | CC BY-SA 2.5 | null | 2011-01-30T18:40:08.013 | 2011-01-30T19:35:33.577 | null | null | 297,143 | [
"objective-c",
"core-animation",
"uiviewanimation",
"image-rotation"
]
|
4,844,800 | 1 | null | null | 3 | 1,405 | I’m after some advice on database/entity design (I’m using the model designer for Entity Framework 4).
I have a number of entities (`Entity_1`, `Entity_2`, `Entity_3` … `Entity_n`) I’d like to be able to attach notes to each entity where each record in `Entity_1` can have 0 or multiple notes, like wise for `Entity_2` etc.
After some Googling and messing around I’ve come up with the following, but I’m getting my `0—1’s`,`1-1’s` and `*-*’s` all confused now and could do with a reality check :) so I’d like to know Stack Overflows suggestions on the best way to architect this scenario for maintainability and ease of programing against.
I found two SO questions that are related, but opinions seem divided. I’d also like to get opinions in the context of using EF4 once the database is created.
- [Associating notes with different entities in a database](https://stackoverflow.com/questions/3738344/associating-notes-with-different-entities-in-a-database)- [Best way to implement a Notes Table for many entities Tables in SQL](https://stackoverflow.com/questions/3584517/best-way-to-implement-a-notes-table-for-many-entities-tables-in-sql)
## Option 1

## Option 2

## Option 3
Every record has a globally unique Id and that Id links to a Note.
What are your thoughts?
| Relate a Notes table to multiple Entity tables using Entity Framework 4 | CC BY-SA 3.0 | 0 | 2011-01-30T18:55:22.910 | 2013-06-06T15:26:00.363 | 2017-05-23T10:32:35.693 | -1 | 1,181,642 | [
"entity-framework",
"database-design",
"entity-framework-4",
"database-schema"
]
|
4,844,952 | 1 | 4,845,655 | null | 0 | 1,345 | I have two classes. One was basically created using the same files as the second, with some other modifications, but they are essentially the same, specially regarding to their declaration files (that have something like this)...
```
@protocol myClassDelegate <NSObject>
// delegate protocol definition
@end
@interface myClass : UIView {
id myObject;
UIView *oneView;
}
@property(nonatomic,assign) id<myClassDelegate> delegate;
@property(nonatomic,retain) UIView *oneView;
```
and then I have @synthesize oneView, delegate; on .m
The code you see is common to both classes.
Inside the implementation of both classes, I use several times both objects, for example:
```
[delegate doStuff]; // <-- do you see this blue delegate here? Xcode put it green when it is declared on .h first.
```
on my first class, every occurrence of oneView or delegate are shown in green by Xcode (see image below). On the second class, they are shown in black. I generally consider this green word to be some kind of acknowledge that the variable has been identified on the declaration and is "global" for that class. Generally black variables mean local instances.
The question is that I am having problems of one of these variables being deallocated, without my intention, exactly on the class where it is shown in black.
There's no release of that variable in the class (except on the dealloc), but objects created using both classes live all the time while the app is running.
What may be wrong?

thanks in advance.
| Xcode - green variables x black variables | CC BY-SA 2.5 | 0 | 2011-01-30T19:24:52.043 | 2011-01-30T22:27:33.823 | 2011-01-30T20:59:48.300 | 538,964 | 538,964 | [
"iphone",
"xcode",
"syntax-highlighting"
]
|
4,844,979 | 1 | null | null | 4 | 1,665 | I setup the cookie store to domain => :all, like I could find in documentation and it seems to work, because devise's authentication works across the multiple domain.
```
MyApp::Application.config.session_store :cookie_store, :key => '_MyApp.com_session', :domain => :all
```
However when I am trying myself to write to a cookie, it always write down the sub domain... I don't get it:

I write the cookie in the simplest manner possible:
```
cookies.permanent[:remember_locale] = locale
```
But no matter what it won't set it for the top level domain whereas the one dropped by devise seems to manage it without a problem :(
Alex
ps: I am using rails 3.0.3
| Rails 3: Can't seem to write cookies for top level domain :( | CC BY-SA 2.5 | null | 2011-01-30T19:30:29.733 | 2011-06-01T03:45:39.850 | null | null | 523,811 | [
"ruby-on-rails",
"cookies",
"dns",
"subdomain"
]
|
4,845,092 | 1 | 4,845,126 | null | 1 | 485 | How can i write a regular expression to describe this language :

| describing a language with a regular expression | CC BY-SA 2.5 | 0 | 2011-01-30T19:51:43.303 | 2011-01-30T19:56:46.187 | 2011-01-30T19:55:56.017 | 34,397 | 476,101 | [
"regex",
"math"
]
|
4,845,226 | 1 | 4,882,194 | null | 2 | 3,955 | I have 2 levels of `UITableViews` in a Navigation Hierarchy. On the first page is a `UITableView` that displays all the instances of `Equipment` using a `NSFetchedResultsController` which works great. On the second page I want to get back all the `Note` entities for a specific piece of `Equipment` so I can show them in a `tableView`.
How do I write a `NSPredicate` to only return the relevant notes?

```
- (NSFetchedResultsController *)fetchedResultsController {
if (_fetchedResultsController != nil) {
return _fetchedResultsController;
}
//Init Fetch Request
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
//Entity the NSFetchedResultsController will be managing
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Note"
inManagedObjectContext:self.myContext];
[fetchRequest setEntity:entity];
//Sort Descriptors
NSSortDescriptor *sortDescriptor1 = [[NSSortDescriptor alloc] initWithKey:@"noteTime"
ascending:YES];//Primary Sort
NSSortDescriptor *sortDescriptor2 = [[NSSortDescriptor alloc] initWithKey:@"noteText"
ascending:YES];//Secondary Sort
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor1,
sortDescriptor2,
nil];
//Set Sort Descriptors
[fetchRequest setSortDescriptors:sortDescriptors];
// limit Fetch to notes that belong to myEquipment
//self
// NSPredicate *predicate = [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"item.name like '%@'", self.item.name]];
NSPredicate *predicate = [NSPredicate predicateWithFormat:PREDICATE GOES HERE];
[fetchRequest setPredicate:predicate];
[fetchRequest setFetchBatchSize:10];
NSFetchedResultsController *frc = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest
managedObjectContext:self.myContext
sectionNameKeyPath:nil
cacheName:@"Equipment"];
//Set the Delegate Property
frc.delegate = self;
_fetchedResultsController = frc;
//Release Local Memory
[sortDescriptor1 release];
[sortDescriptor2 release];
[sortDescriptors release];
[fetchRequest release];
return _fetchedResultsController;
}
```
| How to write an NSPredicate For CoreData to-many relationship | CC BY-SA 3.0 | null | 2011-01-30T20:15:03.377 | 2013-09-09T00:38:57.277 | 2011-10-09T08:21:22.177 | 836,407 | 519,493 | [
"core-data",
"nsfetchedresultscontroller",
"nspredicate"
]
|
4,845,274 | 1 | 5,193,176 | null | 0 | 519 | 
So I'm using RMI in an Eclipse RCP application. The classloader of RMI and OSGI hate each other so much, but I could solve my first problem [here](https://stackoverflow.com/questions/4650619/eclipse-rcp-rmi-and-bundles).
My server application consists of the bundle, which depends on . Additionally the bundle is loaded, using an extension point of core ().
Similarly the is started depending on and loading as a plugin.
Now sending a from the client to the poses no problem anymore (solved issue above). Sadly the reverse doesn't work. The is stored as Callback on the and should receive objects. Those are created in the bundle on the server and sent via RMI. When I receive them on the client side I get the ominous ClassNotFound exception. I do the same as on the server:
```
Thread.currentThread().setContextClassLoader(
this.getClass().getClassLoader());
```
But this doesn't help. Also to start both server and client my start parameters are:
```
-consoleLog -Djava.security.policy=java.policy -Djava.rmi.server.codebase=file:${workspace_loc}
```
And in the client I set the security manager to a personal implementation which allows everything.
So does anyone have an idea, why the class is not found?
| RMI callbacks in Eclipse RCP | CC BY-SA 2.5 | null | 2011-01-30T20:23:07.630 | 2011-03-04T11:35:15.940 | 2017-05-23T12:30:39.393 | -1 | 414,883 | [
"callback",
"eclipse-rcp",
"classloader",
"rmi"
]
|
4,845,380 | 1 | 4,845,416 | null | 7 | 4,732 | I have a "Find Files" function in my program that will find text files with the .ged suffix that my program reads. I display the found results in an explorer-like window that looks like this:

I use the standard FindFirst / FindNext methods, and this works very quickly. The 584 files shown above are found and displayed within a couple of seconds.
What I'd now like to do is add two columns to the display that shows the "Source" and "Version" that are contained in each of these files. This information is found usually within the first 10 lines of each file, on lines that look like:
```
1 SOUR FTM
2 VERS Family Tree Maker (20.0.0.368)
```
Now I have no problem parsing this very quickly myself, and that is not what I'm asking.
What I need help with is simply how to most quickly load the first 10 or so lines from these files so that I can parse them.
I have tried to do a StringList.LoadFromFile, but it takes too much time loading the large files, such at those above 1 MB.
Since I only need the first 10 lines or so, how would I best get them?
I'm using Delphi 2009, and my input files might or might not be Unicode, so this needs to work for any encoding.
---
Followup: Thanks Antonio,
I ended up doing this which works fine:
```
var
CurFileStream: TStream;
Buffer: TBytes;
Value: string;
Encoding: TEncoding;
try
CurFileStream := TFileStream.Create(folder + FileName, fmOpenRead);
SetLength(Buffer, 256);
CurFileStream.Read(Buffer[0], 256);
TEncoding.GetBufferEncoding(Buffer, Encoding);
Value := Encoding.GetString(Buffer);
...
(parse through Value to get what I want)
...
finally
CurFileStream.Free;
end;
```
| How Can I Efficiently Read The FIrst Few Lines of Many Files in Delphi | CC BY-SA 2.5 | 0 | 2011-01-30T20:39:08.420 | 2011-02-01T13:25:42.800 | 2011-02-01T03:44:02.680 | 30,176 | 30,176 | [
"delphi",
"file-io",
"large-files"
]
|
4,845,508 | 1 | 5,381,131 | null | 0 | 508 | I'm running a Silverlight 4 application that has a WCF service reference to a service that has a lot of contracts involved.
I noticed that my startup performance was horrible so I profiled it and found that 7 seconds of time was spent generating serialization code on the first WCF call.

I know there is a way to improve startup time by using the XmlSerializer ([explained here](http://dotnetframework3.blogspot.com/2008/06/how-to-improve-startup-time-of-wcf.html)). This is done by generating the serialization code into a separate assembly ahead of time but I can't seem to figure out how to do this in Silverlight.
Has anyone done this before? Is it even possible? Any other ideas that might help are also welcome.
Thanks.
| WCF Startup performance in Silverlight 4 | CC BY-SA 2.5 | null | 2011-01-30T21:02:30.820 | 2016-02-22T15:43:07.377 | null | null | 172,606 | [
".net",
"silverlight",
"wcf",
"performance",
"xml-serialization"
]
|
4,845,489 | 1 | 4,846,138 | null | 4 | 1,327 | I have an artificial neural network which plays Tic-Tac-Toe - but it is not complete yet.
---
- - -

---
-
But I don't really understand this algorithm.
---
The trace decay parameter λ should be "0.1" as distal states should not get that much of the reward.
The learning rate is "0.5" in both layers (input and hidden).
It's a case of delayed reward: The reward remains "0" until the game ends. Then the reward becomes "1" for the first player's win, "-1" for the second player's win or "0" in case of a draw.
---
- - -
---
Thank you so much in advance :)
| TD(λ) in Delphi/Pascal (Temporal Difference Learning) | CC BY-SA 2.5 | 0 | 2011-01-30T20:59:01.553 | 2011-02-18T08:50:56.843 | 2011-02-18T08:50:56.843 | 89,818 | 89,818 | [
"artificial-intelligence",
"neural-network",
"reinforcement-learning",
"temporal-difference"
]
|
4,845,640 | 1 | 4,852,636 | null | 0 | 3,419 | I was trying to get data of wall posts but failed .I am using facebook sdk at codeplex [http://facebooksdk.codeplex.com/documentation](http://facebooksdk.codeplex.com/documentation)
they have given code to get posts but when i replace my token and change
```
dynamic result = app.Get("19292868552_118464504835613");
```
to
```
dynamic result = app.Get("/me/feed");
```
the line `string fromName = result.from.name;` throws exception that from is not present in result.
then i added some break point and watched them here is picture

you see the difference in two strings named and .
me works fine and i can extract any thing i want but result dose not help i have noticed that there is "|" in the string dose that cause the problem.
| How to get posts of user | CC BY-SA 2.5 | null | 2011-01-30T21:26:41.873 | 2011-01-31T15:30:11.837 | null | null | 430,167 | [
"facebook",
"facebook-c#-sdk"
]
|
4,845,954 | 1 | 4,845,974 | null | 3 | 2,488 | I have an iOS iPhone app for which I need the Action Sheet-style buttons outside of an action sheet. I am talking about these buttons:

I've seen the eBay iPhone app do that and then have that button tinted blue, but I just can not figure out how to do it. I've been pondering and googling for this for quite a few days now. Any help would be appreciated!
| iOS Getting ActionSheet-Like buttons | CC BY-SA 2.5 | null | 2011-01-30T22:21:01.117 | 2011-01-31T18:27:58.450 | null | null | 219,515 | [
"cocoa-touch",
"ios",
"uiactionsheet"
]
|
4,845,963 | 1 | 4,846,048 | null | 0 | 523 | I'm trying to fix a table and make it look better (I describe the issue better in the screen shot below).
this is a screen shot of what's going on and what I would like to happen:

What do I change in my style sheet?
the css file is located at [rankingclimber.com/css/style.css](http://rankingclimber.com/css/style.css) (the footer part is clearly marked) and the signup part is clearly marked
The sign up page is located at [www.rankingclimber.com/signup.php](http://www.rankingclimber.com/signup.php)
here's the code for the footer file: [rankingclimber.com/footer.php](http://rankingclimber.com/footer.php) and the footer is called on the main page: [rankingclimber.com/signup.php](http://rankingclimber.com/signup.php)
| How do I fix my footer and the bottom of this page? | CC BY-SA 3.0 | null | 2011-01-30T22:23:29.567 | 2012-09-22T13:10:21.430 | 2012-09-22T13:10:21.430 | 1,341,006 | 485,843 | [
"html",
"css"
]
|
4,846,005 | 1 | null | null | 0 | 458 | Is it possible to customize the UISearchBar like the Google Places application on iPhone ?
Any help is welcomed ...

| UISearchBar like Google Places application | CC BY-SA 2.5 | null | 2011-01-30T22:30:39.993 | 2011-08-02T20:02:49.007 | null | null | 316,994 | [
"iphone",
"uisearchbar"
]
|
4,846,080 | 1 | 4,855,652 | null | 14 | 13,578 | I've got a segfault but I have absolutely no idea how to locate it.
Tips?

| How can I effectively debug C code that's wrapped with JNI in Eclipse? (Android Dev) | CC BY-SA 2.5 | 0 | 2011-01-30T22:44:33.963 | 2011-02-09T08:01:19.573 | null | null | 387,064 | [
"java",
"android",
"c",
"java-native-interface",
"android-ndk"
]
|
4,846,196 | 1 | 4,846,252 | null | 0 | 141 | [http://ttt-ai.heroku.com/](http://ttt-ai.heroku.com/) is the URL of teh problem (just click yes or no) then click any of the squares, and you'll see what is going on.
a screen shot: 
It's just the squares that are getting messed up right now. I haven't put to much thought into how I want to style the X's and O's
| CSS problem: Large letter is messing with my div alignments | CC BY-SA 2.5 | null | 2011-01-30T23:08:02.057 | 2011-01-30T23:34:15.723 | 2011-01-30T23:09:03.600 | 139,010 | 356,849 | [
"css"
]
|
4,846,239 | 1 | 4,846,333 | null | 3 | 580 | 
Basically I don't know what to do...
I downloaded the JMF library and inserted the library into the project. It was working fine until I came across this problem. Let me know what you think. Thanks!!!
Zev
| How do I fix this buffer issue? | CC BY-SA 2.5 | null | 2011-01-30T23:16:36.717 | 2011-01-31T04:39:47.290 | null | null | 516,664 | [
"java",
"image",
"buffer",
"jmf"
]
|
4,846,328 | 1 | 4,848,738 | null | 10 | 4,699 | I setup a custom domain on GAE using the tutorial at [aral balkan](http://aralbalkan.com/1466) to access http;//app.apspot.com at [http://app.com](http://app.com). (I can access the app at www.app.com)
The tutorial is pretty old(Sep 2008) and it mentions
> Add four Hostnames for the naked
domain (i.e., yourdomain.com without
the www) and have them point to IP
addresses 216.239.32.21,
216.239.34.21, 216.239.36.21, and 216.239.38.21.
I added the required A names to my domain dns, but accessing app.com leads me to a Google 404 page

I have used naked to www redirection on blogger using a similar method(A names provided by Google Blogger Help) and it has worked for me(it still works). However apart from the article at aralbalkan.com, I have not come across an official source which says that naked to www domain redirection using these IPs works for domains on Google Apps(which GAE uses to manage custom domains).
The alternate method that I can think of using is, getting a third party host and pointing the A name of app.com to the IP address of that third party host, followed by placing a 301 redirect script to www.app.com on that host.But that will require me to manage another hosting just for naked to www redirection.
If anyone knows of any to achieve naked to www redirection on custom domains for GAE, please help.
Thank you for the answers. If it can be of any help, I am using for DNS. I have an account too. The domain is on and namecheap offers a freedns option too.
Switched back my dns to namecheap. I guess geoscaling.com does not offer a 301 url redirect(correct me if I am wrong), although it's still a great service. Namecheap offers a 301 URL redirect. Should start working in some time.
| GAE naked to www custom domain mapping does not work | CC BY-SA 2.5 | 0 | 2011-01-30T23:33:36.410 | 2014-07-09T09:09:56.370 | 2011-01-31T15:01:48.740 | 405,861 | 405,861 | [
"google-app-engine",
"dns",
"no-www"
]
|
4,846,449 | 1 | 4,857,567 | null | 3 | 865 | I read up on database structuring and normalization and decided to remodel the database behind my learning thingie to reduce redundancy.
I have different types of entries that can be learned. /cloze tests (one text, many gaps) and simple (one question, one answer) types.
Now I'm in a bit of a pickle:
- - `clozetests`- - `user_gaps``user_terms``user_terms_answers`
I put up this of my schema. I didn't remove the stuff that isn't relevant for this question, but I can do that if anyone's confusion can be remedied like that. I think it looks super tidy already. Tidier than my mental concept of this at least.
Did I say any help would be greatly appreciated? Answerers might find themselves adulated for their wisdom.

---
if you care, it's not really relevant to the question.
Before remodeling I had them all in one table (because I added the gap texts in a hurry), so that the gap texts were "normal" items without answers, while the gaps where items without questions. The application linked them together.
---
## Edit
I added an answer after SO coughed up some helpful posts. I'm not yet 100% satisfied. I try to write views for common queries to this set up now and again I feel like I'll have to pull application logic for something that is database turf.
| How do I structure my database so that two tables that constitute the same "element" link to another? | CC BY-SA 2.5 | null | 2011-01-30T23:54:56.697 | 2011-02-01T22:12:20.433 | 2011-02-01T00:47:58.223 | 263,054 | 263,054 | [
"sql",
"mysql",
"database",
"database-design",
"foreign-keys"
]
|
4,846,657 | 1 | 4,894,500 | null | 5 | 1,455 | When I create a new UIDatePicker with its Mode set to a CountDownTimer, it renders poorly with a black background. Anyone have any insight?

Normal Picker looks like this:

```
intervalPicker = new UIDatePicker(new RectangleF(0, this.tvc.View.Bounds.Height - 135, this.tvc.View.Bounds.Width, 200));
intervalPicker.Mode = UIDatePickerMode.CountDownTimer;
intervalPicker.CountDownDuration = DeviceSession.CurrentBehavioralEvent.Duration*60;
intervalPicker.ValueChanged += new EventHandler(intervalPicker_EditingChanged);
UIButton b = UIButton.FromType(UIButtonType.Custom);
b.Opaque = false;
b.BackgroundColor = UIColor.Clear;
b.Frame = new RectangleF(0, 0, this.tvc.View.Bounds.Width, this.tvc.View.Bounds.Height);
b.TouchUpInside += (o, s) => {
intervalPicker.RemoveFromSuperview();
b.RemoveFromSuperview();
};
this.tvc.NavigationController.View.AddSubview(b);
this.tvc.NavigationController.View.AddSubview(intervalPicker);
```
| IOS: UIDatePicker renders poorly with a black background | CC BY-SA 2.5 | null | 2011-01-31T00:35:11.123 | 2011-04-07T05:43:12.243 | 2011-02-03T15:35:08.370 | 171,742 | 171,742 | [
"ipad",
"ios",
"rendering",
"xamarin.ios",
"uidatepicker"
]
|
4,847,097 | 1 | 4,847,178 | null | 0 | 359 | I am trying to run a denoising algorithm on a bitmap image that I have -- the function returns me a short[], so I tried simply casting it to int[] in order to generate a bitmap and I get this:

I'd like it to be in grayscale, not .. well.. pink. Any ideas?
| How can I convert a short[] into a int[] to create a grayscale bitmap? | CC BY-SA 2.5 | null | 2011-01-31T02:18:54.503 | 2011-01-31T03:45:00.537 | null | null | 387,064 | [
"android",
"image-processing",
"type-conversion"
]
|
4,847,129 | 1 | 4,847,206 | null | 3 | 1,749 | I want to use java JLabel with an Icon in custom size on my GUI. like this :

I used this code to change size of original Icon :
```
ImageIcon imageIcon = (ImageIcon) jLabel1.getIcon();// new ImageIcon( "Play-Hot-icon.png");
ImageIcon thumbnailIcon = new ImageIcon(getScaledImage(imageIcon.getImage(), 25 , 25));
jLabel1.setIcon(thumbnailIcon);
```
and here is code for resize image
```
private Image getScaledImage(Image srcImg, int w, int h){
BufferedImage resizedImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = resizedImg.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g2.drawImage(srcImg, 0, 0, w, h, null);
g2.dispose();
return resizedImg;
}
```
but after resizing image and using this code the result is this! :

how can I have desired image on my JLabel??
regards,
sajad
| Custom JLabel icon | CC BY-SA 3.0 | null | 2011-01-31T02:25:36.690 | 2011-12-15T12:49:06.337 | 2011-12-15T12:49:06.337 | 606,664 | 411,186 | [
"java",
"swing",
"user-interface",
"jlabel",
"imageicon"
]
|
4,847,748 | 1 | 4,848,445 | null | 0 | 832 | i just went to test a website in firefox 4 (beta 10) and the horizontal menu is showing up vertically.
In chrome, the menu is horizontal like this:

but in firefox 4 it shows up like this:

I am using the [superfish horizontal menu](http://users.tpg.com.au/j_birch/plugins/superfish/). The examples on the website seems fine in firefox 4.
how would i begin to investigate if this is a bug in firefox 4 or is there something wrong with my horizontal menu code??
| html horizontal menu showing up vertically on firefox 4 | CC BY-SA 2.5 | null | 2011-01-31T04:55:48.953 | 2011-01-31T13:37:57.470 | 2011-01-31T13:37:57.470 | 4,653 | 4,653 | [
"html",
"css",
"menu",
"cross-browser",
"superfish"
]
|
4,848,690 | 1 | null | null | 1 | 7,383 | I created Master page which has got mainNavigator panel on top of page that is a web user control(BuildMenu.ascx). I am filling UC Menu in master page's loading :
```
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="IntermMaster.master.cs" Inherits="MyProject.IntermMaster" EnableViewState="true" %>
<%@ Register src="Utils/BuildMenu.ascx" tagname="BuildMenu" tagprefix="uc1" %>
>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<uc1:BuildMenu ID="BuildMenu2" runat="server" />
</div>
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
```
This is loading in postback event:
BuildMenu.ascx.cs
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
// Fill Menu from DataBase (Compare SiteMap...)
}
```
Every post back BuildManu.ascx is loading every time tihs is really bored me. How can i solve it. I want to do only one time load BuildMenu.ascx (in master page)

| How to load menu only once time in Master Page? | CC BY-SA 3.0 | null | 2011-01-31T07:53:08.113 | 2013-12-20T06:24:13.703 | 2013-12-20T06:24:13.703 | 3,041,194 | 52,420 | [
"c#",
".net",
"asp.net",
"visual-studio-2008"
]
|
4,848,880 | 1 | 6,684,227 | null | 2 | 960 | How to make the suggestions in the QSB editable when the user clicks on it? I.e. via an edit icon on the right, like on the Google Search app.
Is there a standard way to do it, or does it require to implement it from scratch, i.e. customized suggestion list item layout in xml with a button, etc.?
I couldn't find any info on that on [https://developer.android.com/guide/topics/search/searchable-config.html](https://developer.android.com/guide/topics/search/searchable-config.html) etc.

Edit:
I'm currently trying this for testing, after the search intent is invoked, I start a new search with the query preset - it works but it's too slow, because it closes the search UI and reopens it, which is not what I want. I'd like the search UI to stay open.
```
@Override
protected void onNewIntent(Intent intent) {
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
String query = intent.getStringExtra(SearchManager.QUERY);
Toast.makeText(this, "TRY TO PLACE QUERY IN QSB: " + query, Toast.LENGTH_LONG).show();
SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE);
searchManager.startSearch(query, true, this.getComponentName(), b, false);
}
}
```
| QSB (Quick Search Bar): make suggestions editable | CC BY-SA 3.0 | 0 | 2011-01-31T08:29:49.900 | 2017-07-21T10:29:14.700 | 2017-07-21T10:29:14.700 | 1,000,551 | 241,475 | [
"android",
"android-qsb"
]
|
4,848,884 | 1 | 4,848,919 | null | 1 | 921 | First, I run program on emulator. After that, I run on many android phones. Some are very small, some are show in rotate side then can't rotate back, and can't scroll (I did not do that), some are OK.
I understand may caused by different types of screen and I used AbsoluteLayout, but I do not know how to solve that problem.So, I need to resolve this problem. Anyone can help? Thanks ka
Example page that I did:
```
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/usrname"
android:layout_width="wrap_content"
android:layout_height="21px"
android:layout_x="105px"
android:layout_y="179px"
android:text="Username :"
android:textSize="18sp"
android:textStyle="bold" />
<EditText
android:id="@+id/usrname_text"
android:layout_width="161px"
android:layout_height="wrap_content"
android:layout_x="74px"
android:layout_y="206px"
android:textSize="12sp" />
<TextView
android:id="@+id/pass"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="105px"
android:layout_y="252px"
android:text="Password :"
android:textSize="18sp"
android:textStyle="bold" >
</TextView>
<EditText
android:id="@+id/pass_text"
android:layout_width="163px"
android:layout_height="wrap_content"
android:layout_x="73px"
android:layout_y="279px"
android:password="true"
android:textSize="12sp" />
<Button
android:id="@+id/login"
android:layout_width="73px"
android:layout_height="wrap_content"
android:layout_x="75px"
android:layout_y="333px"
android:text="Login" />
<Button
android:id="@+id/cancle"
android:layout_width="73px"
android:layout_height="wrap_content"
android:layout_x="157px"
android:layout_y="333px"
android:text="Cancel" />
</AbsoluteLayout>
```
These are pictures from Galaxy-S and emulator :


| How to handle different sizes of screen on android | CC BY-SA 3.0 | null | 2011-01-31T08:30:53.773 | 2013-06-19T12:02:55.720 | 2013-06-19T12:02:55.720 | null | 538,788 | [
"android",
"android-emulator",
"screen"
]
|
4,848,960 | 1 | 4,848,992 | null | 0 | 2,178 | How can I assign a background image to tabpage control in Visual Studio C# 2010? I am able to provide background image to each of the tab separately, but I cannot do it so for the whole tabpage control, due to which a portion of tabpage control remain with different background and each of the tab pages has ok and fine background.
Here is the picture of my form:

See the 'grey-colored' region in the tabs line. How can I cover the whole tabpage control with one single background?
| How can I assign a custom backcolor or background image to a TabPage control? | CC BY-SA 4.0 | null | 2011-01-31T08:43:53.677 | 2019-03-02T16:18:42.367 | 2019-03-02T16:18:42.367 | 472,495 | 411,425 | [
"c#",
".net",
"winforms",
"tabcontrol",
"tabpage"
]
|
4,849,076 | 1 | 4,849,784 | null | 20 | 6,726 | I'm writing an audio waveform editor in Cocoa with a wide range of zoom options. At its widest, it shows a waveform for an entire song (~10 million samples in view). At its narrowest, it shows a pixel accurate representation of the sound wave (~1 thousand samples in a view). I want to be able to smoothly transition between these zoom levels. Some commercial editors like Ableton Live seem to do this in a very inexpensive fashion.
My current implementation satisfies my desired zoom range, but is inefficient and choppy. The design is largely inspired by this excellent article on drawing waveforms with quartz:
[http://supermegaultragroovy.com/blog/2009/10/06/drawing-waveforms/](http://supermegaultragroovy.com/blog/2009/10/06/drawing-waveforms/)
I create multiple CGMutablePathRef's for the audio file at various levels of reduction. When I'm zoomed all the way out, I use the path that's been reduced to one point per x-thousand samples. When I'm zoomed in all the way in, I use that path that contains a point for every sample. I scale a path horizontally when I'm in between reduction levels. This gets it functional, but is still pretty expensive and artifacts appear when transitioning between reduction levels.
One thought on how I might make this less expensive is to take out anti-aliasing. The waveform in my editor is anti-aliased while the one in Ableton is not (see comparison below).


I don't see a way to turn off anti-aliasing for CGMutablePathRef's. Is there a non-anti-aliased alternative to CGMutablePathRef in the world of Cocoa? If not, does anyone know of some OpenGL classes or sample code that might set me on course to drawing my huge line more efficiently?
There's now a great library that does exactly what I was looking for: [https://github.com/syedhali/EZAudio](https://github.com/syedhali/EZAudio)
| Efficient method to draw a line with millions of points | CC BY-SA 3.0 | 0 | 2011-01-31T09:01:45.430 | 2014-01-21T17:21:08.630 | 2014-01-21T17:21:08.630 | 384,109 | 384,109 | [
"cocoa",
"audio",
"quartz-2d",
"waveform",
"cgpath"
]
|
4,849,293 | 1 | 4,849,434 | null | 0 | 212 | I have one text box control on aspx page in my .net application.
and in code behind on page load event i wrote:
```
txt.Text = "Sample"
```
Now if build website on system [ windows XP ] it build properly but on system [ Windows 7 Enterprise ] it showing following error:
" Name 'txt' is not declared "

What would be the reason.Is that environment specific problem.I am using VS 2008.
| How to resolve build error in asp.net website | CC BY-SA 2.5 | null | 2011-01-31T09:31:27.197 | 2011-01-31T09:47:23.323 | null | null | 503,125 | [
"asp.net",
"visual-studio-2008",
"windows-7"
]
|
4,849,347 | 1 | null | null | 1 | 4,905 | If i use this layout, everything is ok
See this Image:

```
<TableLayout android:id="@+id/TableLayout01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#000000" android:layout_margin="10dip" android:padding="10dip" >
<TableRow android:id="@+id/row1" android:layout_width="wrap_content" android:layout_height="wrap_content" >
<TextView android:id="@+id/n1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:text="aaaaa a aaaaaaaaa:"></TextView>
<TextView android:id="@+id/c1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:layout_column="3" android:text="15"></TextView>
</TableRow>
<TableRow android:id="@+id/row2" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:id="@+id/n2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:text="aaaaaaa aaaaa:"></TextView>
<TextView android:id="@+id/c2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:layout_column="3" android:text="12"></TextView>
</TableRow>
<TableRow android:id="@+id/row3" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:id="@+id/n3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:text="aaa:"></TextView>
<TextView android:id="@+id/c3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:layout_column="3" android:text="14"></TextView>
</TableRow>
<TableRow android:id="@+id/row4" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:id="@+id/n4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:text="aaa:"></TextView>
<TextView android:id="@+id/c4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:layout_column="3" android:text="18"></TextView>
</TableRow>
<TableRow android:id="@+id/row5" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:id="@+id/n5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:text="aaaaaa aaaaaaaa:"></TextView>
<TextView android:id="@+id/c5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:layout_column="2" android:text="70"></TextView>
</TableRow>
</TableLayout>
```
But if i set android:layout_column="3" for the second textview in the last row, this shows [http://www.lukafinzgar.com/nekul.png](http://www.lukafinzgar.com/nekul.png) .
How should i set the attributes to get all the numbers in the third column?
| Aligning columns in TableLayout | CC BY-SA 3.0 | null | 2011-01-31T09:37:43.250 | 2013-10-04T05:28:40.900 | 2013-04-18T09:35:19.340 | 664,177 | 324,417 | [
"android",
"tablelayout"
]
|
4,849,515 | 1 | 4,849,555 | null | 6 | 7,710 | I'm resizing my custom control using the following code:
```
private void Form1_Resize_1(object sender, EventArgs e)
{
textBox1.Text = this.Width.ToString();
textBox2.Text = (this.Height - 200).ToString();
canvas21.Size = new System.Drawing.Size(this.ClientSize.Width, this.ClientSize.Height - this.Top - 15);
canvas21.Invalidate();
}
```
I just want the top left corner of the custom control(0, 105) to stay in place, and the control to resize along with the form, but for some reason this does not work. When I resize the control stays in place, but automatically resizes to fill out the rest of the form.

Is there any way to get a list of everything that affects the size of a usercontrol. In order to search for other places the size i set, which i might have overlooked?
| How do I resize a custom control I've built | CC BY-SA 2.5 | null | 2011-01-31T09:57:21.220 | 2012-03-14T18:53:39.837 | 2012-03-14T18:53:39.837 | 41,153 | 436,802 | [
"c#",
"winforms",
"resize",
"custom-controls"
]
|
4,849,614 | 1 | null | null | 0 | 7,477 | Could any one help how to show the loader image when the data is loading ?I did a sample one which is not a perfect one.Please suggest me the best way .I have a question can we use jquery or javascript?Here when i click the load the data has to load to GV in between this process the preloader has to be visible like in GMAIL.

```
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Loader Image While Loading Data in GV.aspx.cs"
Inherits="Loader_Image_While_Loading_Data_in_GV" %>
<!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 runat="server">
<title>Loader Image While Loading Data in GV</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td>
<asp:Image ID="load_img" runat="server" Height="70px" Width="70px" ImageUrl="~/Images/ajax-loader_green.gif"
Visible="false" />
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnload" runat="server" Text="Load" OnClick="btnload_Click" />
</td>
</tr>
<tr>
<td>
<asp:GridView ID="gv1" runat="server" BackColor="LightGoldenrodYellow" BorderColor="Tan"
BorderWidth="1px" CellPadding="2" ForeColor="Black" GridLines="None">
<AlternatingRowStyle BackColor="PaleGoldenrod" />
<FooterStyle BackColor="Tan" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<SortedAscendingCellStyle BackColor="#FAFAE7" />
<SortedAscendingHeaderStyle BackColor="#DAC09E" />
<SortedDescendingCellStyle BackColor="#E1DB9C" />
<SortedDescendingHeaderStyle BackColor="#C2A47B" />
</asp:GridView>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
```
In the Code behind i wrote like this
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AdventureWorksModel;
public partial class Loader_Image_While_Loading_Data_in_GV : System.Web.UI.Page
{
AdventureWorksEntities awe = new AdventureWorksEntities();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnload_Click(object sender, EventArgs e)
{
load_img.Visible = true;
gv1.DataSource = awe.CountryRegionCurrencies.ToList();
gv1.DataBind();
load_img.Visible = false;
}
}
```
| How to show the Loader image like in gmail when loading Data into GridView? | CC BY-SA 2.5 | null | 2011-01-31T10:07:53.310 | 2011-06-15T10:20:48.630 | null | null | 412,982 | [
"asp.net",
"jquery"
]
|
4,850,152 | 1 | 4,860,451 | null | 1 | 2,031 | I am using facebook publishStream method in Facebook FBML Application, some other developer worked on it before me. I am using it some thing like this
```
Facebook.streamPublish('Publish Shirt Tale. <?php echo $canvasURL.'?req=tale-details&tale_id='.$tale_id?>', attachment);
```
But there is another url that is under the shared image, see below image for more info

So as in image there is encircle link, so that points towards some other page while I want it to the first page of app. It currently goes to a page some thing like this: [http://apps.facebook.com/apps/application.php?id=xxxxxxxxxxxxx](http://apps.facebook.com/apps/application.php?id=xxxxxxxxxxxxx)
so can any one tell that where can I specify that URL?
Thanks in advance
| Setting Facebook Publish Stream URLs | CC BY-SA 2.5 | null | 2011-01-31T11:07:31.090 | 2011-02-01T08:40:10.293 | null | null | 513,302 | [
"facebook",
"facebook-wall"
]
|
4,850,231 | 1 | 4,957,350 | null | 0 | 603 | I am implementing UIDATEPICKER. The problem is that when i click on the button, The alert sheet is appear and datepicker is add as subview but i want two button,
1-cancel 2-done
what will i do?
UIActionSheet *aac = [[UIActionSheet alloc] initWithTitle:@"How many?"
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:nil];
```
aac.actionSheetStyle = UIActionSheetStyleBlackOpaque;
sheet = aac;
UIDatePicker *theDatePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0.0, 44.0, 0.0, 0.0)];
if(IsDateSelected==YES)
{
theDatePicker.datePickerMode = UIDatePickerModeDate;
theDatePicker.maximumDate=[NSDate date];
}else {
theDatePicker.datePickerMode = UIDatePickerModeTime;
}
self.dtpicker = theDatePicker;
[theDatePicker release];
[dtpicker addTarget:self action:@selector(dateChanged) forControlEvents:UIControlEventValueChanged];
pickerDateToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
pickerDateToolbar.barStyle = UIBarStyleBlackOpaque;
[pickerDateToolbar sizeToFit];
NSMutableArray *barItems = [[NSMutableArray alloc] init];
UIBarButtonItem *flexSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:self action:nil];
[barItems addObject:flexSpace];
UIBarButtonItem *cancelBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(DatePickerCancelClick)];
[barItems addObject:cancelBtn];
```
////
it doesnot work ..I want this....
what will i do?
| Problem in Datepicker and alertsheet | CC BY-SA 2.5 | null | 2011-01-31T11:15:34.460 | 2011-02-14T18:11:42.707 | null | null | 575,620 | [
"iphone"
]
|
4,850,322 | 1 | null | null | 1 | 1,288 | Actually i want 4 tabs in my app but i dont want to show default tabs. i Want to have something like dragging tabs. when i click on first tab and does not pick my finger up and drags to next tab and so on.

The tab bar like this below..when i press on one tab i can move to another tab as well by this moving of finger.
| Android custom tabs | CC BY-SA 2.5 | 0 | 2011-01-31T11:26:39.963 | 2012-03-05T07:57:45.357 | 2011-01-31T11:58:09.633 | 383,597 | 383,597 | [
"android"
]
|
4,850,866 | 1 | null | null | 1 | 2,154 | I've drawn a gradient image with a Bezier Curve on a HTML 5 Canvas like this:
```
var canvas = $('#canvas1')[0];
if (canvas.getContext) {
var context = canvas.getContext('2d');
var gradient = context.createLinearGradient(0, 0, 0, 100);
gradient.addColorStop(0, 'rgba(193,193,193,1)');
gradient.addColorStop(.20, 'rgba(160,160,160,1)');
gradient.addColorStop(.5, 'rgba(102,102,102,1)');
gradient.addColorStop(.7, 'rgba(91,91,91,1)');
gradient.addColorStop(.97, 'rgba(160,160,160,1)');
gradient.addColorStop(1, 'rgba(193,193,193,1)');
context.fillStyle = gradient;
context.fillRect(0, 0, 500, 100);
var gradient1 = context.createLinearGradient(0, 0, 0, 100);
gradient1.addColorStop(0, '#a1a1a1');
gradient1.addColorStop(.5, '#717171');
gradient1.addColorStop(1, '#a1a1a1');
context.beginPath();
context.moveTo(0, 0);
context.bezierCurveTo(0, 0, 20, 50, 0, 100);
context.lineWidth = 1;
//context.strokeStyle = 'black'; // line color
//context.stroke();
context.fillStyle = gradient1;
context.fill();
context.closePath();
}
```
Now I want to save this image on HDD, for this I have formed this request:
```
var canvas = $('#canvas1')[0];
if (canvas.getContext) {
var context = canvas.getContext('2d');
$.ajax({
url: '/Html5/Export',
type: 'POST',
data: 'img=' + escape(canvas.toDataURL("image/png")),
success: function (data) {
alert('data exported');
}
});
}
```
On this server side, I've written this code (ASP.NET C#):
```
[HttpPost]
public ActionResult Export()
{
string img = Request.Params["img"];
ConvertThis(img);
return Content("true");
}
public void ConvertThis(string ImageText)
{
if (ImageText.Length > 0)
{
ImageText = ImageText.Substring(ImageText.IndexOf(",") + 1);
Byte[] bitmapData;
bitmapData = Convert.FromBase64String(ImageText);
System.IO.File.WriteAllBytes(@"c:\logs\random.png", bitmapData);
}
}
```
But the image generated on the server side is totally different from the image drawn on the Html5 Canvas .
What am I doing wrong here..
| Unable to Generate png Image from Html 5 Canvas | CC BY-SA 2.5 | 0 | 2011-01-31T12:30:25.700 | 2011-07-22T21:59:22.643 | 2011-01-31T14:25:31.027 | 246,398 | 246,398 | [
"image",
"html",
"canvas"
]
|
4,851,051 | 1 | 5,521,633 | null | 0 | 4,408 | 
I want to scroll a text automatically in horizontal way. I tried the method below, but the text was not scrolling.
```
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/bg_1"
android:textColor="#cc0000"
android:scrollHorizontally="true"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit ="marquee_forever"
android:focusable="true"
android:focusableInTouchMode="true"
/>
```
So please tell me how to scroll a text and if there is any need to add some code in the class file also.
| Scroll a text automatically on horizontal | CC BY-SA 3.0 | null | 2011-01-31T12:49:09.147 | 2014-09-22T10:30:43.727 | 2012-11-19T14:00:46.183 | 469,983 | 745,367 | [
"android",
"xml",
"textview",
"scrollview"
]
|
4,851,487 | 1 | 4,851,798 | null | 3 | 449 | Well actually I know, that I should replace & by %26
But I'm using this URL to log in with OpenID:
[https://innubili-gidea.appspot.com/_ah/login_redir?claimid=https://www.google.com/accounts/o8/site-xrds?hd=icada.com&continue=https://innubili-gidea.appspot.com/%3Fdomain%3Dicada.com%26campaign%3D2%26](https://innubili-gidea.appspot.com/_ah/login_redir?claimid=https://www.google.com/accounts/o8/site-xrds?hd=icada.com&continue=https://innubili-gidea.appspot.com/%3Fdomain%3Dicada.com%26campaign%3D2%26)

As you can see, the continue parameter is properly escaped.
But after being redirected through Googles login pages, it redirects me back to
[https://innubili-gidea.appspot.com/?domain=icada.com](https://innubili-gidea.appspot.com/?domain=icada.com)
So the `&campaign=2` parameter is missing

Can you confirm, that I escaped the continue parameter correctly?
For then it looks to me as this seems to be an issue at Googles login.
| How do I have to escape ampersands in URLs when logging in with OpenID? | CC BY-SA 2.5 | null | 2011-01-31T13:39:42.420 | 2011-02-01T08:23:16.660 | null | null | 351,893 | [
"google-app-engine",
"openid"
]
|
4,851,579 | 1 | null | null | 0 | 2,231 | I have a set of .
The image below is an example:

I would like to turn these points into a surface. I just know the X,Y and Z values of the points.
For example, check out the image below, which shows a mesh of a human face generated from points in 3D space.

i googled so much but, what i found is some images and explaination
but no one has explained with practical aspect and practical example.
is there any good or best algorithms which help me to solve this problem.
Please....
Thaks...........
| Tessellation in 3D | CC BY-SA 2.5 | null | 2011-01-31T13:47:12.040 | 2011-01-31T13:53:08.667 | 2011-01-31T13:53:08.667 | 173,773 | 468,968 | [
"algorithm"
]
|
4,851,575 | 1 | 4,851,673 | null | 0 | 659 | Should hopefully be pretty simple. I have a column in my datagrid that has emails for notification. They are separated by a ';'. I want to put a `"<br>"` after each ';' so that the grid doesn't expand too far off of the page. I was able to get a function going that allowed me to see each row before it was created, but when I was trying to retrieve the value to edit it, it was returning null. I'm going to try and retrieve that function as I erased it on Friday, but was wondering if someone had any links or examples on how to do this.
I have:
```
-------------------------------------------------------------------------------
| Column1 | Column2 | Column3 | Notify |
-------------------------------------------------------------------------------
| NULL | NULL | NULL | [email protected];[email protected] |
-------------------------------------------------------------------------------
```
I want:
```
---------------------------------------------------------
| Column1 | Column2 | Column3 | Notify |
---------------------------------------------------------
| NULL | NULL | NULL | [email protected]; |
| | | | [email protected] |
---------------------------------------------------------
```
I know that I was using the ItemCreated function and trying to retrieve the values from the DataGridItemEventArgs. Working on the function now.
### Update
Ok, so I got back to this as a test:
```
Private Sub ItemCreated(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles dgTasks.ItemCreated
If e.Item.Cells.Count > 1 Then
Dim int As Integer = 0 'I put a breakpoint here to evalute the information
End If
End Sub
```
When I hit the breakpoint the first time, the .Text attribute shows that it is Notification which is exactly what it's supposed to be as the header field. On the next break, and subsequent breaks, the .Text attribute is "". Now, this grid is databound on Page_Load, but would that affect this? Wouldn't the value have to be in the DataGridItemEventArgs for that record to be created? I know when I ViewSource of the page when I'm done it shows the information there, but I don't know if that could be set after the table is drawn, but I doubt it. Any help would highly be appreciated. Thanks. Here's the Page_Load and BindData functions just incase you need them.
### Page_Load
```
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
'Do Nothing
Else
BindData("")
End If
End Sub
```
### BindData
```
Private Sub BindData(ByVal strSort As String)
Dim tsDS As CustomDataSet = New CustomDataSet
For Each dr As DataRow In tsDS.GetData("").Tables(0).Rows
If dr.Item(2).ToString().StartsWith("Vacancy") Then
dr.Delete()
End If
Next
Dim dv As DataView = tsDS.GetData("").Tables(0).DefaultView
If strSort.Length > 0 Then
dv.Sort = strSort
End If
dgTasks.DataSource = dv
dgTasks.DataBind()
End Sub
```
### Here's what I get on the first Item row.

### Update: Fix
```
Protected Sub Item_DataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles dgTasks.ItemDataBound
If e.Item.Cells.Count > 1 Then
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
Dim notification As String = DirectCast(DirectCast(e.Item.DataItem, System.Data.DataRowView).Row, Utilities.CustomDS.Row).Notification
e.Item.Cells(7).Text = "<a href=""mailto:" & notification & """>" & notification.Replace(";", ";<br>") & "</a>"
End If
End If
End Sub
```
| Split column in asp:DataGrid | CC BY-SA 2.5 | null | 2011-01-31T13:46:41.893 | 2011-01-31T15:00:49.590 | 2011-01-31T15:00:49.590 | 419,603 | 419,603 | [
"asp.net",
"datagrid",
"split"
]
|
4,851,833 | 1 | 4,860,664 | null | 1 | 858 | How do I modify the following code block so that it will display ‘Plant Genus’ instead of the text ‘[hide]’
The relevant code is at:
\app\design\frontend\enterprise\style\template\catalog\layer\view.phtml
```
<?php $_filters = $this->getFilters() ?>
<?php foreach ($_filters as $_filter): ?>
<?php if($_filter->getItemsCount()): ?>
<dt><?php echo $this->__($_filter->getName()) ?></dt>
<dd><?php echo $_filter->getHtml() ?></dd>
<?php endif; ?>
<?php endforeach; ?>
```
Here is the attribute from the admin panel:

| Magento - Display Attribute Admin Title | CC BY-SA 2.5 | 0 | 2011-01-31T14:11:28.573 | 2011-02-01T09:05:20.807 | null | null | 236,989 | [
"magento",
"attributes"
]
|
4,851,906 | 1 | 4,851,969 | null | 2 | 633 | I need to create a Bi-directional spinner in Android .
Providing the following sample:

Can anyone provide any inputs ?
Thanks in Advance.
| Develop Bi-directional Spinner in Android | CC BY-SA 3.0 | 0 | 2011-01-31T14:19:05.247 | 2015-03-14T07:54:35.447 | 2015-03-14T07:54:35.447 | 4,669,838 | 443,141 | [
"android"
]
|
4,852,180 | 1 | 4,852,223 | null | 4 | 3,912 | I have some code that creates a graph using the `Bitmap` class. The quality of the produced bitmap, however, is pretty poor, how can I improve the quality of this? Note that I am using the Compact Framework!
Here is a few snippets of how I do various things:
Create a bitmap with a background based on an existing jpg
```
Bitmap bitmap = new Bitmap(filename);
```
I then create a `Graphics` class from the bitmap
```
Graphics myG = Graphics.FromImage(bitmap);
```
I then draw to the graphics like so:
```
myG.DrawLine(majorAxisPen, graphRect.Left, graphRect.Bottom, graphRect.Right, graphRect.Bottom);
```
After drawing everything I need to I then save out the `Bitmap` like so:
```
bitmap.Save(fileDestination, System.Drawing.Imaging.ImageFormat.Jpeg);
```
Here is the image it produces

| .NET CF Bitmap class quality is poor | CC BY-SA 2.5 | null | 2011-01-31T14:43:22.990 | 2011-01-31T15:32:31.163 | 2011-01-31T14:56:18.650 | 94,278 | 94,278 | [
"c#",
".net",
"graphics",
"compact-framework"
]
|
4,852,558 | 1 | 4,852,589 | null | 11 | 11,152 | I encounter this error when I'm trying to save my image into database.
What am I doing wrong?

Here's the design of my table:

I'm using Microsoft Server 2008.
| How to save Image to a Database? | CC BY-SA 2.5 | 0 | 2011-01-31T15:20:37.317 | 2018-08-30T15:08:38.657 | 2011-01-31T15:23:54.633 | 60,761 | 396,335 | [
"c#",
"winforms"
]
|
4,852,573 | 1 | null | null | 6 | 44,056 | How can i add title to this custom dialog??

I have tried like this
```
public void customDialog()
{
Dialog dialog=new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
dialog.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.string.app_name );
dialog.setContentView(R.layout.dialog_submit);
TextView edit_model=(TextView) dialog.findViewById(R.id.edit_model);
edit_model.setText(android.os.Build.DEVICE);
dialog.show();
}//end of custom dialog function
```
I have tried to set title like this too..`dialog.setTitle("Enter Details");` but this too didn't yielded any result. So how can i set title to this custom dialog??
This is my dialog_submit.xml file used for the custom dialog.
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_root"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
>
<TextView android:id="@+id/txt_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFF"
android:text="Name"
android:textStyle="bold"
/>
<EditText android:id="@+id/edit_name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/txt_name"
/>
<TextView android:id="@+id/txt_model"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFF"
android:layout_below="@+id/edit_name"
android:text="Phone Model"
/>
<TextView android:id="@+id/edit_model"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/txt_model"
/>
<Button android:id="@+id/but_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/edit_model"
android:text="Cancel"
/>
<Button android:id="@+id/but_submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/edit_model"
android:layout_toRightOf="@+id/but_cancel"
android:text="Submit"
/>
</RelativeLayout>
```
| How to add title to the custom Dialog? | CC BY-SA 2.5 | 0 | 2011-01-31T15:22:24.140 | 2017-06-09T07:34:39.193 | null | null | 466,474 | [
"android",
"dialog"
]
|
4,852,622 | 1 | 4,855,647 | null | 4 | 31,180 | I have a schema that i have "flattened" using XML Editor. After i flatten it i get a validation error. What can i do to fix it?
Error Message:
> F [Xerces] Element or attribute do not
match QName production:
QName::=(NCName':')?NCName.
code:
```
<xs:import namespace="http://www.opengis.net/gml"
schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"
xmlns:="http://www.opengis.net/gml/3.1.1" />
<xs:annotation xmlns:="http://www.opengis.net/sps/1.0">
<xs:documentation>
<copyright> SPS is an OGC Standard. Copyright (c)
2007,2010 Open Geospatial Consortium, Inc. All Rights Reserved. To
obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
</copyright>
</xs:documentation>
</xs:annotation>
```
Here's a screenshot that might better illustrate my error:

EDIT:
> Remove the colon somehow. What exactly
does this "flattening" supposed to do?
The flattening of the xsd takes an [xsd](http://schemas.opengis.net/sps/1.0.0/spsAll.xsd) with a lot of includes and puts it all into one file (without any includes).
| Element or attribute do not match QName production | CC BY-SA 2.5 | null | 2011-01-31T15:28:33.677 | 2019-05-25T16:25:47.500 | 2011-01-31T15:36:23.333 | 442,580 | 442,580 | [
"xml",
"soap",
"xsd",
"xml-validation",
"ogc"
]
|
4,852,785 | 1 | 4,855,199 | null | 1 | 1,827 | I wanted to have a background image and two panels atop them. Learnt that JLayeredpane's are quite suitable. So I extended a JLayeredPane in my class and tried to draw the image from paint(). I got it working. But when I added other layers over it they weren't visible.
Again I thought of removing the bgimage from LayeredPane, added to the first layer above it(in JPanel). Now the image is not visible. Why does it happen? I wanted to do some thing like the screenshot I've provided. Pls help.
My code:
From my JFrame:
```
Container cp = this.getContentPane();
JLayeredPane backDropPanel = new JLayeredPane();
cp.add(backDropPanel,BorderLayout.CENTER);
backDropPanel.add(new bgPanel(), new Integer(1),0);
backDropPanel.add(new itemScrollerPanel(), new Integer(1),0);
```
Panel's:
```
class bgPanel extends JPanel{
String imageLocation = "/home/phantom/Desktop/BackDrop3.jpg";
private Image bgImage;
bgPanel(){
bgImage = new ImageIcon(imageLocation).getImage();
setPreferredSize(new Dimension(800,500));
setLayout(null);
setOpaque(true);
}
public void paint(Graphics g){
super.paint(g);
g.drawImage(bgImage,0,0,this);
}}
class itemScrollerPanel extends JPanel{
itemScrollerPanel(){
setBounds(0,100,200,200);
setBackground(Color.RED);
setOpaque(true);
}}
```
In this code I get to see the itemsScrollerPanels's RED BG drawn. But not the image of bgPanel class.
My requirement is something like this:

| Layering JPanels with background image | CC BY-SA 2.5 | null | 2011-01-31T15:45:09.693 | 2011-02-01T02:39:04.437 | null | null | 1,125,645 | [
"java",
"swing"
]
|
4,852,839 | 1 | 4,852,925 | null | 4 | 21,542 | I have a problem with my text area.
I use `jTextArea1.append("cleverly amusing");` to add the text..
FIRST APPEND:

then I use `jTextArea1.append("a fight");` to add the next text.
SECOND APPEND

What I Really want is to replace the "cleverly amusing" to "a fight". But I cannot do it. I tried to use the `jTextArea1.removeAll();` but there's no effect. How can I remove the "cleverly amusing" so that I can append the "a fight" to the first line.
NOTE: "WORD HINT" is fixed...
What can I do?
| Appending text in Java's JTextArea | CC BY-SA 3.0 | 0 | 2011-01-31T15:49:07.553 | 2015-01-28T19:34:12.100 | 2015-01-28T19:34:12.100 | 3,885,376 | 525,965 | [
"java",
"swing",
"jtextarea"
]
|
4,852,955 | 1 | 4,852,982 | null | 1 | 1,653 | I'm trying to send a simple text email using [commons email](http://commons.apache.org/email/userguide.html)
```
Email email = new SimpleEmail();
email.setHostName("smtp.gmail.com");
email.setSmtpPort(587);
email.setAuthenticator(new DefaultAuthenticator("[email protected]", "123456"));
email.setTLS(true);
email.setFrom(from);
email.setSubject(subject);
email.setMsg(mesage);
email.addTo("[email protected]");
email.send();
```
But when I try to send the email ,I get this exception:

Am I missing something?
| Problem sending mail with Apache Commons email | CC BY-SA 2.5 | 0 | 2011-01-31T15:57:02.620 | 2011-01-31T16:00:37.507 | 2011-01-31T16:00:37.507 | 21,234 | 530,911 | [
"java",
"jakarta-mail",
"apache-commons"
]
|
4,853,044 | 1 | 4,853,194 | null | 0 | 3,115 | I want to make my TextArea's background opaque. I'm using swing gui forms at netbeans.
I want to overlap the instructions infront of the image ([see this picture](https://i.stack.imgur.com/WDr5x.jpg)), but the problem is texts can't be seen if they are infront of the image. I really don't know if the not opaque background is the problem here (I've use the layered pane to have a JLabel where the picture was located and overlapping the TextArea where i placed my instructions).
Can you help me figure out what the problem is?

here's the code:
```
import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
public class About extends javax.swing.JDialog {
public About(JFrame owner) {
super(owner, true);
initComponents();
setSize(500, 500);
setLocation(300, 120);
getContentPane().setBackground(Color.getHSBColor(204, 204, 255));
jLabel1.setIcon(new ImageIcon("HangmanStartlight.jpg"));
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jTabbedPane1 = new javax.swing.JTabbedPane();
jLayeredPane1 = new javax.swing.JLayeredPane();
jLabel1 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jLabel1.setText("jLabel1");
jLabel1.setBounds(0, 0, 420, 290);
jLayeredPane1.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);
jTextArea1.setColumns(20);
jTextArea1.setFont(new java.awt.Font("Microsoft Sans Serif", 1, 14)); // NOI18N
jTextArea1.setForeground(new java.awt.Color(51, 0, 51));
jTextArea1.setRows(5);
jTextArea1.setText("Hangman\n\nGuess the \"HIDDEN PHRASE\" to proceed to the next\nlevel. Hangman is filled with several words, \npresented in random order each time you play.\n\nhOw To pLay!!!\n\nYou can select letters by clicking on the letter buttons\nshown at the window.\n\nBe very careful! 'coz you are only allowed 10 wrong\nguesses per puzzle.\n\nYou will at the corner Top-Left of the window your \n\"Name\", your \"Score\", your \"Level\", your \"Lives Left\"\nand also the \"Life Line\" which you can use as a Hint.\n\nEnjoy Playing and Have Fun :)");
jTextArea1.setWrapStyleWord(true);
jScrollPane1.setViewportView(jTextArea1);
jScrollPane1.setBounds(0, 0, 420, 280);
jLayeredPane1.add(jScrollPane1, javax.swing.JLayeredPane.DEFAULT_LAYER);
jTabbedPane1.addTab("tab1", jLayeredPane1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(26, 26, 26)
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 427, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(39, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(21, 21, 21)
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(128, Short.MAX_VALUE))
);
pack();
}// </editor-fold>
// Variables declaration - do not modify
private javax.swing.JLabel jLabel1;
private javax.swing.JLayeredPane jLayeredPane1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTabbedPane jTabbedPane1;
private javax.swing.JTextArea jTextArea1;
// End of variables declaration
}
```
p.s. i am using swing builder/ swing gui forms..
| Make background of TextArea opaque | CC BY-SA 2.5 | null | 2011-01-31T16:03:54.787 | 2011-02-01T08:27:48.380 | 2011-02-01T08:27:48.380 | 83,075 | 528,125 | [
"java",
"swingbuilder",
"swing-app-framework"
]
|
4,853,090 | 1 | 5,428,461 | null | 3 | 1,882 | I'm using the SliderDrawer in Android. Inside the drawer I have a layout which contains a inflated layout. Here's the end result:

Notice how the content of the drawer (in gray) doesn't take the whole width of the parent (black area).
Here's the drawer code (main_layout.xml):
[UPDATE 2, added the whole code:]
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/banner" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:gravity="center" android:padding="3px">
<ImageView android:src="@drawable/title"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:layout_width="wrap_content" android:text="@string/title"
android:layout_height="wrap_content" android:textSize="18sp"
android:gravity="center_vertical" android:paddingLeft="4px"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout android:layout_below="@id/banner" android:id="@+id/middle" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<View android:layout_width="fill_parent" android:layout_height="1dip"
android:background="#FF555555" />
<ListView android:id="@android:id/list" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:padding="3px"
android:layout_weight="1" />
<TextView android:id="@android:id/empty" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:text="@string/no_items"
android:padding="3px" android:layout_weight="1" />
</LinearLayout>
<LinearLayout android:id="@+id/LinearLayout01" android:layout_alignParentBottom="true"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:gravity="center_horizontal|bottom">
<SlidingDrawer android:id="@+id/drawer" android:background="#22222222"
android:layout_height="110dip" android:handle="@+id/handle"
android:content="@+id/media_player_container" android:layout_width="fill_parent">
<ImageView android:id="@+id/handle" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:src="@drawable/tray" android:scaleType="centerCrop"/>
<LinearLayout android:id="@+id/media_player_container"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:gravity="bottom|center_horizontal" />
</SlidingDrawer>
</LinearLayout>
</RelativeLayout>
```
Here's the code of the inflated area (media_player_container.xml):
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="bottom|center_horizontal" android:orientation="vertical" android:background="#FF555555" android:padding="3px">
<SeekBar android:id="@+id/progress" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingBottom="3px" android:progress="1000" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<ImageButton android:id="@+id/speakerhandset" android:src="@drawable/handset" android:layout_width="60dip" android:layout_height="wrap_content" android:scaleType="center"/>
<ImageButton android:id="@+id/rewind" android:src="@android:drawable/ic_media_rew" android:layout_width="60dip" android:paddingRight="3px" android:layout_height="wrap_content" android:scaleType="center"/>
<ImageButton android:id="@+id/play" android:src="@android:drawable/ic_media_play" android:layout_width="60dip" android:paddingRight="3px" android:layout_height="wrap_content" android:scaleType="center"/>
<ImageButton android:id="@+id/pause" android:src="@android:drawable/ic_media_pause" android:layout_width="60dip" android:paddingRight="3px" android:layout_height="wrap_content" android:visibility="gone" android:scaleType="center"/>
<ImageButton android:id="@+id/fastforward" android:src="@android:drawable/ic_media_ff" android:layout_width="60dip" android:paddingRight="3px" android:layout_height="wrap_content" android:scaleType="center"/>
</LinearLayout>
</LinearLayout>
```
Can you spot what I'm doing wrong??
[Update 1] Here's the code (inside onCreate()) where I inflate the layout:
```
LinearLayout container = (LinearLayout) this.findViewById(R.id.media_player_container);
LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LinearLayout layout = (LinearLayout) layoutInflater.inflate(R.layout.media_player, null, false);
container.addView(layout);
```
| Layout issue: SliderDrawer doesn't fill parent width | CC BY-SA 2.5 | 0 | 2011-01-31T16:08:45.807 | 2013-06-19T22:47:11.790 | 2011-03-24T20:34:46.387 | 442,512 | 442,512 | [
"android",
"android-layout"
]
|
4,853,364 | 1 | 4,853,658 | null | 2 | 2,985 | I want to customize the color of my tabbedPane to fit at the theme of my gui, but I don't know how to do it. I've tried lots of code but still nothing happens.
Here's my gui...

thnx in advance ^_^
| How can I customize the color of the tabbedPane at swing builder? | CC BY-SA 2.5 | 0 | 2011-01-31T16:31:27.910 | 2014-07-03T10:12:58.223 | 2011-01-31T16:35:07.847 | 226,476 | 528,125 | [
"java",
"swingbuilder",
"swing-app-framework"
]
|
4,853,380 | 1 | 4,853,797 | null | 2 | 2,006 | I am trying to bind a list of items to an `ItemsControl`, using a `Canvas` layout, where the item has multiple "levels". This is easiest to explain using an image:

My lower level is a drop-shadow in this case. Because I assumed the drop shadow would be attached to the main element (a `Button`), I created another visual element, a Border, which sits behind the Button and has the shadow attached. What I would like is for all of my shadow elements to be at the same overall `ZIndex`, and all of the Button elements to be above them.
In practice, it appears that WPF renders the contents of my template as a single UI element, essentially flattening the `ZIndex`es within it. Is there any way I can make it so that the `ZIndex` values are not flattened?
I have created a sample below which shows the problem:
```
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="250" Width="600" Background="White">
<Window.Resources>
<DropShadowEffect Color="Blue" BlurRadius="75" x:Key="ActionDropShadow" />
<XmlDataProvider x:Key="myData" XPath="Data/Items">
<x:XData>
<Data xmlns="">
<Items>
<Item X="50" Title="AAA" />
<Item X="100" Title="BBB" />
<Item X="150" Title="CCC" />
</Items>
</Data>
</x:XData>
</XmlDataProvider>
<DataTemplate x:Key="BoxTemplate">
<Grid>
<Border Background="Black" BorderThickness="1" Effect="{StaticResource ActionDropShadow}" />
<Button Background="White" BorderThickness="1">
<TextBlock Text="{Binding XPath=@Title}" />
</Button>
</Grid>
</DataTemplate>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ItemsControl Grid.Column="0" x:Name="list" ItemTemplate="{StaticResource BoxTemplate}" ItemsSource="{Binding Source={StaticResource myData},XPath=*}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle>
<Style TargetType="ContentPresenter">
<Setter Property="Canvas.Left" Value="{Binding XPath=@X}" />
<Setter Property="Canvas.Top" Value="50" />
<Setter Property="Width" Value="50" />
<Setter Property="Height" Value="80" />
</Style>
</ItemsControl.ItemContainerStyle>
</ItemsControl>
<Canvas Grid.Column="1">
<Border Panel.ZIndex="5" Canvas.Top="50" Canvas.Left="50" Width="50" Height="80" Background="Black" BorderThickness="1" Effect="{StaticResource ActionDropShadow}" />
<Button Panel.ZIndex="10" Canvas.Top="50" Canvas.Left="50" Width="50" Height="80" Background="White" BorderThickness="1">
<TextBlock Text="AAA" />
</Button>
<Border Panel.ZIndex="5" Canvas.Top="50" Canvas.Left="100" Width="50" Height="80" Background="Black" BorderThickness="1" Effect="{StaticResource ActionDropShadow}" />
<Button Panel.ZIndex="10" Canvas.Top="50" Canvas.Left="100" Width="50" Height="80" Background="White" BorderThickness="1">
<TextBlock Text="BBB" />
</Button>
<Border Panel.ZIndex="5" Canvas.Top="50" Canvas.Left="150" Width="50" Height="80" Background="Black" BorderThickness="1" Effect="{StaticResource ActionDropShadow}" />
<Button Panel.ZIndex="10" Canvas.Top="50" Canvas.Left="150" Width="50" Height="80" Background="White" BorderThickness="1">
<TextBlock Text="CCC" />
</Button>
</Canvas>
<TextBlock Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center">Databinding Version</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center">What it should look like</TextBlock>
</Grid>
</Window>
```
Thanks in advance for any ideas you can offer!
| Setting Z-Index in DataBound items on a Canvas | CC BY-SA 3.0 | 0 | 2011-01-31T16:32:39.230 | 2013-09-25T21:55:14.623 | 2013-09-25T21:55:14.623 | 305,637 | 163,495 | [
"wpf",
"data-binding",
"canvas",
"z-index"
]
|
4,853,553 | 1 | 5,110,786 | null | 2 | 851 | I've got a C# 3.0 Windows Forms app built with VS2008 (previously ported from C# 1.1) that looks fine on a WinXP 32bit PC but has jacked proportions on Win7 64bit laptop.
I'm finding references to the lack of support on Win7 for Tahoma 8, which the app uses. Do I need to redesign my dialog using Tahoma 9 to get it to display well on all 3 OSes?
Here are my initial measurements (cm) of a group box containing radio buttons and a button:
OS, Resolution, GroupBox HxW, RadioButton HxW
XP, 1024 x 768, 7.5 x 6.75, 0.75 x 4.4


7, 1024 x 768, 6.8 x 6.3, 0.8 x 5.0
7, 1680 x 1050, 4.9 x 4.5, 0.55 x 3.5


The problem is basically that on the different OS's, the group box has its proportions changed differently than the radios it contains, such that radios and labels that fit fine in the group box in XP run out of bounds (both x & y axis) on 7. Similarly, the text on the button grew more than the button. This happens even when I dial down the 7 box's resolution to match the XP box. The GroupBox's font is larger than that of the radios, but even when I made them equal I saw no improvement.
I think it has something to do with the fact that the application was originally created with an older version of C# and then ported. I say this because I just created a new (empty) Windows forms project using VS2008, and for every control in my app that isn't displaying correctly on win7, when I copy that control to the new app and run it on win7 it resizes correctly. There must be some high level property in the app that the controls are inheriting.
What causes this and what can I do about it?
Thanks in advance.
| Windows Forms App Has Bad Proportions on Windows 7 | CC BY-SA 2.5 | null | 2011-01-31T16:46:56.840 | 2011-02-24T21:37:19.270 | 2011-02-24T16:39:44.320 | 180,395 | 180,395 | [
"winforms",
"graphics",
"windows-7",
"c#-3.0",
"windows-xp"
]
|
4,853,874 | 1 | 4,854,005 | null | 4 | 3,569 | In Eclipse you can change your simulated location using the Emulator Control view (Window > Show View > Other... > Android > Emulator Control).
Image:

Where can I find this view/tab in IntelliJ?
PS. I know that I can use DDMS, but I wonder if there is a tab in IntelliJ, like there is in Eclipse.
| Where is Emulator Control View in IntelliJ? | CC BY-SA 2.5 | null | 2011-01-31T17:17:15.097 | 2012-11-29T21:10:26.453 | 2011-01-31T17:27:19.793 | 437,039 | 437,039 | [
"android",
"intellij-idea"
]
|
4,854,079 | 1 | 4,854,523 | null | 7 | 2,803 | I have a Grid which has several children, one of which is a ScrollViewer. I want the Grid to size itself based on all of its children the ScrollViewer, which I want to just take up the space that is created by sizing the Grid for the rest of its children. (For example, the Grid is 2x2 and the ScrollViewer is in Row 0, Column 0, and so the other three Grid entries are enough to determine the dimensions of the Grid.)
Is there a nice way to do this? I've looked into creating a Custom Panel either to replace the Grid or to contain the ScrollViewer, but at no point during the MeasureOverride/ArrangeOverride calls do I ever get a call which can tell me about the final width/height of the grid row/column I care about (eg, Row 0, Column 0).
One thought I had was to derive from Grid and call the base MeasureOverride/ArrangeOverride but remove the ScrollViewer from the Children of the Grid right before the call (and put it back afterwards), but messing with the visual tree during layout computation seems like a bad idea.
Here's an example:
```
<Grid x:Name="LayoutRoot" Background="White">
<Grid VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ScrollViewer Grid.Row="0" Grid.Column="0" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
<Button Height="300" Width="300"/>
</ScrollViewer>
<Button Grid.Row="1" Grid.Column="0" Height="100" Width="100" Content="1,0"/>
<Button Grid.Row="0" Grid.Column="1" Height="100" Width="100" Content="0,1"/>
<Button Grid.Row="1" Grid.Column="1" Height="100" Width="100" Content="1,1"/>
</Grid>
</Grid>
```
I would like the size of the Grid to not change as the size of the Button in the ScrollViewer changes - e.g., I want the Grid to give the ScrollViewer the 100x100 square that is determined by the rest of the Grid's contents. And if I changed each of the 3 100x100 buttons to be 200x200, I would want the ScrollViewer to get 200x200, etc.
Pavlo's example gets me the closest so far, with the Grid rows/columns appropriately sized, but ScrollViewer does not adapt to the Size given to it when Arrange is called. See below:

| Make WPF/SL grid ignore a child element when determining size | CC BY-SA 2.5 | 0 | 2011-01-31T17:37:00.813 | 2018-05-04T17:02:53.180 | 2011-01-31T19:30:03.250 | 387,837 | 387,837 | [
"wpf",
"silverlight",
"layout",
"grid"
]
|
4,854,269 | 1 | null | null | 0 | 657 | I place the editor in a small iframe (the size is just as big as the editor).In FCkeditor 2.x,the dialog will float in the parent.But in new Ckeditor,It is just float in the iframe ,that cannot displayed completely.
How can I make the dialog float in the parent just like 2.x?
tanks

| Ckeditor in Small IFrame | CC BY-SA 2.5 | null | 2011-01-31T17:56:33.013 | 2013-02-01T06:13:32.000 | 2013-02-01T06:13:32.000 | 1,939,046 | 590,967 | [
"javascript",
"iframe",
"ckeditor",
"fckeditor"
]
|
4,854,601 | 1 | null | null | 9 | 19,102 | I want to remove the built in separation between cells in UITableView.
I tried using :
```
[self.myTableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
```
But that only removes the separator line.
I need the view to appear as if it's not a table view at all. (like the tableview is one big view who doesn't contain many separated cells)
Is that possible ?
See the separation between the cells? I wan't it to disappear and the table view to be as if it's one big cell.

The problem doesn't appear when I don't use an image view as the cell background, but just use a simple background color.
I tried using a different image, and as you can see the problem is much less obvious.
I would still appreciate a solution for the red image though, since I do have a lot of images that still can't be put as background currently. (Not sure why one image would cause the problem and other won't ,I guess something with the pic setting)

| How to remove separation between UITableView cells | CC BY-SA 2.5 | 0 | 2011-01-31T18:31:25.190 | 2016-08-03T04:16:04.727 | 2011-02-01T11:00:26.867 | 215,769 | 215,769 | [
"iphone",
"objective-c",
"ios4",
"uitableview"
]
|
4,854,749 | 1 | 4,936,691 | null | 4 | 391 |

I'm working on a website that has physical folder structure. Nothing had been planned or controlled and there were about 4 consecutive webmasters.
Here is an example of an especially ugly directory
- `\new\new\pasite-new.asp`
most pages are stored in a folder with the same name as the file, for maximum redundancy.
- `\New\10cap\pasite-10cap.asp`- `\QL\Address\PAsite-Address.asp`
each of these [page directories]? (I don't know what else to call them) has an `include` folder, the include folder contains the same `*.inc` files in every case, just copied about 162 times for each page directory. The include folder was duplicated so that the
`<!--#include file="urlstring"-->` would work correctly due to lack of understanding of relative paths, and the `#inclue virtual directive` or using `server.execute()`
Here is a picture if my explanation was lacking.

---
- - - -
---
What changes can I make that would allow me to move pages around and rename them while not breaking incoming links from external sites that still use the poorly formed URLs?
How can I move the file `10cap.asp` from `\new\10cap\` to a better location like `\` and rename the file to someting like `saveourhomescap.asp` and not break any incoming links and finally, not have to leave a dummy `10cap.asp` page in the original location with a redirect to the new page.
| How to move pages around and rename them while not breaking incoming links from external sites that still use the poorly formed URLs | CC BY-SA 2.5 | null | 2011-01-31T18:48:58.107 | 2011-11-19T05:18:06.220 | 2011-11-19T05:18:06.220 | 50,776 | 564,083 | [
"iis",
"asp-classic",
"url-rewriting"
]
|
4,854,839 | 1 | 4,889,862 | null | 13 | 3,735 | i'm trying to apply a box blur to an transparent image, and i'm getting a "dark halo" around the edges.
Jerry Huxtable [has a short mention of the problem](http://www.jhlabs.com/ip/blurring.html), and a very good demonstration showing the problem happen:

But i, for the life of me, cannot understand how "" can fix the problem. Now for a very simple example. i have a 3x3 image, containing one red and one green pixel:

In reality the remaining pixels are transparent:

Now we will apply a 3x3 Box Blur to the image. For simplicities sake, we'll only calculate the new value of the center pixel. The way a box blur works is that since we have a 9 position square (3x3, called the kernel) we take 1/9th of each pixels in the kernel, and add it up:

So
```
finalRed = 1/9 * red1 + 1/9 * red2 + 1/9 * red3+ ... + 1/9 * red9
finalGreen = 1/9*green1 + 1/9*green2 + 1/9*green3+ ... + 1/9*green9
finalBlue = 1/9* blue1 + 1/9* blue2 + 1/9* blue3+ ... + 1/9* blue9
finalAlpha = 1/9*alpha1 + 1/9*alpha2 + 1/9*alpha3+ ... + 1/9*alpha9
```
In this very simplified example, the calculations become very simple:
```
finalRed = 1/9 * 255
finalGreen = 1/9 * 255
finalBlue = 0
finalAlpha = 1/9*255 + 1/9*255
```
This gives me a final color value of:
```
finalRed = 28
finalGreen = 28
finalBlue = 0
finalAlpha = 56 (22.2%)
```

This color is too dark. When i perform a 3px Box blur on the same 3x3 pixel image in Photoshop, i get what i expect:

Which is clearer when displayed over white:

---
In reality i'm performing a box blur on a bitmap containing transparent text, and the text gains the tell-tale dark around the fringes:

i'm starting with a GDI+ Bitmap that is in `PixelFormat32bppARGB` format
---
How do i use "pre-multiplied alpha" when applying 3x3 convolution kernel?
Any answer will have to include new forumla, since:
```
final = 1/9*(pixel1+pixel2+pixel3...+pixel9)
```
Is getting me the wrong answer.
---
A simpler example is:
i'll perform this math with color and alpha values in the range of 0..1:

i'm going to apply the box blur convolution filter to the middle pixel:
```
ARGB'
= 1/9 * (0,1,0,1) + 1/9 * (0,0,0,0) + 1/9 * (0,0,0,0) +
1/9 * (0,1,0,1) + 1/9 * (0,0,0,0) + 1/9 * (0,0,0,0) +
1/9 * (0,1,0,1) + 1/9 * (0,0,0,0) + 1/9 * (0,0,0,0);
= (0, 0.11, 0, 0.11) + (0,0,0,0) + (0,0,0,0) +
(0, 0.11, 0, 0.11) + (0,0,0,0) + (0,0,0,0) +
(0, 0.11, 0, 0.11) + (0,0,0,0) + (0,0,0,0)
= (0, 0.33, 0, 0.33)
```
Which gives a fairly transparent dark green.

Which is not what i expect to see. And by comparison Photoshop's Box Blur is:

If i assume `(0, 0.33, 0, 0.33)` is pre-multiplied alpha, and un-multiply it, i get:
```
(0, 1, 0, 0.33)
```

Which looks right for my all-opaque example; but i don't know what to do when i begin to involve partially transparent pixels.
## See also
- [Texture filtering: Alpha cutouts](http://blogs.msdn.com/b/shawnhar/archive/2009/11/02/texture-filtering-alpha-cutouts.aspx)- [Premultiplied alpha](http://blogs.msdn.com/b/shawnhar/archive/2009/11/06/premultiplied-alpha.aspx)
| How to use pre-multiplied during image convolution to solve alpha bleed problem? | CC BY-SA 2.5 | 0 | 2011-01-31T18:57:03.390 | 2022-09-18T15:59:40.857 | 2011-02-10T19:02:30.067 | 12,597 | 12,597 | [
"image-processing",
"alphablending",
"convolution",
"premultiplied-alpha"
]
|
4,855,150 | 1 | 4,856,454 | null | 1 | 221 | I'm having a very bizarre issue. I have been building a website locally on my linux box and all was well until I uploaded the site files to a place where i have some hosted space. Everything renders exactly the same except one element in my footer which i think is affecting some jquery animation i am using. I thought maybe I was missing files or hadn't uploaded the latest versions of everything, so I deleted the server directory and re-uploaded everything exactly as is from my local copy. And yet, the problem remains. I'm not sure how this is happening. Has anyone seen this before, or does anyone have an idea what could cause this? I'm baffled! Thanks everyone!!! I am attaching screen shots.


| Website renders differently on server vs locally | CC BY-SA 2.5 | null | 2011-01-31T19:32:21.090 | 2011-01-31T21:41:46.670 | null | null | 579,083 | [
"linux",
"web",
"local",
"html-rendering"
]
|
4,855,574 | 1 | 4,865,435 | null | 0 | 1,209 | I am in the process of debugging a routing issue on my MVC 3 application and I am using Phil Hacks routing debugger.
I cannot seem to work out where the route highlighted in yellow below is originating. Each time I run my application with the following request
[http://www.mywebsite.com/auth/login?ReturnUrl=/](http://www.mywebsite.com/auth/login?ReturnUrl=/)
this route comes first and then gives me a 404 error as I do not have an index action. As you can see I have set my default routes to use the Login action method but still this route persists.

I have the following route configurations:
AuthAreaRegistration
```
public class AuthAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Auth";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"login",
"auth/login/{*returnPath}",
new { controller = "Auth", action = "LogIn", id = UrlParameter.Optional }
);
context.MapRoute(
"Auth_default",
"Auth/{controller}/{action}/{id}",
new { controller = "Auth", action = "LogIn", id = "" }
);
}
}
```
Global.asax (Using T4 MVC Templates)
```
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Home",
"{controller}/{action}/{id}",
MVC.Home.Index(), new { id = UrlParameter.Optional },
new string[] { "MyNamespace.WebUI.Controllers" }
);
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
MVC.Home.Index(), new { id = UrlParameter.Optional },
new string[] { "MyNamespace.WebUI.Controllers" }
);
}
```
| ASP.NET MVC Area not picking up the correct route | CC BY-SA 2.5 | null | 2011-01-31T20:12:24.860 | 2014-02-11T21:40:45.643 | 2014-02-11T21:40:45.643 | 727,208 | 109,288 | [
"asp.net-mvc",
"asp.net-mvc-2",
"asp.net-mvc-routing"
]
|
4,855,714 | 1 | 4,855,841 | null | 2 | 155 | I'm trying to figure out if there's a better way to structure some code. Although it currently works, it always gets at me due to the complexity and crazy nature that it feels to have with generics constraints. I'd be interested to know if anyone has an idea for a neater solution.
I've included a class diagram to make things a little easier.

This is all going within a library, and I wanted to try and keep all my type safety where I can. The library has 3 layers of increasing complexity. Which I'll explain in a moment.
I'm using Generics to make all the types work. For example a Route is actually a `List<T>` where `T` is a Visit. Now because I've got the 3 layers, I want to be able to access properties on these Visits (and the Nodes that they correspond to) from the Route itself (and to make it easier to consume). So that actually makes a `Route<Visit<Node>>`. Once you add that to a Solution which needs to be strongly typed `Solution<Route<Visit<Node>>>` things get complicated.
This results in some kinda unslightly code:
```
public abstract class Solution<TSolution, TRoute, TVisit, TNode, TResource>
where TSolution : Solution<TSolution, TRoute, TVisit, TNode, TResource>, new()
where TRoute : Route<TRoute, TVisit, TNode, TResource>, new()
where TVisit : Visit<TVisit, TNode>, new()
where TNode : Element<TNode>
where TResource : Resource<TResource>
```
It all works nicely, but I have to define these constraints at each class/level. At each level of complexity I create some simple consumable class such as the following, essentially hiding the generic constraints which would make it impossible to consume.
```
Level1.Solution : Common.Solution<Solution, Route, Visit, Node, Resource>
```
They have also been made recursive based on advice from this [question](https://stackoverflow.com/questions/3626937/how-to-use-inheritance-when-using-generic-constraints) to allow me to extend the class. For example a Level2.Solution will needs to be able to specify a Level2.Route as one of the constraints, normally this won't work (co/contra variance and generics) without the recursion.
All in all, it works, but is a bit cringy to say the least. Anyone have any ideas how this can be re-worked nicely?
| Restructuring Suggestions to remove lots of generic constraints | CC BY-SA 2.5 | null | 2011-01-31T20:27:05.190 | 2020-02-24T21:05:46.313 | 2017-05-23T12:30:36.930 | -1 | 21,061 | [
"c#",
"generics",
"refactoring"
]
|
4,855,782 | 1 | 4,855,913 | null | 8 | 5,549 | jQuery UI features a nice-looking "vertical tabbing" widget to switch between chapters [on its own website.](http://jqueryui.com/demos/tabs/)

Does anybody know whether this builds on some kind of standard widget (you expect that UI's very own "tabs" component is being used for this, but no dice!), or whether it is something custom made? A cursory glance at the code makes me suspect the latter..... This would come in very handy in a project I'm working on.
| Vertical "tab" component on jQuery UI site | CC BY-SA 2.5 | 0 | 2011-01-31T20:35:00.150 | 2011-01-31T21:08:53.377 | null | null | 187,606 | [
"jquery",
"jquery-ui"
]
|
4,855,847 | 1 | 4,856,047 | null | 3 | 1,640 | I've got a very simple image generator program that just draws a rounded rectangle on a BufferedImage and then saves the image to a file.
```
try
{
BufferedImage image = new BufferedImage(40, 40, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = image.createGraphics();
g2.setPaint(Color.blue);
g2.fillRoundRect(0, 0, 39, 39, 6, 6);
File file = new File("C:\\test.png");
ImageIO.write(image, "png", file);
}
catch( IOException e )
{
e.printStackTrace();
}
```
Everything works as expected whenever I draw the rectangle using drawRoundRect:

However, when I use fillRoundRect the rectangle appears to be cropped on the right and bottom sides:

I've tried making the BufferedImage itself larger and keeping the rectangle the same size, but the problem still exists. Also, no matter what rectangular width and height or arc width and height I choose, the 4 corners never look the same (though the larger it gets, the less pronounced it seems to be).
Is this a common problem, or am I perhaps misunderstanding the rounded rectangle?
Any help or suggestions would be much appreciated.
Thanks,
B.J.
| Problem with fillRoundRect seemingly not rendering correctly | CC BY-SA 2.5 | null | 2011-01-31T20:40:56.623 | 2013-06-14T09:02:35.330 | null | null | 108,871 | [
"java",
"image",
"graphics"
]
|
4,855,904 | 1 | null | null | 10 | 1,156 | I recently bought a new computer and am now setting up the tools required for Android application development. I have previously installed the tools on other computers with no problem.
I find now after everything is ready for developing, that when I open an XML file for editing inside Eclipse, I receive an error:

If i close the tab for this XML file and then re-open it, i can edit it as expected. this happens for all XML files in my project. first time opening it there is an error, second time it is working normally.
To troubleshoot a little bit before posting here, i attempting to install different versions of eclipse. 3.4, 3.5, 3.6, all encountering the same error. I even tried installing the tools on different computers with different operating systems: windows 7 and mac os x.
I tried clearing the .metadata folder in my workspace in hopes it was some weird eclipse settings that got out of wack, no luck.
Also, after successfully opening an XML file, my editor looks like this:

I cannot seem to view my layout in its graphical form even while in the Graphical Layout tab.
How can I edit my XML files with no fuss?
- -
| Eclipse IDE with Android - exceptions while opening XML files for the first time | CC BY-SA 2.5 | 0 | 2011-01-31T20:46:16.653 | 2013-05-04T21:26:40.247 | null | null | 416,412 | [
"android",
"eclipse"
]
|
4,856,101 | 1 | 4,856,250 | null | 9 | 8,481 | Im trying to create toast like control based on textview, and i found very strange behavior of textview in case when it have nine patch drawable as background.
This is xml definition:
```
<by.pplware.view.QuickInfo
android:id="@+id/quickinfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:padding="20px"
android:textSize="20px"
android:textStyle="bold"
android:typeface="serif"
android:background="#FFFF0000"
/>
```
this is textview with color background:

this is textview with drawable background :

As i understand, in case of ninepatch background android make padding transparent and use drawable only as background for text. But I want to include padding into area covered with ninepatch background.
Is there any solution for this issue ?
| Padding arround textview with nine patch background have no visual effect | CC BY-SA 3.0 | 0 | 2011-01-31T21:07:00.497 | 2013-02-02T04:15:43.133 | 2013-02-02T04:15:43.133 | 1,281,930 | 318,936 | [
"android",
"textview",
"nine-patch"
]
|
4,856,438 | 1 | 4,857,867 | null | 2 | 1,271 | I am having weird display issues using the jQuery dialog with an iframe in Firefox and IE8.
I have tested the page itself outside of the iframe and the problems are not reproduced, only when inside of the jQuery dialog.

```
$(document).ready(function() {
var img = $('.photoLink');
var imgSrc = img.attr('src');
$('.photoLink').photoDialog({
id: imageID,
onClose: function() {
img.attr('src', imgSrc + '&rand=' + (new Date()).getTime());
}
});
});
$.fn.photoDialog = function(options) {
var defaults = {
autoOpen: false,
title: 'Photo Tool',
minHeight: 560,
minWidth: 540
onClose: function(){}
};
var opts = $.extend(defaults, options);
return this.each(function() {
$this = $(this);
that =$(this);
var $dialog = $('<div>')
.html('<iframe src="' + opts.url + '?sn=' + opts.id + '" width="' + (opts.minWidth - 20) + '" height="' + (opts.minHeight - 20) + '" style="border: none;" scrolling="no"></iframe>')
.dialog({
autoOpen: opts.autoOpen,
title: opts.title,
minHeight: opts.minHeight,
minWidth: opts.minWidth,
modal: true,
close: function() {
opts.onClose.call(that);
}
});
$this.click(function() {
$dialog.dialog('open');
return false;
});
});
};
```
```
<div id="photo_holder" runat="server">
<asp:Image ID="image_photo" style="display: none;" runat="server" />
</div>
```
```
#photo_holder {
position: relative;
float: left;
padding: 10px;
width: 300px;
height: 300px;
}
.portrait { height: inherit; width: auto; }
.landscape { height: auto; width: inherit; }
```
```
$(document).ready(function () {
$('#image_photo').load(function () {
$this = $(this);
if ($this.width() > $this.height()) {
$this.attr('class', 'landscape');
}
else {
$this.attr('class', 'portrait');
}
}).fadeIn('slow');
});
```
The class of the image is set dynamically based on image dimensions.
The image path is set in the code behind, no styling or resizing done.
The images are resized upon upload to be no larger than 300x300.
Display is correct in Chrome and Safari, but in IE and FF for some reason it enlarges the image.
| Image resized when page displayed inside of jQuery Dialog and iFrame | CC BY-SA 2.5 | null | 2011-01-31T21:40:10.237 | 2011-02-01T01:01:50.327 | 2011-01-31T21:49:06.007 | 399,770 | 399,770 | [
"asp.net",
"jquery",
"iframe",
"jquery-ui-dialog"
]
|
4,856,586 | 1 | 4,890,628 | null | 2 | 271 | I am using Visual Studio 2010 to build a web application. When I click bring up the "Modify Style" dialog box to modify the style of an html tag, there are no text boxes to enter values. Is there a fix for this issues. I am using VS2010 on a Windows Server 2003. I do not see any values in the "Modify Style" dialog box. Does anyone know how to fix this?

| vs2010 "Modify Style" Dialog box has no textboxes to enter values | CC BY-SA 2.5 | 0 | 2011-01-31T21:54:50.443 | 2011-06-13T15:31:56.920 | 2011-02-01T19:17:06.427 | 226,550 | 226,550 | [
"html",
"visual-studio-2010",
"stylesheet"
]
|
4,856,777 | 1 | null | null | 0 | 276 | I updated android plug-in in eclipse and after that when I open any layout xml file, it says missing theme, and layout in not showing anything,
from the last combo box I'm choosing Android 2.2 and it starts showing the layout correctly, but again after closing it and reopen it the same problem happens.
I checked manifest file and realized that all the options are active except Theme.

any suggestion?? thanks...
| Android Theme is inactive after update | CC BY-SA 2.5 | null | 2011-01-31T22:16:32.257 | 2011-02-01T12:01:20.110 | 2011-02-01T02:07:04.180 | 536,853 | 536,853 | [
"android",
"themes"
]
|
4,856,804 | 1 | 4,972,669 | null | 6 | 1,855 | I'm trying to override the highlight color of a JXTable based on the value of certain row items. Here's an example where the highlight is green if the row item value has `getNumber() % 2 == 0`.
It works fine for JTable, but for JXTable, it looks like the table cell renderer doesn't work unless the rows in question are selected.
 
```
import java.awt.Color;
import java.awt.Component;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumnModel;
import org.jdesktop.swingx.JXTable;
import ca.odell.glazedlists.BasicEventList;
import ca.odell.glazedlists.EventList;
import ca.odell.glazedlists.SortedList;
import ca.odell.glazedlists.gui.TableFormat;
import ca.odell.glazedlists.swing.EventTableModel;
public class TableRendererExample {
static public enum ItemKey {
NAME("name") {
@Override public String getStringFromItem(Item item) {
return item.getName();
}
},
NUMBER("#") {
@Override public String getStringFromItem(Item item) {
return Integer.toString(item.getNumber());
}
},
PARENT("parent") {
@Override public String getStringFromItem(Item item) {
Item p = item.getParent();
return (p == null) ? null : p.getName();
}
};
final private String name;
ItemKey(String name) { this.name = name; }
public String getName() { return this.name; }
abstract public String getStringFromItem(Item item);
static private ItemKey[] columns = { NAME, NUMBER, PARENT };
static public ItemKey[] getColumns() { return columns; }
}
static public class ItemTableFormat implements TableFormat<Item> {
@Override public int getColumnCount() {
return ItemKey.getColumns().length;
}
@Override public String getColumnName(int col) {
return ItemKey.getColumns()[col].getName();
}
@Override public Object getColumnValue(Item item, int col) {
return ItemKey.getColumns()[col].getStringFromItem(item);
}
}
static class Item {
final private String name;
final private int number;
final private Item parent;
private Item(String name, int number, Item parent) {
this.name=name; this.number=number; this.parent=parent;
}
static public Item create(String name, int number, Item parent) {
return new Item(name, number, parent);
}
public String getName() { return this.name; }
public int getNumber() { return this.number; }
public Item getParent() { return this.parent; }
}
static public void main(String[] args)
{
EventList<Item> items = new BasicEventList<Item>();
Item x1,x2,x3,x4;
x1 = Item.create("foo", 1, null);
items.add(x1);
x2 = Item.create("bar", 2, x1);
items.add(x2);
x3 = Item.create("baz", 1, x1);
items.add(x3);
x4 = Item.create("quux", 4, x2);
items.add(x4);
items.add(Item.create("wham", 3, x3));
items.add(Item.create("blam", 11, x3));
items.add(Item.create("shazaam", 20, x3));
items.add(Item.create("August", 8, x4));
items.add(Item.create("September", 9, x4));
items.add(Item.create("October", 10, x4));
items.add(Item.create("November", 11, x4));
items.add(Item.create("December", 12, x4));
EventList<Item> sortedItems = new SortedList<Item>(items, null);
final EventList<Item> displayList = sortedItems;
doit(new JTable(), "JTable cell renderer", displayList);
doit(new JXTable(), "JXTable cell renderer", displayList);
}
static public void doit(JTable table, String title,
final EventList<Item> displayList)
{
TableFormat<Item> tf = new ItemTableFormat();
EventTableModel<Item> etm =
new EventTableModel<Item>(displayList, tf);
table.setModel(etm);
if (table instanceof JXTable)
{
((JXTable)table).setColumnControlVisible(true);
}
TableColumnModel tcm = table.getColumnModel();
final Color selectedGreen = new Color(128, 255, 128);
final Color unselectedGreen = new Color(224, 255, 224);
TableCellRenderer tcr = new DefaultTableCellRenderer() {
@Override public Component getTableCellRendererComponent(
JTable table, Object value,
boolean isSelected, boolean hasFocus,
int row, int column)
{
Component c = super.getTableCellRendererComponent(
table, value, isSelected, hasFocus, row, column);
Item item = displayList.get(row);
Color color = null;
if (item != null && ((item.getNumber() % 2) == 0))
{
color = isSelected ? selectedGreen : unselectedGreen;
}
if (color == null)
{
color = isSelected
? table.getSelectionBackground()
: table.getBackground();
}
c.setBackground(color);
return c;
}
};
for (int i = 0; i < tcm.getColumnCount(); ++i)
{
tcm.getColumn(i).setCellRenderer(tcr);
}
JPanel panel = new JPanel();
panel.add(new JScrollPane(table));
JFrame frame = new JFrame(title);
frame.getContentPane().add(panel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
frame.pack();
}
}
```
| Swing: table cell rendering doesn't work right for JXTable? | CC BY-SA 2.5 | 0 | 2011-01-31T22:20:43.067 | 2011-02-11T18:27:54.907 | null | null | 44,330 | [
"swing",
"tablecellrenderer",
"jxtable"
]
|
4,856,903 | 1 | 4,857,353 | null | 2 | 6,457 | I've got a combo box like this:
```
<mx:ComboBox dataProvider="{someArrayCollection}" />
```
But when the contents of `someArrayCollection` change, it leaves the combo box too small:

How can I trick the combo box into automatically resizing to fit the label of the largest item?
| Flex: Make ComboBox dynamically resize so that it will always fit its contents? | CC BY-SA 2.5 | null | 2011-01-31T22:34:20.400 | 2011-12-23T14:49:30.600 | null | null | 71,522 | [
"apache-flex",
"combobox"
]
|
4,857,312 | 1 | 4,859,964 | null | 1 | 1,931 | I have an item in which has two states, best described as open and closed, and they look like this:

and

And what I'd like to do is is smooth the transition between one state and the other, effectively by interpolating between the two points in a smooth manner (sine) to move the footer/button-block and then fade in the pie chart.
However this is apparently beyond me and after wrestling with my inability to do so for an hour+ I'm posting it here :D
So my transition block looks as follows
```
<s:transitions>
<s:Transition id="TrayTrans" fromState="*" toState="*">
<s:Sequence>
<s:Move duration="400" target="{footer}" interpolator="{Sine}"/>
<s:Fade duration="300" targets="{body}"/>
</s:Sequence>
</s:Transition>
<s:Transition>
<s:Rotate duration="3000" />
</s:Transition>
</s:transitions>
```
where `{body}` refers to the pie chart and `{footer}` refers to the footer/button-block.
However this doesn't work so I don't really know what to do...
Additional information which may be beneficial:
The body block is always of fixed height (perhaps of use for the Xby variables in some effects?).
It needs to work in both directions.
Oh and the `Sine` block is defined above in declarations just as `<s:Sine id="Sine">`.
Additionally! How would I go about setting the pie chart to rotate continually using these transition blocks? (this would occur without the labels on) Or is that the wrong way to go about it as it's not a transition as such?
The effect I'm after is one where the pie chart rotates slowly without labels prior to a selection of a button below, but on selection the rotation stops and labels appear...
Thanks a lot in advance!
And apologies on greyscale, but I can't really decide on a colour scheme. Any suggestions welcome.
| How should I smooth the transition between these two states in flex/flashbuilder | CC BY-SA 2.5 | null | 2011-01-31T23:28:16.813 | 2011-02-26T15:42:00.063 | null | null | 436,336 | [
"apache-flex",
"actionscript-3",
"flex4",
"mxml",
"transitions"
]
|
4,857,336 | 1 | 4,857,427 | null | 6 | 2,313 | I have a production ruby sinatra app running on nginx/passenger, and I frequently see requests get inexplicably stalled. I wrote a script to call passenger-status on my cluster of machines every ten seconds and plot the results on a graph. This is what I see:

The blue line shows the global queue waiting spiking constantly to 60. This is an average across 4 machines, so when the blue line hits 60, it means every machine is maxed out. I have the current passenger_max_pool_size set to 20, so it's getting to 3x the max pool size, and then presumably dropping subsequent requests.
My app depends on two key external resources - an Amazon RDS mysql backend and a Redis instance. Perhaps one of these is periodically becoming slow or unresponsive and thereby causing this behavior?
Can anyone advise me on how to get a stack trace to see if the bottleneck here is Amazon RDS, Redis, or something else?
Thanks!
| How to get a stack trace on all running ruby threads on passenger | CC BY-SA 2.5 | 0 | 2011-01-31T23:30:40.913 | 2016-04-01T12:42:58.650 | 2011-01-31T23:41:00.360 | 61,072 | 61,072 | [
"ruby",
"redis",
"passenger"
]
|
4,858,419 | 1 | 4,858,473 | null | 0 | 84 | I want to create an optimized structure for following output in HTML.

rite now i m using this structure :
```
<div>
<div style="float:left; padding:5px;">
<img src="avatar_url">
</div>
<div style="float:left; padding:5px;">
Name <br />
Current Mood
</div>
<div class="clr"></div>
<div align="right">
Online Status
</div>
</div>
```
but in some cases i have to display thousands of friends on one single page thats why i m trying to optimize the structure and remove unnecessary tags from the code.
| HTML: Optimize way to display friends | CC BY-SA 2.5 | null | 2011-02-01T02:56:21.097 | 2011-02-01T04:46:10.283 | 2011-02-01T04:46:10.283 | 479,863 | 547,573 | [
"xhtml",
"html"
]
|
4,858,424 | 1 | 4,858,478 | null | 4 | 1,660 | Trying to get html5 videos working and running into a color problem.
(For those interested, there's [also this problem](https://stackoverflow.com/questions/4847924/html-5-webm-conversion-output-has-green-area-on-the-right))
Chrome renders videos slightly differently than other browser.
On safari & firefox the background is nice and white. On chrome it's a washed off beige.
See compared screenshots:

It doesn't matter which codec is used - Chrome reads m4v, ogg and webm fine - but they all render washed off..
Can't seem to be able to correct this.
Any idea?
| html 5- Videos - White is washed off in Chrome | CC BY-SA 2.5 | 0 | 2011-02-01T02:57:12.903 | 2011-11-10T01:13:17.723 | 2017-05-23T10:30:21.840 | -1 | 192,705 | [
"html",
"video",
"google-chrome"
]
|
4,858,734 | 1 | 4,867,455 | null | 7 | 14,458 | I am having issues attempting to replicate a chart that has been generated in Microsoft Excel 2007 by using the Microsoft Chart Control for .Net
The chart is showing the TOP 5 entries for each Month (each month could have a different 5 entries) of the year and then showing a breakdown of some metrics
I can get the data perfectly fine, the issue comes down to the fact that in the Excel chart it has formatted the X-Axis labels as shown in the following image:

Which is how we want the axis formatted so that each Month name is only listed once for the 5 sub categories that are for that month.
But I do not know how to reproduce this using the Microsoft Chart Control, when I use the same data for the chart control it formats the X-Axis as (ignore colors and such):

I have bound the data so that the XAxis value is "January AAA-BBB", I'm thinking that maybe I need to separate out the Month portion into some other axis value that can be formatted/grouped separately.
Any help would be appreciated.
| Formatting Microsoft Chart Control X Axis labels for sub-categories to be like charts generated in Excel | CC BY-SA 2.5 | null | 2011-02-01T03:58:35.473 | 2014-03-12T09:06:26.603 | null | null | 383,327 | [
"c#",
"asp.net",
"controls",
"charts"
]
|
4,858,904 | 1 | 4,862,962 | null | 5 | 4,532 | I have a very basic question. What is the basis of the normal probability plot i.e. what do the probabilities represent? I am testing for a standard normal distribution. My [normplot](http://www.mathworks.com/help/toolbox/stats/normplot.html) (in MATLAB) revealed that the values were more or less in a straight line BUT the probability of 0.5 corresponded to a value other than zero.
My question is, how do I interpret this? Does this mean that my data is normally distributed but has a non-zero mean (i.e. not standard normal) or does this probability only reflect something else? I tried Google and one link said the probabilities are the cumulative probabilities from the z-table, and I can't figure out what to make of it.
Also in MATLAB, is it that as long as the values are fitting into the line drawn by the program (the red dotted line) the values come from a normal distribution? In one of my graphs, the dotted line is very steep but the values fit in, does this mean that the one or two values that are way outside this line are just outliers?
I'm very new to stats, so please help!
Thanks!


| Normal Probability Plot interpretation | CC BY-SA 2.5 | null | 2011-02-01T04:32:24.130 | 2011-02-01T18:28:11.327 | 2011-02-01T12:40:42.947 | 426,834 | 526,223 | [
"matlab",
"graph",
"normalization",
"probability",
"interpretation"
]
|
4,858,981 | 1 | 5,036,630 | null | 0 | 408 | I would like to use the Core Plot framework to produce a graph that looks like the following:

Additionally, I would like to provide charts within a table view like the following:

How would I set up charts like these using Core Plot?
| How would I replicate graphs like the following in Core Plot? | CC BY-SA 2.5 | 0 | 2011-02-01T04:44:14.513 | 2011-02-18T01:01:31.613 | 2011-02-17T20:26:47.633 | 19,679 | 463,857 | [
"iphone",
"cocoa-touch",
"core-plot"
]
|
4,859,183 | 1 | 4,859,222 | null | 6 | 2,437 | I've got a webpage with a couple thousand checkboxes on it, and would like to add a "Check all" feature. Unfortunately, my current implementation hangs Google Chrome for at least five seconds.
Here is what I have tried (using jQuery):
```
$('input').attr('checked', true); // as well as...
$('input').click();
```
I believe that the actual Javascript runs fast, however the browser might be having trouble rendering all the updates so quickly. Could I be doing something else?
Here is a simplified example: [https://www.msu.edu/~weinjare/checkboxes.html](https://www.msu.edu/~weinjare/checkboxes.html)
I've also ran the Profiler built-in to Chrome and got these results:

| Fast way to check 2000 checkboxes in Javascript? | CC BY-SA 2.5 | 0 | 2011-02-01T05:16:46.090 | 2011-02-01T09:07:19.277 | 2011-02-01T05:23:22.423 | 24,841 | 24,841 | [
"javascript",
"jquery"
]
|
4,859,580 | 1 | 4,859,614 | null | 0 | 3,219 | I need to make a css navigation according to the following style:

Below are the designs that I have done:-

Note:
works well and has the desired look
if there is a need to add another menu item, another image must be manually made for that particular menu item. ie. not extensible

very extensible. If another menu item must be added, new extra images need not be made. Only the menu name need to be typed in the html code.
the hover effect is not the same as the desired look.
Is to use , along with the hover effect from , but having to add extra images when a menu item is created(this is what happens in , although it has the desired hover effect).
1. Start working with Exhibit B
2. For the hover effect in the case of a single menu item use 3 images
a)left most edge 
b)repeating slice of the middle area 
c)right most edge 
Is this correct ?
Is this possible ?
Is there a better way? A link to a tute would be fine.
Thanks
---
```
@charset "UTF-8";
* {
margin:0;
padding:0;
list-style: none;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
img {
border: none;
}
.clear {
clear:both;
}
.nav-container {
width: 960px;
}
#navMenu{
display: inline;
margin: 0;
padding: 0px;
position: relative;
z-index: 5;
}
#navMenu li{
float: left;
display: inline;
}
#navMenu li.navRepeat{
float: left;
display: inline;
background-image:url("../images/navigation_repeat.gif");
width:425px;
height:40px;
}
#navMenu li.navRepeatEnd{
float: right;
display: inline;
background-image:url("../images/navigation_repeat_end.gif");
width:1px;
height:40px;
}
a.navReservations{
display:block;
float:left;
width:89px;
height:40px;
background-repeat:no-repeat;
background: url("../images/reservations.gif")
}
a.navReservations:hover{
background: url("../images/reservations.gif") 0 40px;
}
a.navRentals{
display:block;
float:left;
width:62px;
height:40px;
background-repeat:no-repeat;
background: url("../images/rentals.gif")
}
a .navReservations {
float: left;
display: inline;
height: 100px;
width: 400px;
}
a.navRentals:hover{
background: url("../images/rentals.gif") 0 40px;
}
a.navTariffs{
display:block;
float:left;
width:59px;
height:40px;
background-repeat:no-repeat;
background: url("../images/tariffs.gif")
}
a.navTariffs:hover{
background: url("../images/tariffs.gif") 0 40px;
}
a.navFleet{
display:block;
float:left;
width:64px;
height:40px;
background-repeat:no-repeat;
background: url("../images/fleet.gif")
}
a.navFleet:hover{
background: url("../images/fleet.gif") 0 40px;
}
a.navTools{
display:block;
float:left;
width:56px;
height:40px;
background-repeat:no-repeat;
background: url("../images/tools.gif")
}
a.navTools:hover{
background: url("../images/tools.gif") 0 40px;
}
a.navReports{
display:block;
float:left;
width:71px;
height:40px;
background-repeat:no-repeat;
background: url("../images/reports.gif")
}
a.navReports:hover{
background: url("../images/reports.gif") 0 40px;
}
a.navSystem-Management{
display:block;
float:left;
width:133px;
height:40px;
background-repeat:no-repeat;
background: url("../images/system_management.gif")
}
a.navSystem-Management:hover{
background: url("../images/system_management.gif") 0 40px;
}
```
```
#navigation {
width: 959px;
height: 36px;
margin: 0;
padding: 0;
background-image: url(images/navigation-bg.gif);
background-repeat: no-repeat;
background-position: left top;
border: 1px solid #CCC;
}
#navigation ul {
list-style: none;
margin: 0;
padding: 0;
}
#navigation ul li {
display: inline;
margin: 0px;
}
#navigation ul li a {
height:27px;
display: block;
float: left;
color: #000;
text-decoration: none;
font-family: Arial;
font-size: 12px;
font-weight: bold;
background-image: url(images/navigation-separator.gif);
background-repeat: no-repeat;
background-position: right center;
padding-top: 6px;
padding-right: 15px;
padding-left: 15px;
vertical-align: 10%;
padding-bottom: 4px;
}
#navigation ul li a:hover {
color:#FFF;
background-image: url(images/navigation-hover.gif);
background-repeat: repeat-x;
background-position: left top;
}
#navigation ul li#active a {
color:#363636;
background: url(images/navigation-hover.png) repeat-x left top;
}
```
| How to make a CSS horizontal navigation menu? | CC BY-SA 2.5 | null | 2011-02-01T06:20:01.933 | 2011-02-01T09:12:28.573 | 2011-02-01T09:12:28.573 | 157,397 | 350,648 | [
"html",
"css",
"css-sprites",
"menubar"
]
|
4,860,056 | 1 | null | null | 2 | 2,475 | When I dial a number on an Android based phone, the following screen comes up:

Is there a way to this screen and replace it with a screen of my own? There are other questions on these lines on stackoverflow, but they have been unanswered. Hoping for some different luck.
| Changing the dial screen | CC BY-SA 4.0 | 0 | 2011-02-01T07:39:47.970 | 2019-09-23T10:14:43.327 | 2019-09-23T10:14:43.327 | 13,860 | 350,685 | [
"android",
"phone-call"
]
|
4,860,417 | 1 | 4,860,777 | null | 28 | 14,543 | I have a set of 150x150px png images, and a set of (x, y) coordinates that they correspond to. Is there a way to plot the images on a grid? For example, I'm looking for an R or Python solution to create something like the following:

| Placing Custom Images in a Plot Window--as custom data markers or to annotate those markers | CC BY-SA 3.0 | 0 | 2011-02-01T08:35:44.977 | 2012-04-21T00:46:44.687 | 2012-04-21T00:46:44.687 | 66,549 | 231,588 | [
"python",
"r",
"matplotlib",
"plot"
]
|
4,860,608 | 1 | 4,864,373 | null | 1 | 4,197 | I'm trying to build a "visual web part" for SharePoint 2010 which should connect to Oracle table and display records on SharePoint page.For development, Oracle 11g client (with ODP.net) ,SharePoint server 2010, Visual Studio 2010 and Oracle 10g express all running on my machine.
First,I've written sample code in ASP.NET web app to connect my local Oracle table and display data in grid view and it works fine. My code is ,
```
OracleConnection con;
try
{
// Connect
string constr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)));User Id=SYSTEM; Password=password";
con = new OracleConnection(constr);
//Open database connection
con.Open();
// Execute a SQL SELECT
OracleCommand cmd = new OracleCommand("select * from T_ACTIONPOINTS WHERE AP_STATUS='Active' ", con);
OracleDataReader dr = cmd.ExecuteReader();
GridView.DataSource = dr;
GridView.DataBind();
GridView.AllowPaging = true;
}
catch (Exception e)
{
lblError.Text = e.Message;
}
```
Now, I'm trying to create new "SharePoint" visual web part project and using same code and deploying it on my local SP server. But when it runs , I get following error

here is my solution explorer,

It looks something wrong in compatibility.Can someone point me in right direction ?
| SharePoint Visual web part and Oracle connection problem | CC BY-SA 2.5 | null | 2011-02-01T08:58:57.027 | 2012-07-12T15:50:25.503 | 2011-02-01T09:20:11.503 | 263,357 | 263,357 | [
"visual-studio-2010",
"sharepoint-2010",
"oracle11g"
]
|
4,860,645 | 1 | 4,860,876 | null | 0 | 980 | 
I want to add icon with counter(number) on top right corner of UIBarButtonItem in iphone
How can i do this??
| Adding number icon on top right corner of UIBarButtonItem in iphone | CC BY-SA 2.5 | null | 2011-02-01T09:03:25.130 | 2011-02-01T09:29:17.787 | 2011-02-01T09:25:09.940 | 563,798 | 563,798 | [
"iphone",
"objective-c",
"cocoa-touch"
]
|
4,860,865 | 1 | 4,860,935 | null | 1 | 16,271 | Here is my file input rendered in Chrome:

In IE it looks a lot more basic, which is fine (although the vast inconsistencies with this particular control are frustrating!)
My default CSS for inputs is:
```
input{
font-family: arial, sans-serif;
font-size: 12px;
font-weight: bold;
color:White;
background-image:url(../images/buttonBG.png);
height:27px;
border:1px solid #000;
border-radius: 7px;
-moz-border-radius: 7px;
padding: 5px 20px 5px 20px;
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5), inset 0px 1px 0px rgba(255, 255, 255, 0.5);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), inset 0px 1px 0px rgba(255, 255, 255, 0.5);
text-shadow: 0px 1px 2px #000;
}
input:hover{
text-shadow: 0px 1px 2px #fff;
background-image:url(../images/buttonBGo.png);
}
```
As you can see there are two types of text on the control, is it possible to style both individually?
Also is there any way to specifically select file inputs? Like input.file (doesn't seem to work). If this is not possible, how do I remove all the CSS the input style has applied to it (so I am working with a blank slate again).
| Chrome CSS - Styling File Input | CC BY-SA 2.5 | 0 | 2011-02-01T09:27:37.070 | 2018-08-16T23:04:27.957 | 2011-02-01T09:34:51.703 | 356,635 | 356,635 | [
"css",
"google-chrome",
"file-io"
]
|
4,860,869 | 1 | 4,861,025 | null | 1 | 1,277 | Pleae copy and run following script.
```
DECLARE @Locations TABLE
(
LocationId INT,
LocationName VARCHAR(50),
ParentId INT
)
INSERT INTO @Locations SELECT 1, 'Europe', NULL
INSERT INTO @Locations SELECT 2, 'UK', 1
INSERT INTO @Locations SELECT 3, 'England', 2
INSERT INTO @Locations SELECT 4, 'Scotland', 2
INSERT INTO @Locations SELECT 5, 'Wales', 2
INSERT INTO @Locations SELECT 6, 'Cambridgeshire', 3
INSERT INTO @Locations SELECT 7, 'Cambridge', 6
INSERT INTO @Locations SELECT 8, 'North Scotland', 4
INSERT INTO @Locations SELECT 9, 'Inverness', 8
INSERT INTO @Locations SELECT 10, 'Somerset', 3
INSERT INTO @Locations SELECT 11, 'Bath', 10
INSERT INTO @Locations SELECT 12, 'Poland', 1
INSERT INTO @Locations SELECT 13, 'Warsaw', 12
```
I need following kind of result

Thanks.
| Get parent of parent of Parent from self join table | CC BY-SA 2.5 | null | 2011-02-01T09:27:52.530 | 2011-02-01T09:51:13.043 | null | null | 77,674 | [
"sql",
"tsql",
"sql-server-2008",
"sql-server-2000"
]
|
4,861,221 | 1 | null | null | 1 | 833 | I've created a Google like SearchBox control in Silverlight. That means, as I type in the box, a DropDownListBox appears just below the SearchBox, showing all the items that match with the text I've typed in searchbox so far (i.e AutoComplete feature), exactly like this:

Now, I want to add a functionality to it : I want to make the DropDownListBox to disappear, as soon as user clicks outside it, or anywhere on the screen. I cannot handle `MouseLeftButtonDown` (or any such `event`) in other controls, to accomplish this, because users can click anywhere, including non-silverlight region. Can anybody suggest me what should I do to achieve this?
So my question basically is:
Please note that `AutoCompleteBox` doesn't serve my purpose. So I cannot use it.
| Google like SearchBox in Silverlight | CC BY-SA 2.5 | null | 2011-02-01T10:07:32.470 | 2012-06-20T06:00:12.247 | 2011-02-01T10:22:02.610 | 415,784 | 415,784 | [
"silverlight",
"xaml",
"autocomplete",
"drop-down-menu"
]
|
4,861,224 | 1 | 4,861,306 | null | 312 | 472,274 | I would like to surround a number in a circle like in this image:

Is this possible and how is it achieved?
| How to use CSS to surround a number with a circle? | CC BY-SA 3.0 | 0 | 2011-02-01T10:07:48.640 | 2021-12-06T18:50:34.717 | 2015-12-14T12:40:40.543 | 2,889,988 | 243,782 | [
"html",
"css",
"css-shapes"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.