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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,349,415 | 1 | 6,349,532 | null | 0 | 1,377 |
I have a ListView in a dialog and I need to show a button after the list.
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:id="@+id/tvwGameOver" android:layout_weight="1" android:gravity="center"
android:textSize="25sp" android:visibility="gone"
android:layout_width="fill_parent" android:layout_height="wrap_content"/>
<LinearLayout
android:id="@+id/lloPlayerNames" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="horizontal" android:footerDividersEnabled="true"
android:headerDividersEnabled="true" android:layout_below="@id/tvwGameOver">
<TextView
android:id="@+id/tvwGameNumberHeader" android:layout_weight="1" android:gravity="right"
android:text="@string/scores_GameNumber" android:textSize="12sp"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_marginRight="13sp"/>
<TextView
android:id="@+id/tvwPlayer0Name" android:layout_weight="1" android:gravity="right"
android:textSize="12sp"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_marginRight="13sp"/>
<TextView
android:id="@+id/tvwPlayer1Name" android:layout_weight="1" android:gravity="right"
android:textSize="12sp"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_marginRight="13sp"/>
<TextView
android:id="@+id/tvwPlayer2Name" android:layout_weight="1" android:gravity="right"
android:textSize="12sp"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_marginRight="13sp"/>
<TextView
android:id="@+id/tvwPlayer3Name" android:layout_weight="1" android:gravity="right"
android:textSize="12sp"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_marginRight="13sp"/>
</LinearLayout>
<ListView
android:id="@+id/lvwScores" android:layout_below="@id/lloPlayerNames"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:divider="#FFFFFF" android:dividerHeight="1dip"
android:layout_weight="1"
android:footerDividersEnabled="true" android:headerDividersEnabled ="true"/>
<Button android:id="@+id/btnOK"
android:layout_height="wrap_content" android:layout_width="120dip"
android:layout_weight="1"
android:text="OK" android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
/>
</RelativeLayout>
```
Problem is that when the list gets to be too big it just passes the button and the button sits over the top of the list.
I tried to add android:layout_below="@id/lvwScores" to the button but then, when the list is empty, I get a button that runs from the bottom of the screen to the bottom of the list.
If I remove the android:layout_alignParentBottom="true" then the dialog is made small.
At the end of the day, I am looking to have the list filling most of the screen even if part of it is still empty (it is a scores screen), with the button at the bottom.
Any ideas?
This is what it looks like when empty:

It is great, except that when the list builds up and reaches the bottom is down not stop at the button.
|
Listview with button below not working properly
|
CC BY-SA 3.0
| null |
2011-06-14T20:04:45.497
|
2011-06-14T20:18:33.167
|
2011-06-14T20:18:33.167
| 648,746 | 648,746 |
[
"android",
"listview",
"button",
"dialog"
] |
6,349,451 | 1 | 6,351,141 | null | 12 | 5,320 |
I recently discovered you can programatically create selections with Chrome which aren't continuous, by either replacing elements / textnodes inbetween in the parts you want unselected or hiding and then showing them.
Example of non-continuous selections for Chrome: [http://jsfiddle.net/niklasvh/YKJBW/](http://jsfiddle.net/niklasvh/YKJBW/)
```
var t = $('div').contents().get(0);
$.each(t.nodeValue.split(" "),function(i,e){
t = t.splitText(e.length);
if (t.length>0){
t = t.splitText(1);
}
});
var c = $('div').contents();
$.each(c,function(i,e){
if (i>0){
if (i%3) { }else{
e.parentNode.replaceChild($('<unselect />').text(e.nodeValue).get(0),e);
}
}
});
$('unselect').hide();
window.setTimeout(function(){
$('unselect').show();
},0);
```
when performing the copy event, the whole selection does get selected (even if it has gaps in-between), but of course the same method can be used to programatically alter the selection before the copy event is performed.
The tricky part now is that can you actually make this functionality usuable by holding Ctrl down like you can in Firefox to create non-continous selections. The current method I use in the example breaks the TextNodes into many pieces, which for visual purposes does no difference. It however, also uses additional tags to break the selection, which as far as I've discovered, cannot be removed. However, the same functionality can be reached by deleting TextNodes and adding new ones in place for them. The problem is that it will only take into account the last node added, so if you have multiple spaces in your selection, it will only take into account the last DOM change you applied.
Can anyone think of any non-document breaking ways to apply this non-continous selections does not make any permanent changes to the selection and its elements?
Is it possible to make selections which are non continous in Google Chrome? For example if you have an element with text like this:
`<div>this is some random text</div>`
Is it possible to make a selection which contains for example `this is` and `text` making the text in-between unselected?
This seems to work fine in FF, where you can [addRanges](https://developer.mozilla.org/en/DOM/Selection/addRange) which aren't next to each other, and the selection is made accordingly.
For IE, there doesn't seem to be anything that would allow you to have multiple ranges, but IE's selection object has a lot of other methods that compensate for it.
With non-continous selections, you could always append or prepend a selection a certain section from a website for example when performing copy actions, or force the user to unselect certain portions of their selections, which you don't want them to copy.
Example of non-continous selection:

[working example](http://www.hertzen.com/experiments/textanimation/) (working at least in FF4).
To perform the same type of selection manually, you can with firefox hold ctrl down and start dragging text in different positions, but performing it on chrome doesn't work.
I guess [this](http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-January/030100.html) and [this](http://html5.org/specs/dom-range.html#dom-selection-addrange) sum it up quite well. Looks like there isn't anything to be expected as far as webkit browsers are concerned.
|
Non-continuous selections in chrome?
|
CC BY-SA 3.0
| 0 |
2011-06-14T20:06:39.023
|
2011-07-06T15:11:35.803
|
2011-07-06T15:11:35.803
| 774,612 | 774,612 |
[
"javascript",
"google-chrome",
"selection"
] |
6,349,619 | 1 | 6,349,889 | null | 0 | 125 |
I have been working on Survey program in C# (Silverlight) with Entity Framework
Data is kept in one table called question definition where I save all question definitions.
I question is different type based on - it is string a char `"T"` - for text, `"O"` for options etc.
Anyway, how would you structure your design in a way that its easy to get a . In my case I have a form where person can click add new question and then they fill out question name, text followed by `type of the question` in tab view. So person can click on specific tab. I'm sort of lost now how to manage that. I can cast my base question to eg. `LabelQuestion`. Also when person does management of the question they would need to click on question and then I need to write something that would automatically cast that question to specific . As far as I can tell from my limited knowledge of C# & Entity Framework I could do following.
- `QuestionDefinition``QuestionDefinition`- `Question``Question`

|
Picking object based on its TypeCode property
|
CC BY-SA 3.0
| null |
2011-06-14T20:21:00.480
|
2011-06-14T20:46:03.560
|
2011-06-14T20:46:03.560
| 7,116 | 1,725,011 |
[
"c#",
"silverlight",
"entity-framework",
"data-binding"
] |
6,349,689 | 1 | 6,350,629 | null | 0 | 1,751 |
i'm building a gauge widget with raphaeljs, starting with
[http://renatoalbano.github.com/raphael-gauge/](http://renatoalbano.github.com/raphael-gauge/) example..
I don't understand what the criteria is for select a particular "center" for the needle:
in the first example the center of the needle is [140, 5] and the second is [67, 13]... how the author calculate it?
..and can i place the needle like this

or it's necessary to place it in the middle of the circle/gauge?
|
gauge: rotate the needle
|
CC BY-SA 3.0
| null |
2011-06-14T20:26:57.830
|
2011-06-14T22:04:50.883
| null | null | 608,341 |
[
"javascript",
"raphael"
] |
6,349,890 | 1 | 6,360,118 | null | 2 | 4,101 |
I've run into another problem with GD and PHP.
I'm successfully writing text to an image.
However, I've encountered a case where it would be beneficial to place the text - instead of directly on the image - on a rectangle (or any shape) to create a solid background for the text where the image it's being placed on might not allow the text to be read very easily.
My two ideas are, in order of preference:
1. Fill the background with the color as it writes the text
2. Write the text to an appropriately sized image with a solid background, and then overlay the image onto the target
I can't figure out how to do #1 and #2 seems overly complex I don't know how to determine the dimensions of the text so that I can create a new image for it.
For clarity, here is the output that isn't very good:

And here's how I'd like it to look, with a tight box behind the text of any color:

I'm open to any suggestions, but drawing the color on the fly without any other images or hackiness would obviously be my first choice.
# Update:
After @Dan suggested using [`imagettftext'](http://us.php.net/imagettftext), I decided that it was high time I added support for that function to my library. Everything is working as would be expected except for one major issue.
The text that's written to the image is still transparent, even when written to a solid background (0 transparency).
Here's a script I wrote to test:
```
<?php
set_include_path('backbone:global:jquery');
require_once('Image.php');
$scout = new Image();
$scout->source = "scout.jpg";
$result = $scout->Write->Font(25, 25, "A Fairly Long String", 12, "#FF0000", 0, "LiberationSans-Regular.ttf", 1, "#FFFF00", .4, 4);
if( !isset($_GET['dev']) )
{
header("Content-Type: " . $scout->contentType());
}
if( $result )
{
$scout->output();
}
?>
```
The files I used/required:
1. [scout](http://thomasrandolph.info/test/scout.jpg)
2. [liberation font](http://thomasrandolph.info/test/LiberationSans-Regular.ttf)
3. Image Manipulation Library
- [Image](https://github.com/rockerest/myframework/blob/master/backbone/Image.php)
- [ImageBase](https://github.com/rockerest/myframework/blob/master/backbone/ImageBase.php)
- [ImageCombine](https://github.com/rockerest/myframework/blob/master/backbone/ImageCombine.php)
- [ImageDraw](https://github.com/rockerest/myframework/blob/master/backbone/ImageDraw.php)
- [ImageManipulate](https://github.com/rockerest/myframework/blob/master/backbone/ImageManipulate.php)
- [ImageWrite](https://github.com/rockerest/myframework/blob/master/backbone/ImageWrite.php)
I apologize about all the files, it really only uses `Image`, `ImageBase`, `ImageCombine`, and `ImageWrite`, but the others are `require_once`ed by the loader.
Here's a sample of the output from the script above:

And here's output with zero transparency (fully opaque):
`$result = $scout->Write->Font(25, 25, "A Fairly Long String", 12, "#FF0000", 0, "LiberationSans-Regular.ttf", 1, "#FFFF00", 1, 4);`

Any ideas what could be causing this? It's EXTREMELY possible that it's my code somewhere, but it seems strange that it would work exactly as I thought it should except for this one bug.
|
Draw color for text background PHP and GD
|
CC BY-SA 3.0
| 0 |
2011-06-14T20:44:47.337
|
2012-09-27T20:58:00.807
|
2012-09-27T20:58:00.807
| 597,122 | 597,122 |
[
"php",
"background",
"gd",
"background-color"
] |
6,349,940 | 1 | 6,674,642 | null | 8 | 1,638 |
I have set up an EditorGridPanel with ComboBox's and it's working well. The only issue I'm having is that the width of the ComboBox seems to only expand to the width of the grid column, and not the content of the ComboBox itself.
Here's an example of what I mean:

Thanks!
|
ExtJS - ComboBox width in EditorGridPanel
|
CC BY-SA 3.0
| 0 |
2011-06-14T20:48:26.793
|
2016-02-18T08:05:38.343
| null | null | 396,956 |
[
"extjs",
"combobox",
"grid"
] |
6,350,064 | 1 | 6,350,095 | null | 1 | 1,549 |
Hi there I made an application which has two balls.Red and Yellow.
User has to drag `RED BALL` and drop it over the `YELLOW BALL`.it is in X-Y Plane.now i want to calculate what is the accuracy is the overlapping. I know that if the X-Y of target are equal to the X-Y of the Striker then it is 100 percent but how will you calculate it? as if you move the red ball further right value of X of striker gets bigger and percent will not be accurate?I have been using Percent Error formula but it is not accurate
```
double percentErrorX =(CurrentX-targetX)*100/targetX;
double percentErrorY = (CurrentY -targetY)*100/targetY;
```

|
how to find overlapping of circle
|
CC BY-SA 3.0
| 0 |
2011-06-14T20:58:22.743
|
2011-06-14T21:09:25.047
| null | null | 430,167 |
[
"c#",
"winforms",
"math",
"graphics",
"opentk"
] |
6,350,480 | 1 | 6,351,344 | null | 16 | 7,585 |
I would like to use some of the default menu icons provided by the Android OS.

The XML would be something like this:
```
<item android:id="@+id/menu_refresh"
android:icon="@android:drawable/ic_menu_refresh"
android:title="@string/menu_refresh" />
```
But the [documentation](http://developer.android.com/guide/practices/ui_guidelines/icon_design_menu.html) says this is unadvised.
> Warning: Because these resources can
change between platform versions, you
should not reference these icons using
the Android platform resource IDs
(i.e. menu icons under
android.R.drawable).
I thought the whole point of using the default icons is because the design change from OS to OS. By using the default icons, your app will look and feel appropriate for the OS it's running on. So what is so bad about using the default icons? It seems like using the default icons would hurt the appearance of the app.
|
Why shouldn't I use the menu icons provided by the OS?
|
CC BY-SA 3.0
| null |
2011-06-14T21:41:41.503
|
2011-06-22T14:59:54.210
| null | null | 459,987 |
[
"android"
] |
6,350,494 | 1 | 6,350,757 | null | 0 | 549 |
I'm not sure why, but I'm having trouble passing a data object (NSManagedObject) to a view controller when that view controller is being instantiated inside another one. When I log the object before it is passed, it has all of its data, but after it gets to the view controller, it is empty. It seems like this should be fairly straight-forward, but for some reason it's just not getting there.
The code which assigns the NSManagedObject to the accepting view controller in the implementation file is: viewController.thisCard = aCard;
Any help is much appreciated. Thanks in advance.
This is the header for the view controller which scrolls:
```
@interface HandViewController : UIViewController
<UIScrollViewDelegate>
{
IBOutlet UIScrollView *scrollView;
IBOutlet UIPageControl *pageControl;
BOOL pageControlIsChangingPage;
NSManagedObjectContext *context;
}
@property (nonatomic, retain) UIView *scrollView;
@property (nonatomic, retain) UIPageControl *pageControl;
@property (nonatomic, retain) NSManagedObjectContext *context;
/* for pageControl */
- (IBAction)changePage:(id)sender;
@end
```
this is the viewDidLoad in the implementation of that object
```
- (void)viewDidLoad
{
scrollView.delegate = self;
[self.scrollView setBackgroundColor:[UIColor blackColor]];
[scrollView setCanCancelContentTouches:NO];
scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
scrollView.clipsToBounds = YES;
scrollView.scrollEnabled = YES;
scrollView.pagingEnabled = YES;
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Game" inManagedObjectContext:[self context]];
[fetchRequest setEntity:entity];
NSError *error;
NSArray *fetchedGames = [self.context executeFetchRequest:fetchRequest error:&error];
[fetchRequest release];
Game *aGame = [fetchedGames objectAtIndex:0];
CGFloat cx = 0;
for (Card *aCard in aGame.turnUpcoming.hand) {
CardViewController *viewController = [[CardViewController alloc] initWithNibName:@"CardViewController" bundle:nil];
CGRect rect = self.view.frame;
rect.size.height = scrollView.frame.size.height - 50;
rect.size.width = scrollView.frame.size.width - 50;
rect.origin.x = ((scrollView.frame.size.width - rect.size.width) / 2) + cx;
rect.origin.y = ((scrollView.frame.size.height - rect.size.height) / 2);
viewController.view.frame = rect;
viewController.thisCard = aCard;
[scrollView addSubview:viewController.view];
cx += scrollView.frame.size.width;
[viewController release];
}
self.pageControl.numberOfPages = [aGame.turnUpcoming.hand count];
[scrollView setContentSize:CGSizeMake(cx, [scrollView bounds].size.height)];
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}
```
UPDATE: Per request, I am adding a bit of code from the view controller
This is the header for CardViewController
```
@interface CardViewController : UIViewController {
UILabel IBOutlet *cardValue;
UILabel IBOutlet *cardInstruction;
UILabel IBOutlet *cardHint;
UILabel IBOutlet *cardTimer;
UIButton IBOutlet *playCardButton;
Card *thisCard;
}
@property (nonatomic, retain) UILabel IBOutlet *cardValue;
@property (nonatomic, retain) UILabel IBOutlet *cardInstruction;
@property (nonatomic, retain) UILabel IBOutlet *cardHint;
@property (nonatomic, retain) UILabel IBOutlet *cardTimer;
@property (nonatomic, retain) UIButton IBOutlet *playCardButton;
@property (nonatomic, retain) Card *thisCard;
@end
```
Here is the viewDidLoad from the implementation of CardViewController
```
- (void)viewDidLoad
{
[super viewDidLoad];
if ([thisCard isObjectValid]) {
cardValue.text = [thisCard.value stringValue];
}
}
```
UPDATE: new code for card loop in viewDidLoad and new CardView code, per suggestions below
loop in viewDidLoad:
```
for (Card *aCard in aGame.turnUpcoming.hand) {
CGRect rect = scrollView.frame;
rect.size.height = scrollView.frame.size.height - 50;
rect.size.width = scrollView.frame.size.width - 50;
rect.origin.x = ((scrollView.frame.size.width - rect.size.width) / 2) + cx;
rect.origin.y = ((scrollView.frame.size.height - rect.size.height) / 2);
tempCardView = [[CardView alloc] initWithFrame:rect];
tempCardView.thisCard = aCard;
NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"CardView" owner:self options:nil];
tempCardView = [nibObjects objectAtIndex:0];
[scrollView addSubview:tempCardView];
cx += scrollView.frame.size.width;
[tempCardView release];
}
```
header file CardView.h
```
@interface CardView : UIView {
UILabel IBOutlet *cardValue;
UILabel IBOutlet *cardInstruction;
UILabel IBOutlet *cardHint;
UILabel IBOutlet *cardTimer;
UIButton IBOutlet *playCardButton;
Card *thisCard;
}
@property (nonatomic, retain) UILabel IBOutlet *cardValue;
@property (nonatomic, retain) UILabel IBOutlet *cardInstruction;
@property (nonatomic, retain) UILabel IBOutlet *cardHint;
@property (nonatomic, retain) UILabel IBOutlet *cardTimer;
@property (nonatomic, retain) UIButton IBOutlet *playCardButton;
@property (nonatomic, retain) Card *thisCard;
@end
```
implementation file CardView.m
```
@implementation CardView
@synthesize cardHint;
@synthesize cardTimer;
@synthesize cardValue;
@synthesize cardInstruction;
@synthesize playCardButton;
@synthesize thisCard;
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
if ([thisCard isObjectValid]) {
cardValue.text = [thisCard.value stringValue];
cardInstruction.text = thisCard.instruction;
cardHint.text = thisCard.hint;
cardTimer.text = [thisCard.time stringValue];
}
}
return self;
}
@end
```
UPDATED: 6/16 - Added XIB screen shot
CardView.xib

|
Can't pass a data object to view controller inside a view controller
|
CC BY-SA 3.0
| null |
2011-06-14T21:43:18.887
|
2011-06-17T16:32:27.733
|
2011-06-17T16:32:27.733
| 580,850 | 708,964 |
[
"iphone",
"objective-c",
"ios",
"cocoa-touch"
] |
6,350,688 | 1 | null | null | 1 | 214 |
I want to use this framework called Music21.
In the shell everything works fine. For example, the command:
```
from music21 import corpus
```
works perfectly. In the IDE there is an import error.
the music21 path is:
```
>>> music21.__file__
'/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/music21/__init__.pyc'
```
I put this path in the IDE:

EDIT: the commands:
> import music21
print dir(music21)
gives me in the shell:
> > > ['DefinedContexts', 'DefinedContextsException', 'ElementException', 'ElementWrapper', 'GroupException', 'Groups', 'JSONSerializer', 'JSONSerializerException', 'Music21Exception', 'Music21Object', 'Music21ObjectException', 'Test', 'TestMock', 'VERSION', 'VERSION_STR', 'WEAKREF_ACTIVE', '', '', '', '', '', '', '', 'abc', 'abj', 'analysis', 'articulations', 'bar', 'base', 'beam', 'chord', 'chordTables', 'clef', 'codecs', 'common', 'composition', 'configure', 'converter', 'copy', 'corpus', 'counterpoint', 'defaults', 'demos', 'derivation', 'doc', 'doctest', 'duration', 'dynamics', 'editorial', 'environLocal', 'environment', 'expressions', 'figuredBass', 'graph', 'humdrum', 'inspect', 'instrument', 'interval', 'intervalNetwork', 'json', 'key', 'layout', 'lily', 'mainTest', 'matplotlib', 'medren', 'metadata', 'meter', 'midi', 'musedata', 'musicxml', 'note', 'numpy', 'parse', 'pitch', 'ratios', 'repeat', 'roman', 'romanText', 'scale', 'serial', 'sieve', 'spanner', 'stream', 'sys', 'tempo', 'test', 'text', 'tie', 'tinyNotation', 'trecento', 'types', 'unittest', 'uuid', 'voiceLeading', 'xmlnode']
and in the IDE:
> > > ['', '', '', '', '', '', '', 'music21']
|
Import where subfolder is same as outer folder
|
CC BY-SA 3.0
| null |
2011-06-14T22:05:23.970
|
2014-05-24T18:12:08.107
|
2014-05-24T18:12:08.107
| 128,660 | 72,099 |
[
"python",
"music21"
] |
6,351,012 | 1 | 6,351,054 | null | 1 | 1,730 |
i'm use below query for fetch my data with an ordernumber...
```
SELECT Details.Quantity,
Details.OrderNumber,
Orders.OrderDate,
Products.ProductName,
Products.UnitPrice ,
Details.Quantity*Products.UnitPrice as qprice
FROM Details
INNER JOIN Orders
ON Details.OrderNumber = Orders.OrderNumber
INNER JOIN Products
ON Details.ProductID = Products.ProductID
where Orders.OrderNumber='14195'
```
this query give me below result

now i want give sum of qprice column..
how can i do this??
|
how to get sum of this column in sql server
|
CC BY-SA 3.0
| null |
2011-06-14T22:41:10.813
|
2011-06-15T01:00:22.223
|
2011-06-15T01:00:22.223
| 732,945 | 783,484 |
[
"c#",
".net",
"asp.net",
"sql",
"sql-server"
] |
6,351,053 | 1 | 6,351,167 | null | 1 | 3,411 |
I implemented customized rating bar as explained here
[How to create Custom Ratings bar in Android](https://stackoverflow.com/questions/5800657/how-to-create-custom-ratings-bar-in-android)
but when I try to make the minHeight of the rating bar<23 I always get this result

while I wanna make a rating bar with this size

do I have to resize the images I use in drawable according to the rating bar max and min heights or what?
|
Problem with custom rating bar in android
|
CC BY-SA 3.0
| 0 |
2011-06-14T22:45:27.220
|
2011-06-14T22:58:51.203
|
2017-05-23T12:07:02.087
| -1 | 760,538 |
[
"android"
] |
6,351,081 | 1 | 6,354,746 | null | 7 | 32,158 |
I have run into this issue several times in the past and would like to know how to resolve it.
When `Modal` and `Popup` are set to True on an MS Access 2003 Form, in what looks to be inconsistent occurrences, when the form loads, the form will be bunched up in the left hand corner of the screen. Sometimes it happens and sometimes it doesn't, I can't seem to pin-point what exactly is triggering the change in the form. But, once it does happen, it remains bunched up like this until the Form is put in Design mode and modified to have `.Modal = False` and `.Popup = False`
Here is an example of what the form looks like after loading it: 
Here is an example of what the properties are set to on the Form: 
Does anyone know why this occurs and how to prevent it while maintaining `.Modal = True` and `.Popup = True`?
Basically I require for my use case to have both `.Popup` and `.Modal` to be set to True and having the Form resize on its own volition even when the property `.BorderStyle` is changed from `Sizable` to `Dialog` is rather perplexing. Maybe I am missing something.
Any pointers would be much appreciated.
Thanks,
|
MS Access Forms resize when Modal and Popup are set to True
|
CC BY-SA 3.0
| 0 |
2011-06-14T22:48:17.167
|
2016-01-17T06:43:18.000
| null | null | 3,155 |
[
"forms",
"ms-access",
"view"
] |
6,351,122 | 1 | 6,351,188 | null | 3 | 9,848 |
Is there a way to have a click event on a div act the same as a radio button in a form environment? I just want the below div's to submit the value, the radio buttons are ugly

The code gets outputted like this:
```
<input id="radio-2011-06-08" value="2011-06-08" type="radio" name="radio_date">8</input></li><li id="li-2011-06-09" class=" "><input id="radio-2011-06-09" value="2011-06-09" type="radio" name="radio_date">9</input></li><li id="li-2011-06-10" class=" "><input id="radio-2011-06-10" value="2011-06-10" type="radio" name="radio_date">10</input></li><li id="li-2011-06-11" class=" end "><input id="radio-2011-06-11" value="2011-06-11" type="radio" name="radio_date">11</input></li><li id="li-2011-06-12" class=" start "><input id="radio-2011-06-12" value="2011-06-12" type="radio" name="radio_date">12</input></li><li id="li-2011-06-13" class=" "><input id="radio-2011-06-13" value="2011-06-13" type="radio" name="radio_date">13</input></li><li id="li-2011-06-14" class=" "><input id="radio-2011-06-14" value="2011-06-14" type="radio" name="radio_date">14</input></li><li id="li-2011-06-15" class=" "><input id="radio-2011-06-15" value="2011-06-15" type="radio" name="radio_date">15</input></li><li id="li-2011-06-16" class=" "><input id="radio-2011-06-16" value="2011-06-16" type="radio" name="radio_date">16</input></li><li id="li-2011-06-17" class=" "><input id="radio-2011-06-17" value="2011-06-17" type="radio" name="radio_date">17</input></li><li id="li-2011-06-18" class=" end "><input id="radio-2011-06-18" value="2011-06-18" type="radio" name="radio_date">18</input></li><li id="li-2011-06-19" class=" start "><input id="radio-2011-06-19" value="2011-06-19" type="radio" name="radio_date">19</input></li><li id="li-2011-06-20" class=" "><input id="radio-2011-06-20" value="2011-06-20" type="radio" name="radio_date">20</input></li><li id="li-2011-06-21" class=" "><input id="radio-2011-06-21" value="2011-06-21" type="radio" name="radio_date">21</input></li><li id="li-2011-06-22" class=" "><input id="radio-2011-06-22" value="2011-06-22" type="radio" name="radio_date">22</input></li><li id="li-2011-06-23" class=" "><input id="radio-2011-06-23" value="2011-06-23" type="radio" name="radio_date">23</input></li><li id="li-2011-06-24" class=" "><input id="radio-2011-06-24" value="2011-06-24" type="radio" name="radio_date">24</input></li><li id="li-2011-06-25" class=" end "><input id="radio-2011-06-25" value="2011-06-25" type="radio" name="radio_date">25</input></li><li id="li-2011-06-26" class=" start "><input id="radio-2011-06-26" value="2011-06-26" type="radio" name="radio_date">26</input></li><li id="li-2011-06-27" class=" "><input id="radio-2011-06-27" value="2011-06-27" type="radio" name="radio_date">27</input></li><li id="li-2011-06-28" class=" "><input id="radio-2011-06-28" value="2011-06-28" type="radio" name="radio_date">28</input></li><li id="li-2011-06-29" class=" "><input id="radio-2011-06-29" value="2011-06-29" type="radio" name="radio_date">29</input></li><li id="li-2011-06-30" class=" "><input id="radio-2011-06-30" value="2011-06-30" type="radio" name="radio_date">30</input></li><li id="li-" class=" inactive"></li><li id="li-" class=" end inactive"></li></ul><div class="clear"></div></div>
```
|
Div click same as radio button?
|
CC BY-SA 3.0
| 0 |
2011-06-14T22:53:13.403
|
2011-06-14T23:26:16.370
|
2011-06-14T23:26:16.370
| 764,653 | 764,653 |
[
"php",
"jquery",
"forms"
] |
6,351,151 | 1 | 19,307,787 | null | 12 | 5,111 |
Is anyone aware of a Winforms control for c# similar to the Tags control that stackoverflow uses (see below)?

If not, what are some good alternatives you've used to handle tags?
|
Tag control like stackoverflow's
|
CC BY-SA 3.0
| 0 |
2011-06-14T22:56:39.553
|
2021-09-24T19:18:56.387
|
2011-06-14T22:59:21.937
| 303,427 | 563,229 |
[
"c#",
"winforms",
"visual-studio-2010"
] |
6,351,337 | 1 | null | null | 0 | 4,812 |
>
[PHP / MYSQL Add button to column](https://stackoverflow.com/questions/6325281/php-mysql-add-button-to-column)
Please correct any mistakes throughout this question - I am very new to both PHP and MYSQL.
My goal is to create a table, that I will display onto a web page that looks something like this:
I have done the following. Any help on where I go wrong is much appreciated.
1. Created a MYSQL Table named "CustomerInformation"
2. Added five columns to the table, identical to the five columns in the picture above; (id, name, email, is_admin, Action).
3. I made four $POST text boxes whose data will be passed into each column (other than the last one as I want an "action" button to appear there).
4. Below I will show my full code for which I used in order to populate a new row in my CustomerInformation table.
```
<?php
// Connect to the database
mysql_connect ("localhost","username","password") or die ('Error: ' . mysql_error());
echo "connected to database!";
mysql_select_db ("database");
// Create variables to retrieve the POST data
$ID= $_POST['textbox1'];
$C_ID= $_POST['textbox2'];
$Value= $_POST['textbox3'];
$Count= $_POST['textbox4'];
$action = ' "<input type="submit" name="AddRow" value="Add New Row" />"';
// Insert data into table
$query = "INSERT INTO CustomerInformation (ID,C_ID,Value,Count,Action)
VALUES(
'".$ID."', '".$C_ID."', '".$Value."', '".$Count."','".$action."')";
mysql_query($query) or die ('Error updating database');
echo "Database updated successfully!";
?>
```
The only problem occurs when I include the line: `$action = ' "<input type="submit" name="AddRow" value="Add New Row" />"';`
I am clearly butchering this line, and I would greatly appreciate any help at all on this one!
|
Adding control to a table (PHP)
|
CC BY-SA 3.0
| null |
2011-06-14T23:23:32.107
|
2017-07-16T19:27:26.687
|
2017-07-16T19:27:26.687
| 4,370,109 | null |
[
"php",
"mysql",
"button"
] |
6,351,377 | 1 | 6,351,811 | null | 15 | 13,895 |
Anyone knows how to perform RGB histogram matching on two colored images?
for example this is an image to be re-mapped:

and this is a target image

Then the RGB remapped image look like this

here is what I did so far, in this code I took two color images `im1` and `im2`
I took the `im1` which is the one that has to be remapped then broke it up into
its colors then I took each color of im1 and used `histeq` to match their histograms to
each color in `im2`.
I don't know how to reconstruct the re-mapped image from the colors I matched, any help please that would be nice??:
```
im1 = imread('Atlas-Mer.png');
im2 = imread('techno-trs.png');
Red1 = im1(:, :, 1);
Green1 = im1(:, :, 2);
Blue1 = im1(:, :, 3);
.
.
.
Red2 = im2(:, :, 1);
Green2 = im2(:, :, 2);
Blue2 = im2(:, :, 3);
red2n = histeq(Red2,HnRed1);
green2n = histeq(Green2,HnGreen1);
blue2n = histeq(Blue2,HnBlue1);
```
|
Histogram matching of two colored images in matlab
|
CC BY-SA 3.0
| 0 |
2011-06-14T23:29:40.217
|
2016-07-01T13:36:22.033
|
2011-06-15T01:06:44.147
| 712,796 | 712,796 |
[
"matlab",
"image-processing",
"histogram"
] |
6,351,612 | 1 | null | null | 29 | 37,690 |
I'm pretty much new to the MVVM architecture design...
I was struggling lately to find a suitable control already written for such a purpose but had no luck, so I reused parts of XAML from another similar control and got make my own.
What I want to achieve is:
Have a reusable View (usercontrol) + viewmodel (to bind to) to be able to use inside other views as a modal overlay showing a dialog that disables the rest of the view, and shows a dialog over the it.

How I wanted to implement it:
- - - -
pseudoXAML:
```
<usercontrol /customerview/ ...>
<grid>
<grid x:Name="content">
<various form content />
</grid>
<ctrl:Dialog DataContext="{Binding DialogModel}" Message="{Binding Message}" Commands="{Binding Commands}" IsShown="{Binding IsShown}" BlockedUI="{Binding ElementName=content}" />
</grid>
</usercontrol>
```
So here the modal dialog gets the datacontext from the DialogModel property of the Customer viewmodel, and binds commands and message. It would be also bound to some other element (here 'content') that needs to be disabled when the dialog shows (binding to IsShown). When you click some button in the dialog the associated command is called that simply calls the associated action that was passed in the constructor of the viewmodel.
This way I would be able to call Show() and Hide() of the dialog on the dialog viewmodel from inside the Customer viewmodel and alter the dialog viewmodel as needed.
It would give me only one dialog at a time but that is fine.
I also think that the dialog viewmodel would remain unittestable, since the unittests would cover the calling of the commands that ought to be created after it being created with Actions in the constructor. There would be a few lines of codebehind for the dialog view, but very little and pretty dumb (setters getters, with almost no code).
What concerns me is:
Is this ok?
Are there any problems I could get into?
Does this break some MVVM principles?
Thanks a lot!
EDIT: I posted my complete solution so you can have a better look. Any architectural comments welcome. If you see some syntax that can be corrected the post is flagged as community wiki.
|
WPF MVVM Modal Overlay Dialog only over a View (not Window)
|
CC BY-SA 3.0
| 0 |
2011-06-15T00:07:01.937
|
2015-03-18T11:47:42.793
|
2011-06-15T18:24:31.860
| 610,204 | 610,204 |
[
"c#",
"wpf",
"mvvm",
"wpf-controls"
] |
6,351,681 | 1 | null | null | 2 | 13,038 |
I have this database structure...

(It´s on spanish, hope doesn´t matter) and I made this query using inner join but I don´t get any result so I guess I did something wrong... This is my query...
```
SELECT TBoleta.NroSerie+'-'+TBoleta.NroBoleta Boleta, TBoleta.Fecha,
TAlumno.APaterno+' '+TAlumno.AMaterno+' '+TAlumno.Nombres as Apellidos_y_Nombres,
TGrupoModulo.Modulo + ' ' + TGrupoModulo.Seccion + ' ' + TGrupoModulo.Turno,
TBoleta.Monto
FROM TMatricula
inner join TAlumno on TMatricula.CodAlumno = TAlumno.CodAlumno
inner join TBoleta on TBoleta.NroMatricula = TMatricula.NroMatricula
inner join TGrupoModulo on TGrupoModulo.CodGrupoModulo = TMatricula.CodGrupoModulo
```
Please... I will appreciate any help. Thanks!
|
4 TABLES INNER JOIN SQL STATEMENT
|
CC BY-SA 3.0
| null |
2011-06-15T00:18:11.807
|
2012-05-16T11:10:50.993
|
2011-06-15T00:27:07.563
| 647,399 | 647,399 |
[
"sql",
"inner-join"
] |
6,352,015 | 1 | 6,353,160 | null | 0 | 117 |
Tables:
Students
Professors
Entries (there’s no physical table intry in the database for entries yet, this table is on the front-end, so it is probably composed from multiple helper tables if we need them. Just need to create valid erd)
Preambula:
One student can have an association to many professors
One professor can have an association to many students
One entry can have 0,1 or more Students or professors in it.
Professor is required to be associated with one or more students
Student is not required to have an association with any professor
It should be more like this (front-end entry table):

Any professor in this table must have an associated name in the table.( For example Wandy is associated to Alex)
It is not required for student (but possible) to have associated professors in this table
One row (for example Linda (Student), Kelly (Professor),Victor (Professor))
Cannot be associated between each other in any manner.
But it is absolutely fine if Linda associated with David.
The problem is that I do not quite understand how one column can have ids of different tables (And those are multiple!) And do not quite understand how to build valid erd for that.
I will answer any additional questions you need. Thanks a lot!
|
Question on Database Modeling
|
CC BY-SA 3.0
| null |
2011-06-15T01:28:27.943
|
2011-06-15T04:51:49.397
|
2011-06-15T01:57:33.437
| 194,076 | 194,076 |
[
"sql",
"sql-server",
"erd"
] |
6,352,454 | 1 | 6,357,268 | null | 21 | 47,194 |
I have 2 tables and i am using join to get common records from those 2 tables. i have used the following query but my problem is i am getting the records doubled. The query is as follows
```
SELECT * FROM pos_metrics pm INNER JOIN pos_product_selling pps ON
pm.p_id=pps.p_id WHERE pm.p_id='0' AND pps.pos_buying_id='0' AND pm.type=1
```
pos_metrics table:

pos_product_selling table:

Output:

EDIT
When I tried to use GROUP BY and DISTINCT together I am not getting duplicates but the value from the second table is repeated. Any other solutions ?
|
Mysql join gives duplicate rows
|
CC BY-SA 3.0
| 0 |
2011-06-15T02:42:08.593
|
2021-09-24T09:10:10.097
|
2011-06-15T11:15:06.767
| 402,610 | 402,610 |
[
"mysql",
"join",
"left-join"
] |
6,352,653 | 1 | null | null | 2 | 84 |
I will like to do the opposite of [THIS](https://stackoverflow.com/questions/6352448/grouping-in-statement-sql). In other words how could I do something like:
```
SELECT *
FROM table1
WHERE col1, col2 NOT IN (SELECT col1, col2
FROM table1
WHERE col3 < 4)
```
Note the `NOT` clause.
EDIT
I am editing the question to explain what I am trying to do.
so I have the following table:

note that every time I scan a directory I enter the files that where found in this table (table1). By looking at the table we know that the first time I scan the directory there where files A and B. The second time we scan the directory we can say that files A and B where still there with an additional file C. we also know that on the second scan file A was modified because it has a different dateModified. I am interested in the last scan. From looking at it I know that we still have files A, B, and C with the addition of file X and modification of file B. That's why I wanted to build the query
```
select * from table1
WHERE FileID, DateModified NOT IN
(SELECT Path, DateModified From table1 WHERE DateInserted<4)
```
hoping to get files X and B because those are the files that are not in all records with DateInserted<4 . Sorry for not explaining my self clearly.
|
grouping IN statement sql part 2( negating it)
|
CC BY-SA 3.0
| null |
2011-06-15T03:17:25.157
|
2011-06-15T14:41:58.647
|
2017-05-23T12:13:39.697
| -1 | 637,142 |
[
"sql",
"sqlite"
] |
6,352,740 | 1 | 6,353,051 | null | 85 | 144,238 |
I'm currently using Matplotlib to create a histogram:

```
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as pyplot
...
fig = pyplot.figure()
ax = fig.add_subplot(1,1,1,)
n, bins, patches = ax.hist(measurements, bins=50, range=(graph_minimum, graph_maximum), histtype='bar')
#ax.set_xticklabels([n], rotation='vertical')
for patch in patches:
patch.set_facecolor('r')
pyplot.title('Spam and Ham')
pyplot.xlabel('Time (in seconds)')
pyplot.ylabel('Bits of Ham')
pyplot.savefig(output_filename)
```
I'd like to make the x-axis labels a bit more meaningful.
Firstly, the x-axis ticks here seem to be limited to five ticks. No matter what I do, I can't seem to change this - even if I add more xticklabels, it only uses the first five. I'm not sure how Matplotlib calculates this, but I assume it's auto-calculated from the range/data?
- even to the point of one for each bar/bin?
(Ideally, I'd also like the seconds to be reformatted in micro-seconds/milli-seconds, but that's a question for another day).
Secondly, I'd like - with the actual number in that bin, as well as the percentage of the total of all bins.
The final output might look something like this:

Is something like that possible with Matplotlib?
Cheers,
Victor
|
Matplotlib - label each bin
|
CC BY-SA 3.0
| 0 |
2011-06-15T03:34:06.150
|
2020-07-27T02:37:19.923
| null | null | 139,137 |
[
"python",
"matplotlib",
"visualization",
"histogram",
"graphing"
] |
6,352,775 | 1 | 6,357,785 | null | 0 | 2,739 |
Problem: how to not display the start date 31/05 and end date 16/06
These values are not brought into the control via the dataset (hence there can never be any data) as shown in the table below

|
ReportViewer chart - x axis adding start and end dates
|
CC BY-SA 3.0
| null |
2011-06-15T03:42:09.267
|
2011-06-15T12:39:58.970
|
2020-06-20T09:12:55.060
| -1 | 26,086 |
[
"reporting-services",
"reportviewer",
"charts"
] |
6,352,868 | 1 | 6,353,009 | null | 2 | 1,231 |
I am trying to add the LVL library project to my application's project. It should be simple and straightforward, but it isn't:
When I click the `Add...` button, I receive the Library Project Selection dialog as expected:

I select it and it is being accepted with the green checkmark next to it.
However, when I re-open that Properties > Android box again, it gets a red X next to it, making it unusable:

There is an excellent answer documenting the "delicate behavior" of referencing a library project, but despite implementing the tips there (same root directory), I am still having this problem.
How do I solve (or workaround) this problem?
Is there a way to make Eclipse/ADT use fewer`..\..`s to represent the path of the referenced library project? (all is needed to reference that library correctly is `..\..\thisisinsane\library`, there really is no need for all that `..\..\..\..\..\..`)
|
How to control the RELATIVE path of a reference Library Project?
|
CC BY-SA 3.0
| null |
2011-06-15T04:03:36.470
|
2011-06-15T04:28:55.790
|
2011-06-15T04:16:23.947
| 636,571 | 636,571 |
[
"android",
"adt",
"android-lvl",
"library-project"
] |
6,352,869 | 1 | 6,360,912 | null | 8 | 2,480 |
Take a look at the Droplr iPhone app:

Notice how the `UIBarButtonItem`s are able to touch the right, left, top, and bottom of the screen/navigation bar?
How can I achieve something similar? Here's how I make a sample UIBarButton and set it to the right item:
```
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setImage:image forState:UIControlStateNormal];
button.frame= CGRectMake(0.0, 0.0, image.size.width, image.size.height);
[button addTarget:self action:action forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *bb = [[[UIBarButtonItem alloc] initWithCustomView:button]autorelease];
[self.navigationItem setRightBarButtonItem:bb animated:YES];
```
However, it is right aligned, and has quite a bit of margin from the top & the bottom. My image size is correct (44px), and it looks like it shrinks it to fit a frame of sorts.
So, how can I do this?
---
Whoops, the top/bottom spacing was my fault. However, I can't figure out how to align the bar button flush with the left/right side. Here's what I mean: (sorry for the ugly button, it was just a test)

I tried setting the image inserts, but it didn't seem to do anything.
|
Allow a UIBarButtonItem to touch top & bottom of UINavigationBar
|
CC BY-SA 3.0
| 0 |
2011-06-15T04:03:42.990
|
2011-06-15T16:18:33.520
|
2011-06-15T14:00:02.090
| 456,851 | 456,851 |
[
"iphone",
"cocoa-touch",
"uinavigationbar",
"uibarbuttonitem"
] |
6,353,183 | 1 | 6,353,222 | null | 6 | 22,956 |
Hello I have table name that contains duplicate records as shown below
```
fID UserID FriendsID IsSpecial CreatedBy
-----------------------------------------------------------------
1 10 11 FALSE 1
2 11 5 FALSE 1
3 10 11 FALSE 1
4 5 25 FALSE 1
5 10 11 FALSE 1
6 12 11 FALSE 1
7 11 5 FALSE 1
8 10 11 FALSE 1
9 12 11 FALSE 1
```
I want to remove duplicate combinations rows using MS SQL?
Remove latest duplicate records from MS SQL FriendsData table.
here I attached image which highlights duplicate column combinations.

How I can removed all duplicate combinations from SQL table?
|
How to delete all duplicate records from SQL Table?
|
CC BY-SA 3.0
| 0 |
2011-06-15T04:55:17.737
|
2022-02-06T09:31:59.180
|
2018-03-28T11:03:20.763
| 3,876,565 | 568,085 |
[
"sql",
"sql-server",
"tsql",
"sql-server-2005",
"duplicates"
] |
6,353,337 | 1 | 6,437,581 | null | 9 | 6,004 |
Does Mathematica support [hidden line removal](http://en.wikipedia.org/wiki/Hidden_line_removal) for wire frame images? If this isn't the case, has anybody here ever come across a way to do it? Lets start with this:
```
Plot3D[Sin[x+y^2], {x, -3, 3}, {y, -2, 2}, Boxed -> False]
```

To create a wire frame we can do:
```
Plot3D[Sin[x+y^2], {x, -3, 3}, {y, -2, 2}, Boxed -> False, PlotStyle -> None]
```

One thing we can do to achieve the effect is to color the all the surfaces white. This however, is undesirable. The reason is because if we export this hidden line wire frame model to pdf we will have all of those white polygons that Mathematica uses to render the image. I want to be able to obtain a wire frame with hidden line removal in pdf and/or eps format.
---
## UPDATE:
I have posted a solution to this problem. The problem is that the code runs very slow. In its current state it is unable to generate the wireframe for the image in this question. Feel free to play with my code. I added a link to it at the end of my post. You can also find the code in this [link](http://math.uh.edu/~jmlopez/Mathematica/StackOverflow_WireFrame.nb)
|
Mathematica: 3D wire frames
|
CC BY-SA 3.0
| 0 |
2011-06-15T05:16:34.713
|
2011-06-22T09:24:16.593
|
2011-06-22T09:24:16.593
| 788,553 | 788,553 |
[
"wolfram-mathematica",
"plot",
"wireframe",
"mathematica-8"
] |
6,353,350 | 1 | 6,353,870 | null | 29 | 78,710 |
>
[Conditional Linq Queries](https://stackoverflow.com/questions/11194/conditional-linq-queries)
Using Entity Framework 4.0
I have a search condition like this

There are four fields that allow the users to filter their search. The conditions are all `AND`. The result has to omit the corresponding filter if the textbox value is `String.Empty` or the dropdownlist value is . Could do this in a Stored Procedure but I am unable to mimic that at all in a Linq2SQL/ Entity Framework scenario.
My question is this, how to omit IEnumerable.Where in the Linq according to some entered values?
|
Multiple where conditions in EF
|
CC BY-SA 3.0
| 0 |
2011-06-15T05:17:47.630
|
2020-07-07T03:11:07.507
|
2017-05-23T11:54:56.483
| -1 | 17,447 |
[
"c#",
"asp.net",
"linq",
"entity-framework"
] |
6,353,424 | 1 | null | null | 2 | 1,410 |
the camera view which i had used in my application is not same as native camera , for example,the native camera view is shown below ,

but the view is not as same in my application , i use surfaceview for my custom camera with Media recorder to capture video,in layout i use frame layout ,
```
<com.cdr.Vio.CamcorderView android:id="@+id/camcorder_preview" android:clickable="true" android:focusable="true" android:layout_height="wrap_content" android:layout_width="wrap_content"></com.cdr.Vio.CamcorderView>
```
....
```
<Button android:id="@+id/widget34" android:background="@drawable/camrecord"
android:layout_height="60dp" android:layout_width="60dp"
android:layout_gravity="right" android:layout_marginRight="20dp">
</Button>
<Button android:id="@+id/widget33" android:background="@drawable/stoprecord"
android:layout_gravity="right" android:layout_height="60dp"
android:layout_width="60dp" android:layout_marginTop="-60dp"
android:layout_marginRight="20dp">
</Button>
```
i tried the view with predefined screen height and width of screen , but it again seems some what stretched , here is my stretched camera view,

how can i resolve that , if any know that problem help me out.
Thanks.
|
Expanded camera view in android?
|
CC BY-SA 3.0
| 0 |
2011-06-15T05:28:54.223
|
2011-08-18T22:21:48.020
| null | null | 555,806 |
[
"android",
"android-layout"
] |
6,353,431 | 1 | null | null | 2 | 234 |
Has anyone ever experienced this problem before?
Wordpress is successfully uploading and logging images... it even knows the exact count uploaded. However, the media page refuses to list the individual items.

Very Stange. Any ideas?!
Note: I've eliminated plugins as a possible problem. Could it be a table in the database with an incorrect url?
Thanks!
|
Wordpress Media Library Acknowledges Images, Doesn't List
|
CC BY-SA 3.0
| 0 |
2011-06-15T05:29:17.220
|
2013-01-15T11:58:37.017
| null | null | 508,400 |
[
"wordpress"
] |
6,353,455 | 1 | 6,353,544 | null | 1 | 183 |
I am trying to figure out my possibilities. I have a TableCellView with a disclosure button. When you hit the the disclosure button currently a viewcontroller is pushed on the stack with a picker. Here are some images.

the disclosure button next to a TextField

In IB, the view behind the picker has alpha set to 0.5 and opaque set to NO.
I naively thought this would show my view below.

In the simulator, not only do i not see my view below this one,
but my picker is affected by the transparent view behind it.
So I suppose my question is can I do what I am trying here and display the tableview with the disclosure button below the detail view, grayed out. If not, is there another approach not as boring as a UIAlertView or plain as showing just a picker.
|
Transparent view on the stack
|
CC BY-SA 3.0
| null |
2011-06-15T05:32:15.347
|
2011-06-15T05:42:55.567
|
2011-06-15T05:34:44.130
| 73,488 | 457,577 |
[
"iphone",
"ios",
"uitableview",
"detailsview"
] |
6,353,463 | 1 | 6,353,507 | null | 1 | 524 |
I have a GridView which contains columns
Data for , and columns come from `BindingSource` and I need to calculate data for based on and .
So I have created `RowsAdded` event for the `DataGridView` and added the following code
```
int index = employeeBindingSource.Position;
Employee emp = (Employee)employeeBindingSource.Current;
double bonus = (emp.Experience < 4 ? 0.08f : 0.12f) * emp.Salary * 12;
employeeDataGridView.Rows[index].Cells[3].Value = bonus.ToString("0.00"); //setting value for bonus column
employeeBindingSource.MoveNext();
```
But I get Bouns for only two rows.

So I commented the code inside this event and created another event `RowStateChanged` added the above code and it works fine.

What is the problem with the `RowsAdded` event ? And is `RowStateChanged` the correct event to calculate the bonus column ?
Thanks.
|
GridView's RowsAdded event is not working
|
CC BY-SA 3.0
| null |
2011-06-15T05:33:36.567
|
2011-06-15T05:39:07.113
|
2011-06-15T05:38:37.770
| 92,487 | 92,487 |
[
"c#",
"winforms",
"gridview",
".net-4.0",
"bindingsource"
] |
6,353,841 | 1 | null | null | 0 | 240 |
I want to open one URL in UIWebView, I am able to open URL but It's rending big like Ref : 
I want to open URL capture full view or we can say all the contents of the url will be visible at a time and user can pinch( ZoomIn and ZoomOut like UIScrollView) the web page. How can I implement this. Thank you.
I want to show URL in WebView like this . 
|
ZoomIn and ZoomOut in UIWebView?
|
CC BY-SA 3.0
| null |
2011-06-15T06:22:33.263
|
2011-06-15T12:44:58.187
|
2011-06-15T12:44:58.187
| 532,445 | 532,445 |
[
"iphone",
"uiwebview",
"uiscrollview"
] |
6,354,030 | 1 | 6,354,171 | null | 2 | 607 |
Can anyone explain this?

|
GZipStream.Close causes ObjectDisposedExeption: Why?
|
CC BY-SA 3.0
| null |
2011-06-15T06:44:52.490
|
2011-06-15T07:00:22.620
| null | null | 568,289 |
[
"c#",
".net",
"gzipstream",
"objectdisposedexception"
] |
6,354,196 | 1 | 6,354,417 | null | 25 | 23,918 |
how to divide QGridLayout into rows and columns at Design Time in QT ?
I want to design one form where i want to have 2 columns and 7 rows .
I am designing using QTCreator but i am not getting any option of giving rows/columns.
It shows only these properties

|
how to divide QGridLayout into rows and columns at Design Time in QT?
|
CC BY-SA 3.0
| 0 |
2011-06-15T07:02:44.880
|
2022-01-13T07:41:06.723
| null | null | 662,285 |
[
"qt"
] |
6,354,270 | 1 | null | null | 0 | 2,413 |
I am using the following code to zoom to view all point on a MapView:
```
mMapController.zoomToSpan(myOverlay.getLatSpanE6(), myOverlay.getLonSpanE6());
```
It works, except a problem that it only considers but not , thus gives me the following result:

Is there anyway to deal with this? I was thinking that manually add/subtract some latitude/longitude to/from getLatSpanE6()/getLonSpanE6(), but this is going to be dirty and I don't know how much should I add/subtract. Does anyone have any ideas?
Thanks!
|
Android MapView: problem with method zoomToSpan for ItemizedOverlay
|
CC BY-SA 3.0
| null |
2011-06-15T07:12:12.750
|
2011-06-15T08:21:18.367
| null | null | 734,036 |
[
"android",
"overlay",
"zooming",
"android-mapview",
"html"
] |
6,354,314 | 1 | null | null | 2 | 1,326 |
I have a scorecard with hierarchy in PerformancePoint dashboard.
By default everything is expanded (drilled down to the lowest level), is there any way I can prevent this, so when I load a scorecard everything will be collapsed (not drilled down) ?


|
PerformancePoint scorecard drill down
|
CC BY-SA 3.0
| null |
2011-06-15T07:17:00.907
|
2013-12-21T01:13:52.220
|
2011-06-15T07:22:12.483
| 47,086 | 47,086 |
[
"sharepoint",
"web-parts",
"dashboard",
"performancepoint",
"dashboard-designer"
] |
6,354,512 | 1 | null | null | 4 | 2,351 |
I am trying to implement a simple 3d object on the cocos3d template.
Usually you get the object from a POD file or similar.
But what i need is to make it by code in the application.
I have tried CC3BoxNode with CC3BoundingBox. But it isn't what I am looking for.
I need to create something similar to that.

|
Simple polygon in cocos3d
|
CC BY-SA 3.0
| 0 |
2011-06-15T07:35:57.100
|
2013-01-17T20:05:24.957
|
2011-10-19T22:08:34.190
| 201,863 | 552,314 |
[
"iphone",
"objective-c",
"cocos2d-iphone",
"cocos3d"
] |
6,354,662 | 1 | null | null | 5 | 629 |
I have a lot of polygons, and after I do a union of all these polygons, I get a new, big polygon. The union algorithm is a black box and using third-party-library process, which I couldn't control, and neither can I hope to extract any information out kind of progress.
Is there efficient way for me to know, for every edge of that big gigantic unionized polygon, which of it is belonging to which edge of the smaller polygon?
A brute force way to solve this problem is to compare every edge of the unionized polygon with each of the smaller polygons, but this is going to be very inefficient. Any other more efficient techniques?
My hunch tells me that [sweep line algorithm](http://en.wikipedia.org/wiki/Sweep_line_algorithm) may help here, although I have absolutely no idea how to do it.
Edit: The small npolygons can overlap, so the union polygon can contain points that are located at the edges of the small polygons, but these points may not be the vertexes of the original polygons.
A screenshot of this is shown below:

|
Identifying the original edge of a union polygon
|
CC BY-SA 3.0
| 0 |
2011-06-15T07:53:31.637
|
2011-07-16T18:27:27.820
|
2011-06-15T09:35:13.680
| 3,834 | 3,834 |
[
"algorithm",
"geometry",
"computational-geometry"
] |
6,354,955 | 1 | 9,323,041 | null | 4 | 1,206 |
I have "created" a custom skin for DropDownList (i.e modified the default `spark.skins.spark.DropDownListSkin`) and `spark.skins.spark.DropDownListButtonSkin` for its button.
I have been able to get it to do almost everything I wanted, except for getting the list that drops down to align to the right of the button. Setting `<s:PopUpAnchor popUpWidthMatchesAnchorWidth=*false* />` in the button sub-skin allows the list to be determined by the width of the items, because obviously the width of the button/entire control is far less than required.
Here is what it looks like now (default popUpPosition="bottom")

Setting popUpPosition="right"

Here is what I would like it to look like

So at this point, I either need to dig into all the spark source code for DropDownList to better understand how things work, or perhaps someone here knows how to do this already.
Any ideas would be appreciated.
|
Align the dropdown list to the right when popUpWidthMatchesAnchorWidth is FALSE
|
CC BY-SA 3.0
| 0 |
2011-06-15T08:25:00.257
|
2014-08-04T18:50:44.833
|
2011-06-15T12:13:59.953
| 189,764 | 189,764 |
[
"apache-flex",
"flex4",
"skinning",
"flex4.5"
] |
6,355,067 | 1 | 6,355,068 | null | 7 | 569 |

In this picture, you are told where the repo was forked from. I've been looking through the github2 api and I can't seem to find a way to get this information. Any ideas?
|
Find out where a GitHub repo was forked from
|
CC BY-SA 3.0
| null |
2011-06-15T06:15:09.967
|
2011-06-15T08:37:11.867
| null | null | 717,447 |
[
"git",
"github"
] |
6,355,110 | 1 | 6,355,150 | null | 0 | 257 |
Following is the image of the UI. When the app is launched it appears to be as follows

in this i am showing the changes in timer and km variation. When the km gets varied my layout gets disturbed as follows

Following is the layout of my ui
```
<LinearLayout android:id="@+id/linearLayout2" android:background="@drawable/rounded_background" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="50dip"
android:layout_marginLeft="15dip" android:layout_marginRight="15dip" android:orientation="vertical">
<LinearLayout android:id="@+id/linearLayout3" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:text="00:00:00" android:id="@+id/timer" android:textSize="28dip" android:gravity="center_vertical|center_horizontal" android:textColor="#000000"
android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="15dip" android:layout_marginBottom="15dip">
</TextView>
</LinearLayout>
<View android:id="@+id/separator1" android:background="#000000" android:layout_width = "fill_parent" android:layout_height="1dip" android:layout_centerVertical ="true" android:layout_alignParentTop="true"/>
<LinearLayout android:id="@+id/linearLayout4" android:layout_width="wrap_content" android:orientation="horizontal" android:layout_height="wrap_content">
<LinearLayout android:layout_marginLeft="55dip" android:id="@+id/linearLayout5" android:layout_width="wrap_content" android:orientation="horizontal" android:layout_height="wrap_content">
<TextView android:text="0" android:id="@+id/pace" android:textSize="17dip" android:textColor="#000000" android:layout_marginBottom="5dip" android:layout_weight="1"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="15dip" android:lines="1" android:gravity="right" >
</TextView>
<TextView android:text="Km/hr" android:id="@+id/pace1" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:lines="1" android:textColor="#000000" android:layout_marginLeft="7dip" android:layout_marginTop="15dip" android:layout_marginBottom="15dip">
</TextView>
</LinearLayout>
<View android:id="@+id/separator2" android:layout_marginLeft="40dip" android:layout_width="1dip" android:layout_height="fill_parent" android:background="#000000" />
<LinearLayout android:id="@+id/linearLayout6" android:layout_width="wrap_content" android:orientation="horizontal" android:layout_height="wrap_content">
<TextView android:text="0" android:id="@+id/cal" android:textSize="20dip" android:textColor="#000000" android:layout_marginBottom="5dip"
android:layout_marginLeft="25dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="15dip">
</TextView>
<TextView android:text="cal" android:id="@+id/cal1" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textColor="#000000" android:layout_marginLeft="15dip" android:layout_marginTop="15dip" android:layout_marginBottom="5dip">
</TextView>
</LinearLayout>
</LinearLayout>
```
i dont want my UI to be disturbed, how to do this please help me friends......
|
problem with android UI
|
CC BY-SA 3.0
| null |
2011-06-15T08:41:42.320
|
2011-06-15T10:32:37.483
| null | null | 596,364 |
[
"android",
"user-interface"
] |
6,355,146 | 1 | 6,358,947 | null | 1 | 209 |
I havent found info on this subject yet, but maybe someone have tried doing this earlier. Imagine a heavily loaded web application (.NET/SQL Server 2008). The application serves clients that first request 'resources' and after a while 'submit' them. The resources are limited, so there is high risk of concurrent database access by several clients. The aim is to optimize the "request resource" mechanism in such way so that even when concurrent database access occurs the clients won't request overlapping database records and therefore the operation will be done as parallel as it is possible...
Conceptual database structure:
```
CREATE TABLE [dbo].[Resources] (
[ID] [uniqueidentifier] NOT NULL,
[Data] [xml] NOT NULL,
[Lock] [uniqueidentifier] NULL,
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[ResourceRequests] (
[ID] [uniqueidentifier] NOT NULL,
[ResourceID] [uniqueidentifier] NOT NULL,
[DateCreated] [datetime] NOT NULL,
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[ResourceSubmits](
[ResourceRequestID] [uniqueidentifier] NOT NULL,
[NewData] [xml] NOT NULL,
) ON [PRIMARY]
GO
```
To request data, first I need to "reserve" it using "UPDATE" statement, this is the point of synchronization, because updates are executed sequentially
```
UPDATE T
SET T.Lock = (@lockID)
FROM
(
SELECT TOP (@lockCount) R.*
FROM [dbo].[Resources] AS R
WHERE R.Lock IS NULL
) AS T
```
(I'm not sure but...) As far as I know "UPDATE" operations use internal database locks and therefore it is not possible for two or more concurrent "UPDATE" operations will change the same record when using above query.
But when concurrent access occurs due to fixed order of "SELECT" only one of the clients will perform UPDATE at a time:

This is the result of concurrent execution, done by the following C#/Linq2Sql code:
```
Thread[] threads = new Thread[20];
for (int threadIndex = 0; threadIndex < 20; threadIndex++)
{
threads[threadIndex] = new Thread
(
new ThreadStart
(
delegate
{
using (var context = new L2S.l2sDataContext())
{
for (int i = 0; i < 20; i++)
{
context.LockRoots(Guid.NewGuid(), 5);
}
}
}
)
);
}
foreach (var thread in threads)
{
thread.Start();
}
foreach (var thread in threads)
{
thread.Join();
}
```
As you can see the locks are distributed sequentially the order of Lock column values is not mixed, this means that the update operations were executed sequentially.
So the question, how to execute them on parallel and would it change something (except performance) if the "UPDATE" query will be changed the following way:
```
UPDATE T
SET T.Lock = (@lockID)
FROM
(
SELECT TOP (@lockCount) R.*
FROM [dbo].[Resources] AS R
WHERE R.Lock IS NULL
ORDER BY NEWID() <--------------- The order is random now, but will the updates get executed concurrently?
) AS T
```
|
SQL the elegant way of treating concurrency
|
CC BY-SA 3.0
| 0 |
2011-06-15T08:45:55.130
|
2011-06-15T14:03:12.353
| null | null | 504,325 |
[
"sql",
"sql-server",
"sql-server-2008"
] |
6,355,176 | 1 | 6,357,412 | null | 2 | 111 |
i have two tables .. one is a master table and other one is an daily report table.
## Master table :
```
machine_id Machinename
1 abc
2 def
3 ghi
4 jkl
```
## ven_fullreportmaster :
```
entry_date machine_id description_id tot_time shift_id
20110613 1 1 10 1
20110613 2 2 9 2
20110614 1 1 10 1
20110614 1 2 9 2
20110614 3 3 5 3
20110614 2 4 10 1
20110614 2 1 9 2
20110614 2 5 5 3
```
now, i want to retrieve the data from the daily report table that it should contain all the machine names with tot_time and entry_date..
i have used this query to retrieve the data,
```
select entry_date,
machinename,
(IsNull(cast(TotalMins / 60 as varchar(24)),'0') + ':' + IsNull(cast(TotalMins % 60 as varchar(24)),'0')) as TotalHrs--, shift_type
from (
select vm.machinename , vfrm.entry_date,
sum(case when vfrm.description_id in ('1','2','3','4','5') then DateDiff(mi, 0, total_time) else '0' end) as TotalMins
--vsm.shift_type
from ven_fullreportmaster vfrm
inner join ven_machinemaster vm on vm.machine_id = vfrm.machine_id
inner join ven_shifttypemaster vsm on vsm.shift_id = vfrm.shift_id
where vfrm.entry_date = '20110614'
-- and vfrm.shift_id in (1,2,3)
group by machinename, vfrm.entry_date --, vsm.shift_type
) as SubQueryALias group by entry_date, machinename,TotalMins --,shift_type
```
when i run the above query, i am getting details for machine-id 1 , 2,3 alone..
## output:
```
entry_date machineid TotalHrs
2011-06-14 00:00:00.000 1 19:0
2011-06-14 00:00:00.000 2 24:0
2011-06-14 00:00:00.000 3 5:0
```
i need to get machine_id =4 value as 0 in TotalMins for each shift.. how to resolve it..plz help me ..
## expected output:
```
entry_date machineid TotalHrs
2011-06-14 00:00:00.000 1 19:0
2011-06-14 00:00:00.000 2 24:0
2011-06-14 00:00:00.000 3 5:0
**2011-06-14 00:00:00.000 4 0:0**
```
thanks and regards
T.Navin

## output:

|
help me in forming an sql query
|
CC BY-SA 3.0
| null |
2011-06-15T08:48:03.230
|
2011-06-15T20:40:38.207
|
2011-06-15T14:36:28.780
| 712,973 | 712,973 |
[
"sql-server",
"sql-server-2008"
] |
6,355,205 | 1 | 6,355,897 | null | 4 | 3,599 |
See image for clarity.

I have 5 variables (A, B, C, D and E), each of which can range from 0-100. I need the of all these variables to be 100 at all times, not more, not less. However, the way it is set up currently, if I change variable A from 21 to, say, 51, the total becomes 130.
How could I set this up such that if I change one variable, the others could automatically compensate for that increase or decrease, such that the total is 100?
|
Excel Slider Control: How could I limit the sum of all sliders to, say, 100?
|
CC BY-SA 3.0
| 0 |
2011-06-15T08:50:33.307
|
2020-07-28T15:46:57.507
|
2018-07-09T18:41:45.953
| -1 | 342,259 |
[
"excel",
"slider",
"vba"
] |
6,355,348 | 1 | 6,355,412 | null | 1 | 452 |
I am new in android world. When I create a project while setting `Target = Android 2.3.3 - API Level 10` in my AVD setting, I get following skin options.

But when I set `Target = Android 3.1 - API Level 12` (which is the latest available) in AVD settings I only get this which is basically tablet version of emulator.

My question: Does Android 3.1 only supports tablets? (I think answer is Noo)
If No, how can I use API 3.1 with phone version of emulator rather than tablet emulator?
If Yes, can anyone point me to any official statement regarding it?
I have installed the latest android SDK, Eclipse Classic with ADT.
May be setting the Skin -> Resolution will work but is it the only way?
|
How can I see phone emulator while using 3.1 API?
|
CC BY-SA 3.0
| null |
2011-06-15T09:02:05.450
|
2011-06-22T04:53:34.770
|
2020-06-20T09:12:55.060
| -1 | 421,611 |
[
"android",
"android-emulator"
] |
6,355,447 | 1 | 6,355,492 | null | 3 | 3,419 |
I am using [AnkhSVN](http://ankhsvn.open.collab.net/) first time. On 32Bit Visual Studio 2010 Prof it works great.

Same installation with same project on a x64 Systems does not show the green hooks nor any SVN options.

It seems that it is not installed and shows all like before. Re-Installing has the same unusable effect. No errors.
I am not sure if it is because of x64 system or not.
Any ideas how it could work?
|
AnkhSVN on 64Bit Visual Studio
|
CC BY-SA 3.0
| 0 |
2011-06-15T09:09:33.967
|
2011-06-15T09:32:55.110
|
2011-06-15T09:32:55.110
| 109,702 | 375,368 |
[
"visual-studio-2010",
"svn",
"x86",
"64-bit",
"ankhsvn"
] |
6,355,544 | 1 | 6,355,910 | null | 12 | 11,490 |
First of all, apologies for posting something perhaps a bit excessively specific, but I'm not very experienced with Swing, and can't seem to find good examples that fit my needs.
So I'm trying to figure out the best way to implement the a dynamic GUI for choosing filtering criteria in Swing:

The underlying model is a class containing a list of criteria that can be negated (i.e. applied with a NOT-prefix), and a property indicating whether these should be combined with AND or OR.
The GUI would allow the user to add, change or remove criteria, and select the combination operator (and/or). The first criterium would naturally not have a combination-selector, and the third and subsequent criteria would simply use the same combination-operator as the second one.
The X-buttons on the right would be used to delete a criterium. When the Add-button is pressed, a new line of components would be added to the bottom.
As changes are made, these would be reflected in the underlying model.
Of course I could implement this quite "primitively" by simply adding components to a JPanel and then updating the model accordingly, but I would prefer a neater solution, such as that provided by a TableModel.
So I'm wondering if a table with a custom TableModel and TableCellRenderer/Editor would be the best approach, or if there is a better way to implement something like this. If table is indeed the best approach, I would appreciate some pointers to how one would use TableCellRenderers or -Editors to accomplish this.
Thanks in advance.
|
How to implement dynamic GUI in swing
|
CC BY-SA 3.0
| 0 |
2011-06-15T09:19:09.167
|
2022-07-19T22:10:17.240
| null | null | 298,103 |
[
"java",
"swing",
"tablemodel",
"tablecellrenderer",
"tablecelleditor"
] |
6,355,589 | 1 | 6,357,415 | null | 7 | 6,445 |
I do not know if this was asked before or not. Simple formating issue.
I noticed it is sometimes hard to align comments () on top of each others. Must be a font type issue. It just looks a little better on the screen if I can get things to align exactly on top of each other. Here is an example:
```
(* *)
(* L E F T P A N E L *)
(* *)
```
But it actually looks like this in the notebook in front of me:

If i move the *) in the second line one space to the left it becomes like this:

So, can not get it to align. I am using cell of type Input (standard cell).
I can't use other cell type such as Code or such. I was wondering if someone knows of a trick to get this to align.
thanks
EDIT 1:
Showing font used by Input cell in the style sheet Demonstration

EDIT 2:
Using code shown below by Alexey Popkov, fixed the font issue for comments, and now they are easily aligned. Here is a screen shot

EDIT 3:
Well, the party did not last for long. Using SetOptions is not allowed in a demo. Too bad, because the solution by Alexey worked well and made the comments align and look better.
Any way. Not a big deal really. can live with a little misaligned comments :)

|
how to align comments in Mathematica notebook?
|
CC BY-SA 3.0
| null |
2011-06-15T09:23:11.980
|
2011-06-15T15:43:48.617
|
2011-06-15T15:43:48.617
| 765,271 | 765,271 |
[
"wolfram-mathematica",
"mathematica-frontend"
] |
6,355,603 | 1 | 6,355,634 | null | 1 | 3,633 |
I have a TreeView in C# Windows Form. If the user selected one node, then I want to retrieve the immediate next node and also immediate previous node of the treeview. Don't consider if it is sibling or any other. I want to just pick up immediate next node and also immediate previous node.
See this picture:

Suppose user Selecting following case ==> I want to retrieve this node
1. 0 1.Sample Data ==>1 When multiple agents...
2. 1 When multiple agents... ===>2 The second major ...
3. 2 The second major ... ===>3 In this case....
4. 3 In this case.... ===>4 2.Target Settings...
and so on..
How can I achieve this?
|
How to get next immediate node from the selected node of the Treeview in C#?
|
CC BY-SA 4.0
| null |
2011-06-15T09:24:52.427
|
2020-07-14T06:36:01.423
|
2019-11-19T08:05:17.340
| 472,495 | 452,680 |
[
"c#",
"winforms",
"c#-4.0",
"treeview"
] |
6,355,712 | 1 | 6,682,677 | null | 0 | 1,549 |
Hi all,
I have a SQL server 2008 with Reporting service installed. I can connect to the server through its url ([http://192.168.1.120:8080/ReportServer/](http://192.168.1.120:8080/ReportServer/) and [http://192.168.1.120:8080/Reports](http://192.168.1.120:8080/Reports))
and I can manage the server and upload reports. However I cannot open the reporting service configuration manager.
Any Ideas??
|
Cannot connect to SQL Server Reporting Services Configuration Manager
|
CC BY-SA 3.0
| 0 |
2011-06-15T09:34:28.730
|
2011-07-13T16:58:45.857
| null | null | 565,538 |
[
"ssrs-2008"
] |
6,355,990 | 1 | 6,356,101 | null | 0 | 337 |
I want to fix a UISlider a constant distance away from the bottom of the screen. I can do this easily in the interface builder size inspector. I would simply use the red I shaped locks at the edge of autosizing square. In the image below it would lock to the top left.
I want to lock to the bottom and do it programmatically, not with interface builder.
I've been using the following code to resize but i now want it locked to the bottom :
view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)
Please help.

|
UISlider constant distance away from bottom when AutoSizing
|
CC BY-SA 3.0
| null |
2011-06-15T10:00:28.843
|
2011-06-15T10:09:43.577
|
2020-06-20T09:12:55.060
| -1 | 569,599 |
[
"iphone",
"constants",
"distance",
"autoresize",
"autorotate"
] |
6,356,063 | 1 | null | null | 2 | 7,299 |
I am using hibernate `createSQLQuery`, but it returns only first char.
```
tableName = 'select code, name from airports where excludeFromSearch = 0 order by name';
s.createSQLQuery(tableName).list();
```
I am using:
- -

I have googled [stackoverflow](https://stackoverflow.com/questions/5343355/hibernate-query-returns-only-first-character-of-string),[forum.hibernate](https://forum.hibernate.org/viewtopic.php?p=2441556),[atlassian](http://opensource.atlassian.com/projects/hibernate/browse/HHH-2220)
i have also checked all hibernate query log and even mysql query log both are same.
```
`code char(3)` // <strike>might</strike> must cause problem as in screen shot
name varchar(100)
```
|
strange hibernate createSQLQuery returns a CHAR|Character but String
|
CC BY-SA 3.0
| 0 |
2011-06-15T10:06:57.730
|
2016-02-07T21:52:59.250
|
2017-05-23T12:19:48.617
| -1 | 410,439 |
[
"java",
"hibernate"
] |
6,356,245 | 1 | 6,358,845 | null | 3 | 204 |
I want to update my own comment for a commit in the check-in history but I receive error as snapshot as below.
I understand that my account is not an admin/owner of the repository but it should be allowed me to update my own comment! On TFS side, I can do this actually.
Is there any work-around for me? I don't want to provide admin right to all users.



|
Cannot update my comment for a commit svn tortoise
|
CC BY-SA 3.0
| null |
2011-06-15T10:21:16.180
|
2011-06-15T13:57:06.183
| null | null | 248,616 |
[
"tortoisesvn",
"comments"
] |
6,356,334 | 1 | 6,356,663 | null | 5 | 1,694 |
I am trying to learn||Code openGL in Qt. I made one application which shows two figures. One is a triangle "A", and the other triangle "B" is just the same as "A" except it got rotated -90 degree about the z-Axis(z axis is perpendicular to the computer screen). Now, the problem is rotation makes the change in the dimension. I am posting the "main.cpp" below,
```
#include <QApplication>
#include <QHBoxLayout>
#include <QMessageBox>
#include <QtOpenGL/QGLWidget>
#include <QWidget>
class MyOpenGL:public QGLWidget
{
public:
MyOpenGL(QWidget * parent);
~MyOpenGL();
void initializeGL();
void resizeGL(int w, int h);
void paintGL();
};
MyOpenGL::MyOpenGL(QWidget *parent):QGLWidget(QGLFormat(QGL::SampleBuffers),parent)
{
setAutoFillBackground(false);
}
MyOpenGL::~MyOpenGL()
{
}
void MyOpenGL::initializeGL()
{
glShadeModel(GL_SMOOTH);
glClearColor(0.0f,0.0f,0.0f,0.0f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST);
}
void MyOpenGL::resizeGL(int w, int h)
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,width()/height(),10.0f,100.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
void MyOpenGL::paintGL()
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
//glTranslatef(0.0,0.0,-10.0);
glBegin(GL_TRIANGLES);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f(-1.0f,0.0f,-10.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f(1.0f,0.0f,-10.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f(0.0f,4.0f,-10.0f);
glEnd();
glRotatef(90.0,0.0f,0.0f,-1.0f);
glBegin(GL_TRIANGLES);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f(-1.0f,0.0f,-10.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f(1.0f,0.0f,-10.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f(0.0f,4.0f,-10.0f);
glEnd();
glLoadIdentity();
}
int main(int argc,char * argv[])
{
QApplication app(argc,argv);
MyOpenGL * f = new MyOpenGL(NULL);
f->show();
return app.exec();
}
```
This is the pro file
```
SOURCES += \
main.cpp
QT += opengl
```
This is the resulting app's screen shot

As for as I know rotation won't do any change in dimension. But here the dimension is changing .If anybody clear my doubt in this issue, I will be very thankful to him/her.
|
OpenGL - problem in rotating - Qt
|
CC BY-SA 3.0
| null |
2011-06-15T10:29:11.043
|
2019-02-11T01:55:52.703
|
2011-06-15T10:56:02.623
| 344,822 | 344,822 |
[
"c++",
"windows",
"qt",
"opengl",
"logic"
] |
6,356,378 | 1 | 6,356,586 | null | 0 | 1,209 |
Can I increase the height of Navigation Bar in iPad and add some custom buttons ? If yes - how ?
Please help !!
EDIT : Actually in my app I have a TopBar thing which contains 4 buttons. I am using animation to switch between views and I want that TopBar to be static in whole app.
I want to create this type of top bar ant throughout whole app the bar should be static and the views I am animating using gestures.

|
Navigation Bar Height and Custom Buttons
|
CC BY-SA 3.0
| 0 |
2011-06-15T10:34:18.280
|
2011-06-16T11:30:53.563
|
2011-06-15T11:01:53.817
| 380,277 | 380,277 |
[
"iphone",
"ios",
"xcode",
"ipad",
"uinavigationcontroller"
] |
6,356,742 | 1 | 6,356,762 | null | 0 | 521 |
I'm trying to get two icons in separate spans next to an input.
Example here: [http://jsfiddle.net/kralco626/K6TzK/2/](http://jsfiddle.net/kralco626/K6TzK/2/)
However, the second icon doesn't show up...
In the end I want the input and the two spans on the same line and I need to be able to hide/show the spans.
update: Got the icons to show but not working with ui-state-error
I have the exact code here:
[http://jsfiddle.net/kralco626/K6TzK/5/](http://jsfiddle.net/kralco626/K6TzK/5/)
and get this:

|
jqueryui icons not showing two spans next to each other
|
CC BY-SA 3.0
| null |
2011-06-15T11:04:48.827
|
2011-06-15T11:21:11.970
|
2011-06-15T11:21:11.970
| 351,980 | 351,980 |
[
"jquery",
"html",
"jquery-ui"
] |
6,356,852 | 1 | null | null | 14 | 6,188 |
The problem I am having is shown here. Basically when I put a gradient on a thead, Chrome repeats that gradient for ever cell... The actual desired result is what firefox produced - a solid gradient for the whole thead.

Any ideas on how to fix this?
Here is the css I have:
```
thead.header {
font-weight: bold;
border-bottom: 1px solid #9C9C9C;
background-repeat: no-repeat;
background: #C6C6C6;
background: -moz-linear-gradient(top, #DEDEDE 0%, #BDBDBD 80%, #BBB 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#DEDEDE), color-stop(80%,#BDBDBD), color-stop(100%,#BBB));
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#DEDEDE', endColorstr='#BBB',GradientType=0 );
}
```
Here is the html if it helps:
```
<table style="width:100%" cellpadding="0" cellspacing="0">
<thead class="header">
<tr>
<th width="200px">Actor</th>
<th rowspan="3">Character</th>
</tr>
<tr>
<th>Gender</th>
</tr>
<tr>
<th>Age</th>
</tr>
</thead>
<tbody class="odd">
<tr>
<td width="200px">Test</td>
<td rowspan="3">Test</table>
</td>
</tr>
<tr>
<td>Male</td>
</tr>
<tr>
<td>25</td>
</tr>
</tbody>
</table>
```
|
CSS: Gradients repeating in Chrome when set to tbody/thead
|
CC BY-SA 3.0
| null |
2011-06-15T11:16:03.813
|
2020-02-25T10:27:33.427
|
2013-11-30T14:36:39.450
| 476,951 | 90,922 |
[
"html",
"css",
"google-chrome",
"gradient"
] |
6,356,891 | 1 | 6,357,874 | null | 9 | 10,128 |
I am looking for the right set of algorithms to solve this image processing problem:
- -
I can calculate the contour using OpenCV, but as the image is distorted it will often contain more than 4 corner points.
Is there a good approximation algorithm (preferably using OpenCV operations) to find the rectangle corner points using the binary image or the contour description?
The image looks like this:

Thanks!
Dennis
|
Find distorted rectangle in image (OpenCV)
|
CC BY-SA 3.0
| 0 |
2011-06-15T11:19:21.113
|
2014-06-26T11:18:04.913
|
2014-01-03T16:15:21.997
| 603,003 | 66,434 |
[
"image-processing",
"opencv",
"camera-calibration"
] |
6,356,886 | 1 | 6,358,834 | null | 11 | 1,320 |
I need to automatically detect dips in a 2D plot, like the regions marked with red circles in the figure below. I'm only interested in the "main" dips, meaning the dips have to span a minimum length in the x axis. The number of dips is unknown, i.e., different plots will contain different numbers of dips. Any ideas?

As requested, here's the sample data, together with an attempt to smooth it using median filtering, as suggested by vines.
Looks like I need now a robust way to approximate the derivative at each point that would ignore the little blips that remain in the data. Is there any standard approach?
```
y <- c(0.9943,0.9917,0.9879,0.9831,0.9553,0.9316,0.9208,0.9119,0.8857,0.7951,0.7605,0.8074,0.7342,0.6374,0.6035,0.5331,0.4781,0.4825,0.4825,0.4879,0.5374,0.4600,0.3668,0.3456,0.4282,0.3578,0.3630,0.3399,0.3578,0.4116,0.3762,0.3668,0.4420,0.4749,0.4556,0.4458,0.5084,0.5043,0.5043,0.5331,0.4781,0.5623,0.6604,0.5900,0.5084,0.5802,0.5802,0.6174,0.6124,0.6374,0.6827,0.6906,0.7034,0.7418,0.7817,0.8311,0.8001,0.7912,0.7912,0.7540,0.7951,0.7817,0.7644,0.7912,0.8311,0.8311,0.7912,0.7688,0.7418,0.7232,0.7147,0.6906,0.6715,0.6681,0.6374,0.6516,0.6650,0.6604,0.6124,0.6334,0.6374,0.5514,0.5514,0.5412,0.5514,0.5374,0.5473,0.4825,0.5084,0.5126,0.5229,0.5126,0.5043,0.4379,0.4781,0.4600,0.4781,0.3806,0.4078,0.3096,0.3263,0.3399,0.3184,0.2820,0.2167,0.2122,0.2080,0.2558,0.2255,0.1921,0.1766,0.1732,0.1205,0.1732,0.0723,0.0701,0.0405,0.0643,0.0771,0.1018,0.0587,0.0884,0.0884,0.1240,0.1088,0.0554,0.0607,0.0441,0.0387,0.0490,0.0478,0.0231,0.0414,0.0297,0.0701,0.0502,0.0567,0.0405,0.0363,0.0464,0.0701,0.0832,0.0991,0.1322,0.1998,0.3146,0.3146,0.3184,0.3578,0.3311,0.3184,0.4203,0.3578,0.3578,0.3578,0.4282,0.5084,0.5802,0.5667,0.5473,0.5514,0.5331,0.4749,0.4037,0.4116,0.4203,0.3184,0.4037,0.4037,0.4282,0.4513,0.4749,0.4116,0.4825,0.4918,0.4879,0.4918,0.4825,0.4245,0.4333,0.4651,0.4879,0.5412,0.5802,0.5126,0.4458,0.5374,0.4600,0.4600,0.4600,0.4600,0.3992,0.4879,0.4282,0.4333,0.3668,0.3005,0.3096,0.3847,0.3939,0.3630,0.3359,0.2292,0.2292,0.2748,0.3399,0.2963,0.2963,0.2385,0.2531,0.1805,0.2531,0.2786,0.3456,0.3399,0.3491,0.4037,0.3885,0.3806,0.2748,0.2700,0.2657,0.2963,0.2865,0.2167,0.2080,0.1844,0.2041,0.1602,0.1416,0.2041,0.1958,0.1018,0.0744,0.0677,0.0909,0.0789,0.0723,0.0660,0.1322,0.1532,0.1060,0.1018,0.1060,0.1150,0.0789,0.1266,0.0965,0.1732,0.1766,0.1766,0.1805,0.2820,0.3096,0.2602,0.2080,0.2333,0.2385,0.2385,0.2432,0.1602,0.2122,0.2385,0.2333,0.2558,0.2432,0.2292,0.2209,0.2483,0.2531,0.2432,0.2432,0.2432,0.2432,0.3053,0.3630,0.3578,0.3630,0.3668,0.3263,0.3992,0.4037,0.4556,0.4703,0.5173,0.6219,0.6412,0.7275,0.6984,0.6756,0.7079,0.7192,0.7342,0.7458,0.7501,0.7540,0.7605,0.7605,0.7342,0.7912,0.7951,0.8036,0.8074,0.8074,0.8118,0.7951,0.8118,0.8242,0.8488,0.8650,0.8488,0.8311,0.8424,0.7912,0.7951,0.8001,0.8001,0.7458,0.7192,0.6984,0.6412,0.6516,0.5900,0.5802,0.5802,0.5762,0.5623,0.5374,0.4556,0.4556,0.4333,0.3762,0.3456,0.4037,0.3311,0.3263,0.3311,0.3717,0.3762,0.3717,0.3668,0.3491,0.4203,0.4037,0.4149,0.4037,0.3992,0.4078,0.4651,0.4967,0.5229,0.5802,0.5802,0.5846,0.6293,0.6412,0.6374,0.6604,0.7317,0.7034,0.7573,0.7573,0.7573,0.7772,0.7605,0.8036,0.7951,0.7817,0.7869,0.7724,0.7869,0.7869,0.7951,0.7644,0.7912,0.7275,0.7342,0.7275,0.6984,0.7342,0.7605,0.7418,0.7418,0.7275,0.7573,0.7724,0.8118,0.8521,0.8823,0.8984,0.9119,0.9316,0.9512)
yy <- runmed(y, 41)
plot(y, type="l", ylim=c(0,1), ylab="", xlab="", lwd=0.5)
points(yy, col="blue", type="l", lwd=2)
```

|
Detecting dips in a 2D plot
|
CC BY-SA 3.0
| 0 |
2011-06-15T11:18:57.293
|
2011-06-24T21:48:37.823
|
2011-06-15T13:01:57.143
| 488,719 | 488,719 |
[
"r",
"signal-processing"
] |
6,356,910 | 1 | null | null | 3 | 574 |
I have a problem with binding events and I need to see if an event is bound on any element.
For example when I have this code:
```
jQuery(selector).bind('load.background', function() { callback.call(this, bgPath);});
```
Where is it shown in debugger? I need to see it in IE developer tools, and there when I see my variable in watches it look like on this image:

When I look in the Events tree (marked with small lightning) there is null as load value (even in case callback call succeed)
So where can I see if and what is bound on any element?
EDIT: Even in Chrome debugger is it null

|
jQuery view bound events in debugger IE
|
CC BY-SA 4.0
| null |
2011-06-15T11:21:12.133
|
2020-09-18T18:11:03.987
|
2020-09-18T18:11:03.987
| 4,370,109 | 419,449 |
[
"jquery",
"debugging",
"jquery-events"
] |
6,357,012 | 1 | 6,357,435 | null | 3 | 3,538 |
I am trying to work out how to use the Branch-per-feature approach in mercurial but having created a branch to work in, and merged it back to default, am unable to push my changes back up to my master repository. What is best to do?

I created a branch "Gauge customisation", did some work in that branch and then merged it back into the default. Carried on with a few more changes in default and now I want to commit this back to my master repository. But when I try I get:
> abort: push creates new remote branches: Gauge customisation!
hint: use 'hg push --new-branch' to create new remote branches
I didn't think the branching would show up in the master repo and that by merging it locally I could somehow work in the branch (or potentially branches) and then when I've tested everything, push it up to the master repo.
Should the Gauge customisation branch still show up? Really I thought I'd only see default at this stage? But is that me not understanding the tools properly? Should I be creating the remote branch?
Ideally I'd like to be able to open a branch per feature and have 3 or 4 such branches running at any one time (it's the way my company works) so I'd like to get a solid grasp of things now.
|
Mercurial merge / remove a feature branch
|
CC BY-SA 3.0
| 0 |
2011-06-15T11:28:36.787
|
2013-11-28T17:16:17.313
|
2013-11-28T17:16:17.313
| 96,505 | 96,505 |
[
"mercurial",
"branching-and-merging"
] |
6,357,140 | 1 | 6,357,190 | null | -1 | 474 |
I want to display array objects from one view controller to another view controller's array.
In first view controller i have parsed the xml according to that i have 12 rows in that view controller means i have 4 record with 3 different values for u r reference plz see image


but now problem is that i have 4 object in array and i have 12 rows in second view so how can i display the out put
|
how to print array values from one view controller to another view controller's array in iphone sdk
|
CC BY-SA 3.0
| null |
2011-06-15T11:40:29.950
|
2011-06-15T11:45:54.357
| null | null | 519,679 |
[
"iphone"
] |
6,357,245 | 1 | 6,357,630 | null | 4 | 4,179 |
I have created a project with a simple RDLC report in ASP.NET which when I bind the `DataSource` of the report at design time using a `SqlDataSource` everything works just fine. But if I remove the binding and try to set the `DataSource` from code then the report seems to never stop loading.
I've worked with this on WinForms apps in the past and had no problems, but this is the first time I've tried to do it in ASP.NET, with no luck.
Here's the code I'm using to set the `DataSource` in the `Page_Load` event. As I said using the same `SqlDataSource` that works if it's bound in the `.aspx` page.
```
ReportViewer1.Reset()
ReportViewer1.ProcessingMode = ProcessingMode.Local
ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report.rdlc")
ReportViewer1.LocalReport.DataSources.Clear()
ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet1", SqlDataSource1))
ReportViewer1.LocalReport.Refresh()
```
Even if I set the report directly in the reportviewer control and chop the code down to just...
```
ReportViewer1.LocalReport.DataSources.Clear()
ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("DataSet1", SqlDataSource1))
ReportViewer1.LocalReport.Refresh()
```
...it still does the same.
Also, in Visual Studio while the report is loading you can see that a huge amount of script blocks are constantly being generated (the listbox keeps growing):

While this is going on the loading spinner is just going round halfway, restarting and repeating. The page isn't reloading though.
Any thoughts?
|
ReportViewer 2010 Not Loading Datasource from code
|
CC BY-SA 3.0
| 0 |
2011-06-15T11:50:48.073
|
2019-04-08T07:01:42.603
|
2019-04-08T07:01:42.603
| 10,983,940 | 134,907 |
[
"asp.net",
"reporting-services",
"rdlc",
"reportviewer"
] |
6,357,335 | 1 | 6,358,047 | null | 1 | 1,180 |
I have a ninput and two spans, each with a jquery ui icon that I am trying to display inline in a jquery ui dialog.
The problem occurs when I try to apply ui-state-error to the span.
Outside the dialog the icons works fine, inside the dialog however the icon does not show up correctly... !

Ideas???
[http://jsfiddle.net/kralco626/K6TzK/8/](http://jsfiddle.net/kralco626/K6TzK/8/)
|
JqueryUI icon with ui-state-error not working in dialog
|
CC BY-SA 3.0
| null |
2011-06-15T12:00:25.557
|
2011-09-06T05:15:48.097
|
2011-06-15T12:24:11.317
| 351,980 | 351,980 |
[
"jquery",
"jquery-ui"
] |
6,357,450 | 1 | null | null | 24 | 59,491 |
I need to create a Notification with a longer text, is that possible? By default it is not, but you can use a [custom layout](http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomNotification), which is what I did. Now I can display multiple lines, but as you can see, the text is still broken / not displayed completely? ): Can someone please tell me what I am doing wrong / if there's a fixed limit for the size of notifications? If you look at the screenshot you will notice, that there is still a lot of space left... Thanks for any hint!
BTW here's the XML used for the custom layout, based on [http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomNotification](http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomNotification)
```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="3dp"
>
<ImageView android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="10dp"
/>
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:textColor="#000"
/>
</LinearLayout>
```

|
Android multiline notifications / notifications with longer text
|
CC BY-SA 3.0
| 0 |
2011-06-15T12:09:27.553
|
2016-01-12T12:25:20.627
|
2013-11-17T21:02:21.713
| 1,503,078 | 298,288 |
[
"android",
"notifications"
] |
6,357,591 | 1 | 6,357,710 | null | 2 | 525 |
I have a li element . if the li element is a single line ,on hovering the backgroud color looks okay but when the li element contains text that is multiline the background color looks somewhat bad.
See the attached screenshot.
```
#leftNavi li a.current{
color: white;
background: #AD0E3F;
text-decoration: none;
}
#leftNavi li a:hover{
color: white;
background: #AD0E3F;
}
```

|
changing the background color of <li> looks funny
|
CC BY-SA 3.0
| null |
2011-06-15T12:21:05.000
|
2011-06-15T12:37:42.563
| null | null | 663,011 |
[
"javascript",
"css"
] |
6,357,595 | 1 | 9,641,815 | null | 0 | 6,937 |
How can I modify the distance between the bars in jqplot. There is too much space between them when there are less elements on it. Here are 2 images, one with some bars showing and the second one with less bars showing.


The less bars that show, the bigger the difference between bars. I want to be able to change this WITHOUT making the bars fatter. I like the bars like they are right now but I want to make the grid width size smaller between the bar and the grid lines in the background.
|
jqplot width between graph bars
|
CC BY-SA 3.0
| null |
2011-06-15T12:21:16.007
|
2016-09-22T07:30:37.390
| null | null | 527,328 |
[
"jquery",
"jquery-ui",
"jqplot"
] |
6,357,632 | 1 | 6,359,961 | null | 2 | 448 |
I have generated files of the scheme
> x \t y \t z \t charge \t type \t id
and I want to display them the in a similar way to this picture:

I also need to have the ability to browse though the space of my simulation (rotate it and zoom in and out). I tried rasmol and pymol but they don't speak with my simple file format.
Is there any other tool to do this that I hadn't find?
I have created a small program to chnge my data to the xyz format.
|
particle visualization in Linux
|
CC BY-SA 3.0
| 0 |
2011-06-15T12:23:27.707
|
2012-03-20T14:03:54.830
|
2012-03-20T14:03:54.830
| 21,234 | 596,691 |
[
"linux",
"visualization"
] |
6,357,634 | 1 | null | null | 1 | 223 |
I am trying to get the same look and feel as the API demo in my application, but the fonts appear smaller. I have not set any fonts for my application. Is there some settings i am missing on the fonts?


The image with black background is the Api Demo which came along with the SDK samples. I am working on Android 2.2. The image with the white background is my application. I would like to know how to achieve the spacing between each of the rows in the list and the font as in the API Demos list.Can someone kindly help me with this. Thanks in advance.
|
Fonts used in Api Demo
|
CC BY-SA 3.0
| null |
2011-06-15T12:23:41.660
|
2011-06-16T06:01:51.067
|
2011-06-16T05:50:19.913
| 533,690 | 533,690 |
[
"android"
] |
6,357,625 | 1 | 6,357,693 | null | 7 | 5,919 |
I'm trying to solve the following problem:
- -
I'm using for this [opencv](http://opencv.willowgarage.com/)'s function [cvSolve](http://opencv.willowgarage.com/documentation/operations_on_arrays.html#cvSolve). For reasonably good input everything works fine.
The problem that I have comes from the fact that when I have just a single bad segment as input the result is different from the one expected.

- Upper left image show the "lonely" purple lines influencing the result (all lines are used as input).- Upper right image shows how a single purple line (one removed) can influence the result.- Lower left image show what we want - the intersection of lines as expected (both purple lines eliminated).- Lower right image show how the other purple line (the other is removed) can influence the result.
As you can see only two lines and the result is completely different from the one expected. Any ideas on how to avoid this are appreciated.
Thanks,
Iulian
|
Best fit for the intersection of multiple lines
|
CC BY-SA 3.0
| 0 |
2011-06-15T12:23:00.060
|
2017-02-09T11:41:33.873
|
2011-06-15T12:29:28.987
| 13,136 | 13,136 |
[
"algorithm",
"opencv",
"geometry",
"computational-geometry"
] |
6,357,718 | 1 | 6,358,023 | null | 4 | 1,146 |
i'm doing a web app for iPhone, i'm having some troubles with borders.
To simplify things i have a background image for body, a box with rounded corners which have some elements inside and a title, and that's where problems begins as i want my title to be on the top border of my box without having the borderline behind it.
Here is a screenshot :

I can't see any solutions to render it properly, some of you have any guess ?
It would be much appreciated
|
How to hide a part of a CSS borderline nicely
|
CC BY-SA 3.0
| null |
2011-06-15T12:32:32.017
|
2011-06-15T13:21:51.337
| null | null | 366,981 |
[
"html",
"css"
] |
6,357,727 | 1 | 6,357,740 | null | 1 | 92 |
I want to filter records on the basis of month. Requirement is in month how much projects are in "completed, pending, started etc" status. This is my query but i am getting duplicate records.

Please see image to clarify what i want. Please let me know how can i get correct results.
|
in grouping getting duplicate records
|
CC BY-SA 3.0
| null |
2011-06-15T12:33:38.927
|
2014-05-15T20:40:57.613
|
2014-05-15T20:40:57.613
| 1,445,356 | 776,216 |
[
"sql-server"
] |
6,357,814 | 1 | 6,358,547 | null | 4 | 1,649 |
I am a database designer with an existencial doubt.
If you have a table1 that must have a relation with table2 or (exclusive or, one or another) table3,
- 
Is knokn that nullable indexed fields (option A table1) are a bad decision (see O'Reilly High Performance MySQL Chapter 3 or [MySQL manual](http://dev.mysql.com/doc/refman/5.5/en/data-size.html)), but also is known that a join would take its time to execute (option B)...
Academical choice would be B, but i would like a real world explanation if it is really better for high performance or not.
Thanks in advance!!
|
Nullable foreign keys vs relational tables for N:M relations
|
CC BY-SA 3.0
| 0 |
2011-06-15T12:42:34.983
|
2011-06-22T09:27:11.013
|
2011-06-22T09:27:11.013
| 799,519 | 799,519 |
[
"mysql",
"database",
"performance",
"database-design"
] |
6,357,841 | 1 | 6,357,947 | null | 3 | 2,253 |
I have read dozens of questions here on SO (and not only) regarding arkanoid collision detection, namely, moving circle collision against a stationery rectangle, but all of them ask how to detect a collision or how to detect which side of the rectangle the ball hits. My question is a bit different - it concerns the calculation of the new speed direction in case when the ball hits the of the rectangle.
For simplicity's sake let's assume that `Vx >= 0` and `Vy <= 0`, that is, the ball is coming from the below from the left upward and rightward and also suppose I know it's gonna hit the lower side of the rectangle. The green arrow shows the approximate direction of the ball and the blue dot shows the first point on the line containing the lower side of the rectangle that the ball hits. If that point lies strictly within the lower side of the rectangle then all is trivial - just change `Vy` to `-Vy`. However when that point lies outside the lower side it means that the first point of the rectangle that the ball will touch is going to be its lower-left corner, in which case I don't think that changing the `Vy` to `-Vy` is correct. I think that the new velocity angle must be dependent on the distance of the blue point to the corner. Also I think that not only `Vy` but also `Vx` must change (preserving, possibly, the length of the V vector).

So, ? If you know any good links that address this question I'd be delighted to know them. Also note that I am more interested in the absolute of this rather than easy-to-code optimized approximations. You can assume there is no rotation involved. Thank you very much in advance
|
Arkanoid Collision Detection... Again
|
CC BY-SA 3.0
| null |
2011-06-15T12:44:48.437
|
2011-06-15T13:34:28.337
| null | null | 469,935 |
[
"geometry",
"collision-detection",
"physics"
] |
6,357,830 | 1 | 6,358,000 | null | 1 | 218 |
For an application I need to send personalized invitation emails to end-users every hour. Those users email-addresses, and the rest of their information are in the database.
- `Planned.IsPlannable``True``Planned.DateStart``Planned.DateEnd`- - -
There are at least to choose from: retrieving the appropriate data via a
1:) View something like:
```
SELECT [Computer].ComputerName,
[User].UserEmail,
[Planned].DateAvailable,
[Planned].DatePlanned
FROM [Computer]
INNER JOIN
[Planned] ON [Computer.ComputerID] = [Planned.ComputerID]
INNER JOIN
[User] ON [Computer].UserID = [User].UserID
WHERE (DATEDIFF(dd, GETDATE(), [Planned.DateAvailable]) < 10)
AND Planned.IsPlannable = 1
```
and , based on the results of this view, the appropriate messages of this application.

2:) in the view and return something like
```
[EmailTo]
[Subject]
[Body]
```
Then only iterate trough the results and create `MailMessage` Objects from it
in both cases I get the messages like:
```
foreach (vwGetInvitableComputer u in UserController.GetAllInvitableUsers())
{
// where the usercontroller wraps the Subsonic logic.
// the composition happens here
}
```
Iterate trough that in the C# code and just compose the mailmessage from that preformatted data.
What scenario is performance and resources wise to choose?
There is indeed text manipulation in the database in option 2. However, this is replacing three strings in the messagbody to the CompterName, DateStart and DateEnd.Perhaps, SQL-views are smart enough to spread the performance for this, while the c# code does it "when requested"?
|
Views with business logic vs code
|
CC BY-SA 3.0
| null |
2011-06-15T12:44:15.293
|
2011-06-15T13:00:44.113
|
2011-06-15T13:00:44.113
| 400,223 | 400,223 |
[
".net",
"sql",
"subsonic"
] |
6,358,066 | 1 | 6,358,272 | null | 16 | 15,854 |
I asked [this](https://stackoverflow.com/questions/6355543/pass-argument-to-a-composite-component-action-attribute) question and although the answer directly satisfied my needs I am left with a feeling that there has to a simpler solution for this specific problem.
I would like to have a composite component that accepts a list of items (The type of the items agreed upon so the members can be used freely within the composite component)
The CC (composite component) display the list of items and allows for addition and subtraction of items.
I would like to do this in the most simple and efficient manner.
To illustrate the problem, an example:

The definition should be rather simple (unless of course, its not :-) ):
```
<special:dynamicFieldList value="#{bean.fieldList} />
```
The most abstract form of a `Field` object would be:
```
public class Field{
String uuid;
String value;
}
```
I guess that's it.
How would you implement this in a simple manner?
Thanks!
|
How to implement a dynamic list with a JSF 2.0 Composite Component?
|
CC BY-SA 3.0
| 0 |
2011-06-15T13:02:51.090
|
2015-07-16T15:28:45.400
|
2017-05-23T11:45:34.290
| -1 | 128,076 |
[
"jsf",
"jsf-2",
"facelets",
"dynamic-forms",
"composite-component"
] |
6,358,184 | 1 | 6,396,924 | null | -2 | 845 |
I managed to install vtk on my ubuntu. I'm using code::Blocks as compiler, working in c++. I also compiled and ran some of the examples given in the vtk examples web page. But at some examples, for example when vtkChart.h is involved, my compiler gives errors which refer to the content of the file.
These header files are generated automatically and should contain no errors. You can check the image below. What may be wrong? Is it caused by the compiler?
Thank your all.

For those who can't see the picture, the code is given below:
```
#ifndef __vtkChart_h
#define __vtkChart_h
#include "vtkContextItem.h"
class vtkTransform2D;
class vtkContext2D;
class vtkContextScene;
class vtkPlot;
class vtkAxis;
class vtkTextProperty;
class vtkInteractorStyle;
class vtkAnnotationLink;
class vtkTable;
class VTK_CHARTS_EXPORT vtkChart : public vtkContextItem
{
public:
vtkTypeMacro(vtkChart, vtkContextItem);
virtual void PrintSelf(ostream &os, vtkIndent indent);
```
just for the code segment shown, errors below show up.
../VTK-build/VTK-5.6/VTK/Charts/vtkChart.h|38|error: expected class-name before ‘{’ token|
../VTK-build/VTK-5.6/VTK/Charts/vtkChart.h|40|error: ‘vtkContextItem’ does not name a type|
../VTK-build/VTK-5.6/VTK/Charts/vtkChart.h|40|error: ‘vtkContextItem’ has not been declared|
../VTK-build/VTK-5.6/VTK/Charts/vtkChart.h|40|error: invalid static_cast from type ‘vtkObjectBase*’ to type ‘vtkChart*’|
../VTK-build/VTK-5.6/VTK/Charts/vtkChart.h||In member function ‘virtual vtkObjectBase* vtkChart::NewInstanceInternal() const’:|
../VTK-build/VTK-5.6/VTK/Charts/vtkChart.h|40|error: ‘New’ is not a member of ‘vtkChart’|
and goes on..
|
Do some VTK Library files contain errors?
|
CC BY-SA 3.0
| 0 |
2011-06-15T13:12:30.827
|
2011-06-18T15:12:50.720
|
2011-06-15T13:38:40.627
| 656,672 | 656,672 |
[
"c++",
"codeblocks",
"vtk"
] |
6,358,393 | 1 | 6,360,062 | null | 3 | 1,799 |
i'm developing a calculator for iphone. The design is similar to this:

The problem is that i can't show the cursor in my textField because the input is managed from buttons like the image. Moreover [textField becomeFirstResponder ] doesn't work because it shows the default keyboard.
So i tried to
```
textResultado.inputView = scrollView;
```
but then the tabBarController can't receive touch events because my custom keyboard contained in the scroll view is over it.
The caption is from an app in the AppStore so must be a way in order to solve this problem (show the cursor in a TextField using a different inputView and the tabBar still working fine).
Anyone can help me?
|
Iphone textfield display cursor
|
CC BY-SA 3.0
| null |
2011-06-15T13:26:14.907
|
2013-06-17T13:57:56.163
|
2011-06-15T13:31:31.627
| 456,851 | 258,863 |
[
"iphone",
"uitextfield"
] |
6,358,416 | 1 | 6,359,054 | null | 2 | 1,267 |
I have some XML that I am trying to deserialize. The Kronos_WCF object deserializes fine but the Response objects do not. Is there some recursive deserialization teqnique I am missing?
Here is the XML I am trying to deserialize:
```
<?xml version='1.0' encoding='UTF-8' ?>
<Kronos_WFC Version="1.0" WFCVersion="6.2.0.4" TimeStamp="6/15/2011 9:15AM GMT-04:00">
<Response Status="Success" Timeout="1800" PersonKey="-1" Object="System" UserName="User" Action="Logon" PersonNumber="User">
</Response>
<Response Status="Success" Object="System" UserName="User" Action="Logoff">
</Response>
</Kronos_WFC>
```
Here is my deserializer:
```
public static T Deserialize<T>(this string xml)
{
var ser = new XmlSerializer(typeof (T));
object obj;
using (var stringReader = new StringReader(xml))
{
using (var xmlReader = new XmlTextReader(stringReader))
{
obj = ser.Deserialize(xmlReader);
}
}
return (T) obj;
}
```
Here is a screen shot of what I am seeing in VS2010:

Here is the code from the classes generated using XSD.exe:
```
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[XmlRootAttribute("Kronos_WFC", Namespace = "", IsNullable = false)]
public class Kronos_WFCType
{
private object[] m_itemsField;
private string m_timeStampField;
private string m_versionField;
private string m_wFcVersionField;
/// <remarks/>
[XmlElementAttribute("Request", typeof(RequestType), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[XmlElementAttribute("Response", typeof(ResponseType), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[XmlElementAttribute("Transaction", typeof(TransactionType), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public object[] Items
{
get
{
return m_itemsField;
}
set
{
m_itemsField = value;
}
}
[XmlAttributeAttribute()]
public string TimeStamp
{
get
{
return m_timeStampField;
}
set
{
m_timeStampField = value;
}
}
/// <remarks/>
[XmlAttributeAttribute()]
public string Version
{
get
{
return m_versionField;
}
set
{
m_versionField = value;
}
}
/// <remarks/>
[XmlAttributeAttribute()]
public string WFCVersion
{
get
{
return m_wFcVersionField;
}
set
{
m_wFcVersionField = value;
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public class ResponseType
{
private string messageField;
private string sequenceField;
private string statusField;
private string transactionSequenceField;
/// <remarks/>
[XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string Message
{
get
{
return messageField;
}
set
{
messageField = value;
}
}
/// <remarks/>
[XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string Sequence
{
get
{
return sequenceField;
}
set
{
sequenceField = value;
}
}
/// <remarks/>
[XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string Status
{
get
{
return statusField;
}
set
{
statusField = value;
}
}
/// <remarks/>
[XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string TransactionSequence
{
get
{
return transactionSequenceField;
}
set
{
transactionSequenceField = value;
}
}
}
```
Any help would be appreciated.
|
XML Recursive Deserialization
|
CC BY-SA 3.0
| 0 |
2011-06-15T13:27:32.737
|
2011-06-15T14:18:14.843
|
2011-06-15T14:08:45.043
| 76,337 | 575,051 |
[
"c#",
"xml",
"serialization",
"xml-serialization"
] |
6,358,797 | 1 | 6,358,891 | null | 26 | 21,350 |
I am working on a custom list view. I want to show a `CheckBox` at the custom view. There is no text for the `CheckBox`. I found it always have some spaces at the right of the `CheckBox`.
Here is my layout xml file:
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="horizontal" android:background="#fa9654"
android:paddingTop="65dp" android:paddingBottom="65dp">
<TextView android:id="@+id/bus_route_list_item_num"
android:layout_height="wrap_content" android:layout_width="0dip"
android:gravity="center" android:layout_gravity="center_vertical|center_horizontal"
android:layout_weight="0.15"></TextView>
<TextView android:id="@+id/bus_route_list_item_station"
android:layout_height="wrap_content" android:layout_width="0dip"
android:gravity="left" android:layout_gravity="center_vertical|center_horizontal"
android:layout_weight=".5"></TextView>
<TextView android:id="@+id/bus_route_list_item_fee"
android:layout_height="wrap_content" android:layout_width="0dip"
android:gravity="center" android:layout_gravity="center_vertical|center_horizontal"
android:layout_weight=".15"></TextView>
<CheckBox android:id="@+id/bus_route_list_item_reminder" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_weight=".20" android:gravity="center"
android:layout_gravity="center" android:paddingRight="0dp" android:paddingLeft="0dp"
android:paddingTop="0dp" android:paddingBottom="0dp" android:background="#0066ff"
android:text=""
/>
</LinearLayout>
```
The result looks like:

As you can see there are some space at the right of the checkbox. What I want is put the checkbox at the middle of the blue area.
Is it possible to remove the unwanted space? thanks
|
How to remove unwanted spaces at the right of CheckBox?
|
CC BY-SA 4.0
| 0 |
2011-06-15T13:53:52.973
|
2022-08-02T13:54:45.673
|
2022-08-02T13:54:45.673
| 6,782,707 | 767,987 |
[
"android",
"android-layout",
"checkbox",
"material-design",
"padding"
] |
6,358,865 | 1 | 6,359,164 | null | 14 | 17,083 |
Hi I am using the following code to generate an xyplot using lattice
```
xyplot(Rate~Weight|Temp, groups=Week, rate,
pch=c(15,16,17,3), col=c("blue","red","green","purple"),
as.table=TRUE,
xlab="Weight (gr)", ylab="Rate (umol/L*gr)",
main="All individuals and Treatments at all times",
strip=strip.custom(strip.names=1),
key=
list(text=list(c("Week","1","2","6","8")),
points=list(pch=c(NA,15,16,17,3),col=c(NA,"blue","red","green","purple")),
space="right")
)
```
This gives me the following plot:

Now after changing the code to include panel order as suggested:
```
xyplot(Rate~Weight|Temp, groups=Week, rate,
index.cond=list(c(4,1,2,3)),#this provides the order of the panels
pch=c(15,16,17,3), col=c("blue","red","green","purple"),
as.table=TRUE,
xlab="Weight (gr)", ylab="Rate (umol/L*gr)",
main="All individuals and Treatments at all times",
strip=strip.custom(strip.names=1),
key=
list(text=list(c("Week","1","2","6","8")),
points=list(pch=c(NA,15,16,17,3),col=c(NA,"blue","red","green","purple")),
space="right")
)
```
and we get the correct order

Thanks for the help
|
How to change the order of the panels in simple Lattice graphs
|
CC BY-SA 3.0
| 0 |
2011-06-15T13:58:14.297
|
2012-04-24T15:57:50.037
|
2011-06-16T10:08:40.317
| 790,664 | 790,664 |
[
"r",
"plot",
"lattice"
] |
6,358,934 | 1 | 6,365,162 | null | 1 | 1,216 |
I'm getting a data from the rss feed in which i get the title, date and urllink i'm showing the title and date in my tableView and displaying the urllink in the detailView .
In this detail view i'm giving the UIBarButton
```
UIBarButtonItem *addButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"bell.png" ] style:UIBarButtonItemStylePlain target:self action:@selector(addEvent:)];
```
addEvent method is used to for giving the EventKit option...
```
-(IBAction) addEvent:(id)sender {
EKEventEditViewController *addController = [[EKEventEditViewController alloc] initWithNibName:nil bundle:nil];
addController.eventStore = self.eventStore;
[self presentModalViewController:addController animated:YES];
addController.editViewDelegate = self;
[addController release];
}
```
after clicking on this addButtonItem we get Add Event screen in this screen first option is Title and Location i Want to update this "Title" option with my data getting from RssFeed.

How can i update this from my app with my RSSFeed Title data where should i do the changes ...
Thanks in Advance.
|
How to update EventKit Add Event title from my app?
|
CC BY-SA 3.0
| 0 |
2011-06-15T14:02:38.960
|
2013-07-10T03:45:55.037
|
2011-06-15T14:23:12.867
| 755,278 | 755,278 |
[
"iphone",
"objective-c",
"xcode4"
] |
6,358,945 | 1 | 6,359,231 | null | 2 | 292 |
After doing some analyzing of our web site, we discovered that NHibernate logs an awful lot.
Logging is set to WARN and should not log. Does NHibernate still prints debug messages even if logging level is not met?
See included picture:

|
NHibernate logging question
|
CC BY-SA 3.0
| null |
2011-06-15T14:03:06.637
|
2011-06-15T14:22:20.753
| null | null | 189,993 |
[
"c#",
"asp.net",
"nhibernate",
"logging",
"log4net"
] |
6,358,954 | 1 | 6,359,887 | null | 1 | 105 |
I'm having some really strange behavior with the NavigationBar and I'm hoping someone has seen something like this before.

I have a UIView that is being pushed with
```
[self.navigationController pushViewController:cardView animated:NO];
```
and immediately when the view is pushed I get the result that can be seen in the first half of the picture above.
When I click a button that pushes a modalview controller and I then return to the original view (with a simple dismiss) I get what can be seen in the second half of the picture.
When the view first loads it appears it does not account for the height of the navigation bar and puts it beneath the bar. Yet the view is larger in interface builder so it does adjust it's size according to the bars, but still puts itself beneath them.
When returning from the modalview it has just pushed everything down the right amount of pixels for everything to be visible.
It's as if something forces it to be at window origin 0,0 when first loading and then when returning from the modalview it fixes itself.
I don't even know where to begin looking for the problem on this one.
Edit: I just discovered that if I set animated:YES in the above code it puts it in the right position it has slid in the view.
|
Strange behaviour with NavigationBar
|
CC BY-SA 3.0
| null |
2011-06-15T14:03:27.427
|
2011-06-15T15:04:32.723
|
2011-06-15T14:23:00.630
| 9,191 | 9,191 |
[
"iphone"
] |
6,359,083 | 1 | null | null | 3 | 1,285 |
I tried with something like:
```
class PedidoForm(forms.ModelForm):
class Meta:
model = Pedido
widgets = {
'nota': forms.Textarea(attrs={'cols': 80, 'rows': 20}),
}
```
But it changes in both, list view and single object view. I'd like to change int only for the single object view. HOw can I do it?
I want this:

But not this:

|
How can I use different form widgets in Django admin?
|
CC BY-SA 3.0
| 0 |
2011-06-15T14:12:29.147
|
2017-03-04T08:42:01.600
|
2017-03-04T08:42:01.600
| 1,033,581 | 157,519 |
[
"django",
"forms",
"widget"
] |
6,359,137 | 1 | 6,360,535 | null | 1 | 1,649 |
Here are sample pictures of two `EditText` fields I've added in an Action Bar:

[This is from the Graphical Layout tool in Eclipse]

[This is what it looks like in my emulator (2.1 WVGA854)
My question is, how can I make the `EditText` look a bit closer to the Graphical Layout? Or is this a function of the emulation? On my device, which has a custom rom, the `EditText` is square but looks similar to the Graphical Layout, which is what I want.
I've tried setting the textAppearance to `"@android:attr/textAppearanceSmall"`. This does help in that it changes the size of the text within the EditText to be viewable, but it does not affect the size of the `EditText` itself.
Here's the XML for my EditText:
```
<EditText
android:maxLines="1"
android:scrollHorizontally="true"
android:textAppearance="@android:attr/textAppearanceSmall"
android:layout_marginTop="5dip"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
```
I could post the full XML, but essentially this EditText is enclosed (along with the search icon ImageView) in a RelativeLayout that is within another RelativeLayout.
Thanks for any help!
By request, here is the full XML for the top search bar:
```
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/IBSearchOverlayMic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/aslctr_search_overlay_blackbutton"
android:src="@drawable/search_overlay_ic_microphone" />
<ImageView
android:id="@+id/IVSearchOverlayDivider1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/IBSearchOverlayMic"
android:src="@drawable/search_overlay_division" />
<ImageButton
android:id="@+id/IBSearchOverlaySearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/IVSearchOverlayDivider1"
android:background="@drawable/aslctr_search_overlay_blackbutton"
android:src="@drawable/search_overlay_ic_searchwhite" />
<RelativeLayout
android:id="@+id/RLSearchOverlaySearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/IBSearchOverlaySearch"
android:layout_alignBottom="@id/IBSearchOverlaySearch"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/IBSearchOverlaySearch"
android:layout_centerVertical="true"
android:background="@drawable/search_overlay_searchbg">
<EditText
android:id="@+id/ETSearchOverlaySearch"
android:maxLines="1"
android:scrollHorizontally="true"
android:textAppearance="@android:attr/textAppearanceSmall"
android:layout_marginTop="5dip"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@id/ETSearchOverlaySearch"
android:layout_centerVertical="true"
android:layout_marginRight="10dip"
android:clickable="false"
android:focusable="false"
android:src="@drawable/search_actionbar_ic_searchcream" />
</RelativeLayout>
</RelativeLayout>
```
|
Android EditText vertical sizing: I want it to be small!
|
CC BY-SA 3.0
| 0 |
2011-06-15T14:15:39.813
|
2011-06-15T15:48:10.940
|
2011-06-15T14:49:23.057
| 255,394 | 255,394 |
[
"android",
"android-layout",
"android-emulator",
"android-edittext"
] |
6,359,180 | 1 | 6,359,203 | null | 0 | 3,929 |
So I have this issue with setting a margin that dynamical decreases and increases to a minimum of 8px and maximum of 40px.
The margin is being set between 11 different blocks which are inside a container. The container can be a minimum width of 960px or a maximum of 1280px and always has a fixed height.
How can I make it so that the space (margin-left) in between the boxes always stretches to fill the container correctly?
Below is an image of what I am aiming for at 960px width

Now an an image of it at it's full width of 1280px

As you can see from the images all im trying to do is separate the boxes as the resolution is changed.
I currently have something like this using jQuery
```
$(window).bind('resize', function(){
var barWidth = $(".topBar").width();
$(".barModules li").css('margin-left', my dynamic value here));
});
```
I'm stuck on how I should be calculating this and if that's even the right way to go about it :/
An example of what I have so far: [http://jsfiddle.net/m4rGp/](http://jsfiddle.net/m4rGp/)
|
Setting a dynamic margin
|
CC BY-SA 3.0
| null |
2011-06-15T14:18:24.220
|
2011-06-15T15:44:25.893
|
2011-06-15T15:44:25.893
| 560,648 | 516,409 |
[
"javascript",
"jquery"
] |
6,359,447 | 1 | 6,359,529 | null | 0 | 886 |
If I right click on my project and select properties. Then select android properties on the left side of the screen I am given a window where I can change project build target or add a library. The problem is none of my changes appear to be "sticking" in this screen when I hit apply or ok.
For example I go into the screen to add a library project:

Then I hit apply, then ok. When I go back into the screen none of my changes have been applied:

This is a problem because I want to reference a library project in my main project. Whenever I try to reference one of the classes in my library project from my main project I get a class not found exception. Also whenever I run my project it says the libray-project.apk is not found in the console window?
Any suggestions or is this possibly a bug in eclipse or the android tools?
This bug has been reported here: [http://code.google.com/p/android/issues/detail?id=17673&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars](http://code.google.com/p/android/issues/detail?id=17673&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars)
|
Android Properties Window
|
CC BY-SA 3.0
| 0 |
2011-06-15T14:35:50.787
|
2011-06-15T15:08:07.057
|
2011-06-15T15:08:07.057
| 711,718 | 711,718 |
[
"android",
"eclipse",
"class",
"properties"
] |
6,359,976 | 1 | 6,360,168 | null | 0 | 1,413 |
I am recording the changes made in a directory. That directory has a lot of files so I am trying to reduce the size of my database by deleting duplicates. But to make things clear let me show you what I have.
I have a table named table1

from looking at this table I can tell that the first time I scanned the directory I had two Files A and B. The next time I scanned the directory I know that I have added file C and modified file A by looking at the table. note that file A has a different DateModified that's why I can tel it's been modified. Lastly on my last scan I know that file X has been created and also that file B has been modified. File A and C stayed the same.
After creating a lot of scans there are several files that get repeated. If they have a different DateModified I don't want to remove duplicates because I want to track changes on that directory. Moreover when removing duplicates I want to stay with the lower DateInserted so that I can know when it was modifies.
So in other words I want to build a query where I can remove FileID 6 because FileID 3 contains the same path and same DateModified. I will also like to remove FileID 4 because fileID 2 cointains the same two records. And lastly I will like to remove fileID 5 for the same reason. How could I build this query?
EDIT
I am just adding the query that I have been working with hoping it can help.

with this query I know that those are the files that repeat based on the criteria that I need. I don't know how to go from there and delete the higher dateInserted duplicated based on those results. Hope this helps
|
remove duplicates with specific criteria sql
|
CC BY-SA 3.0
| null |
2011-06-15T15:11:00.220
|
2011-06-15T15:28:19.127
|
2011-06-15T15:28:19.127
| 637,142 | 637,142 |
[
"sql",
"sqlite"
] |
6,359,988 | 1 | null | null | 0 | 968 |
I have a short question that has been bothering for last few hours:
(on form submit some value inside of it is empty when it needs to be entere).
I have faced this problem while using RealPerson captcha plugin for jQuery in my jsp page. When I click on submit button with input field for captcha empty, the captcha disappears.
I tried with binding and rendered but the problem still seems to be there.
```
<h:outputLabel for="captcha" value="#{ui.pleaseEnterTextInTheImage}" rendered="#{sessionBean.showCaptcha}"/>
<h:panelGroup rendered="#{sessionBean.showCaptcha}">
<h:inputText id="captcha" styleClass="captcha" binding="#{captcha}"
validator="#{validationBean.captchaValidator}" required="true"/>
<h:outputText value=" "/><h:message for="captcha" styleClass="captchaMsg"/>
</h:panelGroup>
<h:panelGroup rendered="#{!captcha.valid}">
<script>alert('Foo input is invalid!');</script>
</h:panelGroup>
```
When page goes live:

After I click "Register" with captcha entry left blank:

jQuery code that I use.
First on pageload, I assign the captcha to the field:
```
$(function() {
$('.captcha').realperson();
});
```
Then, after I reassign a new captcha after the field gets rerendered by calling this function from my bean:
```
function updateCaptchaFromBean() {
$(function() {
$('.captcha').realperson();
});
}
```
I've found a simple javascript trick to solve this with `onclick()`:
```
<h:commandButton styleClass="buttonSubmit" value="#{ui.registerBUTTON}"
action="#{register.addAction}"
onclick="if ($('.captcha').val() == '') return false"
id="submitBtn" />
```
|
Executing javascript function before message that a value is required is shown
|
CC BY-SA 3.0
| null |
2011-06-15T15:12:00.287
|
2011-06-17T11:21:18.133
|
2011-06-17T11:21:18.133
| 46,687 | 46,687 |
[
"javascript",
"jquery",
"jsf",
"captcha"
] |
6,360,222 | 1 | 6,360,261 | null | 6 | 5,918 |
In Android, I create a password field like this:
```
EditText text = new EditText(context);
text.setTransformationMethod(PasswordTransformationMethod.getInstance());
```
Or like this, which seems to do the same thing:
```
EditText text = new EditText(context);
text.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
```
I get a nice password field except for the last character typed by the user. It's visible on the screen for a few seconds before beeing masked with a dot.
Here is a screenshot:

Do you know how to fix this behaviour please?
|
Problem with android password field, not hiding the last character typed
|
CC BY-SA 3.0
| 0 |
2011-06-15T15:27:48.923
|
2022-08-26T14:24:53.593
| null | null | 673,726 |
[
"android",
"android-edittext"
] |
6,360,621 | 1 | 6,361,905 | null | 3 | 996 |
I've a pretty basic math expression grammar for ANTLR here and what's of interest is handling the implied `*` operator between parentheses e.g. `(2-3)(4+5)(6*7)` should actually be `(2-3)*(4+5)*(6*7)`.
Given the input `(2-3)(4+5)(6*7)` I'm trying to add the missing `*` operator to the AST tree while parsing, in the following grammar I think I've managed to achieve that but I'm wondering if this is the correct, most elegant way?
```
grammar G;
options {
language = Java;
output=AST;
ASTLabelType=CommonTree;
}
tokens {
ADD = '+' ;
SUB = '-' ;
MUL = '*' ;
DIV = '/' ;
OPARN = '(' ;
CPARN = ')' ;
}
start
: expression EOF!
;
expression
: mult (( ADD^ | SUB^ ) mult)*
;
mult
: atom (( MUL^ | DIV^) atom)*
;
atom
: INTEGER
| (
OPARN expression CPARN -> expression
)
(
OPARN expression CPARN -> ^(MUL expression)+
)*
;
INTEGER : ('0'..'9')+ ;
WS : (' ' | '\t' | '\n' | '\r' | '\f')+ {$channel = HIDDEN;};
```
This grammar appears to output the correct AST Tree in ANTLRworks:

I'm only just starting to get to grips with parsing and ANTLR, don't have much experience so feedback with really appreciated!
Thanks in advance! Carl
|
Whats the correct way to add new tokens (rewrite) to create AST nodes that are not on the input steam
|
CC BY-SA 3.0
| null |
2011-06-15T15:53:31.913
|
2011-06-15T17:42:35.433
|
2011-06-15T17:42:35.433
| 50,476 | 498,468 |
[
"antlr",
"antlr3"
] |
6,360,665 | 1 | null | null | 5 | 1,532 |
I'm trying to build a interface that the user can move his finger around the screen an a list of images moves along a path. The idea is that the images center nevers leaves de path.
Most of the things I found was about how to animate using CGPath and not about actually using the path as the track to a user movement.
I need to objects to be tracked on the path even if the user isn't moving his fingers over the path.
For example (image bellow), if the object is at the beginning of the path and the user touches anywhere on the screen and moves his fingers from left to right I need that the object moves from left to right but following the path, that is, going up as it goes to the right towards the path's end.
== End update
This is the path I've draw, imagine that I'll have a view (any image) that the user can touch and drag it along the path, there's no need to move the finger exactly over the path. If the user move from left to right the image should move from left to right but going up if need following the path.

This is how I'm creating the path:
```
CGPoint endPointUp = CGPointMake(315, 124);
CGPoint endPointDown = CGPointMake(0, 403);
CGPoint controlPoint1 = CGPointMake(133, 187);
CGPoint controlPoint2 = CGPointMake(174, 318);
CGMutablePathRef path = CGPathCreateMutable();
CGPathMoveToPoint(path, NULL, endPointUp.x, endPointUp.y);
CGPathAddCurveToPoint(path, NULL, controlPoint1.x, controlPoint1.y, controlPoint2.x, controlPoint2.y, endPointDown.x, endPointDown.y);
```
Any idead how can I achieve this?
|
How to move an UIView along a curved CGPath according to user dragging the view
|
CC BY-SA 3.0
| 0 |
2011-06-15T15:56:30.747
|
2011-06-21T08:52:08.837
|
2011-06-16T20:18:30.460
| 335,974 | 335,974 |
[
"ios",
"drag",
"cgpath"
] |
6,360,947 | 1 | 6,361,156 | null | 0 | 58 |
my table looks like this:

If the field name contains cost or quantity for the same lineItemIds, I have to display the result as:
> cost is changed from 8*1=8
(fromVal*fromVal) to 9*6=54
(toVal*toVal) for itemID 123.
any help will be appreciated.
|
select statement
|
CC BY-SA 3.0
| null |
2011-06-15T16:21:39.123
|
2011-06-15T16:38:16.967
|
2011-06-15T16:24:46.367
| 166,538 | 121,400 |
[
"oracle"
] |
6,361,014 | 1 | 6,361,079 | null | 11 | 2,827 |
Can anyone explain how to calculate the highlight color based on dominant color in images like Windows-7 taskbar when mouse is over the taskbar item?
Any c# code?

|
Windows 7 Taskbar Icons Highlight Color
|
CC BY-SA 3.0
| 0 |
2011-06-15T16:26:11.763
|
2015-06-14T08:50:49.343
|
2015-06-14T08:50:49.343
| 815,724 | 1,152,862 |
[
"c#",
"windows-7",
"taskbar"
] |
6,361,072 | 1 | 6,361,445 | null | 2 | 608 |
I have an HTML table whose contents sometimes don't fit inside the specified sizes of their respective cells. In all browsers, the default behavior is to make the cells expand to fit their contents, either vertically or horizontally. Instead, I'd like to trim the contents to fit their cells like this:

I am using [a jQuery plugin](http://datatables.net) that allows the user to sort the table by any of its fields. For this reason, it is very important that the actual contents be never trimmed, just displayed as if they had been trimmed.
How could I do that using standard technologies only (CSS and JavaScript)?
|
How to make the contents of an HTML table fit within their cells?
|
CC BY-SA 3.0
| 0 |
2011-06-15T16:30:50.077
|
2011-06-25T12:38:25.460
|
2011-06-15T21:08:15.137
| 46,571 | 46,571 |
[
"javascript",
"css"
] |
6,361,295 | 1 | 6,361,364 | null | 1 | 3,972 |
I am using Netbeans 7.0 IDE to create Entity Classes from Database.
When I am requested the JNDI name of the Data Source I am having trouble.
My Database looks like the following:

Now when trying to create the entity classes from Database:

It brings the tables corresponding to schema right down below schema.
Question: Whats the appropriate JNDI name of my datasource?
Thanks in advance
|
Database Table JNDI Name problem
|
CC BY-SA 3.0
| null |
2011-06-15T16:48:40.667
|
2011-06-15T16:55:13.607
| null | null | 583,673 |
[
"java",
"jndi",
"netbeans7.0"
] |
6,361,415 | 1 | null | null | 0 | 1,921 |
I have a view layout like this:
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@color/light_gray"
android:padding="5dip">
<View android:id="@+id/fixedSpace" android:layout_width="fill_parent"
android:layout_height="50dip" android:background="@color/aqua"
android:layout_alignParentBottom="true" android:clickable="true"
android:onClick="onClickStartAnimation" />
<View android:id="@+id/dynamicSpace" android:layout_width="fill_parent"
android:layout_height="200dip" android:background="@color/lime"
android:layout_above="@id/fixedSpace" />
<View android:id="@+id/remainingSpace" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@color/pink"
android:layout_alignParentTop="true" android:layout_above="@id/dynamicSpace" />
</RelativeLayout>
```
What I want to achieve is basically a grow/shrink behavior of `dynamicSpace` over the time . With animations I can produce the following:



However, that doesn't really resize my views, in particular `dynamicSpace` and `remainingSpace`. It just animates the view `dynamicSpace` moving in. But the view "container" already has the space occupied right from the beginning.
Correct would be that the lime colored `dynamicSpace` starts with 0px and the pink colored `remainingSpace` takes over, so there is no gray space in between.
|
Android: grow/shrink View over time
|
CC BY-SA 3.0
| null |
2011-06-15T16:59:53.913
|
2011-11-12T10:59:26.633
|
2011-06-16T09:53:24.363
| 184,367 | 184,367 |
[
"android",
"android-layout",
"android-animation"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.