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,007,411 | 1 | 6,007,431 | null | 0 | 396 |
hey, I have a little bizzare quastion...
i have excel DB that is arrange a little wired, its looks like this :

my quastion is , are this type of DB works for SPSS ? is it possible to do statistic analysis based on this type of input ?
|
importing excel DB to SPSS
|
CC BY-SA 3.0
| null |
2011-05-15T08:46:34.773
|
2011-05-15T09:00:43.763
| null | null | 577,035 |
[
"excel",
"spss"
] |
6,007,526 | 1 | 6,007,617 | null | 2 | 9,014 |
I am using asp.net 4.0. i am creating the Url with the help of "routes.MapPageRoute".
so i noticed that jquery file was not gettin loaded due to url not being static. so i used
"ResolveClientUrl". I could load the js files but in jquery code i get error.
I did ask this same question on
[http://forums.asp.net/t/1680184.aspx/1?Jquery+Error+Object+Doesn+t+support+this+method+or+property+](http://forums.asp.net/t/1680184.aspx/1?Jquery+Error+Object+Doesn+t+support+this+method+or+property+)
I have given the image for the error also..
please anyone can guide me where am i going wrong.
I somehow feel that i have issue due to the pattern i am writting url in global file.
Code:
```
<asp:Content ID="content1" runat="server" ContentPlaceHolderID="HeadContent">
<link href="../js/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.js" type="text/javascript"></script>
<script src='<%=ResolveClientUrl("~/js/fancybox/jquery.fancybox-1.3.4.js")%>' type="text/javascript"></script>
<script src='<%=ResolveClientUrl("~/js/fancybox/jquery.easing-1.3.pack.js")%>' type="text/javascript"></script>
<script src='<%=ResolveClientUrl("~/js/fancybox/jquery.mousewheel-3.0.4.pack.js")%>' type="text/javascript"></script>
<script type="text/javascript">
$.noConflict();
$(document).ready(function () {
$(".fancyYoutube").fancybox({
'transitionIn': 'elastic',
'transitionOut': 'fade',
'width': 680,
'height': 495,
'type': 'swf'
});
});
</script>
</asp:Content>
```
Error:

|
Jquery Error-Object Doesn't support this method or property
|
CC BY-SA 3.0
| null |
2011-05-15T09:17:08.950
|
2011-12-20T11:19:57.247
|
2011-05-15T12:42:32.177
| 447,356 | 317,500 |
[
"jquery",
"jquery-plugins",
"jquery-selectors"
] |
6,007,572 | 1 | 6,007,771 | null | 3 | 261 |
I have a GUI composend of a few JPanels. I want to use factory methods for the instantiation of the JPanels. Here a UML diagram showing what I want to do:

Simply put, the factory method needs to use methods from `JPanel` and `SimulatorSubscriber`, but if the `createPanel()` method returns a `JPanel`, `SimulatorFactory` wont be able to call the `setSimulator(Simulator)` method. Conversly, if it returns a `SimulatorSubscriber`, it wont be able to add the panel to the gui it is making.
My first idea was to use casts........i don't need to elaborate..
Secondly, I thought to do what I drew in the diagram.
Is this good/common practice, and are there alternatives? Maybe my use of the factory method is off too.
|
Is this good design: using a pure abstract class to facilitate the use of factory method
|
CC BY-SA 3.0
| null |
2011-05-15T09:28:03.960
|
2011-05-15T10:16:27.230
|
2011-05-15T09:38:41.020
| 21,234 | 754,300 |
[
"java",
"design-patterns",
"factory-pattern"
] |
6,007,822 | 1 | 6,027,601 | null | 3 | 2,814 |
what approach would you recommend for finding obstacles in a 2D image?
Here are some key points I came up with till now:
I doubt I can use object recognition based on "database of obstacles" search, since I don't know what might the obstruction look like.
I assume color recognition might be problematic if the path does not differ a lot from the object itself.
Possibly, adding one more camera and computing a 3D image (like a Kinect does) would work, but that would not run as smooth as I require.
To illustrate the problem; robot can ride either left or right side of the pavement. In the following picture, left side is the correct choice:

|
Finding path obstacles in a 2D image
|
CC BY-SA 3.0
| 0 |
2011-05-15T10:27:04.393
|
2011-05-17T07:28:30.787
|
2011-05-15T10:48:58.243
| 326,257 | 326,257 |
[
"opencv",
"robotics",
"image-recognition"
] |
6,008,400 | 1 | 6,008,465 | null | 0 | 313 |
currently ironing out a way to parse the data of a page: [http://www.foundationfinder.ch/](http://www.foundationfinder.ch/)
i love to do it in Perl: Well - i am just musing which is the best way to do the job.
Guess that i am in front of a nice learning curve. ;) This task will give me some nice Perl lessions. At the moment it goes abit over my head...;-)
So here is a sample-page:

... and as i thought i can find all 790 resultpages within a certain range between Id= 0 and Id= 100000 i thought, that i can go the way with a loop:
[http://www.foundationfinder.ch/ShowDetails.php?Id=11233&InterfaceLanguage=&Type=Html](http://www.foundationfinder.ch/ShowDetails.php?Id=11233&InterfaceLanguage=&Type=Html)
[http://www.foundationfinder.ch/ShowDetails.php?Id=927&InterfaceLanguage=1&Type=Html](http://www.foundationfinder.ch/ShowDetails.php?Id=927&InterfaceLanguage=1&Type=Html)
[http://www.foundationfinder.ch/ShowDetails.php?Id=949&InterfaceLanguage=1&Type=Html](http://www.foundationfinder.ch/ShowDetails.php?Id=949&InterfaceLanguage=1&Type=Html)
[http://www.foundationfinder.ch/ShowDetails.php?Id=20011&InterfaceLanguage=1&Type=Html](http://www.foundationfinder.ch/ShowDetails.php?Id=20011&InterfaceLanguage=1&Type=Html)
[http://www.foundationfinder.ch/ShowDetails.php?Id=10579&InterfaceLanguage=1&Type=Html](http://www.foundationfinder.ch/ShowDetails.php?Id=10579&InterfaceLanguage=1&Type=Html)
i thought i can go the Perl-Way but i am not very very sure: I was trying to use LWP::UserAgent on the same URLs [see below] with different query arguments, and i am wondering if LWP::UserAgent provides a way for us to loop through the query arguments? I am not sure that LWP::UserAgent has a method for us to do that. Well - i sometimes heard that it is easier to use Mechanize. But is it really easier!?
BTW; But if i am going the PHP way i could do it with Curl - couldnt i!?
Here is my approach: I tried to figure it out. And i digged deeper in the Manpages and Howtos. We can have a loop constructing the URLs and use Curl - repeatedly
As noted above: here we have some resultpages;
[http://www.foundationfinder.ch/ShowDetails.php?Id=11233&InterfaceLanguage=&Type=Html](http://www.foundationfinder.ch/ShowDetails.php?Id=11233&InterfaceLanguage=&Type=Html)
[http://www.foundationfinder.ch/ShowDetails.php?Id=927&InterfaceLanguage=1&Type=Html](http://www.foundationfinder.ch/ShowDetails.php?Id=927&InterfaceLanguage=1&Type=Html)
Alternatively we can add a request_prepare handler that computes and add the query
arguments before we send out the request.
Again: What is aimed: i want to parse the data and afterwards i want to store it in a local MySQL-database
should i define a extern_uid !?
and go like this:
```
for my $i (0..10000) {
$ua->get('http://www.foundationfinder.ch/ShowDetails.php?Id=', id => 21, extern_uid => $i);
# process reply
}
```
Well but now i get stuck- i need help - can i do the job like this!?
regards
zero
|
Perl::Mechanize: running a simple crawler with a loop [multiple queries]
|
CC BY-SA 3.0
| null |
2011-05-15T12:34:41.100
|
2011-05-15T12:56:28.417
|
2011-05-15T12:45:05.170
| 525,865 | 525,865 |
[
"mysql",
"perl",
"parsing",
"mechanize",
"lwp"
] |
6,008,675 | 1 | 6,008,815 | null | 1 | 2,927 |
I have a custom ViewController which allows selection of an image from a grid. The ViewController uses the AQGrid control and is really just a modified version of the samples shipped with AQGrid.
I'm trying to hook it up in InterfaceBuilder, but documentation on how to do this seems sparse. In standard Cocoa apparently I should create an IB plugin to use with IB, but I'm just looking for the quickest option really as there are a few of these custom ViewControllers which I need to hook up (including a rating control). I've also tried dragging the "Object" controller in IB to my tabpage, but it just gets added to the tree outside of the tabcontroller (see screenshot).

|
Using custom controls with Interface Builder
|
CC BY-SA 3.0
| 0 |
2011-05-15T13:28:33.577
|
2013-06-13T19:51:51.093
| null | null | 30,512 |
[
"iphone",
"cocoa-touch",
"ios",
"interface-builder"
] |
6,008,751 | 1 | 6,009,014 | null | 2 | 572 |
I have wrote a program that simulates memory allocation with first fit and best fit algorithms .
Now I want to associate my program with a drawing of set of boxes representing available memory segments


So it just redraws but resizes one box and colors it ... What is the easiest way to do so ?
I have a set of boxes with different sizes that will be drawn dynamically according to input when the user does some action one of the boxes will be resized and recolored and so on.
|
drawing boxes in java
|
CC BY-SA 3.0
| null |
2011-05-15T13:44:49.627
|
2011-05-15T23:54:30.797
|
2011-05-15T14:18:38.620
| 405,539 | 405,539 |
[
"java",
"user-interface"
] |
6,008,988 | 1 | 6,008,998 | null | 0 | 161 |
Here are the relevant parts of the code :
```
<div id="navmenu"></div>
```
The style for "navmenu" is :
```
#navmenu
{
word-spacing:5px;
padding: 5px 5px 5px 15px;
}
```
This is the code that adds the elements :
```
$(document).ready(function(){
$("#navmenu").append($("<a href=\"index.html\">foo</a>"));
$("#navmenu").append($("<a href=\"index.html\">bar</a>"));
$("#navmenu").append($("<a href=\"index.html\">baz</a>"));
});
```
This is what I get :

However, if I write those elements directly in html, like this :
```
<div id="navmenu">
<a href="index.html">foo</a>
<a href="index.html">bar</a>
<a href="index.html">baz</a>
</div>
```
I get this (what it's supposed to look like) :

I checked with "Inspect element" in Chrome, everything is the same. Any ideas why this doesn't work?
|
word-spacing doesn't seem to apply if I append elements with js (in a $(document).ready callback)
|
CC BY-SA 3.0
| null |
2011-05-15T14:26:37.673
|
2011-05-15T14:40:19.710
| null | null | 190,140 |
[
"javascript",
"jquery",
"html",
"css"
] |
6,009,181 | 1 | 6,025,073 | null | 1 | 744 |

```
<StackPanel Orientation="Horizontal">
<HyperlinkButton Content="Menue Item 1" FontSize="24" />
<HyperlinkButton Content="Menue Item 2" FontSize="24" />
</StackPanel>
```
In Silverlight, How can I change its border color on selected item.
|
Change Hyperlink behaviour in silverlight
|
CC BY-SA 3.0
| null |
2011-05-15T15:00:44.903
|
2011-05-17T00:44:51.267
| null | null | 389,200 |
[
"silverlight",
"hyperlink"
] |
6,009,218 | 1 | 6,009,730 | null | 2 | 1,148 |
I need somehow to do this :

I tried playing with Relative Layout, I placed top imageview and bottom button but how do I place my gridview in the center? BUT BETWEEN top image and bottom button?
|
Center a View in Android between bottom and top views
|
CC BY-SA 3.0
| null |
2011-05-15T15:07:37.993
|
2014-07-23T12:34:55.033
|
2017-02-08T14:32:12.463
| -1 | 383,471 |
[
"android",
"gridview",
"view"
] |
6,009,369 | 1 | null | null | 0 | 644 |
I'm creating a UIViewController with UIImageView, 2xUIWebView.

I'm trying to hide UINavigationBar and UIToolBar with UITapGestureRecognizer, It's no problem, but when i added in ViewController UIWebView it stop works. In "UIWebView youtube player" - I Have code which plays video from youtube. When I'm touching in "white area" or UIImageView- gesture recognizer works, but when I'm touching UIWebView - nothing happens. Help me please fix it. Thank you
|
Hide navigationBar and toolbar in view using UIGestureRecognizer, which contains UIWebView and UIImage
|
CC BY-SA 3.0
| 0 |
2011-05-15T15:35:35.447
|
2012-01-05T15:56:18.727
| null | null | 607,178 |
[
"objective-c",
"ios",
"uiwebview",
"uigesturerecognizer"
] |
6,009,458 | 1 | 6,011,265 | null | 5 | 6,460 |
I'm doing some build automation and would like to run the Delphi 7 IDE from an Application that I'm writing using Delphi XE.
My Delphi 7 IDE is at:
```
'C:\Program Files\Borland\Delphi7\Bin\delphi32.exe'
```
yet doing:
```
ShellExecute( Handle, 'Open', 'C:\Program Files\Borland\Delphi7\Bin\delphi32.exe', '', '', sw_ShowNormal );
```
eventually gets into the Delphi 7 IDE but only after lots of missing package errors.
Doing:
```
ShellExecute( Handle, 'Open', 'C:\windows\notepad.exe', '', '', sw_ShowNormal );
```
works file opening Notepad.
I also have a batch file called 'Delphi7IDE.bat' which opens Delphi 7 when I click the batch file, but doing:
```
ShellExecute( Handle, 'Open', 'C:\sys\batch\Delphi7IDE.bat', '', '', sw_ShowNormal );
```
produces the same errors as above.
I've tried using the directoy as specified in my Delphi 7 menu shortcut (i.e calling:
```
ShellExecute( Handle, 'Open', 'C:\Program Files\Borland\Delphi7\Bin\delphi32.exe', '', 'C:\Program Files\Borland\Delphi7\Projects\', sw_ShowNormal );"
```
but this gives the same error (and this is to be expected because the batch file example above has no fixed directory and runs fine when clicked).
There are multiple errors, but an exampler of one is 
What am I doing wrong please?
|
How can I launch Delphi 7 from an EXE file written in Delphi XE?
|
CC BY-SA 3.0
| 0 |
2011-05-15T15:49:42.430
|
2019-07-30T11:36:58.630
|
2011-05-15T20:43:07.360
| 47,012 | 47,012 |
[
"delphi",
"shellexecute"
] |
6,009,500 | 1 | null | null | 0 | 1,336 |
if I remove the form from the DOM in beforeSubmit or beforeSend (doesn't matter which one), I find that in both IE and FF, http request is never emitted. form.submit() line 296 in jquery.form.js is called, but no http request is emitted. It works correctly in chrome though.
Sample code:
```
$('#form1').ajaxForm(
{
beforeSubmit: function(array, matched_set, options)
{
// this line removes #form1 from the DOM.
// it is still available to jquery form plugin by means of closure
// line 296 form.submit() in jquery.form.js is hit,
// but IE and FF never emit http request. If I remove this line, it works.
$('#jqm_window').html(waiting_page);
},
```
chrome:

firefox:

http trace is captured in fiddler when using chrome (but not with other browsers):

|
JQuery ajaxForm: form is not submitted if it is removed from DOM in beforeSubmit
|
CC BY-SA 3.0
| null |
2011-05-15T15:56:58.667
|
2013-09-10T09:37:08.557
|
2011-05-15T19:21:54.997
| 21,234 | 147,530 |
[
"jquery",
"ajaxform"
] |
6,009,995 | 1 | 6,010,183 | null | 1 | 1,439 |
I want to migrate from oracle to MySql. I am using MySql Migration tools 5.0.
Something went wrong in Migration wizard.

Error message is
```
Connecting to source database and retrieve schemata names.
Initializing JDBC driver ...
Driver class Oracle Thin JDBC Driver using Service
Opening connection ...
Connection jdbc:oracle:thin:system/**********@//127.0.0.1:1521/OracleServiceXE
The list of schema names could not be retrieved (error: 0).
ReverseEngineeringOracle.getSchemata :Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
The Connection descriptor used by the client was:
//127.0.0.1:1521/OracleServiceXE
Details:
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:280)
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:361)
oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:595)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.mysql.grt.modules.ReverseEngineeringGeneric.establishConnection(ReverseEngineeringGeneric.java:141)
com.mysql.grt.modules.ReverseEngineeringOracle.getSchemata(ReverseEngineeringOracle.java:43)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.mysql.grt.Grt.callModuleFunction(Unknown Source)
```
Both SQL servers are running on localhost.
How can I solve these errors ?
|
Migration from Oracle to MySql
|
CC BY-SA 3.0
| null |
2011-05-15T17:22:17.300
|
2011-05-16T06:27:11.757
|
2011-05-15T17:27:07.780
| 635,608 | 700,387 |
[
"mysql",
"oracle",
"database-migration"
] |
6,010,008 | 1 | 6,010,037 | null | 0 | 294 |
Could someone show me how to change the Relationship Diagram below into class diagrams please

|
LINQ to SQL Class Diagrams
|
CC BY-SA 3.0
| null |
2011-05-15T17:25:10.893
|
2011-05-15T17:30:27.750
|
2011-05-15T17:26:06.773
| 74,757 | 754,680 |
[
"c#",
".net",
"sql",
"windows",
"linq"
] |
6,010,006 | 1 | 6,010,123 | null | 3 | 12,077 |
I am developing my first HTML5 / CSS3 website and I want to do all I can correctly and with well methods and being usable too.
I have to reproduce the next search input in this website:

What I don't know how to do it is to implement the background of the image, or if the image needs to be a `<input type="image" />`.
At the moment, what I've is the next:
```
#header-search input {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border:1px solid #8e8e8e;
background-color:#f5f5f5;
height:16px;
padding:4px;
color:#4a4a4a
}
```
This creates an input with the same radius and all the area is input text. There is no space for the magnifying glass and if it was a background the image can not be clicked. In this point, what is best? Let the input only triggered by or... how will you do it?
Anyway you will do it, please tell me.
Thank you in advance!
|
Doing a input type="text" with CSS3 and fixed image on the background
|
CC BY-SA 3.0
| 0 |
2011-05-15T17:25:07.820
|
2011-05-16T12:40:08.380
| null | null | 569,908 |
[
"css"
] |
6,010,187 | 1 | 6,010,270 | null | 7 | 44,623 |
Here's my XAML and how it looks like:
```
<Window x:Class="GameLenseWpf.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="450" Width="350" MinHeight="450" MinWidth="350">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.15*" />
<RowDefinition />
</Grid.RowDefinitions>
<Image Grid.Row="0" Stretch="Fill" Source="Image/topBarBg.png" />
<StackPanel Orientation="Horizontal" Grid.Row="0">
<TextBlock Text="Platform"
Foreground="White"
FontFamily="Georgia"
FontSize="15"
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<ComboBox x:Name="cmbPlatform"
Margin="10"
FontFamily="Georgia"
FontSize="15"
MinHeight="30"
MinWidth="140"
VerticalAlignment="Center"
VerticalContentAlignment="Center" SelectionChanged="cmbPlatform_SelectionChanged">
<ComboBoxItem>All Platforms</ComboBoxItem>
<ComboBoxItem>Playstation 3</ComboBoxItem>
<ComboBoxItem>XBox 360</ComboBoxItem>
<ComboBoxItem>Wii</ComboBoxItem>
<ComboBoxItem>PSP</ComboBoxItem>
<ComboBoxItem>DS</ComboBoxItem>
</ComboBox>
</StackPanel>
<Image x:Name="imgAbout" Grid.Row="0" Source="Image/about.png"
Height="16" HorizontalAlignment="Right"
VerticalAlignment="Center"
Margin="0 0 10 0" />
<ListBox Grid.Row="1" x:Name="lstGames" Background="#343434" Padding="5"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
HorizontalContentAlignment="Stretch">
<ListBox.Resources>
<Style TargetType="ListBoxItem">
<Style.Resources>
<!-- SelectedItem with focus -->
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
Color="Transparent" />
<!-- SelectedItem without focus -->
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}"
Color="Transparent" />
<!-- SelectedItem text foreground -->
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}"
Color="Black" />
</Style.Resources>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
</Style>
</ListBox.Resources>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Height="120" Margin="0 10" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<Border BorderBrush="#202020" BorderThickness="5" CornerRadius="4" Panel.ZIndex="0">
<Canvas Grid.Row="0" Grid.Column="0" >
<Image Source="{Binding ImageUrl}" Canvas.Left="0" Canvas.Top="0" Stretch="UniformToFill"/>
<Image Source="Image/youtube.png" Canvas.Bottom="0" Canvas.Right="0" Height="20" Width="20" />
</Canvas>
</Border>
<StackPanel Grid.Row="0" Grid.Column="1" Margin="12 0 0 0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Title:" FontFamily="Arial" Foreground="White"/>
<TextBlock Text="{Binding Title}" FontFamily="Arial" Foreground="White" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Release Date:" FontFamily="Arial" Foreground="White" />
<TextBlock Text="{Binding ReleaseDate}" FontFamily="Arial" Foreground="White" />
</StackPanel>
<TextBlock Text="Synopsis" FontFamily="Arial" Foreground="White" />
<TextBox Background="#454545" Foreground="White" TextWrapping="Wrap" Text="{Binding Synopsis}" MaxHeight="73" />
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Window>
```

I just want to games image to stretch to fill the canvas bounds, which is inside of the rounder border.
Why is it not doing this?
|
WPF Image stretch to fill doesn't stretch to the bounds of it's parents
|
CC BY-SA 3.0
| 0 |
2011-05-15T18:00:20.990
|
2011-05-15T18:15:49.257
| null | null | 699,978 |
[
"wpf",
"image",
"xaml"
] |
6,010,225 | 1 | 6,021,367 | null | 0 | 1,114 |
I'm a GWT refugee, trying to figure out how to do various Ajax-ish things in Wicket.
I have two divs. I'd like to make the first div's `max-height` dependent on the height of the second div, with a "more/less" link so that the user can expand the first div.
Example:

The content of both divs is variable, and since div2 has wrapped text in a proportional font, I can't really predict its height until rendered in the browser.
In GWT I accomplished this by adding content to the div1 a line at a time, and if it exceeded the height of div2 (which already had its content rendered), I simply removed the line. Since GWT runs on the client, this is fairly straightforward.
What's the best way to do this in Wicket? I'm expecting to need a little Javascript, but if there is a component that already does this (or makes it easier) I'd be very happy to use it.
|
wicket: how to make div height dependent on another div
|
CC BY-SA 3.0
| null |
2011-05-15T18:08:05.477
|
2011-05-16T18:16:08.453
|
2011-05-16T15:46:20.320
| 93,995 | 93,995 |
[
"javascript",
"css",
"ajax",
"wicket"
] |
6,010,231 | 1 | 6,010,350 | null | 3 | 8,722 |
as you can see in following screen shot of my program, the screen includes several frames and each frame has two image views and a text view.
I want another activity starts, when user clicks on a frame (or imageView or textView).
In code, I have written:
```
final FrameLayout frame01 = (FrameLayout) findViewById(R.id.frame01);
```
but when I add following code, program crashes!
```
frame01.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(Main.this, "Frame01 Selected", Toast.LENGTH_SHORT).show();
}
});
```
what should I do?
Thanks

|
Android, Configuring click listener for frame layout
|
CC BY-SA 3.0
| null |
2011-05-15T18:09:04.627
|
2011-05-15T18:29:06.553
|
2011-05-15T18:27:04.663
| null | 513,413 |
[
"android",
"android-layout"
] |
6,010,244 | 1 | 6,010,306 | null | 15 | 19,164 |
Here is a image from the ANTS memory profiler. It seens that there are a lot of objects hold in memory. How can I find what I am doing wrong?

```
**UPDATE**
```
Here is my repository classes:
```
public class Repository<T> : IRepository<T> where T : class, IDataEntity
{
ObjectContext _context;
IObjectSet<T> _objectSet;
readonly string _entitySetName;
readonly string[] _keyNames;
private ObjectContext Context
{
get
{
if (_context == null)
{
_context = GetCurrentUnitOfWork<EFUnitOfWork>().Context;
}
return _context;
}
}
private IObjectSet<T> ObjectSet
{
get
{
if (_objectSet == null)
{
_objectSet = this.Context.CreateObjectSet<T>();
}
return _objectSet;
}
}
public TUnitOfWork GetCurrentUnitOfWork<TUnitOfWork>() where TUnitOfWork : IUnitOfWork
{
return (TUnitOfWork)UnitOfWork.Current;
}
public virtual IEnumerable<T> GetQuery()
{
return ObjectSet;
}
public virtual IEnumerable<T> GetQuery(params Expression<Func<T, object>>[] includes)
{
return ObjectSet.IncludeMultiple(includes);
}
public virtual IEnumerable<T> GetQuery(
IEnumerable<Expression<Func<T, bool>>> filters,
Func<IQueryable<T>, IOrderedQueryable<T>> orderBy,
IEnumerable<Expression<Func<T, object>>> includes)
{
IQueryable<T> _query = ObjectSet;
if (filters != null)
{
foreach (var filter in filters)
{
_query = _query.Where(filter);
}
}
if (includes != null && includes.Count() > 0)
{
_query = _query.IncludeMultiple(includes.ToArray());
}
if (orderBy != null)
{
_query = orderBy(_query);
}
return _query;
}
public virtual IPaged<T> GetQuery(
IEnumerable<Expression<Func<T, bool>>> filters,
Func<IQueryable<T>, IOrderedQueryable<T>> orderBy,
int pageNumber, int pageSize,
IEnumerable<Expression<Func<T, object>>> includes)
{
IQueryable<T> _query = ObjectSet;
if (filters != null)
{
foreach (var filter in filters)
{
_query = _query.Where(filter);
}
}
if (orderBy != null)
{
_query = orderBy(_query);
}
IPaged<T> page = new Paged<T>(_query, pageNumber, pageSize, includes);
return page;
}
public virtual void Insert(T entity)
{
this.ObjectSet.AddObject(entity);
}
public virtual void Delete(T entity)
{
if (entity is ISoftDeletable)
{
((ISoftDeletable)entity).IsDeleted = true;
//Update(entity);
}
else
{
this.ObjectSet.DeleteObject(entity);
}
}
public virtual void Attach(T entity)
{
ObjectStateEntry entry = null;
if (this.Context.ObjectStateManager.TryGetObjectStateEntry(entity, out entry) == false)
{
this.ObjectSet.Attach(entity);
}
}
public virtual void Detach(T entity)
{
ObjectStateEntry entry = null;
if (this.Context.ObjectStateManager.TryGetObjectStateEntry(entity, out entry) == true)
{
this.ObjectSet.Detach(entity);
}
}
}
```
Now, if I have class A that holds records from table A, I also create class:
```
public class ARepository:BaseRepository<A> {
// Implementation of A's queries and specific db operations
}
```
Here is my EFUnitOfWork class:
```
public class EFUnitOfWork : IUnitOfWork, IDisposable
{
public ObjectContext Context { get; private set; }
public EFUnitOfWork(ObjectContext context)
{
Context = context;
context.ContextOptions.LazyLoadingEnabled = true;
}
public void Commit()
{
Context.SaveChanges();
}
public void Dispose()
{
if (Context != null)
{
Context.Dispose();
}
GC.SuppressFinalize(this);
}
}
```
And UnitOfWork class:
```
public static class UnitOfWork
{
private const string HTTPCONTEXTKEY = "MyProj.Domain.Business.Repository.HttpContext.Key";
private static IUnitOfWorkFactory _unitOfWorkFactory;
private static readonly Hashtable _threads = new Hashtable();
public static void Commit()
{
IUnitOfWork unitOfWork = GetUnitOfWork();
if (unitOfWork != null)
{
unitOfWork.Commit();
}
}
public static IUnitOfWork Current
{
get
{
IUnitOfWork unitOfWork = GetUnitOfWork();
if (unitOfWork == null)
{
_unitOfWorkFactory = ObjectFactory.GetInstance<IUnitOfWorkFactory>();
unitOfWork = _unitOfWorkFactory.Create();
SaveUnitOfWork(unitOfWork);
}
return unitOfWork;
}
}
private static IUnitOfWork GetUnitOfWork()
{
if (HttpContext.Current != null)
{
if (HttpContext.Current.Items.Contains(HTTPCONTEXTKEY))
{
return (IUnitOfWork)HttpContext.Current.Items[HTTPCONTEXTKEY];
}
return null;
}
else
{
Thread thread = Thread.CurrentThread;
if (string.IsNullOrEmpty(thread.Name))
{
thread.Name = Guid.NewGuid().ToString();
return null;
}
else
{
lock (_threads.SyncRoot)
{
return (IUnitOfWork)_threads[Thread.CurrentThread.Name];
}
}
}
}
private static void SaveUnitOfWork(IUnitOfWork unitOfWork)
{
if (HttpContext.Current != null)
{
HttpContext.Current.Items[HTTPCONTEXTKEY] = unitOfWork;
}
else
{
lock(_threads.SyncRoot)
{
_threads[Thread.CurrentThread.Name] = unitOfWork;
}
}
}
}
```
Here is how I use this:
```
public class TaskPriceRepository : BaseRepository<TaskPrice>
{
public void Set(TaskPrice entity)
{
TaskPrice taskPrice = GetQuery().SingleOrDefault(x => x.TaskId == entity.TaskId);
if (taskPrice != null)
{
CommonUtils.CopyObject<TaskPrice>(entity, ref taskPrice);
}
else
{
this.Insert(entity);
}
}
}
public class BranchRepository : BaseRepository<Branch>
{
public IList<Branch> GetBranchesList(Guid companyId, long? branchId, string branchName)
{
return Repository.GetQuery().
Where(b => companyId == b.CompanyId).
Where(b => b.IsDeleted == false).
Where(b => !branchId.HasValue || b.BranchId.Equals(branchId.Value)).
Where(b => branchName == null || b.BranchName.Contains(branchName)).
ToList();
}
}
[WebMethod]
public void SetTaskPrice(TaskPriceDTO taskPrice)
{
TaskPrice tp = taskPrice.ToEntity();
TaskPriceRepository rep = new TaskPriceRepository();
rep.Set(tp);
UnitOfWork.Commit();
}
[WebMethod]
public IList<Branch> GetBranchesList()
{
BranchRepository rep = new BranchRepository();
return rep.GetBranchesList(m_User.UserCompany.CompanyId, null, null).ToList();
}
```
I hope this is enough info to help me solving the problem. Thanks.
`UPDATE 2`
There is also UnitOfWorkFactory that initializes UnitOfWork:
```
public class UnitOfWorkFactory : IUnitOfWorkFactory
{
private static Func<ObjectContext> _objectContextDelegate;
private static readonly Object _lockObject = new object();
public static void SetObjectContext(Func<ObjectContext> objectContextDelegate)
{
_objectContextDelegate = objectContextDelegate;
}
public IUnitOfWork Create()
{
ObjectContext context;
lock (_lockObject)
{
context = _objectContextDelegate();
}
return new EFUnitOfWork(context);
}
}
```
In order to use this, in the application startup I use structuremap:
```
ObjectFactory.Initialize(x =>
{
x.For<IUnitOfWorkFactory>().Use<UnitOfWorkFactory>();
x.For(typeof(IRepository<>)).Use(typeof(Repository<>));
});
```
|
Entity framework uses a lot of memory
|
CC BY-SA 3.0
| 0 |
2011-05-15T18:11:24.833
|
2019-06-26T17:35:14.380
|
2011-10-08T00:30:20.740
| 732,945 | 289,246 |
[
"c#",
".net",
"performance",
"entity-framework",
"linq-to-entities"
] |
6,010,682 | 1 | null | null | 1 | 1,888 |

This is my first table it has 3 columns and all are entered by the user. No complication and it works fine. But there is another table and it is dependent on this table 3rd column. i.e. on room number column. Please ignore the names convention as i have not really followed any naming conventions.

This is my second table and as you can see it has its last column as room number. please ignore name convention. this room number column is foreign key it is dependent on the 1st table entry or delete
Now I have created a schema for the 2nd table. which declares that it has 5 columns and the last one is the foreign key.
```
private static final String DATABASE_CREATE_NOTES_ID_TABLE =
("CREATE TABLE "+ DATABASE_NOTES_TABLE +" ("+ KEY_ROWID +" INTEGER PRIMARY KEY AUTOINCREMENT, "+
KEY_TIME + " TEXT, "+
KEY_NOTES + " TEXT, "+
KEY_DATE + " TEXT, " +
KEY_ROOMS + " INTEGER , FOREIGN KEY (" + KEY_ROOMS + ") REFERENCES " + DATABASE_PATIENT_TABLE +" (" +KEY_ROOM_NUMBER+ "));");
```
Tables as you see is getting created successfully.
Now I have to write a TRIGGER statement, based on that when I delete a room number from the first table, then all the rows in the 2nd table which has the same room number should be deleted. And If I add a new room number in the first table then it should be added in the 2nd table.
The trigger statement for insert of new room number that I have written is as follows
```
db.execSQL("CREATE TRIGGER fk_notesTable_roomNumber " +
" BEFORE INSERT "+
" ON "+DATABASE_NOTES_TABLE+
" FOR EACH ROW BEGIN"+
" SELECT CASE WHEN ((SELECT "+KEY_ROOM_NUMBER+" FROM "+DATABASE_PATIENT_TABLE+" WHERE "+KEY_ROOM_NUMBER+"=new."+KEY_ROOMS +" ) IS NULL)"+
" THEN RAISE (ABORT,'Foreign Key Violation') END;"+
" END;");
```
This piece of code I have added in the onCreate() of my database file. What else do I do ? Nothing is happening here.
Please kindly point me out where I am making mistake.
Thanks in tons,
Shaista
|
Android Sqlite trigger operation go through
|
CC BY-SA 3.0
| null |
2011-05-15T19:29:03.430
|
2011-05-17T07:51:39.017
|
2011-05-15T19:37:01.310
| 628,090 | 628,090 |
[
"android",
"database",
"sqlite",
"triggers"
] |
6,010,823 | 1 | null | null | 1 | 737 |
I want some basic information for cities to be available on a Google map. The idea is that when people open the map, they see the information already opened, instead of having to click on every marker. Yet I can not figure out if this is something that is possible. I've gone through all samples and have not seen this being employed. Does such an option exist? I attach a visual sample of my intentions.

|
Google Maps: show opened infoboxes/popups
|
CC BY-SA 3.0
| null |
2011-05-15T19:53:45.230
|
2011-05-15T23:29:10.370
| null | null | null |
[
"google-maps"
] |
6,010,858 | 1 | null | null | 0 | 224 |
I'm putting together [a quick webpage](http://roughgiraffed.com/spyboy/) for my friends band with multiple embeded youtube iframes that I want to be hidden at first (with jquery).
The issue is that often (on chrome/windows at least) the iframes will appear in the top left corner as though they were positioned absolutely to the top left. In the javascript console I can then type `$("*").hide();` and everything will disappear but not the iframes.

The problem seems to be related to when I hide the iframes' containing divs (`$(".details").css("display","none");`).
Here is my code. Click the link above for the full working example.
```
$(document).ready(function() {
$(".details").css("display","none");
$("a.date").click(function() {
$(this).parent().children("div").toggle('slow');
$(document.body).animate({
'scrollTop': $(this).offset().top
}, 2000);
});
});
```
Any advice/help would be greatly appreciated.
|
Iframe sometimes appears and will not dissapear
|
CC BY-SA 3.0
| null |
2011-05-15T19:58:12.253
|
2012-05-22T09:52:17.040
|
2011-05-15T20:22:01.230
| 363,701 | 363,701 |
[
"jquery",
"html",
"iframe",
"onload"
] |
6,010,925 | 1 | 6,010,953 | null | 2 | 2,622 |
I have a game application that I will be running in a web browser using the tag.
This program has a JFrame, which displays a couple of tabs allowing navigation throughout the program.
When I run the program locally it will work fine, displaying the JFrame and working in entirety.
However when I upload it to the host and visit it's link the JFrame will not display..
I have searched about 3 hours and simply must not be able to provide the correct keywords for my siutation.
All I can get in results is the JFrame not appearing at all, locally or web app.
This is how the client looks when I run it locally from the same .jar:

This is how the client looks in a web browser (tried IE, FF and Chrome):

Applet.java:
```
public class Client extends RSApplet {
public static void main(String args[]) {
try {
instance = new Client();
new UserInterface(args);
} catch(Exception e) {
e.printStackTrace();
}
}
}
```
GUI.java
```
public class GUI extends Applet implements ActionListener, WindowListener, FocusListener {
public UserInterface(String args[]) {
try {
/* ------------------------------------------------------------------------ */
/* Metal */
/* UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); */
/* System Look */
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
/* ------------------------------------------------------------------------ */
initGUI();
} catch (Exception ex) {
ex.printStackTrace();
}
}
public void initGUI() {
try {
JFrame.setDefaultLookAndFeelDecorated(true);
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
frame = new JFrame(frameTitle);
frame.setLayout(new BorderLayout());
Image icon = Toolkit.getDefaultToolkit().getImage(iconDir);
frame.setIconImage(icon);
gamePanel = new JPanel();
gamePanel.setLayout(new BorderLayout());
gamePanel.add(this);
gamePanel.setPreferredSize(new Dimension(850, 600));
frame.getContentPane().add(gamePanel, BorderLayout.CENTER);
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
if (loggedIn == false) {
System.exit(0);
} else {
if (showMessage("Are you sure you want to close the game?") == true) {
System.exit(0);
} else return;
}
}
});
initMenuBar();
frame.pack();
frame.setVisible(true);
frame.setResizable(true);
} catch (Exception e) {
e.printStackTrace();
}
}
public void initMenuBar() {
menuBar = new JMenuBar();
/** File **/
fileMenu = new JMenu("File");
String[] fileMenuItems = {
"Quit"
};
menuBar.add(fileMenu);
/** Quick Links **/
linksMenu = new JMenu("Quick Links");
String[] linksMenuItems = {
"Home", "News", "Donate"
};
menuBar.add(linksMenu);
frame.getContentPane().add(menuBar, BorderLayout.NORTH);
}
}
```
|
Why is my JFrame not appearing in a web based Java app?
|
CC BY-SA 3.0
| null |
2011-05-15T20:09:04.877
|
2011-05-16T07:25:01.370
|
2011-05-16T07:25:01.370
| 714,968 | 754,806 |
[
"java",
"swing",
"applet",
"jframe"
] |
6,011,104 | 1 | 6,012,695 | null | 2 | 3,161 |
How can I add a "mini-map" in my `UITableViewController`?
I would like to use the same "design/layout" as with Maps app. Please see:

|
"mini-map" in UITableView
|
CC BY-SA 3.0
| 0 |
2011-05-15T20:40:59.867
|
2014-01-29T10:21:46.980
|
2012-11-29T10:14:21.063
| 406,677 | 406,677 |
[
"iphone",
"ios",
"ios4",
"mapkit"
] |
6,011,121 | 1 | 6,011,143 | null | 0 | 364 |
I apologize in advance as this is one of those "how does this work" type questions. I am a newbie to GWT MVP and I am trying to create a project similar to this one here:

where basically I have a menu of widgets/components that I can drag and drop onto a panel and doing so changes the properties shown in the Property disclosurepanel.
I have been reading about the official GWT MVP framework and they its described it seems like it expects each application state to represented by a whole new page (a View with an associated Place).
I am confused as to how this would work this type of application. That is, an application that has 1 basic screen that never entirely changes (i.e. user never navigates to a whole new screen) with sections that need to communicate to each other (i.e. dropping a widget loads a different set of properties).
I am sure I am misunderstanding something about MVP so if someone can just offer some advice on how to wrap my brain around this that would be great.
|
Using GWT MVP on a single screen application
|
CC BY-SA 3.0
| null |
2011-05-15T20:43:19.960
|
2011-11-26T23:42:02.107
|
2011-11-26T23:42:02.107
| 234,976 | 754,838 |
[
"gwt",
"mvp"
] |
6,011,253 | 1 | 6,013,022 | null | 1 | 192 |
I just created a Play button and flash displays it in a very weird manner...I used different triangles with different formats and resolutions, it is always the same:

Does anyone have an idea why there is this "edge" in the play button?
The "edge" is not visible in the Flash SDK but I'm seeing it in the browser.
The image for the play button is ok - there is no edge in the pic.
|
flash as3 displays play button with a "cut out"...please help!
|
CC BY-SA 3.0
| 0 |
2011-05-15T21:08:02.127
|
2011-05-16T03:56:33.497
|
2011-05-15T23:56:15.177
| 23,897 | 704,262 |
[
"flash",
"actionscript-3"
] |
6,011,370 | 1 | 6,011,421 | null | 0 | 1,177 |
Beginner question here!
look at picture,
I want the butten-edittext-button to fill the width of the screen.
The space to type text is to small.
Any ides?
(been searching and testing for 3 hour)

here is my xml
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical">
<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/examplegallery"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<RelativeLayout
android:id="@+id/InnerRelativeLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<Button
android:id="@+id/btnNewPen"
android:layout_toLeftOf="@+id/edittextaddtext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pen"
/>
<EditText
android:id="@+id/edittextaddtext"
android:layout_width="wrap_content"
android:layout_toLeftOf="@+id/btnsave"
android:layout_height="wrap_content"
android:singleLine="true"
android:text=""
/>
<Button
android:id="@+id/btnsave"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="save"
/>
</RelativeLayout>
</RelativeLayout>
```
|
android Why is my RelativeLayout not working
|
CC BY-SA 3.0
| 0 |
2011-05-15T21:27:08.497
|
2011-05-15T21:39:54.377
| null | null | 538,837 |
[
"android",
"xml",
"layout"
] |
6,011,786 | 1 | 6,039,353 | null | 89 | 89,016 |
I'm developer. I need to implement design shown below. I already have functional app but wonder how to even approach this? Particulary, I'm interested in how to show Number of "New" items under tabs. What I KNOW how to do - is create new icons with red dots and just display them when new stuff available.
But I have no idea how to make those round circles float on top of title AND show number inside. Does anybody have suggestion on what too look for? Samples? Directions?
Second question about separating activities. Should I make control to combine buttons like this and just inflate it on activities? Otherwise I may create tabbed activity but I'm not sure if it's possible to style it to make it look like this.

|
Add new item count to icon on button - Android
|
CC BY-SA 3.0
| 0 |
2011-05-15T22:53:43.897
|
2019-07-28T10:24:39.617
| null | null | 509,600 |
[
"android",
"android-layout"
] |
6,011,807 | 1 | 6,012,058 | null | 13 | 9,059 |
I'm trying to display photos as markers on Google Maps. This is no problem by redefining the marker as an image, but I want to put some sort of border or shadow to make them stand out better. Something like the Google photos would be best, but I guess this is too complicated, if at all possible. A simple 1px solid border would do fine. One option is to actually change the image, but this is not an option. Also, the images are different sizes so I can not put a black image as the shadow (1px larger than the original).
Here is the idea:
CURRENT:

LOOKING FOR:

EVEN COOLER:

IDEAL WORLD:

Is this possible?
|
Google Maps: Border on Markers
|
CC BY-SA 3.0
| 0 |
2011-05-15T22:57:39.427
|
2018-02-05T13:01:56.540
| null | null | null |
[
"google-maps",
"google-maps-markers"
] |
6,011,879 | 1 | 6,076,810 | null | 1 | 165 |
A little web design dilemma: I have a form with a lot of options, mainly radio buttons but not only.
I want the form to open up gradually, meaning at the beginning only two radio buttons are visible, and after the user picks one, more options appear under the chosen radio button. If the user then switches the pick, the page updates and shows the options under the new pick.
This happens on several levels, say 4 or 5 levels, and at the end there is a submit button that submits only certain inputs according to the branches the user chose. Also some of the branches have identical components even though the initial choice was different.
These are the options I could think of:
1. Build the complete form in the html body and use jquery to hide and show them according to the choices of the user. This means I have to write sections that repeat themselves twice.
2. Write nothing in the body, and append new elements when the user makes certain choices. This means the JavaScript is more complicated, because I have to make sure nothing appends twice.
3. Write an HTML skeleton of the form, and use append to fill it. Then use jquery to show and hide elements. This has none of the disadvantages but seems a bit unaesthetic.
Which one should I pick? Any better ideas?

|
Gradually opening html form
|
CC BY-SA 3.0
| null |
2011-05-15T23:10:31.653
|
2011-05-20T19:38:01.450
| null | null | 378,594 |
[
"javascript",
"jquery",
"html",
"forms"
] |
6,012,018 | 1 | 6,012,095 | null | 1 | 618 |
I would like to know if it's possible to add 2 or more numbers from within a textview, the best example i could think of is the stock android calculator. i have attached pictures of my app the first picture is where the app works perfect


i would also like my app to do this (by adding 25+25 OR 25-5
i get a foreclose when i initiate the operation by clicking calculate.
could anyone please help me with this?? i have searched everywhere for the answer W/O any luck.
thanks
|
Adding, subtracting numbers in a textview
|
CC BY-SA 3.0
| null |
2011-05-15T23:42:05.207
|
2011-12-17T06:08:07.247
|
2011-12-17T06:08:07.247
| 555,665 | 555,665 |
[
"java",
"android"
] |
6,012,030 | 1 | null | null | 20 | 21,999 |
I have added libxml2 to my Xcode 4 project following [this guide](http://cmar.me/2011/04/20/adding-libxml2-to-an-xcode-4-project/).
But it's not working. Xcode gives me error saying it no such libxml2 directory. What am I doing wrong? Here's the screenshots of the target settings of my project:


Thanks.
|
Adding libxml2 in XCode
|
CC BY-SA 3.0
| 0 |
2011-05-15T23:46:07.910
|
2016-12-08T04:59:26.303
|
2011-09-05T01:23:43.220
| 111,783 | 635,064 |
[
"objective-c",
"xcode",
"cocoa-touch",
"libxml2",
"ios-frameworks"
] |
6,012,033 | 1 | 6,226,828 | null | 3 | 2,734 |
I'm trying to convert images to graphs in Matlab.
The process is as follwing:
1. Taking an RGB image
2. Finding the axes and create the appropriate pixel-to-(x, y)-coordinates in graph
3. Convert the image to BW with some customizable im2bw , and
4. [That's the tricky part] Trying to come out with a line matching for the white pixels in the image.
I've been trying some snake and some grow-as-you-go algorithms to detect the graph from the white pixels in the BW image, but it seems weird that I can find no ready made Matlab algorithm which match all the white pixels in the BW image to an equation. Any help or ideas will be much appreciated.
[Edit] Here's an example for the BW image from the graph extracted:

|
Matlab fit graph to bw image
|
CC BY-SA 3.0
| null |
2011-05-15T23:46:18.827
|
2011-06-03T11:59:16.077
|
2011-05-17T09:25:17.810
| 662,770 | 662,770 |
[
"matlab",
"image-processing"
] |
6,012,180 | 1 | 6,012,266 | null | 22 | 29,880 |
So in Visual Studio, when I go to add a controller, I get this dialog:

I was curious what Visual Studio would create if I chose "Controller with read/write actions and views, using Entity Framework", as I'm using EF.
So I set my Model class to a view model created, chose Razor for my views, but I don't know what Data context class is? The only thing in the dropdown is my view model I created.
|
Adding a controller with read/write actions and views, using Entity Framework - what is "Data Context class"?
|
CC BY-SA 3.0
| 0 |
2011-05-16T00:14:55.903
|
2012-01-23T20:07:04.507
| null | null | 295,302 |
[
"c#",
"asp.net",
"asp.net-mvc",
"entity-framework",
"asp.net-mvc-3"
] |
6,012,499 | 1 | null | null | 1 | 419 |
Does any one know good resource site that outlines how to construct user signature with use of PHP and GD library? Not that much just some sort of custom font and custom background image which is preset by the user upon uploading.
Example
Thank you in advance
|
creating signatures with gd and php
|
CC BY-SA 3.0
| null |
2011-05-16T01:38:58.647
|
2011-05-16T02:00:17.793
| null | null | 692,114 |
[
"php",
"png",
"gd"
] |
6,012,568 | 1 | 6,018,975 | null | 7 | 22,246 |
The MATLAB [bar documentation](http://www.mathworks.com/help/techdoc/ref/bar.html) states the following:
> bar(...,'style') specifies the style of the bars. 'style' is 'grouped' 'stacked'. Default mode of display is 'grouped'.
However, I would like to achieve at the same time. Let me elaborate by giving an example:
```
Y = [1.0 0.5 0.7
2.0 1.5 2.0
5.0 4.0 5.0
4.0 4.0 4.5
3.0 2.0 2.0];
bar(Y,'group');
```
This code produces the following barseries plot, with 5 different sets of 3 bars grouped together:

```
bar([repmat(0.5,5,1) Y(:,1)-0.5],'stack');
```
And this code produces the following barseries plot, using just the first column of the above defined matrix `Y`:

I would like to merge these two, to get a barseries plot which is grouped and stacked at the same time. So the desired result would be like the first picture and each of the three bars in a set would be stacked like the second picture.
|
How can I create a barseries plot using both grouped and stacked styles in MATLAB?
|
CC BY-SA 3.0
| 0 |
2011-05-16T01:54:44.820
|
2013-08-25T22:53:59.103
|
2012-05-01T17:59:18.740
| 453,912 | 587,408 |
[
"matlab",
"graph",
"bar-chart"
] |
6,012,617 | 1 | 6,014,143 | null | 5 | 7,081 |
I want enable curl's AsynchDNS ( find in phpinfo() ) . What do i must do ?
This is screenshot :

I found out install [http://c-ares.haxx.se/](http://c-ares.haxx.se/)
```
c-ares is a C library that performs DNS requests and name resolves asynchronously
```
[http://curl.haxx.se/dev/readme-ares.html](http://curl.haxx.se/dev/readme-ares.html)
But i still stuck at how install on curl exist.
|
how enable curl's AsynchDNS?
|
CC BY-SA 3.0
| 0 |
2011-05-16T02:08:25.680
|
2012-05-22T12:37:49.727
|
2012-05-22T12:37:49.727
| 93,747 | 329,424 |
[
"php",
"curl",
"c-ares"
] |
6,012,822 | 1 | 6,016,029 | null | 1 | 2,877 |
I am working on a tool to preview fonts on a website. For this tool, I want to use `<input type="range" />` to change the font size in a textarea. Since I don't like the default WebKit rendering of the slider and the handler, I customized them using CSS. While the page renders fine in Safari, Chrome does not display the slider handle (Sliders on other websites render fine, though). What do I have to change to make it work in Chrome as well?
The HTML
```
<input type="range" min="6" max="70" value="22" id="font-1-size" />
```
The CSS
```
.tester-option.font-size input
{
-webkit-appearance: none !important;
background: #cecece;
height: 1px;
width: 425px;
-webkit-transform: translate3d(0px, 0px, 0px);
margin-top: 10px;
cursor: pointer;
}
.tester-option.font-size input::-webkit-slider-thumb
{
-webkit-appearance: none !important;
background: #666;
height: 10px;
width: 10px;
cursor: pointer;
-moz-border-radius: 10px;
border-radius: 10px;
}
```
You can find the live example here: [http://fishnation.de/development/26plus/#test-font](http://fishnation.de/development/26plus/#test-font)
P.S. I am aware that there is jQuery UI, but I want to replace as few elements as possible.
|
Input range handler doesn't render in Chrome
|
CC BY-SA 3.0
| null |
2011-05-16T03:05:44.850
|
2011-05-17T00:50:42.260
|
2011-05-17T00:50:42.260
| 229,189 | 229,189 |
[
"css",
"html",
"google-chrome",
"safari",
"webkit"
] |
6,012,863 | 1 | null | null | 0 | 1,152 |
I want to know how to make a horizontal scrollable UITableView header and UITableViewCell like the app "JP Morgan Fund Watch."
The right part of the UITableView header and UITableViewCell can be scrolled. Any idea how to make it?

|
iOS custom and scrollable UITableView header and UITableViewCell
|
CC BY-SA 3.0
| null |
2011-05-16T03:14:48.540
|
2017-05-30T20:24:57.327
|
2011-05-16T03:36:28.147
| 18,091 | 552,954 |
[
"ios",
"uitableview",
"header",
"scrollable"
] |
6,012,875 | 1 | null | null | 1 | 316 |
I can not find the anwser over the net, I don't know even it's possible to do this,
Is it possible to do not have the delete button (at your right) in edition mode when you try to delete one item?

|
How to "do not display" the (confirmation) delete button on an UITableView when deleting?
|
CC BY-SA 3.0
| null |
2011-05-16T03:17:15.063
|
2011-05-20T14:56:28.443
|
2011-05-20T14:56:28.443
| 755,048 | 755,048 |
[
"iphone",
"cocoa-touch",
"uitableview"
] |
6,012,927 | 1 | 6,014,125 | null | 20 | 3,279 |
I created a small test database in CouchDB and I'm creating a temporary view in Futon. I wrote the mapper and the reducer. The mapper works, but . I know that there should be a check box because I've seen it when playing with views on a larger database I have.
Is this normal behavior? Does the reducer check box sometimes not appear? Maybe it's because my result set is small or can't be reduced for some reason? (though I see no reason why I shouldn't be able to reduce the results I have)
My mapper is this. I added the `[1, 2, 3].forEach` thing just because I thought I needed to make the result set larger in order to get the reduce check box.
```
function(doc) {
[1, 2, 3].forEach(function() {
emit(doc.name, 1);
});
}
```
The reducer is this.
```
function(keys, values, rereduce) {
return sum(values);
}
```
The results look like this:

|
CouchDB Reduce Check Box in Futon
|
CC BY-SA 3.0
| 0 |
2011-05-16T03:29:12.133
|
2015-03-13T10:58:00.183
|
2020-06-20T09:12:55.060
| -1 | 76,391 |
[
"couchdb",
"mapreduce",
"reduce",
"couchdb-futon"
] |
6,012,924 | 1 | 6,014,576 | null | 5 | 7,819 |
I am having problems putting a `box-shadow` on `tr`s inside a table. The problem is that the `box-shadow` doesn't show up at all unless the `display` of all the `tr`s of the table is set to `block` (a 'fix' I found here: [Box Shadow inside TR tag](https://stackoverflow.com/questions/5605308/box-shadow-inside-tr-tag)). However, when the `display` of `tr`s is set to `block`, it makes the table cells no longer line up, crowding all to the left.
Here's a fiddle demonstrating the problem: [http://jsfiddle.net/jFdEY/](http://jsfiddle.net/jFdEY/)
You can try changing it to apply to all `tr`s but that causes another problem (in the second picture below).
---
Here's some pictures:
The one without `display: block` on all the `tr`s (table displays properly but `box-shadow` doesn't work)

The one `display: block` on all the `tr`s (`box-shadow` shows up but the table layout is broken)

So, is there a way around this?
|
box-shadow on tr's
|
CC BY-SA 3.0
| 0 |
2011-05-16T03:28:36.220
|
2013-07-12T07:50:51.317
|
2017-05-23T12:01:09.963
| -1 | 726,361 |
[
"html",
"css"
] |
6,013,053 | 1 | null | null | 25 | 35,921 |
[http://code.google.com/apis/chart/](http://code.google.com/apis/chart/)
```
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);
// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawChart() {
// Create our data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'date');
data.addColumn('number', 'Views');
data.addColumn('number', 'People');
data.addRows([
<?php echo $analytics; ?>
]);
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.AreaChart(document.getElementById('Analytics-Visualization'));
chart.draw(data, {lineWidth:3, pointSize:8, width: 745, height: 240,chartArea:{left:20,top:20,width:640}});
}
</script>
```
lets say when we do this it does this

to

maybe using the listener stuff ?
|
How to change tooltip text for google chart api?
|
CC BY-SA 3.0
| 0 |
2011-05-16T04:03:37.233
|
2014-12-02T06:58:51.463
|
2011-10-12T06:51:20.760
| 6,244 | 320,486 |
[
"javascript",
"css",
"api",
"tooltip",
"google-visualization"
] |
6,013,073 | 1 | null | null | 0 | 1,839 |
I need to add some columns in the DataGrid view at run time.
I have nearly 12 columns in the DataGrid and I need to add 5 columns fully from top to bottom and show the sum result at last column.
How can I do that?

|
How to add a 'Sum' column in a DataGrid?
|
CC BY-SA 3.0
| null |
2011-05-16T04:07:18.033
|
2011-05-16T06:04:09.760
|
2011-05-16T04:13:03.857
| 77,004 | 666,508 |
[
".net",
"sql",
"vb.net",
"datagrid"
] |
6,013,071 | 1 | 8,984,197 | null | 53 | 76,125 |
I am trying to get rid of the thin border that appears for every image in Chrome & IE9.
I have this CSS:
```
outline: none;
border: none;
```
Using jQuery, I also added a `border=0` attribute on every image tag. But the border as shown in the image still appears. Any solution?
```
body {
font: 10px "segoe ui",Verdana,Arial,sans-serif, "Trebuchet MS", "Lucida Grande", Lucida, sans-serif;
}
img, a img {
outline: none;
border: none;
}
.icon {
width: 16px;
height: 16px;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
background-position: -48px -144px;
background-image: url(theme/images/ui-icons_0078ae_256x240.png);
margin-right: 2px;
display: inline-block;
position: relative;
top: 3px;
}
```
```
<h1>Dashboard <img class="icon" border="0"></h1>
```
See attached screenshot:

|
Removing the image border in Chrome/IE9
|
CC BY-SA 3.0
| 0 |
2011-05-16T04:06:23.020
|
2019-09-17T11:13:56.477
|
2017-02-07T05:21:45.117
| 552,067 | 318,244 |
[
"css",
"image",
"google-chrome",
"stylesheet",
"border"
] |
6,013,065 | 1 | 6,025,398 | null | 2 | 92 |
I have a mySQL table called entry. It has 2 test records in it:
```
SELECT * FROM entry WHERE typeId = 2
```

I have different types. For example when typeId = 2 that is a question. When typeId = 3 that is an answer. When an answer is inserted into this table the linkId column gets populated with the entryId of the question it is answering.
For example:
```
SELECT * FROM entry WHERE typeId = 3
```

As you can see both of these records are typeId = 3 and the linkId both point to entryId = 1.
In the following query I'm only getting the question that has answers associated to it.
```
SELECT SQL_CALC_FOUND_ROWS
entry.entryId, entry.entryText, entry.voteCount AS voteCount,
USER.userName, USER.fbId, COUNT(e2.entryId) AS answerCount
FROM entry
INNER JOIN USER ON entry.userId = USER.userId
INNER JOIN entry AS e2 ON e2.linkId = entry.entryId AND e2.active=1
WHERE entry.active = 1
AND entry.typeId = 2
ORDER BY entry.voteCount DESC
```

According to the above statements I have 2 entries that are of typeId = 2. So I would really like this statement to return both entries but obviously the answerCount for the entry with out any answers would be 0.
Does anyone have any ideas with what I've shown you to fix this query to get the desired results?
Based off of the suggestion below. I changed the inner join to a left join:
```
SELECT SQL_CALC_FOUND_ROWS DISTINCT
entry.entryId, entry.entryText, entry.voteCount AS voteCount,
USER.userName, USER.fbId
FROM entry
INNER JOIN USER ON entry.userId = USER.userId
LEFT JOIN entry AS e2 ON e2.linkId = entry.entryId AND e2.active=1
WHERE entry.active = 1
AND entry.typeId = 2
ORDER BY entry.voteCount DESC
```
In this statement I took out the count statement (COUNT(e2.entryId) AS answerCount).
This is the result:

When I put in the COUNT statement it only returns the 1 record that returned when it was the inner join:

---
I was able to get the rows to return properly by making sure the LEFT JOIN was correct and when I added a GROUP BY, then the row with 0 answers returned properly.

See my query below.
|
mySQL query: for a given typeId, getting all entries with their answerCount
|
CC BY-SA 4.0
| 0 |
2011-05-16T04:05:56.523
|
2019-07-07T14:13:14.980
|
2019-07-07T14:13:14.980
| 1,033,581 | 380,317 |
[
"mysql",
"sql",
"tsql"
] |
6,013,132 | 1 | 6,013,192 | null | 0 | 242 |
How can I get a UIButton like the ones at the bottom of this picutre (move and delete)? Specifically, I want an image with a text just like that. [http://4.bp.blogspot.com/_QLwms0mVa4w/SQN0MqPIpXI/AAAAAAAAAA8/lEikKn9eP_0/s1600-h/Screenshot+2008-10-25+15:31:21+-0400-1.png](http://4.bp.blogspot.com/_QLwms0mVa4w/SQN0MqPIpXI/AAAAAAAAAA8/lEikKn9eP_0/s1600-h/Screenshot+2008-10-25+15:31:21+-0400-1.png)
Thanks.
For Jason:
The image sticks right beside the label. Is there anyway from IB I can set it to align to the left, while the label aligns to the right? Here's what it looks like right now:

|
Question about these UIButtons
|
CC BY-SA 3.0
| 0 |
2011-05-16T04:20:03.150
|
2011-05-16T05:47:06.577
|
2011-05-16T04:47:53.743
| 635,064 | 635,064 |
[
"objective-c",
"cocoa-touch",
"uibutton",
"uiimage",
"uilabel"
] |
6,013,237 | 1 | 6,013,254 | null | 4 | 9,073 |
I'm developing in Javascript for quite a long time now. Usually when I hit an error in IE I know roughly where it originated even if the message received from IE is useless bunch of text. When I don't know where the error originated, I usually try to "delete" parts of my code, until the error doesn't repeat itself, and that start manually checking line by line until I find the error.
I'm sure that it's far from the best approach, so I'd like to ask you how you debug error like these:

|
How do you debug IE & jQuery errors like this
|
CC BY-SA 3.0
| 0 |
2011-05-16T04:44:09.100
|
2013-08-01T11:53:26.837
|
2011-05-16T20:56:57.963
| 719,312 | 259,374 |
[
"javascript",
"jquery",
"internet-explorer",
"debugging"
] |
6,013,463 | 1 | 6,013,536 | null | 1 | 414 |
I have following Crystal Report:

Here data which is displayed have period 200804 to 201003 my problem is i want to sum up tax payable and credit carried forward for same TIN numbers who has paid for different quater of period (Highlighted in Report) and display the total below (in new row) the group of TIN numbers.
Every time i encounter the group of same TIN number i want to display total in new row below the group.
Please Help me out of this.
|
crystal report in C#, ASP.net
|
CC BY-SA 3.0
| null |
2011-05-16T05:21:38.280
|
2015-12-14T01:29:58.727
|
2015-12-14T01:29:58.727
| 1,849,664 | 703,844 |
[
"c#",
"asp.net",
"oracle10g"
] |
6,013,551 | 1 | 6,048,868 | null | 2 | 829 |
Our company is trying to move everyone from Window XP to Windows 7, so I'm testing some of the home-grown SWT applications to make sure that they still work on Windows 7. Most of them still do, but there's some weird quirks. I've been able to work out most of them, but the one here I'm having no luck with.
SWT Tables always seem to have an ugly black line between columns. I've tried calling setLinesVisible(false), but to no avail. I know this doesn't seem like an important difference, but our users can be quite picky. Has anyone had similar experiences of migrating apps to windows 7 or have any suggestions on what I can try?
Before (in XP - thumbs up):

After (in Windows 7 - thumbs down [Notice the black lines]):

Any suggestions?
|
SWT Table.setLinesVisible(false) does not seem to work on Windows 7
|
CC BY-SA 3.0
| 0 |
2011-05-16T05:35:23.317
|
2017-06-21T21:11:46.317
|
2017-06-21T21:11:46.317
| 4,370,109 | 453,513 |
[
"windows-7",
"swt",
"tabular"
] |
6,013,560 | 1 | null | null | 0 | 49 |
In the attached image, i want to remove the space of the left of content aria, same space is there on right side of page, remaining parts of interface have spanned over the whole width but it is not spanning over the whole width.
How can i span it on the whole width without disturbing the upper parts of interface?

I'm having the following css file.
```
#logo {
left:13px;
top:-3px;
position:absolute;
z-index:2;
}
#heading {
height: 150px;
right: 0px;
left: 0px;
top: 0px;
margin-bottom: 5px;
background: #e8e8e8;
position:absolute;
z-index:0;
}
#upperMenu{
position:absolute;
height: 25px;
padding-top:2px;
right: 0px;
left: 0px;
top: 105px;
background: #e38217;
position:absolute;
z-index:1;
}
#content {
right: 0px;
left: 0px;
border: thin solid lightGray;
background: #F0F0F0;
margin-top:150px;
height:700px;
padding-bottom: 20px;
}
```
|
Problem in handling spacing for an aria of interface
|
CC BY-SA 3.0
| null |
2011-05-16T05:36:53.660
|
2011-06-03T12:48:50.140
|
2011-05-17T10:04:41.290
| 644,013 | 644,013 |
[
"css",
"web"
] |
6,014,409 | 1 | 6,014,554 | null | 3 | 4,762 |
I am using objective C JSON parsing library and facing some issue . My web service returns the JSON response . My Parser fails when there is an escape character in the response string . Below is the response I am receiving from the server .
Now if you observer the line
"item_name" : "Spend$10andget$24worthofdonutsfromJim\'sDonutShop" , there is an escape character . My Parser fails to parse this with the exception.
```
-JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=8 \"Illegal escape sequence '0x27'\" UserInfo=0x79cc420 {NSLocalizedDescription=Illegal escape sequence '0x27'}",
"Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Object value expected for key: item_name\" UserInfo=0x79cc510 {NSUnderlyingError=0x79cc470 \"Illegal escape sequence '0x27'\", NSLocalizedDescription=Object value expected for key: item_name}",
"Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Object value expected for key: parameters\" UserInfo=0x79cc5c0 {NSUnderlyingError=0x79cc540 \"Object value expected for key: item_name\", NSLocalizedDescription=Object value expected for key: parameters}"
```
All I am using is
```
NSDictionary * responseDic = [responseString JSONValue];
```
Somebody please help me !! Thank you !!
|
iPhone - Escape charecter issue in JSON parsing
|
CC BY-SA 3.0
| null |
2011-05-16T07:41:44.160
|
2011-05-16T07:57:53.153
|
2011-05-16T07:51:21.067
| 169,346 | 601,549 |
[
"iphone",
"objective-c",
"escaping",
"json"
] |
6,014,561 | 1 | 6,062,877 | null | 9 | 9,181 |
I have been working with a Java applet which is an applet that helps to write using only a mouse. For my case, I am trying to incorporate this into my webiste project as follows:
When the user clicks on any input element (textbox/textarea) on the page, this JAVA applet loads on the webpage itself. In the screenshot of the JAVA applet seen below, the user points to an alphabet to and the corresponding text gets written in the text box of the applet.

Now what I am trying to do is to get this text from the TextBox of the applet to the input element on the webpage. I know that this needs an interaction between the Java and JavaScript, but not being a pro, I really do not have the catch. Here's the Java applet and the code I have written.
Java applet and jQuery code (298kB): [http://bit.ly/jItN9m](http://bit.ly/jItN9m)
Please could somebdoy help for extending this code.
Thanks a lot!
I searched somewhere and found this -> To get the text inside of Java text box, a getter method in the Applet to retrieve the text:
```
public class MyApplet extends JApplet {
// ...
public String getTextBoxText() { return myTextBox.getText(); }
}
```
In the JQuery code, the following lines are to be added I think:
```
var textBoxText = $("#applet-id")[0].getTextBoxText();
//Now do something with the text
```
For the code of the applet, I saw a GNOME git page here. The getText call already exists -- look at the bottom of this file: [http://git.gnome.org/browse/dasher/tree/java/dasher/applet/JDasherApplet.java](http://git.gnome.org/browse/dasher/tree/java/dasher/applet/JDasherApplet.java)
I'd need to call 'getCurrentEditBoxText' but when should this method 'getCurrentEditBoxText' be called?
In my case, I would probably have to do it when the user clicks in a new input control etc.
|
Bridge between the Java applet and the text input controls on the web page
|
CC BY-SA 3.0
| 0 |
2011-05-16T07:59:00.980
|
2011-05-31T13:50:45.180
|
2011-05-20T17:25:32.637
| 458,790 | 458,790 |
[
"java",
"javascript",
"jquery",
"applet"
] |
6,014,587 | 1 | 6,014,687 | null | 0 | 330 |
i have myPopUp window... And there mini panel for buttons. But there when i added buttons... they added in random position (height -_-)
see please on image and u can see this.
Can anyone help me fix it ?
here code :
```
int xW = curWidth/5; ///width of my buttons
// xW=xW-100;
Fullmain.addView(toolbar,curWidth-50,50);
toolbar.setOrientation(LinearLayout.HORIZONTAL);
toolbar.setBackgroundColor(Color.BLACK);
toolbar.addView(delete,xW,40);///delete,btnUp,btnGo,btnDown,btnOk - -my buttons)
toolbar.addView(btnUp,xW,40);
toolbar.addView(btnGo,xW,40);
btnUp.setText(Html.fromHtml("<h1>▲</h1>"));
btnDown.setText(Html.fromHtml("<h1>▼</h1>"));
btnOk.setText("Save");
toolbar.addView(btnDown,xW,40);
toolbar.addView(btnOk,xW,40);
```
i never see this mmmm bug.. please tell me how to fix it
|
cant' fix random position of buttons
|
CC BY-SA 3.0
| null |
2011-05-16T08:03:32.590
|
2011-05-16T08:17:33.713
| null | null | 562,592 |
[
"android",
"button"
] |
6,014,781 | 1 | 11,502,997 | null | 11 | 10,656 |
I have to create an image gallery that navigation dots like the iPhone gallery.
Check out the screenshot. I need such a widget, look at the white dots:

Is there any widget available in Android that includes navigation dots? If not, how can I recreate this effect?
|
iPhone-like navigation dots for Android
|
CC BY-SA 3.0
| 0 |
2011-05-16T08:28:53.280
|
2012-09-14T08:14:48.070
|
2011-09-03T23:20:11.877
| 127,880 | 555,221 |
[
"iphone",
"android",
"image-gallery"
] |
6,014,779 | 1 | 8,141,511 | null | 4 | 2,305 |
I have a combobox of Names. There can be person with similar name. Now if I set AutoCompleteMode Property of ComboBox to SuggestAppend and if there are two records with same name, the SuggestAppend DropDown list shows only the first value (name).
Notice two `Ratan Tata` names here
When I type in comboBox, it shows only one value of `RatanTata`

So now I get two problems due to this.
`Problem 1:` As said, we see only one name in the SuggestAppend DropDownlist.
`Problem 2:`
Depending on the selected item in combobox, other controls on the form (textbox, listbox, combobox) shows the respective data of that selected contact.
Now in the scenario of duplicate names, when I manually select the `Ratan Tata` name, I see the details of `Ratan Tata` in respective controls on the form. But as and when I move out of the combobox (using tab or mouse click on other control) the respective data in the other controls changes to the value of `Ratan Tata`.
I hope I am clear in explanation. Thanks in advance.
|
SuggestAppend Combobox shows doesnt show duplicate names (if exists)
|
CC BY-SA 3.0
| null |
2011-05-16T08:28:50.977
|
2011-11-15T18:51:52.983
| null | null | 395,500 |
[
"c#",
".net",
"winforms",
"combobox"
] |
6,014,796 | 1 | 6,018,622 | null | 6 | 7,437 |
I'm trying to create a tabbed sidebar with sections, like the following in WPF. There are a few approaches that I have considered, but is there a simpler and more elegant way to do it?
Using a `ListBox` and binding SelectedItem to a value, which the content control on the right binds to. To differentiate between the header and the sections, I use a DataTemplate selector.
---
Using radiobuttons, I bind the selected item to the content control. However, due to the WPF bug, I will have to link them together using value converters.
---


|
Create Tabbed Sidebar with sections WPF
|
CC BY-SA 3.0
| 0 |
2011-05-16T08:31:25.363
|
2011-05-16T15:08:21.003
| null | null | 504,310 |
[
"c#",
".net",
"wpf",
"user-controls",
"controls"
] |
6,014,871 | 1 | 6,014,888 | null | 1 | 4,093 |
I have a web page with the following content..
```
<div id="container">
<div id="header"></div>
<div id="lsidebar">
</div>
<div id="content">
</div>
<div id="rsidebar">
</div>
</div>
```
i need a container to be centered always on the screen.

the container width would be the half of the screen.i use margin-left for centering the container.But it is different for different browser.
Another problem:i am adding float:left for lbar,content,rbar.but the rbar is moving to next line like this...

Here is my css
```
#container
{
position:absolute;
width:75%;
left:15%;
}
#header{width:100%;height:430px;}
#content{position:relative;top:0px;width:60%;}
#rsidebar{border:2px solid black;width:100px;height:200px;float:left;}
#footer{position:relative;top:10px;width:100%;}
```
how to solve this issue...
|
Making webpage fit to screen resolution
|
CC BY-SA 3.0
| 0 |
2011-05-16T08:39:14.223
|
2011-05-16T09:18:26.857
|
2011-05-16T09:17:00.990
| 696,465 | 696,465 |
[
"html",
"css",
"cross-browser"
] |
6,015,124 | 1 | 6,015,201 | null | 0 | 176 |
I am creating MVC music store application by reading the PDF, in that on page 22 there is a method shown to add view but when I right clicked on it I am getting the below screen:

|
View Engine dropdown not present while adding view
|
CC BY-SA 3.0
| null |
2011-05-16T09:03:28.313
|
2011-05-16T12:12:41.677
| null | null | 609,582 |
[
"asp.net-mvc-2",
"view",
"razor"
] |
6,015,350 | 1 | 6,015,486 | null | 0 | 2,280 |
I use Vaadin in my project, currently i'm having a problem with it. It's CSS/HTML problem and i'm not aware how can i fix it...
So the situation looks like that:
I've got HTML structure (CustomLayout) which looks like that:
```
<table>
<tr>
<td location="loc11"></td>
<td location="loc12"></td>
</tr>
<tr>
<td location="loc21"></td>
<td location="loc22"></td>
</tr>
(...)
</table>
```
I'm inserting data into td with location="xxx", the data is in some locations not everyone. CSS looks like that:
```
table.metric_table_layout tr td {
border-bottom: 1px dotted grey !important;
}
```
And here's the problem:

If the td is empty, i have borders that completly ruined my layout.
Could someone give me some CSS (that will works also in IE 7+) to fix this ?
I don't want to use JS, so i'm not sure if i can handle this with only CSS?
Thx
tzim
|
CSS with tables, empty rows without border
|
CC BY-SA 3.0
| null |
2011-05-16T09:26:03.917
|
2011-05-16T09:40:57.817
| null | null | 261,083 |
[
"vaadin",
"border",
"css"
] |
6,015,416 | 1 | null | null | 0 | 476 |
I am facing an issue in Microsoft's `RibbonControlLibrary`. I have created a simple WPF application and I am using `RibbonControlLibrary` to create a ribbon bar on top. Problem is shown in image below.

Problem is that Menu under "Something" on only expand as much as there are items in left menu i.e. Item1, Item2... If I increase an item in left menu I get this
but there are sill items missing in menu under Something.
below is XAML I am using
```
<Ribbon:Ribbon ItemsSource="{Binding Path=CSIMRibbonTabs}">
<Ribbon:Ribbon.ApplicationMenu>
<Ribbon:RibbonApplicationMenu CanUserResizeVertically="True" ItemsSource="{Binding Path=MainItem}">
<Ribbon:RibbonApplicationMenu.AuxiliaryPaneContent>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border >
<StackPanel Orientation="Vertical">
<Label Content="Something" />
</StackPanel>
</Border>
<ItemsControl Grid.Row="1" ItemsSource="{Binding Path=OtherItems}"/>
</Grid>
</Ribbon:RibbonApplicationMenu.AuxiliaryPaneContent>
</Ribbon:RibbonApplicationMenu>
</Ribbon:Ribbon.ApplicationMenu>
</Ribbon:Ribbon>
```
code
```
public List<string> MainItem
{
get
{
return new List<string>() { "Item1", "Item2", "Item3"};
}
}
public List<string> OtherItems
{
get
{
return new List<string>() { "val1", "val2", "val3", "val4", "val5", "val6", "val7", "val8" };
}
}
```
What should I do to expand menu under "Something" as much as there are items in the list?
|
Problem in RibbonControlLibrary
|
CC BY-SA 3.0
| null |
2011-05-16T09:31:22.400
|
2011-12-26T20:31:57.440
|
2011-05-16T09:46:55.630
| 421,611 | 421,611 |
[
"c#",
"wpf",
"ribbon-control"
] |
6,015,464 | 1 | 6,389,729 | null | 9 | 11,495 |
I have written a custom `AuthorizeAttribute` which has the following condition in asp.net mvc3 application:
```
public override void OnAuthorization(AuthorizationContext filterContext)
{
//auth failed, redirect to Sign In
if (!filterContext.HttpContext.User.Identity.IsAuthenticated)
{
filterContext.Result = new HttpUnauthorizedResult();
}
}
```
And in my web.config, i have:
```
<authentication mode="Forms">
<forms loginUrl="~/User/SignIn" timeout="2880" />
</authentication>
```
On authentication fail, it redirects to "/Account/Login" page by default.
How do i change this default redirect url and redirect it to "/User/SignIn"?
The screenshot shows the clear view of what i am trying to say..
Though i have set '/User/SignIn', it redirects to '/Account/Login'
|
default login url on HttpUnauthorizedResult in asp.net mvc
|
CC BY-SA 3.0
| 0 |
2011-05-16T09:35:40.580
|
2013-05-30T14:33:40.633
|
2011-05-19T13:34:34.637
| 111,435 | 111,435 |
[
"asp.net-mvc",
"authentication",
"forms-authentication",
"custom-attributes"
] |
6,015,695 | 1 | 6,016,189 | null | 1 | 575 |
I want to have a button which allows the user to pick a global hotkey. I stumbled upon stackoverflow and found some ways to register a hotkey, but none which allows me to let the user pick one. Is there maybe a library for it? Or how you guys handle this?
It should look like this:

|
Ask for Hotkey in Cocoa/Objective-C
|
CC BY-SA 3.0
| null |
2011-05-16T09:57:01.313
|
2011-05-16T10:41:34.507
| null | null | 531,222 |
[
"objective-c",
"cocoa",
"hotkeys",
"registerhotkey",
"global-hotkey"
] |
6,015,855 | 1 | null | null | 7 | 4,457 |
How do I show the mail setup page programmatically?
In my app, I offered a feedback option to the user. While tapping on the feedback button, I check whether is there any mail account available in the device or not. This is done with the following check:
```
if ([MFMailComposeViewController canSendMail])
{
// Actions to send mail
}
else
{
//Actions to show an error message by UIAlertView
}
```
The alert message will be like this:

If the user taps on the OK button in this `UIAlertView`, I want to go to the mail setup page available in the settings menu. That is, I want to show the following page:

Is it possible to do this navigation programmatically?
|
How do I show the mail setup page programmatically on iPhone?
|
CC BY-SA 3.0
| 0 |
2011-05-16T10:11:35.550
|
2016-11-30T11:49:11.113
|
2012-05-05T16:15:32.787
| 29,995 | null |
[
"iphone",
"email"
] |
6,015,964 | 1 | 6,020,582 | null | 17 | 18,271 |
I'm stuck at trying to write the Entity Framework 4.1 code first model for the following DB relationship.
Here is a visual of the relationship.
dbo.[Companies] can have either Seller or Debtor as Company Types.
dbo.[SellerDebtors] defines the connection a Seller Company has with a Debtor Company.
The code i've written is based on my original EF 4.0 POCO model code. This is what I've come up with - This code does not work.
```
public class SellerDebtor
{
public int SellerDebtorId { get; set; }
public int DebtorCompanyId { get; set; }
public int SellerCompanyId { get; set; }
public Company DebtorCompany { get; set; }
public Company SellerCompany { get; set; }
public ICollection<SellerDebtorInfo> SellerDebtorInfos { get; set; }
public ICollection<SellerDebtorFile> SellerDebtorFiles { get; set; }
}
public class Company
{
public int CompanyId { get; set; }
public string CompanyType { get; set; }
public string Name { get; set; }
public virtual ICollection<User> Users { get; set; }
public virtual ICollection<CompanyInfo> CompanyInfos { get; set; }
public virtual ICollection<CompanyFile> CompanyFiles { get; set; }
public virtual ICollection<SellerDebtor> SellerDebtorDebtorCompanies { get; set; }
public virtual ICollection<SellerDebtor> SellerDebtorSellerCompanies { get; set; }
}
```
At the moment, I'm getting this as an error:
```
System.Data.SqlClient.SqlException: Invalid column name 'DebtorCompany_CompanyId'.
Invalid column name 'SellerCompany_CompanyId'.
Invalid column name 'Company_CompanyId'.
Invalid column name 'Company_CompanyId1'.
```
Ideally, I'd like to be able to maintain the naming of the relationships.
I'm guessing i need to set some attributes but i'm not sure what to set.
|
Multiple foreign keys pointing to same table in Entity Framework 4.1 code first
|
CC BY-SA 3.0
| 0 |
2011-05-16T10:21:53.137
|
2016-08-03T04:33:04.847
| null | null | 43,603 |
[
"entity-framework-4.1",
"code-first"
] |
6,016,193 | 1 | null | null | 0 | 157 |
I have solved the following constraint processing task. Can you please verify if it is correct?
```
One of the prisoners of a high-level security prison sees a way to escape. Almost
free, he reaches a corridor of 20 meters long, guarded by 5 cameras, behind
which is the exit. In Figure 3, we provide a schematic overview of the corridor.
```

```
The prisoner has only 10 seconds to reach the end of the corridor and may
not be noticed by the cameras in doing so. After 10 seconds, or when seen by a
camera, the prison is put under total lock-down, which will prevent his escape.
We will consider the following constraints:
• A camera can only see 3 meters and cannot see its own position. E.g., the
camera at position 9 is able to see the positions 6, 7 and 8, or 10, 11 and
12, depending on the orientation of the camera.
• At time point 0, all cameras are oriented towards the end of the corridor.
Thus, the camera at position 9 sees positions 10, 11 and 12.
• Every two seconds the cameras change their orientation. Thus, at time
point 2 the camera at position 9 will see the positions 6, 7 and 8.
• Every second, the prisoner can move 0, 1, 2 or 3 meters forward. He
cannot move backward. Thus, if the prisoner is standing at position 2 at
time point 2, then, at time point 3, he can be on position 2, 3, 4 or 5.
Formulate the problem above as a constraint problem. Come up with a useful
representation of the problem in terms of the constraint processing tool. Provide
an explanation of indices, variables and domains. Furthermore, provide for every
introduced constraint, the meaning of the constraint in natural language.
```
This is my solution and want you guys to check for me where am doing wrong:
```
***MY VARIABLES***
Name: T, domain: 0..10 // T = the time from 0 to 10 seconds
Name: P, domain: 0..3 // P = Prisoner can move 0, 1, 2, 3 meters
Name: C1, domain: 2 // C1 = camera 1
Name: C2, domain: 4 // C2 = camera 2
Name: C3, domain: 9 // C3 = camera 3
Name: C4, domain: 12 // C4 = camera 14
Name: C5, domain: 17 // C5 = camera 5
Name: View1, domain: -1..5 // camera1 view
Name: View2, domain: 1..7 // camera2 view
Name: View3, domain: 6..12 // camera3 view
Name: View4, domain: 9..15 // camera4 view
Name: View5, domain: 14..20 // camera5 view
```
I declared the constraints in such a way that at each time the view of the cameras are changed alternatively when the time is even number but when the time is oneven, only the prisoner can move.
```
Constraint: (T=0/\View1=(C1+3)/\View2=(C2+3)/\View3=(C3+3)/\View4=(C4+3)/\View5=(C5+3)/\P(i)), range: i>-1
Constraint: (T=1/\P(i)), range: i>0
Constraint: (T=2/\View1=(C1-3)/\View2=(C2-3)/\View3=(C3-3)/\View4=(C4-3)/\View5=(C5-3)/\P(i)), range: i>-1
Constraint: (T=3/\P(i)), range: i>0
Constraint: (T=4/\View1=(C1+3)/\View2=(C2+3)/\View3=(C3+3)/\View4=(C4+3)/\View5=(C5+3)/\P(i)), range: i>-1
Constraint: (T=5/\P(i)), range: i>0
Constraint: (T=6/\View1=(C1-3)/\View2=(C2-3)/\View3=(C3-3)/\View4=(C4-3)/\View5=(C5-3)/\P(i)), range: i>-1
Constraint: (T=7/\P(i)), range: i>0
Constraint: (T=8/\View1=(C1+3)/\View2=(C2+3)/\View3=(C3+3)/\View4=(C4+3)/\View5=(C5+3)/\P(i)), range: i>-1
Constraint: (T=9/\P(i)), range: i>0
Constraint: (T=10/\View1=(C1-3)/\View2=(C2-3)/\View3=(C3-3)/\View4=(C4-3)/\View5=(C5-3)/\P(i)), range: i>-1
```
Guys, i know am doing something wrong so help me to rectify it.
Thanks for your help. I posted a similar question yesterday, so if you want to know the syntax for the variables and constraints, then this is the link:
[Variable and Constraint syntax in this post](https://stackoverflow.com/questions/6007818/need-help-in-solving-a-constraint-problem)
Thanks for your help
|
Need Help In Solving A Constraint Problem (2nd)
|
CC BY-SA 3.0
| null |
2011-05-16T10:41:48.900
|
2011-05-16T12:41:41.517
|
2017-05-23T10:32:35.693
| -1 | 701,222 |
[
"algorithm",
"artificial-intelligence",
"constraints",
"constraint-programming",
"constraint-satisfaction"
] |
6,016,358 | 1 | null | null | 1 | 2,243 |
Is there a way to look for the implementation/source code of this method? It's in API need this to compare two images because it keeps overwriting the original image and after several times of converting the imageview to a bitmap, the image doesn't look very nice anymore.
`http://developer.android.com/reference/android/graphics/Bitmap.html#sameAs(android.graphics.Bitmap)`
I am doing this method to create a bitmap from the image and setting it again as an imageview to let the user edit his picture.
```
public static Bitmap getBitmap(ImageView imageView) {
BitmapDrawable mDrawable = (BitmapDrawable) imageView.getDrawable();
Bitmap b = mDrawable.getBitmap();
return b;
}
```
However, after several times of saving and retrieving it from the database to edit it, the image turns from this: 
to this:

and then finally this:

So i need a way of detecting whether the image hasn't been changed for me not to resave the byte array of this bitmap to the database.
|
Bitmap image compare
|
CC BY-SA 3.0
| null |
2011-05-16T10:56:27.173
|
2017-07-25T17:52:21.660
|
2011-05-16T11:29:40.147
| 726,781 | 726,781 |
[
"android-image",
"android"
] |
6,016,384 | 1 | null | null | 0 | 1,280 |
I have 8 Edit Text Boxes and two buttons. For This i am uploading snap shoot of my application

Each of Edit Text Boxes i set KEYBOARD_12KEY for input type.
if i click on any Edit box then it appears as 
but if i click on edit box corresponding to G then it appears as 
the upper edit boxes scroll upper side but Edit Box corresponding to G covered by the buttons..but i want that if i click then whole edit boxes scroll upper side, no one edit box left down side the buttons. like :- 
can any one tell me how can i do this.
this is my xml file in the RelativeLayout -
```
<ScrollView android:layout_width="fill_parent" android:layout_marginBottom="30dip"
android:layout_height="wrap_content" >
<TableLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:scrollbars="vertical">
<TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1"
android:padding="5dip" android:layout_alignParentLeft="true"
android:layout_width="fill_parent" android:layout_weight="1">
<TextView android:layout_height="wrap_content"
android:textSize="20dip" android:minWidth="100dip" android:layout_weight="1" android:layout_gravity="center_vertical" android:text="A"/>
<EditText android:layout_height="40dip" android:layout_weight="1" android:layout_width="wrap_content"
android:id="@+id/EditText01"></EditText>
</TableRow>
<TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1"
android:padding="5dip" android:layout_alignParentLeft="true"
android:layout_width="fill_parent" android:layout_weight="1">
<TextView android:layout_height="wrap_content"
android:textSize="20dip" android:minWidth="100dip" android:layout_weight="1" android:layout_gravity="center_vertical" android:text="B"/>
<EditText android:layout_height="40dip" android:layout_weight="1" android:layout_width="wrap_content"
android:id="@+id/EditText02"></EditText>
</TableRow>
<TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1"
android:padding="5dip" android:layout_alignParentLeft="true"
android:layout_width="fill_parent" android:layout_weight="1">
<TextView android:layout_height="wrap_content"
android:textSize="20dip" android:minWidth="100dip" android:layout_weight="1" android:layout_gravity="center_vertical" android:text="C"/>
<EditText android:layout_height="40dip" android:layout_weight="1" android:layout_width="wrap_content"
android:id="@+id/EditText03"></EditText>
</TableRow>
<TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1"
android:padding="5dip" android:layout_alignParentLeft="true"
android:layout_width="fill_parent" android:layout_weight="1">
<TextView android:layout_height="wrap_content"
android:textSize="20dip" android:minWidth="100dip" android:layout_weight="1" android:layout_gravity="center_vertical" android:text="D"/>
<EditText android:layout_height="40dip" android:layout_weight="1" android:layout_width="wrap_content"
android:id="@+id/EditText04"></EditText>
</TableRow>
<TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1"
android:padding="5dip" android:layout_alignParentLeft="true"
android:layout_width="fill_parent" android:layout_weight="1">
<TextView android:layout_height="wrap_content"
android:textSize="20dip" android:minWidth="100dip" android:layout_weight="1" android:layout_gravity="center_vertical" android:text="E"/>
<EditText android:layout_height="40dip" android:layout_weight="1" android:layout_width="wrap_content"
android:id="@+id/EditText05"></EditText>
</TableRow>
<TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1"
android:padding="5dip" android:layout_alignParentLeft="true"
android:layout_width="fill_parent" android:layout_weight="1"
android:baselineAligned="true">
<TextView android:layout_height="wrap_content"
android:layout_weight="1" android:textSize="20dip" android:minWidth="100dip"
android:layout_gravity="center_vertical" android:text="F"/>
<EditText android:layout_height="40dip" android:layout_weight="1" android:layout_width="wrap_content"
android:id="@+id/EditText06"></EditText>
</TableRow>
<TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1"
android:padding="5dip" android:layout_alignParentLeft="true"
android:layout_width="fill_parent" android:layout_weight="1">
<TextView android:layout_height="wrap_content"
android:layout_weight="1" android:textSize="20dip" android:minWidth="100dip"
android:layout_gravity="center_vertical" android:text="G"/>
<EditText android:layout_height="40dip" android:layout_weight="1" android:layout_width="wrap_content"
android:id="@+id/EditText07"></EditText>
</TableRow>
<TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1"
android:padding="5dip" android:layout_alignParentLeft="true"
android:layout_width="fill_parent" android:layout_weight="1">
<TextView android:layout_height="wrap_content"
android:layout_weight="1" android:textSize="20dip" android:minWidth="200dip"
android:layout_gravity="center_vertical" android:text="H"/>
<EditText android:layout_height="40dip" android:inputType="numberDecimal"
android:layout_weight="1"
android:layout_width="wrap_content" android:id="@+id/EditText08"></EditText>
</TableRow>
</TableLayout>
</ScrollView>
<TableLayout android:id="@+id/btnsLL" android:orientation="horizontal"
android:layout_height="50dip" android:gravity="center"
android:layout_alignParentBottom="true" android:layout_below="@+id/configParamsLL"
android:layout_width="fill_parent">
<TableRow>
<Button android:id="@+id/BtnResetCfg" android:layout_alignParentBottom="true"
android:layout_height="wrap_content" android:layout_weight="1"
android:layout_width="2dip" android:layout_marginRight="50dip" android:text="Reset" android:scrollbarAlwaysDrawHorizontalTrack="true"></Button>
<Button android:id="@+id/BtnSaveCfg" android:layout_alignParentBottom="true"
android:layout_height="wrap_content" android:layout_weight="1"
android:layout_width="2dip" android:layout_marginLeft="50dip" android:text="Save"></Button>
</TableRow>
</TableLayout>
```
Thanks.
|
How to scroll Edit Text boxes upper side automatically in the layout in android
|
CC BY-SA 3.0
| null |
2011-05-16T10:58:57.623
|
2011-05-16T13:29:47.337
|
2011-05-16T12:57:04.787
| 751,786 | 751,786 |
[
"android",
"android-edittext"
] |
6,016,629 | 1 | 6,016,790 | null | 0 | 85 |
I am trying to deploy a website that has MicrosoftReport in it. When I deploy it I get the error on the client system a shown below:

Here is my code .aspx
```
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<table style="width:60%;" align="center">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="From Date : "></asp:Label>
<asp:TextBox ID="txtStartDate" runat="server" ReadOnly="True"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtStartDate"
runat="server" Format="yyyy-MM-dd" />
</td>
<td>
<asp:Label ID="Label2" runat="server" Text="To Date : "></asp:Label>
<asp:TextBox ID="txtEndDate" runat="server" ReadOnly="True"></asp:TextBox>
<asp:CalendarExtender ID="txtEndDate_CalendarExtender" runat="server"
Enabled="True" TargetControlID="txtEndDate">
</asp:CalendarExtender>
</td>
<td>
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
</td>
</tr>
</table>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt">
<LocalReport ReportPath="report.rdlc">
</LocalReport>
</rsweb:ReportViewer>
</div>
</form>
</body>
</html>
```
How do I solve the problem? Do I have to add any reference to it?
|
Error while eploying a ReportWebsite with Microsooft reporting tool
|
CC BY-SA 3.0
| null |
2011-05-16T11:22:33.070
|
2011-05-16T11:36:49.860
| null | null | 243,680 |
[
"asp.net",
"deployment",
"web-config",
"microsoft-reporting"
] |
6,016,677 | 1 | 6,016,718 | null | 0 | 190 |

Hi to all,
i have written something like this in the xml file
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableLayout
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:id="@+id/tl_splash_screen" >
</TableLayout>
</LinearLayout>
```
and in java file
```
TableLayout tl_splash_screen;
int int_scr_wd;
TableRow tr_test;
TextView txt_test;
TableRow tr_test1;
TextView txt_test1;
TableRow tr_test2;
TextView txt_test2;
TableRow tr_test3;
TextView txt_test3;
TableRow tr_test4;
TextView txt_test4;
TableRow tr_test5;
TextView txt_test5;
int int_tb_bk_col;
int int_black;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.x_splash_screen);
try
{
txt_test=new TextView(this);
txt_test1=new TextView(this);
txt_test2=new TextView(this);
txt_test3=new TextView(this);
txt_test4=new TextView(this);
txt_test5=new TextView(this);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(int_scr_wd+300, LayoutParams.FILL_PARENT);
tr_test = (TableRow) new TableRow(this);
tr_test1 = (TableRow) new TableRow(this);
tr_test2 = (TableRow) new TableRow(this);
tr_test3 = (TableRow) new TableRow(this);
tr_test4 = (TableRow) new TableRow(this);
tr_test5 = (TableRow) new TableRow(this);
tl_splash_screen = (TableLayout)findViewById(R.id.tl_splash_screen);
int_tb_bk_col = Color.rgb(211,211,211);
int_black = Color.rgb(0,0,0);
tl_splash_screen.setBackgroundColor(int_tb_bk_col);
txt_test.setTextColor(int_black);
txt_test1.setTextColor(int_black);
txt_test2.setTextColor(int_black);
txt_test3.setTextColor(int_black);
txt_test4.setTextColor(int_black);
txt_test5.setTextColor(int_black);
Display display = getWindowManager().getDefaultDisplay();
int_scr_wd= display.getWidth();
int as = display.getHeight();
Log.i("", String.valueOf(int_scr_wd));
Log.i("", String.valueOf(as));
txt_test1.setHeight(120);
txt_test2.setHeight(120);
txt_test3.setHeight(120);
txt_test4.setHeight(120);
txt_test5.setHeight(120);
txt_test.setText("TextViews");
txt_test1.setText("- TextView 1");
txt_test2.setText("- TextView 2");
txt_test3.setText("- TextView 3");
txt_test4.setText("- TextView 4");
txt_test5.setText("- TextView 5");
tr_test.addView(txt_test);
tr_test1.addView(txt_test1);
tr_test2.addView(txt_test2);
tr_test3.addView(txt_test3);
tr_test4.addView(txt_test4);
tr_test5.addView(txt_test5);
tl_splash_screen.addView(tr_test,new TableLayout.LayoutParams(layoutParams));
tl_splash_screen.addView(tr_test1,new TableLayout.LayoutParams(layoutParams));
tl_splash_screen.addView(tr_test2,new TableLayout.LayoutParams(layoutParams));
tl_splash_screen.addView(tr_test3,new TableLayout.LayoutParams(layoutParams));
tl_splash_screen.addView(tr_test4,new TableLayout.LayoutParams(layoutParams));
tl_splash_screen.addView(tr_test5,new TableLayout.LayoutParams(layoutParams));
}
catch(Exception ex)
{
Log.i("caught error","caught while loading main page");
}
}
```
Just to demonstrate i have posted this code. You all can see that i have mentioned textview 5 in which "textview - 5" text is written which is not visible on the screen because i have not taken tablelayout under scrollable view.
all i want to ask that why table layout is covering some area of the screen even though i have defined it fill_parent.
Please suggest something.
|
why tablelayout's layout_width and _height is not covering the whole area of samsung tablet's screen?
|
CC BY-SA 3.0
| null |
2011-05-16T11:27:01.537
|
2011-05-16T11:31:16.557
| null | null | 566,590 |
[
"java",
"android",
"android-layout",
"tablelayout",
"android-2.1-eclair"
] |
6,017,010 | 1 | 6,018,177 | null | 2 | 1,487 |
I have a table in database `employee` composed by two columns and .
I arrived to add data in the second column to a JComboBox like in the snapshot down!

Now how can I do to delete the selected employee in the JComboBox from DB?
I thought to add the ID with name like this `I122-Name` and use split method to extract the ID but I don't want to show the ID.
Is there any way to associate with each name in the JComboBox a hidden value that contains the employee ID?
|
JComboBox Help to delete data from database
|
CC BY-SA 3.0
| null |
2011-05-16T11:59:46.373
|
2013-03-20T17:12:05.497
|
2011-05-16T12:06:06.437
| 513,838 | 604,156 |
[
"java",
"database",
"jcombobox"
] |
6,017,294 | 1 | 6,018,397 | null | 1 | 873 |
I want to build an app that renders events into it's UI but I don't want to create a calendar UI from scratch if I can get something like the Google Calendar javascript API to do it for me.
So, like I am able to add canendar data (events, etc) into my Google Calendar account like this:

..can I also create a calendar UI in my own site with the Google Calendar API that is fed by my iCal feed, thus removing my need to reinvent the calendar markup/css? If so, how?
|
Render a Google Calendar in my site from iCal feed
|
CC BY-SA 3.0
| null |
2011-05-16T12:22:28.620
|
2011-05-19T01:30:08.803
|
2011-05-19T01:30:08.803
| 56,145 | 56,145 |
[
"javascript",
"api",
"google-calendar-api",
"icalendar"
] |
6,017,315 | 1 | 6,017,477 | null | -1 | 276 |
i would like to create a message box similar to which appears when the volume buttons are pressed.

Anyone knows how to do it? Thanks
|
Iphone Alert Box Like Volume Buttons
|
CC BY-SA 3.0
| null |
2011-05-16T12:24:16.107
|
2011-05-16T12:36:09.880
| null | null | 258,863 |
[
"iphone"
] |
6,017,460 | 1 | 6,017,961 | null | 128 | 92,608 |
I tried to make the title self-explanatory, but here goes - data first:
```
dtf <- structure(list(variable = structure(c(1L, 1L, 2L, 2L, 3L, 3L,
4L, 4L, 5L, 5L), .Label = c("vma", "vla", "ia", "fma", "fla"), class = "factor"),
ustanova = structure(c(1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L,
2L), .Label = c("srednja škola", "fakultet"), class = "factor"),
`(all)` = c(42.9542857142857, 38.7803203661327, 37.8996138996139,
33.7672811059908, 29.591439688716, 26.1890660592255, 27.9557692307692,
23.9426605504587, 33.2200772200772, 26.9493087557604)), .Names = c("variable",
"ustanova", "(all)"), row.names = c(NA, 10L), class = c("cast_df",
"data.frame"), idvars = c("variable", "ustanova"), rdimnames = list(
structure(list(variable = structure(c(1L, 1L, 2L, 2L, 3L,
3L, 4L, 4L, 5L, 5L), .Label = c("vma", "vla", "ia", "fma",
"fla"), class = "factor"), ustanova = structure(c(1L, 2L,
1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L), .Label = c("srednja škola",
"fakultet"), class = "factor")), .Names = c("variable", "ustanova"
), row.names = c("vma_srednja škola", "vma_fakultet", "vla_srednja škola",
"vla_fakultet", "ia_srednja škola", "ia_fakultet", "fma_srednja škola",
"fma_fakultet", "fla_srednja škola", "fla_fakultet"), class = "data.frame"),
structure(list(value = structure(1L, .Label = "(all)", class = "factor")), .Names = "value", row.names = "(all)", class = "data.frame")))
```
And I'd like to create a dodged barplot, do the `coord_flip` and put some text labels inside the bars:
```
ggplot(bar) + geom_bar(aes(variable, `(all)`, fill = ustanova), position = "dodge") +
geom_text(aes(variable, `(all)`, label = sprintf("%2.1f", `(all)`)), position = "dodge") +
coord_flip()
```
you can see output [here](https://imgur.com/adBht).

I reckon I'm asking for something trivial. I want the text labels to "follow" stacked bars. Labels are placed correctly on the y-axis, but how to position them correctly on x-axis?
|
Position geom_text on dodged barplot
|
CC BY-SA 3.0
| 0 |
2011-05-16T12:34:49.047
|
2021-10-12T14:40:41.877
|
2016-02-28T12:39:51.117
| 1,851,712 | 457,898 |
[
"r",
"plot",
"ggplot2",
"bar-chart"
] |
6,017,630 | 1 | null | null | 2 | 1,444 |
I'm running a virtual machine (using Oracle VM VirtualBox) with FreeDOS installed.
After I enter the DJGPP IDE (called "RHIDE") and run an application once, I can no longer run anything, and when I exit the IDE, I get a message saying "dos mem corrupt" and "PANIC: MCB chain corrupted":

This happens for program I run from RHIDE, and running the same programs "manually" from the FreeDOS command line yields no such problem.
It's quite bothersome to restart the VM after every debug session.
Any advice or ideas on what could be causing this issue would be highly appreciated.
Thanks in advance.
|
FreeDOS + RHIDE (DJGPP environment) = DOS Memory Corruption?
|
CC BY-SA 3.0
| null |
2011-05-16T12:49:03.267
|
2019-06-30T08:49:14.937
| null | null | 664,805 |
[
"dos",
"virtualbox",
"corruption",
"memory-corruption",
"djgpp"
] |
6,017,679 | 1 | 6,017,754 | null | 3 | 9,828 |
I am trying to create a button on the `mainActivity`. Once clicked, it takes a user to a second view. However I keep getting an error saying that
> onclick listener cannot be resolved to a type
and
> the method set onclicklistener in the type view is not applicaible for the type of arguments
Below is the screenshot of the code:

Does anyone have any ideas?
|
What can I do when I get a "cannot be resolved to a type" error?
|
CC BY-SA 3.0
| null |
2011-05-16T12:52:00.727
|
2015-03-14T10:58:27.510
|
2012-08-27T19:09:06.157
| 435,093 | 737,081 |
[
"android",
"android-layout"
] |
6,017,757 | 1 | 6,017,942 | null | 0 | 938 |
I am always displaying the data points of a flex line chart using `itemRenderer` for `LineSeries`. The problem I am facing is, the first and the last datapoints are not clearly visible. Please find the attached image for further clarity.

How do I display the first and last datapoints completely?
Thanks,Anji
|
Flex line chart data points
|
CC BY-SA 3.0
| 0 |
2011-05-16T12:57:44.020
|
2011-05-16T13:12:05.857
| null | null | 434,790 |
[
"apache-flex",
"graph",
"flex3",
"adobe",
"linechart"
] |
6,017,767 | 1 | 6,024,238 | null | 0 | 779 |
Reading this [documentation](http://static.springsource.org/spring-data/data-graph/snapshot-site/reference/html/#cross-store), I tryed to apply to my code in this way:
```
@Entity
@Table(name = "triple")
@NodeEntity
public class TripleDBMoldelNeoImpl implements TripleDBModel{
protected List<Annotation> annotations;
@RelatedTo(type = "subject", elementClass = (Class<? extends NodeBacked>) Concept.class) //This is the suggestion Eclipse gives me
public Concept subject;
@RelatedTo(type = "object", elementClass = Concept.class)
public Concept object;
@RelatedTo(type = "predicate", elementClass = Concept.class)
public Concept predicate;
@ManyToMany(
cascade={CascadeType.ALL },
fetch=FetchType.LAZY
)
@JoinTable(name = "triple_has_annotation",
joinColumns={@JoinColumn(name="uri_concept_subject"), @JoinColumn(name="uri_concept_object"), @JoinColumn(name="uri_concept_predicate") },
inverseJoinColumns=@JoinColumn(name="annotation_id") )
public List<Annotation> getAnnotations() {
return annotations;
}
public void setAnnotations(List<Annotation> annotations) {
this.annotations = annotations;
}
@Id
@Column(name = "subject", length = 100)
public Concept getSubject() {
return subject;
}
public void setSubject(Concept subject) {
this.subject = subject;
}
@Id
@Column(name = "object", length = 100)
public Concept getObject() {
return object;
}
public void setObject(Concept object) {
this.object = object;
}
@Id
@Column(name = "predicate", length = 100)
public Concept getPredicate() {
return predicate;
}
public void setPredicate(Concept predicate) {
this.predicate = predicate;
}
```
```
@NodeEntity(partial = true)
public class ConceptNeoImpl implements java.io.Serializable, Concept {
private static final long serialVersionUID = 1L;
private String uri;
private String label;
private String ontologyElement;
private List<Annotation> annotations;
@RelatedTo(type = "conceptSub", elementClass = TripleDBModel.class)
private TripleDBModel triple;
public TripleDBModel getTriple() {
return triple;
}
public void setTriple(TripleDBModel triple) {
this.triple = triple;
}
```
The use I want to is explained on the image below

Then, the table triple will be using neo4j and concept will be using jpa and neo4j. I am programming using Eclipse IDE and it gives me suggestions to correct the errors. The first one is:
```
@RelatedTo(type = "conceptUriSubject", elementClass = Concept.class)
```
correct to
```
@RelatedTo(type = "conceptUriSubject", elementClass = (Class<? extends NodeBacked>) Concept.class)
```
And then, the problem is not solved, and gives me the nex message
> Multiple markers at this line
- The value for annotation attribute RelatedTo.elementClass must be a class
literal
- Type safety: Unchecked cast from Class to Class
NodeBacked>
- The value for annotation attribute RelatedTo.elementClass must be a class
literal
- Type safety: Unchecked cast from Class to Class
NodeBacked>
Any ideas¿¿ I am new on this, so I am quite lost and I already asked on spring forums, with no success. Thanks in advance
Plugins on my `pom.xml`
```
<plugins>
<plugin>
<!-- Execute the main class -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.springframework.data.neo4j.examples.hellograph.App</mainClass>
</configuration>
</plugin>
<plugin>
<!-- IntelliJ Idea Support -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin</artifactId>
<version>2.2</version>
<configuration>
<downloadSources>true</downloadSources>
<dependenciesAsLibraries>true</dependenciesAsLibraries>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.0</version>
<dependencies>
<!-- NB: You must use Maven 2.0.9 or above or these are ignored (see
MNG-2972) -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<outxml>true</outxml>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
<aspectLibrary>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
</aspectLibrary>
</aspectLibraries>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
```
Software installed in eclipse

|
@RelatedTo(elementClass = Concept.class) RelatedTo.elementClass must be a class liter
|
CC BY-SA 3.0
| null |
2011-05-16T12:58:22.070
|
2011-08-24T20:34:21.237
|
2011-08-24T20:34:21.237
| 852,604 | 457,208 |
[
"java",
"spring",
"neo4j",
"spring-data-graph"
] |
6,018,106 | 1 | 6,018,437 | null | 18 | 4,436 |
I'm drawing a chart by direct calls to `DrawLine` on the `DrawingContext`. Since I want to avoid any anti aliasing feature, I tryed to put the SnapToDevicePixels=true on the parent UIElement, but I still have anti-alias:

The project was an old OS project not written for WPF4, but I retarget it to the Framework4, can this be an issue too ?
|
WPF DrawingContext seems ignore SnapToDevicePixels
|
CC BY-SA 3.0
| null |
2011-05-16T13:25:23.237
|
2017-07-19T11:44:23.153
| null | null | 566,608 |
[
"wpf",
"graphics",
"antialiasing"
] |
6,018,126 | 1 | 9,273,186 | null | 1 | 5,700 |
I have an issue when I'm using Runtime.exec with my Android device and just can't figure out why it happens...
Here is an example of the tests I did :
```
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Runtime runtime = Runtime.getRuntime();
for(int i=0; i< 20; i++){
Log.d("TESTEXEC", "EXEC N°"+i+" : BEGIN");
try {
Process process = runtime.exec("/system/bin/ps");
process.getErrorStream().close();
process.getOutputStream().close();
process.getInputStream().close();
process.waitFor();
} catch (Throwable e) {
e.printStackTrace();
}
Log.d("TESTEXEC", "EXEC N°"+i+" : END");
}
}
}
```
So, basically, when this snippet works, it prints this :
```
EXEC N°0 : BEGIN
EXEC N°0 : END
EXEC N°1 : BEGIN
EXEC N°1 : END
...
EXEC N°19 : BEGIN
EXEC N°19 : END
```
But instead of that, sometimes (it looks like it's a bit random), it just prints
```
EXEC N°0 : BEGIN
```
And everything locks...
The whole things seems to crash into the runtime.exec("..."), and the process.getErrorStream.close() is never called.
Another strange thing : The bug always occurs on the first exec.
Here is what I get with DDMS :

I also retrieved the /data/anr/traces.txt, but it's not really useful :
```
----- pid 11489 at 2011-05-16 15:15:10 -----
Cmd line: com.testexec
DALVIK THREADS:
"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x4001d8d0 self=0xcca0
| sysTid=11489 nice=0 sched=0/0 cgrp=unknown handle=-1345021856
at java.lang.ProcessManager.exec(Native Method)
at java.lang.ProcessManager.exec(ProcessManager.java:224)
at java.lang.Runtime.exec(Runtime.java:196)
at java.lang.Runtime.exec(Runtime.java:285)
at java.lang.Runtime.exec(Runtime.java:218)
at com.testexec.MainActivity.onCreate(MainActivity.java:17)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2629)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2681)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4641)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
"java.lang.ProcessManager" daemon prio=5 tid=8 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x460969f0 self=0x240f58
| sysTid=11496 nice=0 sched=0/0 cgrp=unknown handle=2363544
at java.lang.ProcessManager.watchChildren(Native Method)
at java.lang.ProcessManager$1.run(ProcessManager.java:87)
"Binder Thread #2" prio=5 tid=7 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x460895a0 self=0x1248e0
| sysTid=11495 nice=0 sched=0/0 cgrp=unknown handle=1236304
at dalvik.system.NativeStart.run(Native Method)
"Binder Thread #1" prio=5 tid=6 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x46086cf8 self=0x143480
| sysTid=11494 nice=0 sched=0/0 cgrp=unknown handle=1324096
at dalvik.system.NativeStart.run(Native Method)
"Compiler" daemon prio=5 tid=5 VMWAIT
| group="system" sCount=1 dsCount=0 s=N obj=0x46084558 self=0x144560
| sysTid=11493 nice=0 sched=0/0 cgrp=unknown handle=1153256
at dalvik.system.NativeStart.run(Native Method)
"JDWP" daemon prio=5 tid=4 VMWAIT
| group="system" sCount=1 dsCount=0 s=N obj=0x460842a0 self=0x12dc10
| sysTid=11492 nice=0 sched=0/0 cgrp=unknown handle=1152968
at dalvik.system.NativeStart.run(Native Method)
"Signal Catcher" daemon prio=5 tid=3 RUNNABLE
| group="system" sCount=0 dsCount=0 s=N obj=0x460841e8 self=0x124d00
| sysTid=11491 nice=0 sched=0/0 cgrp=unknown handle=1199296
at dalvik.system.NativeStart.run(Native Method)
"HeapWorker" daemon prio=5 tid=2 VMWAIT
| group="system" sCount=1 dsCount=0 s=N obj=0x441e2ee8 self=0x11fdd8
| sysTid=11490 nice=0 sched=0/0 cgrp=unknown handle=1185776
at dalvik.system.NativeStart.run(Native Method)
----- end 11489 -----
```
I'm kinda desesperate right now, so if anyone has an idea, I'd really appreciate it.
|
Problem with Runtime.exec and Android
|
CC BY-SA 3.0
| null |
2011-05-16T13:27:13.250
|
2016-09-06T09:37:00.640
| null | null | 668,244 |
[
"java",
"android",
"exec",
"runtime.exec"
] |
6,018,268 | 1 | null | null | 0 | 404 |
Which win32 API should I set bp on to investigate how it does `http proxy`?
How does fiddler manage to capture all http requests of all processes?
I know it has a built-in http proxy server,but how does it make all processes use its http proxy?

|
How to track down how fiddler's auto responder works?
|
CC BY-SA 3.0
| null |
2011-05-16T13:37:54.293
|
2012-02-08T13:29:56.367
|
2011-05-17T15:18:13.307
| 641,151 | 641,151 |
[
"windbg",
"fiddler",
"http-proxy"
] |
6,018,360 | 1 | null | null | 1 | 1,488 |
I have stored the name called in sqlite DB as a varchar.When I read this into a `NSString` variable to display in `UITableView` as a `textlabel`
```
//cell.textLabel.text = name;
```
It is not dispalyed as it is supposed to be.
I want to display it as only without adding any extra character. Please help me

|
how to display characters like ä, ö, ü, ß, Ä, Ö, Ü,é in uitableview as a textlabel
|
CC BY-SA 3.0
| null |
2011-05-16T13:45:28.133
|
2011-05-16T14:15:56.053
|
2011-05-16T13:57:11.307
| 612,606 | 510,892 |
[
"iphone",
"objective-c",
"encoding",
"nsstring"
] |
6,018,362 | 1 | 6,019,088 | null | 16 | 20,671 |
I've been reading about layouts, sections, views and partial views, but I don't really know how to approach a layout like this example:

- Top bar: would be like the bar that
Facebook have on top. I would contain
the authentication information and
general options and menus.- Navigation bar: would contain
information about where are you, and
where can you go. Also a "search"
box.- Body: The actual wanted information.- Side bar: would contain relevant
information about what is in the
body.- Footer: copyright, licence and things
like that.
would be a "View", would be a "Section", would be static HTML in the "Layout", but... what would be bar and ?
is not related with anything, so I would put it as a "Partial View" in the "Layout", but I cannot do that because it has to be inside the `<body>` anyway, so when I call `@RenderBody()`, it should be rendered. Same thing with , it's somehow related with the body, but I'd like to separate it as an external control that runs on his own and show information depending on the information in the URL.
How should I approach this?
The question about CSS and HTML, it's not about how to layout this, but how to use the Razor tools to do it, it's about Razor `RenderBody` and `PartialView`.
When I return a result from my controller, I want to return just what is marked in the picture as "body", and "side bar" as a section, I'd like to avoid repeat the top bar code. Is there a way to create a "ChildView", that inherits from "ParentView", and this from "Layout", in a way that when I return "View("ChildView") the screen is built automatically?
|
How to layout a page with MVC3 Razor?
|
CC BY-SA 3.0
| 0 |
2011-05-16T13:46:01.330
|
2014-10-04T00:46:15.110
|
2011-05-16T14:31:21.903
| 307,976 | 307,976 |
[
"asp.net-mvc",
"asp.net-mvc-3",
"layout",
"razor"
] |
6,018,470 | 1 | 6,023,839 | null | 5 | 730 |
I am presenting a UIPopoverController in my application but the content view is appearing slightly blurred.
To demonstrate, I placed a second instance of the content view controller directly onto self.view and it is easy to see by comparison that the text in the popover is fuzzy. This issue occurs both on the device and in the Simulator.

```
// ...
// init the edit view controller
editSOViewController = [[EditViewController alloc]
initForNewObjectWithDict:dict];
// init popover with editSOViewController
UIPopoverController *popover = [[UIPopoverController alloc]
initWithContentViewController:editSOViewController];
// set size
navPopover.popoverContentSize =
CGSizeMake(editSOViewController.view.frame.size.width,
[editSOViewController heightForViewControllerInPopoverView]);
// this is blurry
[popover presentPopoverFromRect:image.frame
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
// this is clear
editViewController *test =
[[EditViewController alloc] initForNewObjectWithDict:dict];
[self.view addSubview:test.view];
```
Any ideas for what could cause this? I thought that the UIPopover might be slightly shrinking the view, but I lined the two examples up with an image editor and there is no difference in size (but distinct "fuzz" in the popover view).
I still have the same problem if i use WEPopover ([https://github.com/werner77/WEPopover/](https://github.com/werner77/WEPopover/)).
Thanks.
|
Contents of UIPopoverController are blurry
|
CC BY-SA 3.0
| null |
2011-05-16T13:53:24.257
|
2011-12-11T23:53:44.530
|
2011-12-11T23:53:44.530
| 91,299 | 752,273 |
[
"ios",
"ipad",
"blurry",
"uipopover"
] |
6,018,760 | 1 | 6,019,612 | null | 4 | 4,572 |
I have a problem with the HTML `fieldset` element in Chrome.
I want to have a fixed-height `fieldset`, and within it a scrollable `div`. Everything looks fine until I put a `legend` in - when I do so, the `div` spills out from the bottom of the `fieldset`. I also checked in Firefox, and it does not do this (i.e. does exactly what I would expect).
Anyone else seeing this? Is it a Chrome bug? Anyone know if there is a hack for this?
```
<!DOCTYPE HTML>
<html>
<head>
<title>a</title>
<style>
fieldset {
height: 80px;
}
fieldset div {
height: 100%;
overflow-y: scroll;
}
</style>
</head>
<body>
<fieldset>
<legend>Test</legend>
<div>
Foo!<br/>
Foo!<br/>
Foo!<br/>
Foo!<br/>
Foo!<br/>
Foo!<br/>
</div>
</fieldset>
</body>
</html>
```

|
HTML Fieldset content overflows at 100% height (Chrome)
|
CC BY-SA 3.0
| 0 |
2011-05-16T14:19:37.303
|
2014-04-10T22:11:53.990
|
2011-05-16T14:36:40.663
| 240,443 | 240,443 |
[
"html",
"css",
"google-chrome",
"fieldset"
] |
6,018,991 | 1 | 6,021,577 | null | 2 | 906 |
This is an example. I want to know if there is a general way to deal with this kind of problems.
Suppose I have a function (a ε ℜ) :
```
f[a_, n_Integer, m_Integer] := Sum[a^i k[i],{i,0,n}]^m
```

And I need a closed form for the coefficient a^p. What is the better way to proceed?
:In this particular case, one could go manually trying to represent the sum through [Multinomial[ ]](http://reference.wolfram.com/mathematica/ref/Multinomial.html), but it seems difficult to write down the Multinomial terms for a variable number of arguments, and besides, I want Mma to do it.
: Of course
```
Collect[f[a, 3, 4], a]
```
Will do, but only for a given `m` and `n`.
: This question is related to [this other one](https://math.stackexchange.com/questions/35591/a-series-solution-of-the-differential-equation-fracd2uxdx2-uxn-0). My application is different, but probably the same methods apply. So, feel free to answer both with a single shot.
:
You can model the multinomial theorem with a function like:
```
f[n_, m_] :=
Sum[KroneckerDelta[m - Sum[r[i], {i, n}]]
(Multinomial @@ Sequence@Array[r, n])
Product[x[i]^r[i], {i, n}],
Evaluate@(Sequence @@ Table[{r[i], 0, m}, {i, 1, n}])];
```
So, for example
```
f[2,3]
```
is the cube of a binomial
```
x[1]^3+ 3 x[1]^2 x[2]+ 3 x[1] x[2]^2+ x[2]^3
```
|
Summation up to a variable integer: How to get the coefficients?
|
CC BY-SA 3.0
| null |
2011-05-16T14:37:46.160
|
2011-08-24T04:13:14.677
|
2017-04-13T12:19:15.763
| -1 | 353,410 |
[
"wolfram-mathematica"
] |
6,019,240 | 1 | 6,025,578 | null | 3 | 1,156 |
I'm using NSXMLParser and I get a memory leak that points to NSConcreteMapTable, whatever that is:

The leak occurs at this line of code when calling the parser from my AppDelegate.m:

I have searched for a solution and can't see what I'm doing wrong.
Here is my code.
Any help is greatly appreciated.
lq
```
// * * * XMLParser.h * * *
#import <Foundation/Foundation.h>
@protocol NSXMLParserDelegate;
@interface XMLParser : NSObject
<NSXMLParserDelegate>
{
NSMutableArray *xmlArray;
BOOL storingCharacters;
float xmlDataVersion;
}
@property (nonatomic, retain) NSMutableArray *xmlArray;
@property (nonatomic) BOOL storingCharacters;
@property (nonatomic, assign) float xmlDataVersion;
-(BOOL)parseXMLFileAtURL:(NSURL *)URL parseError:(NSError **)error;
@end
// * * * XMLParser.m * * *
#import "XMLParser.h"
@implementation XMLParser
@synthesize xmlArray;
@synthesize storingCharacters;
@synthesize xmlDataVersion;
- (BOOL)parseXMLFileAtURL:(NSURL *)URL parseError:(NSError **)error {
BOOL result = YES;
if (xmlArray == nil) {
// this array holds row data extracted from the XML parser didStartElement method
xmlArray = [[NSMutableArray alloc] init];
}
[[NSURLCache sharedURLCache] setMemoryCapacity:0];
[[NSURLCache sharedURLCache] setDiskCapacity:0];
NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:URL];
if (parser != nil) {
[parser setDelegate:self];
[parser setShouldProcessNamespaces:NO];
[parser setShouldReportNamespacePrefixes:NO];
[[parser setShouldResolveExternalEntities:NO];
}
[parser parse];
if (parseError && error) {
*error = parseError;
result = NO;
}
[parser release];
return result;
}
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict {
if (qName) {
elementName = qName;
}
// Check the data version of the XML Data against my stored value
if ([elementName isEqualToString:@"data"]) {
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
self.xmlDataVersion = [[attributeDict objectForKey:@"version"] floatValue];
float storedDataVersion = [userDefaults floatForKey:kDataVersion];
if (self.xmlDataVersion <= storedDataVersion) {
// - - - - -> Abort parsing if the same or earlier data versions
[parser abortParsing];
}
}
if ([elementName isEqualToString:@"FirstColumnName"]) {
storingCharacters = YES;
} else if ([elementName isEqualToString:@"SecondColumnName"]) {
storingCharacters = YES;
// ... total of 16 elements
}
}
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string {
if (storingCharacters) {
[self.xmlArray addObject:string];
}
}
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName {
if (qName) {
elementName = qName;
}
// - - - - -> If at the end of a data row, save changes to object model
if ([elementName isEqualToString:@"ROW"]) {
// - - - - -> Make sure the data has the required number of elements before taking any action
if ([self.xmlArray count] == 16) {
// … //Store or Update Data in SQLite store depending on data values
}
[self.xmlArray removeAllObjects];
}
storingCharacters = NO;
}
-(void)dealloc {
[xmlArray release];
[super dealloc];
}
// * * * AppDelegate.m * * *
#import "XMLParser.h"
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(UIApplication *)application {
NSURL *xmlURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"FileName" ofType:@"xml"]];
NSError *parseError = nil;
XMLParser *xmlParse = [[XMLParser alloc] init];
[xmlParse parseXMLFileAtURL:xmlURL parseError:&parseError];
[xmlParse release];
. . .
```
}
|
Memory Leak Using NSXMLParser in NSConcreteMapTable
|
CC BY-SA 3.0
| 0 |
2011-05-16T14:56:56.123
|
2011-05-17T02:23:46.423
|
2011-05-16T19:57:14.617
| 350,243 | 350,243 |
[
"xcode",
"memory-leaks",
"nsxmlparser"
] |
6,019,291 | 1 | 6,021,613 | null | 0 | 638 |
I'm using Aptana 3. I'm selecting some fragment of code (`innerHTML`) and I want search for it in files using shortcut `Ctrl+H`. But then some tooltip is showing, and I have to press `2` key to get search dialog. How turn it off? I want seach dialog just after `Ctrl + H`.

|
Disabling tip in Aptana Studio 3
|
CC BY-SA 3.0
| null |
2011-05-16T15:01:23.570
|
2011-06-18T17:14:19.147
| null | null | 269,804 |
[
"javascript",
"aptana"
] |
6,019,698 | 1 | 6,035,091 | null | 3 | 3,495 |
Is there a way to access the (JDBG) contained in an executable?
Microsoft debugging tools have pointed me to a stack chain in my binary, and i want to know what methods/procedures/functions these offsets correspond to:
```
user32.dll!SendMessageA+0x4c
StackOverflow.exe+0x179263
StackOverflow.exe+0x2315b5
StackOverflow.exe+0x1fc82
StackOverflow.exe+0x50388
StackOverflow.exe+0x541fe
user32.dll!gapfnScSendMessage+0x332
```
Obviously i'm calling `SendMessage`, but i don't know from where. The executable was built with Jcl Debug info embedded in the executable; but i can't figure out how to read it.
Looking at some of the functions and classes in `JclDebug.pas`, everything seems to be geared around getting debug information for inside the current process, e.g.:
```
function GetLocationInfo(const Addr: Pointer; var Info: TJclLocationInfo): Boolean;
```
takes an address in my current process's address space. It the figures out which `HMODULE` the address is in, e.g.:
- - - - - -
---
i was thinking i could use `LoadLibrary` (which returns an `HMODULE`) to manually load a module, then feed it to some of the classes that dig through module images for debug info:
```
module := LoadLibrary('C:\Users\Ian\Desktop\StackOverflow.exe');
```
and
```
TJclDebugInfoList = class(TObjectList)
private
function GetItemFromModule(const Module: HMODULE): TJclDebugInfoSource;
...
protected
function CreateDebugInfo(const Module: HMODULE): TJclDebugInfoSource;
...
end;
```
except it's protected.
i'm trying (hoping) i can write a tool where i pick the binary (*.exe), enter an address, and get returned the
- - - -
of the offset.
e.g.
```
[002315B5] FMain.TfrmMain.lvQuestions (Line 158, "FMain.pas" + 1) + $11
```
Possible?
---
My first, rough and ready approach, was to just extract the compressed `map` file so i could look at it. But it's not saved as a resource ():

Although a general tool would be more useful:

---
:
i tried using `TJclDebugInfoList`; i realized that the array property `ItemFromModule` would access the protected method:
```
function GetModuleLocationInfo(filename: string; Addr: Pointer): TJclLocationInfo;
var
module: HMODULE;
infoList: TJclDebugInfoList;
infoSource: TJclDebugInfoSource;
Address: Pointer;
locationInfo: TJclLocationInfo;
AddressOffset: Integer;
begin
module := LoadLibrary(filename);
if module = 0 then
RaiseLastWin32Error;
try
infoList := TJclDebugInfoList.Create;
try
infoSource := infoList.ItemFromModule[module];
if source = nil then
raise Exception.Create('Could not find debug info source for module '+IntToStr(module));
if not source.GetLocationInfo(Addr, {var}locationInfo) then
raise Exception.Create('Could not get location info for address $'+IntToHex(Integer(Address), 8));
Result := locationInfo;
finally
infoList.Free;
end;
finally
FreeLibrary(module);
end;
end;
```
Except that the code in one of the `TJclDebugInfoSource` descendant classes gets an underflow when it tries to convert what it assumes is a virtual address to an offset address.
|
Access JCL Debug information contained in executable?
|
CC BY-SA 3.0
| 0 |
2011-05-16T15:31:59.073
|
2016-01-15T04:21:11.613
|
2011-07-26T19:47:10.493
| 58,074 | 12,597 |
[
"delphi",
"delphi-5",
"jedi-code-library"
] |
6,019,783 | 1 | 6,035,687 | null | 1 | 371 |
I am hoping someone can please point out what's not working about this font-face implementation. I've testing this using the body tag so there's no question as to whether the issue is with the HTML (yes, I do have a body tag.)
I have obtained the fonts and the implementation CSS from FontSquirrel. Thanks for looking at this!
CSS:
```
@font-face {
font-family: 'DymaxionScriptRegular';
src: url('DymaxionScript-webfont.eot');
src: url('DymaxionScript-webfont.eot?#iefix') format('embedded-opentype'),
url('DymaxionScript-webfont.woff') format('woff'),
url('DymaxionScript-webfont.ttf') format('truetype'),
url('DymaxionScript-webfont.svg#DymaxionScriptRegular') format('svg');
font-weight: normal;
font-style: normal;
}
body {
font-family: DymaxionScriptRegular, courier;
}
```
File tree structure:

Screenshot of Courier fallback font:

: Apparently if one leaves "Regular" off of the font-family declaration, everything works fine. Answered my own question by playing with it.
: My first "answer" only worked in Safari. What worked in all of them was changing "'DymaxionScript-webfont..." to '../DymaxionScript-webfont... After I did that, everything worked. It was bad pathing.
|
Why doesn't this @font-face style apply to my HTML?
|
CC BY-SA 3.0
| null |
2011-05-16T15:39:02.947
|
2012-04-09T17:52:31.997
|
2012-04-09T17:52:31.997
| 106,224 | 321,922 |
[
"css",
"font-face",
"blueprint-css"
] |
6,019,871 | 1 | 6,020,051 | null | 5 | 2,390 |
I have worked in project for long time but after electricity has cut off and my PC shutdown.
The code in one of my frames not shown correctly, it's showing like this :

I have GUI and its shape is fine. When I run the frame from main interface it works, but as I said the code is corrupted. I don't know why. If any one has any solution for this problem it would be much appreciated.
|
Netbeans does not show my code
|
CC BY-SA 3.0
| 0 |
2011-05-16T15:47:22.880
|
2015-07-27T21:04:28.290
|
2015-07-27T21:04:28.290
| 64,046 | 689,073 |
[
"netbeans",
"restore"
] |
6,020,163 | 1 | null | null | 1 | 451 |
I have this code that is giving me a headache:
/ original code removed, see current version below /
The message I receive:
`*** -[__NSDate class]: message sent to deallocated instance 0x69fa350`
To test it, I have moved everything into one method, and verified that it still produces the same error.
This is a splitView iPad app. A `voiceMemo` object is passed by the left-side table view controller upon selection. The right side view has a tableView on its own, this is where I am loading the reminders.
What happens, is this:
Initially, everything loads correctly. Without any `reminder` data in my database, I can select any entry, it loads correctly. I can delete them, modify them, etc.
I can select an entry with `reminder` data, and it loads correctly. The table view in the detail view is correctly populated with data. However, trying to modify a `reminder`, the program crashes: message sent to deallocated instance.
Without trying to modify any data, the program crashes if I try to load another entry WITH `reminder` data.
I can delete entries which have no `reminder` from the (left side) main table view, but when trying to delete one `reminder` data, it crashes (on the `save` method). The next time I start the program, the entry is deleted, though.
The database and the custom classes are shared with the iPhone version, which works correctly.
```
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
/* only relevant parts posted */
// Left-side label (title)
NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc]
initWithKey:@"DBreminderDate" ascending:YES] autorelease];
NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
NSMutableArray *sortedReminders = [NSMutableArray arrayWithArray:
[voiceMemo.reminders allObjects]];
[sortedReminders sortUsingDescriptors:sortDescriptors];
self.remindersArray = sortedReminders;
AKReminder *reminder = [remindersArray objectAtIndex:indexPath.row];
cell.textLabel.text = reminder.DBreminderTitle;
if ([cell.textLabel.text length] == 0) {
cell.textLabel.text = @"Reminder";
}
// Right-side label (date)
NSDateFormatter *format = [[NSDateFormatter alloc] init];
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
[format setLocale:locale];
[locale release];
NSDate *reminderSetTo = reminder.DBreminderDate;
cell.detailTextLabel.text = [NSString stringWithFormat:@"%@", [format
stringFromDate:reminderSetTo]]; // breaks here
return cell;
}
```
My data model:

|
Message sent to deallocated instance, when working with an NSManagedObject indirectly
|
CC BY-SA 3.0
| null |
2011-05-16T16:09:43.843
|
2011-05-16T21:31:35.450
|
2011-05-16T21:31:35.450
| 560,496 | 560,496 |
[
"cocoa-touch",
"ios",
"memory",
"nsmanagedobject"
] |
6,020,246 | 1 | 6,020,309 | null | 3 | 6,020 |
I have a custom class Spieltag containing a property SpieltagDaten (custom class). SPieltagDaten has a property called SpieleGespielt. I have set this property as target of a binding on textbox text-property.
The binding works just fine as the initial value of the property is beeing displayed but when the property changes the textbox is not beeing updated.
The PropertyChanged event is fired and the parameter is spelled correctly.
This is what the code looks like:
This is the textbox with binding:
```
<TextBlock Name="textBlockGespielt"
Text="{Binding Path=MySpieltag.Daten,
Converter={util:SpieltagDatenToStringConverter},
ConverterParameter=SpieleGespielt,
UpdateSourceTrigger=PropertyChanged}" />
```
In constructor of the window I set
```
this.DataContext = this;
```
This is the root-class of the model containing a property called Daten:
```
public class Spieltag : ModelBase {
private ISpieltagDaten daten;
public ISpieltagDaten Daten
{
get { return daten; }
set { daten = value; Changed("Daten"); }
}
}
```
SpieltagDaten contains a property SpieleGespielt
```
public class SpieltagDaten : ModelBase, interfaces.ISpieltagDaten
{
private int _spieleGespielt;
public Int32 SpieleGespielt
{
get { return _spieleGespielt; }
set { _spieleGespielt = value; Changed("SpieleGespielt"); }
}
}
```
ModelBase implements INotifyPropertyChanged:
```
public class ModelBase: INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged = delegate { };
protected void Changed(String propertyName)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
}
```
edit:
I forget to post the Converter. It's derived from MarkupExtension so I can use it easy in xaml:
```
class SpieltagDatenToStringConverter : MarkupExtension, IValueConverter
{
private static SpieltagDatenToStringConverter _converter = null;
public override object ProvideValue(IServiceProvider serviceProvider)
{
if (_converter == null)
{
_converter = new SpieltagDatenToStringConverter();
}
return _converter;
}
public object Convert(object value, Type targetType,
object parameter, System.Globalization.CultureInfo culture)
{
ISpieltagDaten daten = (ISpieltagDaten)value;
string res = String.Empty;
string propertyName = parameter.ToString();
PropertyInfo pi = typeof(ISpieltagDaten).GetProperty(propertyName);
if (pi != null)
{
res = pi.GetValue(daten,null).ToString();
}
return res;
}
public object ConvertBack(object values, Type targetType,
object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
```
The converter is beeing called on the initial setup of the model.

|
WPF: binding to custom class property. PropertyChanged is fired but view does not update
|
CC BY-SA 3.0
| null |
2011-05-16T16:18:10.303
|
2012-02-14T11:16:01.040
|
2012-02-14T11:16:01.040
| 738,244 | 738,244 |
[
"c#",
"wpf",
"inotifypropertychanged"
] |
6,020,342 | 1 | 6,020,606 | null | 0 | 340 |
Hi I'm having a daft problem with my android application.
Currently it looks like this:

Is there a way of making the button go to the bottom in the middle? I've tried messing around but same effect. Also tried changing the fill_parent/wrap_content, relative/linear layouts and gravities.
This is the screenshot of the .xml file

many thanks.
|
Android Layout Issue
|
CC BY-SA 3.0
| null |
2011-05-16T16:25:22.307
|
2011-05-16T21:34:28.163
|
2011-05-16T16:28:09.310
| 139,010 | 737,081 |
[
"android",
"layout",
"android-layout"
] |
6,020,356 | 1 | 6,020,474 | null | 0 | 115 |
I am still bit new to Android layout designing. I need small help to design a layout that looks like this with dynamically loading images/text. Please advice how to do it.

|
Android Layout help
|
CC BY-SA 3.0
| null |
2011-05-16T16:26:36.957
|
2017-08-04T05:40:31.667
| null | null | 192,901 |
[
"android"
] |
6,020,406 | 1 | 6,094,092 | null | 29 | 29,339 |

Hi i have a `bmp` loaded to a `BMP` object and im required to travel though the pixels as the above image from `(1,1)` pixel to `(100,100)` px . using `getpixel()` method. I was using was loop but it was not successful .
If im using the concept of multidimensional array what should be variable values ?
|
Travel through pixels in BMP
|
CC BY-SA 3.0
| 0 |
2011-05-16T16:30:21.367
|
2019-12-20T17:02:44.850
|
2011-05-26T23:28:26.443
| 707,111 | 296,231 |
[
"c#",
".net",
"image-processing"
] |
6,020,552 | 1 | null | null | 6 | 6,354 |
I want to make a checkmark UIButton in iOS like the second icon in the enclosed image.
Does Apple provide this checkmark button in the SDK ?
Any suggestion to make a checkmark UIButton ?
Thanks.

|
How to make a checkmark UIButton in iOS?
|
CC BY-SA 3.0
| null |
2011-05-16T16:41:44.863
|
2011-05-16T16:49:24.913
| null | null | 403,015 |
[
"iphone",
"ios",
"ipad"
] |
6,020,829 | 1 | 6,090,993 | null | 8 | 2,003 |
I am trying to map a texture onto a square where the texture stretches to fit the square. Currently the texture maps, but it doesn't map to the correct location and OGL performs some skewing or such that is unbeknownst to me. The image is 64x64 and the squares I've tried are from -2 to 2 (hor and ver) and -1 to 1. Here is the image:

The texture code is:
```
float texture[] = { 0,0,0,1, 1,0,1,1 };
ByteBuffer byteBuf = ByteBuffer.allocateDirect(texture.length * 4);
byteBuf.order(ByteOrder.nativeOrder());
FloatBuffer textureBuffer = byteBuf.asFloatBuffer();
textureBuffer.put(texture);
textureBuffer.flip();
int[] buffer = new int[1];
gl11.glGenBuffers(1, buffer, 0);
textureCoordPointer = buffer[0];
gl11.glBindBuffer(GL11.GL_TEXTURE_COORD_ARRAY, textureCoordPointer);
gl11.glBufferData(GL11.GL_TEXTURE_COORD_ARRAY, textureBuffer.capacity()
* 4, textureBuffer, GL11.GL_STATIC_DRAW);
gl11.glBindBuffer(GL11.GL_TEXTURE_COORD_ARRAY, 0);
Bitmap bitmap = BitmapFactory.decodeResource(context
.getResources(),R.drawable.afd);
int textures[] = new int[1];
gl.glGenTextures(1, textures, 0);
texturePointer = textures[0];
gl.glBindTexture(GL10.GL_TEXTURE_2D, texturePointer);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
bitmap.recycle();
```
and the code for the rendering is:
```
gl11.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, vertexPointerSquare);
gl11.glVertexPointer(3, GL10.GL_FLOAT, 0, 0);
gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, indexPointerSquare);
gl.glBindTexture(GL10.GL_TEXTURE_2D, texturePointer);
gl11.glBindBuffer(GL11.GL_TEXTURE_COORD_ARRAY, textureCoordPointer);
gl11.glTexCoordPointer(2, GL10.GL_FLOAT, 0, 0);
gl11.glPushMatrix();
gl11.glScalef(.4f,.4f,0);
gl11.glColor4f(1,1,1,1);
gl11.glDrawElements(GL11.GL_TRIANGLE_STRIP, indicesSquare,
GL11.GL_UNSIGNED_SHORT, 0);
gl11.glPopMatrix();
gl.glBindTexture(GL10.GL_TEXTURE_2D, 0);
```
And the square:
```
GL11 gl11 = (GL11) gl;
FloatBuffer vertexSquareBuffer = ByteBuffer.allocateDirect(verticesSquare * 3 * 4)
.order(ByteOrder.nativeOrder()).asFloatBuffer();
ShortBuffer indexSquareBuffer = ByteBuffer.allocateDirect(indicesSquare * 2)
.order(ByteOrder.nativeOrder()).asShortBuffer();
float vertices[] = { 1f, 1f, 0, 1f, -1f, 0, -1f, 1f, 0, -1f, -1f, 0 };
short indices[] = { 0, 1, 2, 3 };
vertexSquareBuffer.put(vertices);
indexSquareBuffer.put(indices);
indexSquareBuffer.flip();
vertexSquareBuffer.flip();
int[] bufferSquare = new int[1];
gl11.glGenBuffers(1, bufferSquare, 0);
vertexPointerSquare = bufferSquare[0];
gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, vertexPointerSquare);
gl11.glBufferData(GL11.GL_ARRAY_BUFFER, vertexSquareBuffer.capacity() * 4,
vertexSquareBuffer, GL11.GL_STATIC_DRAW);
gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
gl11.glGenBuffers(1, bufferSquare, 0);
indexPointerSquare = bufferSquare[0];
gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, indexPointerSquare);
gl11.glBufferData(GL11.GL_ELEMENT_ARRAY_BUFFER, indexSquareBuffer.capacity() * 2,
indexSquareBuffer, GL11.GL_STATIC_DRAW);
```
I am using an ortho perspective
`gl.glOrthof(-windowRatio, windowRatio, -1,1, -4, 4)`
. I have tried drawArrays(), which makes no difference, and also using many combinations of `glTexParameter`. The problem seems twofold: (1) the image doesn't stretch to fit, and (2) only the left triangle of the square correctly renders the texture. Something I've noticed is that changing the texture coordinates has no effect on the image. How do I get this to work as intended? Thanks for looking.
|
Opengl ES 1.1/Android -- The texture-mapping-to-a-square debacle of 2011
|
CC BY-SA 3.0
| 0 |
2011-05-16T17:07:21.333
|
2011-06-15T01:55:21.280
|
2011-05-22T17:37:41.673
| 371,588 | 371,588 |
[
"android",
"graphics",
"opengl-es",
"textures"
] |
6,021,059 | 1 | null | null | 1 | 2,320 |
I work with Sqlite database in C# and I have this question: Does Sqlite database support Persian/Arabic encoding? Because I have written some Arabic/Persian data in it and when I want to read data from database it is read in unsuitable form!!!
my code :
```
int len = ds.Tables["tbl"].Rows.Count;
int index = rnd.Next(0, len - 1);
//notifyIcon1.ShowBalloonTip(15, "پیام عشق ", ds.Tables["tbl"].Rows[index][0].ToString(), ToolTipIcon.Info);
string str = ds.Tables["tbl"].Rows[index][0].ToString();
MessageBox.Show(str);
```
thanks .
next of my code :
```
DataSet ds;
ds = SQLite_DB.Select_DB(SQLite_DB.Con_string("data.s3db"), "select * from info");
```
|
Does Sqlite database support persian/arabic encoding?
|
CC BY-SA 3.0
| null |
2011-05-16T17:29:19.110
|
2014-12-18T20:59:45.030
|
2011-05-16T18:50:30.067
| 115,751 | 502,343 |
[
"c#",
"sqlite",
"encoding",
"persian"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.