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
sequence
2,127,875
1
2,128,192
null
20
33,515
How do I show that the WebServer instantiates a View and gets back control of the flow? Maybe I'm not using the right type of diagram? Thanks a bunch! ![alt text](https://lh3.ggpht.com/_iOSSgpmzHfc/S1x6mE3eoYI/AAAAAAAADfQ/Gp2WahiFAi0/s800/SeqDiagram.jpg)
How do you show instantiation in a UML Sequence Diagram?
CC BY-SA 2.5
0
2010-01-24T16:53:50.157
2019-06-18T13:06:35.643
2017-02-08T14:20:10.547
-1
94,777
[ "uml", "sequence-diagram" ]
2,128,040
1
2,189,044
null
5
7,525
Based on the answers I received at [superuser](https://superuser.com/questions/96995/windows-explorer-7-command-line), it's clear that I'll have to add the following to a custom Explorer Window launcher. I want to launch a rooted explorer view, and for make the navigation pane look like the old Windows XP folders pane. I already [wrote a program](http://blog.280z28.org/archives/2010/01/91/) to place shortcuts to these folder views on the Start Menu, so changing the shortcuts to run through a launcher is trivial. # Here's the XP folders pane: ![Windows XP Explorer Folders Pane](https://www.howtogeek.com/wp-content/uploads/2008/02/image66.png) # Here's the Windows 7 Navigation Pane: [](https://i.stack.imgur.com/B0rjv.png) [280z28.org](http://www.280z28.org/images/NavigationPaneProblems.png)
Manipulating the Windows 7 Explorer navigation pane
CC BY-SA 4.0
0
2010-01-24T17:45:35.960
2019-06-07T19:05:20.040
2019-06-07T19:05:20.040
4,751,173
138,304
[ "navigation", "windows-explorer", "windows-shell" ]
2,128,283
1
2,128,440
null
4
727
I've noticed some seemingly weird issues in Visual Studio 2008 (.NET 3.5) and also in Visual Studio 2010 Beta 2 (.NET 4.0). These issues may have existed in prior versions as well. Maybe they are not an issue, but either way, I would like to see if there is are logical explanations for these before I submit a report on Microsoft Connect. The Setup (in VB, C# results differ and are included later in the post): ``` Public Class SomeClass Public Property SomeProperty() As String Get Return String.Empty End Get Set(ByVal value As String) End Set End Property End Class Public Class SomeOtherClass Public Sub New() Dim sc As New SomeClass() Me.SomeFunction(sc.SomeProperty) End Sub ''' <summary>The param as Object fn()</summary> ''' Public Sub SomeFunction(ByVal param As Object) End Sub ''' <summary>The param as T fn()</summary> ''' Public Sub SomeFunction(Of T)(ByRef param As T) End Sub End Class ``` In this sutation, the `Me.SomeFunction(sc.SomeProperty)` call, from the point of view of IntelliSense, looks like this: ![alt text](https://dl.dropbox.com/u/215878/non-private-vb.png) and, not surprisingly, this is also what is called at runtime. So, I guess the I have is, My guess is that the compiler and IntelliSense simply favor the templated versions over non-templated versions. At runtime, it is in fact the ByRef templated version of the function that is called. (This is not the defect, this is simply a personal want-to-know question.) Now, make a slight change to the `SomeProperty` property such that the setter is now private: ``` Public Property SomeProperty() As String Get Return String.Empty End Get Private Set(ByVal value As String) End Set End Property ``` As soon as you do this, the following happens to the `Me.SomeFunction(sc.SomeProperty)` line: ![alt text](https://dl.dropbox.com/u/215878/private-vb-eh.png) In this case, IntelliSense is suggesting that the ByVal Object overload version of the function is being called, however the error message is `the 'Set' accessor of property 'SomeProperty' is not accessible` indicating that the compiler is still expecting to call the ByRef templated version. So, this is my . This seems broken to me. Or am I missing something? If instead of having a private setter on `SomeProperty` but instead the property was simply marked ReadOnly and the setter part removed, then the ByRef templated version of the function is shown in IntelliSense and is called at runtime (with no runtime errors). So this leads me to my , As far as SomeFunction(Of T)(...) is concerned, in its current scope, that property should be as if it were ReadOnly and I would expect it to be callable just as if the property was in fact ReadOnly. But instead it produces a build error. In correlation with question three, doing the (with the Private setter), C# has the result I was expecting. ![alt text](https://dl.dropbox.com/u/215878/private-csharp-eh.png) Here, you can see IntelliSense is claiming that the SomeFunction(Object) overload of the function is being called and there is no build error. At runtime the SomeFunction(Object) version is in fact called. So, why isn't the same SomeFunction(Object) version being called in the VB.NET situation? Why does VB.NET still think the SomeFunction(Of T)(ByRef T) version need to be called? It looks like IntelliSense is nailing it correctly in both C# and VB.NET, the C# compiler is doing the right thing, but the VB.NET compiler is still convinced that it should be calling the ByRef templated version. To me it seems that the C# compiler is picking one overload, while the VB.NET compiler is picking a different overload, in the exact same situation. Am I wrong?
Bug in VB compiler and/or IntelliSense in both C# and VB WRT out-of-scope Property Setters and ByRef fn() Parameters
CC BY-SA 2.5
0
2010-01-24T18:57:23.147
2010-01-24T19:53:32.960
2017-02-08T14:20:12.263
-1
140,328
[ "c#", "vb.net", "compiler-construction", "intellisense" ]
2,128,644
1
null
null
3
684
I am working on a C# 2d soft body physics engine and I need to assign masses to an object's vertices given: a list of vertices (x,y positions), the total mass for the object, and the center of mass. The center of mass is given as: ![alt text](https://upload.wikimedia.org/math/f/5/2/f527be4ce422a6955d7179501be14841.png) where, ``` R = center of mass M = total mass mj = mass of vertex j rj = position of vertex j ``` I need an algorithm that can approximate each mj given R, M, and rj. I just want to clarify that I am aware that there are an infinite set of solutions. I am looking for a quick algorithm that finds a set of mj's (such that they are each sufficiently close to mj = M/[number of vertices] and where "sufficiently" is defined as some small floating point threshold). Also, each object will consist of about 5 to 35 points.
How can I calculate individual point masses?
CC BY-SA 2.5
0
2010-01-24T20:23:51.860
2010-01-26T04:39:34.770
2017-02-08T14:20:12.617
-1
183,986
[ "c#", "math", "physics", "linear-algebra" ]
2,128,830
1
2,128,933
null
4
1,453
I want to do something like this: user clicks on a button "Choose color", and a simple popup with e.g. 5 colors appears. I could do this with PopupWindow and inner ListView, but is there a simpler solution, like a specific widget for this? How it should look like: ![alt text](https://1.bp.blogspot.com/_9l0GmPwgCzk/SeAfVu4IazI/AAAAAAAAADs/ZZYmkwOOYTk/s400/device.png)
Android: How to create popup with choices
CC BY-SA 2.5
0
2010-01-24T21:03:38.910
2010-01-24T21:26:39.877
2017-02-08T14:20:12.953
-1
243,225
[ "android" ]
2,130,058
1
2,130,296
null
1
678
I'm trying to learn how to line up fields of a form using CSS instead of tables. I'm having a hard time with a CheckBox control. Here's the code: ``` <html xmlns="http://www.w3.org/1999/xhtml" > ``` ``` <label for="CheckBox1">CheckBox</label> <asp:CheckBox ID="CheckBox1" runat="server" /> <br /> <label for="TextBox1">TextBox</label> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <div> </div> </form> ``` Here's the CSS: ``` body { } label { width:300px; float:left; } ``` I'm getting something that looks like this: CheckBox [] [CheckBox1] TextBox [ ] Why is [CheckBox1] on the next line? Here's a pic: ![alt text](https://imgur.com/eQSTo.png) Also, is there a better way to do this?
ASP.NET - getting a form's fields to line up with CSS
CC BY-SA 2.5
null
2010-01-25T03:35:33.190
2010-01-25T07:05:04.910
null
null
62,151
[ "asp.net", "css", "webforms" ]
2,130,167
1
2,132,367
null
3
3,068
I'm getting funny behavior with CakePHP in my register new user form. It's a pretty basic username, email and password form. When the user types out and incomplete form it looks like this: ![http://imgur.com/fcpS5.png](https://i.stack.imgur.com/DYAff.png) Of course creation of the new user fails because the password and email fields are empty. When the form errors are shown it looks like this: ![http://imgur.com/Za9C4.png](https://i.stack.imgur.com/tsQIx.png) I'm not sure why the password field is filled up with text magically. Shouldn't it be empty?
CakePHP fills in the password field on create new user failure
CC BY-SA 3.0
0
2010-01-25T04:19:46.600
2011-12-15T23:02:49.030
2011-12-15T23:02:49.030
84,042
209,320
[ "php", "cakephp" ]
2,130,216
1
2,130,243
null
0
1,656
my view are fill in back of Navigationbar how can i make it continuous at the buttom of it. here is my code ``` WebViewController *webViewController = [[WebViewController alloc] initWithNibName:@"WebController" bundle:nil]; [[self navigationController] pushViewController:webViewController animated:YES]; [webViewController release]; ``` ![alt text](https://i708.photobucket.com/albums/ww82/RAGOpoR/img.jpg)
a problem when pushViewController with UIViewcontroller
CC BY-SA 2.5
0
2010-01-25T04:35:41.067
2010-01-25T04:45:05.420
2017-02-08T14:20:14.353
-1
203,372
[ "iphone", "uiviewcontroller", "uinavigationcontroller" ]
2,131,474
1
2,131,543
null
1
696
could you show me some algorithm or example code to display like that picture with or with out animation thanks for all advise ![alt text](https://i708.photobucket.com/albums/ww82/RAGOpoR/IMG_0138.png)
Need advise about loading screen on iPhone
CC BY-SA 2.5
null
2010-01-25T10:05:33.727
2010-01-25T10:18:59.040
2017-02-08T14:20:14.687
-1
203,372
[ "iphone", "uiview" ]
2,131,991
1
2,132,111
null
3
1,374
Eclipse on Linux (GTK+) has rather large UI elements which wastes screen real estate. Compare the Linux version (taken on Ubuntu 9.10): ![alt text](https://dl.dropbox.com/u/2113034/Eclipse%20on%20linux.png) with the Windows version: ![alt text](https://dl.dropbox.com/u/2113034/Eclipse%20on%20windows.png) Note the vertical size of the Project Explorer tab, the menubar, and the toolbar. Is it possible to tweak this somehow? How does this look in other Linux distributions?
Eclipse/GTK+ wasting screen real estate
CC BY-SA 2.5
0
2010-01-25T11:51:14.890
2016-08-03T05:56:23.540
2017-02-08T14:20:15.727
-1
13,051
[ "eclipse", "gtk" ]
2,133,257
1
null
null
30
41,299
I want to make the top of the navigation view a bit smaller. How would you achieve this? This is what I've tried so far, but as you can see, even though I make the navigationbar smaller, the area which it used to occupy is still there (black). ``` [window addSubview:[navigationController view]]; navigationController.view.frame = CGRectMake(0, 100, 320, 280); navigationController.navigationBar.frame = CGRectMake(0, 0, 320, 20); navigationController.view.backgroundColor = [UIColor blackColor]; [window makeKeyAndVisible]; ``` ![alt text](https://i.imgur.com/Rnp13.png)
iPhone - How set uinavigationbar height?
CC BY-SA 3.0
0
2010-01-25T15:24:54.040
2016-06-27T10:03:01.123
2012-11-01T22:18:53.037
128,875
128,875
[ "iphone", "height", "uinavigationbar" ]
2,134,467
1
null
null
7
14,659
alright so im having a problem with getting my text layed over a partly transparent image. i want the text to be solid, but i want part of the background of the image to be transparent, and the part the text is over to be solid, which i have, the problem is the text is inheriting the transparent background of one of the previous layers. here is the code, and an example of the output, and under that output what i want it to look like. the image is laying on a light grey background so the light border around the image in between the darker grey is transparent but nothing else should be especially the text. it seems to be not the text its self but the background of the text blocks that is transparent. which as you can see isn't very desirable. please help, this is the only problem i have left to complete my project. :) can't post images yet, so heres a link to the image of example output and desired outcome ([orig](http://www.sheac.com/text-problem.png)): ![enter image description here](https://i.stack.imgur.com/biwB7.png) ``` <?php $img = imagecreatetruecolor(200, 50); $imageX = imagesx($img); $imageY = imagesy($img); imagealphablending($img, false); imagesavealpha($img, true); $transparent = imagecolorallocatealpha($img, 255,255,255, 127); $white = imagecolorallocate($img, 255,255,255); $grey = imagecolorallocate($img, 127,127,127); imagefilledrectangle($img, 0, 0, $imageX, $imageY, $grey); imagefilledrectangle($img, 2, 2, $imageX-4, $imageY-4, $transparent); $font = "./arialbd.ttf"; $fontSize = 12; $text = "THIS IS A TEST"; $textDim = imagettfbbox($fontSize, 0, $font, $text); $textX = $textDim[2] - $textDim[0]; $textY = $textDim[7] - $textDim[1]; $text_posX = ($imageX / 2) - ($textX / 2); $text_posY = ($imageY / 2) - ($textY / 2); imagefilledrectangle($img, 10, 10, $imageX-10, $imageY-10, $grey); imagettftext($img, $fontSize, 0, $text_posX, $text_posY, $white, $font, $text); header("Content-Type: image/png"); imagepng($img); ?> ```
PHP GD Text with Transparency/Alpha background
CC BY-SA 3.0
0
2010-01-25T18:10:09.040
2013-09-03T06:48:02.737
2013-09-03T06:48:02.737
367,456
258,640
[ "php", "gd", "transparent", "imagettftext" ]
2,134,522
1
2,135,012
null
0
233
So I a few ()! ![alt text](https://i.imgur.com/RI7bg.png) The main idea is to generate a collection of badges with random numbers associated to them. --- I created two different badges, and exported them for ActionScript as and Within the the label has been transformed into a class with instance name . --- --- - > Do I need to remove and add a new label every time?- > What I have is kind of inefficient, I am destroying and recreating the BadgeHover whenever the mouse hovers the Badge class. --- Help would be very much appreciated! Thanks. :)
Accessing Labels in AS3?
CC BY-SA 2.5
0
2010-01-25T18:18:59.313
2010-01-25T21:07:38.340
2010-01-25T19:06:28.563
208,827
208,827
[ "flash", "actionscript-3", "actionscript" ]
2,137,157
1
2,153,710
null
5
17,088
I have a column chart with multiple series each containing multiple points. Currently the columns all touch each other. I want to force a gap between each column. How can I achieve this? I found that applying a PointWidth (`Chart1.Series[seriesName]["PointWidth"] = (0.6).ToString();`) gives me a separation between the x value groups but not between each series point in an individual group (which I need). Using an empty spacer series as [suggested elsewhere](http://social.msdn.microsoft.com/Forums/fi-FI/MSWinWebChart/thread/38640bc4-0ea2-427a-b758-eaad8e44e321) does not solve the problem. ![Current Chart](https://lh5.ggpht.com/_Psti3TsSy9w/S15SzuTcyUI/AAAAAAAAQY0/xrXJJbivytU/s800/ChartImg.png) I am using .Net 4, VS 2010, Web Application. My chart code follows: ``` using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Web.UI; using System.Web.UI.DataVisualization.Charting; namespace WebApplication1 { public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { Chart1.ChartAreas.Add("Default"); Chart1.ChartAreas["Default"].BackColor = Color.White; Chart1.ChartAreas["Default"].BackSecondaryColor = Color.AliceBlue; Chart1.ChartAreas["Default"].BackGradientStyle = GradientStyle.TopBottom; Chart1.BackColor = Color.AliceBlue; Chart1.BackSecondaryColor = Color.White; Chart1.BackGradientStyle = GradientStyle.TopBottom; Chart1.BorderSkin.SkinStyle = BorderSkinStyle.Emboss; var colors = new List<Color>(GetSystemColors().Where(c=>c.Name.StartsWith("Dark"))); var rng = new Random(); var start = rng.Next(0, colors.Count - 1); for (var c = start; c < start + 6; c++) { var color = colors[c % colors.Count]; Chart1.Series.Add(color.Name); Chart1.Series[color.Name].BorderColor = color; Chart1.Series[color.Name].BorderWidth = 1; Chart1.Series[color.Name].Color = Color.FromArgb((int)(255 * .7), color); Chart1.Series[color.Name].BackSecondaryColor = Color.White; Chart1.Series[color.Name].BackGradientStyle = GradientStyle.TopBottom; for (var year = DateTime.Now.AddYears(-5).Year; year < DateTime.Now.Year; year++) Chart1.Series[color.Name].Points.Add(new DataPoint(year, rng.Next(0, 20))); Chart1.Series[color.Name]["PointWidth"] = (0.6).ToString(); //Chart1.Series.Add("Spacer:" + color.Name); //Chart1.Series["Spacer:" + color.Name]["PointWidth"] = (0.6).ToString(); } Chart1.Legends.Add("Default"); } static IEnumerable<Color> GetSystemColors() { Type type = typeof(Color); return type.GetProperties().Where(info => info.PropertyType == type).Select(info => (Color)info.GetValue(null, null)); } } } ```
Force a gap between points on the x axis (MS .Net Chart Controls, Column Chart)
CC BY-SA 2.5
0
2010-01-26T02:21:08.567
2011-10-15T18:34:45.863
2017-02-08T14:20:17.263
-1
68,115
[ "c#", ".net", "data-visualization", "mschart" ]
2,138,055
1
null
null
5
146
Plese refer to below image to get detail of my problem: ![alt text](https://lh5.ggpht.com/_ASRRmy9UkLk/S16cVlzkP1I/AAAAAAAAAG4/wQdS2xnQCOg/Screen%20shot%202010-01-26%20at%202.40.00%20PM.png) This maybe relate to Status bar??? *Note: this is a full-screen application. My way to do this: 1. add "Status bar is initially hidden" information property to xxx-Info.plist. 2. In all screen of app: set "Status Bar" to none.
[iPhone]A zone which user can't interact, why?
CC BY-SA 2.5
null
2010-01-26T07:41:18.767
2010-01-26T09:07:17.070
2017-02-08T14:20:17.603
-1
240,622
[ "iphone", "cocoa-touch", "touch", "fullscreen" ]
2,140,128
1
2,140,483
null
0
41
When I fetch data from a feed I store it in a table, the problem is that the format of the quote, so It will store instead of (I hope you can see the difference) You get the same thing when you copy paste code from a website or word document in your editor. the problem is that when I display the content on my site I get the following, how to I get rid of that? ![alt text](https://i119.photobucket.com/albums/o134/krike06/rss_problem.jpg)
Formatting problems when fetching feeds
CC BY-SA 2.5
null
2010-01-26T14:51:35.313
2010-01-26T15:54:26.997
2017-02-08T14:20:18.987
-1
173,234
[ "mysql", "formatting", "rss" ]
2,143,032
1
2,144,798
null
2
1,750
I have a `Grid` displaying rectangles. The `Grid` can be resized and is supposed to display adjacent rectangles without any gap. However, depending on the actual size of the `Grid`, blank lines appear between the rows and columns of the `Grid`. I guess this is to make up for sizes where the width isn't a multiple of the number of columns, or the height isn't a multiple of the number of rows. The following XAML code demonstrates this: ``` <Window x:Class="test.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> </Grid.RowDefinitions> <Rectangle Grid.Column="0" Grid.Row="0" Fill="DarkBlue"></Rectangle> <Rectangle Grid.Column="1" Grid.Row="0" Fill="DarkOrange"></Rectangle> <Rectangle Grid.Column="0" Grid.Row="1" Fill="DarkBlue"></Rectangle> <Rectangle Grid.Column="1" Grid.Row="1" Fill="DarkBlue"></Rectangle> </Grid> </Window> ``` How can I prevent those blank lines? If one or some of the columns/rows are slightly larger than others is not really a problem. I'd like to keep the markup simple. I unsuccessfully tried `Stretch`, `Fill`, putting the `Grid` in a `ViewBox`, `ShowGridLines=False, Width=Auto`, etc. An image of the issue is as follows: ![enter image description here](https://i.stack.imgur.com/qXkdt.png)
Resizable WPF Grid inserts blank lines between rows and columns depending on actual size
CC BY-SA 3.0
0
2010-01-26T22:08:37.297
2011-09-17T00:22:55.440
2011-09-17T00:22:55.440
305,637
63,733
[ "wpf", "xaml", "grid", "resize" ]
2,143,571
1
2,149,221
null
2
1,129
I am trying to work out (or find) a button that looks half decent for use in my app. In the image below I have two buttons at the bottom, the default button (interfaceBuilder) and one using two png images from the Apple UICatalog. I am a little shocked that apple did not include something a little more stylish in IB. I assume that my only option is to find/use/make a suitable replacement button image. Before I fire up Photoshop does anyone know of any replacement buttons I might use? ![alt text](https://farm5.static.flickr.com/4066/4307893874_31d5c25a70_o.png) gary
iPhone, Stylish Buttons?
CC BY-SA 2.5
null
2010-01-26T23:44:40.167
2010-02-08T17:45:34.530
2017-02-08T14:20:21.037
-1
164,216
[ "iphone", "uibutton" ]
2,145,353
1
2,145,509
null
3
856
Please refer to bellow image to get detail: ![alt text](https://lh6.ggpht.com/_ASRRmy9UkLk/S1_1gUI5hsI/AAAAAAAAAHg/xMTpCDj4Td8/Screen%20shot%202010-01-27%20at%203.11.28%20PM.png) I think, UITableView has some events occur when scrolling em when a group complete replace other, but I don't know :(
[iPhone][UITableView]How to know when a group complete replace other (by scroll)?
CC BY-SA 2.5
null
2010-01-27T08:21:12.193
2010-01-27T08:50:31.280
2017-02-08T14:20:21.377
-1
240,622
[ "iphone", "cocoa-touch", "uitableview" ]
2,145,552
1
null
null
6
2,847
I'm looking for a way to draw a self intersecting polygon with holes, I'm using the HTML Canvas element. So given 5 points, I want to draw the red one below. ![](https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Pentagram_interpretations.svg/699px-Pentagram_interpretations.svg.png) [This question is essentially the same thing.](https://stackoverflow.com/questions/1315890/using-the-svg-evenodd-fill-rule-in-the-canvas-element) Note: I don't want to do this using line intersections and adding more points, the actual paths I will be using will be curved.
Draw a self intersecting polygon on the HTML Canvas
CC BY-SA 2.5
0
2010-01-27T08:59:24.527
2010-07-20T08:52:32.687
2017-05-23T12:01:32.580
-1
217,637
[ "javascript", "html", "canvas", "polygon", "fill" ]
2,146,455
1
2,146,487
null
2
4,158
%19 Left Section Width, %80 Content width: ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/d53a1dfe-80c1-44a3-ad95-7e80d94fa4e1/widt19.png) But i want to fix left section to 200px and content section is the rest of viewable area's width. How can i do this with CSS? ``` <html> <head> <title>TWO-COLUMN LIQUID LAYOUT WITH FLOATING BOXES</title> <style type="text/css"> body { margin: 0px; padding: 0px; } div { border: 1px solid black; } #header { background: #0f0; width: 100%; } #leftcol { background: #f00; float: left; width:19%; /* max-width: 200px; */ height: 500px; } #content { background: #fff; float: left; width: 80%; height: 500px; } #footer { background: #0f0; clear: both; width: 100%; } </style> </head> <body> <div id="header"> Header Section</div> <div id="leftcol"> Left Section</div> <div id="content"> Content Section</div> <div id="footer"> Footer Section</div> </body> </html> ```
Div Layout: static left column width , strechacle right column width
CC BY-SA 2.5
null
2010-01-27T11:32:37.183
2010-01-27T11:46:47.193
2017-02-08T14:20:22.800
-1
104,085
[ "css", "html" ]
2,147,147
1
null
null
2
1,442
I am importing SSIS packages to that were originally built for SQL Server 2005. I upgraded them in VS2008 and them imported them. They all import and work except for the one with the . I installed in the setup exe for Konesans File system Watcher SQL Server 2008 on my dev pc and the production server, but still get this error: > Exception from HRESULT: 0xC0010026 (Microsoft.SqlServer.DTSRuntimeWrap) Any advice? ![alt text](https://i.imgur.com/7iDjx.jpg)
Error importing SSIS package with Konesans File system Watcher task into SQL Server 2008
CC BY-SA 2.5
null
2010-01-27T13:31:46.303
2010-08-01T07:17:12.240
null
null
16,279
[ "sql-server", "sql-server-2008", "ssis" ]
2,147,303
1
2,147,358
null
245
325,601
The div inside another div picture and code below. Because there will be text and images of the parent div. And red div will be the last element of the parent div. ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/a7d07e37-ac75-4161-83fc-6ff2f0a4ebbc/2010-01-27_1543.png) ``` <div style="width: 200px; height: 150px; border: 1px solid black;"> <div style="width: 100%; height: 50px; border: 1px solid red;"> </div> </div> ```
How can I send an inner <div> to the bottom of its parent <div>?
CC BY-SA 4.0
0
2010-01-27T13:50:55.090
2023-01-05T12:33:01.090
2022-04-06T18:09:51.440
616,443
104,085
[ "css", "html" ]
2,147,930
1
5,071,319
null
20
35,954
![ugly pie chart](https://lh5.ggpht.com/_Psti3TsSy9w/S2BU-ylh5dI/AAAAAAAAQZg/ZixFrLO7fg0/s800/ChartImgCAHWUXBK.png) I can't seem to find the property that controls visibility of labels in pie charts. I need to turn the labels off as the information is available in the legend. Anyone know what property I can use in code behind? I tried setting the series labels to nothing `Chart1.Series[i].Label = string.Empty;` but the labels seem to show up anyway.
Hide labels in pie charts (MS Chart for .Net)
CC BY-SA 2.5
0
2010-01-27T15:07:38.043
2022-03-02T23:09:29.580
2017-02-08T14:20:23.827
-1
68,115
[ "c#", "asp.net", "data-visualization", "mschart" ]
2,148,755
1
2,149,050
null
0
200
I'm just starting out with Antlr, so please forgive the noob question here. I'm lost. Any help is appreciated. This is my grammar script: ``` grammar test; script : 'begin script' IDENT ':' 'end script' IDENT ; IDENT : ('a'..'z' | 'A'..'Z') ('a'..'z'|'A'..'Z'|'0'..'9')* ; ``` This is the script I'm trying to run it against: ``` begin script spork: end script spork ``` The result in ANTLRWorks 1.3.1: ![](https://imgur.com/mgmWw.png) What am I doing wrong?
Antlr beginner mismatchedtoken question
CC BY-SA 2.5
null
2010-01-27T16:56:59.187
2010-01-27T17:39:35.937
null
null
null
[ "antlr" ]
2,150,287
1
null
null
156
326,236
I am using the Android [VNC](http://en.wikipedia.org/wiki/Virtual_Network_Computing) viewer on my [HTC G1](https://en.wikipedia.org/wiki/HTC_Dream). But for some reason, that application is always in landscape mode despite my G1 is in portrait mode. Since the Android VNC viewer is open source, I would like know how is it possible hard code an activity to be 'landscape'. I would like to change it to respect the phone orientation. ![](https://i.stack.imgur.com/MaBEW.png)
Force an Android activity to always use landscape mode
CC BY-SA 3.0
0
2010-01-27T21:14:36.147
2020-07-23T06:02:56.227
2016-03-04T19:38:07.277
63,550
128,983
[ "android", "landscape", "android-orientation" ]
2,150,426
1
2,150,435
null
9
1,625
What jQuery selector would allow me to select the last `<td>` in a `<tr>` that has more than 1 `<td>`? NOTE: I am trying to find an answer which will allow me to use a or a selector followed by a `.filter()` rather than using `.each()` ``` <table> <tr> <td colspan="2">First Cell</td> <td>Second Cell</td> </tr> <tr> <td colspan="2">Only Cell</td> </tr> <tr> <td>First Cell</td> <td>Second Cell</td> <td>Third Cell</td> </tr> </table> ``` At first, I thought td:last-child might work, but it doesn't. ![alt text](https://content.screencast.com/users/jessegavin/folders/Jing/media/908657ab-e5a9-45b2-8fb6-6cad503c5270/2010-01-27_1528.png)
jQuery selector problem. :last-child not doing what I need
CC BY-SA 2.5
0
2010-01-27T21:35:45.393
2010-01-27T21:42:35.660
2017-02-08T14:20:24.840
-1
5,651
[ "jquery", "jquery-selectors" ]
2,151,389
1
2,165,576
null
4
1,889
I have a container with masked bitmap in it. The scale and rotation of this container changes at runtime, and I need to draw the masked bitmap but cannot figure out the appropriate matrix calculations to do so. My code works correctly to reflect position, scale, offset for centering without rotation. When rotated, the angle is correct but the positioning is incorrect - I believe because the dimensions change when the rectangle is rotated. Can someone help me figure out how to compensate for this in the positioning - here is some code: ``` // Adjust the transformation matrix to account for the position of the container var tMatrix:Matrix = _imgContainer.transform.matrix; //Offset for container tMatrix.translate(this.x,this.y); //Offset for bounds centering tMatrix.translate(-_imgContainer.width/2,-_imgContainer.height/2); // Compensate for rotation // ???? var result_bitmap:BitmapData = new BitmapData(_maskedImg.width,_maskedImg.height,true,0x00FFFFFF); result_bitmap.lock(); result_bitmap.draw(_maskedImg,tMatrix,null,null,null,true); result_bitmap.unlock(); ``` Thanks in advance for any help you can provide - b Sorry if I'm not explaining this correctly, let me try again with an image to support. I have a masked bitmap in a container which I'm using as the source to draw a new bitmap. this container can be scaled/rotated at runtime by the user prior to capturing. In order to accomplish this I pass the draw method a transformation matrix based on the container matrix and adjust the tx and ty values to account for the non-zero origin (due to centering). Up to this point it works fine and captures what I would expect. However - once this container is rotated, the POSITION of the capture is now off again - presumable due to the dimensions changing, therefore the tx/ty offsets now being incorrect for the new dimensions of the container. I simply need to compensate for this, but cannot figure out how. Does anyone have experience with the transform matrix that can help?? Thanks again for the effort! ![Hosted by imgur.com](https://imgur.com/KyfdF.png) ![Hosted by imgur.com](https://imgur.com/fcrOZ.png)
How can I accurately draw my rotated bitmap?
CC BY-SA 2.5
0
2010-01-28T00:15:15.030
2010-01-29T22:17:54.123
2010-01-28T15:47:19.827
46,445
46,445
[ "flash", "actionscript-3", "matrix", "bitmap", "bitmapdata" ]
2,152,057
1
2,153,626
null
4
779
A simple iphone program generated by project template View-based Application, with several buttons, and I added following code: ``` - (void) showInfo: (UIView *) view { NSLog(@"view bounds %6.2f %6.2f %6.2f %6.2f", view.bounds.origin.x, view.bounds.origin.y, view.bounds.size.width, view.bounds.size.height); NSLog(@"view frame %6.2f %6.2f %6.2f %6.2f", view.frame.origin.x, view.frame.origin.y, view.frame.size.width, view.frame.size.height); NSLog(@"view center %6.2f %6.2f", view.center.x, view.center.y); } - (BOOL)shouldAutorotateToInterfaceOrientation: UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } - (void)willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation duration:(NSTimeInterval) duration { switch(toInterfaceOrientation) { case UIInterfaceOrientationPortrait: [self showInfo: self.view]; break; case UIInterfaceOrientationLandscapeLeft: [self showInfo: self.view]; break; case UIInterfaceOrientationLandscapeRight: [self showInfo: self.view]; break; } } - (void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation) fromInterfaceOrientation { switch(fromInterfaceOrientation) { case UIInterfaceOrientationPortrait: [self showInfo: self.view]; break; case UIInterfaceOrientationLandscapeLeft: [self showInfo: self.view]; break; case UIInterfaceOrientationLandscapeRight: [self showInfo: self.view]; break; } } ``` Launch simulator in Portrait, change to landscape right. I can get: view bounds 0.00 0.00 320.00 460.00 view frame 0.00 20.00 320.00 460.00 view center 160.00 250.00 In portrait, view's size is 320x460, and it's origin is (0,20) because of status bar. view bounds 0.00 0.00 480.00 300.00 view frame 0.00 0.00 300.00 480.00 view center 150.00 240.00 In landscape right, bounds' size is changed to 480x300, However, the origin of the frame is (0, 0). And the size of frame is different from bounds. In my head, I imagine that these coordinates are like following pictures: ![Portrait](https://lh4.ggpht.com/_fXGnFRoJLvA/S2D_GZGGp0I/AAAAAAAAGH8/JuQBvJCnASM/s400/%E5%9C%96%E7%89%87%201.png) ![Portrait](https://lh5.ggpht.com/_fXGnFRoJLvA/S2D_GfJbg8I/AAAAAAAAGIA/zMqMMXWWs_M/s400/%E5%9C%96%E7%89%87%202.png) My question is: in landscape right, it seems that the frame's origin points to one location while bounds' origin points to a different one. So I think somewhere in a view controller some rotation happens. Where is it and what does it do? Thanks for reading this long and not-so-clear question. :)
What does a view controller do for me when orientation changed?
CC BY-SA 2.5
0
2010-01-28T03:15:01.793
2010-01-28T10:04:44.763
2017-02-08T14:20:26.363
-1
46,090
[ "iphone" ]
2,152,179
1
2,158,308
null
2
13,949
# Setup I have an accordion layout containing a "properties" panel that nests two inner panels. The first inner panel holds a `Ext.DataView`, while the second panel is the `Ext.grid.GridPanel` in question. In the screenshot below, the white space containing the folder icon is the dataview, and below that is the gridpanel. # Problem In Firefox, Chrome, and Opera, there is a scrollbar that appears when my gridpanel has an overflow of properties. It is only in Internet Explorer that it does not appear. I am, however, able to scroll using my mouse scroll button in all browsers, including IE. ![alt text](https://i.imgur.com/mNjVD.png) I've also tried removing our custom css file in case it was affecting it somehow, but there was no change in doing so. I'm not sure exactly what code I should show as I don't know where the exact problem is coming from but here is the code for the mainpanel and gridpanel. ``` var mainPanel = new Ext.Panel({ id : 'main-property-panel', title : 'Properties', height : 350, autoWidth : true, tbar : [comboPropertyActions], items : [panel1] //panel1 holds the DataView }); var propertiesGrid = new Ext.grid.GridPanel({ stripeRows : true, height : mainPanel.getSize().height-iconDataView.getSize().height-mainPanel.getFrameHeight(), autoWidth : true, store : propertiesStore, cm : propertiesColumnModel }) //Add gridpanel to mainPanel mainPanel.add(propertiesGrid); mainPanel.doLayout(); ``` Any help into the right direction would be greatly appreciated. Thank you.
ExtJS GridPanel Scrollbar does not appear in IE7 but it does in Firefox, etc
CC BY-SA 2.5
null
2010-01-28T03:50:37.157
2012-03-24T18:42:12.613
null
null
143,164
[ "internet-explorer", "user-interface", "extjs", "scrollbar" ]
2,153,466
1
2,153,575
null
2
6,851
I have an assignment in my C programming class to write a program to get the correlation coefficient of 2 sets of real numbers. I've been given the equations, and it referenced wikipedia so I double checked the equations there. Here is a link to the equation, which seems to be pretty standard from my research: ![alt text](https://upload.wikimedia.org/math/0/4/e/04e3ee493ddb1f01e03d8bf024fbd0a5.png) I've written the program, but when I ran it I was getting numbers greater than 1 for my results, which I knew wasn't correct. I looked over my code several times but couldn't find anything out of place, so I tried dividing by n at the end instead of n-1, this gave me values with the -1 to 1 range that I expected, so i tested it against data values that I found online as well as a correlation coefficient calculator ( [http://easycalculation.com/statistics/correlation.php](http://easycalculation.com/statistics/correlation.php) ) and I'm now getting correct results for all of the numbers I input. I can't figure out why this is, so thought I might be able to get a little help with it here. Here is my code for the program, If there is anything else that stands out that I have done wrong here I would love to hear some advice, but mostly I'm trying to figure out why I'm getting the right results with what appears to be the wrong equation. It will then read in the values for both arrays(x and y), and then computes the correlation coefficient between the 2 sets of numbers. ``` #include <stdio.h> #include <stdlib.h> #include <math.h> int main(void) { int n; /* value to determine array length */ /* declare variables to hold results for each equation for x and y initialize all to zero to prepare for summation */ float r = 0.0, xbar = 0.0, ybar = 0.0, sx = 0.0, sy = 0.0; /*get number n input from user */ printf("Please enter a number n: "); scanf("%d", &n); if( n < 1) { printf("n must be a positive number.\nPlease enter a new value: "); scanf("%d", &n); if( n < 1) { printf("Invalid input, exiting...\n"); return 0; } } /*initialize arrays x and y with length of n */ float x[n], y[n]; /*use for loop to read in values of x*/ int i; for(i = 0; i < n; ++i) { printf("Please enter a number for x: "); scanf("%f", &x[i]); } /*use for loop to read in values of y*/ for(i = 0; i < n; ++i) { printf("Please enter a number for y: "); scanf("%f", &y[i]); } /*compute xbar */ for(i = 0; i < n; ++i) { xbar += x[i]; } xbar /= n; /*compute ybar*/ for(i = 0; i < n; ++i) { ybar += y[i]; } ybar /= n; /* compute standard deviation of x*/ for(i = 0; i < n; ++i) { sx += (x[i] - xbar) * (x[i] - xbar); } sx = sqrt((sx / n)); /* compute standard deviation of y */ for(i = 0; i < n; ++i) { sy += (y[i] - ybar) * (y[i] - ybar); } sy = sqrt((sy / n)); /*compute r, the correlation coefficient between the two arrays */ for( i = 0; i < n; ++i ) { r += (((x[i] - xbar)/sx) * ((y[i] - ybar)/sy)); } r /= (n); /* originally divided by n-1, but gave incorrect results dividing by n instead produces the desired output */ /* print results */ printf("The correlation coefficient of the entered lists is: %6.4f\n", r); return 0; } ``` (it looks like my code formatting isn't working, very sorry about this. Tried using tags and the button but can't figure it out. It looks like I got it working somewhat, better than before.)
Odd Pearson correlation coefficient results
CC BY-SA 2.5
null
2010-01-28T09:31:23.763
2015-09-30T14:45:22.487
2017-02-08T14:20:27.167
-1
215,217
[ "c" ]
2,153,662
1
2,154,300
null
3
1,099
I have a aspx page whose title has both Hebrew and English characters in it and the order of the words gets messed up. Is there a way to style the title so the words don't get messed up, or is it an OS problem? This is what the title should say: ![good](https://i.stack.imgur.com/bgCSn.gif) This is what the title actually looks like: ![not good](https://i.stack.imgur.com/KDnXC.jpg)
Bi-directional Browser Title (Hebrew and English characters in Title)
CC BY-SA 3.0
0
2010-01-28T10:08:15.413
2015-01-27T14:52:55.347
2015-01-27T14:52:55.347
421,705
278
[ "html", "bidi" ]
2,154,661
1
null
null
3
4,501
i have a weird problem with Xcode. Here's a screenshot: ![enter image description here](https://i.stack.imgur.com/eeuBj.png) When i usually clicked on the file in the left column it'd open in source code editor on the right. Now it doesn't happen. Does anyone know how to get it back the way it was before? it drives me crazy greetings peter
Editor doesn't open in Xcode
CC BY-SA 3.0
null
2010-01-28T13:06:12.557
2013-03-17T12:41:54.800
2011-08-31T17:28:52.933
111,783
226,745
[ "xcode", "editor" ]
2,156,330
1
2,156,557
null
7
3,270
I want to include an additional (optional) JTextField in the FileChooser, allowing the user to fill it in while choosing the file rather than giving them an additional prompt after they make their choice. Has anybody attempted something similar and found a working solution? My target result would look something like this: ![http://imgur.com/lVMd6](https://i.stack.imgur.com/HTqr0.png)
Customizing javax.swing.JFileChooser to include an additional JTextField
CC BY-SA 3.0
null
2010-01-28T16:59:18.823
2011-12-15T23:39:57.313
2011-12-15T23:39:57.313
84,042
261,152
[ "java", "swing", "jfilechooser" ]
2,156,644
1
2,156,792
null
0
433
I'm building a video player here: [http://leongaban.com/stackoverflow/RTMP/](http://leongaban.com/stackoverflow/RTMP/) It's streaming RTMP, and I'm trying to get my video to seek correctly if the user clicks on the groove bar (gray bar under the green progress bar) Currently it does not seek and gives me a NaN on my duration variable and an error on my progress bar width variable, which is puzzling me. ![alt text](https://farm5.static.flickr.com/4069/4311254491_aae9b02295_o.gif) For some reason my when used inside of my seeker function, also I'm getting a null object reference error when trying to trace out playerCntrls.progressTotalW which is the total width of the groove bar: ## VideoDisplay.as ``` public function seeker(e:MouseEvent):void { trace("clicked the groove bar"); trace("mouseX = "+mouseX); trace("videoDuration = "+videoDuration); trace("playerCntrls.progressTotalW = "+playerCntrls.progressTotalW); ns.seek(Math.round(mouseX * videoDuration / playerCntrls.progressTotalW)); playerCntrls.progressBar.width = mouseX * playerCntrls.progressTotalW / videoDuration; } ``` [TRACES] ``` clicked the groove bar mouseX = 135 videoDuration = NaN TypeError: Error #1009: Cannot access a property or method of a null object reference. ``` However in my updateDisplay function I don't get any errors tracing or using those same variables: ``` private function updateDisplay(e:TimerEvent):void { currentTime = ns.time; currentFormattedTime = convertTime(currentTime); playerCntrls.updateTime(); playerCntrls.progressBar.width = ns.time * playerCntrls.progressTotalW / videoDuration; trace("videoDuration = "+videoDuration); trace("ns.time = "+ns.time); trace("Progress Width = "+playerCntrls.progressBar.width); } ``` This is where I set the videoDuration var: ``` function getMetaData(client_ns) { var metaData:Object = new Object(); metaData.onMetaData = function(metaData:Object):void { videoDuration = metaData.duration; trace("metadata duration = "+videoDuration); tmrDisplay.start(); } return client_ns.client = metaData; } ``` playerCntrls links to my PlayerControls.as ``` public var playerCntrls:PlayerControls; ``` --- ## PlayerControls.as Now this is where I add an EventListener in my PlayerControls.as to call the seeker function in my VideoDisplay.as ``` // Create Progress Bar ·········································· public function createProgress():void { progressBar = new ProgBar; progressBar.mouseEnabled = false; progressBar.mouseChildren = false; progressBar.x = grooveX; progressBar.y = grooveY; progressBar.width = 1; progressBar_color = progressBar.colorChip; TweenLite.to(progressBar_color, .1, {tint:xmlColor}); controls.addChild(groove); controls.addChild(progressBar); groove.addEventListener(MouseEvent.MOUSE_UP, videoDsply.seeker); } ``` Any tips or advice would be greatly appreciated! :)
Why am I getting error while trying to seek in my streaming video player
CC BY-SA 2.5
null
2010-01-28T17:50:59.073
2010-01-28T18:14:45.530
2017-02-08T14:20:27.963
-1
168,738
[ "flash", "actionscript-3", "streaming", "progress-bar", "seek" ]
2,157,133
1
2,157,158
null
9
22,925
I've compiled an assembly for `MySql.Data.dll` and would like to add it to a new Visual Studio Project. I'm lost on the correct terminology and how best to go about this, but the end goal is to distribute this dll so that it's included with the application when the application runs. This is to avoid having to GAC the dll on the end user's machine. I've tried simply copying the assembly into the project folder: ![](https://i474.photobucket.com/albums/rr103/ossavir/Dll_addreference.png) However, I can't figure out how to add a reference to that dll in the current project. Nor have I figured out how to ensure that this dll will "stay with" the application once it is compiled. How might this be accomplished and what other things might I consider?
How do I add an assembly to a Visual Studio project and reference it?
CC BY-SA 2.5
0
2010-01-28T19:02:39.383
2017-01-30T20:16:59.887
2017-02-08T14:20:28.303
-1
166,258
[ ".net", "visual-studio", "dll", "assemblies", "reference" ]
2,157,473
1
2,157,676
null
1
15,276
I keep getting this error when I try and use an MS [Access](http://en.wikipedia.org/wiki/Microsoft_Access) database in my application: > The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. After Google'ing the error for a while I came to see that this is a problem when running the application in 64-bit mode. If I was to compile the application in 32-bit it would work, so I went to try and find out how to do it. I got as far as the advanced compiling options in my projects settings page, but then I also read that I can't even set the CPU type in Visual Basic 2008 Express. Is this true? Is there no way I can set my project to run in 32-bit mode? The thing is, I did a similar thing with a database a few months ago and this worked, and I don't remember in the slightest what I did. How do I fix this problem? After taking a look at my old projects compiling options, it is indeed set for `Active (x86) Platform`, but this option is not showing up in my new project. Weird. Here's a screenshot. The top one is the old project with the 32-bit running option and the bottom is the new one without those options. ![Enter image description here](https://i.stack.imgur.com/8vmVD.jpg)
Compiling a .NET application as 32-bit only so I can use my Access database
CC BY-SA 3.0
null
2010-01-28T19:49:39.443
2019-04-09T18:11:06.000
2012-10-14T14:47:49.807
63,550
261,314
[ "database", "vb.net", "ms-access", "32-bit" ]
2,158,339
1
2,158,496
null
2
3,055
how can I get the lines which are have selected text in them? For example: ![alt text](https://i200.photobucket.com/albums/aa230/warriorST/qbf.jpg) The selected lines would be 1, 2,3 and 4 (0 being the first line) How can I get to code like: ``` For Each line as string(or integer) in textbox1."SelectedLines" 'Do something here for each line Next ``` Thanks
For each line in selected lines (vb.net)
CC BY-SA 2.5
null
2010-01-28T22:07:07.180
2010-01-28T22:30:33.783
2017-02-08T14:20:28.983
-1
191,463
[ ".net", "vb.net", "textbox", "lines", "selected" ]
2,159,260
1
2,159,285
null
1
292
I want to read the comments of a .DLL file: ![alt text](https://imgur.com/GLrbD.jpg)
How can I read the attributes of a .DLL file using C#?
CC BY-SA 2.5
0
2010-01-29T01:12:47.697
2011-11-17T14:15:37.407
null
null
112,355
[ "c#", ".net", "dll" ]
2,160,838
1
null
null
5
9,359
I need a little help. I'm trying to host an MVC 2 application on IIS6. On my dev machine (XP) it runs perfectly in Cassini or as web site in IIS. First i tried to reference the .mvc extension to aspnet_isapi but when that didn't work i went with the aspx extension instead. Any ideas? I've probably missed something obvious. ``` public class MvcApplication : HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); AreaRegistration.RegisterAllAreas(); routes.MapRoute( "Default", // Route name "{controller}.aspx/{action}/{id}", // URL with parameters new {controller = "Home", action = "Index", id = ""} // Parameter defaults ); routes.MapRoute( "Root", "", new {controller = "Home", action = "Index", id = ""} ); } protected void Application_Start() { RegisterRoutes(RouteTable.Routes); } } ``` ![alt text](https://farm3.static.flickr.com/2720/4312785015_6a931b88e7_o.gif) Had some bad references that i cleaned out and is now stuck with this on my master page: ![alt text](https://farm3.static.flickr.com/2786/4313044431_f3e61179e4_o.gif)
Hosting MVC2 on IIS6
CC BY-SA 2.5
0
2010-01-29T08:56:22.273
2011-06-24T14:40:12.897
2017-02-08T14:20:30.350
-1
202,019
[ "asp.net-mvc", "iis-6" ]
2,161,877
1
null
null
11
15,666
How to solve this problem, please help: ![alt text](https://lh5.ggpht.com/_ASRRmy9UkLk/S2LVKkN8pTI/AAAAAAAAAIE/J6ZpGUjQHvE/Screen%20shot%202010-01-29%20at%207.31.03%20PM.png) More detail, please view this image: [detail image](http://lh4.ggpht.com/_ASRRmy9UkLk/S2LVK7hSzFI/AAAAAAAAAII/WZfVRFOzpz4/s640/Screen%20shot%202010-01-29%20at%207.29.04%20PM.png)
Problem when deploy to real device: The identity used to sign the executable is no longer valid
CC BY-SA 2.5
0
2010-01-29T12:34:55.180
2014-09-18T08:53:30.053
2017-02-08T14:20:30.683
-1
240,622
[ "iphone", "cocoa-touch", "xcode" ]
2,163,544
1
2,166,500
null
15
17,051
I'm trying to create a translucent window with Java on OSX and add a `JLabel` to it. This `JLabel` changes its text every second.... ![alt text](https://web.archive.org/web/20150413162831/http://img641.imageshack.us/img641/8873/translucentfail.png) However the component is not repainting well. How can I solve this problem? I've found the [these](http://web.archive.org/web/20080701100122/http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/) [articles](http://www.curious-creature.org/2007/04/10/translucent-swing-windows-on-mac-os-x/), but I can't figure out how to solve it. If possible, please paste the fixing source code, here's mine: ``` import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JLabel; import java.awt.Color; import java.awt.Font; import java.util.Timer; import java.util.TimerTask; public class Translucent { public static void main( String [] args ) { JFrame frame = new JFrame(); frame.setBackground( new Color( 0.0f,0.0f,0.0f,0.3f)); final JLabel label = new JLabel("Hola"); label.setFont( new Font( label.getFont().getFamily(), Font.PLAIN, 46 ) ); label.setForeground( Color.white ); frame.add( label ); frame.pack(); frame.setLocationRelativeTo( null ); frame.setVisible( true ); Timer timer = new Timer(); timer.schedule( new TimerTask(){ int i = 0; public void run() { label.setText("Hola "+ i++ ); } }, 0, 1000 ); } } ```
Re-paint on translucent frame/panel/component.
CC BY-SA 3.0
0
2010-01-29T16:57:27.333
2017-08-03T20:41:54.300
2017-02-08T14:20:32.697
-1
20,654
[ "java", "swing", "macos", "awt", "paint" ]
2,165,154
1
2,177,458
null
1
726
Hi jquery/javascript gurus, I am trying to use jquery ajax function to populate the dropdown, it works fine with FF, but IE give the javascript error snow below in the scrnshot. howver IE does get the data and selects it. Am i doing something wrong? ``` function getAjaxFunction(thisval, curval) { $.ajax({ type: "POST", url: "lookup.do?param="+thisval, cache: false, success: function(data) { var values = data; var vals = values.split(";"); $("#dropdown").find("option").remove().end(); for (var i = 0; i < vals.length; i++) { var parts = vals[i].split(":"); $("#dropdown").append($('<option />').val(parts[0]).text(parts[1])); } $("#dropdown").val(curval); } }); } ``` ![alt text](https://imgur.com/7eAqh.jpg)
jquery problem in IE with dynamic dropdown selection
CC BY-SA 2.5
null
2010-01-29T21:05:13.783
2010-02-01T14:48:58.717
2010-01-29T23:09:26.620
256,082
256,082
[ "javascript", "jquery" ]
2,166,050
1
2,166,199
null
2
1,558
Given this table: ![alt text](https://imgur.com/qt1k7.jpg) How can I get the datediff in days between each status_date for each group of ID_Number? In other words I need to find the number of elapsed days for each status that the ID_Number has been given. Some things to know: - - - - Sample output: So for ID_Number 2001, the first date (received_date) is 2009-05-02 and the next date you encounter has a status of 'open' and is 2009-05-02 so elapsed days is 0. Moving on to the next date encountered is 2009-05-10 with a status of 'invest' and the elapsed days is 8 counting from the prior date. The next date encountered is 2009-07-11 and the elapsed days is 62 counting from the previous date. Is it possible to have the elapsed days end up as a column on this table/view? I also forgot to add that this is SQL Server 2000.
SQL Question: Getting Datediff in days elapsed for each record in a group
CC BY-SA 2.5
null
2010-01-29T23:41:43.877
2010-02-01T18:35:53.797
2010-02-01T17:16:45.040
38,317
38,317
[ "sql", "tsql", "sql-server-2000", "datediff" ]
2,166,074
1
2,166,097
null
3
682
Suppose I have this HTML structure: ``` <div class="a"> <div class="floated-left">...</div> <div class="floated-left">...</div> </div> ``` I have noticed that if I don't set `overflow:hidden` to `.a`, then the `<div class="a">` does not occupy any vertical size. For example, if I set its background to red, it is not visible at all. Inspecting it with FireBug shows that it's there but of almost no vertical size. To fix this, I found that I have to set `overflow:hidden` to `.a`. Then the first `<div>` goes over all its content. Here is a real example: ``` <html> <head> <style> .a { background-color: red; } .b { background-color: red; overflow: hidden } .floated-left { float: left; width: 100px; height: 100px; background-color: blue; } </style> </head> <body> <p>div with class a, that doesn't overflow:hidden:</p> <div class="a"> <div class="floated-left">Hi,</div> <div class="floated-left">Mom!</div> </div> <div style="clear:both"></div> <p>div with class b, that does overflow:hidden:</p> <div class="b"> <div class="floated-left">Hi,</div> <div class="floated-left">Dad!</div> </div> </body> </html> ``` Notice how `Hi, Mom!` does not get red background (no overflow:hidden), while `Hi, Dad!` does get red background (has overflow:hidden). Can anyone explain this behaviour? Here is screenshot of the example: ![http://imgur.com/O8qvP](https://i.stack.imgur.com/hALG0.png) Thanks, Boda Cydo.
When should overflow:hidden be used for a <div>?
CC BY-SA 3.0
null
2010-01-29T23:47:00.723
2011-12-07T23:44:15.070
2011-12-07T23:44:15.070
84,042
257,942
[ "html", "css" ]
2,167,037
1
null
null
30
10,775
I'd like to know if it is possible to make a progress bar displayed on the taskbar like Windows Explorer does when there's a file operation going on? I saw many examples, but they all involved C#. SWT won't cut it. ![progress bar displayed on the taskbar](https://i.stack.imgur.com/KNXsm.jpg)
Windows 7 Taskbar Progress Bar in Java
CC BY-SA 3.0
0
2010-01-30T06:08:08.360
2019-10-19T11:23:31.500
2011-08-23T18:41:49.450
617,750
null
[ "java", "windows", "windows-7" ]
2,167,283
1
2,525,340
null
1
2,271
As far as I understand the serial port so far, transferring data is done over pin 3. As shown here: ![Serial Port Pinout](https://jan.newmarch.name/internetdevices/embedded/9_PIN_PIN_OUT.GIF) There are two things that make me uncomfortable about this. The first is that it seems to imply that the two connected devices agree on a signal speed and the second is that even if they are configured to run at the same speed you run into possible synchronization issues... right? Such things can be handled I suppose but it seems like there must be a simpler method. What seems like a better approach to me would be to have one of the serial port pins send a pulse that indicates that the next bit is ready to be stored. So if we're hooking these pins up to a shift register we basically have: (some pulse pin)->clk, tx->d Is this a common practice? Is there some reason not to do this? Mike shouldn't have deleted his answer. This [I2C (2 pin serial)](http://en.wikipedia.org/wiki/I2C#Timing_diagram) approach seems fairly close to what I did. The serial port doesn't have a clock you're right nobugz but that's basically what I've done. See here: ``` private void SendBytes(byte[] data) { int baudRate = 0; int byteToSend = 0; int bitToSend = 0; byte bitmask = 0; byte[] trigger = new byte[1]; trigger[0] = 0; SerialPort p; try { p = new SerialPort(cmbPorts.Text); } catch { return; } if (!int.TryParse(txtBaudRate.Text, out baudRate)) return; if (baudRate < 100) return; p.BaudRate = baudRate; for (int index = 0; index < data.Length * 8; index++) { byteToSend = (int)(index / 8); bitToSend = index - (byteToSend * 8); bitmask = (byte)System.Math.Pow(2, bitToSend); p.Open(); p.Parity = Parity.Space; p.RtsEnable = (byte)(data[byteToSend] & bitmask) > 0; s = p.BaseStream; s.WriteByte(trigger[0]); p.Close(); } } ``` Before anyone tells me how ugly this is or how I'm destroying my transfer speeds my quick answer is I don't care about that. My point is this seems much much simpler than the method you described in your answer nobugz. And it wouldn't be as ugly if the .Net SerialPort class gave me more control over the pin signals. Are there other serial port APIs that do?
Advice on logic circuits and serial communications
CC BY-SA 2.5
null
2010-01-30T08:25:05.203
2010-03-26T17:29:15.217
2017-02-08T14:20:33.057
-1
52,551
[ "c#", "hardware", "serial-port", "circuit" ]
2,169,755
1
2,169,954
null
3
126
I want to add a `MenuToolItem` to my Toolbar. It contains two `RadioMenuItem`s. However, when I click the drop-down arrow, I see this: ![alt text](https://i.imgur.com/5zhEO.png) This is my current code: ``` MenuToolButton reviewModeToolButton = new MenuToolButton (Stock.Preferences); toolbar.Add (reviewModeToolButton); Menu reviewModeMenu = new Menu (); reviewModeToolButton.Menu = reviewModeMenu; RadioMenuItem normalMenuItem = new RadioMenuItem ("Normal Mode"); RadioMenuItem cramMenuItem = new RadioMenuItem (normalMenuItem, "Cram Mode"); reviewModeMenu.Add (normalMenuItem); reviewModeMenu.Add (cramMenuItem); ``` What am I doing wrong?
In Gtk#, why is my MenuToolItem not displaying its Menu?
CC BY-SA 2.5
null
2010-01-30T22:42:31.707
2010-01-30T23:39:37.517
null
null
105,084
[ "c#", "gtk", "gtk#" ]
2,171,560
1
2,171,574
null
2
1,050
I have a class which retrieves the data from DB. ``` [Table(Name = "Ilanlar")] public class Ilan { [Column(Name="ilan_id" ,IsPrimaryKey = true)] public int M_ilan_id; [Column(Name="refVerenUser_id")] public int M_refVerenUser_id; } ``` And i am binding the data comes from db via the class above. ``` private void ItemsGet() { PagedDataSource objPds = new PagedDataSource(); objPds.DataSource = f_IlanlariGetir(CurrentPage); objPds.AllowPaging = true; objPds.PageSize = 3; objPds.CurrentPageIndex = CurrentPage; rptIlanlar.DataSource = objPds; //rptIlanlar = asp:Repeater rptIlanlar.DataBind(); } protected void Page_Load(object sender, EventArgs e) { ItemsGet(); } private System.Collections.IEnumerable f_IlanlariGetir(int p) { Context context = new Context(DAO.dbYaban.ConnectionString); return context.GetTable<Ilan>(); } ``` But the result is IEnumerable but i need something like DataSet. I'm getting this error: ![Cannot compute Count for a data source that does not implement ICollection.](https://content.screencast.com/users/uzay95/folders/Jing/media/7363fd72-1211-4b1c-a36e-fe8a0fc37115/2010-01-31_1353.png) I found good explanation about this error, it is: > The underlying DataSource has to support the ICollection interface in order for the grid to perform automatic paging. ICollection requires a class to implement a Count property. ArrayList and DataView both support the interface, so you could use them as DataSources.Other classes only support the IEnumerable interface. This allows them to be used as a DataSource but not as a paged data source. SqlDataReader would be an example of such a class. [Reference](http://www.velocityreviews.com/forums/t90094-system-web-httpexception-cannot-compute-count-for-a-data-source-t.html) But i need to bind repeater with the results of linq to sql tables. What should i do?
Binding LinqToSql tables to Repeater
CC BY-SA 2.5
null
2010-01-31T11:58:50.723
2010-01-31T12:02:44.020
2017-02-08T14:20:34.467
-1
104,085
[ "c#", "asp.net", "ienumerable", "repeater", "icollection" ]
2,173,363
1
null
null
3
1,179
I have a texture from this PNG: ![alt text](https://i.stack.imgur.com/sbIYm.png) And another from this PNG: ![alt text](https://i.stack.imgur.com/i91Ph.png) They both have the same blend function: ``` glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); ``` I just couldn't find a simple example of this. Draw them to different polygons works perfect, but I just cannot "merge" them into one texture. Any working sample codelines would be appreciated well. I can see that I have to texture combine somehow it's alpha with the primary color (created from my variable), but again, have no working example of codes. I began to study glTexEnvi function, but yet I have no any result. Please, I googled the whole net, but still stuck. The engine I want to implement (working flash sketch on the bottom of the post) is [here](https://web.archive.org/web/20110101130737/http://gotoandplay.freeblog.hu/archives/2010/01/07/compactTangram_072_-_tan_rendering_labs/).
OpenGL ES (iPhone) multi-texturing (2D) code
CC BY-SA 4.0
null
2010-01-31T21:13:34.347
2019-06-11T07:11:12.253
2019-06-11T07:11:12.253
4,751,173
215,282
[ "iphone", "opengl-es", "textures", "multitexturing" ]
2,174,748
1
2,378,879
null
3
5,588
![enter image description here](https://i.stack.imgur.com/GDcwa.jpg) When I select values from drop down then click on show button it should show the crystal report for that selection.
How to filter crystal report in C#?
CC BY-SA 3.0
0
2010-02-01T05:00:04.137
2013-02-03T16:16:48.693
2013-02-03T16:16:48.693
1,369,235
1,087,336
[ "c#", "crystal-reports", "filtering" ]
2,180,827
1
null
null
3
842
For my current project, I need to make a layout selector where certain elements can be dragged and repositioned by the user, similar to this mockup: ![alt text](https://i.imgur.com/MZegw.png) So far, I have been able to replicate something similar using JQuery UI and Sortable, however I am currently stuck only on the first level of control, where vertical elements can be repositioned. I am having difficulty figuring out what the best approach is to handle the nested horizontal elements (like the content/sidebar sections). Ideally, I need this to not only position the order of each section (header, body, footer, etc.) but also the alignment of sections (content to left, sidebar to right and vice versa).
Best option for sortable/draggable layout selector?
CC BY-SA 2.5
0
2010-02-01T23:25:20.073
2011-11-03T16:46:42.020
2010-02-02T03:26:25.700
62,200
62,200
[ "jquery", "jquery-ui", "layout", "jquery-ui-sortable", "draggable" ]
2,182,580
1
null
null
6
3,590
I want to make a rectangle Boundary and to insert a UITextView and two buttons in that rectangle .If i making the rectangle by adding a subView in a from UIView class than I am unable to interact with the controls in the rectangle area which i inserted in the subview from Interface builder. I am attaching a screen for that ![http://www.algoworks.com/images/img065842101.jpg](https://i.stack.imgur.com/7Xbjm.jpg) In this image I have to make a rectangle and have to insert a text view and two Ui buttons.If I am making rectangle from UIView and adding in View Controller than the controls added in this subview from Interface builder doesn't responds.So I have to add these controls Programitically which create this task very tough. Please Provide me a solution to make boundary of rectangle and than to add Controls.
How to add a Boundary outline in UIView of Iphone.Please Read Description
CC BY-SA 3.0
null
2010-02-02T08:02:04.130
2011-11-27T00:02:25.993
2011-11-27T00:02:25.993
234,976
264,131
[ "iphone", "uiview" ]
2,183,138
1
2,183,885
null
7
6,846
I'm trying to achieve the layout shown here ![alt text](https://farm5.static.flickr.com/4008/4325000800_bbc2498c13.jpg) Each of the panels should be linked to a backing bean from which I will later add differrent components according to context. I tried using panelgrid but could not achieve this look. I would prefer to use just JSF for this but if impossible or too complicated RichFaces is ok too. Thanks!!
newbie JSF question - How to achieve this layout?
CC BY-SA 2.5
0
2010-02-02T09:59:14.480
2010-02-02T12:20:15.723
2017-02-08T14:20:38.883
-1
128,076
[ "jsf", "layout", "richfaces" ]
2,183,644
1
2,184,106
null
0
697
I have a Advanced DataGrid requirement. But i do not have idea how to create it. Please help me on this. I am attaching the Jpeg file. ![table](https://i.stack.imgur.com/ia5d2.jpg)
How to create the Advanced Datagrid
CC BY-SA 3.0
null
2010-02-02T11:31:25.517
2013-09-29T23:35:39.640
2013-09-29T23:35:39.640
759,866
214,131
[ "apache-flex", "flex3" ]
2,185,960
1
2,188,368
null
1
320
I'm writing a particle system for our student game, and I've run into a bit of a snag. I want to improve the effect on the ships' rockets, but I can't seem to figure out how. Here's how the effect looks on a stationary ship: ![alt text](https://imgur.com/Xb9Gl.png) And here's how it looks on a moving ship: ![alt text](https://imgur.com/B4C8L.png) I want the flames to be the same length consistently. Here's `Particle`'s `Tick` function: ``` void Particle::Tick(float a_DT) { // temporarily turned off to see the effect of the rest of the code more clearly //m_Pos += m_Vel; if (m_Owner) { m_Pos += m_Owner->GetParentSpeed(); } m_Life -= 1; if (m_Life <= 0) { m_Alive = false; } } ``` Thanks in advance. EDIT: To clear things up a bit, I want the effect to trail, but I want it to trail the same way regardless of the emitter's speed.
Particle stream should be the same length regardless of emitter speed
CC BY-SA 2.5
0
2010-02-02T16:58:11.730
2010-02-02T22:48:26.417
2010-02-02T18:48:44.390
141,057
141,057
[ "c++", "particles" ]
2,186,732
1
2,187,701
null
2
226
I have made an entry field required somehow but I'm not sure how. When editing a tag, the tag owner entry field should be able to be empty. ![alt text](https://imgur.com/Hcor4.png) I have set "allow nulls" in the database table: ![alt text](https://imgur.com/d0Heu.png) Does anyone know how I can fix it? To be clear, I want the above form to be submitted without requiring a value for tag_owner.
How do I make an entry field optional?
CC BY-SA 2.5
null
2010-02-02T18:55:04.140
2010-02-02T21:05:15.263
null
null
83,452
[ "c#", "asp.net", "asp.net-mvc", "linq-to-sql" ]
2,188,872
1
2,195,756
null
32
14,010
A while ago I came across [this answer](https://stackoverflow.com/questions/1572413/can-you-have-magic-numbers-in-access-2007/1576837#1576837) that introduced me to the obscure (at least for me) [ISO 5218: a standard for representing human sexes](http://i.justrealized.com/2009/05/09/did-you-know-theres-an-iso-for-sex/) (or is it ? - thanks @Paul). For a pet project I'm working on I need my database schema to store the skin color of a person, and I'm wondering if a similar standard exists. All my life I've heard people using terms such as "", "", "", "", "", "", "" and so on, but after some research in Wikipedia I've realized that everybody is wrong, because those words can all have different meanings: - [White](http://definr.com/white)- [Caucasian](http://definr.com/caucasian)- [Black](http://definr.com/black)- [Blonde](http://definr.com/blonde)- [Brunette](http://definr.com/brunette)- [Afro](http://definr.com/Afro)- [Albino](http://definr.com/albino) The [Wikipedia has the following about human races](http://en.wikipedia.org/wiki/Race_%28classification_of_human_beings%29#20th_century): - - - - - I don't know about the connotations of the English language but in my native language (Portuguese) that's a synonym for a person who suffers from the [Down syndrome disorder](http://en.wikipedia.org/wiki/Down_syndrome)... [This Wikipedia page](http://en.wikipedia.org/wiki/Color_terminology_for_race) also has some interesting additional information: > Johann Friedrich Blumenbach (1752-1840), one of the founders of what some call scientific racism theories, came up with the five color typology for humans: white people (the Caucasian or white race), more or less black people (the Ethiopian or black race), yellow people (the Mongolian or yellow race), cinnamon-brown or flame colored people (the American or red race) and brown people (the Malay or brown race). The problem with using races (), is that they don't necessarily represent the skin color of a person... Take the following [photo from Wikipedia](http://en.wikipedia.org/wiki/Human_skin_color): ![Tanzanian albino child sitting with his family.](https://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Albino_boy_tanzania.jpg/180px-Albino_boy_tanzania.jpg) The most serious attempt I could find to classify skin color is the [Von Luschan's chromatic scale](http://en.wikipedia.org/wiki/Von_Luschan%27s_chromatic_scale): ![Human Skin Color Distribution](https://upload.wikimedia.org/wikipedia/commons/4/46/Unlabeled_Renatto_Luschan_Skin_color_map.png) ![Von Luschan's chromatic scale](https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Felix_von_Luschan_Skin_Color_chart.svg/640px-Felix_von_Luschan_Skin_Color_chart.svg.png) Most people however, are not aware of their von Luschan's scale (myself included). I also though of but that could lead to some problems due to the different color profiles used by the operating systems / monitors. There is also a more general von Luschan's scale used to classify sun tanning risk: 1. von Luschan 1-5 (very light). 2. von Luschan 6-10 (light). 3. von Luschan 11-15 (intermediate). 4. von Luschan 16-21 ("Mediterranean"). 5. von Luschan 22-28 (dark or "brown"). 6. von Luschan 29-36 (very dark or "black"). Since this can become a very sensitive topic for some people I'm wondering what would be the best way to store this information in a normalized database. Is there a without affecting susceptibilities while using straightforward terms and avoiding complicated and unfamiliar definitions such as von Luschan's scale? [](https://i.stack.imgur.com/HBTZc.jpg) Similar standards exist for [eye](http://en.wikipedia.org/wiki/Eye_color#Eye_color_chart_.28Martin-Schultz_scale.29) and [hair color](http://en.wikipedia.org/wiki/Human_hair_color#Natural_hair_colors).
Normalizing Human Skin Colors for User Interaction
CC BY-SA 4.0
0
2010-02-03T00:33:51.433
2022-03-20T13:47:17.167
2019-06-12T04:05:17.090
4,751,173
89,771
[ "database", "user-interface", "schema", "standards", "iso" ]
2,190,046
1
null
null
1
3,187
![http://imgur.com/gjUbV.jpg](https://imgur.com/gjUbV.jpg) It won't let me post the picture. Btw, Someone from Reddit.programming sent me over here. So thanks! ``` TITLE MASM Template ; Description ; ; Revision date: INCLUDE Irvine32.inc .data myArray BYTE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 .code main PROC call Clrscr mov esi, OFFSET myArray mov ecx, LENGTHOF myArray mov eax, 0 L1: add eax, [esi] inc esi loop L1 call WriteInt exit main ENDP END main ``` Results in:
What am I doing wrong? (Simple Assembly Loop)
CC BY-SA 2.5
0
2010-02-03T06:10:22.093
2015-12-18T21:20:04.750
2015-12-15T16:33:22.947
3,512,216
265,012
[ "loops", "assembly", "x86", "masm", "irvine32" ]
2,195,198
1
2,195,318
null
1
909
I have a stumper which doesn't seem to make sense. If I run the program below, I get two dialog boxes each containing JPanels. ![alt text](https://farm3.static.flickr.com/2796/4327974125_9c7a810944_o.png) ![alt text](https://farm5.static.flickr.com/4017/4328706984_11d7c8d741_o.png) The first one has a couple of JLabels that are left-aligned. The second one extends the first and adds another JPanel as a subpanel, but the group of labels is right-aligned (even though within the group they are left aligned). What gives, and how do I fix it so that everything is left-aligned? (Or how would I right-align them all?) ``` package com.example.test.gui; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; public class BoxLayoutQuestion { public static class TestPanel1 extends JPanel { public TestPanel1() { super(); initTestPanel1(); } void initTestPanel1() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(new JLabel("Four score and seven years ago")); add(new JLabel("One small step for man")); add(new JLabel("To be or not to be, that is the question")); } } public static class TestPanel2 extends TestPanel1 { public TestPanel2() { super(); initTestPanel2(); } void initTestPanel2() { JPanel subpanel = new JPanel(); subpanel.setBorder( BorderFactory.createTitledBorder("something special")); subpanel.add(new JLabel("Where's the beef?")); add(subpanel); } } public static void main(String[] args) { JOptionPane.showMessageDialog(null, new TestPanel1(), "quotations", JOptionPane.INFORMATION_MESSAGE); JOptionPane.showMessageDialog(null, new TestPanel2(), "more quotations", JOptionPane.INFORMATION_MESSAGE); } } ```
swing: BoxLayout and transverse alignment?
CC BY-SA 2.5
null
2010-02-03T20:30:39.153
2010-02-03T20:45:58.560
2017-02-08T14:20:43.013
-1
44,330
[ "swing", "layout", "alignment" ]
2,195,497
1
2,196,518
null
4
7,989
I'm using the following code to create a [ProgressDialog](http://developer.android.com/reference/android/app/ProgressDialog.html) (inside my [Activity](http://developer.android.com/reference/android/app/Activity.html)): ``` @Override protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_LOOKUP: return new ProgressDialog(this, ProgressDialog.STYLE_SPINNER); } return null; } @Override protected void onPrepareDialog(int id, Dialog dialog) { switch (id) { case DIALOG_LOOKUP: dialog.setCancelable(true); dialog.setTitle(R.string.dialogLookup_title); ((ProgressDialog)dialog).setMessage(getResources().getString(R.string.dialogLookup_message)); dialog.setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { Toast.makeText(MyActivity.this, "canceled", Toast.LENGTH_SHORT).show(); } }); break; } } ``` The problem is that it isn't actually setting the title and is putting it in some weird double-box. It's giving me this: ![bad progress](https://imgur.com/6cYrS.png) but I'm expecting something more like this: ![good progress](https://imgur.com/bquUB.png) Any ideas?
Problem using ProgressDialog with onCreateDialog / onPrepareDialog
CC BY-SA 2.5
null
2010-02-03T21:13:51.503
2010-02-04T01:30:22.130
2010-02-03T21:30:14.260
76,835
76,835
[ "android", "progressdialog" ]
2,196,124
1
null
null
83
19,833
I'm trying to read an image from an electrocardiography and detect each one of the main waves in it (P wave, QRS complex and T wave). I can read the image and get a vector (like `(4.2; 4.4; 4.9; 4.7; ...)`). I need an algorithm that can walk through this vector and detect when each of these waves start and end. An example: ![alt text](https://i.stack.imgur.com/U4t3t.jpg) Would be easy if they always had the same size, or if I knew how many waves the ECG has in advance. Given the wave: ![alt text](https://i.stack.imgur.com/BHOaG.jpg) I extract the vector: ``` [0; 0; 20; 20; 20; 19; 18; 17; 17; 17; 17; 17; 16; 16; 16; 16; 16; 16; 16; 17; 17; 18; 19; 20; 21; 22; 23; 23; 23; 25; 25; 23; 22; 20; 19; 17; 16; 16; 14; 13; 14; 13; 13; 12; 12; 12; 12; 12; 11; 11; 10; 12; 16; 22; 31; 38; 45; 51; 47; 41; 33; 26; 21; 17; 17; 16; 16; 15; 16; 17; 17; 18; 18; 17; 18; 18; 18; 18; 18; 18; 18; 17; 17; 18; 19; 18; 18; 19; 19; 19; 19; 20; 20; 19; 20; 22; 24; 24; 25; 26; 27; 28; 29; 30; 31; 31; 31; 32; 32; 32; 31; 29; 28; 26; 24; 22; 20; 20; 19; 18; 18; 17; 17; 16; 16; 15; 15; 16; 15; 15; 15; 15; 15; 15; 15; 15; 15; 14; 15; 16; 16; 16; 16; 16; 16; 16; 16; 16; 15; 16; 15; 15; 15; 16; 16; 16; 16; 16; 16; 16; 16; 15; 16; 16; 16; 16; 16; 15; 15; 15; 15; 15; 16; 16; 17; 18; 18; 19; 19; 19; 20; 21; 22; 22; 22; 22; 21; 20; 18; 17; 17; 15; 15; 14; 14; 13; 13; 14; 13; 13; 13; 12; 12; 12; 12; 13; 18; 23; 30; 38; 47; 51; 44; 39; 31; 24; 18; 16; 15; 15; 15; 15; 15; 15; 16; 16; 16; 17; 16; 16; 17; 17; 16; 17; 17; 17; 17; 18; 18; 18; 18; 19; 19; 20; 20; 20; 20; 21; 22; 22; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 32; 33; 33; 33; 32; 30; 28; 26; 24; 23; 23; 22; 20; 19; 19; 18; 17; 17; 18; 17; 18; 18; 17; 18; 17; 18; 18; 17; 17; 17; 17; 16; 17; 17; 17; 18; 18; 17; 17; 18; 18; 18; 19; 18; 18; 17; 18; 18; 17; 17; 17; 17; 17; 18; 17; 17; 18; 17; 17; 17; 17; 17; 17; 17; 18; 17; 17; 18; 18; 18; 20; 20; 21; 21; 22; 23; 24; 23; 23; 21; 21; 20; 18; 18; 17; 16; 14; 13; 13; 13; 13; 13; 13; 13; 13; 13; 12; 12; 12; 16; 19; 28; 36; 47; 51; 46; 40; 32; 24; 20; 18; 16; 16; 16; 16; 15; 16; 16; 16; 17; 17; 17; 18; 17; 17; 18; 18; 18; 18; 19; 18; 18; 19; 20; 20; 20; 20; 20; 21; 21; 22; 22; 23; 25; 26; 27; 29; 29; 30; 31; 32; 33; 33; 33; 34; 35; 35; 35; 0; 0; 0; 0;] ``` I would like to detect, for example: - `[19 - 37]`- `[51 - 64]`-
How to detect patterns in (electrocardiography) waves?
CC BY-SA 4.0
0
2010-02-03T22:51:58.643
2021-11-04T21:15:03.423
2021-11-04T21:15:03.423
4,157,124
108,569
[ "algorithm", "language-agnostic", "machine-learning", "signal-processing", "pattern-recognition" ]
2,198,116
1
2,251,833
null
50
38,335
I have 2 nested divs inside outer one, which has width:100%. Both nested divs should be in one line and first should get it size from it's contents: ``` <div id="#outer" style="width:100%; border:1px"> <div id="#inner1" style="border:1px; display:inline"> inner div 1. Some text... </div> <div id="#inner2" style="width:100%????; border:1px; display:inline"> inner div 2... </div> </div> ``` Question is how to make #inner2 div to get rest of the horizontal space if width of the #inner1 div is not specified and depends on what it is inside? P.S. All styles are in separate classes in my case, here I putted CSS into style attributes just for simplification. I want result to work in IE7+ and FF 3.6 In more details for me it looks like this: ``` <style type="text/css"> .captionText { float:left; } .captionLine { height: 1px; background-color:black; margin: 0px; margin-left: 5px; margin-top: 5px; border: 0px; padding: 0px; padding-top: 1px; } </style> <table style="width:300px;"> <caption width="100%"> <div class="captionText">Some text</div> <div class="captionLine"> </div> </caption> <tr> <td>something</td> </tr> </table> ``` Here is the image of what I want: ![Image of what I want](https://i.stack.imgur.com/dHNhf.png)
xHTML/CSS: How to make inner div get 100% width minus another div width
CC BY-SA 3.0
0
2010-02-04T07:58:55.917
2015-04-27T23:41:50.040
2012-02-15T20:07:35.290
90,096
90,096
[ "css", "xhtml", "html", "xhtml-1.0-strict" ]
2,198,612
1
2,198,706
null
0
3,466
``` #include <iostream> using namespace std; struct node { int v; node* next; node (int x, node* t) { v = x; next = t; } }; typedef node *link; int **malloc2d(int, int); void printMatrix(int **, int); link *convertToList (int **, link *, int); void printList (link * a, int size); // program begins function execution int main () { // input number of vertices int i, j, V; cout << "Enter the number of vertices: "; cin >> V; int **adj = malloc2d(V, V); // dynamically allocate matrix for (i = 0; i < V; i++) // initialize matrix with 0's for (j = 0; j < V; j++) adj[i][j] = 0; for (i = 0; i < V; i++) // initialize diagonal with 1's adj[i][i] = 1; // input the edges cout << "Enter the coordinates for an edge (or 'Ctrl' + 'Z'): "; while (cin >> i >> j) { adj[i][j] = 1; adj[j][i] = 1; cout << "Enter the coordinates for an edge (or 'Ctrl' + 'Z'): "; } // convert to list link *aList = new link [V]; aList = convertToList(adj, aList, V); cout << endl; // print matrix cout << "Adjacency Matrix: " << endl; printMatrix (adj, V); cout << endl << endl; // print adjacency list cout << "Adjacency List: " << endl; printList (aList, V); return 0; // indicates successful completion } // end function main int **malloc2d(int r, int c) { int **t = new int*[r]; for (int i = 0; i < r; i++) t[i] = new int[c]; return t; } // end function malloc2d void printMatrix (int ** a, int size) { for (int i = 0; i < size; i++) for (int j = 0; j < size; j++) if (a[i][j] == 1) cout << "There is an edge between " << i << " and " << j << "." << endl; } // end function print link *convertToList (int ** b, link * a, int size) { // create array for (int i = 0; i < size; i++) a[i] = 0; // create lists for (int i = 0; i < size; i++) for (int j = i; j < size; j++) { if (b[i][j] == 1) // if an edge exists on the matrix { // create the edges on the adjacency list a[j] = new node(i, a[j]); a[i] = new node(j, a[i]); } } return a; } // end function convertToList void printList (link * a, int size) { for (int i = 0; i < size; i++) { while (a[i]->next != NULL) { cout << "There is an edge between " << i << " and " << a[i]->v << "." << endl; a[i] = a[i]->next; } } } // end function print ``` : converts an adjacency matrix into an adjacency list. : traverses the adjacency matrix and prints a message for every edge. Some edges are being duplicated. I'm not sure if it is a problem when I create the array of lists or when I traverse the adjacency matrix to print it. Any suggestions? Below is a picture of the program output for 5 vertices with edges (0, 1) and (3, 2). The matrix is correct. The adjacency list is not. Edges (0, 1), (1, 1) and (2, 3) should not be repeated. ![alt text](https://militarystudents.files.wordpress.com/2010/02/adjacency_list.png?w=450)
Why is my adjacency list showing duplicate edges?
CC BY-SA 2.5
null
2010-02-04T09:44:23.460
2010-02-04T10:08:10.790
2017-02-08T14:20:45.080
-1
205,458
[ "c++", "adjacency-list" ]
2,199,888
1
null
null
5
15,631
I am using multiple jQuery UI dialog themes on a single page, and I have bug. [jQuery 1.3.2] [jQuery UI 1.7.2] Here is a screenshot (vs ): ![Enter image description here](https://i.stack.imgur.com/tuq8T.jpg) How can I fix this?
Custom CSS scope and jQuery UI dialog themes
CC BY-SA 3.0
0
2010-02-04T13:16:44.113
2013-07-10T11:06:25.600
2013-07-10T10:50:49.897
63,550
216,086
[ "jquery-ui", "jquery-ui-dialog" ]
2,201,302
1
2,201,716
null
0
1,491
We use a DHTML calendar picker that only allows you to change the date, which is desired functionality. However, I need to figure out the javascript to change the date next to the calendar picker, as seen in the image below, and popup an "are you sure" message. ![date example](https://imgur.com/jydwv.jpg) The above image is one row in a table, so the JS needs to be aware of which one of potentially 10+ dates it should be editing. I'm a bit of a javascript n00b. Still learning new things. Feel free to link me to things to read and tips/hints/etc. If it helps any, we're using PERL with CGI. I guess the JS will have to have an AJAX call to update the database, which I can figure out from other examples in the code base. I just need to figure out how to edit the date on the page for now. And for clarification, the process is... the person clicks on that calendar icon, gets a DHTML date picker, chooses a date, confirms he wants to change datetime1 to datetime2, and then the change gets applied to the text you see next to the calendar icon and gets put in the database.
How do I make my popup date picker calendar javascript change the text date next to it and update the database?
CC BY-SA 2.5
null
2010-02-04T16:27:57.997
2010-02-04T17:19:07.363
null
null
216,860
[ "javascript", "ajax", "perl", "datepicker" ]
2,201,839
1
null
null
0
76
It might sound confusing so let me explain the situation. I made a movieClip. And in that movieClip I have a dynamic textfield set. I called this textfield "AmmoCount" I dragged this movieClip onto the stage several times and each time I called on the AmmoCount variable in each movieclip and gave it a different value. I get the following error ``` TypeError: Error #1009: Cannot access a property or method of a null object reference. ``` Below is my code ``` trace(game.score.wH.weapon1.AmmoCount.text); trace(game.score.wH.weapon2.AmmoCount.text); ``` When I trace these objects, weapon1.AmmoCount works, but weapon2.AmmoCount shows as empty. Yet they both contain a value in them. Ive used the weapon1 property and weapon2 property countless times and there is no doubt that it works. so why doesnt it work for weapon2. but for weapon1. Below is some code that I called on earlier that shows they work ``` game.score.wH.weapon1.alpha = 1; game.score.wH.weapon2.alpha = .2; ``` these worked! but when I called on the AmmoCount text box within them, I get the error. The following image you can find within the weapon1 movieClip ![alt text](https://i159.photobucket.com/albums/t150/numerical25/delete.jpg)
can you call on the same variable in an instance of multiple movieclips
CC BY-SA 3.0
null
2010-02-04T17:37:25.950
2013-04-29T10:17:51.053
2017-02-08T14:20:47.157
-1
201,934
[ "flash", "actionscript-3", "actionscript" ]
2,202,524
1
2,202,632
null
4
5,951
I've been able to use the standard "ProgressDialog" for android to show that an indeterminate task is running. ![alt text](https://imgur.com/1laXA.png) But I'd like to use the "smaller" progress dialog "spinner" that's used for indeterminate tasks in some of the standard Android applications like the android Market (there's a small spinning circle that's actually integrated into the application window (as opposed to floating on top of it).![alt text](https://imgur.com/eiqgm.png) Does anyone know how to create the smaller progress dialog (or can someone point me in the right direction)?
Small ProgressDialog "spinner" for android
CC BY-SA 2.5
null
2010-02-04T19:24:57.420
2012-08-13T12:40:13.407
2010-08-17T08:09:49.247
114,066
141,146
[ "android", "layout", "progressdialog" ]
2,204,383
1
2,216,656
null
1
2,768
I was able to implement real-time mouse tracing as follow : ![alt text](https://i.stack.imgur.com/l1u1x.png) The source code is as follow : [http://jstock.cvs.sourceforge.net/viewvc/jstock/jstock/src/org/yccheok/jstock/charting/CrossHairUI.java?revision=1.5&view=markup](http://jstock.cvs.sourceforge.net/viewvc/jstock/jstock/src/org/yccheok/jstock/charting/CrossHairUI.java?revision=1.5&view=markup) [http://jstock.cvs.sourceforge.net/viewvc/jstock/jstock/src/org/yccheok/jstock/gui/ChartJDialog.java?revision=1.9&view=markup](http://jstock.cvs.sourceforge.net/viewvc/jstock/jstock/src/org/yccheok/jstock/gui/ChartJDialog.java?revision=1.9&view=markup) However, I unable to obtained the correct y screen coordinate, when an subplot being added. [(broken image)](http://sites.google.com/site/yanchengcheok/Home/notok.png) I suspect I didn't get the correct screen data area. When there is only one plot in the screen, I get a screen data area with height 300++ When a sub plot added to the bottom, I expect screen data area height will be reduced, due to the height occupied by the newly added subplot. However, I have no idea how to obtain the correct screen data area for the first plot. ``` final XYPlot plot = (XYPlot) cplot.getSubplots().get(0); // Shall I get _plotArea represents screen for getSubplots().get(0)? // How? // I try // // chartPanel.getScreenDataArea(0, 0); // chartPanel.getScreenDataArea(0, 1); // chartPanel.getScreenDataArea(1, 0); // chartPanel.getScreenDataArea(1, 1); // // All returned null // OK. I suspect this is causing me unable to get the correct screen y coordinate // I always get the same _plotArea, although a new sub plot had been added. final Rectangle2D _plotArea = chartPanel.getScreenDataArea(); final RectangleEdge rangeAxisEdge = plot.getRangeAxisEdge(); final double yJava2D = rangeAxis.valueToJava2D(yValue, _plotArea, rangeAxisEdge); ```
CrossHair Tracing In JFreeChart
CC BY-SA 4.0
0
2010-02-05T00:58:28.917
2019-06-13T06:10:54.350
2019-06-13T06:10:54.350
4,751,173
72,437
[ "java", "jfreechart" ]
2,205,362
1
2,205,388
null
0
187
how do i enable text input in a select element in order to both manually input a any numeric value or choose from a select having limited options? For example desktop applications such as photoshop, adjusting character size! ![alt text](https://movit.co.ug/select.gif)
how do i enable text input in a select element? (js or jQuery)
CC BY-SA 2.5
null
2010-02-05T06:12:18.197
2010-02-05T06:21:51.123
2017-02-08T14:20:48.193
-1
237,533
[ "jquery-selectors" ]
2,206,910
1
2,207,698
null
1
263
Windows Mobile can show different kind of user notifications, like this: ![alt text](https://b-soft.de/media/ScreenshotReminder.png) How can I enumerate through the reminders, windows mobile is showing to the user?
How to enumerate reminders windows mobile is showing?
CC BY-SA 2.5
null
2010-02-05T11:45:03.730
2010-12-13T13:17:01.657
2017-02-08T14:20:48.530
-1
7,021
[ "c#", "windows-mobile", "compact-framework" ]
2,209,084
1
2,258,231
null
12
3,600
I've a [mnemonic](http://definr.com/mnemonic) function that goes something like this: ``` function Mnemonic($mnemonic) { $result = null; $charset = array(str_split('aeiou', 1), str_split('bcdfghjklmnpqrstvwxyz', 1)); for ($i = 1; $i <= $mnemonic; $i++) { $result .= $charset[$i % 2][array_rand($charset[$i % 2])]; } return $result; } ``` Basically this generates a string with `$mnemonic` length where every odd character is a consonant and every even character is a vowel. While I understand this reduces the password complexity it's usually much more . Now I want to improve it by generating strings that are . ![QWERTY Keyboard Layout](https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Qwerty.svg/640px-Qwerty.svg.png) For instance, while a *nix newbie I always prefer RHEL based distributions over Debian ones, the main reason is the ease of typing `yum` versus the ease of typing `apt[-get]`, just try it for yourself. How should I implement the logic to generate strings that are easy to type on QWERTY keyboards?
Mnemonic Password Generation Algorithm for QWERTY Keyboards
CC BY-SA 2.5
0
2010-02-05T17:31:31.160
2014-10-02T21:06:35.850
2017-02-08T14:20:48.867
-1
89,771
[ "php", "algorithm", "string", "keyboard", "qwerty" ]
2,209,650
1
2,212,198
null
7
1,779
I'm testing a window that looks something like this: ![alt text](https://i.imgur.com/3OaT6.png) Dragging a Tag to a Card links the Tag to the Card. So does dragging a Card to a Tag. It's meaningless to drop a tag between two cards, or a card between two tags. I can ignore these outcomes in the `Handle...DataReceived` function like this: ``` if (dropPos != TreeViewDropPosition.IntoOrAfter && dropPos != TreeViewDropPosition.IntoOrBefore) return; ``` However, when dragging, the user still sees the option to insert: ![alt text](https://i.imgur.com/UU01L.png) How do I prevent this from happening?
In Gtk, when using Drag and Drop in a TreeView, how do I keep from dropping between rows?
CC BY-SA 2.5
0
2010-02-05T19:07:21.380
2013-01-23T19:15:23.757
2013-01-23T19:15:23.757
278,878
105,084
[ "c#", "drag-and-drop", "gtk", "gtk#", "gtktreeview" ]
2,210,240
1
null
null
6
2,785
I'm interested in making an OpenGL visualizer for MP3's as a pet project. I stumbled upon this youtube video which demonstrates someone showing off a visualizer being used in conjunction with Augmented Reality. [http://www.youtube.com/watch?v=SnshyLJSpnc#t=1m15s](http://www.youtube.com/watch?v=SnshyLJSpnc#t=1m15s) Please watch that video, but the augmented reality aspect of that video. I'm only interested in making a Visualizer, not augmented reality. What kinds of algorithms were used to generate those patterns in relation to the music? If you watch, you can see what looks like several different methods of visualization. The first one has a distinct look: The first one looked like waves moving over the rendering area: ![alt text](https://imgur.com/FY6eE.png) Another "mode" seemed to have the visualization move around the center in concentrict circles: ![alt text](https://imgur.com/v8qtV.png) Anyone who is well versed in Audio Programming, what kinds of algorithms could be used to generate similar looking visualizations? What kind of algorithm did the first one use? Or the one with the concentric circles? Any help in pointing me to what algorithms were used to generate these visualizations based on the music would help me greatly!
What kind of sound processing algorithm allows you to make visualizations like this?
CC BY-SA 2.5
0
2010-02-05T20:35:52.953
2011-07-23T07:44:14.757
null
null
264,161
[ "opengl", "audio", "visualization", "audio-processing" ]
2,210,438
1
2,211,849
null
2
1,009
![alt text](https://farm5.static.flickr.com/4039/4333382972_4c8d8c5a6f_o.png) Hi everyone, I'm creating a tabbed navigation from an XML file. However for some reason my loop only creates textfields for the active tab and the last tab [> You can preview my Flash here. <](http://leongaban.com/stackoverflow/RTMP/) (I turned textfield borders on) My Issues: The Active Tab (light colored tab) does not size correctly based on the width of the textfield My loop for some reason skips the 2 middle tabs, but correctly sets the 4th tab. ## XML Tab titles: - - - - It seems that the 2nd and 3rd tabs get sized correctly, but as you see further below, I get an error when trying to trace out the text of the 2nd and 3rd tab. ♥ Update: I now believe this is where my problem lies: ``` // tabNamer creates the active & default textfields tabNamer(tabNameActive, Fonts.ActiveTabText, tabData[0].id); // for ActiveTab tabNamer(tabNameDefault, Fonts.DefaultTabText, tabData[i].id); // for DefaultTabs ``` is a function containing just a textField, and I believe I keep overriding the last textField made, this is why only the 4th and last textField shows text. Is there a way to dynamically name my textFeilds are I loop? ## TabMenu.as (Entire Class) ``` package com.leongaban.TEN.ui { import flash.display.DisplayObject; import flash.display.LineScaleMode; import flash.display.JointStyle; import flash.display.MovieClip; import flash.display.Graphics; import flash.display.Sprite; import flash.display.Shape; import flash.events.Event; import flash.events.MouseEvent; import flash.utils.Timer; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.events.TimerEvent; import com.leongaban.TEN.ui.*; import com.leongaban.TEN.Global; import com.leongaban.TEN.model.*; public class TabMenu extends Sprite { private const position :Number = 0; private var tabNameDefault:TextField = new TextField(); private var tabNameActive :TextField = new TextField(); private var backing :Shape = new Shape(); private var tabData :Array = []; private var tabArray :Array = []; private var bgColor :uint = 0xF6F6F6; //0xE8E7E7; private var borderColor :uint = 0xCCCCCC; private var borderSize :uint = 1; private var sizeW :uint; private var sizeH :uint; private var topShadow :MovieClip; private var tileShadow :MovieClip; private var sideShadowL :MovieClip; private var sideShadowR :MovieClip; public function TabMenu():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); addChild(backing); addChild(topShadow); } public function drawTabMenu(w, h, color, videoHDiff, ypos):void { for (var i in Global.xml..tab) { tabData.push( { id:Global.xml..tab[i].@id, video:Global.xml..tab[i].vid, title:Global.xml..tab[i].title} ); //trace("TAB TITLES: "+tabData[i].id); } //trace("FIRST TAB DATA : "+tabData[0].id[0]+"\n"+tabData[0].video); sizeW = w; sizeH = h; topShadow = new EmptyMov(); tileShadow = new TileShadow(); sideShadowL = new SideShadowL(); sideShadowR = new SideShadowR(); sideShadowR.x = (sizeW-16) - sideShadowR.width; tileShadow.width = sizeW-16; topShadow.addChild(tileShadow); topShadow.addChild(sideShadowL); topShadow.addChild(sideShadowR); backing.graphics.beginFill(bgColor); backing.graphics.lineStyle(borderSize, borderColor); backing.graphics.drawRect(position, position, sizeW-17, videoHDiff); backing.graphics.endFill(); backing.y = tileShadow.height - 1; //DRAW THE TABS ------------- for (i in tabData) { //trace("TAB TITLES: "+tabData[i].id); var tab :MovieClip = new TabDefault(); var active :MovieClip = new TabActive(); tabArray.push(tab); //tab.video = tabData[i].video; //tab.title = tabData[i].title; tab.addChild(active); // add active tab movieclip to default tab movieclip // tabNamer creates the active & default textfields tabNamer(tabNameActive, Fonts.ActiveTabText, tabData[0].id); // for ActiveTab tabNamer(tabNameDefault, Fonts.DefaultTabText, tabData[i].id); // for DefaultTabs i < 1 ? active.visible = true : active.visible = false; //i < 1 ? tab.addChild(tabNameActive) : tab.addChild(tabNameDefault); i < 1 ? tabArray[0].addChild(tabNameActive) : tabArray[i].addChildAt(tabNameDefault,2); //tabArray[i].addChildAt(tabNameDefault,2); //tab.addChild(tabNameDefault); //if (i < 1) { tab.addChild(tabNameActive) } trace("i = "+i); trace("tabArray["+i+"].getChildAt(2) = "+tabArray[i].getChildAt(2).text); trace("tabNameDefault.text = "+tabNameDefault.text); // resize the tab background to textfield tab.y = topShadow.y + 5; // if first size to active textfield + 10 : if not size to default textfield + 10 tab.width = i < 1 ? tabNameActive.width + 10 : tabNameDefault.width + 10; tab.x = i < 1 ? 10 : tabArray[(i-1)].x + (tabArray[(i-1)].width + 3); //tab.active = i < 1 ? tab.active = true : tab.active = false; topShadow.addChild(tab); tab.mouseChildren = false; tab.buttonMode = true; tab.addEventListener(MouseEvent.CLICK, tabClick); } // set default thumbnails here //trace("tabData[0].id : "+tabData[0].id.@id+"\r"); //trace("tabData[0].video: "+"\r"+tabData[0].video+"\r"); //trace("tabData[0].titles : "+tabData[0].titles+"\r"); } private function tabNamer(textfield, textFormat, tabText):void { //trace("TabNamer called"); textfield.defaultTextFormat = textFormat; textfield.border = false; textfield.embedFonts = false; textfield.gridFitType = "SUBPIXEL"; textfield.sharpness = 100; textfield.antiAliasType = flash.text.AntiAliasType.ADVANCED; textfield.autoSize = TextFieldAutoSize.CENTER; textfield.selectable = false; textfield.mouseEnabled = false; textfield.x = 10; textfield.y = 4; textfield.text = tabText; } private function tabClick(e:MouseEvent = null):void { for (var i in tabArray) { //tabArray[i].active = false; tabArray[i].getChildAt(1).visible = false; } //e.target.active = true; e.target.getChildAt(1).visible = true; trace("Text for button clicked: "+e.target.getChildAt(2).text+"\r"); //trace("THUMBNAILS FOR TAB: " + e.target.video); // pass the video data to the thumbnail class } } } ``` ## tabNamer function ``` private function tabNamer(textfield, textFormat, tabText):void { //trace("TabNamer called"); textfield.defaultTextFormat = textFormat; textfield.border = true; textfield.embedFonts = false; textfield.gridFitType = "SUBPIXEL"; textfield.sharpness = 100; textfield.antiAliasType = flash.text.AntiAliasType.ADVANCED; textfield.autoSize = TextFieldAutoSize.CENTER; textfield.selectable = false; textfield.mouseEnabled = false; textfield.x = 10; textfield.y = 4; textfield.text = tabText; } ``` ## tabClick function ``` private function tabClick(e:MouseEvent = null):void { for (var i in tabArray) { //tabArray[i].active = false; tabArray[i].getChildAt(1).visible = false; } //e.target.active = true; e.target.getChildAt(1).visible = true; trace("Text for button clicked: "+e.target.getChildAt(2).text+"\r"); //trace("THUMBNAILS FOR TAB: " + e.target.video); // pass the video data to the thumbnail class } ``` (class function) ``` i = 0 tabArray[0].getChildAt(2) = This is first tab tabNameDefault.text = This is first tab i = 1 tabArray[1].getChildAt(2) = 2nd Tab tabNameDefault.text = 2nd Tab i = 2 tabArray[2].getChildAt(2) = The 3rd Tab tabNameDefault.text = The 3rd Tab i = 3 tabArray[3].getChildAt(2) = The 4th and last tab tabNameDefault.text = The 4th and last tab ``` (I'm trying to find the 2nd & 3rd textfields) ``` //Clicked Tab 1 Text for button clicked: This is first tab //Clicked Tab 2 RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/getChildAt() at com.leongaban.ui::TabMenu/tabClick() //Clicked Tab 3 RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/getChildAt() at com.leongaban.ui::TabMenu/tabClick() //Clicked Tab 4 Text for button clicked: The 4th and last tab ``` Been raking my brain over this all day :( hoping for any advice, tips or dude that's why! :)
Problem trying to dynamically create a tabbed navigation with dynamic text
CC BY-SA 2.5
null
2010-02-05T21:09:30.670
2010-02-08T19:03:14.217
2017-02-08T14:20:49.557
-1
168,738
[ "flash", "actionscript-3", "arrays", "textfield" ]
2,210,694
1
2,210,752
null
1
256
Basically, the below image represents the components on the homepage of a site I'm working on, which will have news components all over the place. The sql snippets envision how I think they should work, I would really appreciate some business logic advice from people who've worked with news sites before though. Here's how I envision it: ![alt text](https://i.imgur.com/bX7lX.gif) : Does the sql logic make sense? Are there any caveats/flaws that you can see? My schema would be something like: ``` articles: article_id int unsigned not null primary key, article_permalink varchar(100), article_name varchar(100), article_snippet text, article_full text article_type tinyint(3) default 1 ``` I would store all articles ( main featured, sub-featured, the rest ) in one table, I would categorize them by a `type` column, which would correspond to a number in my `news_types` table ( for the example I used literal text as it's easier to understand ). : Is it alright to rely on one table for different types of articles? A news article can have 3 image types: - - - For now I want each article to correspond to one image and not multiple. A user can post images for the article in the `article_full` TEXT column though. : I'm not sure how I should incorporate the article images into my schema, is it common for a schema that relies on 2 tables like this? article_image_links: ``` article_id article_image_id 1 1 ``` article_images: ``` article_image_id article_image_url 1 media.site.com/articles/blah.jpg ``` From the way I have my sql logic, there has to be some data in order for stuff to show up.. - `main`- `featured` : Should I bother creating special cases for if data is missing? For example, if there's no main featured article, should I select the latest featured, or should I make it a requirement that someone always specify a main article? : In the admin, when a user goes to post, by default I'll have a dropdown which specifies the article type, `normal` will be pre-selected and it will have the option for `main` and `featured`. So if a user at one point decides to change the article type, he/she can do that. : The way my featured and main articles work is only by the latest date. If the user wants, for example, to specify an older article for whatever reason as the main article, should I create custom logic, or just tell them to update the article date so it's later than the latest?
Is this how a modern news site would handle it's sql/business logic?
CC BY-SA 2.5
null
2010-02-05T21:47:16.553
2010-02-05T22:04:20.873
2010-02-05T22:03:11.063
145,190
145,190
[ "sql", "mysql", "django", "database-design", "business-logic" ]
2,211,277
1
null
null
12
1,097
Having recently installed the beta of VS 2010, I'm curious whether anybody knows how to get it to do something that was quite straightforward with VS 6. To create a simple database browser in VS 6, you could create an MFC application using a database view, connected to (for example an ODBC connection. Then, the interesting part. In a normal application, doing a -double-click on the control will bring up a dialog that lets you connect that control to a member variable of the dialog class. In a database application like this, however, it brings up a dialog that lets you connect the control to a field in the database: ![DB Field selection in Add Member Variable dialog](https://farm5.static.flickr.com/4036/4332943655_02d3e02477_o.jpg) Having done this for the fields we care about, we can build the application (note that we haven't typed in a line of code) and we can browse data from the database: ![Browsing live data](https://farm5.static.flickr.com/4005/4333698736_5d6b076748_o.jpg) At this point, we have live data being read from (in this case) a SQL Server database, and we can browse through it, modify data, etc. The development is about like we'd used something like Access, but the output is a standalone executable. How can I do the same (or how close to the same can I get) using Visual Studio 2008 or 2010?
Can I create a simple DB browser with VS 2010 like I could with VS 6?
CC BY-SA 2.5
0
2010-02-05T23:48:03.893
2010-02-06T01:02:11.317
2017-02-08T14:20:51.900
-1
179,910
[ "visual-studio", "visual-c++", "visual-studio-2010" ]
2,211,679
1
2,211,696
null
0
935
> I'm not familiar with django conventions at all so if you do provide advice could you be specific Considering my homepage would contain components of articles: ![http://i.imgur.com/bX7lX.gif](https://i.imgur.com/bX7lX.gif) In Zend, in my IndexController I would create models and populate the view with articles and data. What's a convention/structure I could use for the homepage view ( should I create a separate directory for home, dump a view.html file in it? or do I create a sub-application? ), how would you set your django structure up to accommodate this?
How should I setup my homepage in django?
CC BY-SA 2.5
null
2010-02-06T01:59:12.853
2010-02-07T05:05:08.567
2010-02-07T05:05:08.567
58,088
145,190
[ "django", "django-models", "conventions" ]
2,213,881
1
2,214,676
null
59
42,296
I personally like the [<fieldset>](http://www.w3.org/wiki/HTML/Elements/fieldset) tag because of how it draws a box and puts the [<legend>](http://www.w3.org/wiki/HTML/Elements/legend) at the top of it, over the border. Like this. ![example image of what I'm trying to achieve](https://i.stack.imgur.com/VJ2lh.png) However, the `fieldset` element was made to organize [forms](http://www.w3.org/wiki/HTML/Elements/form), and using it for general design is no better than using tables for general design. So, my question is... The border has to be erased under the `<legend>` (or whatever other tag will be used), and since there could be a "complex" body background image, I can't afford to just set the `background-color` of the legend to match the one of the element under. I'd like it to work without JavaScript, but CSS3 and XML-based formats (such as SVG or XHTML) are fine.
Is it possible to achieve a <fieldset>-like effect without using the <fieldset> tag?
CC BY-SA 3.0
0
2010-02-06T17:06:39.247
2020-02-03T21:52:28.327
2012-10-15T16:26:11.937
61,654
251,153
[ "html", "css", "fieldset" ]
2,215,640
1
2,215,670
null
0
106
I couldn't set inline elements background like this: ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/797b6857-3cd9-4509-9276-73b50cd47095/2010-02-07_0405.png) My code is this: ``` #divMansetKategoriHaberleriContainer { background-color: Transparent; margin-top: 4px; font-size: 12px; } .divKategoriHaberItem { float: left; background-color: White; width: 324px; height: 126px; margin: 0; padding: 0; } .divKategoriHaberItemImage { float: left; width: 80px; height: 80px; border: 1px solid red; margin: 2px; } .imgKategoriHaberResim_Cevre { width: 95%; height: 95%; } .divKategoriHaberItemBaslikIcerik { } .spHaberBaslik_Cevre { background-color: Green; display: inline; font-weight: bold; padding: 5px; height: 20px; } .spHaberIcerik_Cevre { display: block; } .divKategoriHaberDevami_Cevre { background-image: url('../images/HaberinDevami_Cevre.png'); background-repeat: no-repeat; background-position: right; height: 13px; } <div class="divKategoriHaberItem"> <div class="divKategoriHaberItemImage"> <img src='' alt='DÜNYANIN MEKANİK Dengesi Bozuldu' class="imgKategoriHaberResim_Cevre" /> </div> <div class="divKategoriHaberItemBaslikIcerik"> <span class="spHaberBaslik_Cevre"> <a href='CevreHaber.aspx?id=2128'>DÜNYANIN MEKANİK Dengesi Bozul</a> </span> <span class="spHaberIcerik_Cevre">Demokratik Kongo Cumhuriyeti'n</span> </div> <div class="divKategoriHaberDevami_Cevre"></div> </div> ``` PS: Sorry for i couldn't write with sentences :(
An Inline element has more than 2 lines (one within the other)
CC BY-SA 2.5
null
2010-02-07T02:14:36.503
2010-02-07T02:27:09.483
2017-02-08T14:20:52.930
-1
104,085
[ "css" ]
2,216,668
1
null
null
0
875
``` $button = new Zend_Form_Element_Submit('melnraksts'); $button->setAttrib('id','melnraksts'); $button->setValue(Lang::$form[17]); $button->setDecorators(array('Composite')); $button->removeDecorator('Errors'); $form->addElement($button); $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id','submit'); $submit->setValue(Lang::$form['1']); $submit->setDecorators(array('Composite')); $submit->removeDecorator('Errors'); $form->addElement($submit); ``` ![alt text](https://i192.photobucket.com/albums/z228/Somebi/two-submit-buttons-bug.jpg) Don't know why one of the submit buttons value dissapear after validation triggers. Left button is disabled via javascript, by returning false. So why does it's value dissapear? O_o Maybe because they both have submit type? Maybe there is another way to make submit type button?
Something wrong with values in submit buttons
CC BY-SA 2.5
null
2010-02-07T10:25:06.130
2010-02-17T10:22:24.627
2017-02-08T14:20:53.267
-1
849,669
[ "zend-framework", "button", "submit", "zend-form" ]
2,217,480
1
2,217,500
null
1
139
I have recently started to examine ASP.NET MVC. I have studied quite a few examples and common to these are that they contain quite simple scenarios, where a view will map to either an instance of a type in the model or a list of a paritcular type from the model. I'm looking for guidelines to compose/composite views. In the long term I would like Ajax to be part of the equation, but for now I'm looking for a simpler non Ajax setup. ### The problem Here is a description of a contrieved problem. A domain model contains the types and . ``` class A { String ID, String Name, int Age List<B> ListOfB } class B { String ID, String Name, String Url} ``` I would like to have a that allows the following: - - - - - The view should not show all of this at once, instead it has to show different combinations of information and functionality according to user input. Combinations of detail and functionality could forexample be: 1. Initially only show the dropdownlist containing A's 2. If an A has been selected in the dropdown: Show the particular A as selected in the dropdown Show detail info about the selected A Show list of detail info of related type B's 3. The user wants to edit a particular A Show the particular A as selected in the dropdown Show form that allows user to edit particular A Show list of detail info of related type B's 4. The user wants to add a new B Show the particular A as selected in the dropdown Show detail info about the selected A Show list of detail info of related type B's That could look something like this (used the web version of balsamiq mockups - what a fantastic invention!): Combination 2: ![combination 2 mockup](https://i.stack.imgur.com/GeBQj.jpg) Combination 4: ![combination 4 mockup](https://i.stack.imgur.com/inbXT.jpg) ### Creating the view and controller Since the solution has to allow for different combinations of data and functionality, I think it would be smart to have a parent view (not to be confused with a masterpage) that contained placeholders for parital views. Then, the parent views controller could make up the right combinations of model data and partial views and feed these to the parent view. ### Finally; the questions: - Is my way of thinking in accordance with the asp.net mvc methodology?- Can you explain/show (not necessarily all of it) how the controller can compile the right combination of partial views and feed these to the parent view?- Can you point me towards an Ajax based solution?- Can you suggest books/links that contain examples of complex views?
How to make rich/compound views
CC BY-SA 3.0
0
2010-02-07T17:09:07.580
2013-02-25T21:08:40.853
2013-02-25T21:08:40.853
889,949
126,789
[ "asp.net", "asp.net-mvc", "view" ]
2,218,228
1
2,218,244
null
5
837
On many banking and investment websites, the site prevents users from logging in from an unrecognized computer without first answering an additional question or activating that machine. How do developers typically create this feature? For example, here is the message that Salesforce.com gives when I connect to my account from an unrecognized machine: ![Activate Required image, computer not recognized](https://imgur.com/bmxfK.jpg) We're trying to do the same type of thing from one of our applications, but aren't sure about the best (and most secure) approach.
How to detect if user is connecting from a recognized computer?
CC BY-SA 2.5
0
2010-02-07T20:35:52.027
2010-02-08T08:09:49.787
null
null
257,954
[ "security", "cookies", "ip-address", "banking" ]
2,219,353
1
2,258,472
null
0
56
I have a problem with overlapping characters. Using sifr r436. The font is Dax, and the result is shown below. Any help would be appreciated. Thanks. ![alt text](https://i.imgur.com/n7R5t.jpg)
Danish characters overlapping in sIFR
CC BY-SA 2.5
null
2010-02-08T03:18:17.627
2011-02-25T04:42:15.423
null
null
98,191
[ "sifr" ]
2,220,052
1
2,220,086
null
0
398
just wondering if how can we retrieve a data from stored procedure, who's return value is not in a row. I've run the stored procedure and it doesn't return any rows but return some data >.< just like this photo. could anyone know how to retrieve return value @rtncode in .NET? ![alt text](https://img.photobucket.com/albums/v241/sherwinwilliam/aa.jpg) Thanks!
Retrieving data from Stored Procedure which is not in a ROW [ASP.NET C#]
CC BY-SA 2.5
null
2010-02-08T06:59:57.673
2010-02-08T07:11:36.673
2017-02-08T14:20:53.607
-1
159,294
[ "asp.net", "sql-server", "sql-server-2005", "c#-3.0" ]
2,221,379
1
2,221,699
null
5
8,025
I have a `JEditorPane` which is displayed inside a popup, triggered through a button. The pane contains long text, therefore it's nested inside a `JScrollPane`, and the popup is constrained to a maximal size of 300 x 100: ``` public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { String text = "Potentially looooooong text. " + "Lorem ipsum dolor sit amet, consectetuer" + "adipiscing elit, sed diam nonummy nibh euismod " + "tincidunt ut laoreet dolore magna aliquam" + "adipiscing elit, sed diam nonummy nibh euismod" + "erat volutpat. Ut wisi enim ad minim veniam, " + "quis nostrud exerci tation."; final JEditorPane editorPane = new JEditorPane("text/html", text); editorPane.setEditable(false); final JButton button = new JButton("Trigger Popup"); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { JPopupMenu popup = new JPopupMenu(); popup.setLayout(new BorderLayout()); popup.add(new JScrollPane(editorPane)); Dimension d = popup.getPreferredSize(); int w = Math.min(300, d.width); int h = Math.min(100, d.height); popup.setPopupSize(w, h); Dimension s = button.getSize(); popup.show(button, s.width / 2, s.height / 2); } }); JFrame f = new JFrame("Layout Demo"); f.setSize(200, 200); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setLocationRelativeTo(null); f.getContentPane().add(button); f.setVisible(true); } }); } ``` When the `JEditorPane` instance is shown for the first time (i.e. when the button is clicked once) it somehow seems to report a preferred height which is too small : ![first invocation](https://farm3.static.flickr.com/2766/4339881771_175a9617c5_m.jpg) After subsequent button clicks, the layout is just how one would expect it : ![subsequent invocations](https://farm3.static.flickr.com/2791/4340626266_d561923a8d_m.jpg) How can I enforce/impose a proper preferred size so it would
Controlling the preferred size of a JEditorPane with long text
CC BY-SA 2.5
0
2010-02-08T12:02:30.660
2010-02-08T13:03:44.527
2017-02-08T14:20:55.010
-1
57,448
[ "java", "swing", "layout", "jeditorpane" ]
2,223,008
1
null
null
1
32
Consider a template such as this ( questions posted below ): ![alt text](https://i.imgur.com/bX7lX.gif) Let's say I posted an article about the Superbowl and tagged it in the Sports category. In my articles table I have a flag for featured or not, and a flag for main article. So if I check the main flag it shows up as the main article. If I post another main article a day later it will be gone from the main featured area #1 unless I delete the latest main article, it won't show up in area #2 or area #3. I could solve this by updating my SQL logic for area #2 by checking for both main and featured articles, and weed out the last main article, would this be the ideal way to handle the situation if I wanted it to shift down to the regular featured articles? But if I made my sql logic entirely based on the latest posted and a user wanted to specify an article as the main featured regardless of date, should I add extra logic in for this? So for example there could only be one main at a time throughout the entire articles table. Or should I force the user to update the article date so it's a requirement for the main to be the latest posted? And let's say that after my Superbowl article rotates from the main to become the first, second, third, fourth featured I wanted it to show up in my category listings as the first article under Sports - to do this I would need to unset the main and featured flags, would it make sense to add code in my article submission code to only have 4 featured and 1 main at a time? Obviously if one gets deleted then it can't shift backwards. Would appreciate any advice on handling the organisation and display logic.
How do I go about handling the shifting of news articles in regards to main, featured, and category areas?
CC BY-SA 2.5
null
2010-02-08T16:19:33.813
2010-02-08T16:26:47.520
2010-02-08T16:24:56.787
145,190
145,190
[ "sql", "mysql", "business-logic" ]
2,224,122
1
2,227,109
null
2
6,476
I just started making games and I decided for my next project to use either flashdevelop or flex builder. Reason being is because you can embed just about everything and for licensing purposes and it recommended the the game is compiled into one file. flex sdk is good with that type of stuff. As of right now I decided to use flashdevelop. but recently it's been kicking my behind. First I wasnt able to use ui class (e.i. buttons, and textboxes) probably because of something stupid I did. Now for some reason I can not compile my applications. When I compile, nothing happens, no errors, no nothing. below is a screenshot of what happens when I compile. Yes i installed debugger and yes I installed sdk ![alt text](https://i159.photobucket.com/albums/t150/numerical25/delete-1.jpg) So now I was thinking about just going with flex builder. Not sure which one is more easier to assemble and use. But I do know the flex builder community is bigger, and they have a much better documentation. I am good with actionscript, but I am not so good with using flex. My ultimate question is... Which one is easier to assemble which one is easier to use which one is BETTER overall
flashdevelop vs flex builder
CC BY-SA 2.5
0
2010-02-08T19:06:14.723
2012-05-29T14:49:42.507
2017-02-08T14:20:55.693
-1
201,934
[ "apache-flex", "flash", "actionscript-3", "actionscript" ]
2,228,421
1
2,229,248
null
3
1,017
Is it possible to press keypad programmatically so that number for the key pressed shows on the screen? See the screenshot below for more explanation please: ![alt text](https://farm3.static.flickr.com/2720/4343354886_0d47674620.jpg) Nokia N70 CLDC 1.1 MIDP 2.0
J2ME: How to press keypad programmatically?
CC BY-SA 4.0
null
2010-02-09T10:49:21.850
2019-01-22T06:53:57.847
2019-01-22T06:53:57.847
1,033,581
139,459
[ "java", "java-me", "mobile" ]
2,229,920
1
null
null
7
6,627
I have a solution in Visual Studio Express that looks like this: ![](https://i474.photobucket.com/albums/rr103/ossavir/Solution.png) The `LogicSchema` class in C# that will parse a specified XML file at run-time. The following is in the `main` method of `Program.cs`: ``` LogicSchema ls = new LogicSchema( XDocument.Load( "schemas\\C#Schema.xml", LoadOptions.PreserveWhitespace)); ``` I created a folder in my solution called "schemas" to save the XML file and set the Build Action to and the "Copy to Output Directory" value to be . My expectation is that if open the file in notepad, make a change, and save it, the updated version of the XML file will be copied to the ouput directory (in this case, bin\debug) when I press F5. However, the updated file is not copied to the output directory unless I select . Regular does not work. What do I need to change so that when I press F5, the file is copied to the output directory when it's been updated?
Why does "Copy if newer" not copy a file when the file is updated?
CC BY-SA 2.5
0
2010-02-09T14:53:02.810
2013-02-17T16:19:14.890
2017-02-08T14:20:58.767
-1
166,258
[ "c#", ".net", "visual-studio", "file-io" ]
2,231,191
1
2,231,281
null
113
41,538
When you have "Mark occurrences" enabled in Eclipse, placing the cursor on any type/variable/method/etc will highlight all occurrences in the text editor and place a faint bar in the right ruler to show you the location of other occurrences in the file. Does anyone know where in the Preferences you can change what color is used to highlight the other occurrences in the side ruler? The color is way too faint for me with my current monitor/Windows Aero theme. I tried to go into Preferences > General > Appearance > Color and Fonts change the color for "Color labels - match highlight" but this didn't seem to apply. Here is a screenshot with what I am talking about: ![Eclipse screenshot](https://imgur.com/1XIRw.png)
How to change highlighted occurrences color in Eclipse's sidebar?
CC BY-SA 3.0
0
2010-02-09T17:49:28.847
2018-04-13T14:09:00.877
2013-03-04T00:05:52.750
15,168
4,249
[ "java", "eclipse", "highlighting" ]
2,232,727
1
2,232,831
null
4
5,416
Looking at a Windows `tooltips` class hint window, i see that it draws its drop-shadow the hint window's actual rectangle. Using - i can get the tooltip's window rect, and class styles: ![](https://i.stack.imgur.com/SpK7b.png) ``` Rectangle: (440, 229)-(544, 249), 104x20 Restored Rect: (440, 229)-(544, 249), 104x20 Client Rect: (0, 0)-(104, 20), 104x20 ``` You'll notice that the drop shadow you see is physically the window that's being drawn. How can i draw a shadow outside around my window, while being my window? : [The shadow is not drawn using the standard CS_DROPSHADOW class style.](https://stackoverflow.com/questions/2224220/win32-how-to-make-drop-shadow-honor-non-rectangular-layered-window) i've confirmed this experimentally, and can also see the class style's for the window in ; it does not use `CS_DROPSHADOW`: ``` Windows Styles: 94000001 WS_POPUP 80000000 WS_VISIBLE 10000000 WS_CLIPSIBLINGS 4000000 TTS_ALWAYSTIP 1 Extended Styles: 00080088 WS_EX_LAYERED 80000 WS_EX_TOOLWIN 80 WS_EX_TOPMOST 8 ``` So how can i draw outside my window? Trying to draw on the desktop DC is out. From Greg Schechter's [Redirecting GDI, DirectX, and WPF applications](https://learn.microsoft.com/en-us/archive/blogs/greg_schechter/redirecting-gdi-directx-and-wpf-applications): > Drawing To and Reading From the Screen -- Baaaad!Lastly, since we're on the redirection topic, one particularly dangerous practice is writing to the screen, either through the use of GetDC(NULL) and writing to that, or attempting to do XOR rubber-band lines, etc. There are two big reasons that writing to the screen is bad:It's expensive... writing to the screen itself isn't expensive, but it is almost always accompanied by reading from the screen because one typically does read-modify-write operations like XOR when writing to the screen. Reading from the video memory surface is very expensive, requires synchronization with the DWM, and stalls the entire GPU pipe, as well as the DWM application pipe. It's unpredictable... if you somehow manage to get to the actual primary and write to it, there can be no predictability as to how long what you wrote to the primary will remain on screen. Since the UCE doesn't know about it, it may get cleared in the next frame refresh, or it may persist for a very long time, depending on what else needs to be updated on the screen. (We really don't allow direct writing to the primary anyhow, for that very reason... if you try to access the DirectDraw primary, for instance, the DWM will turn off until the accessing application exits)
How to draw outside a window?
CC BY-SA 4.0
0
2010-02-09T21:39:49.737
2021-06-25T19:35:32.643
2021-06-25T19:35:32.643
254,343
12,597
[ "windows", "winapi", "dropshadow", "layered-windows", "ws-ex-layered" ]
2,234,985
1
2,242,093
null
0
596
I've been trying to export skinned and animated .x models with multiple materials on the same mesh but have found the skinning breaks when that happens. The animations work fine but the mesh stops wrapping around the bones properly (it seems) with what looks to be different vertices attaching themselves to different bones causing a strange mess. When only one material is attached to the entire mesh it looks fine: ![http://imgur.com/KSV0w](https://i.stack.imgur.com/y7YDu.png) However when two are attached it goes all nuts: ![http://imgur.com/l4PwI](https://i.stack.imgur.com/m3WYA.png) Not sur eif this is relevant but when I changed the material of a single triangle on the left side the entire left side of the model became garbled as you can see in the screenshot, however the right side was fine. When I changed the material of another triangle on the right side it all became garbled. I'm using the pandasoft DirectX exporter, I've also trid KW-Xport
Issue with animated .x files and multiple materials
CC BY-SA 3.0
null
2010-02-10T06:57:09.777
2011-12-07T23:20:03.820
2011-12-07T23:20:03.820
84,042
79,891
[ "animation", "directx", "skinning", "mesh", ".x" ]
2,235,155
1
2,235,588
null
0
2,090
I am using the WPF ToolKit `ChartControl` to create a columneries chart. Whenever I move mouse to my `Chart`, the `ToolTip` value will be displayed. I dont need this `ToolTip`, So how can I turn this off? ![alt text](https://farm5.static.flickr.com/4061/4345028349_93b0cbe14e_o.jpg)
Turn off Tooltip of WPF Toolkit chart control
CC BY-SA 3.0
null
2010-02-10T07:40:08.943
2011-09-19T16:03:44.293
2017-02-08T14:20:59.103
-1
245,211
[ "wpf", "charts", "tooltip", "wpftoolkit" ]
2,235,845
1
null
null
11
7,264
Using the `DwmExtendFrameIntoClientArea` API call with Aero Glass enabled works just fine. However, I want it to work when Aero Glass is disabled as well, like how it works in the Windows control panel: ![enter image description here](https://i.stack.imgur.com/a3cnd.png) Notice how the frame has extended into the client area, even though Aero Glass is disabled? When I make the `DwmExtendFrameIntoClientArea` API call in my application, the returned HRESULT is definitely not success, and my application ends up looking like this: [http://img197.imageshack.us/img197/9629/clientapplication.png](http://img197.imageshack.us/img197/9629/clientapplication.png) Normally, with Aero Glass enabled, the border stretches down to underneath the navigation buttons, like in the control panel. How do I do this? `DwmExtendFrameIntoClientArea` clearly isn't working. By the way, if it is relevant, my application is a WPF application.
DwmExtendFrameIntoClientArea without Aero Glass
CC BY-SA 3.0
0
2010-02-10T09:56:49.103
2014-07-09T18:20:57.480
2012-12-10T20:30:09.533
12,597
161,250
[ "c#", ".net", "wpf", "aero", "dwm" ]
2,236,120
1
2,236,263
null
40
44,647
After I start the emulator by hitting Debug in Eclipse, after certain time it disconnects from the ADB, but the emulator stays open. It is responsive, I can navigate and start apps. How can I attach back the emulator to ADB, to be able to debug from Eclipse? (the current workaround is the terminate the emulator, close Eclipse and restart both of them, which takes 10 minutes as you know the emulator needs time to start up) Check out this image: ![enter image description here](https://i.stack.imgur.com/kesMq.jpg) After I kill and restart server. One emulator process shows up in Devices tab in Eclipse. But that cannot be expanded, and I don't see sub-processes. I can't hit debug already, as it says: Debug already running. (How to I stop the debug?) If I managed to start the debugging of another project, It hangs out in the emulator telling me: Waiting for the debugger to attach. Nothing happens.
How to attach back the Android emulator to ADB?
CC BY-SA 3.0
0
2010-02-10T10:43:00.930
2013-11-25T15:40:00.380
2012-10-15T11:25:21.377
1,341,006
243,782
[ "android", "eclipse", "android-emulator", "emulation", "adb" ]
2,236,791
1
null
null
5
7,338
Here is my html: ``` <!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" xml:lang="en" lang="en"> <head> <style type="text/css"> input.navbutton { text-align: center; min-width: 100px; } </style> </head> <body> <input type="submit" class="navbutton " value="Next" /> </body> </html> ``` On IE 7, this ends up looking like this: ![alt text](https://i.stack.imgur.com/Raqs4.png) But on Firefox it looks like this: ![alt text](https://i.stack.imgur.com/IKr2R.png) As you can see, the text is not correctly centered in IE 7. Any ideas on how to solve this?
CSS problem: Combination of "text-align: center" and "min-width" not working in IE 7/IE 8 compat mode
CC BY-SA 4.0
0
2010-02-10T12:41:48.337
2018-12-23T00:03:07.517
2018-12-23T00:03:07.517
5,353,497
250,549
[ "internet-explorer", "css" ]
2,237,706
1
2,237,729
null
7
23,820
I've a form with an inline validation message in a span. ``` <span id="EndTimeErrors"> <label for="EndTime" class="field-validation-error"> Bitte geben Sie eine gültige Uhrzeit ein, zum Beispiel 8:00 oder 14:34 </label> </span> ``` ![Ugly wrap with span](https://i.stack.imgur.com/Ijyk3.png) Unfortunately the word wrap is really ugly. I could put the validation message in a div, to beautify the message. The result is better, but not perfect. ``` <div id="EndTimeErrors"> <label for="EndTime" class="field-validation-error"> Bitte geben Sie eine gültige Uhrzeit ein, zum Beispiel 8:00 oder 14:34 </label> </div> ``` ![Using a div](https://i.stack.imgur.com/RieCQ.png) What I really want is something like this: ![Mockup of goal](https://i.stack.imgur.com/ijAbe.png) What CSS code would you use to achieve the desired result?
Correct word wrap in a span tag
CC BY-SA 3.0
null
2010-02-10T15:01:11.867
2012-12-26T16:56:58.053
2012-12-26T16:56:58.053
13,295
233,226
[ "html", "css", "validation" ]
2,240,869
1
2,247,061
null
13
21,052
: The controller contains a method `public ActionResult SaveFile()` which returns a `FileContentResult`. : The view contains a form, which submits to this action. The result is this dialog:![enter image description here](https://i.stack.imgur.com/5xpNy.png) : The view contains some javascript to do an AJAX call to the same controller action where the form would post. Rather than triggering the aforementioned dialog, or even the AJAX success function, the response triggers the AJAX error function, and the `XMLHttpRequest.responseText` contains the file response. Make the request for the file using AJAX, and end up with the same result as when submitting a form. How can I make the AJAX request provide the dialog that submitting a form shows?
ASP.NET MVC Controller FileContent ActionResult called via AJAX
CC BY-SA 3.0
0
2010-02-10T22:39:34.307
2012-07-02T07:30:43.137
2020-06-20T09:12:55.060
-1
91,800
[ "asp.net", "asp.net-mvc", "ajax" ]
2,242,120
1
2,242,565
null
9
9,116
![alt text](https://i.stack.imgur.com/SQgXu.jpg) Hello, I have an image as shown above. Is it possible for me to detect the center point of the cross and output the result using Matlab? Thanks.
Detecting center point of cross using Matlab
CC BY-SA 4.0
0
2010-02-11T03:44:16.477
2019-01-04T22:22:58.073
2019-01-04T22:22:58.073
4,926,757
177,990
[ "matlab", "image-processing", "computer-vision" ]