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,825,552 | 1 | 8,308,349 | null | 8 | 66,490 | I'm trying to connect my local Oracle 11g database using server explorer in Visual Studio 2010. I tried to setup everything as per instruction, but I'm still getting an ORA-12504 error.
Here is the error:

Here is my tnsnames.ora contents:
```
# tnsnames.ora Network Configuration File: C:\app\rsahi\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
VENUS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = SPRPRG020)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = VENUS)
)
)
LISTENER_VENUS =
(ADDRESS = (PROTOCOL = TCP)(HOST = SPRPRG020)(PORT = 1521))
```
listener.ora file contents,
```
# listener.ora Network Configuration File: C:\app\rsahi\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = SPRPRG020)(PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\app\rsahi
```
| ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA | CC BY-SA 2.5 | 0 | 2011-01-28T06:35:36.850 | 2020-06-29T05:20:49.017 | 2011-01-28T07:02:34.897 | 23,897 | 263,357 | [
"visual-studio-2010",
"oracle11g",
"odp.net"
]
|
4,825,680 | 1 | 4,827,859 | null | 19 | 7,233 | Certain google sites such as GMail, Google Voice, and others show a little blue dot when they update in the background (when the window doesn't have focus). This is definitely done through a JavaScript API. I've seen at least one other website (imo.im) do it as well.
How do you make this happen in JavaScript?
If you aren't entirely sure what I'm talking about, here is an image:

| How do you put the blue dot on pinned Chrome tabs? | CC BY-SA 3.0 | 0 | 2011-01-28T06:57:41.110 | 2017-02-06T15:01:08.173 | 2017-02-06T15:01:08.173 | 43,790 | 43,790 | [
"javascript",
"google-chrome"
]
|
4,825,723 | 1 | 4,874,628 | null | 4 | 7,511 | I'm using the Nokia Qt SDK and designed a small banner carousel in the top area. It looks like this:

The hierarchy looks like:

After installing this in the emulator, I try to make it scrollable (flinging). It's a simple task I would guess (like `ScrollView` in Android, or `UIScrollView` in iOS), but so far no joy. All links in the internet point me of custom scroll implementations etc etc. which I don't want to do nor expect to do as Qt should be a higher level framework? What is the state of the art here? ;-)
Question in short: How can I make this `QScrollArea` respond to touch (fling, scroll, drag etc) events and reveal the other widgets in the queue? I'm not expecting it to be able to "snap" into a child widget (which is another requirement later ;)).
| QScrollArea - how to enable touch interactions to scroll to next item? | CC BY-SA 4.0 | 0 | 2011-01-28T07:04:15.663 | 2018-05-28T13:49:51.567 | 2018-05-28T13:49:51.567 | 1,485,885 | 375,209 | [
"qt",
"symbian"
]
|
4,825,944 | 1 | 4,825,999 | null | 0 | 2,129 | i have a span like this.
```
css:
.menu {border:1px solid #000; width:200px; display:block; padding:3px;}
html:
<span class="menu">This is an example text</span>
<span class="menu">Another text example</span>
```
It prints this.

i have set the "span width" to 200px, because of the text is longer then 200px, so the span is resized to more than 200px.
I need a javascript or jQuery function so it'll print something like this. It also add "..." in the end of the text.

A css style would also be accepted...
| function to shorten a text dynamically inside span | CC BY-SA 2.5 | null | 2011-01-28T07:40:26.527 | 2011-01-28T11:11:42.253 | 2011-01-28T07:48:55.483 | 568,605 | 568,605 | [
"javascript",
"html",
"css"
]
|
4,825,976 | 1 | 5,230,446 | null | 19 | 22,333 | This question relates to
- [http://www.qtcentre.org/threads/18151-QScrollArea-misbehaving-background-style](http://www.qtcentre.org/threads/18151-QScrollArea-misbehaving-background-style)- [http://www.qtforum.org/article/34443/cannot-change-background-color-of-a-qscrollarea-with-setstylesheet.html](http://www.qtforum.org/article/34443/cannot-change-background-color-of-a-qscrollarea-with-setstylesheet.html)
I'm asking in here because I believe the SO community might have a way to fix this behavior.
So I like to set the background color of a ScrollArea to either being transparent or to a custom background image as it will contain some banners.
I got it running in the Qt Creator () already! :-):

But when deploying the app to the simulator it won't work, the are stays gray, dark gray:

Here is my layout tree:

And here is the stylesheet I'm using (attached & set to the MainWindow):
```
QMainWindow {
background: transparent url(:/ui/designs/images_from_android/bg_plain_empty.png) top left;
}
QWidget#centralWidget {
background-color: transparent;
}
QPushButton {
color: red;
border: 1px solid green;
}
QFrame#top_header {
background: transparent url(:/ui/designs/images_from_android/bg_title_bar_landscape.png) top left repeat-x;
}
QWidget#top_banner_scroll1,
QWidget#top_banner_scroll2 {
background: transparent url(:/ui/designs/images_from_android/stripe_bg.png) top left repeat-x;
}
```
This is quite puzzling. And as Qt Designer is showing me the proper design...
| Transparent QWidget/QScrollArea background style setting has no effect | CC BY-SA 3.0 | 0 | 2011-01-28T07:46:14.363 | 2018-01-11T14:30:03.350 | 2013-05-10T13:03:54.057 | 492,336 | 375,209 | [
"qt",
"symbian"
]
|
4,825,986 | 1 | null | null | 5 | 7,226 | I'm having trouble with setting up a transient property in Core Data. The problem I'm trying to solve is: I have a collection of objects successfully stored using Core Data. This collection is essentially a read-only collection but at run-time, I want to associate another object (a UIImage in this case) with each item in the collection. I do not need to store the UIImages; it is purely a run-time association. So what I really need is a 'placeholder' in each object in the collection where I can drop the UIImage later.
A transient attribute seems like the right thing and, for this, Core Data reference docs tell me that I should set up an "optional, transient attribute of type undefined" in the data model which I have done:

Further, it tells me that I do not need to define a corresponding property in the implementation object but that I will have to write custom accessor & setter methods. I've modeled these methods based on the examples in the docs as follows:
```
- (void)setDisplayImage:(UIImage *)anImage {
[self willChangeValueForKey:@"displayImage"];
[self setPrimitiveValue:anImage forKey:@"displayImage"];
[self didChangeValueForKey:@"displayImage"];
}
```
and:
```
- (UIImage *)displayImage {
[self willAccessValueForKey:@"displayImage"];
UIImage *anImage = [self primitiveDisplayImage];
[self didAccessValueForKey:@"displayImage"];
if (anImage == nil) {
NSData *displayImageData = [self displayImageData];
if (displayImageData != nil) {
anImage = [NSKeyedUnarchiver unarchiveObjectWithData:displayImageData];
[self setPrimitiveDisplayImage:anImage];
}
}
return anImage;
}
```
There is also a deferred "write" method (willSave) that I have written for strict completeness although, as above, I will never be writing these objects back to store.
The problem I am getting is in the primitiveDisplayImage and setPrimitiveDisplayImage methods of - (UIImage *)displayImage { . Basically, the compiler throws warnings on these two methods as "object X may not respond to 'primitiveDisplayImage'.." etc.
However, my understanding from the docs is that these primitive accessors/setters ARE created automatically - this does not seem to be the case.
Anyone out there who can help me solve this issue?
Many thanks
| Core Data and transient properties | CC BY-SA 3.0 | 0 | 2011-01-28T07:47:50.800 | 2014-06-19T11:02:16.720 | 2014-06-19T11:02:16.720 | 113,079 | 559,718 | [
"core-data",
"transient"
]
|
4,826,326 | 1 | null | null | 0 | 999 | I had tried to use openCV 2.2 on Mac OS X 10.6.6, I follow the instruction on [http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port](http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port) and [How to Install OpenCV2.0 in Mac OS 10.6.1 (Snow Leopard)](https://stackoverflow.com/questions/1512594/how-to-install-opencv2-0-in-mac-os-10-6-1-snow-leopard). I install it through macport. Everything seems OK during installation.
But when I follow the step by step instruction to use it, it just appear a lot of error like this:

I do not know what's wrong with is. Can anyone tell me the reason?
I just include the opencv.hpp and the main function just return 0.
Thank you all.
| Using OpenCV 2.2 on MAC OS X 10.6 | CC BY-SA 2.5 | null | 2011-01-28T08:42:30.457 | 2011-04-20T22:49:11.093 | 2017-05-23T12:07:02.087 | -1 | 593,376 | [
"macos",
"opencv"
]
|
4,826,562 | 1 | 4,827,276 | null | 1 | 701 | I have developed a Timer component. Currently the time is being display as follows:

I want to display the time in the following manner, better to say in that specific digital format.

What changes should I make in the layout XML, or what should be my approach?
| Display duration for Timer in the following format | CC BY-SA 3.0 | null | 2011-01-28T09:18:04.160 | 2021-09-12T22:25:44.603 | 2016-03-16T22:57:07.843 | 2,840,103 | 443,141 | [
"android"
]
|
4,826,665 | 1 | 4,826,725 | null | 0 | 41 | Hi i want to display the barcodes in my application.Is there any predefined view for this one .How i want means
| how we display the barcodes in our design | CC BY-SA 2.5 | null | 2011-01-28T09:32:54.563 | 2011-01-28T09:40:56.907 | null | null | 479,027 | [
"android"
]
|
4,826,709 | 1 | 4,827,226 | null | 0 | 222 | This is what my code does: if #placeBookmark has the class .placing, then when i hover over paragraphs it fades in #bookmarkThis. #bookmarkThis is just a div with the words "bookmark this" in it, this div is appended to the page when the page loads, and is centered over the paragraph that's being hovered, then fades out on mouse-out.
My problem/question: When i hover the paragraph, it fades in on that paragraph, and is centered, but when my mouse moves over #bookmarkThis(which is the Div that fades in), then it fades out, like i moused-off of the paragraph. How do i keep #bookmarkThis from messing up my Paragraph hover?
Note: #bookmarkThis is appended to the body on page load(it's not a child of P), then positioned relative to the P being hovered.

```
$('p').hoverIntent(function () {
var myObject = $('#bookmarkThis')
var topp = $(this).offset().top + ($(this).height() / 2) - (myObject.outerHeight() / 2)
var leftt = $(this).offset().left + ($(this).width() / 2) - (myObject.outerWidth() / 2)
if ($('#placeBookmark').hasClass('placing')) {
$(this).animate({color: "#999999", backgroundColor: "#f5f5f5"}, 400)
$('#bookmarkThis').css({'left': leftt, 'top':topp}).fadeIn(200)
}
}, function() {
$(this).stop().animate({color: "#333", backgroundColor: "#fff"}, 200)
$('#bookmarkThis').fadeOut(200)
});
```
| Jquery:When hovering over P, div fades in centered over that P, but when mouse hovers over that div, it creates mouse-out effect | CC BY-SA 2.5 | null | 2011-01-28T09:39:32.403 | 2011-01-28T10:34:38.647 | null | null | 389,271 | [
"jquery",
"hover",
"mouseover",
"mouseout"
]
|
4,826,721 | 1 | 4,828,830 | null | 0 | 1,001 | I would like to display little boxes listed in a div. Every box has a fixed width and height, and inside they have an img and some text (the images are like icons, they're the same width and height). The icons are quite large compared to the text next to them, so I would like to position them vertically centered.
Now, my code looks like this:
```
<div class="hbutton">
<div class="hwrap">
<img style="vertical-align:middle; float:left;" height="40" src="icon.png" width="40" />
<span>Some very long text displayed in the box.</span>
</div>
</div>
```
For centering the hwrap div, I used [this trick](https://stackoverflow.com/questions/148251/css-centering-tricks). No other divs, no others settings.
The centering itself works fine, but if I put a long text near the img, and it doesn't fit, the text starts wrapping, but the second line start under the image, instead of under the first line.
What I WANT to see:

What I see instead:

I've also tried putting the text into a div and changing the attributes around, but I just can't make it work. Any ideas?
| Vertical centering of a div with multiple contents (img and wrapping text) | CC BY-SA 2.5 | null | 2011-01-28T09:40:51.930 | 2011-01-31T11:53:50.810 | 2017-05-23T12:01:17.083 | -1 | 528,197 | [
"css",
"html",
"image",
"word-wrap",
"vertical-alignment"
]
|
4,826,984 | 1 | null | null | 1 | 885 | i want to make a breadcrumb for my android app.
In breadcrumb on the left there is an imagebutton with arrow border. On the right there is a text title. When user tap on imagebutton, application performs specific task.
So, can you help me to create imagebutton with arrow border like in attach image?
Thank you.

| Imagebutton with arrow border | CC BY-SA 2.5 | null | 2011-01-28T10:07:26.143 | 2011-01-28T11:01:46.773 | null | null | 251,434 | [
"android",
"button",
"view",
"imagebutton"
]
|
4,827,135 | 1 | 4,827,430 | null | 4 | 2,736 | Any one help me. Thanks in advance. I want to move the controls based on the browser resolution? How to do it?
| How to create a fixed footer - jquerymobile | CC BY-SA 2.5 | 0 | 2011-01-28T10:25:11.403 | 2011-01-28T12:30:49.047 | 2011-01-28T12:30:49.047 | 173,077 | 430,278 | [
"jquery",
"jquery-mobile"
]
|
4,827,635 | 1 | 4,827,981 | null | 10 | 8,879 | I have a JComboBox that needs to be disabled at some point, but I am feeling that the `disabled` status makes it quite harder to read because the low contrast it has.
It would be nice if only the drop-down arrow button would be shown as disabled, while keeping the box renderer as if it were enabled.
Actual:  Desired: 
Is there an easy way to achieve this or something similar?
Thanks!
| Better readability/contrast in a disabled JComboBox | CC BY-SA 2.5 | 0 | 2011-01-28T11:20:58.483 | 2014-04-25T10:37:16.437 | 2011-01-28T11:34:13.237 | 106,979 | 106,979 | [
"java",
"swing",
"visibility",
"jcombobox",
"disabled-control"
]
|
4,827,643 | 1 | 4,828,188 | null | 2 | 1,319 | i have several html pages at sqlite3 which are connect with specific id. how can i dynamically load html from sqlite at runtime ?
| how to load html file from sqlite3? | CC BY-SA 2.5 | 0 | 2011-01-28T11:21:45.467 | 2019-11-17T23:14:39.860 | 2011-01-28T11:34:50.753 | 405,219 | 405,219 | [
"android",
"html",
"sqlite",
"webview"
]
|
4,827,660 | 1 | 4,828,366 | null | 1 | 1,520 | I use this code to create and show a MessageWindow:
```
var newTitleWindow:MessageWindow = PopUpManager.createPopUp(contextView,MessageWindow, true) as MessageWindow;
newTitleWindow.text = message;
PopUpManager.centerPopUp(newTitleWindow);
```
MessageWindow source code:
```
<?xml version="1.0"?>
<s:TitleWindow title="Something gone wrong" width="200" height="130" xmlns:mx="http://www.adobe.com/2006/mxml"
close="closeMe()" resize="centerMe()" xmlns:s="library://ns.adobe.com/flex/spark" >
<mx:Script><![CDATA[
import mx.managers.PopUpManager;
[Bindable]
public var text:String;
private function closeMe():void {
PopUpManager.removePopUp(this);
}
private function centerMe():void {
PopUpManager.centerPopUp(this);
}
]]></mx:Script>
<s:VGroup top="0" bottom="0" left="0" right="0">
<s:Label id="lbl" left="10" right="10" textAlign="center" text="{text}"/>
<s:Button id="btn"/>
</s:VGroup>
</s:TitleWindow>
```
There is no nested components displayed when I run my app.

The debugger shows they are created and visible.
To my "amusement" the components are shown when I replace s:TitleWindow with mx:TitleWindow.

I really want to use spark TitleWindow.
Is there any trick to fix this behavior?
| How to make PopUpManager correctly show custom component based on spark TitleWindow? | CC BY-SA 2.5 | null | 2011-01-28T11:23:33.313 | 2011-01-28T12:47:50.587 | null | null | 195,895 | [
"apache-flex",
"actionscript-3",
"flex4",
"popup"
]
|
4,827,706 | 1 | 4,827,753 | null | 3 | 795 | I set up a singleton following the instructions at [this tutorial](http://getsetgames.com/2009/08/30/the-objective-c-singleton/), but when I analyze it I see the following memory leaks:

How do I rectify this memory leakage in my singleton class?
| singleton class memory leakage | CC BY-SA 3.0 | 0 | 2011-01-28T11:29:07.040 | 2012-08-16T13:21:59.997 | 2011-12-12T20:44:32.990 | 19,679 | 554,683 | [
"iphone",
"objective-c",
"xcode",
"ios"
]
|
4,827,772 | 1 | null | null | 0 | 1,376 | I am using Maven2.2.1 in my environment, I am facing an issue,
for few jars under maven dependencies directory if you right click on a jar-->maven-->Download Source(is not coming), other jars are not having this issue: i am able to see download sources in the menu. Any idea about this...pls help me?

Thanks,
Sundar
| Maven "Download Sources" is not available for a jar in Eclipse? | CC BY-SA 2.5 | null | 2011-01-28T11:36:55.670 | 2011-01-28T12:13:39.397 | 2011-01-28T12:05:07.137 | 342,852 | 226,968 | [
"eclipse",
"maven-2",
"m2eclipse"
]
|
4,827,808 | 1 | 4,827,952 | null | 0 | 208 | I have a page which has 6 block menu choices and when you click one (e.g. '4') it shows block 4 content in a DIV opposite and will show the block as selected with an arrow.
When you click another block (e.g. '1') it will unselect 4 and then select 1 displaying block 1's content in the DIV.
I'm looking for the best script to do this in JS or jQuery. I'm guessing I could build the blocks as a listed menu and when selected, the CSS will display an image with the arrow.
Thanks

| Script that does hide/show on DIV and displays selected Block | CC BY-SA 2.5 | null | 2011-01-28T11:41:36.340 | 2011-01-28T11:59:37.710 | 2011-01-28T11:52:01.987 | 418,878 | 418,878 | [
"javascript",
"jquery",
"css"
]
|
4,827,845 | 1 | 4,835,827 | null | 0 | 271 | When I'm rendering a Swing component to an image the fonts are different then when the component is rendered on screen. Here is an image showing the difference:

And this is the code:
```
public static BufferedImage renderComponent(Component component) {
int width = component.getWidth();
int height = component.getHeight();
BufferedImage buffImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = (Graphics2D) buffImage.getGraphics();
g.setFont(component.getFont());
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
component.paint(g);
g.dispose();
return buffImage;
}
```
What should I change to make a perfect screen shot of a Swing component? (The app is running on Windows 7)
| Component painted to image renders with ugly fonts | CC BY-SA 2.5 | null | 2011-01-28T11:47:04.347 | 2011-01-29T08:10:44.740 | null | null | 340,318 | [
"java",
"windows",
"swing",
"fonts"
]
|
4,827,934 | 1 | 4,829,624 | null | 2 | 1,060 | I am doing some reporting on SQL Server jobs, using SQL Server Management Objects (SMO).
This is the test-job:

This is the code:
```
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Smo.Agent;
```
...
```
var server = new Server("TestServer");
var agent = server.JobServer;
var job = agent.Jobs["TestJob Long"];
var jhf = new JobHistoryFilter();
var tbl = job.EnumHistory(jhf);
foreach (DataRow row in tbl.Rows.Cast<DataRow>())
{
Console.WriteLine("StepId: {0} | Date: {1} | Duration: {2} | Status:{3}", row["StepId"], row["RunDate"], row["RunDuration"], (JobOutcome)row["RunStatus"]);
}
```
This is the output:
```
StepId: 0 | Date: 27-01-2011 16:23:14 | Duration: 146 | Status:Succeeded
StepId: 3 | Date: 27-01-2011 16:24:23 | Duration: 37 | Status:Succeeded
StepId: 2 | Date: 27-01-2011 16:23:50 | Duration: 33 | Status:Succeeded
StepId: 1 | Date: 27-01-2011 16:23:14 | Duration: 36 | Status:Succeeded
```
Rows with stepId = 0 is a "summary" step, that contains aggregate information (or at least I thought so), but this information is wrong. 37+33+36 is not 146 seconds, but only 106. This fits with the time displayed in SQL Server Management Studio

This is not a problem limited to one job, one server etc - I get it everywhere.
I could add up the steps to get the right time, but I feel I am missing something here - there must be an explanation, as I do not think SMO just returns wrong information.
What am I missing here?
| Job.EnumHistory returns wrong information about job duration using SQL Server Management Objects | CC BY-SA 2.5 | null | 2011-01-28T11:57:25.457 | 2011-01-28T14:59:57.253 | null | null | 77,884 | [
"sql-server-2008",
"smo"
]
|
4,827,947 | 1 | null | null | 1 | 5,490 | I am developing an little OpenGL Activity, it's composed by this layout:
```
<RelativeLayout
android:id="@+id/vt_layout_opengl"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
>
<android.opengl.GLSurfaceView
android:id="@+id/surface_vt"
android:layout_width="900dp"
android:layout_height="285dp"
/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/surface_vt"
android:layout_marginTop="5dp"
android:background="@drawable/barra_menu_vt"
>
<ImageButton android:id="@+id/vt_left_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:background="@drawable/prev_a"
android:onClick="prec"
/>
<ImageButton android:id="@+id/vt_right_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/next_a"
android:layout_toRightOf="@+id/vt_left_arrow"
android:layout_marginLeft="20dp"
android:onClick="next"
/>
<TextView
android:id="@+id/vt_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/vt_right_arrow"
android:layout_marginLeft="30dp"
android:maxLength="30"
android:singleLine="true"
android:ellipsize="marquee"
/>
<ImageButton android:id="@+id/vt_information"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/vt_addbookmarks"
android:layout_marginRight="20dp"
android:background="@drawable/info_a"
android:onClick="info"
/>
<ImageButton android:id="@+id/vt_addbookmarks"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/vt_preferences"
android:layout_marginRight="20dp"
android:background="@drawable/book_a"
android:onClick="bookmark"
/>
<ImageButton android:id="@+id/vt_preferences"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:background="@drawable/sett_a"
android:onClick="settings"
/>
</RelativeLayout>
</RelativeLayout>
```
It's shows an View like this:

But when I press the home button and I return on my application I can see only a black screen, the GLSurfaceView and also the RelativeLayout are not displayed!!
After about two minuts system say:

I am very frustrating, I call GLSurface onPause() and onResume() when my Activity calls the corresponding methods.
Someone can help me!!????
I post some of my code:
```
@Override
public void onCreate(Bundle savedInstanceState) {
Log.d(TAG,"onCreate()");
super.onCreate(savedInstanceState);
setContentView(R.layout.virtualtour);
loading_ly = (RelativeLayout) findViewById(R.id.vt_layout_loading);
panorama_description = (TextView) findViewById(R.id.vt_description);
virtualtour_relatively = (RelativeLayout) findViewById(R.id.vt_layout_opengl);
vt_handler = new VirtualTourHandler(this);
ext_container = new GLExtensionContainer();
th_checkGL = new ThreadCheckOpenGL(ext_container, extensions_requested,vt_handler);
th_checkGL.start();
mFacebook = new Facebook(ArounderTouchMainActivity.APP_ID);
mAsyncRunner = new AsyncFacebookRunner(mFacebook);
msg = vt_handler.obtainMessage();
output_thread = msg.getData();
output_thread.putInt(VirtualTour.TYPE_TAG, VirtualTour.START_TAG);
vt_handler.handleMessage(msg);
}
```
This is my Handler inner class (I use it for switch texture when users performs some action)
```
@Override
public void handleMessage(Message msg) {
bd = msg.getData();
type = bd.getInt(TYPE_TAG);
bd = msg.getData();
switch (type) {
case GL_EXTENSIONS_CHECK_TAG:
showDialog(GL_EXTENSIONS_CHECK_DIALOG);
break;
case START_TAG:
Log.d(TAG, "START_TAG");
loading_ly.setVisibility(View.VISIBLE);
virtualtour_relatively.setVisibility(View.GONE);
progress_bar.setProgress(0);
thread = new DownloadImageProgressBar(vt_handler,getActivity());
thread.execute(panorama_input.get(position).getUrl_virtual());
break;
case BAR_TAG:
progress = bd.getInt(PROGRESS_TAG);
if(progress <= 100)
progress_bar.setProgress(progress);
break;
case SHUTDOWN_TAG:
finish();
break;
case SHOW_TAG:
Log.d(TAG, "SHOW_TAG");
if(first_visualization){
glSurface = (GLSurfaceView) findViewById(R.id.surface_vt);
glSurface.setDebugFlags(GLSurfaceView.DEBUG_CHECK_GL_ERROR);
renderer = new OpenGLRenderer(first_data,second_data,sphere,vt_handler,ext_container, ( (panorama_input.get(position)).getType().compareTo(CardImage.SPHERE) == 0));
glSurface.setRenderer(renderer);
first_visualization = false;
}
// potrebbe essere fatto molto meglio: ricorda!
panorama_description.setText(panorama_input.get(position).getTitolo());
loading_ly.setVisibility(View.GONE);
virtualtour_relatively.setVisibility(View.VISIBLE);
renderer.setImage(first_data, second_data,( (panorama_input.get(position)).getType().compareTo(CardImage.SPHERE) == 0));
renderer.resetZoom();
renderer.resetAngle();
renderer.startTimer();
enable_touch = false;
case NOCONNECTION_ERROR_TAG:
showDialog(OUTOFMEMORY_ERROR_DIALOG);
break;
case OUTOFMEMORY_ERROR_TAG:
showDialog(OUTOFMEMORY_ERROR_DIALOG);
break;
default:
break;
}
return;
}
}
```
The DownloadImageProgressBar is a AsyncTask which downloads images from the web and performs some UI actions through the Activity Handler.
There are my onPause and onResume methods:
```
@Override
protected void onResume() {
Log.d(TAG,"onResume()");
super.onResume();
if(glSurface != null)
glSurface.onResume();
}
@Override
protected void onPause() {
Log.d(TAG,"onPause()");
super.onPause();
glSurface.onPause();
}
```
I call this methods in onSurfaceChanged and onSurfaceCreated:
```
public void setGLTexture(GL10 gl10) {
GL11 gl = (GL11) gl10;
//Generate one texture pointer...
gl.glGenTextures(2, textures_id);
gl.glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
//...and bind it to our array
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures_id.get(0));
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);
gl.glTexParameterf( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE );
gl.glTexParameterf( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE );
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, first, 0);
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures_id.get(1));
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);
gl.glTexParameterf( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE );
gl.glTexParameterf( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE );
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, second, 0);
return;
}
```
I have another question, when my activity switch in background the textures images I downloaded before are deleted?
It's possible that this is the issues?
| GLSurfaceView onPause shows only a black screen | CC BY-SA 2.5 | 0 | 2011-01-28T11:58:55.510 | 2011-01-28T14:59:42.300 | 2011-01-28T14:59:42.300 | 554,892 | 554,892 | [
"android",
"opengl-es"
]
|
4,828,047 | 1 | null | null | 0 | 665 | i need to display an extrafield (virtuemart standard attribute) on flypage over the product image.
I need it as a "customization print option" to display what user want to write over product!
I need the field under other extrafield (as it is normally), but let it appear over image only when user write on it! Is it possible?
Or is there some other solution for this?
Here's the example:

I'm using:
- -
code are welcome, i'm not so expert!
thank you
| display an extrafield over product image with virtuemart when typed by user (something like tshirt designer) | CC BY-SA 2.5 | null | 2011-01-28T12:10:12.170 | 2011-01-28T15:49:54.580 | 2011-01-28T15:49:54.580 | 496,007 | 496,007 | [
"attributes",
"joomla",
"field",
"virtuemart"
]
|
4,828,357 | 1 | 4,828,626 | null | 0 | 190 | I'm using Java and NetBeans to create an application and I seem to be getting some varying results when it comes to making and changing the GUI using the editor.
My design in the editor looks like this:

When I click on the icon to give me a demonstration of what it would actually look like I see this:

Notice that the panel to the right of the GUI has moved down and pushed the text box down as a result.
Now when I come to run the application itself I see this:

I may be too used to the way in which the Visual Studio IDE works in the fact that everything generally stays where you put it, am I missing some sort of hidden trick or property that is throwing everything off?
Thanks for your time.
Code for the components - [http://pastebin.com/FHF2fBEw](http://pastebin.com/FHF2fBEw)
| Odd behaviour from Java IDE (NetBeans) | CC BY-SA 2.5 | null | 2011-01-28T12:46:51.127 | 2011-03-07T08:00:30.150 | 2011-01-28T12:53:15.453 | 218,159 | 218,159 | [
"java",
"user-interface",
"netbeans",
"ide"
]
|
4,828,385 | 1 | 4,828,911 | null | 1 | 1,679 | Perhaps,somebody faced such a problem,looks like specific one and concerning `tabView` component.
There is tabbed view comments module and I would like to display comments number within tab,like this:

How is it possible to embed text if `<p:tab>` generated dynamically and contains a lot of HTML sub-elements (`ul` , `li` etc.)?
Thank you for help.
| Primefaces tabView: embed text near title attribute of p:tab | CC BY-SA 2.5 | 0 | 2011-01-28T12:49:31.563 | 2011-01-28T15:57:41.047 | null | null | 170,830 | [
"view",
"jsf-2",
"customization",
"primefaces",
"tabbed"
]
|
4,828,509 | 1 | null | null | 1 | 1,335 | I have three NSViews in a Cocoa application, each subviews of the other.
FirstNSView -> SecondNSView -> ThirdNSView
FirstNSView draws a solid background fill using core graphics.
SecondNSView is a container view for a number of other views.
ThirdNSView draws an NSImage into its frame using the following code in `drawRect`:
`[img drawAtPoint:NSMakePoint(0, 0) fromRect:NSMakeRect(0, 0, img.size.width, img.size.height) operation:NSCompositeDestinationAtop fraction:1.0];`
I am using `NSCompositeDestinationAtop` because it allows the image to almost act as a mask for the non transparent region of `img`.
However, the transparent regions of `img` make the whole window transparent, rather than showing through to FirstNSView as I would expect. Like so:

Note that experimenting with other composite types has still lead to this same issue.
I have read alot about NSViews not being meant for 'layering' but I'm unsure if that is relevant here. Up to now I've been fine drawing using Core Graphics onto an NSView and the transparent sections exposing the layer 'behind'. It's only with trying to composite this image that this problem has arisen.
I'd appreciate any pointers as to why this is happening and a possible way of solving it.
| Drawing transparent NSImage makes all NSViews transparent | CC BY-SA 2.5 | 0 | 2011-01-28T13:03:58.140 | 2011-01-28T14:30:05.840 | 2011-01-28T13:34:14.637 | 348,308 | 348,308 | [
"cocoa",
"core-graphics",
"nsview",
"nsimage"
]
|
4,828,531 | 1 | 4,844,661 | null | 8 | 1,403 | I'm writting a predictive search that, for server performance requisites (all is cached), must be run on the client browser. The items are TV shows and movies and are matched by title, actors and directors names. Once the search has been executed, it returns a list of matched items with two values for each result:
1. The number of matching words (n): The user can type 4 words but only 2 of them matched an item. The more the better.
2. The Levenshtein Edit Distance addition (ld). The user can type 3 words but 2 of them have a typo or other small diference with the indexed ones. I use the edit distance to find nearest indexed word. The adition of all the Levenshtein Distances is returned as a proximity indicator. The less the better.
1. Client-side. No Sphinx, Lucene or any other server-side solutions.
2. Speed over accuracy. The algorithm runs on each keystroke, and we don't want to bore the user. Keep the big O not so big.
3. Non-recursive. The calculation of each item relevance shouldn't be dependant to the other itmes calculation. I don't want to beat Google, only provide first the best result of a small set.
4. Bounded form 0 to 1, 0 to 100 or something like this. Is not a requisite, but be able to show a "relevance percent" is a plus.
5. Ideas over Implementations. I'm looking for an algorithm/formula better that for a specific implementation.
Based on the exponential decay (like the radioactive half-life decomposition) I made up this formula.

Where:
- `T`- `n`- `ld`
In pseudocode.
```
function lambda(n, ld) {
lambda = (n/T) * e^(-ld * 1/n);
return lambda;
}
```
A little explanation:
- `-ld * 1/n` is the relevancy measure core. If `ld` is low and `n` is big, it comes close to zero (-0 side) and indicates thet this result is more relevant.- `n/T` is an accuracy ratio. Matched words vs. All words. Refines the previous relevance by taking the total user input into account.
The exponential function, for negatives powers, bound the result between 0 and 1.
What I want is not to refine the search algorithm, based on [this response](https://stackoverflow.com/questions/1357173/full-text-search-for-static-html-files-on-cd-rom-via-javascript/1878053#1878053) with an extra edit distance calculation, but to improve the relevancy sort of returned elements by asign a relevance value to each one. If any parameter other than `n` and `ld` is needed and easily computed, can be used. In my solution I added `T`, the number of words the user provided.
| Client-side predictive search relevance calculation with multiple parameters | CC BY-SA 2.5 | 0 | 2011-01-28T13:07:22.180 | 2011-01-30T21:20:12.743 | 2017-05-23T12:07:06.850 | -1 | 481,962 | [
"javascript",
"algorithm",
"search",
"client-side",
"relevance"
]
|
4,829,043 | 1 | 4,829,285 | null | 51 | 68,970 | I have a read only directory copied from version controlled directory which is locked.

When I tried to remove this directory with `shutil.rmtree(TEST_OBJECTS_DIR)` command, I got the following error message.
```
WindowsError: [Error 5] Access is denied: 'C:\...\environment.txt'
```
-
| How to remove read-only attrib directory with Python in Windows? | CC BY-SA 2.5 | 0 | 2011-01-28T14:02:39.870 | 2022-11-04T06:15:19.660 | null | null | 260,127 | [
"python",
"windows",
"attributes"
]
|
4,829,157 | 1 | 4,832,306 | null | 1 | 3,978 | This is a really hard question to explain in words (well it is for me anyway). I need to be able to take an image (bitmap) and crop the image down to a certain size in the centre of the screen but keeping the size of the image the same. Hopefully the picture below can explain what I mean:

So the image as a whole is cropped down to the square in the middle but is not stretched across the screen and remains in the centre, so basically removing the pointless part of the image but keeping to co-ordinates of the pixels the same.
| Crop and keep the size of an image android | CC BY-SA 2.5 | null | 2011-01-28T14:14:10.923 | 2011-01-28T19:34:25.387 | 2020-06-20T09:12:55.060 | -1 | 400,406 | [
"java",
"android",
"image-processing",
"android-image"
]
|
4,829,244 | 1 | 4,829,476 | null | 6 | 2,949 | I use [https://github.com/cakebaker/scss-syntax.vim](https://github.com/cakebaker/scss-syntax.vim) for syntax highlighting (or ) files on vim, which works very well for syntax highlighting. However, the plugin does not come with an indent file and am having trouble writing one.
I would like to set the indent to look like this:

However, if i do `gg=G`, I get:

I suspect that it does not understand nested indent based on braces. I tried all the different combinations of
`set cindent`
`set nocindent`
`set autoindent`
`set smartindent`
and tried to use the code from [Tab key == 4 spaces and auto-indent after curly braces in Vim](https://stackoverflow.com/questions/234564/tab-key-4-spaces-and-auto-indent-after-curly-braces-in-vim) , including
`set tabstop=2`
`set shiftwidth=2`
`set expandtab`
...but nested braces indent never seems to work.
I believe that I might want to write a custom indent file, and all I need is indentation based on braces with nested levels. How should I go about this? If someone has an indentation file for filetypes with similar syntax, that will be great as well.
| How do I define indents in vim based on curly braces? | CC BY-SA 2.5 | 0 | 2011-01-28T14:22:11.223 | 2011-01-28T14:45:54.367 | 2017-05-23T12:25:06.493 | -1 | 114,157 | [
"vim",
"indentation",
"sass",
"auto-indent"
]
|
4,829,256 | 1 | 4,906,250 | null | 3 | 3,386 | I have a Silverlight 4 app with RIA services. It's based on Tim Heuer's [video](https://www.silverlight.net/learn/videos/all/net-ria-services-intro/) and I have pretty much the same setup.
I have a `DomainDataSource`, a set of `DomainDataSource.FilterDescriptors`, a Datagrid which display 15 items per page with the help of a DataPager. When the user enters their filtering options, the datagrid updates accordingly but is still multiple pages which is okay for viewing on screen. I want to implement a print function that essentially prints the datagrid but all items at once and on multiple pages, if need be.
I have played around with printing basics and I can print the datagrid as it is exactly displayed on screen but I want to be able to print all items.
I'm not finding any good examples on the web. Can anyone suggest an approach to tackle this?
Thanks
Edit:
Not sure how helpful it's going to be but here's the XAML outline.

| Silverlight 4 datagrid printing | CC BY-SA 2.5 | null | 2011-01-28T14:23:05.150 | 2011-02-05T10:08:25.953 | 2011-02-01T19:16:45.633 | 273,200 | 273,200 | [
"silverlight-4.0",
"printing",
"datagrid"
]
|
4,830,109 | 1 | 4,860,291 | null | 1 | 1,452 | When I create formatted text in tinyMCE and save it to the database it works good, I can see the visible changes I made in the editor, and in the database the code looks great:
```
<p><span style="background-color: #888888; color: #99cc00;">BLAAT</span> Some other tekst</p>
```
But when I load the content from the database back into the editor it looks like plain text:

I can see no js errors or php errors, and I have no idea what so ever at the moment on where to look for possible mistakes. Any directions?
| TinyMCE does not display formatted text in editor | CC BY-SA 2.5 | null | 2011-01-28T15:44:59.567 | 2011-02-01T08:19:01.887 | null | null | 317,326 | [
"php",
"javascript",
"jquery",
"mysql",
"tinymce"
]
|
4,830,376 | 1 | 4,830,481 | null | 5 | 335 | 
Found this puzzle inside an image. According to my thinking the total number of ways should be
`2*comb(7,i) for i <- 1 to 7` where `comb` is defined as follows. Is my approach correct? I am concerned with the result that I get and not the function written below.
```
def comb(N,k):
if (k > N) or (N < 0) or (k < 0):
return 0L
N,k = map(long,(N,k))
top = N
val = 1L
while (top > (N-k)):
val *= top
top -= 1
n = 1L
while (n < k+1L):
val /= n
n += 1
return val
```
Don't mind me asking too many questions in a short time period. I am just enthusiastic.
| combinatorics implementation and puzzle | CC BY-SA 2.5 | 0 | 2011-01-28T16:07:21.050 | 2011-01-28T16:23:00.830 | 2011-01-28T16:15:02.033 | 593,979 | 593,979 | [
"python",
"math",
"combinatorics"
]
|
4,830,500 | 1 | 4,830,632 | null | 4 | 1,181 | I have a couple of tables and need to join them, but with a twist.
Table #GradeChange has Student IDs, the Effective Date of the grade change, and the Grade they were changed to ON that date. Table #EventOccurrence has events that occurred for that student on a certain date. I need to find what grade the student was in when the event occurred. This will be the most recent Grade from #GradeChange that occurred prior to the #EventOccurrence Effective Date. Students may have multiple EventOccurrences, and we can assume all students will have at least one #GradeChange entry with a date prior to their oldest event.
This is the DDL:
```
/* If the test table already exists, drop it */
IF OBJECT_ID('TempDB..#GradeChange','U') IS NOT NULL
DROP TABLE #GradeChange;
IF OBJECT_ID('TempDB..#EventOccurrence','U') IS NOT NULL
DROP TABLE #EventOccurrence;
/* Create first temp table */
CREATE TABLE #GradeChange
(
ID varchar(6),
EffectiveDate datetime,
Grade varchar(50)
);
/* Populate it */
INSERT INTO #GradeChange
(ID, EffectiveDate, Grade)
SELECT '678443','Jul 2 2009 11:30PM','Grade 3' UNION ALL
SELECT '678443','Jan 24 2007 2:40PM','Kindergarten - Half Day' UNION ALL
SELECT '678443','Jul 4 2007 11:09PM','Grade 1' UNION ALL
SELECT '678443','Jul 2 2008 11:35PM','Grade 2' UNION ALL
SELECT '718466','May 18 2009 11:50PM','Pre-Kindergarten' UNION ALL
SELECT '718466','Jul 2 2009 11:27PM','Kindergarten - Half Day' UNION ALL
SELECT '718466','Aug 27 2009 11:18PM','Pre-Kindergarten' UNION ALL
SELECT '718466','Jul 9 2010 11:18PM','Kindergarten - Half Day' UNION ALL
SELECT '718466','Aug 2 2010 11:14PM','Kindergarten';
/* Create 2nd temp table */
CREATE TABLE #EventOccurrence
(
ID varchar(6),
EventDate datetime
);
/* Populate it */
INSERT INTO #EventOccurrence
(ID, EventDate)
SELECT '718466','Nov 16 2010 12:00AM' UNION ALL
SELECT '718466','May 20 2009 12:00AM' UNION ALL
SELECT '678443','Dec 7 2007 12:00AM';
```
So the two tables would look like this:

And the expected results would look like this:

I've played with "MAX" and "MIN" and "OVER()" but can't quite get it right. I very much appreciate any help!
| Query To Get "Most Recent" Joining On Other Table With Date | CC BY-SA 2.5 | null | 2011-01-28T16:16:58.750 | 2011-01-28T16:48:22.873 | 2011-01-28T16:36:21.487 | 341,251 | 179,202 | [
"sql-server",
"sql-server-2008"
]
|
4,830,685 | 1 | 4,830,771 | null | 3 | 239 | 
Ok so basically I have my database table. The first column is the id. The second is a pkg_id. The 3rd is not important and the 4th is the previous id that the pkg_id was located at. I need to pull the last 3 pkg_id's from the table. So basically I need to pull the last 3 17879 pkg_id's and the last 3 3075. So in this example I need to pull id 9 , 7 , 6 for 17879 and id 8, 5, 3 for 3075.
I can't get my head around it. I do have access to the previous id that it was. So you see that for id 9 it says that 17879 was last in id 7. That id 8 was last in id 5.
If anybody could help me write a query that would be great. I'm also using Java for database access so it doesn't have to be just in mysql. Thanks so much.
| How to get the last 3 distinct ids from a mysql table | CC BY-SA 2.5 | 0 | 2011-01-28T16:36:58.470 | 2011-01-28T16:56:20.783 | 2011-01-28T16:56:20.783 | 55,159 | 505,075 | [
"java",
"mysql",
"jdbc",
"greatest-n-per-group"
]
|
4,830,934 | 1 | 4,831,202 | null | 0 | 6,194 | I found this [snippet of code](http://webmastereseller.com/background_mover/), and tweaked it a bit for my website:
```
var vH=jQuery('.categoryWrapper').height();
var vW=jQuery('.categoryWrapper').width();
var vT=jQuery('.categoryWrapper').offset().top;
var vL=jQuery('.categoryWrapper').offset().left;
jQuery('.categoryWrapper').mousemove(function(e){
var ypos=e.pageY-vT;
var xpos=e.pageX-vL;
var y=Math.round(ypos/vW*100);
var x=Math.round(xpos/vH*100);
jQuery(this).css({backgroundPosition: x+'% '+y+'%'});
```
However, it's not quite doing what I want it to, and I am having a hard time tweaking this to work right.
Go to [http://photoshop.tutorialcraft.com](http://photoshop.tutorialcraft.com) , and move your mouse over the "Photoshop Tutorials, "Graphic Inspiration", and "Graphic Downloads" buttons.
Basically, I have a PNG file with a radial gradient. I want the background to track the mouse, but move a little faster than the mouse.
For instance, `.categoryWrapper` is 312 x 88 pixels. The actually background img is 277x277. If I move my mouse in via the top of `.categoryWrapper`, the center of the bg IMG should be about 200px above the point where the mouse entered. As you move the mouse to the bottom, the background should move to about 200px below the mouse (that way the bg img appears and disappears when you move in and out).
Below image should illustrate what I am trying to do:

| Make Background image move with mouse in Jquery | CC BY-SA 2.5 | 0 | 2011-01-28T17:00:41.383 | 2011-01-28T18:13:52.333 | null | null | 227,411 | [
"javascript",
"jquery",
"background"
]
|
4,830,950 | 1 | 4,857,811 | null | 6 | 799 | I'm letting monkey run on my app (via android emulator) using the following instruction:
`Monkey -p <packagename> -v 5000`
I am getting the following errors:
```
01-28 11:45:55.392: ERROR/MediaPlayerService(34): error: -2
01-28 11:45:55.392: ERROR/MediaPlayer(58): Unable to to create media player
01-28 11:45:58.783: ERROR/MediaPlayerService(34): error: -2
01-28 11:45:58.783: ERROR/MediaPlayer(58): Unable to to create media player
01-28 11:46:13.742: ERROR/MediaPlayerService(34): error: -2
01-28 11:46:13.752: ERROR/MediaPlayer(58): Unable to to create media player
```
This happens over and over again every few seconds and is the only error that occurs. This is odd because my app doesn't touch any media player functionality at all. It is a simple note/to-do app. Any insight into what monkey is touching that's causing the error and what I could do to prevent it?
Or can this be safely ignored?
Thanks!
I think I found the source of my issue. Apparently monkey managed to put my keyboard into some sort of Asian language. And whenever the bottom left key (two Asian characters) is pressed in the soft keyboard image below. I receive the mediaplayer error. Does anyone know what this key does??

| Monkey giving an odd error on android emulator | CC BY-SA 2.5 | 0 | 2011-01-28T17:01:54.307 | 2011-02-10T16:26:08.663 | 2011-02-10T16:26:08.663 | 121,493 | 580,556 | [
"android",
"testing",
"android-emulator",
"monkey",
"android-monkey"
]
|
4,831,154 | 1 | 4,831,339 | null | 8 | 3,049 | I have a table which contains a location of all geographical locations in the world and their relationships.
Here is a example that shows the hierarchy. You will see that the data is actually stored as all three
- - -
The data obviously never changes either. Below is an example of direct ancestors of the location Brighton in England which has a woeid of 13911.
Table: `geoplanet_places` (Has 5.6million rows)

Large Image: [http://tinyurl.com/68q4ndx](http://tinyurl.com/68q4ndx)
I then have another table called `entities`. This table stores my items which I would like to map to a geographical location. I store some basic information but most important I store the `woeid` which is a foreign key from `geoplanet_places`.

Eventually the `entities` table will contain several thousand entities. And I would like a way to be able to return a full tree of all of the nodes which contain entities.
I plan on creating something to facilitate the filtering and searching of entities based on their geographical location and be able to discover how many entities can be found on that particular node.
So if I only have one entity in my `entities` table, I might have something like this
> `Earth (1) United Kingdom (1)England (1)East Sussex (1)Brighton and Hove City (1)Brighton (1)`
Lets then say that I have another entity which is located in Devon, then it would show something like:
> Earth (2)United Kingom (2)England (2)Devon (1)East Sussex (1)
... etc
The (Counts) which will say how many entities are "inside" of each geographical location do not need to be live. I can live with generating my object every hour and caching it.
The aim, is to be able to create an interface which might start out showing only the Countries which have entities..
So like
`Argentina (1021)`, `Chile (291)`, `...`, `United States (32,103)`, `United Kingdom (12,338)`
Then the user will click on a location, such as United Kindom, and will then be given all of the immediate child nodes which are descendants of United Kingdom AND have an entity in them.
If there are 32 Counties in United Kindgdom, but only 23 of them eventually when you drill down have entities stored in them, then I don't want to display the other 9. It is only locations.
This site aptly demonstrates the functionality that I wish to achieve:
[http://www.homeaway.com/vacation-rentals/europe/r5](http://www.homeaway.com/vacation-rentals/europe/r5)

How do you recommend that I manage such a data structure?
Things I am using.
- - -
I plan on having the Drill downs be as rapid as possible. I want to create an AJAX interface that will be seemless for searching.
I would also be interested to know which columns you would recommend indexing on.
| Which Hierarchical model should I use? Adjacency, Nested, or Enumerated? | CC BY-SA 2.5 | 0 | 2011-01-28T17:22:48.533 | 2013-03-12T06:21:39.247 | null | null | 194,528 | [
"mysql",
"enumeration",
"nested-sets",
"adjacency-list"
]
|
4,831,573 | 1 | 4,832,030 | null | 13 | 3,556 | I have a window set to 340 x 146 px, not resizable.
In designer the window size is correct. But when I run the application it is bigger.

Edit: Also, the layout is `Canvas`.
Classic theme:

Edit2:
After running snoop (thanks Zach), it appears that actual dimensions are what I specified.
But the client area is bigger than one in visual studio.
I understand now that the client size stretches, when windows size is fixed to certain dimensions. However I think this makes Canvas layout in window unusable.
Edit3:
```
<Window x:Class="TI.Presentation.Views.AutentizationWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Authentication" Height="146" Width="340" ResizeMode="NoResize" Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}" >
<Canvas>
<Label Canvas.Left="12" Canvas.Top="12" FontSize="15" Width="217">Enter authentication code here:</Label>
<TextBox Canvas.Left="12" Canvas.Top="38" Height="23" Name="code" Width="294" FontSize="14" />
<Button Canvas.Top="67" Content="OK" Height="28" Width="100" Canvas.Left="206" FontSize="14" IsDefault="True" Click="OKClick" />
</Canvas>
</Window>
```
| Why is a window larger in runtime? | CC BY-SA 2.5 | 0 | 2011-01-28T18:10:20.227 | 2011-02-08T22:00:25.927 | 2011-01-28T18:45:08.213 | 177,591 | 177,591 | [
"c#",
"wpf",
"dimensions"
]
|
4,831,711 | 1 | 4,832,770 | null | 4 | 6,564 | I'm parsing an external HTML page with Nokogiri. That page is encoded with ISO-8859-1. Part of the data I want to extract, contains some – (dash) html entities:
```
xml = Nokogiri.HTML(open("http://flybynight.com.br/agenda.php"), nil, 'ISO-8859-1')
f = xml.xpath("//div[@style='background-color:#D9DBD9; padding:15px 12px 10px 10px;']//div[@class='tit_inter_cnz']/text()")
f[0].text #=> Preview M/E/C/A \u0096 John Digweed
```
In the last line, the String should be rendered on the browser with a . The browser correctly renders it if I specify my page as ISO-8859-1 encoding, however, my Sinatra app uses UTF-8. How can I correctly display that text in the browser? Today is is being displayed as a square with a small number inside.
I tried force_encoding('ISO-8859-1'), but then I get a CompatibilityError from Sinatra.
Any clues?
[Edit]
Below are screenshots of the app:
-> Firefox with character encoding UTF-8

-> [Firefox with character encoding Western (ISO-8859-1)

It's worth mentioning that in the ISO-8859-1 mode above, the dash is shown correctly, but there is another incorrect character with it just before the dash. Weird :(
| Incompatible encodings with ruby and Nokogiri HTML | CC BY-SA 2.5 | 0 | 2011-01-28T18:26:21.590 | 2011-03-15T06:46:03.230 | 2011-03-15T06:46:03.230 | 128,421 | 51,500 | [
"ruby",
"encoding",
"nokogiri"
]
|
4,831,867 | 1 | 4,832,580 | null | 2 | 708 | I want to create three `JCombobox`es and link them together. For example, in this picture:

when a selection is made for "university," the college combobox should show only colleges of the selected university. Similarly, only departments of the selected college should be shown next to the "Department:" label.
| How can I create several related JComboboxes? | CC BY-SA 2.5 | 0 | 2011-01-28T18:43:06.297 | 2011-09-10T07:51:28.347 | 2011-09-10T07:51:28.347 | 714,968 | 476,142 | [
"java",
"swing",
"user-interface",
"jcombobox"
]
|
4,831,975 | 1 | 4,832,514 | null | 0 | 93 | Good evening stackoverflow.
I have a problem involving JOptionPanes.
Every so often they simply do not display the content that i give it.
And here to illustrate my problem:
This is what it should look like:

and every so often, this is what it displays:

heres the function call to build the thing. "panel" is just a simple JPanel with the widgets added.
```
int a = JOptionPane.showConfirmDialog(null,panel,"Please enter result details",JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE);
```
The thing with this that is driving me crazy is that it's intermittent so i have no idea what caused this.
Any ideas?
| JDialogBox dont display content intermittently | CC BY-SA 2.5 | null | 2011-01-28T18:55:24.093 | 2011-01-28T20:02:39.977 | null | null | 490,571 | [
"java",
"user-interface",
"jpanel",
"joptionpane"
]
|
4,832,277 | 1 | null | null | 0 | 805 | What would a good database design be for a school's grade schema.
Basically, I have the following:

The problem lies when trying to get the average of the grades. I can't get say the average of all grade in all subject in the first trimester.
Any suggestion on a good DB design for a grading system?
| Question about a database design for a school | CC BY-SA 2.5 | null | 2011-01-28T19:31:30.940 | 2011-01-28T20:04:47.830 | null | null | null | [
"database-design"
]
|
4,832,494 | 1 | 4,832,984 | null | 2 | 158 | I want do some other item stacking but i dont have idea how simple do it.
This is normal warp panel stacking (from left top to right top, and then dont have place then next item will be stacked on first left top free position):

But, i want do stacking from bottom right to top right and if don't have place to next item, then i want to next item will be stacked on first left bottom free place.
Like this:
```
| X
| X
| XX
| XX
```
Propably this can't be done using only WarpPanel i'm open to new ideas.
Can anyone help me?
| WPF Panels - Non standard stacking | CC BY-SA 2.5 | null | 2011-01-28T20:01:05.423 | 2011-01-28T20:57:21.020 | 2011-01-28T20:57:05.443 | 283,564 | 283,564 | [
"wpf",
"xaml",
"wpf-controls"
]
|
4,832,617 | 1 | 4,833,848 | null | 4 | 9,233 | I am using a UITableView with grouping. My first group I have built a custom cell with no background color, and I would also like to remove the border around the cell. How can I do this just for one section?
For my first cell, I would like to set the border/seperator style to [UIColor clearColor].

Apple does this in their contacts app, and I wanted to design something similar.
| Customize UITableView section border color for each section | CC BY-SA 2.5 | 0 | 2011-01-28T20:14:25.417 | 2012-02-21T11:33:12.120 | 2011-01-28T21:41:09.010 | 144,695 | 144,695 | [
"iphone",
"ios",
"uitableview"
]
|
4,832,907 | 1 | 4,833,999 | null | 2 | 244 | As seen in the picture, we have a list of IP addresses (Please note that 128.3.* and 131.243.*) are inside our subnet. We prefer to do it in Perl, any other good ideas more than welcome in *nix environment.
The pictures is formatted as:
> Destination IP(sorted)- Dest_Port
- Source IP- Source_Port
space is used as a separator.
We were doing it manually but know we have huge files and want to automate this procedure.
> The problem is we need to get the
destination IP addresses (, not 128.3.* and 131.243.*) which are
communicated with at least 3 different
IP addresses (source) subnet
(128.3. * and 131.243.*) .

As an example 117.72.15.207 communicates (not subnet ip) with at least 3 source addresses are in our subnet (131.243.92.10, 131.243.92.117 and 131.243.92.191). Please note that it communicates with 131.243.92.117 more than one with different source port addresses so it will count only one source address in output. i put a star to specify the condition.
we need the list of IP pairs who mets this condition
```
59.69.194.12 80 131.243.93.74 4492
59.79.35.247 80 131.243.94.123 1307
59.100.23.87 80 131.243.92.72 45577
*117.72.15.207 80 *131.243.92.10 451
*117.72.15.207 80 *131.243.92.117 21071
117.72.15.207 80 131.243.92.117 21072
117.72.15.207 80 131.243.92.117 21073
*117.72.15.207 80 *131.243.92.191 9248
```
The output will be:
```
117.72.15.207 80 131.243.92.10 451
117.72.15.207 80 131.243.92.117 21071
117.72.15.207 80 131.243.92.191 9248
```
Thanks...
| Extracting IP addresses with at least 3 conversation in *Nix environment | CC BY-SA 2.5 | 0 | 2011-01-28T20:47:11.303 | 2011-01-28T23:45:34.780 | 2011-01-28T20:55:08.107 | 169,895 | 169,895 | [
"perl",
"unix",
"awk",
"text-processing"
]
|
4,832,970 | 1 | 4,833,476 | null | 1 | 321 | 
Above is an image for a custom control that I'm working on. It's actually three separate controls in a windows form. It's a container control which holds multiple instances of a "Platform/console" control. The "Platform" control holds multiple instances of a "Game" control. The consoles are collapsible which will hide the games in the list.
Now the problem I'm having is the fact that when a person has say 3000 game titles, the memory usage is up around 500MB, and the control is very sluggish. Now I haven't optimized the creation out of the application thread yet, but even after creation it's a pig.
How would a person go about freeing resources on controls that have moved off screen? Is there a quicker way than testing each control to see if it's in some visible area? Is there a different way I should be designing this control?
I don't have extensive knowledge in C# so any advice would be greatly appreciated.
| Custom control problem with memory usage and navigation | CC BY-SA 2.5 | null | 2011-01-28T20:55:28.357 | 2011-01-28T22:01:02.403 | 2011-01-28T20:57:55.733 | 1,242 | 277,881 | [
"c#",
"winforms",
"custom-controls"
]
|
4,833,126 | 1 | 4,833,514 | null | 1 | 261 | I am trying to define a grammar that allows for
```
[Foo]-[Bar]-[Baz][X]-[Y][Z]
```
I want to parse this as one set.
I currently have
grammar Sample;
```
items : (item association? item?)*;
item : LBRACK ID RBRACK;
association : ASSOCIATION;
RBRACK : ']';
LBRACK : '[';
ASSOCIATION : '-';
ID : ('a'..'z' | 'A'..'Z' | '_')*;
```
But this gives an error
```
warning(200): Sample.g:3:30: Decision can match input such as
"LBRACK ID RBRACK" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
```
And as a diagram I get

And I get this railroad diagram

How can I fix this?
| antlr grammar for [Foo]-[Bar]-[Baz][X]-[Y][Z] | CC BY-SA 2.5 | null | 2011-01-28T21:15:31.213 | 2011-01-28T22:19:49.313 | 2011-01-28T21:47:13.040 | 48,383 | 48,383 | [
"antlr",
"grammar",
"antlr3"
]
|
4,833,383 | 1 | 4,834,251 | null | 2 | 1,667 | I'm doing something wrong here: I want to have two JButtons in a JSplitPane in a JPanel in a a JFrame, where the buttons fill the JSplitPane.
Here's what I get when I resize the JFrame:

The buttons stay their normal size, and the JSplitPane doesn't allow adjusting.something
How do I fix this?
```
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import net.miginfocom.swing.MigLayout;
public class SplitPaneQuestion {
public static void main(String[] args) {
JFrame frame = new JFrame("SplitPaneQuestion");
JPanel panel = new JPanel();
frame.setContentPane(panel);
panel.setLayout(new MigLayout("","[]","[grow]"));
JSplitPane splitpane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
panel.add(splitpane, "");
splitpane.setTopComponent(new JButton("top"));
splitpane.setBottomComponent(new JButton("bottom"));
frame.pack();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
```
| JSplitPane + MiGLayout: how to enable autoresizing | CC BY-SA 2.5 | null | 2011-01-28T21:50:10.107 | 2011-01-29T00:23:33.847 | null | null | 44,330 | [
"swing",
"miglayout",
"jsplitpane"
]
|
4,833,480 | 1 | 4,833,756 | null | 74 | 39,993 | I'm embedding a large array in `<script>` tags in my HTML, like this (nothing surprising):
```
<script>
var largeArray = [/* lots of stuff in here */];
</script>
```
In this particular example, the array has 210,000 elements. That's well below the theoretical maximum of 2 - by . Here's the fun part: if I save JS source for the array to a file, that file is >44 megabytes (46,573,399 bytes, to be exact).
If you want to see for yourself, you can [download it from GitHub](https://github.com/downloads/mjball/Stack-Overflow-Q-A/largeArray.js.zip). (All the data in there is canned, so much of it is repeated. This will not be the case in production.)
Now, I'm really not concerned about that much data. My server gzips its responses, so it really doesn't take all that long to get the data over the wire. However, there is a really nasty tendency for the page, once loaded, to the browser. I'm not testing at all in IE (this is an internal tool). My primary targets are Chrome 8 and Firefox 3.6.
In Firefox, I can see a reasonably useful error in the console:
> `Error: script stack space quota is exhausted`
In Chrome, I simply get the sad-tab page:

## Cut to the chase, already
- -
Incidentally, I was able to get this to work (read: not crash the tab) on-and-off in Chrome. I really thought that Chrome, at least, was made of tougher stuff, but apparently I was wrong...
---
## Edit 1
@Crayon: I wasn't looking to justify I'd like to dump this much data into the browser at once. Short version: either I solve this one (admittedly not-that-easy) problem, or I have to solve a whole slew of other problems. I'm opting for the simpler approach for now.
@various: right now, I'm not especially looking for ways to actually reduce the number of elements in the array. I know I could implement Ajax paging or what-have-you, but that introduces its own set of problems for me in other regards.
@Phrogz: each element looks something like this:
```
{dateTime:new Date(1296176400000),
terminalId:'terminal999',
'General___BuildVersion':'10.05a_V110119_Beta',
'SSM___ExtId':26680,
'MD_CDMA_NETLOADER_NO_BCAST___Valid':'false',
'MD_CDMA_NETLOADER_NO_BCAST___PngAttempt':0}
```
@Will: but I have a computer with a 4-core processor, 6 gigabytes of RAM, over half a terabyte of disk space ...and I'm not even asking for the browser to do this quickly - I'm just asking for it to work ☹
---
## Edit 2
With the spot-on suggestions from [Juan](https://stackoverflow.com/questions/4833480/is-this-asking-too-much-of-a-browser/4833756#4833756) as well as [Guffa](https://stackoverflow.com/questions/4833480/is-this-asking-too-much-of-a-browser/4833631#4833631), I was able to get this to work! It would appear that the problem was just in the source code, not actually working with it in memory.
To summarize the comment quagmire on Juan's answer: I had to split up my big array into a series of smaller ones, and then `Array#concat()` them, but that wasn't enough. I had to put them into separate `var` statements. Like this:
```
var arr0 = [...];
var arr1 = [...];
var arr2 = [...];
/* ... */
var bigArray = arr0.concat(arr1, arr2, ...);
```
To everyone who contributed to solving this: The first round is on me!
---
| Have I reached the limits of the size of objects JavaScript in my browser can handle? | CC BY-SA 3.0 | 0 | 2011-01-28T22:01:19.983 | 2016-02-19T20:39:16.607 | 2017-05-23T12:02:05.537 | -1 | 139,010 | [
"javascript",
"arrays",
"memory"
]
|
4,833,633 | 1 | 4,834,465 | null | 2 | 457 | I'm new to a lot of things that [YETI](http://www.yuiblog.com/blog/2010/08/25/introducing-yeti-the-yui-easy-testing-interface/) requires to run, and I've made it through most of the steps to get it to work. I have installed cygwin so I can run node.js and npm (I used [these](https://github.com/ry/node/wiki/Installation) instructions). Once done, I ran `npm install yeti`, and yeti installed. Now I can type things like this:

This is where I'm having problems. I can't figure out how to get yeti to run the tests in `demo.html`. I can open up my browser to `file:///C:/test/demo.html` and I can see the tests run (it's a YUI Test) so I know that the problem is not `demo.html` being broken. Also, when I try to run yeti as a server (`yeti --server`), It sits there after the line "to run and report the results" and doesn't let me do anything unless I exit with ctrl-c, although I can go to `localhost:8000` and see this:

If I try opening up a new cygwin console and doing this:

It gives me a bunch of errors that I don't understand.
Help!
| Need help with how to start using YUI YETI in Cygwin for JS testing | CC BY-SA 2.5 | null | 2011-01-28T22:23:24.163 | 2011-01-29T03:00:18.700 | 2011-01-28T22:30:35.170 | 482,489 | 482,489 | [
"javascript",
"cygwin",
"yui",
"node.js",
"yeti"
]
|
4,833,661 | 1 | 4,833,705 | null | 6 | 9,903 | Can someone please help me tune this SQL query?
```
SELECT a.BuildingID, a.ApplicantID, a.ACH, a.Address, a.Age, a.AgentID, a.AmenityFee, a.ApartmentID, a.Applied, a.AptStatus, a.BikeLocation, a.BikeRent, a.Children,
a.CurrentResidence, a.Email, a.Employer, a.FamilyStatus, a.HCMembers, a.HCPayment, a.Income, a.Industry, a.Name, a.OccupancyTimeframe, a.OnSiteID,
a.Other, a.ParkingFee, a.Pets, a.PetFee, a.Phone, a.Source, a.StorageLocation, a.StorageRent, a.TenantSigned, a.WasherDryer, a.WasherRent, a.WorkLocation,
a.WorkPhone, a.CreationDate, a.CreatedBy, a.LastUpdated, a.UpdatedBy
FROM dbo.NPapplicants AS a INNER JOIN
dbo.NPapartments AS apt ON a.BuildingID = apt.BuildingID AND a.ApartmentID = apt.ApartmentID
WHERE (apt.Offline = 0)
AND (apt.MA = 'M')
```
.
Here's what the Execution Plan looks like:
.

What I don't understand is why I'm getting a Index Scan for NPapplicants. I have an Index that covers BuildingID and ApartmentID. Shouldn't that be used?
| Why does this SQL result in Index Scan instead of an Index Seek? | CC BY-SA 2.5 | 0 | 2011-01-28T22:27:16.973 | 2011-01-28T22:45:26.847 | null | null | 271,976 | [
"sql",
"sql-server",
"performance",
"sql-execution-plan"
]
|
4,833,985 | 1 | 9,662,864 | null | 2 | 486 | Visual Studio 2008 is not rendering right on window resize or maximize.
This happens a lot -- It's very annoying.
(Note I blurred the code, that's usually fine, but the code pane keeps the previous size while the rest of the window resizes.
Also, SSMS does the same thing and I know they are build on the same technology.

EDIT: I'm on Windows 7 x64 Professional.
Visual Studio 2008 Professional with resharper 5.
Doing some googling, it seems the problem might be related to an nVidia graphics driver.
That doesn't really make sense to me though, it's just 2D standard winforms isn't it?
| Visual Studio 2008 not rendering right on window resize | CC BY-SA 2.5 | null | 2011-01-28T23:23:17.280 | 2012-05-31T10:42:59.553 | 2011-01-31T02:17:16.023 | 127,257 | 127,257 | [
"asp.net",
"visual-studio-2008",
"resize"
]
|
4,834,517 | 1 | 4,834,696 | null | 0 | 832 | >
[Hyperlinks showing URL with Blueprint](https://stackoverflow.com/questions/4258417/hyperlinks-showing-url-with-blueprint)
DOM:
```
<div id="menu">
<ul>
<a href="#">Home</a>
<a href="/contacts">Contact List</a>
<a href="/album">Event Album</a>
</ul>
</div>
```

Looks weird, why the href are printed?
```
/* Menu */
#menu{
width:400px;
height:50px;
margin:10px auto;
border:solid 1px #313131;
background:#ffffff;
overflow:hidden;
}
/*------ MENU ------*/
#menu ul{
list-style:none;
}
#menu ul a{
text-decoration:none;
}
#menu ul a:hover{
color:#7878ff;
}
```
| Why the href attributes of a tags are printed to screen? | CC BY-SA 2.5 | null | 2011-01-29T01:30:37.777 | 2012-04-09T17:56:50.527 | 2017-05-23T12:17:21.663 | -1 | 469,652 | [
"css",
"blueprint-css"
]
|
4,834,574 | 1 | 4,834,599 | null | 10 | 6,477 | Please give me feed back whether it's good practice to have a back button in activity, or is it just nonsense? Maybe some android phones don't have back/return key? Or do all models have them?

| Is it reasonable to have a "back" button in an Android app? | CC BY-SA 2.5 | 0 | 2011-01-29T01:42:03.657 | 2012-05-15T11:26:06.833 | 2011-01-29T01:45:41.783 | 501,557 | 536,853 | [
"android",
"button",
"android-activity",
"back"
]
|
4,835,044 | 1 | 4,839,946 | null | 17 | 26,605 | ```
Conversion to Dalvik format failed: Unable to execute dex:
wrapper was not properly loaded first
[project]
Android Packaging Problem
```
I've never worked with Java or eclipse before, I'm following [this introductory guide](http://www.vogella.de/articles/Android/article.html) and all searches via google return no helpful results. I'm guessing the problem is I have built Android stuff with eclipse properly but I have no idea, I followed this guide to the letter and everything went as it explains it should.

Any ideas what caused this problem, or is it specific to the guide? If so I'll post on their help page.
I have tried doing project -> source -> clean up, but that didn't fix anything.
Edit:
I went to Project -> Android tools -> Dex bytecode and it reported:
```
DexDump: missing classex.dex for project. Please compile first.
```
So I guess that's my problem! Not sure how to solve though.
| Error launching first test application: Android Packaging Problem? | CC BY-SA 2.5 | 0 | 2011-01-29T03:55:27.787 | 2012-10-25T08:01:42.580 | null | null | 200,518 | [
"java",
"android",
"eclipse"
]
|
4,835,092 | 1 | 4,835,162 | null | 0 | 3,888 | Good day!
I am doing a game in Java. My menu button includes New Game, HighScore, About and Quit.
But before the user can proceed to the main game, he needs to type his name first. I used this code as follows:
```
private void btnNewGameMouseClicked(java.awt.event.MouseEvent evt) {
Player p1 = new Player();
this.setVisible(false); // I must replace this code
p1.setVisible(true);
}
```
My problem is, I don't want to make the main menu hidden. I want it to freeze and cannot be accessed when the player name is being asked.
My Main menu frame is bigger than the player frame.. Of course, I can just delete the code `this.setVisible(false)` but the problem is I can still access the main menu when clicked... I want the main menu to freeze and cannot be accessed when the player frame pops up.. (See image below) Please help me. Thank you.

| Java Project - how to freeze Frame | CC BY-SA 2.5 | 0 | 2011-01-29T04:09:44.890 | 2013-04-21T05:09:48.960 | 2020-06-20T09:12:55.060 | -1 | 525,965 | [
"java"
]
|
4,835,364 | 1 | 4,835,391 | null | 0 | 8,564 | I try to change page on android application. It have error but look like its swap a little while.
```
public class gps_gui extends Activity implements View.OnClickListener{
/** Called when the activity is first created. */
private static final int ACTIVITY_CREATE = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Button login = (Button) findViewById(R.id.login);
login.setOnClickListener((OnClickListener) this);
}
public void onClick(View v){
//Toast.makeText(this, "Already Login",Toast.LENGTH_SHORT).show();
Intent i = new Intent(this, SecondPage.class);
startActivityForResult(i, ACTIVITY_CREATE);
}
}
public class SecondPage extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.second_page);
}
```
}
In AndriodManifest.xml
```
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="gps.GUI"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".gps_gui"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="second_page"></activity>
</application>
<uses-sdk android:minSdkVersion="8" />
</manifest>
```
Anyone can help me ? thanks
Errors:
01-29 13:56:57.709: ERROR/AndroidRuntime(393): FATAL EXCEPTION: main
01-29 13:56:57.709: ERROR/AndroidRuntime(393): android.content.ActivityNotFoundException: Unable to find explicit activity class {gps.GUI/gps.GUI.SecondPage}; have you declared this activity in your AndroidManifest.xml?
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at android.app.Activity.startActivityForResult(Activity.java:2817)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at gps.GUI.gps_gui$1.onClick(gps_gui.java:30)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at android.view.View.performClick(View.java:2408)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at android.view.View$PerformClick.run(View.java:8816)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at android.os.Handler.handleCallback(Handler.java:587)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at android.os.Handler.dispatchMessage(Handler.java:92)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at android.os.Looper.loop(Looper.java:123)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at java.lang.reflect.Method.invokeNative(Native Method)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at java.lang.reflect.Method.invoke(Method.java:521)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-29 13:56:57.709: ERROR/AndroidRuntime(393): at dalvik.system.NativeStart.main(Native Method)
| How to change the activity to show the next page | CC BY-SA 3.0 | null | 2011-01-29T05:37:08.480 | 2013-08-26T15:18:40.963 | 2011-12-26T16:00:52.067 | 411,951 | 538,788 | [
"android",
"android-activity"
]
|
4,835,461 | 1 | null | null | 2 | 278 | Good day!
I have a view which i forcefully landscape. but the problem which i am facing is that the navigation bar buttons are somewhere else but i have to click few steps (inches) back to let it act. e.g.
if button is at frame
0,0 then i have to click at 50,0 to go back. i am attaching screenshot, if some one could help me in this. Please help
Thanks & Regards

| Oritentation issue in landscape (iphone) | CC BY-SA 2.5 | null | 2011-01-29T06:08:22.417 | 2011-04-01T10:22:38.103 | null | null | 297,143 | [
"iphone",
"objective-c",
"orientation",
"uinavigationbar",
"landscape"
]
|
4,835,515 | 1 | 4,835,716 | null | 4 | 2,245 | I'm trying to generate a graph with gradient/shading effect. Now I'm able to draw line graph and applied gradient effect to that graph. It is applying to whole view not to the graph. Now I'm getting image like  this. But I want like this. I want gradient effect just under the graph.
Please help me in this. Thanks in advance.
The code that I'm using is:
```
UIGraphicsBeginImageContext(self.graphView.frame.size);
[graphView.image drawInRect:CGRectMake(0, 0, self.graphView.frame.size.width, self.graphView.frame.size.height)];
CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
CGContextSetLineJoin(UIGraphicsGetCurrentContext(), kCGLineJoinRound);
CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 2.0);
CGContextSetRGBFillColor(UIGraphicsGetCurrentContext(), 225, 48, 48, 1.0);
CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 225, 225, 0.0, 1.0);
CGContextBeginPath(UIGraphicsGetCurrentContext());
float xCordinate, yCordinate;
for (int i = 0; i < [graphValues count]; i++) {
int val = [[graphValues objectAtIndex: i] intValue] / 5;
float diff = [[graphValues objectAtIndex: i] floatValue] / 5 - val;
yCordinate = val * 120 + 120 * diff;
xCordinate = graphWidth * i / [graphValues count] + 60;
if (i == 0)
CGContextMoveToPoint(UIGraphicsGetCurrentContext(), xCordinate, graphHeight + 60 - yCordinate);
else
CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), xCordinate, graphHeight + 60 - yCordinate);
}
CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), xCordinate, graphHeight + 60);
CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), 60, graphHeight + 60);
CGContextClosePath(UIGraphicsGetCurrentContext());
CGContextSaveGState(UIGraphicsGetCurrentContext());
CGContextDrawPath(UIGraphicsGetCurrentContext(), kCGPathStroke);
```
// CGContextFillPath(UIGraphicsGetCurrentContext());
```
CGContextClip(UIGraphicsGetCurrentContext());
//Draw Gradient
UIColor *topColor = [UIColor colorWithRed: 1.0 green:1.0 blue:1.0 alpha:1.0];
UIColor *bottomColor = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.0];
CGColorRef colorRef[] = { [topColor CGColor], [bottomColor CGColor] };
CFArrayRef colors = CFArrayCreate(NULL, (const void**)colorRef, sizeof(colorRef) / sizeof(CGColorRef), &kCFTypeArrayCallBacks);
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, colors, NULL);
CFRelease(colorSpace);
CFRelease(colors);
// Draw a linear gradient from top to bottom
CGPoint gradStartPoint = CGPointMake(50.0, graphView.bounds.size.height);
CGPoint gradEndPoint = CGPointMake(50.0, 0.0);
CGContextDrawLinearGradient(UIGraphicsGetCurrentContext(), gradient, gradStartPoint, gradEndPoint, 0);
CFRelease(gradient);
// Cleanup
CGColorSpaceRelease(colorSpace);
CGContextRestoreGState(UIGraphicsGetCurrentContext());
graphView.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
```
| Gradient effect for Line Graph in iPhone | CC BY-SA 2.5 | 0 | 2011-01-29T06:25:27.407 | 2013-05-30T12:13:31.533 | 2011-01-30T03:49:03.807 | 434,643 | 434,643 | [
"iphone",
"core-graphics",
"gradient",
"linegraph"
]
|
4,835,754 | 1 | 4,835,913 | null | 4 | 3,686 | I have some problems using OpenSSL. I'm following the [tutorial for compiling OpenSSL for iOS](http://www.x2on.de/2010/07/13/tutorial-iphone-app-with-compiled-openssl-1-0-0a-library/), but it is still not working. Here is my problem:
1. Change directories into crypto/ui/ui_openssl.c.
2. Build OpenSSL for i368 iPhone simulator.
3. Copy the include, libcrypto.a and libssl.a to the project folder.
4. Drag libcrypto.a and libssl.a to project tree.
5. Change the build info.
It worked with `openssl-1.0.0c`. Then as I was coding `#include <openssl/md5.h>` and building, I got the error "no such file or directory."

Help! Thanks a lot!
| Why is there a compile error when including OpenSSL static library? | CC BY-SA 2.5 | 0 | 2011-01-29T07:48:41.190 | 2011-01-30T06:13:20.347 | 2011-01-30T06:13:20.347 | 352,586 | 352,586 | [
"ios4",
"openssl"
]
|
4,836,102 | 1 | 4,836,123 | null | 0 | 466 | I have a program like this.
```
Module Module1
Public Class Mstr
Public Property Prop1 As String
Public Property Prop2 As String
Public Property Prop3 As String
Public Property Prop4 As String
Public Property lstDtlsA As List(Of DtlsA)
Public Property DtlsB As DtlsB
End Class
Public Class DtlsA
Public Property Prop1 As String
Public Property Prop2 As Integer
Public Property Prop3 As String
Public Property Prop4 As Integer
Public Property DtlsB As DtlsB
End Class
Public Class DtlsB
Public Property Prop1 As String
Public Property Prop2 As Integer
Public Property Prop3 As String
Public Property Prop4 As Integer
End Class
Private Sub Process(ByVal mstr As Mstr)
Dim lstTemp As New List(Of DtlsA)
For Each dtl In mstr.lstDtlsA
'Do some processing
PopulateDtlsBForDtlsA(mstr, dtl)
lstTemp.Add(dtl)
Next
'Finally set the modified dtls list to mstr
mstr.lstDtlsA = lstTemp
End Sub
Sub PopulateDtlsBForDtlsA(ByVal mstr As Mstr, ByVal dtl As DtlsA)
Dim dtlB As New DtlsB
dtlB = mstr.DtlsB
dtlB.Prop1 = mstr.Prop1
dtlB.Prop2 = dtl.Prop2
dtlB.Prop4 = dtl.Prop4
dtl.DtlsB = dtlB
End Sub
Sub Main()
Dim mstr As New Mstr
mstr.Prop1 = "Master Property 1"
mstr.Prop2 = "Master Property 2"
mstr.Prop3 = "Master Property 3"
mstr.Prop4 = "Master Property 4"
mstr.lstDtlsA = New List(Of DtlsA)
Dim dtlA As DtlsA
dtlA = New DtlsA
dtlA.Prop1 = "Detail A Property 11"
dtlA.Prop2 = 12
dtlA.Prop3 = "Detail A Property 13"
dtlA.Prop4 = 12
mstr.lstDtlsA.Add(dtlA)
dtlA = New DtlsA
dtlA.Prop1 = "Detail A Property 21"
dtlA.Prop2 = 22
dtlA.Prop3 = "Detail A Property 23"
dtlA.Prop4 = 24
mstr.lstDtlsA.Add(dtlA)
dtlA = New DtlsA
dtlA.Prop1 = "Detail A Property 31"
dtlA.Prop2 = 32
dtlA.Prop3 = "Detail A Property 33"
dtlA.Prop4 = 34
mstr.lstDtlsA.Add(dtlA)
Dim dtlB As New DtlsB
dtlB.Prop1 = "Detail B Property 1 set by master"
dtlB.Prop3 = "Detail B Property 3 set by master"
mstr.DtlsB = dtlB
Process(mstr)
End Sub
```
End Module
But it is not working as I expect it to. You can see it from
The DtlsB properties of all three DtlsA objects are having values from last iteration. Please let me know what I'm doing wrong here, also a bit of explanation about the concept would be very much helpful. Thanks!!!
| Modifying objects inside for each loop sets properties of all objects with values of last one | CC BY-SA 2.5 | null | 2011-01-29T09:30:31.987 | 2011-01-29T09:36:08.180 | null | null | 126,914 | [
"vb.net",
"loops"
]
|
4,836,308 | 1 | null | null | 1 | 275 | i am stuck on how to go ahead on creating a simple game for my project, it is simply a puzzle game where i have a image on the background and boxes will be covering the image, the boxes are to be matched and when matched they will remove themselves to reveal part of the image, currently what i have done is to draw the grids but how can i make them stacked against each other? do i make each generated grid a imageitem?

The canvas of generating the blocks
```
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.Sprite;
public class blockcanvas extends Canvas
{
private Image pokeballImage;
private int screenW,screenH,imageW,imageH;
public blockcanvas()
{
//get screen size
screenW = getWidth();
screenH = getHeight();
try {
pokeballImage = Image.createImage("/pokeball.png");
imageW = pokeballImage.getWidth();
imageH = pokeballImage.getHeight();
} catch (IOException e) {
e.printStackTrace();
}
}
protected void paint(Graphics g) {
g.setColor(255,255,255);
g.fillRect(0,0,getWidth(),getHeight());
drawPokeBall(g);
}
public void drawPokeBall(Graphics g)
{
int maxNumberOfBlockX = screenW / imageW;
int maxNumberOfBlockY = screenH / imageH;
Sprite pokeball = new Sprite(pokeballImage);
pokeball.defineCollisionRectangle(0,0,20,20);
pokeball.defineReferencePixel(imageW/2,imageH/2);
for (int i = 0; i <maxNumberOfBlockX; i++)
{
pokeball.setRefPixelPosition(i*20,0);
pokeball.paint(g);
}
for (int i = 0; i <maxNumberOfBlockY; i++)
{
pokeball.setRefPixelPosition(0,i*20);
pokeball.paint(g);
}
System.out.println(maxNumberOfBlockX);
}
}
```
The canvas for the image to be covered by blocks
```
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class gameCanvas extends Canvas
{
private Image image;
private int screenW,screenH;
blockcanvas block;
public gameCanvas()
{
block = new blockcanvas();
//get screen size
screenW = getWidth()/2;
screenH = getHeight()/2;
try {
image = Image.createImage("/gby001.gif");
} catch (IOException e) {
e.printStackTrace();
}
}
protected void paint(Graphics g) {
g.setColor(255,255,255);
g.fillRect(0,0,getWidth(),getHeight());
g.drawImage(resizeImage(image), 10, 10, Graphics.TOP | Graphics.LEFT);
block.drawPokeBall(g);
}
private Image resizeImage(Image src) {
int srcWidth = src.getWidth();
int srcHeight = src.getHeight();
Image tmp = Image.createImage(screenW, srcHeight);
Graphics g = tmp.getGraphics();
int ratio = (srcWidth << 16) / screenW;
int pos = ratio/2;
//Horizontal Resize
for (int x = 0; x < screenW; x++) {
g.setClip(x, 0, 1, srcHeight);
g.drawImage(src, x - (pos >> 16), 0, Graphics.LEFT | Graphics.TOP);
pos += ratio;
}
Image resizedImage = Image.createImage(screenW, screenH);
g = resizedImage.getGraphics();
ratio = (srcHeight << 16) / screenH;
pos = ratio/2;
//Vertical resize
for (int y = 0; y < screenH; y++) {
g.setClip(0, y, screenW, 1);
g.drawImage(tmp, 0, y - (pos >> 16), Graphics.LEFT | Graphics.TOP);
pos += ratio;
}
return resizedImage;
}//resize image
}
```
The main app
```
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import javax.microedition.lcdui.Canvas;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.io.*;
/**
* @author Lotus
*/
public class game extends MIDlet implements CommandListener{
//Variables Declartion
private Display theDisp;
private Command cmdExit,cmdGuess,cmdReturn;
private gameCanvas canvas1;
private blockcanvas canvas2;
private Image gameImage;
public game()
{
theDisp = Display.getDisplay(this);
cmdExit = new Command("Exit",Command.EXIT,1);
cmdGuess = new Command("Guess",Command.SCREEN,2);
cmdReturn = new Command("Back",Command.BACK,2);
canvas1 = new gameCanvas();
canvas2 = new blockcanvas();
canvas1.addCommand(cmdExit);
canvas1.addCommand(cmdGuess);
canvas1.setCommandListener(this);
}
public void startApp() {
theDisp.setCurrent(canvas1);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command c, Displayable d) {
if(c == cmdExit)
{
destroyApp(true);
notifyDestroyed();
}
else if(c== cmdGuess)
{
}
}
}
```
| javaME game creation help | CC BY-SA 2.5 | null | 2011-01-29T10:21:43.053 | 2011-01-29T11:54:49.090 | 2011-01-29T11:54:49.090 | 267,738 | 267,738 | [
"java",
"java-me"
]
|
4,836,595 | 1 | 4,895,812 | null | 5 | 4,452 | i load a local html file into an ipad application:
```
NSURL *baseURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];
NSString *path = [[NSBundle mainBundle] pathForResource:@"lieferant1" ofType:@"html"];
NSString *content = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
[webView loadHTMLString:content baseURL:baseURL];
```
the webpage gets displayed, content of my html file:
```
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<p>
<video>
<source src="banane.m4v">
</video>
</p>
```
so, `banane.m4v` is in my root, just in some groups, but not in real directories.

but the video section in my webview keeps black. no video gets loaded. i uploaded my html file and my `.m4v` video to my webserver to check if its not encoded properly, but everything works fine, surfing the html file with my ipad.
some ideas whats wrong?
| playing a local video in a uiwebview | CC BY-SA 2.5 | 0 | 2011-01-29T11:27:57.570 | 2017-04-26T13:40:52.090 | 2011-02-04T08:09:25.293 | 253,288 | 253,288 | [
"objective-c",
"ipad",
"html",
"video",
"uiwebview"
]
|
4,836,656 | 1 | 5,034,335 | null | 6 | 4,088 | I have a simple silverlight application and i need to add the web browser scroll bars for it. (scroll bars not inside my silverlight app)
So I have html:
```
<style type="text/css">
html, body {
height: 100%;
overflow: auto;
}
body {
padding: 0;
margin: 0;
}
#silverlightControlHost {
height: 100%;
min-height:600px;
min-width:800px;
text-align:center;
}
</style><body>
<form id="form1" runat="server" style="height:100%">
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/Infopulse.MobileOptimizer.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />
<param name="culture" value="ru-ru" />
<param name="uiculture" value="ru-ru" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
</form>
</body>
```
And i faced with next problem:
vertical scroll bar works not properly when scroll bar is enabled silverlight application not fits content of page. (Red arrow on screen shows the area without silverlight application) I dont now how to solve this problem.
Width fits normally. Inside silverlight application content set to stretch
Image:

I will be grateful for any information

| Browser scrollbars problem with silverlight application.(Html) | CC BY-SA 2.5 | 0 | 2011-01-29T11:41:32.420 | 2015-04-10T19:42:36.160 | 2011-01-29T13:09:45.187 | 508,330 | 508,330 | [
"html",
"css",
"silverlight"
]
|
4,836,896 | 1 | 4,836,987 | null | 3 | 24,652 | i have form as shown in picture

what i need is, when i type/ change value in amount, it auto calculate sum at the bottom
also i don't want to let add any character...
Thanks
| auto calculate total value | CC BY-SA 2.5 | null | 2011-01-29T12:34:13.457 | 2019-11-10T12:48:01.643 | null | null | 172,319 | [
"javascript",
"jquery"
]
|
4,836,975 | 1 | 4,837,066 | null | 4 | 1,196 | I am creating a hangman game. I made a button A - Z using the GUI Toolbars in Netbeans as follows:. 
My problem is, how can I add an actionlistener to all of it. Is it possible to use a loop? If i click the button A, i will get the character 'a' and so on..
| Java Hangman Project: Action Listener | CC BY-SA 3.0 | null | 2011-01-29T12:50:38.460 | 2012-10-02T12:01:55.933 | 2012-10-02T12:01:55.933 | 992,687 | 525,965 | [
"java",
"swing",
"code-generation",
"actionlistener"
]
|
4,837,050 | 1 | 4,842,713 | null | 3 | 3,408 | con.getInputStream() throw exception, when the code running on android,
but when copy the code to regular java project it is working,
The thrown object e contain "detailMessage = Permission denied".
my code::
```
public static HttpData get(String sUrl) {
HttpData ret = new HttpData();
String str;
StringBuffer buff = new StringBuffer();
try {
URL url = new URL(sUrl);
URLConnection con = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
while ((str = in.readLine()) != null) {
buff.append(str);
}
ret.content = buff.toString();
//get headers
Map<String, List<String>> headers = con.getHeaderFields();
Set<Entry<String, List<String>>> hKeys = headers.entrySet();
for (Iterator<Entry<String, List<String>>> i = hKeys.iterator(); i.hasNext();) {
Entry<String, List<String>> m = i.next();
Log.w("HEADER_KEY", m.getKey() + "");
ret.headers.put(m.getKey(), m.getValue().toString());
if (m.getKey().equals("set-cookie"))
ret.cookies.put(m.getKey(), m.getValue().toString());
}
} catch (Exception e) {
Log.e("HttpRequest", e.toString());
}
return ret;
}
```

| con.getInputStream() throw exception in Android project, how to fix? | CC BY-SA 2.5 | null | 2011-01-29T13:09:21.943 | 2011-06-29T05:49:35.767 | 2011-01-29T14:17:02.130 | 315,264 | 315,264 | [
"java",
"android"
]
|
4,837,122 | 1 | 4,837,221 | null | 1 | 303 | i have one application it has mapview .
problem is that i want to show map. means right now when all data loaded then it show mapview. i want to show mapview before it loaded . how can i do this ?
Edit:
for show map i use this `[self performSelector:@selector(methoname) withObject:nil afterDelay:0.02];`
but by this other problem generate .problem is ,it show me two times activity indicator. any other thing ,like performselector but without activity indicator.

i dont want to show this thing.
| mapview is not showing before it load all data | CC BY-SA 2.5 | 0 | 2011-01-29T13:32:00.780 | 2011-04-01T15:38:01.150 | 2011-01-29T19:13:49.703 | 171,206 | null | [
"iphone",
"mkmapview"
]
|
4,837,132 | 1 | 4,838,789 | null | 5 | 6,186 | I am loooking for a good looking layout (template) for a web app, preferably in HTML5/CSS3 and preferably layout like the one pictured below. If that is not possible, then a layout that could easily be changed to a layout like this:

I have (of course) used a lot of time to see if I could find it/google it myself, but haven't found much else than Themeforest and the like - and haven't found the right thing there.
Am ready to spend good money on it, so it is more a matter of finding the right thing than the price.
Project start is Monday, so I cannot go to a design agency as that will take too long, so basically I need a paid or free template that we can later customize.
A simple layout would be sufficient, but a layout with nice design, nicely styled forms, buttons etc. would be preferable.
Any help on where to find it would be highly appreciated :)
| HTML5 / CSS3 template for web app | CC BY-SA 2.5 | 0 | 2011-01-29T13:34:56.893 | 2013-03-25T15:22:50.253 | 2011-01-29T13:38:40.137 | 160,811 | 594,982 | [
"templates",
"web-applications",
"html",
"css"
]
|
4,837,465 | 1 | 4,842,949 | null | 12 | 825 |
## Background
I work with very large datasets from Synthetic Aperture Radar satellites. These can be thought of as high dynamic range greyscale images of the order of 10k pixels on a side.
Recently, I've been developing applications of a single-scale variant of [Lindeberg's scale-space ridge detection algorithm method](http://www.springerlink.com/content/u624470167857570/) for detecting linear features in a SAR image. This is an improvement on using directional filters or using the Hough Transform, methods that have both previously been used, because it is less computationally expensive than either. (I will be presenting some recent results at [JURSE 2011](http://www.pf.bv.tum.de/jurse2011/index.html) in April, and I can upload a preprint if that would be helpful).
The code I currently use generates an array of records, one per pixel, each of which describes a ridge segment in the rectangle to bottom right of the pixel and bounded by adjacent pixels.
```
struct ridge_t { unsigned char top, left, bottom, right };
int rows, cols;
struct ridge_t *ridges; /* An array of rows*cols ridge entries */
```
An entry in `ridges` contains a ridge segment if exactly two of `top`, `left`, `right` and `bottom` have values in the range 0 - 128. Suppose I have:
```
ridge_t entry;
entry.top = 25; entry.left = 255; entry.bottom = 255; entry.right = 76;
```
Then I can find the ridge segment's start (x1,y1) and end (x2,y2):
```
float x1, y1, x2, y2;
x1 = (float) col + (float) entry.top / 128.0;
y1 = (float) row;
x2 = (float) col + 1;
y2 = (float) row + (float) entry.right / 128.0;
```
When these individual ridge segments are rendered, I get an image something like this (a very small corner of a far larger image):

Each of those long curves are rendered from a series of tiny ridge segments.
It's trivial to determine whether two adjacent locations which contain ridge segments are connected. If I have `ridge1` at (x, y) and `ridge2` at (x+1, y), then they are parts of the same line if 0 <= `ridge1.right` <= 128 `ridge2.left` = `ridge1.right`.
## Problem
Ideally, I would like to stitch together all of the ridge segments into lines, so that I can then iterate over each found in the image to apply further computations. Unfortunately, I'm finding it hard to find an algorithm for doing this which is both low complexity memory-efficient suitable for multiprocessing (all important consideration when dealing with really huge images!)
One approach that I have considered is scanning through the image until I find a ridge which only has one linked ridge segment, and then walking the resulting line, flagging any ridges in the line as visited. However, this is unsuitable for multiprocessing, because there's no way to tell if there isn't another thread walking the same line from the other direction (say) without expensive locking.
What do readers suggest as a possible approach? It seems like the sort of thing that someone would have figured out an efficient way to do in the past...
| Memory-efficient line stitching in very large images | CC BY-SA 2.5 | 0 | 2011-01-29T14:45:33.660 | 2011-02-07T16:39:16.090 | 2011-01-29T17:27:46.123 | 266,449 | 266,449 | [
"c",
"image-processing",
"scalability",
"feature-detection",
"satellite-image"
]
|
4,837,928 | 1 | 4,842,554 | null | 2 | 1,228 | I have a buffer of RGB (or RGBA) texture image, and I want to display it on my Android device with the following code. I use OpenGL from NDK.
```
glTexImage2D(GL_TEXTURE_2D,
0,
GL_RGBA,
256,
256,
0,
GL_RGBA,
GL_UNSIGNED_BYTE,
this->pBuffer);
```
I have also set the PixelFormat from the Java side with:
```
this.getHolder().setFormat(PixelFormat.RGBA_8888);
this.setEGLConfigChooser(8, 8, 8, 8, 0, 0);
setRenderer(new MyRenderer());
```
The image is displayed but there are four columns (identical and contains recognizable parts of the original image) and there are horizontal lines all over the image.
What can be the problem?
Original Image:

How it looks with my code:

| OpenGL ES texture problem, 4 duplicate columns and horizontal lines (Android) | CC BY-SA 2.5 | null | 2011-01-29T16:22:10.407 | 2011-01-30T15:36:12.053 | 2011-01-29T16:42:53.820 | 471,016 | 471,016 | [
"android",
"opengl-es",
"android-ndk",
"rgb",
"textures"
]
|
4,837,975 | 1 | 4,837,999 | null | 0 | 180 | 

They are not same, what should I do ?
Thanks :)
| The layout on emulator and android phone are not same | CC BY-SA 2.5 | null | 2011-01-29T16:30:20.773 | 2011-01-29T16:34:57.250 | null | null | 538,788 | [
"android-emulator",
"android-layout",
"absolutelayout"
]
|
4,837,993 | 1 | 4,838,310 | null | 8 | 7,045 | I'm would like to do what lifestream and other sites have done with oauth authentication by using a pop up window. They open a popup window which somehow wasn't blocked by the popup blocker and grey out their site. Then upon allowing oauth access it says redirecting back to original site and kills the popup and returns the site to normal color. How would I go about doing something like this? If I posted anything I shouldn't have its alright because all these accounts are bogus anyway.



| How do I create a popup window when doing oauth? | CC BY-SA 2.5 | 0 | 2011-01-29T16:33:40.707 | 2011-01-29T17:30:03.790 | null | null | 256,062 | [
"javascript",
"facebook",
"twitter",
"oauth",
"popup"
]
|
4,838,171 | 1 | 4,838,233 | null | 3 | 1,844 | I am (still) learning C# - and I thought I understood the difference between `&` & `&&` as well as `|` & `||`...
However, after just reading another guide, it is clear I don't get it.
I wrote a little truth table and as I thought, they return the same. From what I have read, using double symbols sounds like a superior solution, but I am a little confused on the difference and was wondering if anyone could please explain/give an example why/when you would use one instead of the other - I tried reading the MSDN example, but it left me more confused than when I started!

(And, if anyone can come up with a better title, feel free to change it... very awkward to write one!)
| Difference between eager operation and short-circuit operation? (| versus || and & versus &&) | CC BY-SA 4.0 | null | 2011-01-29T17:08:40.447 | 2019-05-08T12:07:35.710 | 2019-05-08T12:07:35.710 | 133,203 | 1,205,001 | [
"c#",
".net"
]
|
4,838,261 | 1 | 4,838,289 | null | 0 | 1,599 | I'm trying to create a interface with a conditional logic that will allow the webmaster to insert advertisments anywhere on the site.
But before coding it, I need some advices from you :)
The forms are handled trough jquery & ajax. When the "add another ad" button is pressed a new form is created with jQuery.
My question is how could I gather all the form input values into a single hidden input that would look like:
`<input name="ad[]" type="hidden" value="homepage,after_article,4,visitors" />`
I think this value would be easier for me to handle in PHP.

| jQuery - store all form input values in a hidden input | CC BY-SA 2.5 | null | 2011-01-29T17:21:41.507 | 2011-01-29T18:36:26.727 | null | null | 376,947 | [
"php",
"javascript",
"jquery",
"html",
"forms"
]
|
4,838,941 | 1 | 4,838,984 | null | 0 | 289 | I have a logo that I saved as a PNG in photoshop that has asymmetrical properties here:
[http://img291.imageshack.us/img291/1226/examplexh.jpg](http://img291.imageshack.us/img291/1226/examplexh.jpg)

The trail is a part of the logo, so when I save the image, it saves it as a massive rectangle with a lot of unused space below the trail, and a bit of unused space above the guy's head.
The problem is, I would like the CSS (using dreamweaver) to look like the mockup in my image, but I can't place the text above or the table below overtop of my image.
Is there a workaround to this? Or am I going to need to save the person and the trail separately and find a way around that?
Here is the CSS I currently have:
```
{
margin: 0px;
padding: 0px;
}
#wrapper {
height: 1.1in;
width: 100%;
background-color: #0277bc;
position: relative;
}
#wrapper #logo {
position: absolute;
left: 40%;
top: 25%;
}
```
The logo needs to always be slightly left of center with the table always be in the center, that's why I defined %'s.
Thanks!
| How do I overlap text and graphics overtop my logo in CSS? | CC BY-SA 2.5 | null | 2011-01-29T19:24:19.003 | 2011-01-29T21:18:18.407 | 2011-01-29T19:42:15.767 | 11,208 | 496,686 | [
"css",
"positioning"
]
|
4,839,099 | 1 | 4,839,188 | null | 1 | 4,505 | I'm working on a new project where the design calls for dynamic rows and columns displayed in some form of grid. I think I can accomplish this very hackishly using the plain ol' Grid, but it seems like it should be possible using a "real" grid.
In my mockup, I circled the tricky bit in red. Under column 1, I have effectively 2 columns of data. The problem is the fact that my data in column 1 can span multiple rows. And the fact that column one is really two pseudo columns and each one can span a different number of rows independently. Note: the data is fake and inconsequential. I'm open to ideas for a good implementation. I can fall back to the Grid and do this all in code behind, I'm open to purchasing a datagrid that may have more power than the DataGrid and my absolute resort/preference is to restructure this format to something a little more doable.
Thank you for any ideas you can provide.
| Dynamic row and column span in WPF DataGrid | CC BY-SA 2.5 | null | 2011-01-29T20:02:06.897 | 2011-01-29T20:19:11.233 | null | null | 26,805 | [
"wpf",
"wpfdatagrid"
]
|
4,839,613 | 1 | 4,839,726 | null | 64 | 114,713 | I guess the title is kind of hard to understand, so I'll explain.
I am trying to achieve this effect:

(a box which has rounded corners and its border, which also has rounded borders).
I've managed to do this, by using the `background-clip` property:

(rounded corners for border but for inner box)
The question is, how can I achieve rounded corners for the inner box?
Thank you!
The HTML I am using:
```
<header class="body template-bg template-border radius-all">
<nav>
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
</ul>
</nav>
</header>
```
And the CSS:
```
.radius-all {
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
.template-bg {
background: #FFF;
-moz-background-clip: padding;
-webkit-background-clip: padding;
background-clip: padding-box;
}
.template-border {
border: 5px solid rgba(255, 255, 255, 0.2);
}
```
| How to make round corners to both inside of a box and its border? | CC BY-SA 4.0 | 0 | 2011-01-29T21:40:07.720 | 2023-02-03T09:52:02.363 | 2018-09-07T10:33:06.187 | 8,993,709 | 433,940 | [
"css",
"rounded-corners"
]
|
4,839,666 | 1 | 4,841,514 | null | 16 | 9,216 | I need to create a multi-step gradient along a circular path, as demonstrated in the following image:

Does anyone have any ideas on how this could be accomplished in XAML rather than code? Would it be possible to use the existing gradient brushes or composite them somehow to achieve this effect?
| Creating Gradient Brush along a Circular Path | CC BY-SA 2.5 | 0 | 2011-01-29T21:47:45.980 | 2021-01-12T19:30:36.373 | null | null | 117,638 | [
"c#",
"wpf",
"gradient"
]
|
4,839,741 | 1 | 4,849,638 | null | 1 | 1,370 | Hi everyone i got the following issue, i have a GridPanel with a RowEditor Nevertheless it doesnt validate my fields when it renders

But if i focus all my fields to edit and refresh the grid its just appear as i would like them in the first place

Can you suggest me something? Thanks!!
| ExtJS RowEditor How to render all the component validation on load | CC BY-SA 2.5 | null | 2011-01-29T22:03:32.890 | 2011-07-17T15:24:16.157 | null | null | 382,920 | [
"extjs",
"editor",
"rendering",
"gridpanel"
]
|
4,839,748 | 1 | 4,839,869 | null | 1 | 191 | I need to join two XML documents using LINQ and I'm not sure where to start. I need to join Document 1 and Document 2 on the values of the EmailAddress nodes and create a final output document that contains the value of the status field from Document 2.
Can anyone help?
Document 1

Document 2

Final Document

| JOIN XML Documents on Value using LINQ | CC BY-SA 2.5 | null | 2011-01-29T22:04:45.587 | 2011-01-30T01:11:35.267 | null | null | 135,498 | [
"xml",
"linq",
"join"
]
|
4,840,211 | 1 | 4,841,580 | null | 0 | 1,314 | Using [GD Star Rating Wordpress Plugin](http://wordpress.org/extend/plugins/gd-star-rating/).
---
I'm having an extremely tough time trying to figure out how to do something as simple as resizing the rating button.
I have an image that I want to use as thumbs up/down, but it's width is 232px instead of the default max 40px.
Has anyone accomplished resizing the stars/thumbs past 40px or am I the only one in the world with this problem?
---
To put it simply:


| GD Star Rating - Thumbs Up/Down Size | CC BY-SA 4.0 | 0 | 2011-01-29T23:47:48.217 | 2019-10-28T04:26:42.820 | 2019-10-28T04:26:42.820 | 1,210,329 | 480,763 | [
"wordpress",
"rating",
"rating-system"
]
|
4,840,224 | 1 | 4,840,272 | null | 4 | 4,269 | I'm making my first foray into GUI programming, and I'm trying to get to grips with wxPython. I'm trying to use wxGlade, but it's turning out to be a bit buggy.
I'm making a layout using GridSizer.
I've worked out that every time you add something to the sizer, it gets put in the next cell. This means if you have an empty cell, you need to fill it with something. Am I right?
This is the layout I'm going for (wxGlade screenshot):

The problem is, generating code from that I get this:

```
grid_sizer_1 = wx.GridSizer(3, 3, 0, 0)
grid_sizer_1.Add(self.button_last_page, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_1.Add(self.button_up, 0, wx.ALIGN_BOTTOM|wx.ALIGN_CENTER_HORIZONTAL, 0)
grid_sizer_1.Add(self.button_next_page, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_1.Add(self.button_left, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_1.Add(self.button_select, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_1.Add(self.button_right, 0, wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_1.Add(self.button_down, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
```
Seemingly because the "Down" button is getting put in the 7th cell instead of the 8th.
What is the standard way of dealing with this? Would you put some kind of dummy widget in to fill the empty cell? If so which widget? Or am I using the wrong kind of sizer?
Thanks!
| wxPython GridSizer - dealing with empty cells | CC BY-SA 2.5 | 0 | 2011-01-29T23:50:14.367 | 2013-06-23T03:45:07.047 | 2011-01-30T00:43:14.480 | 311,220 | 311,220 | [
"python",
"user-interface",
"layout",
"wxpython",
"wxglade"
]
|
4,840,569 | 1 | 4,840,599 | null | 9 | 20,461 | I'm trying to use , but I keep getting this error:

```
public ModelAndView handleRequest( HttpServletRequest request, HttpServletResponse response ) throws Exception {
session = request.getSession();
Map params = new HashMap();
String reportPath = "maintenance/jasper/report01.jasper";
exportToPDF( reportPath , response, params );
return null;
}
protected void exportToPDF( String reportPath , HttpServletResponse response, Map jasperParams ) throws Exception {
String path = session.getServletContext().getRealPath( "/" ) + "layout/tiles/" + reportPath ;
if ( !new File( path ).exists() ) {
throw new Exception( "The path doesn''t exist. </br>" + path );
}
InputStream input = new FileInputStream( path );
jasperParams.put( "REPORT_LOCALE", Locale.US );
JasperPrint jasper = JasperFillManager.fillReport( input , jasperParams, new JRBeanCollectionDataSource(Vehicles) );
response.setContentType( "application/pdf" );
ServletOutputStream output = response.getOutputStream();
JRExporter exporter = new JRPdfExporter();
exporter.setParameter( JRExporterParameter.JASPER_PRINT, jasper );
exporter.setParameter( JRExporterParameter.OUTPUT_STREAM, output );
exporter.exportReport();
output.close();
}
```
Have you any idea why this is happening ?
Thanks Ritesh, I did what you told me, but now I get a new message

------EDIT--------
checking my dispatcher-servlet.xml I found that it's kind of different from the code shown on this [web](http://netbeans.org/kb/68/web/quickstart-webapps-spring.html) . I don't know how it could affect my project, but what I do like to know if there's a different approach to getting the same result as using session..getRealPath( "/" )
```
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.tiles2.TilesView" />
</bean>
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tiles.xml</value>
</list>
</property>
</bean>
```
| Why getservletcontext isn't found? | CC BY-SA 2.5 | 0 | 2011-01-30T01:18:54.933 | 2011-01-30T23:19:26.270 | 2011-01-30T15:18:10.330 | 530,911 | 530,911 | [
"java",
"servlets",
"spring-mvc"
]
|
4,841,032 | 1 | 4,857,854 | null | 0 | 684 | I am making a PropertySheet control with the Windows API, and for some reason tabs are closing when I click on them.
For instance, if I add 4 tabs:

Then if I click on any of those tabs except the active one (in which case nothing happens), it becomes:

And if I click on the inactive tab it disappears, leaving only one tab left.
I am creating the tabs with a dialog template in memory, created like this:
```
static const char initText[] = "Tab";
pagetemplate = (DLGTEMPLATE*)new char[sizeof(DLGTEMPLATE) + sizeof(initText) * 2];
pagetemplate->style = WS_POPUP | DS_3DLOOK | WS_BORDER | WS_SYSMENU | WS_CAPTION | DS_CENTER;
pagetemplate->cdit = 0; // 0 controls
pagetemplate->cx = PROP_SM_CXDLG;
pagetemplate->cy = PROP_SM_CYDLG;
LPWORD lpword = (LPWORD)(pagetemplate + 1);
*lpword++ = 0; // no menu
*lpword++ = 0; // predefined dialog box class (by default)
MultiByteToWideChar(CP_ACP, NULL, initText, -1, (LPWSTR)lpword, sizeof(initText) * 2);
```
Then creating the PropertySheet like this:
PROPSHEETHEADER psh;
```
SecureZeroMemory(&psh, sizeof(PROPSHEETHEADER));
psh.dwSize = sizeof(PROPSHEETHEADER);
psh.dwFlags = PSH_MODELESS | PSH_PROPSHEETPAGE | PSH_USECALLBACK;
psh.pszCaption = "Window";
psh.nPages = 1;
psh.nStartPage = 0;
PROPSHEETPAGE pages[1];
SecureZeroMemory(pages, sizeof(PROPSHEETPAGE));
pages[0].dwSize = sizeof(PROPSHEETPAGE);
pages[0].dwFlags = PSP_DLGINDIRECT;
pages[0].pResource = CGTabWindow::pagetemplate;
pages[0].pfnDlgProc = DialogProc;
pages[0].lParam = (LPARAM)this;
psh.ppsp = (PROPSHEETPAGE*)&pages;
propsheet = PropertySheet(&psh);
```
And adding the four pages like this:
```
PROPSHEETPAGE page;
SecureZeroMemory(&page, sizeof(PROPSHEETPAGE));
page.dwSize = sizeof(PROPSHEETPAGE);
page.dwFlags = PSP_DLGINDIRECT;
page.pResource = CGTabWindow::pagetemplate;
page.pfnDlgProc = DialogProc;
page.lParam = (LPARAM)this;
HPROPSHEETPAGE hpage = CreatePropertySheetPage(&page);
SendMessage((HWND)propsheet, PSM_ADDPAGE, NULL, (LPARAM)hpage);
```
And finally, here's my DialogProc:
```
BOOL CALLBACK DialogProc(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
cout << "hey" << endl;
switch (iMsg)
{
case WM_INITDIALOG :
return TRUE ;
case WM_COMMAND:
switch (LOWORD (wParam))
{
case ID_EDIT :
return TRUE;
case ID_HELP :
return TRUE;
case IDOK :
EndDialog (hDlg, 0) ;
return TRUE ;
}
break ;
}
return FALSE;
}
```
But for some reason, "hey" is never displayed. Also, sending the PSM_INDEXTOHWND with any index always returns NULL. Does anyone know why this is happening?
| PropertySheet tabs close on click | CC BY-SA 2.5 | null | 2011-01-30T03:48:05.640 | 2011-02-01T00:59:34.287 | null | null | 538,627 | [
"c++",
"winapi",
"tabs",
"propertysheet"
]
|
4,841,086 | 1 | 4,843,903 | null | 0 | 184 | Basically, I have an image like this

or one with multiple rectangles within the same image. The rectangles are completely black and white have "dirty" edges and gouges, but it's pretty easy to tell they're rectangles. To be more precise, they are image masks. The white regions are parts of the image which are to be "left alone", but the black parts are to be made bitonal.
My question is, how do I make a nice and crisp rectangle out of this degraded one? I am a Python person, but I to use Qt and C++ for this task. It would be preferable if no other libraries are used.
Thanks!
| How do I fix eroded rectangles? | CC BY-SA 2.5 | 0 | 2011-01-30T04:07:48.577 | 2011-01-30T17:44:50.337 | 2011-01-30T06:01:50.330 | 307,339 | 464,744 | [
"c++",
"qt",
"image-processing",
"qt4",
"masking"
]
|
4,841,228 | 1 | 4,841,276 | null | 8 | 23,269 | From the android tutorial :
```
pass_text.setOnKeyListener(new OnKeyListener() {
public boolean onKey(View v, int keyCode, KeyEvent event) {
// If the event is a key-down event on the "enter" button
if ((event.getAction() == KeyEvent.ACTION_DOWN)
&& (keyCode == KeyEvent.KEYCODE_ENTER)) {
// Perform action on key press
return true;
}
return false;
}
});
}
```
when click at EditText, it has a keyboard appear on the frame. I want to know after Enter.
How to make keyboard out from frame except click Back.

Thank you
| After type in EditText, how to make keyboard disappear | CC BY-SA 2.5 | 0 | 2011-01-30T04:52:39.710 | 2017-02-19T22:27:11.690 | null | null | 538,788 | [
"android",
"keyboard",
"android-edittext"
]
|
4,841,360 | 1 | null | null | 1 | 410 | Effect is generally in mostly vertical with slight horizontal offsets looks like:  often used by paintors in sky painting like [here](http://img.lenta.ru/photo/2011/01/29/exhib/pic006.jpg)
| How to recreate such effect using actionscript/pixel bender? | CC BY-SA 2.5 | 0 | 2011-01-30T05:35:17.253 | 2011-01-30T13:38:24.387 | null | null | 434,051 | [
"actionscript-3",
"drawing",
"effects",
"paint",
"pixel-bender"
]
|
4,841,611 | 1 | 4,841,667 | null | 20 | 22,738 | How would I go about going converting a list of lists of ints into a matrix plot in Python?
The example data set is:
```
[[3, 5, 3, 5, 2, 3, 2, 4, 3, 0, 5, 0, 3, 2],
[5, 2, 2, 0, 0, 3, 2, 1, 0, 5, 3, 5, 0, 0],
[2, 5, 3, 1, 1, 3, 3, 0, 0, 5, 4, 4, 3, 3],
[4, 1, 4, 2, 1, 4, 5, 1, 2, 2, 0, 1, 2, 3],
[5, 1, 1, 1, 5, 2, 5, 0, 4, 0, 2, 4, 4, 5],
[5, 1, 0, 4, 5, 5, 4, 1, 3, 3, 1, 1, 0, 1],
[3, 2, 2, 4, 3, 1, 5, 5, 0, 4, 3, 2, 4, 1],
[4, 0, 1, 3, 2, 1, 2, 1, 0, 1, 5, 4, 2, 0],
[2, 0, 4, 0, 4, 5, 1, 2, 1, 0, 3, 4, 3, 1],
[2, 3, 4, 5, 4, 5, 0, 3, 3, 0, 2, 4, 4, 5],
[5, 2, 4, 3, 3, 0, 5, 4, 0, 3, 4, 3, 2, 1],
[3, 0, 4, 4, 4, 1, 4, 1, 3, 5, 1, 2, 1, 1],
[3, 4, 2, 5, 2, 5, 1, 3, 5, 1, 4, 3, 4, 1],
[0, 1, 1, 2, 3, 1, 2, 0, 1, 2, 4, 4, 2, 1]]
```
To give you an idea of what I'm looking for, the function MatrixPlot in Mathematica gives me this image for this data set:

Thanks!
| convert matrix to image | CC BY-SA 2.5 | 0 | 2011-01-30T06:55:35.223 | 2022-11-30T19:07:45.837 | 2011-01-30T07:32:34.377 | 353,410 | 58,657 | [
"python",
"image",
"matrix"
]
|
4,841,701 | 1 | 4,841,968 | null | 0 | 169 | Recently, I am a bit interested in the deployment of [ASP.NET MVC application on IIS6](http://www.cnblogs.com/misaxi/archive/2011/01/29/odd-things-of-aspnet-mvc-deployment-on-iis6.html) because posted an [easier way](http://haacked.com/archive/2010/12/22/asp-net-mvc-3-extensionless-urls-on-iis-6.aspx) to deploy ASP.NET MVC application on ASP.NET 4. So I decided to see how different version of ASP.NET MVC works on different version of ASP.NET.
First off, I created an ASP.NET MVC 2 project in Visual Studio 2010 and deploy it to IIS 6 on Windows Server 2003 (only .NET framework 3.5 installed). I set the application to run in ASP.NET 2.0 and no extra stuff. Because I just wanted to see what sort of error would occur. And as expected, some error was reported as following.

Then, I set the Copy Local attribute of assembly to as following and deploy again.

As a result, the application ran smoothly.

I had read tons of materials talked about the mess of deploying MVC application on IIS 6. And I did fight to tackle the deploying issues in my previous project. At least, if had used in your application, you should have configured wildcard mapping in IIS. But in this case, I even didn’t have chance to do so.

What the heck was going on exactly? Did I discover a new continent?
| Odd Things of ASP.NET MVC Deployment on IIS 6 | CC BY-SA 2.5 | null | 2011-01-30T07:23:05.283 | 2011-01-30T08:37:03.687 | null | null | 280,970 | [
"asp.net-mvc",
"iis-6"
]
|
4,841,882 | 1 | 4,841,902 | null | 22 | 6,121 | I don't get why emma doesn't give full code coverage to "finally" blocks. I've made a short example program to demonstrate this.
When I execute the program it shows:
```
try
finally
```
So I don't get why finally is marked as red (not executed) and the "finally" "println" is marked yellow (partially executed). Am I missing something? How to make emma understand that the finally block is covered?

Thank you!
| Why emma doesn't give full coverage to finally blocks? | CC BY-SA 2.5 | 0 | 2011-01-30T08:17:57.140 | 2011-01-30T11:20:38.320 | 2011-01-30T11:20:38.320 | 445,543 | 445,543 | [
"java",
"code-coverage",
"emma"
]
|
4,841,872 | 1 | 4,842,683 | null | 4 | 4,571 | I think the line-spacing is different in both editors.
How can I set the font in Vim to look like in Emacs?

```
== Default Font ====
;; Font family
(set-default-font "DejaVu Sans Mono")
;; Font size
(set-face-attribute 'default nil :height 100)
```

```
" set default font
set guifont=DejaVu\ Sans\ Mono\ 10
```
| Why the font DejaVu Sans Mono looks different in (G)Vim and Emacs? | CC BY-SA 2.5 | 0 | 2011-01-30T08:13:42.640 | 2011-01-31T13:30:11.030 | 2011-01-31T13:30:11.030 | 513,198 | 122,536 | [
"vim",
"emacs",
"fonts"
]
|
4,841,957 | 1 | 5,291,055 | null | 0 | 1,165 | Expected output is the same as in the preview, with labels that indicate the specified blocks.
I run this in standard mode and I am using GWT 2.1.1
Below is the



```
<html><head>
<!-- The DOCTYPE declaration above will set the -->
<!-- browser's rendering engine into -->
<!-- "Standards Mode". Replacing this declaration -->
<!-- with a "Quirks Mode" doctype may lead to some -->
<!-- differences in layout. -->
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<!-- -->
<!-- Consider inlining CSS to reduce the number of requested files -->
<!-- -->
<link href="DucWMP.css" rel="stylesheet" type="text/css">
<!-- -->
<!-- Any title is fine -->
<!-- -->
<title>Web Application Starter Project</title>
<!-- -->
<!-- This script loads your compiled module. -->
<!-- If you add any GWT meta tags, they must -->
<!-- be added before this line. -->
<!-- -->
<script src="ducwmp/ducwmp.nocache.js" language="javascript" type="text/javascript"></script><script defer="defer">ducwmp.onInjectionDone('ducwmp')</script>
<!-- -->
<!-- The body can have arbitrary html, or -->
<!-- you can leave the body empty if you want -->
<!-- to create a completely dynamic UI. -->
<!-- -->
<link rel="stylesheet" href="http://127.0.0.1:8888/ducwmp/gwt/standard/standard.css"><style>.GC3DVSKBA{background-color:ivory;}</style></head><body>
<!-- OPTIONAL: include this if you want history support -->
<iframe style="position: absolute; width: 0pt; height: 0pt; border: 0pt none;" tabindex="-1" id="__gwt_historyFrame" src="javascript:''"></iframe>
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
<noscript>
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>
<iframe src="javascript:''" id="ducwmp" style="position: absolute; width: 0pt; height: 0pt; border: medium none;" tabindex="-1"></iframe><div style="position: absolute; z-index: -32767; top: -20cm; width: 10cm; height: 10cm;"> </div><div style="position: relative;" class="GC3DVSKBA"><div style="position: absolute; z-index: -32767; top: -20ex; width: 10em; height: 10ex;"> </div><div style="position: absolute; overflow: hidden; left: 0em; top: 0em; right: 0em; height: 4em;"><div class="gwt-Label" style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;">Header + Navigation</div></div><div style="position: absolute; overflow: hidden; left: 0em; right: 0em; bottom: 0em; height: 2em;"><table cellspacing="0" cellpadding="0" style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;"><tbody><tr><td align="left" style="vertical-align: top;"><div class="gwt-Label">Group control</div></td></tr></tbody></table></div><div style="position: absolute; overflow: hidden; left: 0em; top: 4em; right: 0em; bottom: 2em;"><div style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;" class="gwt-SplitLayoutPanel"><div style="position: absolute; z-index: -32767; top: -20ex; width: 10em; height: 10ex;"> </div><div style="position: absolute; overflow: hidden; top: 0px; right: 0px; bottom: 0px; width: 128px;"><div class="gwt-Label" style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;">Right Sidebar</div></div><div style="position: absolute; overflow: hidden; top: 0px; right: 128px; bottom: 0px; width: 8px;"><div style="width: 8px; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;" class="gwt-SplitLayoutPanel-HDragger"></div></div><div style="position: absolute; overflow: hidden; left: 0px; top: 0px; right: 136px; bottom: 0px;"><div style="overflow: auto; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;"><div style="position: relative;"><div class="gwt-Label">Component Box</div></div></div></div></div></div></div></body></html>
```
| GWT: DockLayout Panel not showing | CC BY-SA 3.0 | null | 2011-01-30T08:34:55.837 | 2014-03-25T16:23:36.763 | 2014-03-25T16:23:36.763 | null | 168,501 | [
"uibinder",
"gwt2",
"docklayoutpanel"
]
|
4,842,016 | 1 | 4,905,748 | null | 5 | 2,007 | How can I add my clock gadget using C# like in below image

I am making clock in Windows Form using C#.
Is this can be done by `notifyIcon` ?
| Clock Gadget in taskbar using C# | CC BY-SA 2.5 | 0 | 2011-01-30T08:51:38.260 | 2017-04-23T19:51:09.727 | 2017-04-23T19:51:09.727 | 15,168 | 479,468 | [
"c#",
"taskbar",
"windows-desktop-gadgets"
]
|
4,842,177 | 1 | null | null | 0 | 90 | I've put all my js files at the bottom of the html but when I'm looking with firebug (in firefox) the js are called just after the html document.
Any solutions? I can do a load of js with onLoad but I would like to know the issue first.
Thanks,
Claudiu
:
I have
```
[html]
[head]
//stuf with no js files included
[/head]
[body]
//content
[script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"][/script]
[script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"][/script]
[script src="js/script.js" type="text/javascript"][/script]
[/body]
[/html]
```
But the javascript is loaded first (as you can see in the picture - firebug - net):

| why is my browser getting js first? | CC BY-SA 2.5 | 0 | 2011-01-30T09:36:35.787 | 2011-01-31T17:35:21.890 | 2011-01-31T13:06:18.673 | 45,664 | 364,951 | [
"javascript"
]
|
4,842,459 | 1 | null | null | 2 | 281 | When i click Firebug's bookmarklet (Firebug Lite) on Internet Explorer .

There is an error on my page.

I can't solve this. Firebug Lite working all other websites, but doesn't working on my webpage.
You can check here : [http://www.teknoblogo.com/yeni](http://www.teknoblogo.com/yeni)
| Error On Page Because Of Firebug-Lite | CC BY-SA 2.5 | null | 2011-01-30T10:45:38.087 | 2011-01-30T11:11:10.843 | null | null | 556,169 | [
"javascript",
"firebug",
"firebug-lite"
]
|
4,842,646 | 1 | 4,842,761 | null | 7 | 1,136 | >
[resize font to fit in a div (on one line)](https://stackoverflow.com/questions/3401136/resize-font-to-fit-in-a-div-on-one-line)
For a small I need to set the correct font size so text would fill all the available width of a fixed-size container; like the text in the four boxes in this picture:

A solution using PHP GD has been provided to [this question](https://stackoverflow.com/questions/289850/auto-font-size-for-text-gd-via-php). Is there a client side solution with css or javascript to this problem?
| CSS: Set font to a size so the text would occupy whole container | CC BY-SA 2.5 | 0 | 2011-01-30T11:30:15.523 | 2011-01-30T12:12:28.297 | 2017-05-23T12:30:36.930 | -1 | 66,580 | [
"php",
"javascript",
"css",
"gd"
]
|
4,842,873 | 1 | 4,848,741 | null | 1 | 566 | I have a UITableView in a UINavigationview in a UIPopOver control. When the user scrolls the UITableView, the view scrolls back to the top once they let it go. How can I tell the UITableView to stay where it is scrolled to?

| iPad UITableView Scroll bouncing back to top | CC BY-SA 2.5 | null | 2011-01-30T12:25:48.090 | 2011-01-31T08:02:31.650 | null | null | 172,861 | [
"ipad",
"uitableview",
"uipopovercontroller"
]
|
4,843,196 | 1 | 4,843,218 | null | 5 | 399 | I am making a keyboard-like buttons for my Hangman game ([SEE PICTURE HERE](https://stackoverflow.com/questions/4836975/java-hangman-project-action-listener)), my problem is about the inner classes. I've read this [LINK](https://stackoverflow.com/questions/4732544/why-are-only-final-variables-accessible-in-anonymous-class) about inner classes and it says that you can only access the outside variables with `FINAL` type. But if I declared the variable as such, I cannot change the value of it anymore... So my problem is that I need to change the value inside the inner class. My code is as follows:
```
public class MainGame extends JDialog {
private String player;
private char [] wordChar;
private JButton[] buttons;
private int level;
private int score;
private int livesLeft;
private int missedGuess;
void newGame() {
level = 0;
score = 0;
livesLeft = 10;
missedGuess = 0;
//label1:
// while (livesLeft!= 0) {
//get random WORD from LIST
Word hiddenWord = new Word();
//put random word in Array
wordChar = new char[hiddenWord.getHiddenWord().length()];
wordChar = hiddenWord.getHiddenWord().toCharArray();
buttons = new JButton[wordChar.length];
for (int i = 0; i < wordChar.length; i++){
JButton guessWord = new JButton(" ");
guessWord.setFont(new Font("Microsoft Sans Serif", 1, 18));
guessWord.setEnabled(false);
jPanel3.setLayout(new GridLayout(1, wordChar.length));
jPanel3.add(guessWord);
buttons[i] = guessWord;
}
checkLetter();
}
void checkLetter() {
int checker = 0;
while(checker != wordChar.length){
jPanel1.setLayout(new GridLayout(3, 9, 3, 5));
for (char buttonChar = 'a'; buttonChar <= 'z'; buttonChar++) {
String buttonText = String.valueOf(buttonChar);
final JButton letterButton = new JButton(buttonText);
letterButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String actionCommand = e.getActionCommand();
for (int j = 0; j < wordChar.length; j++){
String text = String.valueOf(wordChar[j]);
if(actionCommand.equals(text)){
buttons[j].setText(text);
checker++; //THIS CODE IS NOT POSSIBLE!!!!
}
}
}
});
jPanel1.add(letterButton);
}
checker++;
}
}
```
NOTE: The code above is not complete.
The int checker is used to count how many correct letters are already guessed so that if it is equal to the length of the word, I can now proceed to the next level
How can I re-do my code?
| Inner Classes in Java | CC BY-SA 3.0 | 0 | 2011-01-30T13:36:16.103 | 2012-09-21T17:11:54.747 | 2017-05-23T10:30:21.840 | -1 | 525,965 | [
"java"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.