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,361,444 | 1 | 6,411,128 | null | 0 | 55 |
I have a web page which contains jquery plugins whose initialization code is placed in document.ready event. My problem is while the page is loading the plugins take time for being applied, for example in the top of the page I am using a plugin for tabs and in the body of the page there's an images slider plugin and also a plugin that truncates text in some paragraphs, what happens is when I request the page and while it's being displayed in browser, the plugins seems to be not bound to the elements for example all the tabs containers are collapsed below each other as well as the images that supposed to be sliding horizontally they are all on top of each other and the text that supposed to be truncated isn't and once the page completely finish loading all the plugins take effect, I can see all the tabs containers jumping up to be correctly displayed, and the text suddenly gets truncated. The client is complaining from this behavior of page elements being collapsed then assembled, it really looks very ugly. I don't know how to solve this.
Can anyone help me?
Thanks in advance


|
Question about jquery plugins in asp.net page
|
CC BY-SA 3.0
| null |
2011-06-15T17:02:04.493
|
2011-06-20T12:28:14.470
|
2011-06-20T12:17:55.367
| 198,805 | 198,805 |
[
"jquery"
] |
6,361,506 | 1 | 6,361,557 | null | 2 | 262 |
I've searched, and the answers [here](https://stackoverflow.com/questions/2412561/in-firebug-how-to-tell-what-is-overriding-a-style) seem to state that I should look above the crossed-out property to find the style that is overriding it. However, there ARE no styles above it in my case (see screenshot.) The style I'm concerned with is the .sponsorFooter table margin-bottom property. Where else should I be looking for something that's overriding that property?

|
How can I tell which style is overriding another?
|
CC BY-SA 3.0
| null |
2011-06-15T17:06:47.297
|
2011-06-15T17:14:38.107
|
2017-05-23T10:00:11.243
| -1 | 341,611 |
[
"css",
"overriding",
"margin"
] |
6,361,498 | 1 | 6,392,742 | null | 4 | 882 |
I created a settings bundle for my iOS app and tried to edit the Root.plist file.
I can change some of the existing values (those that are created by default), but if I try to add a new item (no matter the type), Xcode 4 crashes with the following error:

Anybody knows what might be causing this?
I'm using Xcode 4.02 build 4A2002a.
This is the log:
```
ASSERTION FAILURE in /SourceCache/DVTKit/DVTKit-221/Framework/Classes/PlistView/DVTPlistDictionaryNode.m:171
Details: method -[DVTPlistDictionaryNode value] is inappropriate for instances of DVTPlistDictionaryNode
Object: <DVTPlistDictionaryNode: 0x202442340>
Method: -value
Thread: <NSThread: 0x200020700>{name = (null), num = 1}
Hints: None
Backtrace:
0 0x0000000100949773 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1 0x000000010006d394 _DVTAssertionFailureHandler (in DVTFoundation)
2 0x00000001002ed3cb -[DVTPlistDictionaryNode value] (in DVTKit)
3 0x00000001002f0443 -[DVTPlistModel replacePlist:withPlist:] (in DVTKit)
4 0x00000001003030d4 -[DVTPlistViewController outlineView:setObjectValue:forTableColumn:byItem:] (in DVTKit)
5 0x00007fff8830e149 -[NSOutlineView _dataSourceSetValue:forColumn:row:] (in AppKit)
6 0x00007fff883c4dd9 -[NSTableView performClickOnCellAtColumn:row:] (in AppKit)
7 0x00007fff883c1200 -[NSTableView _attemptToPerformClickOnFocusedColumn] (in AppKit)
8 0x00007fff86bd511c __NSFireDelayedPerform (in Foundation)
9 0x00007fff867f5be8 __CFRunLoopRun (in CoreFoundation)
10 0x00007fff867f3dbf CFRunLoopRunSpecific (in CoreFoundation)
11 0x00007fff88f577ee RunCurrentEventLoopInMode (in HIToolbox)
12 0x00007fff88f575f3 ReceiveNextEventCommon (in HIToolbox)
13 0x00007fff88f574ac BlockUntilNextEventMatchingListInMode (in HIToolbox)
14 0x00007fff87ec4e64 _DPSNextEvent (in AppKit)
15 0x00007fff87ec47a9 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
16 0x00007fff87e8a48b -[NSApplication run] (in AppKit)
17 0x00007fff87e831a8 NSApplicationMain (in AppKit)
18 0x0000000100000eec
19 0x0000000000000002
```
This is the contents of the root.plist created by Xcode itself:
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Title</key>
<string>Group</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>Key</key>
<string>name_preference</string>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>Title</key>
<string>Name</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>enabled_preference</string>
<key>Title</key>
<string>Enabled</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<real>0.5</real>
<key>Key</key>
<string>slider_preference</string>
<key>MaximumValue</key>
<integer>1</integer>
<key>MaximumValueImage</key>
<string></string>
<key>MinimumValue</key>
<integer>0</integer>
<key>MinimumValueImage</key>
<string></string>
<key>Type</key>
<string>PSSliderSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>
</dict>
</plist>
```
|
Xcode 4 crashes when trying to add a new item to "Preference items" array in a settings bundle
|
CC BY-SA 3.0
| 0 |
2011-06-15T17:06:09.543
|
2011-06-17T23:20:17.990
|
2011-06-15T21:51:27.990
| null | 74,415 |
[
"cocoa-touch",
"xcode4",
"crash",
"settings.bundle"
] |
6,361,614 | 1 | null | null | 3 | 356 |
Figure 1,i have one or a few pictures,and some mp3 files. i want to develop a winform and load picture into winform,then, when mouse over certain areas of the picture,the area change,and play mp3 file when the mouse click.
question:How do I know the mouse over the designated area?and then change the color of the area? how to know which areas of mouse clicks? and play mp3 files
These areas may be round, oval, rectangular...
perhaps this is hotspot image question.
anyone help me? thanks!

|
develop such winform using c#
|
CC BY-SA 3.0
| 0 |
2011-06-15T17:16:08.820
|
2013-11-15T18:24:55.240
|
2020-06-20T09:12:55.060
| -1 | 238,729 |
[
"c#",
"winforms",
"image"
] |
6,361,707 | 1 | 6,362,304 | null | 1 | 986 |
The [data connection dialog](http://archive.msdn.microsoft.com/Connection) is a database tool component released with Visual Studio. It allows users to build connection strings and to connect to specific data sources. Its source code [has been released on Code Gallery](http://blogs.msdn.com/b/vsdata/archive/2010/02/02/data-connection-dialog-source-code-is-released-on-code-gallery.aspx).

It's very useful, but the only problem is that its UI is always in English, regardless of the fact that it's run under a localized version of Windows.
I tried to use it in a WPF app:
```
DataConnectionDialog dcd = new DataConnectionDialog();
DataConnectionConfiguration dcs = new DataConnectionConfiguration(null);
dcs.LoadConfiguration(dcd);
dcd.SelectedDataSource = DataSource.SqlDataSource;
dcd.SelectedDataProvider = DataProvider.SqlDataProvider;
...
if (DataConnectionDialog.Show(dcd) == System.Windows.Forms.DialogResult.OK)
{
...
}
```
|
Localization of the standard MS Data Connection Dialog
|
CC BY-SA 3.0
| null |
2011-06-15T17:24:41.347
|
2011-06-15T18:12:21.273
| null | null | 199,722 |
[
"c#",
"wpf",
"winforms",
"localization",
"database-connection"
] |
6,361,781 | 1 | 6,488,098 | null | 17 | 16,220 |
I have a bunch of UIViews like in the image below. The red/pink (semi-transparent) view is on top of the others.
- `UISwipeGestureRecognizer`- `UITapGestureRecognizer`-

A tap on the (bottom-left) part of Green trigger its recognizer.
A tap on the parts of Green trigger its recognizer (Red blocks it).
That's the problem: I want Green to trigger. How can I do this?
In practice, the views may be in any order, any number and be subviews of each others etc. But the problem is the same:
---
I tried with the code below. It neatly traverses all views, but it fails since it cannot know if the event is part of a swipe or a tap. So the method always returns the red view. If I remove the swipe-recognizer from Red, the code works correctly.
```
- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
UIView *hitView = [super hitTest:point withEvent:event];
if (hitView == self)
{
if (self.hasASwipeRecognizer)
return self; // What if this was a tap?
if (self.hasATapRecognizer)
return self;
else
return nil;
}
else
return hitView;
}
```
|
How to reliably find correct view for UIGestureRecognizer?
|
CC BY-SA 3.0
| 0 |
2011-06-15T17:32:42.190
|
2014-02-07T14:26:58.817
|
2011-06-15T21:05:43.203
| 53,328 | 53,328 |
[
"iphone",
"cocoa-touch",
"uiview",
"uigesturerecognizer"
] |
6,361,857 | 1 | 7,099,455 | null | 5 | 5,129 |
I'm trying to perform a , directly analagous to [SQL Server Management Studio](http://en.wikipedia.org/wiki/SQL_Server_Management_Studio) diagramming tools. For example, in the illustration below, the user would drag `CustomerID` from the `User` entity to the `Customer` entity and create a foreign key relationship between the two.
The key desired feature is that a temporary arc path would be drawn as the user performs the drag operation, following the mouse. Moving entities or relationships once created isn't the issue I'm running into.

Some reference XAML corresponding to an entity on the diagram above:
```
<!-- Entity diagram control -->
<Grid MinWidth="10" MinHeight="10" Margin="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*" ></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.Column="0" IsHitTestVisible="False" Background="{StaticResource ControlDarkBackgroundBrush}">
<Label Grid.Row="0" Grid.Column="0" Style="{DynamicResource LabelDiagram}" Content="{Binding DiagramHeader, Mode=OneWay}" />
</Grid>
<ScrollViewer Grid.Row="1" Grid.Column="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Background="{StaticResource ControlBackgroundBrush}" >
<StackPanel VerticalAlignment="Top">
<uent:EntityDataPropertiesDiagramControl DataContext="{Binding EntityDataPropertiesFolder}" />
<uent:CollectionEntityPropertiesDiagramControl DataContext="{Binding CollectionEntityPropertiesFolder}" />
<uent:DerivedEntityDataPropertiesDiagramControl DataContext="{Binding DerivedEntityDataPropertiesFolder}" />
<uent:ReferenceEntityPropertiesDiagramControl DataContext="{Binding ReferenceEntityPropertiesFolder}" />
<uent:MethodsDiagramControl DataContext="{Binding MethodsFolder}" />
</StackPanel>
</ScrollViewer>
<Grid Grid.RowSpan="2" Margin="-10">
<lib:Connector x:Name="LeftConnector" Orientation="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="Collapsed"/>
<lib:Connector x:Name="TopConnector" Orientation="Top" VerticalAlignment="Top" HorizontalAlignment="Center" Visibility="Collapsed"/>
<lib:Connector x:Name="RightConnector" Orientation="Right" VerticalAlignment="Center" HorizontalAlignment="Right" Visibility="Collapsed"/>
<lib:Connector x:Name="BottomConnector" Orientation="Bottom" VerticalAlignment="Bottom" HorizontalAlignment="Center" Visibility="Collapsed"/>
</Grid>
</Grid>
```
My current approach to doing this is to:
1) Initiate the drag operation in a child control of the entity, such as:
```
protected override void OnPreviewMouseMove(MouseEventArgs e)
{
if (e.LeftButton != MouseButtonState.Pressed)
{
dragStartPoint = null;
}
else if (dragStartPoint.HasValue)
{
Point? currentPosition = new Point?(e.GetPosition(this));
if (currentPosition.HasValue && (Math.Abs(currentPosition.Value.X - dragStartPoint.Value.X) > 10 || Math.Abs(currentPosition.Value.Y - dragStartPoint.Value.Y) > 10))
{
DragDrop.DoDragDrop(this, DataContext, DragDropEffects.Link);
e.Handled = true;
}
}
}
```
2) Create a connector adorner when the drag operation leaves the entity, such as:
```
protected override void OnDragLeave(DragEventArgs e)
{
base.OnDragLeave(e);
if (ParentCanvas != null)
{
AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(ParentCanvas);
if (adornerLayer != null)
{
ConnectorAdorner adorner = new ConnectorAdorner(ParentCanvas, BestConnector);
if (adorner != null)
{
adornerLayer.Add(adorner);
e.Handled = true;
}
}
}
}
```
3) Draw the arc path as the mouse is being moved in the connector adorner, such as:
```
protected override void OnMouseMove(MouseEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
{
if (!IsMouseCaptured) CaptureMouse();
HitTesting(e.GetPosition(this));
pathGeometry = GetPathGeometry(e.GetPosition(this));
InvalidateVisual();
}
else
{
if (IsMouseCaptured) ReleaseMouseCapture();
}
}
```
The diagram `Canvas` is bound to a view model, and the entities and relationships on the `Canvas` are in turn bound to respective view models. Some [XAML](http://en.wikipedia.org/wiki/Extensible_Application_Markup_Language) relating to the overall diagram:
```
<ItemsControl ItemsSource="{Binding Items, Mode=OneWay}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<lib:DesignerCanvas VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle>
<Style>
<Setter Property="Canvas.Left" Value="{Binding X}"/>
<Setter Property="Canvas.Top" Value="{Binding Y}"/>
<Setter Property="Canvas.Width" Value="{Binding Width}"/>
<Setter Property="Canvas.Height" Value="{Binding Height}"/>
<Setter Property="Canvas.ZIndex" Value="{Binding ZIndex}"/>
</Style>
</ItemsControl.ItemContainerStyle>
</ItemsControl>
```
and `DataTemplate`s for the entites and relationships:
```
<!-- diagram relationship -->
<DataTemplate DataType="{x:Type dvm:DiagramRelationshipViewModel}">
<lib:Connection />
</DataTemplate>
<!-- diagram entity -->
<DataTemplate DataType="{x:Type dvm:DiagramEntityViewModel}">
<lib:DesignerItem>
<lib:EntityDiagramControl />
</lib:DesignerItem>
</DataTemplate>
```
The issue is that once the drag operation begins, mouse moves are no longer tracked and the connector adorner is unable to draw the arc as it does in other contexts. If I release the mouse and click again, then the arc starts drawing, but then I've lost my source object. I'm trying to figure a way to pass the source object in conjunction with mouse movement.
Circling back to this issue, I currently plan to not use drag and drop directly to do this. I currently plan to add a DragItem and IsDragging `DependencyProperty` for the diagram control, which would hold the item being dragged, and flag if a drag operation is occuring. I could then use `DataTrigger`s to change the `Cursor` and `Adorner` visibility based on IsDragging, and could use DragItem for the drop operation.
(But, I'm looking to award a bounty on another interesting approach. Please comment if more information or code is needed to clarify this question.)
Lower priority, but I'm still on the lookout for a better solution for a drag and drop diagramming approach. Want to implement a better approach in the open source [Mo+](http://moplus.codeplex.com) Solution Builder.
|
Drawing diagram arcs with drag and drop in WPF
|
CC BY-SA 3.0
| 0 |
2011-06-15T17:38:08.090
|
2014-10-13T21:39:38.507
|
2014-10-13T21:39:38.507
| 305,637 | 305,637 |
[
"wpf",
"mvvm",
"drag-and-drop",
"diagramming",
"mo+"
] |
6,362,443 | 1 | 6,362,529 | null | 0 | 190 |
I have a button on my tableview cell.
But after scrolling the buttons look like this:

It looks like there is sometimes one button above the other.
How can I solve this problem?
That's my code for the button in `cellForRowAtIndexPath`
```
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
Chapter *chapter = nil ;
UITableViewCell *cell = nil;
NSUInteger row = [indexPath row];
switch (indexPath.section) {
case 0:
chapter = [[einfuerung objectAtIndex:row]retain];
break;
case 1:
chapter = [[vertiefung objectAtIndex:row]retain];
break;
case 2:
chapter = [[spezial objectAtIndex:row]retain];
break;
}
if ([self filesFromFolderWithChapter:chapter] > 1)
{
static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier";
cell = [tableView dequeueReusableCellWithIdentifier: SimpleTableIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc]
initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:SimpleTableIdentifier] autorelease];
}
}
else {
static NSString *ButtonTableIdentifier = @"ButtonTableIdentifier";
cell = [tableView dequeueReusableCellWithIdentifier: ButtonTableIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc]
initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ButtonTableIdentifier] autorelease];
}
}
NSString *firstString;
NSString *lastString;
switch (indexPath.section) {
case 0:
chapter = [[einfuerung objectAtIndex:row]retain];
[dataInstance extractFromString: [chapter title]: &firstString: &lastString];
cell.textLabel.text = firstString;
cell.detailTextLabel.text = lastString;
cell.backgroundColor = [UIColor whiteColor];
break;
case 1:
chapter = [[vertiefung objectAtIndex:row]retain];
[dataInstance extractFromString: [chapter title]: &firstString: &lastString];
cell.textLabel.text = firstString;
cell.detailTextLabel.text = lastString;
cell.backgroundColor = [UIColor whiteColor];
break;
case 2:
chapter = [[spezial objectAtIndex:row]retain];
[dataInstance extractFromString: [chapter title]: &firstString: &lastString];
cell.textLabel.text = firstString;
cell.detailTextLabel.text = lastString;
cell.backgroundColor = [UIColor whiteColor];
break;
}
if ([self filesFromFolderWithChapter:chapter] > 1)
{
//VersionButton *button = [VersionButton buttonWithType:UIButtonTypeRoundedRect];
VersionButton *button = [[VersionButton alloc]initWithFrame:CGRectMake(500, 15, 150, 30) andTitle:@"ältere Versionen"];
button.chapter = chapter;
[button addTarget:self action:@selector(versionTapped:)
forControlEvents:UIControlEventTouchUpInside];
[cell.contentView addSubview:button];
[button release];
}
[chapter release];
return cell;
}
```
|
Why does this button on my UITableView cell repaint itself?
|
CC BY-SA 3.0
| null |
2011-06-15T18:22:20.927
|
2011-06-15T19:43:03.743
|
2011-06-15T19:43:03.743
| 356,538 | 356,538 |
[
"ipad",
"uitableview",
"uibutton"
] |
6,362,809 | 1 | 6,362,869 | null | 5 | 978 |
I have a table that looks like this:

I have this same chart on a few pages hard coded.
I want to be able to change the tables on all the pages using js and jQuery
I want to make it so that the button is next to the `From Date` input
and the is next to the `To Date` input.
I have tried to do that here:
[http://jsfiddle.net/maniator/W9YFF/9/](http://jsfiddle.net/maniator/W9YFF/9/)
But it seems that it gets messed up at some points.
How do I fix that?
---
### UPDATE
If I try doing
```
$('input[type="button"][value="YTD"]').insertAfter($('#fdate'));
$('input[type="button"][value="MTD"]').insertAfter($('#tdate'));
```
My result looks like this:

|
Manipulate HTML table with jQuery
|
CC BY-SA 3.0
| 0 |
2011-06-15T18:55:54.017
|
2011-06-15T19:57:03.923
|
2020-06-20T09:12:55.060
| -1 | 561,731 |
[
"javascript",
"jquery",
"html",
"css"
] |
6,362,829 | 1 | 6,364,740 | null | 13 | 21,673 |
I am trying to get RabbitMQ with Celery and Django going on an EC2 instance to do some pretty basic background processing. I'm running rabbitmq-server 2.5.0 on a large EC2 instance.
I downloaded and installed the test client per the instructions [here](http://www.rabbitmq.com/ec2.html) (at the very bottom of the page). I have been just letting the test script go and am getting the expected output:
```
recving rate: 2350 msg/s, min/avg/max latency: 588078478/588352905/588588968 microseconds
recving rate: 1844 msg/s, min/avg/max latency: 588589350/588845737/589195341 microseconds
recving rate: 1562 msg/s, min/avg/max latency: 589182735/589571192/589959071 microseconds
recving rate: 2080 msg/s, min/avg/max latency: 589959557/590284302/590679611 microseconds
```
The problem is that it is consuming an incredible amount of CPU:
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
668 rabbitmq 20 0 618m 506m 2340 S 166 6.8 2:31.53 beam.smp
1301 ubuntu 20 0 2142m 90m 9128 S 17 1.2 0:24.75 java
I was testing on a micro instance earlier and it was completely consuming all resources on the instance.
Is this to be expected? Am I doing something wrong?
Thanks.
The real reason for this post was that celerybeat seemed to run okay for awhile and then suddenly consume all resources on the system. I installed the [rabbitmq management tools](http://www.rabbitmq.com/management.html) and have been investigating how the queues are created from celery and from the rabbitmq test suite. It seems to me that celery is orphaning these queues and they are not going away.
Here is the queue as generated by the test suite. One queue is created and all the messages go into it and come out:

Celerybeat creates a new queue for every time it runs the task:

It sets the auto-delete parameter to true, but I'm not entirely sure when these queues will get deleted. They seem to just slowly build up and eat resources.
Does anyone have an idea?
Thanks.
|
RabbitMQ on EC2 Consuming Tons of CPU
|
CC BY-SA 3.0
| 0 |
2011-06-15T18:57:50.457
|
2015-11-03T16:53:38.630
|
2011-06-15T21:21:47.330
| 84,128 | 84,128 |
[
"django",
"rabbitmq",
"celery"
] |
6,362,931 | 1 | 6,363,223 | null | 0 | 1,542 |
I am trying to get Navigation Bar to look like this:

I couldnt get it work properly, how to fix it?
```
<ul class="subnav">
<li> <a href=""> Text One</a></li>
<li> <a href=""> Text Two</a></li>
<li> <a class="active" href=""> Text Three</a></li>
<li> <a href=""> Text Four</a></li>
</ul>
<style>
.subnav {
list-style:none;
border-bottom:1px solid #c7c4ba;
}
.subnav li{
display:inline;
font-size:14px;
margin-right:1px;
}
.subnav a:hover {
background-color:white;
color:black;
}
.subnav a {
background-color:#c7c4ba;
color:white;
text-decoration: none;
}
.subnav .active {
background-color:white;
color:#c61c25;
border:1px solid #c7c4ba;
}
</style>
```
|
Navigation Bar - Height/Spacing issue
|
CC BY-SA 3.0
| null |
2011-06-15T19:07:59.393
|
2011-06-15T19:34:24.280
|
2011-06-15T19:09:31.047
| 106,224 | 622,378 |
[
"html",
"css"
] |
6,363,504 | 1 | 6,363,777 | null | 4 | 18,384 |
I need to stream serial data to and from a C# Windows PC application at 2-3 mbps. C# winforms doesn't seem very happy with it.
```
openFileDialog.Filter =
@"Image Files(*.bmp;*.jpg;*.jpeg;*.gif)|*.bmp;*.jpg;*.jpeg;*.gif|All files (*.*)|*.*";
if (openFileDialog.ShowDialog() != DialogResult.OK) return;
var image = Image.FromFile(openFileDialog.FileName);
serialPort1.Open();
// Now send the image at 2-3 mbps
...
```
BaudRate = 115200 works. BaudRate = 230400 causes System.IO.IOException.

|
Is there a way to use a serial port at 2-3 mbps?
|
CC BY-SA 3.0
| 0 |
2011-06-15T19:54:04.833
|
2015-12-07T13:36:24.853
|
2011-06-15T20:08:17.923
| 398,460 | 398,460 |
[
"c#",
"serial-port"
] |
6,363,539 | 1 | null | null | 0 | 297 |
When trying to use ASIHTTP.
```
ASIHTTP: ld: duplicate symbol _OBJC_IVAR_$_ASIAuthenticationDialog.request in
```
I keep getting this error

I did tried
`Product -> Clean Target / etc`, no luck.
Thanks
|
Importing ASIHTTP , Objective-c?
|
CC BY-SA 3.0
| null |
2011-06-15T19:56:36.953
|
2011-10-21T01:24:32.463
|
2011-06-15T21:11:28.133
| 577,046 | 800,333 |
[
"objective-c"
] |
6,363,635 | 1 | null | null | 2 | 348 |
I made a custom-drawn listview by implementing the NM_CUSTOMDRAW of WM_NOTIFY message.
The listview's look is very similar with the Icon view of listview,
but the tile size is much bigger.
so the label position of the item is lower than Icon view's.
PROBLEM: when i edit the item's label, the inplace edit control appears on middle of the item.

I tried to get the HWND of edit control with ListView_GetEditControl() then adjusted the window position (GetWindowRect,SetWindowPos) but not worked.
How can I properly locate the edit control window on the label area?
|
Set EditCtrl position for CustomDraw ListView
|
CC BY-SA 3.0
| 0 |
2011-06-15T20:03:23.457
|
2011-06-16T04:45:06.270
| null | null | 2,556,909 |
[
"c++",
"winapi",
"listview"
] |
6,363,743 | 1 | 6,441,388 | null | 1 | 1,091 |
I am trying to implement a UI that contains a data table (populated dynamically) displayed using a `TableLayout`. I would like 4 columns of the table to be displayed by default, with the ability to horizontally scroll the table to reveal 4 (or more) additional columns. Is this possible using a `TableLayout` combined with a horizontal/vertical `ScrollView`? I would appreciate any example XML exhibiting this style.
Here is an example to clarify:


|
Android UI: Multiple Horizontally Paged Table
|
CC BY-SA 3.0
| null |
2011-06-15T20:12:49.283
|
2011-06-22T14:16:33.310
| null | null | 491,897 |
[
"android",
"user-interface",
"landscape",
"tablelayout"
] |
6,363,753 | 1 | 6,364,062 | null | 0 | 1,298 |
I've been trying to add this library to my project but I'm getting all sorts of warnings.
Can anyone help me out?

|
Having Trouble With Tapku Library
|
CC BY-SA 3.0
| null |
2011-06-15T20:13:44.073
|
2011-06-15T20:38:46.443
| null | null | null |
[
"iphone",
"objective-c",
"xcode",
"tapku"
] |
6,364,024 | 1 | null | null | 2 | 217 |
For some reason, as in picture shown below, my system always adds `00` after each char in the ASCII text file. I can only find this problem when using the binary format view of the text file (e.g. in UltraEdit). If I just open it using Notepad, everything is ok. But this is a huge problem since if I send this file to another system for processing, they complain it is not a valid file due to all of the `00`:

Is it because of some system setting?
|
Weird encoding problem, with 00 added
|
CC BY-SA 3.0
| null |
2011-06-15T20:35:49.727
|
2011-06-15T20:50:10.403
|
2011-06-15T20:50:10.403
| 7,116 | 800,376 |
[
"c#",
"character-encoding",
"biztalk"
] |
6,364,065 | 1 | 6,364,099 | null | 1 | 108 |
This afternoon I was reviewing the security for a user in my SQL Server, in SQL Server Management Studio. I opened the Database User's Properties dialog, and went to the Securables section.
As I was cycling through the tables and stored procedures that this particular user had access to, I noticed that one of the data tables had the the Update option checked in an intermediate state. What does that mean? You can either update a row, or you can't. There is no in-between. I've included an image for reference. I would just fully check this option and save it but I'd rather not screw with the DB if this serves a worthwhile purpose.

|
SQL Server Security Option w/ Intermediate Check Option? What does that mean?
|
CC BY-SA 3.0
| 0 |
2011-06-15T20:38:59.400
|
2011-06-15T20:48:23.583
| null | null | 469,319 |
[
"sql-server",
"tsql",
"ssms"
] |
6,364,158 | 1 | null | null | 1 | 936 |
I'm using selenium 2 for a project which allows for date selection using jsf calendar wizard from myfaces (jsf 1.1). Can some one help me the steps for date selection. Thank you in advance.


```
<div class="content">
<input id="firstApplicant2:ApplicantContent-DateOfBirth" name="firstApplicant2:ApplicantContent-DateOfBirth" type="text" maxlength="10" class="dateStyle" onfocus="selectText('null', 'firstApplicant2:ApplicantContent-DateOfBirth')" onclick="selectText('null', 'firstApplicant2:ApplicantContent-DateOfBirth')"><span id="firstApplicant2:ApplicantContent-DateOfBirthSpan"></span>
<div id="firstApplicant2:ApplicantContent-DateOfBirthSpan_calendarDiv" class="jscalendar-DB-div-style" style="visibility: hidden;">
<span id="firstApplicant2:ApplicantContent-DateOfBirthSpan"></span>
<table style="width:250px;" class="jscalendar-DB-table-style">
<tbody>
<tr class="jscalendar-DB-title-background-style">
<td>
<table style="width:248px;">
<tbody>
<tr>
<td class="jscalendar-DB-title-style">
<span><span class="jscalendar-DB-title-control-normal-style"> <img src="/webapp/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/13080856/calendar.HtmlCalendarRenderer/DB/left1.gif" width="10px" height="11px" style="border:0px;"> </span><span class="jscalendar-DB-title-control-normal-style"> <img src="/webapp/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/13080856/calendar.HtmlCalendarRenderer/DB/right1.gif" width="10px" height="11px" style="border:0px;"> </span> </span>
</td>
<td style="text-align:right;">
<a href="#"></a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="jscalendar-DB-body-style"></td>
</tr>
<tr class="jscalendar-DB-today-style">
<td class="jscalendar-DB-today-lbl-style">
<span>Today is <a class="jscalendar-DB-today-style" title="Go To Current Month" href="#">06/15/2011</a></span>
</td>
</tr>
</tbody>
</table>
</div>
<div id="firstApplicant2:ApplicantContent-DateOfBirthSpan_selectMonthDiv" class="jscalendar-DB-div-style" style="visibility: hidden;"></div>
<div id="firstApplicant2:ApplicantContent-DateOfBirthSpan_selectYearDiv" class="jscalendar-DB-div-style" style="visibility: hidden;"></div><script type="text/javascript">
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar=new org_apache_myfaces_PopupCalendar();
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.initData.imgDir = "/webapp/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/13080856/calendar.HtmlCalendarRenderer/DB/";
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.initData.monthName = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.initData.dayName = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.initData.startAt = 0;
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.dateFormatSymbols.weekdays = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.dateFormatSymbols.shortWeekdays = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.dateFormatSymbols.shortMonths = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.dateFormatSymbols.months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.dateFormatSymbols.eras = new Array("BC","AD");
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.dateFormatSymbols.ampms = new Array("AM","PM");
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.initData.todayDateFormat = "MM/dd/yyyy";
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.initData.popupLeft = false;
firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar.init(document.getElementById('firstApplicant2:ApplicantContent-DateOfBirthSpan'));
</script><img src="/webapp/Images/upgrade/icon_calendar.jpg" style="vertical-align:bottom;" onclick="firstApplicant2_3AApplicantContent_2DDateOfBirthCalendarVar._popUpCalendar(this,document.getElementById('firstApplicant2:ApplicantContent-DateOfBirth'),'MM/dd/yyyy')">
</div>
```
|
How can I click on a pop-up Calendar wizard in Selenium 2?
|
CC BY-SA 3.0
| 0 |
2011-06-15T20:48:36.303
|
2011-07-22T19:14:31.050
|
2011-06-16T04:02:13.263
| 127,320 | 800,128 |
[
"testing",
"selenium",
"webdriver",
"selenium-webdriver"
] |
6,364,273 | 1 | 6,364,525 | null | 4 | 403 |
Is `<area>` still the best way to handle irregular navigation menus, or is there a better way?
My navigation menu looks like this:

|
What are some reasonable alternatives to an image <area> map?
|
CC BY-SA 3.0
| null |
2011-06-15T20:58:42.883
|
2011-06-16T01:45:26.820
|
2011-06-16T01:45:26.820
| 371,309 | 496,336 |
[
"html",
"navigation",
"imagemap",
"area"
] |
6,364,522 | 1 | 6,365,289 | null | 1 | 252 |
I'm developing an asp.net application on windows 7 visual studio 2010, then publishing it to a Headless (NO GUI) linux server which runs mono.
I'm getting the error that tells you viewing errors from a remove machine is not possible unless you do some magic on the web.config.

Usually, i remote desktop into the server and load the page so i can see the error. But in this case since the server is headless i cannot do that. I don't really feel like doing a wget or curl... I just want to pull up the error in a browser.
I've tried doing what the error message says and this is what my current web.config looks like:
```
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off"/>
</system.web>
</configuration>
```
|
Viewing ASP.NET errors on a Headless Linux System running Mono
|
CC BY-SA 3.0
| null |
2011-06-15T21:18:21.433
|
2011-06-15T23:21:05.230
| null | null | 442,580 |
[
"asp.net",
"mono"
] |
6,364,627 | 1 | 6,364,650 | null | 0 | 270 |
I have implemented this Feature Content Slider:
[http://demo.webdeveloperplus.com/featured-content-slider/](http://demo.webdeveloperplus.com/featured-content-slider/)
There seems to be space between the Navigaion LIs and I cannot determine how to eliminate that space: The issue is on my development site: [http://www.virtualpetstore.com/green.aspx](http://www.virtualpetstore.com/green.aspx)
However in my JSFiddle workup, this appears fine- without any space:
[http://jsfiddle.net/NinjaSk8ter/6WXkM/](http://jsfiddle.net/NinjaSk8ter/6WXkM/)
Here is an illustration of the Issue:

The Yellow and Blue Divs are not causing this space.
Also, This 1px of bottom padding in featured ul.ui-tabs-nav li has nothing to do with that space:
```
#featured ul.ui-tabs-nav li{
padding:0 0 1px 15px;
color:#666;
/*background-color:red;*/
}
#featured{
width:546px;
position:relative;
border:2px solid #ccc;
height:260px;
/*height:255px;*/
background:#ffffff;
background:yellow;
}
#featured ul.ui-tabs-nav{
position:absolute;
list-style:none;
padding:0 0 0 0;
margin:0 0 0 368px;
width:178px;
/*height:255px;*/
height:245px;
background-color:blue;
}
#featured ul.ui-tabs-nav li{
padding:0 0 1px 15px; /*left is distance between pointer and lis*/
color:#666;
/*background-color:red;*/
}
#featured ul.ui-tabs-nav li img{
float:left;
margin:3px 2px 0 3px;
padding:1px;
border:1px solid #080808;
/*background:olive;*/
}
#featured ul.ui-tabs-nav li span{
font-size:8px; /*font size of text nav li boxes*/
padding:0;
}
#featured li.ui-tabs-nav-item a {
display: block;
/*height: 59px;*/
height:60px; /*height of nav li boxes*/
font-family:Verdana;
color:#333;
background:#fff;
line-height:9px; /*distance between anchor tag text*/
/*text-decoration:none;*/
}
#featured li.ui-tabs-nav-item a:hover{
background:#f2f2f2;
}
#featured li.ui-tabs-selected{
background:url("/images/Green/GreenSlider/selected-item.gif") top left no-repeat;
}
#featured ul.ui-tabs-nav li.ui-tabs-selected a{
background-color:#CCCCCC;
}
#featured .ui-tabs-panel{
width:368px;
height:255px;
position:relative;
/*background-color:orange;*/
}
#featured .ui-tabs-panel .info{
position:absolute;
top:209px;
height:46px;
background: url("/images/Green/GreenSlider/transparent-bg.png");
}
#featured .info h2{
font-size:13px;
font-family:verdana;
color:#FFFFFF;
padding:3px 0 0 4px;
overflow:hidden;
}
#featured .info p{
margin:0 0 0 5px;
font-family:Arial;
font-size:12px;
line-height:13px;
color:#f0f0f0;
}
#featured .info a{
text-decoration:none;
color:#fff;
}
#featured .info a:hover{
text-decoration:underline;
}
#featured .ui-tabs-hide{
display:none;
}
```
|
JQuery Feature Content Slider Style Problem
|
CC BY-SA 3.0
| null |
2011-06-15T21:29:41.233
|
2011-06-15T21:32:15.673
| null | null | 598,931 |
[
"css"
] |
6,364,638 | 1 | 6,365,453 | null | 0 | 848 |
I'm building a screen with this design:
- - -
I'm new with android development, and I really dont understand if its the correct approach to use one activity with other activities inside. This is currently working, but I have a couple of bugs and really don't understand how to fix them or how to start without taking a whole new approach...
[Source code (zip)](https://docs.google.com/leaf?id=0B5Fu_YlHUgYpNzJlNGVmOTQtNmNkNC00MjRlLTk0YjItMGNkN2U4YzAzODJl&hl=es&authkey=CLG5464F)
The bugs:
1.- If the listactivity has enough items it shows over the MAIN tabwidget when scrolling

2.- When you stop scrolling the listview it appears behind the MAIN tabwidget 
3.- When you press a tab button on the secondary tabhost, it shows for a very short lapse the icon that is being used in the bottom tabhost (MAIN)

|
Android app layout help
|
CC BY-SA 3.0
| null |
2011-06-15T21:31:07.857
|
2011-07-21T13:51:24.493
|
2011-07-21T13:51:24.493
| 128,662 | 751,180 |
[
"android",
"listview",
"listactivity",
"android-tabhost",
"tabactivity"
] |
6,364,750 | 1 | 6,365,674 | null | 0 | 516 |
I am trying to present a NavigationController from a regular view controller. When I present the nav controller, all I see is the default navigation bar (no matter what I set it to in IB), which makes me think the navigation controller isn't liked right in IB. This is my code to open the navigation controller:
```
NavigationController *navController = [[NavigationController alloc] initWithNibName:@"NavigationController" bundle:[NSBundle mainBundle]];
[self presentModalViewController:navController animated:YES];
```
Here is my NavigationController header:
```
@interface NavigationController : UINavigationController <UINavigationControllerDelegate> {
UINavigationController *navigationController;
}
@property (nonatomic,retain) IBOutlet UINavigationController *navigationController;
@end
```
And navigationController is synthesized in the implementation.
In IB, I have a navigation controller that is connected to navigationController and the file's owner delegate. What am I doing wrong? Thanks
EDIT: This is what it looks like in IB:

And this is what is looks like in the simulator:

|
Presenting a Navigation Controller
|
CC BY-SA 3.0
| null |
2011-06-15T21:40:56.473
|
2011-06-16T00:34:12.870
|
2011-06-15T22:42:11.570
| 459,085 | 459,085 |
[
"iphone",
"objective-c",
"uinavigationcontroller"
] |
6,365,235 | 1 | 6,365,249 | null | 1 | 101 |
I have a directed graph. Is the following a cycle? Do the arrows have a specific direction in a cycle?

|
Easy question - Is this a Cycle?
|
CC BY-SA 3.0
| null |
2011-06-15T22:33:28.640
|
2012-11-27T20:45:09.203
|
2011-06-15T22:37:09.553
| 61,605 | 800,521 |
[
"directed-graph"
] |
6,365,292 | 1 | 6,374,919 | null | 2 | 6,998 |
I'm seeing some strange behaviour with Subversion in Eclipse IDE.
I'm using the subversion plugin from [http://download.eclipse.org/technology/subversive/0.7/update-site/](http://download.eclipse.org/technology/subversive/0.7/update-site/)
I've screen captured the problem below with exclamation marks next to the views package and contents...

Team > Commit seems to have no effect, although no errors are reported. After commit files are still marked as changed (with the ">" symbol next to them)
The code executes fine and there are no errors or warnings in the marked files.
It's hard to see how there can be conflicts given that I'm the only one using this repository, with only one computer. And I don't use any other editor or commit mechanism.
I'm not too sure what's going on.
Any ideas?
|
Eclipse subversion exclamation marks
|
CC BY-SA 3.0
| null |
2011-06-15T22:40:50.563
|
2013-10-12T23:50:56.620
|
2012-01-11T19:38:00.280
| 113,632 | 800,325 |
[
"eclipse",
"svn",
"ide"
] |
6,365,807 | 1 | 6,365,942 | null | 0 | 4,051 |
I found that this question has been asked before [How to resolve overlapping the content of the webview](https://stackoverflow.com/questions/5898196/how-to-resolve-overlapping-the-content-of-the-webview-closed) here, but it was closed for some reason. But here is what happens. I have created a webview, applied transparent background, but when i try to load something, and reload something again, the older content will still remain on the webview and the newer one will overlap it. Here is a picture that explains it.

So i am creating a jokes application, and i have added webview. Then i added transparency and the random joke button reloads the webpage so that the webview can get another joke. But it just overlapps instead. Any solutions? Here is my piece of code
```
Button random = (Button) findViewById(R.id.reload);
final WebView web = (WebView) findViewById(R.id.webView);
web.setBackgroundColor(Color.TRANSPARENT);
web.setWebViewClient(new WebViewClient());
String selected = (String) getIntent().getCharSequenceExtra("selected");
final String url = "http://someurl.com/?s=dirty&x=" + selected;
web.loadUrl(url);
random.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
web.loadUrl(url);
}
});
```
Any help would be really appreciated :)
|
Android Webview Content Overlapping While Using Transparent Background
|
CC BY-SA 3.0
| null |
2011-06-16T00:04:47.343
|
2011-06-16T00:36:47.103
|
2017-05-23T10:30:21.980
| -1 | 650,785 |
[
"java",
"android",
"android-activity",
"webview",
"transparent"
] |
6,365,877 | 1 | null | null | 1 | 12,984 |
I have a datatable in my primefaces application . The code for the frontend has
```
<!-- Start of customer datatable -->
<p:dataTable var="customer" value="#{customerBean.customers}" paginator="true" selection="#{customerBean.selectedCustomer}"
selectionMode="single" onRowSelectUpdate=":custList" onRowSelectComplete="custTab.show()" id="custList" widgetVar="custList" update=":custList">
<f:facet name="header">
List of Customers
<p:outputPanel>
<p:commandButton value="+" type="button" onclick="addCustDlg.show()"/>
</p:outputPanel>
</f:facet>
<p:column sortBy="#{customer.id}" filterBy="#{customer.id}" update=":custList">
<f:facet name="header">
<h:outputText value="ID"/>
</f:facet>
<h:outputText value="#{customer.id}"/>
</p:column>
<p:column sortBy="#{customer.name}" filterBy="#{customer.name}" headerText="NAME" filterMatchMode="contains" update=":custList">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{customer.name}"/>
</f:facet>
<f:facet name="input">
<p:inputText value="#{customer.name}"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column sortBy="#{customer.description}" filterBy="#{customer.description}" headerText="DESCRIPTION">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{customer.description}"/>
</f:facet>
<f:facet name="input">
<p:inputText value="#{customer.description}"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column sortBy="#{customer.signupDate}" filterBy="#{customer.signupDate}" headerText="SIGN UP DATE">
<f:facet name="output">
<h:outputText value="#{customer.signupDate}"/>
</f:facet>
</p:column>
<p:column sortBy="#{customer.validUntil}" filterBy="#{customer.validUntil}" headerText="EXPIRY DATE">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{customer.validUntil}"/>
</f:facet>
<f:facet name="input">
<p:inputText value="#{customer.validUntil}"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column sortBy="#{customer.status}" filterBy="#{customer.status}" headerText="STATUS">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{customer.status}"/>
</f:facet>
<f:facet name="input">
<p:inputText value="#{customer.status}"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="CREATION DATE" sortBy="#{customer.creationDate}" filterBy="#{customer.creationDate}">
<f:facet name="output">
<h:outputText value="#{customer.creationDate}"/>
</f:facet>
</p:column>
<p:column headerText="LAST UPDATE DATE" sortBy="#{customer.lastUpdateDate}" filterBy="#{customer.lastUpdateDate}">
<f:facet name="output">
<h:outputText value="#{customer.lastUpdateDate}"/>
</f:facet>
</p:column>
<p:column headerText="Options">
<p:rowEditor/>
</p:column>
</p:dataTable>
<!-- End of dataTable (customer datatable) -->
```
And the function for handling the rowEvent is specified in the bean as
```
public void custRowEdit(RowEditEvent event){
Customer cust = (Customer) event.getObject();
EntityManagerHelper.beginTransaction();
custDao.update(cust);
EntityManagerHelper.commit();
}
```
However , on an update event , when I am editing the cell in the table , I do not get the new updated value of the attribute . 
Like in the image below , when I edit the status of the entry with ID 1 from 11 to 4 , in the function custRowEdit , when I try to get the customer object , I still get the status of the customer as 11 and not 4 .
Can anyone help me with understanding why the value of the cell is not being set ?
|
Cell edit in primefaces is not updating the value
|
CC BY-SA 3.0
| null |
2011-06-16T00:20:32.080
|
2017-05-27T20:31:44.677
|
2011-06-16T00:26:05.980
| 192,716 | 192,716 |
[
"jsf",
"facelets",
"primefaces"
] |
6,365,917 | 1 | 6,451,934 | null | 1 | 1,227 |
I have worked with Moodle and Joomla before. [php, mysql]
I thought of Moodle as first choice, but have some questions to make sure is the correct choice for the job!
Basically, I need to let the carers create online observations for each child, with tagged photos
the child parents, can check the data posted by the carer, for just his own child, and have a public access for end of year portfolio etc,
-

the different part, that I need is that the teachers[carers], generate a "course", for each child [with text, pics, etc], that "course" gets approved by the office, and then the parents can see that content of the "course" for the child,
Is this possible with Moodle?, Jooma? [or Joomla LMS?] or do I have to roll my own?
Ok, thanks a lot!
|
CMS or LMS , Moodle or Joomla,
|
CC BY-SA 3.0
| null |
2011-06-16T00:31:06.213
|
2011-12-09T15:37:05.027
|
2011-12-09T15:37:05.027
| 3,043 | 523,507 |
[
"joomla",
"content-management-system"
] |
6,366,127 | 1 | 6,366,213 | null | 7 | 1,281 |
Taking a practice exam the exam said I got this one wrong. The answer marked in Yellow is the supposed correct answer.
In the following quote, the part marked in bold I think is wrong: "The Serializable attribute is not inherited by the derived classes, so if you only mark the Encyclopedia class with the Serializable attribute, ".

I actually created a sample project with an `Animal` class and a `Cat` class that derives from it. I marked the `Cat` class `[Serializable]` and the `Animal` class is not.
I was able to successfully serialize and deserialize the `Cat` class, including the `Animal` properties.
Is this a .NET version issue? The exam is 70-536, so it's targeting 2.0.
|
Serialization inheritance: Will an exception be thrown if the base class isn't marked [Serializable]?
|
CC BY-SA 3.0
| 0 |
2011-06-16T01:14:29.290
|
2018-02-03T15:25:34.880
|
2018-02-03T15:25:34.880
| 1,033,581 | 568,289 |
[
"c#",
".net",
"inheritance",
"serializable"
] |
6,366,286 | 1 | 6,366,593 | null | 3 | 597 |
As subject asks, what is the easiest way to achieve the below input form?

Is it using UITableView? Or something else? I tinker around with code a little bit and I think I may be doing more work than I have to. I recall a presentation in which the presenter said that if I am doing too much hacking to get a feature, perhaps I am doing it wrong.
I searched the web for several frameworks and they are not sufficient. I tried ELCTextField. I try to use IBAForms which looks really good but the sample code is so confusing, I have no idea on how to use it. If you have any sample code, please share it and I would appreciate it. I also try RoundedUITableView and cannot get that to work.
Links to the frameworks:
1. ELCTextField: [http://www.cocoacontrols.com/platforms/ios/controls/elctextfieldcell](http://www.cocoacontrols.com/platforms/ios/controls/elctextfieldcell)
2. IBAForms: [http://www.cocoacontrols.com/platforms/ios/controls/ibaforms](http://www.cocoacontrols.com/platforms/ios/controls/ibaforms)
3. RoundedUITableView: [https://github.com/beetlebugorg/RoundedUITableView](https://github.com/beetlebugorg/RoundedUITableView)
PS: When I try to combine RoundedUITableVIew with ELCTextField, everything breaks. It's heartbreaking...
|
What is the easiest way to generate this UI?
|
CC BY-SA 3.0
| null |
2011-06-16T01:48:04.053
|
2011-06-16T02:48:24.863
| null | null | 384,964 |
[
"iphone",
"uitableview"
] |
6,366,367 | 1 | 6,372,538 | null | 0 | 307 |
Sometimes when the device is pulling coordinates with the GeoPositionAccuracy set to High and the MovementThreshold set to 0, the GeoCoordinate that is captured is further away and not inline with the other coordinates. How can I prevent that or remove that GeoCoordinate from my collection of GeoCoordinates? You'll notice that in the imge below right above the second light grey 'e' and to the right on the route 11 symbol, you'll see a little jog out. The same thing under the first little grey 'e'.

|
Incorrect GeoCoordinate at Random
|
CC BY-SA 3.0
| 0 |
2011-06-16T02:03:02.263
|
2011-06-16T13:19:14.820
| null | null | 21,318 |
[
"windows-phone-7",
"geolocation",
"geocoding"
] |
6,366,362 | 1 | 6,370,763 | null | 9 | 1,716 |
The shot below is of Mail.app in OS X Lion. When the source list gets too long, a nice shadowy line appears just above the buttons at the bottom of the source list. When you scroll, the source list moves under that shadowy line. When you expand the window so that everything in the source list fits without scrolling, the shadowy line disappears.
How can I draw this shadowy line using Cocoa? I'm aware of NSShadow and such, but it seems to me there's more going on here than just a shadow. There's a line that subtly fades to points (as if you applied a gradient mask to each end in Photoshop.) Likewise, the shadow is and tapers off as you approach the end of the lines. So it's not just a regular NSShadow, is it? (It's definitely not an image, as it scales nicely when you expand the width of the source view.)
Any tips on how to approach drawing this shape would be greatly appreciated.

And for the sticklers out there, no, this does not violate the NDA, as Mail.app has been shown publicly by Apple.
|
How to draw a tapered line + oval shadow in Cocoa
|
CC BY-SA 3.0
| 0 |
2011-06-16T02:02:09.733
|
2011-06-19T14:24:34.300
| null | null | 463,439 |
[
"objective-c",
"cocoa",
"macos"
] |
6,366,576 | 1 | null | null | 0 | 515 |
I am trying to use the `spark.skins.spark.TitleWindowCloseButtonSkin` in a custom component and make it look thematically similar to how it looks in `TitleWindow`. Just specifying it as the skin class for a Button works no problem. I also have a .css style applied to all my `TitleWindow` classes that affects the close buttons in a `TitleWindow`. If I set the chrome color of the `TitleWindow` in .css then the close button skin also gets colorized to match this color. My custom component is also using the same style reference as my `TitleWindow`s. But the Button instance inside of my custom component does not get colorized. So while I have blue `TitleWindow`s with blue-colorized closed buttons, I have a blue custom component with a default gray background closed button (on button-press, the gray background appears).
There must be something going on with `TitleWindowSkin` and `TitleWindowCloseButtonSkin` via the colorization mechanic but I don't understand what it is. How should I solve this problem? I need to make the close button style in my custom component match that of the close button in my `TitleWindows`.
Here is a picture of the problem:

The `TitleWindow` is on the left in both pictures. The custom component is on the right.
In the left frame, you see the `TitleWindow` close button in the down position, note that its down state is colorized to match the theme of the `TitleWindowSkin`. On the right you see the down state of the custom component's close button. I do not know how to colorize the default gray to match the blue theme applied to the custom component.
I am sure there are a multitude of ways to solve this. I am looking for the most "correct" way. I do not want to hard-code colors because later an actual designer will come in and tweak the .css.
PS My custom component extends from spark.components.Group. Could that be a problem???
I should also mention that normal Button instances that use the default spark `ButtonSkin` seem to get styled properly in the custom component (part of the reason this problem is so frustrating).
EDIT: yes, yes indeed it looks like the first step to a solution is to inherit from SkinnableComponent not Group or UIComponent...
|
TitleWindowSkin, TitleWindowCloseButtonSkin, colorization: how do I duplicate this behavior in a custom component?
|
CC BY-SA 3.0
| null |
2011-06-16T02:43:26.517
|
2015-08-09T19:54:10.100
|
2015-08-09T19:54:10.100
| 1,560,062 | 602,680 |
[
"apache-flex",
"skinning",
"flex-spark"
] |
6,366,916 | 1 | 6,366,927 | null | 3 | 1,187 |

I want to do the above in SQL Server 2008. Any ideas?
|
Get the whole ROW which has the MAX value of the column SQL Server 2008
|
CC BY-SA 3.0
| 0 |
2011-06-16T03:53:49.933
|
2011-06-17T00:00:55.063
|
2011-06-17T00:00:55.063
| 732,945 | 785,398 |
[
"sql",
"sql-server",
"tsql",
"sql-server-2008",
"common-table-expression"
] |
6,367,010 | 1 | 6,367,050 | null | 24 | 12,534 |
Alright thought I would throw this one out there for the crowd to think over.
Given a that expects two strings formated like a hex color ()
return a hex color that is the average of both of the colors passed.
```
function averageColors(firstColor,secondColor)
{
...
return avgColor;
}
```
average would be defined as 
|
Average 2 hex colors together in javascript
|
CC BY-SA 3.0
| 0 |
2011-06-16T04:09:54.577
|
2021-01-05T08:28:12.457
|
2020-06-20T09:12:55.060
| -1 | 721,376 |
[
"javascript",
"colors",
"hex"
] |
6,367,125 | 1 | null | null | 3 | 1,079 |
This is part one of my attempt to find an answer to my question [wireframes in Mathematica](https://stackoverflow.com/questions/6353337/mathematica-3d-wire-frames).
Given a set of line segments how does one join two segments that are connected AND lie on the same line. For instance consider the line segments `l1 = {(0,0), (1,1)}` and `l2 = {(1,1), (2,2)}`. These two line segments can be combined into one line segment, namely `l3 = {(0,0), (2,2)}`. This is because `l1` and `l2` share the point `(1,1)` and the slope of each line segment is the same. Here is a visual:
```
l1 = JoinedCurve[{{{0, 2, 0}}}, {{{0, 0}, {1, 1}}}, CurveClosed -> {0}];
l2 = JoinedCurve[{{{0, 2, 0}}}, {{{1, 1}, {2, 2}}}, CurveClosed -> {0}];
Graphics[{Red, l1, Blue, l2}, Frame -> True]
```

One thing to notice is that in the above example `l1` and `l2` can be combined into one line specified by 3 points, i.e. `{{0,0},{1,1},{2,2}}`.
The first part of this question is: Given a set of line segments specified by 2 points, how do you reduce this set to have a set with the minimum amount of duplicate points. Consider this made up example:
```
lines = {
{{0,0}, {1,1}},
{{3,3}, {2,2}},
{{2,2}, {1,1}},
{{1,1}, {0.5,0.5}},
{{0,1}, {0,2}},
{{2,3}, {0,1}}
}
```
What I want is a function say `REDUCE` that gives me the following output:
```
R = {
{{0,0}, {1,1}, {2,2}, {3,3}},
{{1,1}, {0.5,0.5}},
{{2,1}, {0,1}, {0,2}}
}
```
The only duplicate we need is `{1,1}`. The way I did this was as follows: I put the first line in `R` Then I looked at the next line in `lines` and noticed that no end point matches an endpoint in the lines of `R` so I added this new line to `R`. The next line in `lines` is `{{2,2},{1,1}}`, the endpoint `{1,1}` matches the first line in `R` so I appended `{2,2}` to line in `R`. Now I add `{{1,1}, {0.5,0.5}}` to `R` and I also add `{{0,1}, {0,2}}`. Since the last line in `lines` has an endpoint that matches one in `R` I appended it and so we have `{{2,1}, {0,1}, {0,2}}`. Finally I look at all the lines in `R` and see if any of the endpoints match, in this case the line `{{3,3}, {2,2}}` matches the right endpoint of the first line in `R` so I append `{3,3}` thus eliminating the need for `{2,2}`.
This may not be the best way to do it, in the sense that it may not give you the best reduction. In any case, assuming that we have this reduction function then we can check if we need all the points to describe a line. This can be done as follows:
If we have more than 3 points describing the line, check if the first 3 points are collinear, if they are, remove the middle one and do the check on the set of the 2 endpoints and a new point. If they are not collinear then shift by one point and check the next 3 points.
The reason I'm asking this question is because I want to reduce the amount of points needed to describe a 2D figure. Try the following:
```
g1 = ListPlot3D[
{{0, -1, 0}, {0, 1, 0}, {-1, 0, 1}, {1, 0, 1}, {-1, 1, 1}},
Mesh -> {2, 2},
Boxed -> False,
Axes -> False,
ViewPoint -> {2, -2, 1},
ViewVertical -> {0, 0, 1}
]
```

The following function changes a 3D object into a list of lines (a line is a list of 2 points) that describe the wire frame of the object:
```
G3TOG2INFO[g_] := Module[{obj, opt},
obj = ImportString[ExportString[g, "PDF", Background -> None], "PDF"][[1]];
opt = Options[obj];
obj = Cases[obj, _JoinedCurve, \[Infinity]];
obj = Map[#[[2]][[1]] &, obj];
{obj, opt}
]
```
Note that in we have to substitude `_JoinedCurve` by `_Line`. Applying the function on `g1` we obtain
```
{lines, opt} = G3TOG2INFO[g1];
Row[{Graphics[Map[Line[#] &, lines], opt], Length@lines}]
```

There are 90 line segments in there but we only need 12 (If I didn't make any mistake on the counting of straight lines).
So there you have the challenge. How do we manipulate `lines` to have minimum amount of information needed to describe the figure.
|
Mathematica: Joining line segments
|
CC BY-SA 3.0
| null |
2011-06-16T04:30:51.427
|
2011-06-20T02:49:44.270
|
2017-05-23T12:13:39.697
| -1 | 788,553 |
[
"wolfram-mathematica",
"mathematica-8"
] |
6,367,170 | 1 | 6,367,473 | null | 0 | 700 |
I'm trying to read a text file containing the name of the image, and display it opon pageload.
Let's say that the content in the text file is
```
Australia Picture101
Singapore Picture201
```
Following is the code i tried and it does not display the image.
```
tableString += "<table class='content_background' cellpadding='0' cellspacing='0'>";
foreach (string line in lines)
{
string[] country = line.Split(token2);
string[] image = country[1].Split(token);
string row = "<tr><td class='left_content'>" + country[0] + "</td>" +"<td><table><tr>";
tableString += row;
for (int i = 0; i < image.Length; i++)
{
---> string row2 = "<td class='right_content'> <asp:ImageButton ImageUrl='~/img/missing children pictures/" + "image[i]" + ".jpg'/>" + "</td>";
tableString += row2;
}
tableString += "</tr></table></td>";
}
tableString += "</tr></table>";
container.InnerHtml = tableString;
```
Is there any other way to do this ? Thanks in advance.
the screen shot is as follow

|
include button into .cs file
|
CC BY-SA 3.0
| null |
2011-06-16T04:38:38.873
|
2011-06-16T06:04:46.630
|
2011-06-16T05:59:22.033
| 799,184 | 799,184 |
[
"c#",
"asp.net"
] |
6,367,242 | 1 | 6,367,859 | null | 2 | 2,032 |
I want to give some color to the area where they are toolbox buttons with icons (light grey on picture). Please help in determining what is a parameter style sheet?

|
Qt style sheet properties for toolbox buttons
|
CC BY-SA 3.0
| null |
2011-06-16T04:51:49.960
|
2011-06-16T06:19:13.890
|
2011-06-16T05:39:22.097
| 2,796 | 800,797 |
[
"qt",
"qtstylesheets"
] |
6,367,291 | 1 | null | null | 0 | 830 |
So I have a server side ajax php file:
```
$thing = "\n\ncode\n";
echo(trim($thing, '\n'));
```

But when I use this php file for an ajax call, the responseText does not have newlines removed!

```
var xhr7 = new XMLHttpRequest();
xhr7.onreadystatechange = function() {
if (xhr7.readyState == 4) {
if (xhr7.status == 200) {
alert('trying');
alert(xhr7.responseText);
chrome.tabs.executeScript(null, {code: xhr7.responseText });
} else {
alert("404 server side ajax file DOES NOT EXIST");
}
}
};
xhr7.open('POST', 'http://texthmu.com/Devin/HMU%20ext/Post-jsfile-forItsCode.php', true);
xhr7.setRequestHeader("Content-type","application/x-www-form-urlencoded"); //following w3
xhr7.send(); `
```
|
php trim won't work
|
CC BY-SA 3.0
| null |
2011-06-16T05:00:04.687
|
2011-06-16T05:22:56.400
| null | null | 565,877 |
[
"php",
"javascript",
"ajax",
"xmlhttprequest",
"trim"
] |
6,367,368 | 1 | 6,367,585 | null | 6 | 2,158 |
I have html that looks like this simplified:
```
<tr>
<td width="500px">
<ul class="menu_up">
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
<li><a href="/services/services-list">Services</a></li>
<li><a href="/links">Links</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
</td>
<td width="375">
<img src="/images/11_03.gif" alt="" height="39"/>
</td>
</tr>
```
website URL:
jdemkovitchcpa.com
In compatibility mode table cell with image expands row to 42 pixels thus breaking layout (should be 39 high)
I checked in developer tool and can't see anything wrong with it. Image indeed 39. Table row 42. Table cell with UL also 39 but has 2 offset.
If I remove image from cell it becomes 39. If I remove UL it stays 42.
Screenshot of misalignment:

Screenshot of image layout:

Screenshot of cell enclosing image layout:

|
Image inside table cell breaking layout. +3 pixels
|
CC BY-SA 3.0
| null |
2011-06-16T05:12:22.347
|
2011-06-16T05:42:34.063
| null | null | 509,600 |
[
"html"
] |
6,367,459 | 1 | null | null | 0 | 612 |
I have a tab based application with 4 views associated with 4 tabs. I want all 3 views in portrait form and only one landscape form.
I have done these settings for that particular view:
Set the required value in Supported interface orientations of info.plist.
```
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight)
}
```
In IB set the orientation attribute as landscape.
In `-(void)viewDidLoad` I have set `self.view.frame=CGRectMake(0, 0, 480, 320);`
After done all above setting, its still not coming in landscape mode.
|
Problem in set view in Landscape mode
|
CC BY-SA 3.0
| null |
2011-06-16T05:24:41.323
|
2011-06-16T05:56:52.253
|
2011-06-16T05:56:52.253
| 623,101 | 623,101 |
[
"iphone",
"objective-c",
"ipad",
"landscape",
"uiinterfaceorientation"
] |
6,367,482 | 1 | 6,367,506 | null | 0 | 4,313 |

If I want to use the image as button background, how can I do it? 9 patch? Or fixed image(ldip/mdip/hdip)?
Thanks!
edit:
thanks for the two replies, I know the tool draw9patch, but I don't know how to define the vertical area so it won't destroy the gradient?
Thanks!
|
Android: possible to use 9 patch to draw the button? (see image)
|
CC BY-SA 3.0
| 0 |
2011-06-16T05:26:10.767
|
2013-03-30T06:58:53.490
|
2011-06-16T05:37:36.757
| 734,036 | 734,036 |
[
"android",
"button",
"colors",
"nine-patch"
] |
6,367,483 | 1 | null | null | 0 | 262 |
I'm writing C# code to merge multiple libraries within a site collection and applying grouping on them. But grouping doesn't include documents from other sites regardless all share same meta data. Below, Blue box docs are from one site and green box docs are from other site and they don't group together.

Here are my code ,
```
DataTable dt = new DataTable();
DataRow dr;
DataColumn dc;
SPSite curSite = SPContext.Current.Site;
SPWebCollection subSites = curSite.AllWebs;
dc = new DataColumn("Title", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("ReferenceNo", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("Domain", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("Created", Type.GetType("System.DateTime"));
dt.Columns.Add(dc);
for (int i = 0; i < subSites.Count; i++)
{
SPListCollection lists = subSites[i].Lists;
foreach (SPList list in lists)
{
if (list.Title == "Published Documents")
{
SPQuery myquery = new SPQuery();
//myquery.Query = "<GroupBy><FieldRef Name='Domain' /></GroupBy><OrderBy><FieldRef Name='Created' Ascending='False' /></OrderBy>";
myquery.Query = "<GroupBy><FieldRef Name='Domain' /></GroupBy>";
SPListItemCollection items = list.GetItems(myquery);
foreach (SPListItem item in items)
{
if (item != null)
{
dr = dt.NewRow();
dr["Title"] = item["Title"];
dr["ReferenceNo"] = item["ReferenceNo"];
dr["Domain"] = item["Domain"];
dr["Created"] = item["Created"];
dt.Rows.Add(dr);
}
}
}
}
}
//dt.DefaultView.Sort = "Created DESC";
spGridView.AllowGrouping = true;
spGridView.AllowGroupCollapse = true;
spGridView.GroupField = "Domain";
spGridView.DataSource = dt;
spGridView.DataBind();
```
, Sorting Data Table with Domain fixed the issue..
```
**dt.DefaultView.Sort = "Domain";**
```
|
Merging and grouping libraries code problem
|
CC BY-SA 3.0
| null |
2011-06-16T05:26:12.283
|
2012-02-20T07:15:10.200
|
2011-06-16T11:07:42.603
| 263,357 | 263,357 |
[
"sharepoint-2010"
] |
6,367,668 | 1 | 6,367,799 | null | 0 | 744 |
As you can see in the picture the tabs welcome, alarm etc. Now if the tab is not selected then only we can delete the tab and the delete button will appear only at the time of mouse hover. Now my question is I want to fix it there so that I can delete it by using keyboard ? (here welcome tab is selected, so we can delete any of the tabs). It is an issue of accessibility.

css code:
```
.js .delete-tab {
background: url(../images/common/remove.png) no-repeat 42%;
cursor: pointer;
display: block;
height: 8px;
position: absolute;
right: 2px;
text-indent: -9999em;
top: 2px;
width: 8px; }
```
javascript:
```
_deleteButton: function(obj) {
var instance = this;
obj.append('<span class="delete-tab">X</span>');
var deleteTab = obj.find('.delete-tab');
deleteTab.click(
function(event) {
instance._removePage(this);
}
);
deleteTab.hide();
obj.hover(
function() {
jQuery(this).find('.delete-tab').fadeIn('fast');
},
function() {
jQuery(this).find('.delete-tab').fadeOut('fast');
}
);
},
```
|
How to fix a on mouse hover delete button so that we can delete it by keyboard?
|
CC BY-SA 3.0
| null |
2011-06-16T05:52:27.253
|
2011-06-16T06:57:27.490
| null | null | 632,074 |
[
"javascript",
"jquery",
"html",
"css"
] |
6,367,866 | 1 | 6,367,951 | null | 0 | 782 |
I have written a program on XCode4, how can I change the icon of the program?
Refer to the screen capture below:

Also, what is the size for the icon?
Thanks
|
XCode4 - Change the icon of the program
|
CC BY-SA 3.0
| null |
2011-06-16T06:20:33.013
|
2012-07-31T03:27:40.327
|
2011-06-16T06:42:37.170
| 495,452 | 495,452 |
[
"xcode4"
] |
6,368,061 | 1 | 6,368,113 | null | 118 | 120,449 |
Hi all it's been a while since I've asked something, this is something that has been bothering me for a while, the question itself is in the title:
> What's your preferred way of writing HTML tables that have vertical headers?
By vertical header I mean that the table has the header (`<th>`) tag on the left side (generally)
> data data data
data data data
data data data
They look like this, so far I've come up with two options
## First Option
```
<table id="vertical-1">
<caption>First Way</caption>
<tr>
<th>Header 1</th>
<td>data</td><td>data</td><td>data</td>
</tr>
<tr>
<th>Header 2</th>
<td>data</td><td>data</td><td>data</td>
</tr>
<tr>
<th>Header 2</th>
<td>data</td><td>data</td><td>data</td>
</tr>
</table>
```
The main advantage of this way is that you have the headers right (actually left) next to the data it represents, what I don't like however is that the `<thead>`, `<tbody>` and `<tfoot>` tags are missing, and there's no way to include them without breaking the nicelly placed together elements, which lead me to the second option.
## Second Option
```
<style type="text/css">
#vertical-2 thead,#vertical-2 tbody{
display:inline-block;
}
</style>
<table id="vertical-2">
<caption>Second Way</caption>
<thead>
<tr>
<th colspan="3">Header 1</th>
</tr>
<tr>
<th colspan="3">Header 2</th>
</tr>
<tr>
<th colspan="3">Header 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>row 1</td>
<td>row 1</td>
<td>row 1</td>
</tr>
<tr>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
<tr>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4">Footer</td>
</tr>
</tfoot>
</table>
```
The main advantage here is that you have a fully descriptive html table, the drawbacks are that proper representation needs a bit of CSS for the `tbody` and `thead` tags and that the relation between the headers and data isn't very clear as I had my doubts when creating the markup.
---
So, both ways render the table how it should, here a pitcure:

With the headers on the left or right side if you would prefer it, so, any suggestions, alternatives, browser issues?
|
Most common way of writing a HTML table with vertical headers?
|
CC BY-SA 4.0
| 0 |
2011-06-16T06:45:37.753
|
2023-03-01T13:57:53.447
|
2023-03-01T13:57:53.447
| -1 | 496,351 |
[
"html",
"css",
"datatable",
"semantic-markup"
] |
6,368,154 | 1 | 6,406,352 | null | 1 | 329 |
How to set this `SHKTwitterCallbackUrl` through the Twitter Developer site ...
I'm using the `ShareKit` to Integrate the facebook, twitter, mail option. facebook works fine but I am not able to configure twitter.
Or where we can find this "Registered Callback URL" I am able to fine API Key but how can I get "Registered Callback URL".
Thanks in Advance.
|
SHKTwitterCallbackUrl Puzzle ...?
|
CC BY-SA 3.0
| null |
2011-06-16T06:56:33.840
|
2011-06-20T02:31:34.367
|
2011-06-16T07:27:50.117
| 656,600 | 755,278 |
[
"iphone",
"objective-c",
"xcode4",
"twitter"
] |
6,368,181 | 1 | 6,368,216 | null | 0 | 256 |
```
int n;
int[] ar = new int[50];
Console.Write("Enter the size of array= ");
n = int.Parse(Console.ReadLine());
for (int i = 0; i < n; i++)
{
ar[i] = int.Parse(Console.ReadLine());
}
for (int i = 0; i < n; i++)
{
Console.WriteLine("AR["+i+"]="+ar[i]);
}
Console.Read();
```

As here you can see that when m entering the 09 or 08 its going to remove it and print the 9 and 8. And when same run on the c++ compiler then its print the 0 and 9 on different indices, why the compilers of both language doing behave like this? Why they do not reading it one digit?
|
Why c# compiler not reading the 0 before any digit?
|
CC BY-SA 3.0
| null |
2011-06-16T06:58:24.967
|
2011-06-16T08:00:58.333
|
2011-06-16T07:29:09.277
| 440,704 | 709,458 |
[
"c#",
"types"
] |
6,368,632 | 1 | null | null | 0 | 966 |
On one of my view controllers on iPad, I don't want the user to dismiss the keyboard even if the user presses the dismiss button on the right bottom of the keyboard. I want this because there's nothing else on the view that he can do without the keyboard and the button below the textfields, and the view looks empty without the keyboard.
I've tried listening to keyboardWillHide notification and making one of my text fields the first responder on the callback method but it didn't work. I've tried returning NO from textFieldShouldReturn or textFieldShouldEndEditing methods but they don't produce the behavior I want, either.
Below is the screenshot of a scratch view. Do you have any other ideas?
|
How not to dismiss keyboard in iPad even if the user presses the dismiss button on the right bottom?
|
CC BY-SA 3.0
| null |
2011-06-16T07:44:57.400
|
2011-06-16T07:56:28.010
| null | null | 106,303 |
[
"objective-c",
"ipad",
"keyboard-events",
"dismiss"
] |
6,368,680 | 1 | 6,372,361 | null | 3 | 1,593 |
I have installed two custom TTF fonts in my iPhone app (Cardo and New Athena Unicode). These are used in a multi-line UILabel, but for some reason the line height seems messed up: the lines have a lot of overlap.
What could cause this? Is it a bug in UILabel, or are the fonts not right? How can I edit or examine the contents of a TTF font file?

|
Self installed fonts have wrong line height in UILabel
|
CC BY-SA 3.0
| null |
2011-06-16T07:50:19.557
|
2011-06-16T13:05:54.590
|
2011-06-16T08:21:23.597
| 152,526 | 152,526 |
[
"ios",
"cocoa-touch",
"uilabel",
"uifont"
] |
6,368,751 | 1 | 6,368,812 | null | 3 | 205 |
I have a confusion on some piece of code.
Inside a class I have a property
```
Class A
{
ClassB objB;
public int TimedValue
{
objB.Timer;
}
}
Inside classB I have
classB
{
public int Timer
{
get
{
// get time value using some algorithm....
}
}
}
```
My confusion is that I place breakpoints inside the getters, but I dont see the program flow there and stop! Although I see an object being created and full populated with the TimedValue when I look at it in debug mode inside a watch window. Am I missing something on properties?
EDIT: So, ColinE guided me through the right steps, except I could not find the option there. Here is the screen shot where of where it was suppose to be,

My screen shot

I guess this is a VS bug. Anyway Just posted this so that anyone with team system 2008 should make a note of this :)
|
When does a property get called?
|
CC BY-SA 3.0
| null |
2011-06-16T07:57:09.600
|
2011-06-16T09:07:48.153
|
2011-06-16T09:07:48.153
| null | null |
[
"c#",
"properties"
] |
6,368,999 | 1 | 6,369,225 | null | 2 | 59 |
In django, is there a way to keep users on a stage of a forms wizard until they're ready?

Where if a user clicks on yes, the current contents of that stage are saved, the stage cleared and so on.
|
In django, is there a way to keep a user on a stage of a wizard until they're reado to move on?
|
CC BY-SA 3.0
| null |
2011-06-16T08:22:07.467
|
2011-06-16T08:46:27.690
| null | null | 80,535 |
[
"python",
"django",
"user-interface",
"django-formwizard"
] |
6,369,056 | 1 | null | null | 1 | 518 |
For my application web.config file is generated by [t4 template](http://msdn.microsoft.com/en-us/library/bb126445.aspx). And as a result my config file is nested from web.tt file:

Now when I install elmah, for example, I get following output:
```
PM> Install-Package elmah
Successfully installed 'elmah 1.2.0.1'.
'web.config' already exists. Skipping...
'web.config' already exists. Skipping...
Successfully added 'elmah 1.2.0.1' to ProjectNameToken.Web.
```
And no configuration of elmah added to web.config file.
I verified that elmah section is not present in solution:
```
Find all "elmah", Subfolders, Find Results 1, "Entire Solution", ""
Matching lines: 0 Matching files: 0 Total files searched: 101
```
Any ideas why it happens? I know that nuget won't update my web.tt file, but at least web.config, is it possible?
Some details. This happens because web.config file has attribute
```
<DependentUpon>Web.tt</DependentUpon>
```
in csproj file. If I remove it everything works as expected.
|
Nuget with generated web.config file
|
CC BY-SA 3.0
| null |
2011-06-16T08:28:00.703
|
2011-06-19T10:49:34.280
|
2011-06-16T08:59:31.247
| 72,174 | 72,174 |
[
".net",
"powershell",
"nuget",
"package-managers"
] |
6,369,605 | 1 | null | null | 14 | 2,727 |
I'm trying to implement data localization logic for Entity Framework. So that if for example a query selects `Title` property, behind the scenes it should reference the column `Title_enGB` or `Title_deCH` depending on the current user culture .
To achieve this, I'd like to rewrite the DbExpression CommandTrees from Entity Framework. I thought these [trees](http://msdn.microsoft.com/en-us/library/bb358416.aspx) are a new common .NET way for building cross database insert/update/select queries.. But now all relevant constructors/factories in the namespaces `System.Data.Metadata` and `System.Data.Common.CommandTrees` in `System.Data.Entity.dll` are internal!! (In msdn documentated as public, like: [DbExpressionBuilder](http://msdn.microsoft.com/en-us/library/system.data.common.commandtrees.expressionbuilder.dbexpressionbuilder.aspx)).
Does anyone have an idea to achieve this query manipulation with or without query tree rewrite?
my desired code: (`public class DbProviderServicesWrapper : DbProviderServices`)
```
/// <summary>
/// Creates a command definition object for the specified provider manifest and command tree.
/// </summary>
/// <param name="providerManifest">Provider manifest previously retrieved from the store provider.</param>
/// <param name="commandTree">Command tree for the statement.</param>
/// <returns>
/// An exectable command definition object.
/// </returns>
protected override DbCommandDefinition CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree)
{
var originalCommandTree = commandTree as DbQueryCommandTree;
if (originalCommandTree != null)
{
var expression = new MyCustomQueryRewriter(originalTree.MetadataWorkspace).Visit(originalCommandTree.Query);
commandTree = DbQueryCommandTree.FromValidExpression(originalCommandTree.MetadataWorkspace, originalCommandTree.DataSpace, expression);
}
// TODO: UpdateCommand/InsertCommand
var inner = this.Inner.CreateCommandDefinition(providerManifest, commandTree);
var def = new DbCommandDefinitionWrapper(inner, (c, cd) => new DbCommandWrapper(c));
return def;
}
```
# Update
Having two title columns on one table isn't cool but its easier to implement in a first step. Later I'll join an other table with the localized fields, so the main table will only contain invariant data.

|
EntityFramework query manipulation, db provider wrapping, db expression trees
|
CC BY-SA 3.0
| 0 |
2011-06-16T09:20:59.173
|
2011-06-24T09:13:28.637
|
2011-06-22T13:20:10.413
| 729,433 | 757,596 |
[
"c#",
"entity-framework-4",
"localization",
"expression",
"expression-trees"
] |
6,369,646 | 1 | 6,369,806 | null | 0 | 297 |
I'm overloading my brains on this one.
I've created a table, which contains custom cells (one of a kind). A few days back, I changed the background to the grey you can see in the picture below here.
Now I don't know how I did that....

I don't think I did this programatically... What else would explain the color in IB?
I also searched my sourcecode, and the line for coloring the cell through code is commented out.
I need to reproduce this coloring on other custom cells. How the heck did I do this? :D
|
Change custom cell's background without IB
|
CC BY-SA 3.0
| null |
2011-06-16T09:24:24.947
|
2011-06-16T09:36:43.753
| null | null | 685,314 |
[
"ios",
"xcode",
"colors",
"cell"
] |
6,369,716 | 1 | null | null | 0 | 77 |
I have a UITableView which does not take the whole space on the screen. There are no separator lines between the list items. However there is a light grey line above the whole table which I can't get rid of.
In the image below the line is visible, and underneath there are 2 list items containing only the text "testing". Please advice how to get rid of the line above the table. Thank you!

|
Get rid of line avobe UITableView
|
CC BY-SA 3.0
| null |
2011-06-16T09:30:14.173
|
2011-06-16T09:33:40.307
| null | null | 419,305 |
[
"objective-c",
"uitableview"
] |
6,369,836 | 1 | null | null | 1 | 151 |
following tables are part of Database Design.
I donot have any Non-Clustered index on my Foreign Keys.

I am locking PatientChartImages table by using the following command
```
begin transaction t1
update PatientChartImages set RotationAngle = 55
--ROLLBACK TRANSACTION t1
```
After that, All updates to the User Table are timing out.I am attaching the SqlProfiler trace. The selected command in that image is causing TimeOut. since I am updating PatientChartImages and CreatedByUserId in PatientChartImages is not a FK to main user table, why are Fk lookups causing TimeOut.
According to Me, the following sequence is happening
1. Transaction has a Exclusive lock on PatientChartImages
2. Since PatientChartid in PatientChartImages is a FK to PatientChartid in PatientCharts, this is causing Foreign Key Lookup and is locking PatientCharts table.
3. Similarly as CreatedByUserId in PatientCharts table is a FK to UserID in Users table,so FK lookups are also locking Users table.
Is my understanding on this correct? Please suggest and also tell me how can i prevent this kind of locking.

|
Can update to a ParentTable cause lookup in Child table with foreign Key relationship in SQL SERVER 2008
|
CC BY-SA 3.0
| null |
2011-06-16T09:38:44.163
|
2011-06-16T10:03:23.723
|
2011-06-16T09:41:34.533
| 128,662 | 139,357 |
[
"sql",
"sql-server-2008",
"transactions"
] |
6,369,864 | 1 | 6,370,073 | null | 1 | 1,266 |
I want to develop an application where I want to make the picker in horizontal way. Or the set of adjust the array in such way.
As shown in the image below:

Please guide me how can I do this.
|
xcode+picker in horizontal form
|
CC BY-SA 3.0
| null |
2011-06-16T09:40:41.617
|
2017-02-17T15:31:30.590
|
2017-02-17T15:31:30.590
| 4,284,627 | 755,094 |
[
"xcode"
] |
6,370,050 | 1 | 6,370,086 | null | 0 | 1,784 |
I have the following code:
```
<a href="main.html" class="admin"><div class="buttonlabel">Admin</div></a>
```
and CSS
```
a.admin
{
display:block;
text-decoration:none;
float:left;
background: transparent url(./images/adminnormal.png?rand=628) no-repeat top center;
height:75px;
width:75px;
margin:5px;
outline: #00FF00 dotted thick;
}
```
The code above has this output:

I want this link to be outlined only when a user clicks it (`onclick`). Any ideas how to do that?
|
Outline on click?
|
CC BY-SA 3.0
| null |
2011-06-16T09:56:12.903
|
2015-09-07T01:46:28.023
|
2015-09-07T01:46:28.023
| 14,419 | 827,530 |
[
"jquery",
"html",
"css"
] |
6,370,060 | 1 | 6,370,115 | null | 3 | 5,166 |
I need to add a simple style to a Tableview based on a query in Delphi. I need it to look like this:

I know there's a way to group by fields, but I can't seem to figure out how to add the 2 main title fields to the header of the table.
|
Table header groups in a cxgrid table view
|
CC BY-SA 3.0
| null |
2011-06-16T09:56:58.480
|
2015-01-07T15:05:21.043
| null | null | 414,117 |
[
"delphi",
"devexpress",
"tcxgrid"
] |
6,370,322 | 1 | null | null | 0 | 176 |
I want to make list like www.youtube.com "add to". How I can do this. It can be possible in asp.net.
I am attaching snapshot that i want to use in asp.net.
|
How make dropdown list like "youtube addto favorites"
|
CC BY-SA 3.0
| null |
2011-06-16T10:20:31.273
|
2011-06-16T10:34:47.497
| null | null | 760,935 |
[
"asp.net-mvc"
] |
6,370,601 | 1 | null | null | 4 | 46,933 |
I have the linked server set up in SQL Server 2008. But I could not run any query against the linked server.

I tried to run this simple command but it's not working
```
SELECT * FROM MYSERVER..ALANH.TEMP_UPDATE1
```
This is the error I got when I run the above command.
```
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "OraOLEDB.Oracle" for linked server "MYSERVER" reported an error. The provider did not give any information about the error.
Msg 7312, Level 16, State 1, Line 1
Invalid use of schema or catalog for OLE DB provider "OraOLEDB.Oracle" for linked server "MYSERVER". A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog or schema.
```
Could anyone help me to connect to the OracleLinkedServer? Thanks very much.
|
Run a Query from Linked Server (Oracle) in SQL Server2008 R2
|
CC BY-SA 3.0
| 0 |
2011-06-16T10:48:13.870
|
2016-07-01T15:25:35.750
|
2013-02-15T01:35:10.937
| 394,322 | 296,074 |
[
"oracle",
"sql-server-2008",
"linked-server"
] |
6,370,853 | 1 | 6,370,891 | null | 0 | 4,890 |
How can I change the PopOver's frame color ?
Description : By default the frame of popOver is black and same with the popOver arrow.
Default One :

I want this frame like this(in green or some other color.

EDIT : on the top bar I want two titles(one sub-title). Is it possible and how ?

How can I do it ?
Regards !!
|
PopOver Frame Color
|
CC BY-SA 3.0
| 0 |
2011-06-16T11:12:29.410
|
2011-11-29T11:58:39.800
|
2011-06-16T11:39:17.523
| 380,277 | 380,277 |
[
"iphone",
"objective-c",
"xcode",
"ipad",
"uipopovercontroller"
] |
6,370,986 | 1 | 6,371,108 | null | 1 | 2,698 |
I am using Pajinate – A jQuery Pagination Plugin for pagination in my page
Following are my codes
```
$(document).ready(function(){
$('#paging_container6').pajinate({
start_page : 2,
items_per_page : 5
});
});
```
HTML Code:
```
<div id="paging_container6" class="container">
<h2>Custom Start Page</h2>
<div class="page_navigation"></div>
<ul class="content">
<li><p>One</p></li>
<li><p>Two</p></li>
<li><p>Three</p></li>
<li><p>Four</p></li>
<li><p>Five</p></li>
<li><p>Six</p></li>
<li><p>Seven</p></li>
<li><p>Eight</p></li>
<li><p>Nine</p></li>
<li><p>Ten</p></li>
<li><p>Eleven</p></li>
<li><p>Twelve</p></li>
<li><p>Thirteen</p></li>
<li><p>Fourteen</p></li>
<li><p>Fifteen</p></li>
<li><p>Sixteen</p></li>
</ul>
</div>
```
Pagination would be like this:

When i reach first page I need to hide out `prev` button. similarly when i reach last page i need to hide out `last` button.
Is there is any option with this plugin or I need a solution for this pagination problem.
|
jQuery pajinate plugin customization problem
|
CC BY-SA 3.0
| null |
2011-06-16T11:22:33.373
|
2011-11-02T18:53:04.753
|
2011-06-16T11:23:50.797
| 549,007 | 524,723 |
[
"jquery",
"jquery-plugins",
"pagination"
] |
6,371,077 | 1 | null | null | 2 | 574 |
How we can to fill the chessboard with domino and we have a some blocks. and chessboard is `n x m`. and the places filled with ordered numbers.
Test :

Answer like this :

input give n , m and k. `k` is number of blocks.
and next k lines give blocks such as `6 7` or `4 9`.
sorry for my English.
|
How to fill the chessboard with domino?
|
CC BY-SA 3.0
| 0 |
2011-06-16T11:29:12.637
|
2011-06-16T12:28:23.983
| null | null | 561,110 |
[
"algorithm"
] |
6,371,100 | 1 | null | null | 2 | 1,739 |
I am looking to model some thin & flexible strands/hairs/spines/lines in Box2D and am wondering what the best way to go about this is. I've Googled and seen something called line segments ([http://www.box2d.org/forum/viewtopic.php?f=8&t=1437](http://www.box2d.org/forum/viewtopic.php?f=8&t=1437)) but it seems to be just an extension for the Flash port - I was hoping to do it in a platform-agnostic way.
I am guessing I'll have to do it with chains of thin boxes, but does anyone have any advice or things to watch out for?
Thanks to the feedback below the options so far are:
- Make springy revolute joints by tracking the angle and setting motor speed - there is a thread on this at the Box2D forum:
[http://www.box2d.org/forum/viewtopic.php?f=3&t=1007](http://www.box2d.org/forum/viewtopic.php?f=3&t=1007)- Attach springy distance joints between the segments (see diagram - similar to how people approach soft bodies).- Drop Box 2D and use verlet/particle system if there's minimal collision necessary (not possible for me unfortunately).
|
Box2D modelling flexible hair-like objects
|
CC BY-SA 3.0
| 0 |
2011-06-16T11:30:50.777
|
2013-09-29T01:26:14.440
|
2020-06-20T09:12:55.060
| -1 | 254,022 |
[
"box2d"
] |
6,371,121 | 1 | 6,377,480 | null | 6 | 10,830 |
I am new to ExtJs and I am using ExtJs4.
Now As shown in below image, There is one textfield named keywords, What I want to do is When I click on the button it will pass data of `textfield` to servlet and display resulted record in `grid`.

Now I have no idea how to do this. I am receiving JSON data response from servlet but don't know how to reload the store and refresh the grid.
> Below is code for my store and grid.
```
Ext.define("Post", {
extend: 'Ext.data.Model',
proxy: {
type: 'ajax',
url: '/ezdi/searchServlet',
method: 'POST',
reader: {
type: 'json',
root: 'rows'
//,totalProperty: 'totalCount'
}
},
fields: [{
name: 'docid',
mapping: 'docid'
}, {
name: 'mrn',
mapping: 'mrn'
}, {
name: 'fname',
mapping: 'fname'
}]
});
var gridDataStore = Ext.create('Ext.data.Store', {
model: 'Post'
});
// Data store for grid end
Ext.define('Ezdi.Grid', {
extend: 'Ext.grid.GridPanel',
alias: 'widget.ezdigrid',
initComponent: function() {
var config = {
store: gridDataStore,
columns: [{
header: "DocID",
width: 100,
sortable: true,
dataIndex: 'docid'
}, {
header: "MRN",
width: 100,
sortable: true,
dataIndex: 'mrn'
}, {
header: "FirstName",
width: 100,
sortable: true,
dataIndex: 'fname'
}],
viewConfig: {
forceFit: false,
autoLoad: false
},
loadMask: true
};
}
});
```
|
ExtJS reloading store on button click event with different parameter
|
CC BY-SA 3.0
| null |
2011-06-16T11:32:00.267
|
2018-04-15T18:44:52.587
|
2018-04-15T18:39:51.413
| 3,519,009 | 622,734 |
[
"servlets",
"extjs4"
] |
6,371,200 | 1 | 6,371,317 | null | 0 | 1,019 |
Here's the problem I'm having in my ASP.NET web-form project.
I have Datalist which shows all Products from Database , Each product have one or more colors .
At the moment i write queries like this in order to show all product and default photo of that but not colors related to that product :
```
var query = from p in db.Products
from c in db.Pics
where c.ProductId == p.ProductId
where c.IsDefault == true
select new { p.ProductId, p.ProductType, p.Name, p.Number, p.Package, p.Model, p.Size, p.Material, p.MantoLengh, c.PicAddress};
DataList1.DataSource = query;
DataList1.DataBind();
```
I don't know how to bind related colors to a list-control ( like datalist or other list-Controls) inside of my DataList control, here is a view of my database diagram for more information :

|
How to show datalist in datalist itemtemplate
|
CC BY-SA 3.0
| null |
2011-06-16T11:38:00.530
|
2011-06-16T12:37:02.383
| null | null | 1,904,217 |
[
"asp.net",
"linq-to-sql",
"webforms",
"datalist",
"listcontrol"
] |
6,371,325 | 1 | 6,379,838 | null | 1 | 526 |
Is there a component like ubuntu unity's overlay scrollbar for Delphi?

See also this video: [http://vimeo.com/20523493](http://vimeo.com/20523493)
I use mostly Delphi 2007 but I don't really mind about the version.
|
Component like ubuntu unity's overlay scrollbar
|
CC BY-SA 3.0
| null |
2011-06-16T11:49:43.840
|
2011-06-17T00:24:56.363
| null | null | 650,492 |
[
"delphi",
"components",
"scrollbar"
] |
6,371,443 | 1 | 6,382,783 | null | 6 | 1,578 |
I use a `TableViewer` with two columns. The first should contain text and the second an image depending on the state of the object. The label provider is a custom provider which extends `LabelProvider` and implements `ITableLayoutProvider`.
When no image is displayed, the layout is correct and the text in the first column is aligned to the left.

But when at least one image is displayed the text in the first column is aligned somewhere between right and center - looks kind of ugly.

The layout is quite simple:
```
availableDevicesList = new TableViewer(this, SWT.SINGLE | SWT.BORDER
| SWT.FULL_SELECTION);
availableDevicesList.setContentProvider(new ArrayContentProvider());
Table table = availableDevicesList.getTable();
TableLayout tableLayout = new TableLayout();
table.setLayout(tableLayout);
table.setLinesVisible(true);
tableLayout.addColumnData(new ColumnWeightData(3));
new TableColumn(table, SWT.LEFT);
tableLayout.addColumnData(new ColumnWeightData(1));
new TableColumn(table, SWT.RIGHT);
```
What causes this problem?
|
Strange alignment and layout in tableviewer with image
|
CC BY-SA 3.0
| 0 |
2011-06-16T12:01:01.733
|
2016-03-30T15:39:44.203
|
2016-03-30T15:39:44.203
| 2,343,011 | 398,785 |
[
"image",
"alignment",
"swt",
"jface",
"tableviewer"
] |
6,371,442 | 1 | 6,379,161 | null | 6 | 335 |
I have a set `S` of "small" trees `S[i]` tree `T`. I know `S` before I start constructing `T` (which is a parse tree), so I am thinking about employing a to match the nodes as I go (as the parser generates the CST).
The trees in `S` are not the same ASTs as `T` - think about XPath vs. XML - `S` holds the tree representation of the XPaths, while `T` is the actual AST of the source code - I need maps between `i` and a vector of matching nodes of `T`.
However I'm not sure about the names of the algorithms I would use.
Basically I know what I want to do, it feels like a " for trees" with a stack where I hold possible candidates to match, at each shift of the LALR parser I duplicate the top of the stack and eliminate candidates `i` from `S[i]` which won't match anyway, and after a reduction I pop from the stack. At the beginning all members from `S` are possible candidates.
: this is just about the AST, the ASG is another story...
Here be a parse tree `T`.

The parsing function will be aware of a list of what I call "treepaths", in a canonical form, also represented as trees, stored in `S`. But they won't look like the parsetree, they have their own language to be represented in, similar to XPath.
Example of a treepath to get all functions which have as return value a variable:
```
function[body[return[expr[@type="variable"]]]]]
```
1. So what should I look for in the existing literature?
2. Any other advices?
3. Are there already languages which can query meta-annotated trees like this? An open-source C (not C++) library would be ideal.
|
Algorithm's name - matching subtrees in ASTs
|
CC BY-SA 3.0
| 0 |
2011-06-16T12:01:00.420
|
2011-06-16T22:24:43.913
|
2011-06-16T13:35:22.130
| 88,054 | 88,054 |
[
"algorithm",
"parsing",
"programming-languages",
"compiler-theory"
] |
6,371,508 | 1 | 6,371,576 | null | 1 | 497 |
How can I set a sub-title of my popOverView ?
Description :
Here is what I am getting : I am able to set the title.

Here is what I want :I want the title and a subtitle on my popOverView.

How can I do that ?
Regards !!
|
UIPopOver Title and Sub-Title
|
CC BY-SA 3.0
| 0 |
2011-06-16T12:05:53.517
|
2011-06-16T12:12:18.580
| null | null | 380,277 |
[
"iphone",
"ios",
"xcode",
"ipad",
"uipopovercontroller"
] |
6,371,549 | 1 | null | null | 0 | 379 |
I am using a LPDIRECT3DTEXTURE9 to hold my image.
This is the function used to display my picture.
```
int drawcharacter(SPRITE& person, LPDIRECT3DTEXTURE9& image)
{
position.x = (float)person.x;
position.y = (float)person.y;
sprite_handler->Draw(
image,
&srcRect,
NULL,
&position,
D3DCOLOR_XRGB(255,255,255));
return 0;
}
```
According to the book I have the RGB colour shown as the last parameter will not be displayed on screen, this is how you create transparency.
This works for the most part but leaves a pink line around my image and the edge of the picture. After trial and error I have found that if I go back into photoshop I can eliminate the pink box by drawing over it with the pink colour. This can be see with the ships on the left.
I am starting to think that photoshop is blending the edges of the image so that background is not all the same shade of pink though I have no proof.
Can anyone help fix this by programming or is the error in the image?
If anyone is good at photoshop can they tell me how to fix the image, I use png mostly but am willing to change if necessary.
edit: texture creation code as requested
```
character_image = LoadTexture("character.bmp", D3DCOLOR_XRGB(255,0,255));
if (character_image == NULL)
return 0;
```
|
transparent colour being shown some of the time
|
CC BY-SA 3.0
| null |
2011-06-16T12:09:31.277
|
2011-06-16T14:40:00.390
|
2011-06-16T13:06:57.610
| 686,054 | 686,054 |
[
"c++",
"photoshop",
"directx-9"
] |
6,371,661 | 1 | null | null | 7 | 3,595 |
I haven't used ShareKit much, but I want to have only three sharing options: Facebook, Twitter, and Email. ShareKit gives far more options, including a More button. However, I don't want the More option, just the three.
In `SHKActionSheet.m` of ShareKit:
```
// Add More button
[as addButtonWithTitle:SHKLocalizedString(@"More...")];
```

|
ShareKit changes?
|
CC BY-SA 3.0
| 0 |
2011-06-16T12:18:48.943
|
2013-12-02T09:25:47.883
|
2011-12-02T23:27:40.960
| 558,700 | 755,278 |
[
"iphone",
"objective-c",
"facebook",
"xcode4",
"sharekit"
] |
6,371,685 | 1 | 6,373,161 | null | 4 | 4,957 |
Take a look at this Open Source Application called [Construct](http://www.scirra.com/construct/)
.
It uses Panel Docking where you can drag a Panel, and then some on screen visual aids to show where the Panel may be docked, as seen below:

When dragging/moving one of the Dock Panels the Window now looks like this:

As you can see, when dragging/moving the Object Panel it displays the visual aids of where the Panel can be docked. It also moves around like a free Window when not in a docking position. The same applies when dragging/moving other Dock Panels such as the Project Panel in this example.
This is an example of an Application using this, I have also seen other Applications employ this too.
Is there a Delphi way of acheiving this behaviour?
I have some panels that take up some space, freely moving or docking them would be useful feature to implement.
Thanks.
It seems the LMD Components offer such a component which I may look into.
|
How to implement this type of Docking?
|
CC BY-SA 3.0
| 0 |
2011-06-16T12:20:21.240
|
2011-06-17T05:52:00.503
|
2011-06-16T12:30:53.020
| null | null |
[
"delphi",
"dock",
"docking"
] |
6,371,999 | 1 | 6,372,520 | null | 0 | 4,542 |
Is it possible to fill an image with two colors (ex green and blue) but the colors should be painted only over black color and green must be painted only to a certain coordinate and the rest of the image should be painted with blue? Below is an example of image in which black must be replaced with green and blue


|
android fill image with colors
|
CC BY-SA 3.0
| null |
2011-06-16T12:43:34.727
|
2014-02-15T18:21:40.073
|
2011-06-16T12:59:39.993
| 517,558 | 517,558 |
[
"android",
"image",
"paint"
] |
6,372,193 | 1 | 6,372,418 | null | 10 | 21,820 |
I never needed to use the TRichEdit before, always used TMemo.
I'd like RichEdit autoscrolling to the end when I add text like TMemo. See how it looks after you add some data:

As you can see, the scroll bar remains at the top, but I'd like it stayed at the bottom as I added text.
I've 'googled' for solutions but I couldn't find a good and reliable one.
|
How to autoscroll to the end of RichEdit?
|
CC BY-SA 3.0
| 0 |
2011-06-16T12:55:35.290
|
2018-08-13T11:31:19.900
|
2011-06-16T13:11:14.967
| 116,875 | 116,875 |
[
"delphi",
"scroll",
"richedit",
"autoscroll"
] |
6,372,204 | 1 | null | null | 3 | 1,039 |
I am creating a Map Editor for my game using WPF Forms.
I have one problem though. How can I drag and drop a tile(image) into a specified place?
I'll try to detail my need. Take for instance this image:

So what I want is that every tile - will be selected by the user and dragged to the grid area - is "attracted" to a cell. Is that clear?
That way the user would see every tile in its place.
Does anyone know how to implement that?
Thanks.
|
How can I drag and drop a tile(image) into a specified place? WPF
|
CC BY-SA 3.0
| 0 |
2011-06-16T12:56:10.103
|
2012-09-27T14:17:48.333
|
2011-06-16T13:16:47.740
| 782,630 | 782,630 |
[
".net",
"wpf",
"user-interface"
] |
6,372,436 | 1 | 6,372,595 | null | 1 | 432 |
I had posted a question about stepping into properties [Here](https://stackoverflow.com/questions/6368751/when-does-a-property-get-called/6368812#6368812)
Turned out to be problem a with VS2008 and went over to 2010.
I was exploring properties and have hit a point where I need some clarity over how propety values are visible in watch windows but actual calls are not invoked.
When I try to view an objects property in watch window, I can see the value I had assumed that I would be seeing a null. So I put a breakpoint at the property and ran the program again, expecting it to break there. This did not happen. Now,
- - -
Below is the screen shot of what I see. Call for property is invoked in the next line that was commented out.

Here is my code that I was testing.
```
namespace ClassPropertiesView
{
class A
{
public int timings
{
get
{
return objB.bTimes;
}
}
public B objB
{
get
{
return new B();
}
}
}
public class B
{
public int bTimes
{
get
{
return -1;
}
}
}
class Program
{
static void Main(string[] args)
{
A anObject = new A();
// Console.WriteLine(anObject.timings);
}
}
}
```
Any help is appreciated. Thanks!
|
"Properties" viewable in watch window / Debug view but call not invoked. C#
|
CC BY-SA 3.0
| 0 |
2011-06-16T13:11:21.907
|
2011-06-16T13:24:12.197
|
2017-05-23T12:07:02.087
| -1 | null |
[
"c#",
"debugging",
"properties"
] |
6,372,507 | 1 | 6,385,984 | null | 2 | 291 |
I need to write and algorithm that can detect which state an application (used to fill out forms) is in based on screenshots.
It has 2 inputs:
Approximately 2-10 screenshots from an application with different tabs selected. These are made by the user, so i can instruct him to things like "select the upper area of the program" or "select the whole window", but i can not expect pixel-perfect precision.
a screenshot of one of these states. The forms are filled with different data.
The goal is to determine which screenshot from "A" is from the same state as "B".
An example screenshot:

An example based on this screenshot:
10 screenshots from this program with "Menu","Sale Order","Purchase order",... tabs selected
the screenshot above.
The task is to determine which of the 10 screenshots matches this image.
I have tried to use an image descriptor algorithm, ([SURF](http://code.google.com/p/in-spirit/wiki/ASSURF)) but it has a really high error ratio, since its not made for such tasks.
Anyone has an idea how to make such classification? Should i use some filter (e.g median or blur) on the screenshots, and then run trought some classification algorithm? Or extract some other feature to classify (FFT,histogram,..)?
|
Classify a program from a screenshot
|
CC BY-SA 3.0
| 0 |
2011-06-16T13:16:08.863
|
2011-06-17T12:50:32.177
| null | null | 319,473 |
[
"language-agnostic",
"image-processing",
"image-manipulation",
"classification",
"image-recognition"
] |
6,372,544 | 1 | null | null | 0 | 320 |
I am trying to create a small photo album layout in vb.net using a `listview` that when a new album has been created it shows it in the `listview` as a 3 x 2 grid. But when it gets more than a 3 x 2, I want it to just show a link listing all albums. Here is a image of what I'm trying to achieve:

Thanks in advance.
|
listview layout
|
CC BY-SA 3.0
| null |
2011-06-16T13:20:01.030
|
2011-06-16T14:49:09.987
|
2011-06-16T14:49:09.987
| 592,301 | 512,623 |
[
"asp.net",
"vb.net",
"listview"
] |
6,372,570 | 1 | 6,377,342 | null | 1 | 4,183 |
I am working on an application that uses the Qt library on Windows.
I want the user to be able to configure the printer where the application should print. So my main menu will contain the following entries:
- -
In other, non-Qt, applications I used the Windows function PrintDlg with the flag PD_PRINTSETUP. This showed the following dialog, which is exactly what I want:

However, the Qt function QPrintDialog uses the more recent PrintDlgEx function, which looks like this:

This dialog seems to be intended for actual printing. Not for setting and configuring the printer.
- -
The QPageSetupDialog isn't really useful in my case either. It looks like this:

So this only makes it useful for setting the page size, the orientation and the margins.
Is there a clean way in Qt to get a decent printer configuration dialog?
If I can't find a clean way, I need to revert to the native Windows PrintDlg function, which means patching or duplicating the code in the Qt source qprintdialog_win.cpp.
|
QPrintDialog and setting up the printer
|
CC BY-SA 3.0
| null |
2011-06-16T13:22:21.263
|
2011-06-17T15:36:54.853
| null | null | 163,551 |
[
"qt",
"printing"
] |
6,372,708 | 1 | 6,375,548 | null | 0 | 298 |
I've got this problem on multiple projects with Xcode4/OS X 10.6:

No matter what I do, the editable NSTextField (containing text "Label") will stick to the right-edge of the parent NSView.
The immediately adjacent NSTextfield (non-editable, text "Sprint Goal") resizes correctly - with the exact same springs/struts it glues to the right-edge of the parent NSView.
I've got the same generic problem in multiple projects - right-hand-edges of editable NSTextField instances, with floating left-edge, are never, ever honoured. No matter what I do.
Bug? Something fundamental I'm missing here? All my other widgets and controls work "as expected", even with complex layouts. I can't get NSTextField to work even with simple layotus!
|
Editable NSTextField autoresizing ... never works. Bug in OS X?
|
CC BY-SA 3.0
| null |
2011-06-16T13:32:23.987
|
2011-06-16T16:45:46.280
| null | null | 153,422 |
[
"cocoa",
"nstextfield"
] |
6,372,816 | 1 | 6,372,986 | null | 0 | 798 |
I am newbie to android so this might be one of the dumbest question you face.
I am developing UI in Eclipse through drag-drop.I have added many elements in one screen now
the window where you drag-drop UI elements is not growing/scrolling beyond a capacity.
So I am not able to see newly added elements.
Please check image for more details..

You can observe elements after `Storage Position` are not visible.
How to check other elements or cant we add elements beyond a certain number/size ?
~Ajinkya.
|
Problem with Android drag - drop UI development
|
CC BY-SA 3.0
| null |
2011-06-16T13:40:52.407
|
2011-06-16T14:03:09.387
| null | null | 705,773 |
[
"android",
"android-layout"
] |
6,372,912 | 1 | null | null | -1 | 126 |
Screenshots:
-

-

How can I fix the difference? Here is my CSS code:
```
BODY
{
margin: 0;
padding: 0;
background-image:url('images/bg.jpg');
}
@font-face {
font-family: "District";
font-style: normal;
font-weight: 1;
src: url("DisTh__.otf");
}
#logo
{
padding-top: 0;
line-height: 0%;
font-family: District;
font-size: 36px;
color:#d8d8d8;
text-decoration: none;
text-shadow: #000000 1px 1px 1px;
float:left;
}
#main-container
{
width:980px;
margin-left:auto;
margin-right:auto;
padding-top: 0px;
border-style:solid;
border-width:2px;
}
#nav
{
float: right;
Width: 500px;
padding-top:26px;
}
#nav li
{
line-height: 22px;
font-family: District;
font-size: 18px;
text-align:center;
color:#d8d8d8;
list-style-position:inside;
list-style-type: none;
float: right;
padding-right: 30px;
}
#nav li a
{
text-decoration:none;
text-shadow: #000000 1px 1px 1px;
color:#d8d8d8;
}
#nav li a:hover
{
text-decoration:none;
text-shadow: #000000 2px 2px 1px;
}
#middle-container
{
width:980px;
margin-left:auto;
margin-right:auto;
margin-top: -4px;
background-image:url(images/box-bg.jpg);
background-repeat:no-repeat;
}
#clear
{
clear:both;
}
/* SLIDER CSS */
#slideshow {
margin: auto;
width:980px;
height:450px;
background:transparent url(images/box-bg.jpg) no-repeat 0 0;
position:relative;
}
#slideshow #slidesContainer {
width:568px;
height:225px;
overflow:auto; /* allow scrollbar */
position:relative;
top: 47px;
}
#slideshow #slidesContainer .slide {
width:568px; /* reduce by 20 pixels of #slidesContainer to avoid horizontal scroll */
height:263px;
}
/**
* Slideshow controls style rules.
*/
.control {
display:block;
width:39px;
height:263px;
text-indent:-10000px;
position:absolute;
cursor: pointer;
}
#leftControl {
top:0;
left:0;
background:transparent url(images/Lprev-button.png) no-repeat 0 0;
margin-top:116px;
margin-left: 85px;
}
#rightControl {
top:0;
right:0;
background:transparent url(images/Rnext-button.png) no-repeat 0 0;
margin-top:116px;
margin-right: 85px;
}
/* END SLIDER */
```
|
Why is it like this in different browsers?
|
CC BY-SA 3.0
| null |
2011-06-16T13:46:09.017
|
2011-11-28T21:55:14.073
|
2011-11-28T21:55:14.073
| 234,976 | 801,585 |
[
"html",
"css"
] |
6,373,225 | 1 | 7,277,271 | null | 13 | 16,013 |
I want to add a title to a chart, like in the [gauge example](http://dev.sencha.com/deploy/ext-4.0.2a/examples/charts/Gauge.html) or a pie chart. I want to display a title under or on top of the chart. Is this possible? I've been looking and can't find anything about this. if so , any tip to share?
it would be something like this 
: i found there is a property to create for the title or any labels at the .
but i couldnt understand how to use it..
anybdy here have done the same?
|
Is it possible to add title to charts?
|
CC BY-SA 3.0
| 0 |
2011-06-16T14:06:17.153
|
2018-12-11T19:08:30.820
|
2020-06-20T09:12:55.060
| -1 | 745,378 |
[
"extjs",
"label",
"charts",
"title",
"extjs4"
] |
6,373,429 | 1 | 6,373,727 | null | 1 | 1,918 |
I have a custom `UITableViewCell` which has some subviews. i.e. some labels, some images. I want all these subviews to be right aligned in the UITable. How do i do that?
I have tried these approaches -
1.In InterfaceBuilder when I select the UITableViewCell, I can set the "indentaion" section. It's by default 0, I made it 100 but I see no change in the device.
2.I have tried this in the code too. Override the default method...
```
(NSInteger)tableView:(UITableView *)tableView
indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 100;
}
```
The above code also does not work. How do I align all my subviews in my `UITableViewCell` to right?
Basically, I want to display one cell left aligned (which is default) & some cells right aligned. As shown in the picture.

|
UITableViewCell Align all subviews
|
CC BY-SA 3.0
| null |
2011-06-16T14:20:11.287
|
2011-06-16T14:38:45.670
|
2011-06-16T14:32:08.930
| 147,019 | 147,019 |
[
"objective-c",
"ios",
"uitableview",
"alignment"
] |
6,373,631 | 1 | 6,393,615 | null | 2 | 2,861 |
in my `Activity`, I have a layout containing 3 `FrameLayout`s, one at the top, one at the left and one at the "center".
Now, I sometimes only want to display one or two of them. Atm I am doing it this way:
```
FrameLayout frame = (FrameLayout) findViewById(R.id.framelayout_menu_left);
frame.setVisibility(...);
frame = (FrameLayout) findViewById(R.id.framelayout_content);
frame.setVisibility(...);
frame = (FrameLayout) findViewById(R.id.framelayout_menu_top);
frame.setVisibility(...);
```
However this can get really ugly results, e.g. when I switch the "content" `Fragment` and hide the top and/or left `FrameLayout`. It all starts flickering as the "content" `Fragment` jumps to the top and/or left and only afterwards is replaced.
Also, I can obviously not navigate back to another setup, so is there any other way to do this?
Kind regards,
jellyfish
Maybe a little drawing makes my question clearer...

shows a Layout of 3 FrameLayouts containing 3 different Fragments. Each color represents one distinct Fragment.
Now what I want to do is to switch from to .
I am doing this by replacing the blue Fragment with the yellow Fragment via a `FragmentTransaction`.
However, this still keeps the other Frames visible, so I hide them via the code above.
Now, `Frame.setVisibility()` is called way before commit(), so in and the blue Fragment "jumps" to the left and the top and only afterwards (in ) is replaced with the yellow Fragment. This produces a nasty flickering.
As a workaround, I now hide all three FrameLayouts before the transaction and re-show the ones I need once the transaction has finished. But there still is the problem that I can't go back via the back button as this isn't a real transaction.
|
Android Honeycomb: layout problem - hide/show FrameLayouts
|
CC BY-SA 3.0
| null |
2011-06-16T14:32:33.957
|
2011-06-18T03:12:55.877
|
2011-06-17T07:38:38.450
| 662,493 | 662,493 |
[
"android",
"android-layout",
"android-3.0-honeycomb",
"android-fragments"
] |
6,373,754 | 1 | 6,374,053 | null | 3 | 433 |
I'm facing a path finding problem in which I have to find every possible path from one point to another. It would be very easy if it was just that - I'd use a breadth-first algorithm, just like the one explained [here](http://www.python.org/doc/essays/graphs.html).
The problem is that, in this case, every edge has a . Let's see it with an example:

In this case, I can go 15 times from A to D. The first 10 times, the path would be A -> B -> C -> D. The remaining 5 times, the path would be A -> C -> D.
So far I've been able to implement a solution (using python) but it's quite slow for medium problems (about 30 nodes). I have an unweighted graph (as I don't mind the length of the path) with the possible connections between the different nodes, and separately I have a matrix with the of each edge.
So, inside a loop:
- - - -
As I said, this works, but it's quite slow. I've been able to increase the overall performance by sorting the list of edges for each node based on the number of times it can use, but it's still slow.
Any clues?
|
Efficient way of getting all possible paths + special detail
|
CC BY-SA 3.0
| null |
2011-06-16T14:40:45.513
|
2011-06-16T15:04:56.883
|
2011-06-16T14:55:15.743
| 276,451 | 276,451 |
[
"algorithm",
"path-finding"
] |
6,373,845 | 1 | 6,373,898 | null | 0 | 63 |

In the above image I have a field on my form. I would like the text to sit within the area highlighted in red.
I have currently set the following in the CSS for the field.
```
.checkbox-text{
width: 300px;
height: 50px;
margin-left: 7px;
}
```
What do I need to do?
Thanks
|
2nd line text off to other side (CSS)
|
CC BY-SA 3.0
| null |
2011-06-16T14:48:30.067
|
2011-06-16T14:55:44.357
|
2011-06-16T14:52:54.590
| 731,323 | 418,878 |
[
"css",
"forms"
] |
6,373,864 | 1 | 6,374,149 | null | 1 | 329 |
I am trying to create a form in which I can have a list and an input box/text box. What I want is when a user types in the text box a value and clicks add to the list, the value should be added to the list. Then once the person presses submit, the PHP code should be able to use the values obtained from list for procedure. I am trying to do it in PHP and HTML but a few have suggested jQuery in JS. Please help with what you know or how I can do this.
If you dont understand I have a diagram for what I want to do...

```
<?php
$Fname = $_POST["Fname"];
if (!isset($_POST['submit'])) { // if page is not submitted to itself echo the form
?>
<html>
<head>
<title>Personal INFO</title>
<style type="text/css">
body {
background-image: url("http://dev.icalapp.rogersdigitalmedia.com.rogers-test.com/rogers_blackberry_8900.jpg");
background-position: 50% 50%;
background-repeat: repeat;
}
</style>
</head>
<body>
<form method="post" action="<?php echo $PHP_SELF;?>">
<span style="font-family:Helvetica;font-size:22px;font-style:normal;font-weight:bold;text-decoration:underline;text-transform:capitalize;color:FFFFFF;background-color:990033;">Amount of Numbers</span> <input type="text" style="text-align:center" size="12" maxlength="50" name="Fname" ><br />
<input type="submit" value="submit" name="submit">
</form>
<?
}
?>
```
|
jQuery Javascript combo list
|
CC BY-SA 3.0
| null |
2011-06-16T14:50:14.380
|
2011-06-16T15:35:51.837
|
2011-06-16T15:15:35.323
| 229,044 | 761,669 |
[
"php",
"jquery",
"html"
] |
6,373,919 | 1 | 6,375,448 | null | 4 | 416 |
Building up on the solution proposed by Belisarius in ["Manipulate custom Tabular"](https://stackoverflow.com/questions/6333622/manipulate-custom-tabular-representation-in-mathematica).
- Consider the following Function to create custom Tabular representation :```
DataSampleXX[data_, linesNumber_, columnsList_, color1_, color2_, color3_] :=
Grid[
Join[
{columnsList}, {Map[Rotate[Text[#], 90 Degree] &,
data[[1, columnsList]]]}, data[[2 ;; linesNumber, columnsList]]],
Background -> {{{{color1, color2}}, {1 -> color3}}},
Dividers -> {All, {1 -> True, 2 -> True, 3 -> True, 0 -> True}},
ItemSize -> {1 -> Automatic, Automatic},
Alignment -> Top,
Frame -> True,
FrameStyle -> Thickness[2],
ItemStyle -> {Automatic,
Automatic, {{1, 1},
{1, Length[data]}} -> Directive[FontSize -> 15, Black, Bold]}
];
```
- And the following data :```
soData = {{"col1", "col2", "col3", "col4", "col5", "col6", "col7",
"col8", "col9", "col10"}, Range[1, 10], Range[11, 20],
Range[21, 30], Range[31, 40]}
With[
{columnsList = {1, 3},
data = soData,
linesNumber = 3,
color1 = LightBlue,
color2 = LightRed,
color3 = LightGray},
DataSampleXX[data, linesNumber, columnsList, color1, color2, color3]]
```

- I would like to integrate the following Dynamic to feed the `columnsList` argument of the `DataSampleXX` Function.```
Manipulate[Sort@Join[Sequence @@ {a, b}],
Evaluate[Sequence @@ MapThread[{{#1, {}, ""}, #2,
ControlType -> TogglerBar} &, {{a, b},
Partition[Rule @@@ Transpose[{Range[10], soData[[1]]}], 5]}]],
ControlPlacement -> Top]
```

- `DataSampleXX`
|
Dynamic List Selection within another Dynamic in Mathematica
|
CC BY-SA 3.0
| 0 |
2011-06-16T14:54:15.650
|
2015-08-06T11:12:20.257
|
2017-05-23T12:13:39.697
| -1 | 769,551 |
[
"dynamic",
"wolfram-mathematica",
"tabular"
] |
6,373,940 | 1 | 6,374,451 | null | 6 | 203 |
[FindDivisions[ ]](http://reference.wolfram.com/mathematica/ref/FindDivisions.html) was added in Mma v7, and seems a nice way to get flexible ticks for plots. See for example [this question](https://stackoverflow.com/questions/5664937/adaptive-gridlines) and its answers.
Usage example:
```
f[fd_] := Join[
{#, #, {.07, 0}, Directive[Black, Thickness[.01]]} & /@ fd[[1]],
{#, #, {.05, 0}, Directive[Black, Thin]} & /@ Flatten[fd[[2]]]];
plot[pr_List] :=
Plot[Sin[x], Evaluate@Join[{x}, pr], Ticks -> {f[FindDivisions[pr, {2,5}]]}]
plot[{0, 10}]
```

And everything seems right.
But there is a glitch:
```
f[fd_] := Join[
{#, #, {.03, 0}, Directive[Red, Thickness[.01]]} & /@ fd[[1]],
{#, #, {.05, 0}, Directive[Black, Thin]} & /@ Flatten[fd[[2]]]];
plot[pr_List] :=
Plot[Sin[x], Evaluate@Join[{x}, pr], Ticks -> {f[FindDivisions[pr, {2,5}]]}]
plot[{0, 10}]
```

As you can see, the red and black ticks are superimposed. That is because
```
FindDivisions[{0, 2}, {2, 4}]
(*
-> {{0, 1, 2}, {{0, 1/4, 1/2, 3/4, 1}, {1, 5/4, 3/2, 7/4, 2}}}
*)
```
and you can see that the numbers in the first list (the main ticks) are repeated in the second list.
However, the FindDivisions[] documentation states:

So, two questions:
1. Is this a bug, or am I doing (or understanding) something wrong?
2. Any easy way to delete the repeated ticks in a multilevel structure?
|
FindDivisions[ ] not working as stated
|
CC BY-SA 3.0
| 0 |
2011-06-16T14:55:33.197
|
2011-08-24T04:11:19.077
|
2017-05-23T12:01:16.000
| -1 | 353,410 |
[
"wolfram-mathematica"
] |
6,374,114 | 1 | 6,375,570 | null | 0 | 1,454 |
I want to create a simple animation of a game so you can see the playout of a game. It should be an animation in which you just see the game Tic-Tac-Toe played. I have the states of the games in a description. So player 1 marks a cell = state 1; player 2 marks a cell = state 2 etc..
I currently have the game parsed in a ruby program; it will be easy to display just one state (like in the image), but how do I create an animation from it? Is there an easy way to do this? I'm open to solutions in every language but it shouldn't take to much time to implement. I want to show such an animation in a presentation.

```
<state1>
cell(1,1,x).
cell(1,2,o).
cell(1,3,o).
cell(2,1,o).
cell(2,2,x).
cell(2,3,x).
cell(3,1,b).
cell(3,2,b).
cell(3,3,x).
</state1>
<state2>
...
</state2>
```
|
Create a Tic-Tac-Toe Animation
|
CC BY-SA 3.0
| 0 |
2011-06-16T15:08:44.557
|
2011-06-16T16:47:17.107
|
2011-06-16T16:40:56.860
| 321,505 | 801,749 |
[
"java",
"jquery",
"ruby",
"flash"
] |
6,374,159 | 1 | null | null | 9 | 2,240 |
I am having issues with a CoreData-based iOS app when it tries to build the initial DB from data sent from the server. Basically, the server sends down 1MB chunks of objects (about 3,000 per chunk), and the iOS client deserializes them and writes them into disk.
What I'm seeing is that everything is going pretty well for about the first 8 chunks (out of 44), then performance drops off dramatically and each chunk starts taking longer and longer, as in the image below. Pretty much all the time is consumed in `[NSManagedObjectContext save]` as you can see in the Instruments profiling data, but also it appears that the app is no longer running at 100% of CPU for some reason, like it's waiting on disk I/O or something.

A few important facts about how I'm doing this:
- Each chunk is processed in its own `NSManagedObjectContext` with its own `NSAutoreleasePool`, so there is no object build-up in a non-flushed context between processing of chunks.- There is no `NSUndoManager` set on any of the contexts.- There is no `mergeChangesFromContextDidSaveNotification:` going on (i.e. the chunk contexts aren't pushing their changes into a "master" context)- I'm using a SQLite-based datastore on iOS 4.3.- The records being written do have indexes on them.- The entire sync job is processed on a single GCD background thread (i.e. `dispatch_queue_create()` and `dispatch_async()`).
I have no idea why the performance suddenly drops off like that or what can be done to address it. I have poked around and read the following, but nothing has jumped out at me yet:
- [http://cocoawithlove.com/2008/03/testing-core-data-with-very-big.html](http://cocoawithlove.com/2008/03/testing-core-data-with-very-big.html)- [Does the performance of saving a ManagedObjectContext depend on the number of contained (unchanged) objects?](https://stackoverflow.com/questions/2229690/does-the-performance-of-saving-a-managedobjectcontext-depend-on-the-number-of-con)
Any ideas or pointers for making this app scale up to 100,000 records in the database would be much appreciated.
### Edit - extra stats
This Instruments graph shows the same simulation as above (on iPad2), but includes the disk activity stats and you can see pretty plainly that all of the "not running at 100% CPU" time seems to be taken up with writing to disk.

I also ran same sync attempt running on the iOS simulator. Overall memory usage is more or less constant for each chunk except for a dictionary that contains object IDs that grows slightly over time (but these are not CoreData objects or anything that would affect saves, they are just NSNumbers). This dict is a small amount of memory compared to the total heap and so the problem is not running out of memory.
What is interesting about this test is that the CoreData Save instrument reports that the successive saves take roughly the same amount of time, which obviously conflicts with the CPU profiling information from the first set of results. It seems like CoreData thinks it is taking the same amount of time to push changes to the DB, but the DB itself (i.e. SQLite) suddenly takes a lot longer to actually stream those changes to disk.
|
Performance of NSManagedObjectContext save degrades dramatically
|
CC BY-SA 3.0
| 0 |
2011-06-16T15:11:35.197
|
2013-05-17T21:15:40.180
|
2017-05-23T10:29:46.917
| -1 | 288,502 |
[
"ios",
"performance",
"core-data",
"scalability",
"nsmanagedobjectcontext"
] |
6,374,185 | 1 | null | null | 0 | 158 |
When hovering over a map bullet I'm fading out, changing the background position of the sprite, then fading back in. But I'm having a problem with consistency when this action is done quickly across several bullets.
Ideas how I can tweak this without having to make an specific event for each bullet?

```
$("#map a").hover(
function () {
$(this).fadeOut(200, function () {
$(this).css('backgroundPosition', '0 0');
$(this).fadeIn(200);
});
},
function () {
$(this).fadeOut(200, function () {
$(this).css('backgroundPosition', '');
$(this).fadeIn(200);
});
}
);
```
## Thanks for the brain power!
...But I think I'm just going to remove this functionality in lieu of some fancy tooltips that don't mesh so well with the fading. Thanks for stopping by!
|
jQuery hover with fade timing problem w/ screenshot
|
CC BY-SA 3.0
| null |
2011-06-16T15:13:46.477
|
2011-06-16T16:18:51.783
|
2011-06-16T16:18:51.783
| 697,809 | 697,809 |
[
"jquery",
"fadein",
"fadeout",
"jquery-hover"
] |
6,374,272 | 1 | 6,377,406 | null | 7 | 4,653 |
I'm trying to display some data using Matplotlib and wxPython. I've got a Figure that's added to a FigureCanvasWxAgg. The canvas is then added to a BoxSizer and set to wx.EXPAND|wx.ALL, the BoxSizer on its turn is set by SetSizerAndFit.
```
self.figure = Figure(None, dpi = 75)
self.displaycanvas = FigureCanvas(self, -1, self.figure)
self.axes = self.figure.add_subplot(111)
self.axes.imshow(self.data, interpolation="quadric")
self.mainSizer = wx.BoxSizer()
self.mainSizer.Add(self.displaycanvas, 1, wx.EXPAND|wx.ALL, 5)
self.SetSizerAndFit(self.mainSizer)
```
This panel is then added to another panel, where its size get's determined relative to other panels that are being added. While I'm happy with the outer size of the panel, I can't get the figure to fit the panel:

The large panel with all the paws should be scaled to fit the panel, while maintaining its aspect ratio.
So I'm wondering,
|
How to make a FigureCanvas fit a Panel?
|
CC BY-SA 3.0
| 0 |
2011-06-16T15:19:52.960
|
2011-06-16T19:42:43.470
| null | null | 77,595 |
[
"python",
"wxpython",
"matplotlib"
] |
6,374,363 | 1 | 6,374,456 | null | 0 | 1,810 |
I hope display label as below

So I used the codes below to display label with UITableViewCellAccessoryDisclosureIndicator
```
cell=[[[UITableViewCell alloc] initWithFrame:CGRectZero// cellframe //SimpleTableIdentifier1
reuseIdentifier:SimpleTableIdentifier1] autorelease];
cell.accessoryType= UITableViewCellAccessoryDisclosureIndicator;//
UILabel *labelCell =[ [[UILabel alloc]init] autorelease];
[labelCell setTag:11101];
labelCell.frame = CGRectMake(180.9f,15.0f,60.0f,23.0f) ;
[labelCell setBackgroundColor:[UIColor clearColor]];
labelCell.textAlignment=UITextAlignmentRight;
[labelCell setFont:[UIFont systemFontOfSize:13.0]];
[labelCell setTextColor:[UIColor blackColor]];
[cell.contentView addSubview:labelCell];
```
UITableViewCellAccessoryDisclosureIndicator will display correctly
but the labelCell does not display, except I tap the row of the UITasbleViewCell

Welcome any comment
|
display label with UITableViewCellAccessoryDisclosureIndicator
|
CC BY-SA 3.0
| null |
2011-06-16T15:25:32.327
|
2011-06-16T15:37:28.933
| null | null | 629,453 |
[
"iphone"
] |
6,374,513 | 1 | null | null | 1 | 1,896 |
i have a problem when i write a program on android for monitoring ecg real time.
Ecg data is transfered to mobile in real time by udp. In mobile, there have 2 thread: a thread gets ecg data transfered, a thread draws the ecg data.
Cicurlar buffer is common data for two thread above, and two threads always confict when read and write to buffer. And result is that ecg is lost or slow.
Before user cicurlar buffer, i had used 5 linkedblockingqueu but result was same.
Can any one give me some solution for data for multithread in my program?
Thank you.
Sorry, my english is not good.!
there is model when i used linkedblockingqueue:

|
shared data for multi thread in java
|
CC BY-SA 3.0
| null |
2011-06-16T15:36:15.813
|
2012-01-18T23:47:36.433
|
2012-01-18T23:47:36.433
| 168,868 | 683,153 |
[
"java",
"multithreading",
"real-time"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.