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
1,108,587
1
1,109,822
null
6
14,044
I would like to style a `<ul>` to display all items in a box with rounded corners (see below): ![enter image description here](https://i.stack.imgur.com/ocf8o.gif) Is it possible to use CSS and only the `<ul>` (with no additional `<div>`s and tables), as I'm going to use it in a CMS system to style all `<ul>`s created by the user?
Style unordered list to display list items in rounded corner box
CC BY-SA 3.0
0
2009-07-10T09:20:11.823
2013-03-10T05:05:57.007
2013-03-10T05:05:57.007
707,111
2,808
[ "html", "css" ]
1,109,453
1
1,110,076
null
1
1,233
In a Silverlight interface I'm working on I have the need to resize a stack panel when its container resizes, to prevent the text in it from being truncated. The text in question is added at runtime from language files, depending on the language the user has selected. As the lengths of strings can vary considerably between languages I'm a bit stumped on how best to approach this. This is what it looks like. ![alt text](https://farm4.static.flickr.com/3465/3707178078_3b9b86c598_o.png) The stack panel in question is the coloured block and the labels Driving, Active Work, Availability and Break are the strings whose length can change. The XAML currently looks like this. ``` <StackPanel x:Name="StatusTotals" Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,5,0,5"> <Border x:Name="DrivingBorder" Background="#80FF0000" BorderBrush="Black" BorderThickness="1" Opacity="1" CornerRadius="5,0,0,5" Margin="0,0,-1,0"> <StackPanel Orientation="Vertical" Margin="5,1" VerticalAlignment="Center"> <TextBlock Text="Driving" Tag="dttlDriving" HorizontalAlignment="Center"/> <TextBlock x:Name="DrivingDuration" Text="00:00" HorizontalAlignment="Center"/> </StackPanel> </Border> <Border x:Name="ActiveWorkBorder" Background="#8000FFFF" BorderBrush="Black" BorderThickness="1" Opacity="1" Margin="0,0,-1,0"> <StackPanel Orientation="Vertical" Margin="5,1" VerticalAlignment="Center"> <TextBlock Text="ActiveWork" Tag="dttlActiveWork" HorizontalAlignment="Center"/> <TextBlock x:Name="ActiveWorkDuration" Text="00:00" HorizontalAlignment="Center"/> </StackPanel> </Border> <Border x:Name="AvailabilityBorder" Background="#80FFFF00" BorderBrush="Black" BorderThickness="1" Opacity="1" Margin="0,0,-1,0"> <StackPanel Orientation="Vertical" Margin="5,1" VerticalAlignment="Center"> <TextBlock Text="Availability" Tag="dttlAvailability" HorizontalAlignment="Center"/> <TextBlock x:Name="AvailabilityDuration" Text="00:00" HorizontalAlignment="Center"/> </StackPanel> </Border> <Border x:Name="BreakBorder" Background="#8000FF00" BorderBrush="Black" BorderThickness="1" Opacity="1" CornerRadius="0,5,5,0"> <StackPanel Orientation="Vertical" Margin="5,1" VerticalAlignment="Center"> <TextBlock Text="Break" Tag="dttlBreak" HorizontalAlignment="Center"/> <TextBlock x:Name="BreakDuration" Text="00:00" HorizontalAlignment="Center"/> </StackPanel> </Border> </StackPanel> ``` I would like to be able to reduce the size of this panel if it's wider than the ruler drawn above it, which is already dynamically resizing as I want, but would like the values beneath the labels to stay at the size they are for the sake of readability. What would be the best way to approach this? I've considered setting the FontSize properties of the labels or using a ScaleTransform but I'm unsure which of these is the best way to go. Is there a way to derive the width that the panel will adopt without actually changing the font sizes and then testing ActualWidth? If I could do this it would make this task easier.
How best to resize XAML with dynamic text
CC BY-SA 2.5
null
2009-07-10T13:15:14.970
2009-07-10T15:04:53.910
2017-02-08T14:13:22.963
-1
1,535
[ "silverlight", "xaml", "dynamic", "resize" ]
1,109,536
1
7,947,389
null
234
108,328
How would I "inflate" a polygon? That is, I want to do something similar to this: ![alt text](https://i.stack.imgur.com/GUzIo.gif) The requirement is that the new (inflated) polygon's edges/points are all at the same constant distance from the old (original) polygon's (on the example picture they are not, since then it would have to use arcs for inflated vertices, but let's forget about that for now ;) ). The mathematical term for what I'm looking for is actually . +1 to balint for pointing this out. The alternative naming is . Here are some links: - [A Survey of Polygon Offseting Strategies](http://fcacciola.50webs.com/Offseting%20Methods.htm)- [Polygon offset, PROBLEM](http://groups.google.si/group/comp.graphics/browse_thread/thread/4799ab44d71f434e/e3ec0b40c231706c?hl=en&ie=UTF-8&q=offset+polygon&pli=1)- [Buffering Polygon Data](https://geogra.uah.es/patxi/gisweb/BuffersModule/Buff_poly.htm)
An algorithm for inflating/deflating (offsetting, buffering) polygons
CC BY-SA 4.0
0
2009-07-10T13:32:47.490
2023-02-17T18:42:23.937
2020-08-08T01:06:39.427
1,681,985
55,408
[ "algorithm", "geometry", "polygon", "computational-geometry", "buffering" ]
1,110,048
1
1,110,079
null
2
716
I have three images that I would like to join in a widget I'm creating in Html. I just want to give the round effect on the corners. These are the three images: ![alt text](https://imgur.com/ydFae.png) ![alt text](https://imgur.com/JrPiK.png) ![alt text](https://imgur.com/jmOYZ.png) I have the middle one repeating in my css so that it fills up the space between the two edges. ``` .widgetMainLeft { background: url('/Content/Images/Title_Bar_Left.png') no-repeat; width:6px; min-height:100%; } .widgetMain { background: url('/Content/Images/Title_Bar_Middle.png') repeat-x; text-align:left; margin-top:auto; min-height:100%; } .widgetMainRight { background: url('/Content/Images/Title_Bar_Right.png') no-repeat; width:6px; min-height:100%; } ``` I am placing these three classes in one container class, but it simply displays the middle one. The background images are at the top of the widget where the title is. ``` <div class="widgetBody"> <div class="widgetMainLeft" /> <div class="widgetMain"> <div class="widgetTitle">Messages</div> <div class="widgetDisplayedArea"> <table> ... </table> </div> </div> <div class="widgetMainRight" /> </div> ``` This is how the widget looks now: ![alt text](https://imgur.com/05VF7.png) And this is how it should look: ![alt text](https://imgur.com/yH4KW.png) How can I make this effect happen?
How can I join background images?
CC BY-SA 2.5
null
2009-07-10T14:59:27.477
2009-07-10T18:14:06.237
2009-07-10T15:19:07.087
117,792
117,792
[ "html", "css" ]
1,111,643
1
1,111,876
null
1
1,713
I want to "fix" the Background while only the ListFields scrolls. Current Problem: ![alt text](https://files.getdropbox.com/u/357576/saves/8310-1.png) Scrolling Down (the surounding box should move with the List) ![alt text](https://files.getdropbox.com/u/357576/saves/8310-1-02.png) Corresponding code for the VerticalFieldManager ``` VerticalFieldManager _bottom_box = new VerticalFieldManager(Field.FIELD_HCENTER | Field.FIELD_VCENTER | VerticalFieldManager.VERTICAL_SCROLL | Field.USE_ALL_HEIGHT) { protected void sublayout(int maxWidth, int maxHeight) { super.sublayout(maxWidth, maxHeight); setExtent(maxWidth - 6, maxHeight - 3); } protected void paint(Graphics graphics) { graphics.clear(); graphics.setColor(Color.WHITE); graphics.fillRect(0, 0, (this.getWidth()), (this.getHeight())); graphics.setColor(color_computacenter_light_blue); graphics.drawRect(0, 0, (this.getWidth()), (this.getHeight())); super.paint(graphics); } }; ``` Any Ideas, how to fix this? Thanks
Blackberry Custom Background of VFM scrolls with listfield?
CC BY-SA 2.5
0
2009-07-10T19:55:06.360
2011-04-13T12:48:21.197
2017-02-08T14:13:23.993
-1
107,004
[ "user-interface", "blackberry" ]
1,112,500
1
1,112,689
null
3
1,229
I'm building app that will store large video files to the server and then user will be able to view them. For my app I'm using GWT + GAE/J and to store files I would like to use S3 account. But as we know that you can upload max 10mb to GAE. I have [asked this kind of question](https://stackoverflow.com/questions/1067596/gwt-on-gae-and-s3) before and the answer that I have accepted will work only if you have file less then 10mb. That [solution](http://bizo-dev.blogspot.com/2009/05/google-app-engine-java-and-s3.html) that KevMo have suggested uploads whole files to the server but what if my file is 20mb or 100mb. Is it possible to divide that file into 10mb peaces, send them to GAE and then assemble those files on S3 server. Here is the picture of what I'm trying to accomplish here: ![alt text](https://geni-athena.s3.amazonaws.com/Untitled-1.jpg) Thanks
Saving Large file using GWT + GAE + S3 path
CC BY-SA 2.5
null
2009-07-10T23:58:54.123
2009-07-11T01:36:55.313
2017-05-23T12:33:39.607
-1
51,230
[ "java", "google-app-engine", "gwt", "amazon-s3" ]
1,113,751
1
null
null
0
642
I have developed a project in VS2005(C#) which contains two crystal reports, the project is working fine and crystal reports are running properly on my system. But when my friend tries to run the project on his system, then the projects runs well but when I am opening crystal reports I am getting the error shown in image below ![crystal report error in visual studio 2005](https://farm3.static.flickr.com/2658/3710011782_d2456689bd_o.png) We are not running packaged setup, its the whole project which we are running in framework getting this error. Everything is installed correctly on my friends system, then why its giving this error, please tell me what we can do this to correct this error?
Crystal report is not working properly in Visual Studio 2005?
CC BY-SA 2.5
null
2009-07-11T13:49:17.363
2009-07-11T14:16:19.480
2017-02-08T14:13:25.677
-1
45,261
[ "c#", ".net", "visual-studio", "visual-studio-2005", "crystal-reports" ]
1,113,845
1
1,113,857
null
0
4,697
It doesn't stay where I want it, look at this: ``` <div style="float: left; width: 30%"> <img src="{avatar}" alt="" /> </div> <div style="float:right; width: 70%; text-align: left"> {message} </div> <div style="clear:both"></div> ``` ![](https://i.stack.imgur.com/wpcgS.png) ![](https://i.stack.imgur.com/B6Iri.png) I want the text to be in the top (tried vertical-align: top), and i'd like the image to be in the white box in IE. Hope someone more skilled can help me out. Thanks! Can't figure out the problem :/ # Edit: Added whole code ``` * { padding: 0; margin: 0; } body { font: 11px Geneva, "Trebuchet MS", Arial, Verdana, sans-serif; width: 999px; background: #EFEFEF; } #content { width: 400px; } .thread-content { padding: 5px; border: 1px solid #CECFCE; background: #FFF; } div.header { border: 1px solid #CECFCE; background: #FFF; margin-bottom: 10px; } <div id="content"> <div class="header">{title}</div> <div class="thread-content"> <div style="float: left; width: 30%; padding: 5px"> <img src="{avatar}" alt="user avatar" /> </div> <div style="float: right; width: 70%; text-align: left"> {message} </div> <div style="clear:both"></div> </div> </div> ```
CSS floats messed up
CC BY-SA 4.0
0
2009-07-11T14:39:12.500
2019-03-28T18:03:16.740
2019-03-28T18:03:16.740
4,751,173
132,432
[ "css", "html", "css-float" ]
1,116,134
1
1,116,150
null
2
346
I'm curious. What could be the reason that a Comparator shuffles entries on each application start? ``` final static class ContactsListComparator implements Comparator { public int compare(Object o1, Object o2) { if((o1.toString().compareTo(o2.toString()))<0) { return -1; } if((o1.toString().compareTo(o2.toString()))>0) { return 1; } else { return 0; } } } ``` First App Start: ![alt text](https://files.getdropbox.com/u/357576/saves/shuffel1.png) Second App Start ![alt text](https://files.getdropbox.com/u/357576/saves/shuffel2.png) As mentioned in one the answer The Comparator actually compares an custom object Contact ``` public class Contact { // Members private String _contactFirstName; private String _contactLastName; private long _contactLastModified; // Constructor public Contact() { set_contactLastModified(); } public Contact(String contactFirstName) { _contactFirstName = contactFirstName; set_contactLastModified(); } // Accessable Getters public String get_contactFirstName() { return _contactFirstName; } public String get_contactLastName() { return _contactLastName; } public long get_contactLastModified() { return _contactLastModified; } public void set_contactLastModified() { _contactLastModified = System.currentTimeMillis(); } } ```
Strange behaviour: Java Comparator randomizes list entries
CC BY-SA 2.5
null
2009-07-12T14:38:24.697
2009-07-12T16:12:18.657
2017-02-08T14:13:26.680
-1
107,004
[ "java", "blackberry", "list" ]
1,116,963
1
1,183,327
null
6
36,486
I am trying to build an adhoc build for my app , I am following the instructions on the apple's documentation which says > Select the Target and open the Build settings inspector. In the ‘Code Signing Entitlements’ build setting, type in the filename of the new Entitlements.plist file including the extension. There is no need to specify a path unless you have put the Entitlements.plist file somewhere other than the top level of the project. But i dont see that section , what am i missing ?![alt text](https://i.stack.imgur.com/QsgYi.png)
Don't see Code Signing Entitlements in xcode target properties
CC BY-SA 3.0
null
2009-07-12T21:27:34.840
2019-03-31T07:59:54.807
2015-06-20T02:16:54.150
1,159,643
70,551
[ "iphone", "xcode", "code-signing" ]
1,117,069
1
1,135,913
null
3
1,081
I'm used to [VSSConneXion](http://www.epocalipse.com/vcx.htm), and love the feature 'Review Changes' where I can go through every changed file and comment the change while looking at it: ![alt text](https://www.epocalipse.com/images/v_review_changes.png) Now I'm trying to get used to SubVersion and Tortoise. Is there a similar feature available? I can get a list of changed file, and I can diff each file for changes, but I can't find a way to comment on the changes while looking at the diffs.
Subversion: Review changes
CC BY-SA 4.0
null
2009-07-12T22:11:22.707
2018-10-21T13:48:58.330
2018-10-21T13:48:58.330
397,817
11,956
[ "svn", "tortoisesvn" ]
1,117,211
1
1,118,005
null
87
58,085
I would like to tint an image with a color reference. The results should look like the Multiply blending mode in Photoshop, where would be replaced with : ![alt text](https://i.stack.imgur.com/CqiUz.png) I will be changing the color value continuously. I would put the code to do this in my ImageView's drawRect: method, right? As always, a would greatly aid in my understanding, as opposed to a link. Subclassing a UIImageView with the code suggested. I put this in viewDidLoad: of my view controller: ``` [self.lena setImage:[UIImage imageNamed:kImageName]]; [self.lena setOverlayColor:[UIColor blueColor]]; [super viewDidLoad]; ``` I see the image, but it is not being tinted. I also tried loading other images, setting the image in IB, and calling setNeedsDisplay: in my view controller. : drawRect: is not being called. I found an old project that had an imageView set up properly so I could test Ramin's code and it works like a charm! For those of you just learning about Core Graphics, here is the simplest thing that could possibly work. In your subclassed UIView: ``` - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFillColor(context, CGColorGetComponents([UIColor colorWithRed:0.5 green:0.5 blue:0 alpha:1].CGColor)); // don't make color too saturated CGContextFillRect(context, rect); // draw base [[UIImage imageNamed:@"someImage.png"] drawInRect: rect blendMode:kCGBlendModeOverlay alpha:1.0]; // draw image } ```
How would I tint an image programmatically on iOS?
CC BY-SA 4.0
0
2009-07-12T23:38:02.050
2019-04-25T08:34:27.397
2019-04-25T08:34:27.397
1,033,581
23,973
[ "ios", "cocoa-touch", "image-processing", "uiimage", "tint" ]
1,117,757
1
1,123,619
null
1
1,984
I'm trying to figure out the ToolStripSplitButton. The purpose is to display a usercontrol gauge when a ToolStripSplitButton is pressed. However, no matter what settings I try, there is a grey line visible below the button. The ToolStrip itself is set to RenderMode.System, is not docked, and the ToolStripSplitButton is the only component in it. I remove the line by introducing a custom ToolStripRenderer class, but this seems like a total overkill for removing this single annoying dark grey line under the control. I realize it might be a total shot in the dark since I don't provide the rest of the gazillion settings for these components, but I was hoping someone could provide insight into why this control is behaving the way it does. --- My second question is regarding the behaviour of the ToolStripSplitButton. Is there any way to avoid the flat and borderless look that the component displays before the mouse hovers over it? I'm trying to give it a uniform look along with the rest of the buttons in the panel, and the ToolStripSplitButton only appears raised when the mouse cursor is placed above the component. Here's a screenshot: ![ToolStripSplitButton flawed](https://i.stack.imgur.com/a6zqI.png) Any help is greatly appreaciated!
Winforms ToolStripSplitButton displays with a grey line under it, and is only raised on when the mouse hovers over it
CC BY-SA 3.0
0
2009-07-13T04:54:47.773
2011-11-13T17:41:30.387
2011-11-13T17:41:30.387
118,211
118,211
[ "c#", "winforms", "toolstrip" ]
1,120,457
1
1,120,537
null
6
2,526
Alex explained what I'm looking for much better than I have: > You want an existing program that allows you to draw a picture, captures what you do as you draw, and writes each action as a Java command. When you click the "Drawl Oval" tool and click at 0,0 and then at 50,50, it would generate the line g.drawOval(0,0,50,50). If anybody knows of a program such as this, let me know. Thanks. --- I've been working with Java and custom drawing using the java.awt.Graphics library lately, but find it is taking too much time to write manually. Is there any simple graphics editor (like mspaint) which generates source code? Example: Drawing this: ![alt text](https://imgur.com/UEqRf.gif) Would generate: ``` public void update(Graphics g) { g.translate(0, 0); g.drawOval(0, 0, 50, 50); } ``` Thanks.
Java Image Editor which renders output as source code?
CC BY-SA 2.5
0
2009-07-13T16:13:53.943
2009-07-28T19:20:03.550
2009-07-28T19:20:03.550
40
40
[ "java", "graphics", "code-generation", "image-editor" ]
1,121,338
1
1,121,419
null
0
662
I installed the latest version of Wordpress and added the [WP-Syntax](http://wordpress.org/extend/plugins/wp-syntax/) plugin (and also the [Markdown Extra](http://michelf.com/projects/php-markdown/) plugin, but I think it's unrelated to this issue). It works perfectly with both themes that ship with Wordpress: [looking good using WordPress Default 1.6](https://imgur.com/tEPSe.png) and [looking equally good with the WordPress Classic 1.5](https://imgur.com/IOoYG.png) theme. However it doesn't work with the excellent [LightWord](http://wordpress.org/extend/themes/lightword) theme, which I would like to use. The code box looks strange with the right border at the end of the actual code: ![alt text](https://imgur.com/q66im.png) I have tried investigating this with Firebug without any success. The CSS from the WP-Syntax plugin should be the same in all three theme cases. So the fact that it looks wierd with this theme has to do with some inherited CSS property from the LightWord theme. This in turn probably means that the WP-Syntax plugin should reset something more for its CSS to work correctly. Advanced CSS isn't something I'm good at. But I would very much like to resolve this problem as soon as possible. I'm also curious from a technical view point what could be causing this behavior? I hope someone with good CSS skills will be able to help out! We (you if you want to, me if you don't feel like it) could then file a bug report in the appropriate place, to get these components working together. To resolve this I understand you need more than screenshots. I have a link with the problem theme, which could be used to investigate further. (Taken down as the problem is solved) In response to a comment I'm also including a link to the working web site using the classic theme and the same plugin setup: (Taken down as the problem is solved) Thank you for reading! ## Summary of problems I'd like to solve: - - `.wp_syntax {width:100%;}`-
Fix a CSS problem with a Wordpress theme and a syntax highlighting plugin
CC BY-SA 2.5
0
2009-07-13T18:46:50.873
2009-07-14T18:33:35.357
2009-07-14T18:33:35.357
null
null
[ "css", "xhtml" ]
1,126,701
1
null
null
0
1,185
The app I'm developing requires that it be deployed in China, which means that it needs to have Pinyin and Chinese character handling. I'm told that the way that our customers handle character entry is like so: - - ![pinyin characters](https://mmroden.smugmug.com/photos/591010893_TtC3y-L.jpg) - How can I hook such programs (I believe one is called 'mspy.exe', from Microsoft, which I'm lead to believe comes with Microsoft versions of XP) into a WPF text box? Right now, the user can enter text either by using their keyboard or by using an on-screen keyboard, so I will probably need to capture the event of a keypress from either source and feed it to some OS event or to MSPY.exe or some similar program. Or is there some other way to enter pinyin and have it converted to Mandarin? Is there a program other than MSPY I should look at? EDIT: For those of you who think that this should 'just work', it does not. Chinese character entry will work just fine if entering text into notepad or the start->run menu or whatever, but it will not work in WPF. That's the key to this question: how do I enable WPF entry? There's the Google Pinyin and Sogou pinyin, but the websites are in Mandarin or Chinese or something similar and I don't read the language.
Pinyin Character entry on a touchscreen keyboard
CC BY-SA 2.5
0
2009-07-14T17:00:29.117
2012-04-13T13:48:51.600
2017-02-08T14:13:29.140
-1
21,981
[ "wpf", "touchscreen" ]
1,128,294
1
null
null
0
1,649
I seem to be having a problem with my table when I load in more information with Jquery. When I click the 'more info' link more content slides down but unfortunately seems to expand the table right or something. Here are a picture of the page being expanded to explain better: 'more info' link clicked: ![Click Here](https://i645.photobucket.com/albums/uu171/damicoa1/Picture1.png) And here is the page source: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Title Here</title> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="listing.js"></script> </head> <body> <div id="login-nav"> <a href="login.php">Please Login!</a> </div> <div id="top-nav"> <a href="index.php">Home</a> <a href="buy.php">Sites</a> <a href="register.php">Sign-Up</a> <a href="login.php">Login</a> <a href="myac.php">My Account</a> </div> <div id="page-wrap"> <div id="curve-container"></div> <div id="main-content"> <div id="article-area"> <h1>Sites</h1> <div id="output-listings"> <div class="main-info"> <table class="listings"> <tbody> <tr id="more-info-1" class="mi-1"> <td> <div class="more-information-1"></div> </td> </tr> <tr id="main-info-1"> <td>Leftlane News</td> <td>www.leftlanenews.com/</td> <td><a id="link-1" class="more-info-link" href="#">More info</a></td> </tr> <tr id="more-info-2" class="mi-2"> <td> <div class="more-information-2"></div> </td> </tr> <tr id="main-info-2"> <td>Motor Authority</td> <td>www.motorauthority.com/ </td> <td><a id="link-2" class="more-info-link" href="#">More info</a></td> </tr> <tr id="more-info-3" class="mi-3"> <td> <div class="more-information-3"></div> </td> </tr> <tr id="main-info-3"> <td>Autoblog</td> <td>http://www.autoblog.com/</td> <td><a id="link-3" class="more-info-link" href="#">More info</a></td> </tr> </tbody> </table> </div> </div><!--end output-listings--> </div> <div class="clear"></div> </div> <div id="footer"></div> <div id="curve-container"></div> <div id="features"> <div id="p-header"> <h1>Header Here</h1> <p>Text Here.</p> </div> </div> <div id="ft-bottom"></div> <div id="text-footer"><p>Copyright &copy; 2009 . All rights reserved.</p></div> </div> </body> </html> ``` Anyone know whats going on? And here is the CSS file if anyone needs to take a peek at it: ``` * { margin: 0; padding: 30px 45px; } body { background: #EFEFEF none repeat scroll 0 0; color: #333333; font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif; font-size: 12px; font-size-adjust: none; font-style: normal; font-variant: normal; font-weight: normal; line-height: 18px; } /* TOOLBOX */ .clear { clear: both; } /* END TOOLBOX */ #top-nav { text-align: right; } #top-nav a { padding: 10px 30px; text-decoration: none; } #top-nav a:link { color: #333333; } #top-nav a:visited { color: #999999; } #top-nav a:hover { color: #0088CC; } #page-wrap { } #curve-container { background: url(content_bgtop.gif) no-repeat scroll 0 0; padding: 2px 26px; width: 932px; } #main-content { width: 984px; background: url(content_bg.gif) repeat-y; } #article-area { } #footer { background: url(content_bgbottom.gif) no-repeat; width:932px; } #features { width: 984px; background: url(content_bg.gif) repeat-y; } #p-header { } #ft-bottom { background: url(content_bgbottom.gif) no-repeat; width:932px; } #text-footer { font-size: 10; text-align: center; } .spacer{clear:both; height:1px;} .formlogin { margin: 0 auto; width: 720px; padding: 40px; } #loginform { border: solid 2px #333333; background: #EFEFEF; } #loginform label { display:block; font-weight:bold; text-align:right; width:140px; float:left; } #loginform .small { color:#666666; display:block; font-size:11px; font-weight:normal; text-align:right; width:140px; } #loginform input { float:left; font-size:12px; padding:4px 2px; border:solid 1px #aacfe4; width:200px; margin:2px 0 20px 10px; } #output-listings { margin-top: -150px; margin-bottom: 20px; padding: 0px; } table { width: 800px; } #listing-db { padding: 0px; } tr.hover td { background: #FDFFE7; } table { border-collapse:collapse; color:#3F3F3F; font-family:arial,helvetica,sans-serif; border-top:1px solid #DFDFDF; } #output-listings { padding-top: 150px; } .mi { display: none; width: 800px; } ```
Table rows shifting right
CC BY-SA 3.0
null
2009-07-14T21:58:12.883
2016-09-30T19:33:40.630
2017-02-08T14:13:29.830
-1
137,679
[ "jquery", "css", "css-tables" ]
1,131,867
1
1,131,882
null
19
14,183
Can one domain generate multiple cookies on visitor's web browser? If so, when user vists the website, which cookies will be delivered to server? And why would a website generate multiple cookies? I checked my Google Chrome Browser's Cookies settings, found that there are multiple cookies of nytimes.com. If server wants to store multiple key/value pairs in cookies, can't they be stored in the same cookies? ![multiple cookies](https://farm3.static.flickr.com/2562/3723937870_553bc15f30.jpg) ![cookies-1](https://farm3.static.flickr.com/2468/3723938124_2178102116.jpg) ![cookies-2](https://farm3.static.flickr.com/2604/3723938360_40c1eb998a.jpg)
Can One Domain Have Multiple Cookies?
CC BY-SA 2.5
0
2009-07-15T14:47:06.537
2013-05-20T03:42:23.663
2017-02-08T14:13:31.573
-1
93,563
[ "http", "cookies" ]
1,131,937
1
1,131,952
null
2
9,027
I realize this is kind of a long question, but I saw no other way here than to post my code, that I tried to keep as short and simple as possible for the sake of clarity. Of course tons of best practices are violated to do so, the example is long enough as it is.. I made a very simple wpf app that - - - In the following example, I have edited the age of Bar. However, in the List, the age is not updated. If I ask the underlying collection, it still appears to have been updated.. How can I make the list know ? Following are, besides a screenshot, the code and the XAML NOTE : if the image does not show, try to open it in a new tab or window. --- ![alt text](https://lh4.ggpht.com/_0JKcAS7pLxo/Sl3qvMR6TYI/AAAAAAAACnM/Y9yuFtZ1IR4/EditPerson.png) --- ``` namespace ASAPBinding { public class Person { public string Name { get; set; } public int Age { get; set; } public override string ToString() { return String.Format("{0} ({1})",Name,Age); } } } ``` --- ``` namespace ASAPBinding { public class Dal { public ObservableCollection<Person> Persons { get; set; } public Dal() { Persons = new ObservableCollection<Person>(); Persons.Add(new Person() {Name = "Bar", Age = 25}); Persons.Add(new Person() {Name = "Foo", Age = 50}); } public void PrintOutCollection() { MessageBox.Show( Persons[0].ToString() + "\n" + Persons[1].ToString() ); } } } ``` --- ``` <Window x:Class="ASAPBinding.EditPersons" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:ASAPBinding" x:Name="window1" Title="EditPersons" Height="300" Width="300"> <Window.Resources> <local:Dal x:Key="dal"/> </Window.Resources> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="1*" /> <ColumnDefinition Width="1*" /> </Grid.ColumnDefinitions> <ListBox Name="ListBox1" ItemsSource="{Binding Source={StaticResource dal}, Path=Persons, Mode=TwoWay}" Grid.Column="0"/> <StackPanel DataContext="{Binding ElementName=ListBox1, Path=SelectedItem, Mode=TwoWay}" Grid.Column="1" Margin="0,0,0,108"> <TextBox Text="{Binding Path=Name}" /> <TextBox Text="{Binding Path=Age}" /> <Button Click="Button_Click">Show Collection</Button> </StackPanel> </Grid> </Window> ``` --- ``` public partial class EditPersons : Window { public EditPersons() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { Dal dal = (Dal) window1.FindResource("dal"); dal.PrintOutCollection(); } } ```
How to make listview update itself in wpf?
CC BY-SA 2.5
null
2009-07-15T14:58:28.670
2015-03-14T00:52:01.637
2017-02-08T14:13:31.910
-1
86,751
[ "wpf", "data-binding", "listview" ]
1,133,828
1
null
null
1
196
I want a `div` on the left-hand side of the page as a column, and another `div` to fill the right side of the page. The screenshot that I have attached shows that both in Firefox and IE7 (with scroll bars off), the two `div`s go beyond the boundaries of the screen. I have tried to get a `margin` of `2px` on all sides so that the `border` of the `div` can be seen, but this did not work. ![http://img529.imageshack.us/img529/7505/29882421.jpg](https://i.stack.imgur.com/tBylQ.jpg) CSS ``` * { margin: 0; } html, form, body { height: 100%; margin:0; padding:0; font-family: "Segoe UI", "Lucida Grande", Helvetica, verdana, sans-serif; font-size: 11px; background: url(/Manage.UI/App_Themes/Default/header.png) no-repeat; overflow: hidden; } #header { height:162px; background: url(/Manage.UI/App_Themes/Default/header.png) no-repeat; } #left { top: 65px; border-width: 1px; border-style: solid; border-color: #c6c6c6; min-height:100%; height: auto !important; height: 100%; width:300px; bottom:100px; left: 2px; position: absolute; float:left; background-color: White; } .wrapper { min-height: 100%; width: 100%; height: auto !important; height: 100%; top: 0px; position: relative; margin: 2px 2px 2px 2px; } #right { top: 65px; border-width: 1px; border-style: solid; border-color: #c6c6c6; height:100%; width:100%; left: 305px; position: absolute; float:right; background-color: White; } ``` And the ASPX Page ``` <body> <form id="form1" runat="server"> <div class="wrapper"> <div id="left"></div> <div id="right"></div> </div> </div> </form> </body> ```
CSS Column Troubles
CC BY-SA 3.0
null
2009-07-15T20:30:35.747
2013-03-18T00:20:21.303
2013-03-18T00:20:21.303
1,470,950
138,988
[ "css" ]
1,134,725
1
1,134,812
null
1
1,229
![enter image description here](https://i.stack.imgur.com/Yc7wb.png) Everything's explained in the above image. Basically, I need a sidebar div whose width expands according to the content inside of it and a `mainContent` that expands to the rest of the width of the window.
CSS: Fluid Sidebar - Fluid Content
CC BY-SA 3.0
0
2009-07-15T23:57:15.283
2013-02-21T12:28:42.357
2013-02-21T12:28:42.357
1,581,050
139,089
[ "html", "css", "xhtml" ]
1,137,320
1
1,137,402
null
17
22,701
I am confused about what means the update and delete rule in SQL Server 2008 Management Studio when we define foreign key constraints. I also did not find related help documents (e.g. F1 help). Here is the screen snapshot. Appreciate if anyone could describe what do they mean and recommend some related documents to read. :-) ![enter image description here](https://i.stack.imgur.com/xQnC7.jpg)
Understanding Update and Delete Rules for Relationships in SSMS 2008
CC BY-SA 3.0
0
2009-07-16T12:45:01.567
2014-10-16T12:51:51.290
2014-10-16T12:51:51.290
1,710,392
63,235
[ "sql", "sql-server", "sql-server-2008", "foreign-keys" ]
1,138,898
1
1,138,926
null
-1
95
I created a new ASP.NET MVC application. The home page looks like this: ![Original](https://i.stack.imgur.com/bTfps.png) I tried to move the [ Log On ] link to the bottom of the page and got this: ![Changed](https://i.stack.imgur.com/8m3Xs.png) What did I do wrong? EDIT: [Here's][3] the CSS code, [here's][4] the original file, and [here's][5] the changed file.
Page title disappeared behind body
CC BY-SA 4.0
null
2009-07-16T16:52:37.590
2019-03-29T21:02:11.157
2019-03-29T21:02:11.157
4,751,173
88,739
[ "css" ]
1,139,766
1
null
null
44
86,621
I've written a custom plugin for CKEditor--successful on all fronts, save one currently: I can't, for the life of me, figure out how to customize the image on the button in the toolbar of the editor. As I'm a new user, you'll have to click through to see attached image; the highlighted square in the top left should have a pretty picture (like most of the other toolbar items). ![Screenshot](https://i.stack.imgur.com/CYg4y.jpg)
CKEditor Custom Plugins Button
CC BY-SA 3.0
0
2009-07-16T19:28:03.877
2017-09-19T01:27:15.903
2017-09-19T01:27:15.903
3,885,376
139,722
[ "ckeditor" ]
1,141,342
1
1,141,380
null
7
5,493
Without any user interaction, how would a program identify what type of waveform is present in a recording from an ADC? For the sake of this question: triangle, square, sine, half-sine, or sawtooth waves of constant frequency. Level and frequency are arbitrary, and they will have noise, small amounts of distortion, and other imperfections. ![Various waveforms](https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Waveforms.svg/350px-Waveforms.svg.png) I'll propose a few (naive) ideas, too, and you can vote them up or down.
Identifying common periodic waveforms (square, sine, sawtooth, ...)
CC BY-SA 2.5
0
2009-07-17T03:35:50.513
2014-12-24T08:39:19.510
2017-02-08T14:13:37.000
-1
125,507
[ "audio", "signal-processing", "numerical", "waveform" ]
1,147,987
1
1,148,191
null
5
1,856
I am uploading large files to an ASP.NET server using a standard HTML `<input>` control posting multipart-form data. This is an ASP.NET MVC application. According to MSDN, the `HttpPostedFile` class buffers to disk out of the box: > "Files are uploaded in MIME multipart/form-data format. By default, all requests, including form fields and uploaded files, larger than 256 KB are buffered to disk, rather than held in server memory." I assume this means that when I access `HttpPostedFileBase` in my controller, that when I access the `HttpPostedFileBase`'s `InputStream` property, I can write the file buffer somewhere without having to worry about the server running out of memory, which is obviously an unworkable solution. Here's a bit of pseudocode for how I'm handling each of the incoming files from `HttpPostedFileBase`. ``` for(var i = 0; i< Request.Files.Count;i++) { var fileBase = Request.Files[i]; if (fileBase.ContentLength == 0) { continue; } // One thread per file ThreadPool.QueueUserWorkItem(state => { // Read from fileBase.InputStream }, null); } ``` My web.config's httpRuntime block looks like this: ``` <httpRuntime executionTimeout="1200" requestLengthDiskThreshold="2097151" maxRequestLength="2097151" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" /> ``` My implementation works, multiple files are uploaded as expected, except that the same amount of memory required to buffer the entire payload is consumed by the server. I have to assume that the InputStream is buffering everything. When I upload more files than I have memory, it predictably crashes with an `OutOfMemoryException`. Here's an image of the memory spike when uploading an 800mb file. ![alt text](https://i.stack.imgur.com/0CfkT.png) I know I could use a Flash/Silverlight widget or write a custom `HttpModule` to intercept uploads and handle them myself, but the current requirement would work flawlessly if `HttpPostedFile` did what MSDN says it does (or I'm doing it wrong).
Why doesn't HttpPostedFile perform as advertised and buffer downloads to disk rather than memory?
CC BY-SA 3.0
0
2009-07-18T16:45:34.657
2015-06-20T02:24:36.040
2015-06-20T02:24:36.040
1,159,643
18,440
[ "asp.net-mvc", "upload", "httppostedfilebase" ]
1,148,194
1
null
null
2
1,747
I sincerly believe that cool-looking UI has significant contribution to the value of your software. It not only significantly improves sales but also ease user-buyin, upgrading willingness, or just causes some pleasant moments to the user. To get cool UI, you will need a lot of images, and you need to play frequently with transparancy. ![alt text](https://myfriendsatroxyann.files.wordpress.com/2009/06/play-button-thumb2782235.jpg) What image editor do you use/recommend to produce 3D looking images, metalic reflections, glowing text, shadows, or making a button image "disabled-looking"? (freewares are preferred) Could you point to "how-to"-s and guiding documents on how to achieve these visual effects?
What image editor do you recommend to create cool UI elements?
CC BY-SA 2.5
null
2009-07-18T18:18:03.113
2012-07-16T10:02:27.183
2017-02-08T14:13:40.107
-1
24,451
[ "user-interface", "image-manipulation", "image-editor" ]
1,150,799
1
1,151,277
null
2
2,028
Does anyone know if it's possible to remove the topbar from a UITableView in code? So in this case, remove the "Books" bar? ![](https://lh3.ggpht.com/_ixq8Dp4ESMo/SYuylQNqNCI/AAAAAAAAAFk/pPW6pbIlPGo/s576/Screen1.jpg)
Removing the bar in standard UITableView programmatically
CC BY-SA 2.5
null
2009-07-19T20:27:10.337
2009-07-28T16:23:48.663
2017-02-08T14:13:41.120
-1
140,983
[ "iphone", "objective-c", "cocoa-touch", "uitableview" ]
1,150,835
1
1,151,276
null
1
1,254
I have a layout question for Tab Navigators in Adobe Flex 3. Is it possible to insert a button that invades the grid space of the tabs? I have a tab navigator component and I am dynamically adding sub components to tab navigator and I want squeeze a button inside the tab space. I don't want the button to be another tab. And I don't want to use a TabBar for the tabs. This graphic illustrates the problem. This is the current layout I have ![Current Layout](https://i613.photobucket.com/albums/tt220/gordonpotter/current_layout.png) This is a mockup (photoshopped) of the layout I want. I basically want to shave some pixels off the layout. ![Desired Layout](https://i613.photobucket.com/albums/tt220/gordonpotter/desired_layout.png) Is there a way to push the button down or manually override its layout position in MXXML or actionscript?
Move Button into grid space of a TabNavigator's tabs in Flex Builder
CC BY-SA 2.5
null
2009-07-19T20:38:42.840
2009-07-20T00:15:52.677
2017-02-08T14:13:41.813
-1
135,435
[ "actionscript-3", "flex3", "mxml" ]
1,152,208
1
1,152,377
null
9
2,790
![They could say "the connection is probably lost," but it's more fun to do naive time-averaging to give you hope that if you wait around for 1,163 hours, it will finally finish.](https://imgs.xkcd.com/comics/estimation.png) Inspired by this [xckd cartoon](http://xkcd.com/612/) I wondered exactly what is the best mechanism to provide an estimate to the user of a file copy / movement? The alt tag on xkcd reads as follows: > They could say "the connection is probably lost," but it's more fun to do naive time-averaging to give you hope that if you wait around for 1,163 hours, it will finally finish. Ignoring the funny, is that really how it's done in Windows? How about other OS? Is there a better way?
Computing estimated times of file copies / movements?
CC BY-SA 2.5
0
2009-07-20T07:56:19.757
2021-04-05T16:26:50.203
2017-02-08T14:13:42.153
-1
135
[ "language-agnostic", "file", "filesystems", "copy", "estimation" ]
1,157,689
1
1,163,172
null
2
210
This question is related to [Array of pairs of 3 bit elements](https://stackoverflow.com/questions/1053242/array-of-pairs-of-3-bit-elements) This array has 52 pairs (about 40 bytes), and I want to find the first pair before the specified one that has it's values different from 0 (used pair). The obvious solution would be to check each pair < than this one (scan from right to left), but this seems to be very inefficient if there are many unused pairs (set to 0). This image may explain better the situation: ![](https://i.stack.imgur.com/eB0bN.png) Pairs 0, 1 and 51 are used. I want to find the first used pair before 51 (which is 1 here). I tried tricks like ``` if(*((int *)&array[arrayPos]) == 0) { arrayPos -= sizeof(int); pairPos -= ??? } ``` The problem here is that subtracting from is not that simple, because of the 6 bits/pair, so I ended with a lookup table based on some relations between and , and all this made the solution perform like the trivial one. Is there any way to make this lookup faster ? Another problem is that there is only 1 unused byte... maybe I can make space for another 4. If there were at least 7 I could use a bitmap of the array and it would be much faster to skip over unused pairs.
Finding the nearest used index before a specified index in an array (Fast)
CC BY-SA 3.0
0
2009-07-21T07:16:18.997
2015-06-20T01:46:21.627
2017-05-23T11:48:41.860
-1
121,557
[ "c++", "optimization", "memory", "performance" ]
1,158,737
1
1,158,938
null
0
2,554
How do I show or hide context menu items based on condition (For example, some item field value "True" or "False")? I`v added some custom actions for now (using features to add them), but would be nice to manipulate visibility of them. ![alt text](https://i.stack.imgur.com/wyuar.png) I`m using WSS 3.0. Thank you for response.
Show or hide context menu item based on condition
CC BY-SA 3.0
0
2009-07-21T11:52:02.840
2015-06-20T02:17:16.953
2015-06-20T02:17:16.953
1,159,643
50,173
[ "sharepoint" ]
1,160,240
1
null
null
0
2,750
I am checking whether a user has a permission to view the report through dataset stored procedure and if the user doesn't, raiserror is called. Is there a way to display a different message from SQL Server Reports 2005 when a stored procedure (that populates report dataset) raises error (through RAISERROR) instead of returning data? Here is a skeleton code of dataset stored procedure ``` create procedure ReportSprocName @ClientID int, @Login sysname as begin --; check user's permission through @Login --; * Pseudo code * if @Login does not have permission begin raiserror(@Login does not have permission, 127, 1) return end select id, name, etc... from someTable end GO ``` I am interested in two possibly solutions 1. Displaying error message within RAISERROR 2. Displaying a hardcoded custom message in SSRS report itself Currently this is the default message displayed by SSRS reports ![alt text](https://farm3.static.flickr.com/2586/3743317434_41eb266e18.jpg)
SSRS 2005 - Capturing RAISERROR message
CC BY-SA 2.5
null
2009-07-21T16:20:09.510
2009-07-22T20:47:29.737
2017-02-08T14:13:44.913
-1
4,035
[ "sql-server", "sql-server-2005", "reporting-services", "error-handling" ]
1,160,292
1
1,160,393
null
5
914
When I'm typing out new instance variables, they appear white. To turn them green, I do a space/backspace between the semicolon. Is there an XCode secret to automatically going through all of my classes and recognize the variables it has missed? Something similar happens with the orange #define variables used throughout code too. ![colors screenshot](https://i.stack.imgur.com/OdlOM.png) UPDATE: This problem appears to be solved in xcode 3.2 with snow leopard.
Xcode variable coloring
CC BY-SA 3.0
null
2009-07-21T16:31:54.230
2015-06-20T01:47:13.103
2015-06-20T01:47:13.103
1,159,643
124,060
[ "xcode" ]
1,165,419
1
1,174,244
null
8
17,252
I'm after setting up a WCF service on my dev box but I'm getting an error when accessing it. I've set the [service up as per this guide](http://blah.winsmarts.com/2008-4-Host_a_WCF_Service_in_IIS_7_-and-amp%3B_Windows_2008_-_The_right_way.aspx). It's is written in and my dev box is with . At the moment the service is nothing more than the default structure since I am literally after testing a connection to it. I've checked what needs to be installed and I'm fairly sure I've got everything enabled, screen shot below shows current options: ![Windows IIS Options](https://pauked.com/temp/WindowsIISOptions.png) Full error message on accessing [http://localhost:8000/Service.svc](http://localhost:8000/Service.svc) is as follows: ``` Server Error in '/' Application. -------------------------------------------------------------------------------- The protocol 'http' is not supported. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: The protocol 'http' is not supported. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidOperationException: The protocol 'http' is not supported.] System.ServiceModel.AsyncResult.End(IAsyncResult result) +11536522 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176 System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +278 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016 ``` Any suggestions on how to go about debugging / fixing the error would be gratefully received. Googling the error gives very little help. I've probably missed something really obvious! - web.config as requested (apologies for its length): ``` <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <configSections> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/> <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> </sectionGroup> </sectionGroup> </sectionGroup> </configSections> <appSettings/> <connectionStrings/> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true"> <assemblies> <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> </assemblies> </compilation> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <authentication mode="Windows"/> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </controls> </pages> <httpHandlers> <remove verb="*" path="*.asmx"/> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> </httpHandlers> <httpModules> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </httpModules> </system.web> <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <providerOption name="CompilerVersion" value="v3.5"/> <providerOption name="WarnAsError" value="false"/> </compiler> <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <providerOption name="CompilerVersion" value="v3.5"/> <providerOption name="OptionInfer" value="true"/> <providerOption name="WarnAsError" value="false"/> </compiler> </compilers> </system.codedom> <system.web.extensions> <scripting> <webServices> <!-- Uncomment this section to enable the authentication service. Include requireSSL="true" if appropriate. <authenticationService enabled="true" requireSSL = "true|false"/> --> <!-- Uncomment these lines to enable the profile service, and to choose the profile properties that can be retrieved and modified in ASP.NET AJAX applications. <profileService enabled="true" readAccessProperties="propertyname1,propertyname2" writeAccessProperties="propertyname1,propertyname2" /> --> <!-- Uncomment this section to enable the role service. <roleService enabled="true"/> --> </webServices> <!-- <scriptResourceHandler enableCompression="true" enableCaching="true" /> --> </scripting> </system.web.extensions> <!-- The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS. --> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules> <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </modules> <handlers> <remove name="WebServiceHandlerFactory-Integrated"/> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </handlers> </system.webServer> <system.serviceModel> <services> <service name="Service" behaviorConfiguration="ServiceBehavior"> <!-- Service Endpoints --> <endpoint address="" binding="wsHttpBinding" contract="IService"> <!-- Upon deployment, the following identity element should be removed or replaced to reflect the identity under which the deployed service runs. If removed, WCF will infer an appropriate identity automatically. --> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> <host> <baseAddresses> <add baseAddress="http://localhost:8000/" /> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="ServiceBehavior"> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> </configuration> ``` - I've removed the paragraph about creating a Delphi Win32 client since Delphi 2007 doesn't support SOAP 1.2, which is what the WCF Service uses. Delphi 2007 only supports SOAP 1.0... So client will now be a C# WinForms app.
Problem with WCF Service - The protocol 'http' is not supported. How to resolve?
CC BY-SA 2.5
null
2009-07-22T13:52:27.783
2019-08-30T06:54:08.373
2017-02-08T14:13:47.303
-1
17,461
[ "asp.net", "wcf", "web-services", "iis", "windows-vista" ]
1,166,236
1
23,385,790
null
55
38,301
Apple's iPhone apps such as Music and Contants use a search bar in a UITableView. When you scroll down so that the search bar moves down, the empty space above the scroll view's contents has a light gray background color (see screenshot). ![Screenshot of Contacts app showing light gray background](https://i.stack.imgur.com/MatOL.jpg) (Notice that the search bar has a slightly darker edge line at its top. This is not there for the default UISearchBar, but subclassing should take care of that.) I tried setting the background color of the UITableView, but that affects the rows as well. Does anyone know how to achieve this effect? Am I going to have to override implement drawRect: or is there a built in way?
Light gray background in "bounce area" of a UITableView
CC BY-SA 3.0
0
2009-07-22T15:46:30.473
2020-07-21T20:14:38.233
2014-08-29T09:26:59.333
138,860
138,860
[ "iphone", "uitableview", "uikit", "uisearchbar" ]
1,167,120
1
1,167,151
null
3
2,281
I am trying to create a simple ray tracer. I have a perspective view which shows the rays visibly for debugging purposes. In my example screenshot below I have a single white sphere to be raytraced and a green sphere representing the eye. Rays are drawn as lines with If a ray misses the sphere it is given color in my initialization code I have the following: You can see in the screen shot that for some reason, the rays passing between the perspective view point and the sphere are being color blended with the axis line behind the sphere, rather than with the sphere itself. Here is a screenshot: ![screenshot](https://imgur.com/B9g1d.jpg) Can anyone explain what I am doing wrong here? Thanks!!
OpenGL Alpha blending with wrong color
CC BY-SA 2.5
null
2009-07-22T18:06:36.990
2010-07-01T02:50:38.267
2009-07-22T18:12:17.227
44,765
null
[ "c++", "qt", "opengl" ]
1,167,230
1
1,172,036
null
7
1,930
In AccuRev, when I look at the history for a file (in "history mode"), I see a list of the actions that were taken on the file. Each action has a number (#) and a version. When I click on one of these actions, another list appears that shows each of the files that was involved in the action (including the one whose history I'm investigating). Each entry in this lower panel has a "virtual version" and a "real version". The "version" in the top panel appears to be the same as the "virtual version" of my file in the lower panel. What is the difference between the #, the virtual version, and the real version? Why do virtual and real versions have two numbers separated by a slash? ![](https://i.stack.imgur.com/ebUbD.png)
What are the various AccuRev version numbers?
CC BY-SA 3.0
0
2009-07-22T18:28:26.680
2015-06-20T02:16:28.797
2015-06-20T02:16:28.797
1,159,643
9,702
[ "accurev" ]
1,167,296
1
1,170,364
null
0
1,279
I've designed a website using some Jquery techniques. My problem is that in some random cases, Internet Explorer 8 and 6 can make the images look smaller than they should be. I didn't check with Explorer 7, but it's probably there too... Note that resizing the page might be more liable to cause these problems, and in fact, the client noticed the problem on a 1024x768 resolution monitor. I'm putting the images in a div, and toggling it with Jquery when a URL is clicked, for the animated effect. It works 100% well in Firefox, but randomly looks weird in Explorer. How it should look: ![How it should look](https://i.stack.imgur.com/YFXFd.png) What it ends up looking like: ![What it ends up looking like](https://i.stack.imgur.com/TfsSE.png) The Jquery code is below: ``` <script type="text/javascript"> $(document).ready(function() { $('#header').supersleight({shim: 'images/x.gif'}); $('div[class^=images]').hide(); $('a[class=images-importers]').click(function() { $('div[class=images-importers]').toggle(1000); return false; }); $('a[class=images-suppliers]').click(function() { $('div[class=images-suppliers]').toggle(1000); return false; }); }); </script> ``` The HTML for the relevant section is also below: ``` <div> <p> <a href="#" class="images-importers">We are the sole importers of the leading aquatic products in Malta.</a> </p> <div class="images-importers"> <div class="imgcontainer-small"> <a href="..."><img src="..." alt="..." class="glossy" /></a> </div> <div class="imgcontainer-small"> <a href=".../"><img src="..." alt= "..." class="glossy" /></a> </div> <div class="imgcontainer-small"> <a href="..."><img src="..." alt= "..." class="glossy" /></a> </div> </div> </div> ``` The CSS I used for the images : ``` .imgcontainer-small{ text-align : left; padding : 10px; ``` } Thanks for any help! Btw, the site is [here](http://users.waldonet.net.mt/aquahobbies/products.html)
Jquery image resizing bug in Internet Explorer 8 and 6
CC BY-SA 3.0
null
2009-07-22T18:39:46.720
2015-06-20T02:07:06.760
2015-06-20T02:07:06.760
1,159,643
53,902
[ "jquery", "internet-explorer" ]
1,168,289
1
1,185,315
null
2
2,127
I am creating RESTful services for several database entities based on a modified version of the [BISDM](http://www.bisdm.org/information/). Some of these entities have associated lookup tables, such as depicted below: ![Snippet of modified BISDM schema](https://i.stack.imgur.com/DpiNn.png) The lookup tables are associated with one and only one table. Additionally, the lookup tables will be used by the client application to populate dropdown lists, treeviews, and comboboxes for the editable fields of their associated entity table. Should lookup values / table get their own URI or should they "share" one with the parent to which they are associated? What are the pros / cons of each? ``` Option 1: /Entities/Spaces/SpaceCategories/ Option 2: /Lookups/SpaceCategories/ ```
When implementing RESTful services should lookup values / tables get their own URI?
CC BY-SA 3.0
null
2009-07-22T21:14:07.157
2015-06-20T02:10:46.297
2015-06-20T02:10:46.297
1,159,643
19,977
[ "asp.net-mvc", "web-services", "rest" ]
1,168,430
1
1,168,558
null
2
1,520
I am creating RESTful services for several database entities based on a modified version of the [BISDM](http://www.bisdm.org/information/). Some of these entities have associated lookup tables, such as depicted below: ![Snippet of modified BISDM schema](https://i.stack.imgur.com/DpiNn.png) I have decided to use the repository pattern to provide a clean separation between data persistance / retrieval; however, I am not sure how lookups ( as opposed to entities ) should be represented in the repository. Should lookups get their own repository interface, "share" one with the associated entity, or should there be a generic ILookupRepository interface? For the moment, these lookups are read-only; however, there will be a time where we may want to edit the lookups via services. ``` Option 1: ISpaceRepository.GetSpaceCategoryById(string id); Option 2: ISpaceCategoryRepository.GetById(string id); Option 3: ILookupRepository.GetSpaceCategoryById(string id); ``` Incidentally, this question is related to another one regarding [look-up tables & RESTful web services](https://stackoverflow.com/questions/1168289/when-implementing-restful-services-should-lookup-values-tables-get-their-own-ur).
When implementing the repository pattern should lookup value / tables get their own Repository?
CC BY-SA 3.0
null
2009-07-22T21:40:06.137
2015-06-20T02:16:25.020
2017-05-23T12:07:04.890
-1
19,977
[ "repository-pattern", "lookup-tables" ]
1,168,615
1
1,173,831
null
2
2,276
I have a SharePoint DataView WebPart that is set up to combine data from a few different lists. I want to filter the data to only show data from last week. I am able to filter it to show data from this week, but have been unsuccessful in getting last week's data to show up. I have the web part filter set up like below: ![Filter](https://ktrauberman.files.wordpress.com/2009/07/filter.jpg) This translates to the following xsl: ``` <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[ number(translate(substring-before(@Week_x0020_Starting,'T'),'-','')) &lt;= number(translate(substring-before($Today,'T'),'-','')) and number(translate(substring-before(@Week_x0020_Ending,'T'),'-','')) &gt;= number(translate(substring-before($Today,'T'),'-','')]"/> ``` I speculate that I need to figure out how to do [Current Date] - 7, however I haven't been able to figure out how to do the subtraction. Has anyone encountered a situation similar to this? Am I even going about this correctly?
SharePoint DataView Show Items from last week
CC BY-SA 2.5
null
2009-07-22T22:17:18.900
2009-10-21T08:13:36.023
2017-02-08T14:13:47.653
-1
21,461
[ "sharepoint", "sharepoint-designer", "dataviewwebpart" ]
1,169,723
1
1,169,743
null
0
270
Its particular query pops up in the slow query log all the time for me. Any way to improve its efficiency? ``` SELECT mov_id, mov_title, GROUP_CONCAT(DISTINCT genres.genre_name) as all_genres, mov_desc, mov_added, mov_thumb, mov_hits, mov_numvotes, mov_totalvote, mov_imdb, mov_release, mov_type FROM movies LEFT JOIN _genres ON movies.mov_id = _genres.gen_movieid LEFT JOIN genres ON _genres.gen_catid = genres.grenre_id WHERE mov_status = 1 AND mov_incomplete = 0 AND mov_type = 1 GROUP BY mov_id ORDER BY mov_added DESC LIMIT 0, 20; ``` My main concern is in regard to the group_concat function, which outputs a comma separated list of genres associated with the particular film, which I put through a for loop and make click-able links. ![alt text](https://imgur.com/M1nOo.gif)
Any way to improve this slow query?
CC BY-SA 2.5
0
2009-07-23T05:15:03.273
2009-08-09T23:42:38.357
2009-07-23T05:39:26.533
null
null
[ "mysql", "query-optimization" ]
1,169,732
1
1,169,843
null
4
13,337
I'm trying to send a key stroke to one application, through PostMessage. I am using too Spy++ to try to understand how to send the message, as I do not fully understand its inner workings. ![alt text](https://i.stack.imgur.com/4vBJn.jpg) In this picture, the first item(selected item) was made with an actual key stroke made by myself. The one with a red elipse around it(below) was made with the following code: ``` WinApi.PostMessage(InsideLobbyHandle, WinApi.WM_KEYDOWN, (int)WinApi.VK_UP, 1); ``` I guess it must have something to do with the last PostMessage() parameter, but I can't figure out how it really works. I can see in the original key stroke the ScanCode = 48, and in mine its 0, and also fExtended is 1 and in mine is 0. How can I make it look the same? In [http://msdn.microsoft.com/en-us/library/ms646280(VS.85).aspx](http://msdn.microsoft.com/en-us/library/ms646280(VS.85).aspx) I cannot understand the last parameter's working.
WM_KEYDOWN : how to use it?
CC BY-SA 3.0
0
2009-07-23T05:18:24.190
2022-11-25T07:51:13.917
2015-06-20T01:34:14.423
4,099,598
130,758
[ "c#", "c++", "vb.net", "winapi", "api" ]
1,178,522
1
1,178,568
null
3
1,582
I'm working on a site and having compatibility issues with IE7 (not working) vs IE8/Firefox (working). Can someone take a look at the following CSS and Screenshots and tell me why my site is broken in IE7 and what I can do to fix it? The site in question is live here: [CollectionTree](http://www.collectiontree.com) and my css part for that view is ``` #landingMainContainer { padding-left:10px; margin: 0 auto; text-align: center; min-height: 400px; width: 960px; } .landingTop { width:100%; min-height:400px; background:url('/Content/Images/BG_gray1_v2.png') no-repeat; } .landingTopInfo { padding-top:10px; text-align:left; width:50%; padding-left:15px; } .landingTopInfoText { padding-left:20px; padding-top:20px; float:left; color:#000000; font-size:20px; } .landingTopInfoTextTitle { font-size:26px; text-align:left; padding-left:40px; padding-top:10px; clear:left; color:#209202; } .landingTopInfoTextContents { font-size:12px; padding-left:40px; padding-top:10px; clear:left; color:#000000; } .landingTopInfoSignUpSection { clear:left; float:left; padding-left:40px; padding-top:30px; } .landingTopInfoSignUpSectionText { padding-left:10px; padding-top:10px; float:left; font-weight:normal; } .landingTopInfoImage { float:right; background:url('/Content/Images/Dashboard_mockup.png') no-repeat; width:40%; height:290px; } .landingBottomInfo { width:100%; float:left; padding-left:20px; color:#000000; } .landingBottomInfoSection { float:left; width:30%; text-align:left; font-size:10px; font-weight:normal; padding-left:20px; } .landingBottomInfoSectionText { width:66%; float:right; text-align:left; } .landingBottomInfoSectionTextFirstLine { font-size:11px; font-weight:bold; } .landingBottom { width:100%; min-height:150px; } .landingBottomLeftSection { background:url('/Content/Images/BG_gray2_v2.png') no-repeat; width:60%; min-height:140px; float:left; } .landingBottomLeftSectionTitle { font-weight:normal; font-size:19px; color:#FFFFFF; } .landingBottomLeftSectionImage { float:left; padding-left:40px; padding-top:10px; } .landingBottomLeftSectionText { padding-right:100px; padding-top:10px; float:right; } .landingBottomLeftSectionTextTitle { font-weight:bold; color:#000000; font-size:14px; } .landingBottomLeftSectionTextSentence { text-align:left; color:#000000; padding-top:10px; padding-left:15px; font-weight:normal; font-size:10px; } .landingBottomRightSection { padding-top:7px; width:35%; min-height:140px; float:right; } .landingBottomRightSectionTitle { text-align:left; color:#209202; font-weight:bold; } .landingBottomRightSectionText { width:70%; color:#000000; font-size:10px; font-weight:normal; padding-top:15px; text-align:left; float:left; } .landingBottomRightSectionTextLink { text-align:left; padding-top:20px; } a.landingBottomRightSectionTextLink:link { color: #3399FF; text-decoration: none; font-weight:bold; font-size:11px; } a.landingBottomRightSectionTextLink:active { color: #3399FF; text-decoration: none; font-weight:bold; font-size:11px; } a.landingBottomRightSectionTextLink:visited { color: #3399FF; text-decoration: none; font-weight:bold; font-size:11px; } a.landingBottomRightSectionTextLink:hover { color: #3399FF; text-decoration: underline; font-weight:bold; font-size:11px; } .landingBottomRightSectionImage { width:30%; float:right; } ``` Here is a screenshot of the website displaying correctly in IE8: ![alt text](https://imgur.com/4hGXCl.png) [Full Image](https://imgur.com/4hGXC.png) Here is the website looking messed up in IE7: ![alt text](https://imgur.com/77Sbxl.png) [Full Image](https://imgur.com/77Sbx.png) What do I need to change with my CSS to make my page look "ok" in IE7 as well as IE8?
Compatibility issues with IE7?
CC BY-SA 2.5
null
2009-07-24T15:45:09.787
2011-11-21T18:20:07.730
2009-07-24T15:47:23.963
2,635
117,792
[ "html", "css", "internet-explorer-8", "internet-explorer-7", "cross-browser" ]
1,182,818
1
1,263,975
null
17
11,125
I'm currently revisiting an area of my Windows-based software and looking at changing the relationship from 1->M to M->M. As a result, I need to adjust the UI to accommodate selecting multiple related records. There are a lot of ways to handle this that are common, but usually pretty clunky. Examples include the two-pane list of all items, and list of selected items, or a list of all records and a checkbox beside each one that applies. In my case, there may be an awful lot (in the tens of thousands) of records that could be associated, so I'll probably need to include some kind of search mechanism. -- I can implement something pretty easily that's functional, I'm looking to see if anyone here has come up with (or seen) any great UIs for doing this kind of thing, whether it's web based, Windows, Mac, Unix, whatever. Images or links to them would be appreciated! Edit: here's an example of what I'm considering: ![Sample Search UI 1](https://i801.photobucket.com/albums/yy300/withoutsoftware/SampleSearchUI.png)
Examples of good UI for selecting multiple records
CC BY-SA 2.5
0
2009-07-25T19:16:36.163
2019-04-13T10:48:55.667
2017-02-08T14:13:50.710
-1
722
[ "database", "user-interface", "language-agnostic" ]
1,184,599
1
1,250,722
null
3
11,832
I have installed and configured NetBeans 6.7 for c++ according to the official manual: [http://www.netbeans.org/community/releases/67/cpp-setup-instructions.html#mingw](http://www.netbeans.org/community/releases/67/cpp-setup-instructions.html#mingw) Configuration window looks like this: ![netbeans config](https://files.getdropbox.com/u/366984/netbeans.jpg) Unfortunately, at 'compile' command following line is displayed: /usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf BUILD SUCCESSFUL (total time: 642ms) Since i'm on windows and it's no /usr/bin/make, no executable is compiled :(. How to correctly configure NetBeans so it will use make from it's config, not from /usr/bin? Problem is only with mingw/msys toolchain. It works OK with cygwin (same /usr/bin/make message is displayed, but executable IS created). So the question can be changed to: Can Netbeans 6.7 work with mingw on Windows, or i'm limited to cygwin?
How to correctly configure netbeans 6.7 and c++ on windows?
CC BY-SA 2.5
0
2009-07-26T13:29:53.167
2013-05-13T17:30:30.147
2017-02-08T14:13:51.387
-1
69,882
[ "c++", "windows", "netbeans" ]
1,185,371
1
9,183,777
null
1
1,356
I have a tabcontrol binded the an observable list. Eveything look to be perfect until I select a tab. Once selected, the tab doesn't lose its focus and the selected tab is not available. They are not any message in the Output Window. Here is a screen shot just before clicking the tab: ![alt text](https://i.stack.imgur.com/bIruY.png) And here is a screen shot after (with the problem): ![alt text](https://i.stack.imgur.com/mkrgA.png) Any idea about how to resolve this problem or any hint to be able to debug this kind of behavior?
WPF TabItem doesn't lose focus
CC BY-SA 4.0
null
2009-07-26T19:45:37.643
2019-04-01T06:25:41.790
2019-04-01T06:25:41.790
4,751,173
13,913
[ "c#", ".net", "wpf", "xaml", "tabcontrol" ]
1,187,928
1
null
null
0
1,392
I was recently put in charge of a new project for storing our analytics data. I want to give ORM a shot; the mapping doesn't seem difficult but this problem has me vexed. This database will store data for Google Analytics, Quantcast, and any future analytics provider. I was pretty much given the schema that needs to be used. They want it to be very general which is possible until I store the matrices as we track different ones for each provider. The table layout is as such: ![](https://i.stack.imgur.com/rdLf7.png) tblClient - Stores all the client websites. tblProfile - 1 or more belong to a client. Stores profile data such as what provider this profile is is using and the profile_type. tblProvider - Stores data as to whether a profile is a GoogleAnalytics, Quantcast, or other analytics profile. tblProfile_Type - The type of track for the client site. We have client sites broken down into different sections. That is tracked here. The problem comes when I need to link the profile table to a metrix table. On this diagram I only have the one for Google but there will be others. I need it to link based on the FK column for Provider_Type in the profile table. Is that possible?
NHibernate Conditional Mapping
CC BY-SA 3.0
null
2009-07-27T12:33:13.083
2015-06-20T01:35:34.183
2015-06-20T01:35:34.183
4,099,598
48,378
[ "c#", ".net", "database", "nhibernate", "orm" ]
1,189,520
1
1,189,536
null
0
148
got a strange issue for you. I created a control that inserts a record into a Database and writes a cookie to the user's machine. Here is the cookie writing code snippet: ``` protected void CreateCookie(Guid id, DateTime expires) { var oCookie = new HttpCookie("gsow"); oCookie.Value = id.ToString(); oCookie.Expires = expires; HttpContext.Current.Response.Cookies.Add(oCookie); } ``` Very simple, nothing fancy. The ID is passed from the function that writes the entry into the database and this ID is generated on the fly. Now here is the code for my cookie reading: ``` protected void Page_Load(object sender, EventArgs e) { var oCookie = HttpContext.Current.Response.Cookies["gsow"]; output.Text = "I am Here<br />"; if (oCookie != null) output.Text += oCookie.Value; else output2.Text = "No Cookie."; } ``` Once again, very simple. Here are the steps I have taken and duplicated several times: 1. Create cookie/db entry by launching first page. 2. Verify cookie/db entry exist (they do at this step, checked via Chrome's cookie manager) 3. Launch second page Once I load up the second page, which should spit out the ID that I set earlier, the cookie still exists but it is Unset. Here is a screenshot of the cookie after I load the first page: ![alt text](https://imgur.com/66Z8O.png) And once I load the second page: ![alt text](https://imgur.com/DUeEx.png) So from what I am seeing, the cookie's value/expiration get stripped out when I load the second page. Anyone have any ideas on why this is happening? Thanks
Cookie getting unset when a read attempt is made?
CC BY-SA 2.5
null
2009-07-27T17:28:34.270
2009-07-27T17:30:29.430
null
null
25,515
[ "c#", "asp.net", "cookies" ]
1,189,896
1
1,189,956
null
1
1,162
I have a textbox which i applied on it jq wysiwyg: ``` public static void PopulateWysiwyg(this SafeTextBox tb) { string script = @" jQuery(document).ready(function() { jQuery('#safe_text_box').wysiwyg(); }); "; ScriptManager.RegisterStartupScript( tb, tb.GetType(), tb.ClientID + "_wysiwyg", script.Replace("safe_text_box", tb.ClientID), true ); } ``` When I click a postback button on the form, the wysiwyg js throws an exception: ![java script exception](https://farm4.static.flickr.com/3558/3762255039_d462d7665e_o.jpg) Any help?
jquery wysiwyg throws "Object doesn't support this property or method" on postback
CC BY-SA 2.5
null
2009-07-27T18:44:29.063
2010-08-14T13:14:19.700
2017-02-08T14:13:53.427
-1
75,500
[ "javascript", "jquery", "exception", "wysiwyg" ]
1,190,155
1
1,190,167
null
7
2,178
I am currently reading the [Algorithm Design Manual](http://www.algorist.com/), but my mathematical notation has become a little rusty. What does !["\left( a \ b \right)" LaTeX](https://chart.apis.google.com/chart?cht=tx&chl=%5CLARGE%5C%21%5Cleft%28%20a%20%20%5C%5C%20b%20%5Cright%29) mean?
Mathematical notation in algorithms
CC BY-SA 2.5
null
2009-07-27T19:33:21.430
2010-02-20T21:39:39.587
2017-02-08T14:13:53.763
-1
141,985
[ "algorithm", "math", "notation" ]
1,191,164
1
1,594,562
null
11
14,191
## How to replicate: 1. Create an html5 page. 2. Make sure you have the script from remysharp.com/2009/01/07/html5-enabling-script/ added so that IE will notice the tags. 3. Create an hardcoded <section id='anything'></section> tag. 4. Using jQuery 1.3.2, append another section tag: $('#anything').append('<section id="whatever"></section>'); So far, everything works in all the browsers. 5. Repeat the previous step. $('#whatever').append('<section id="fail"></section>'); This is where IE6/7 fails. Firefox/Safari will continue working. ## Error ![error popup screenshot](https://i.stack.imgur.com/PqGUC.jpg) ## Thoughts - It could be that IE6/7 can't handle the HTML5 section tag. I say this because when I change step 4 from `<section>` to `<div>`, IE6/7 will start working.- If I use `document.createElement()` and create my new element, it works, but it seems like jQuery's `append()` has a problem with html5 elements.
jQuery, html5, append()/appendTo() and IE
CC BY-SA 3.0
0
2009-07-27T23:17:44.083
2014-01-12T03:40:45.617
2020-06-20T09:12:55.060
-1
29,851
[ "jquery", "html", "append" ]
1,191,959
1
null
null
2
611
I am currently working on a Silverlight2-based attendance register. I want to create a visualisation of attendance over time for students and classes, but am struggling to come up with a good way of doing it. The sort of thing I'm imagining is a grid with students on the vertical axis and date along the horizontal, with a symbol at the intersection of student and date indicating presence or absence. Ideally the method used to generate the visualisation would also be used to generate printed material, however this is not essential. (Silverlight has no built-in printing support, so it'd have to be SQL Server Reporting Services or similar.) Here's a simple mock-up in Excel of the sort of data I need to display: ![Mock-up chart](https://imgur.com/V5cy3.png) (Obviously with awesome Silverlight styling) Here are my current thoughts on how to go about it: - - - - - - - `......x...oo.ox...x....` Basically every train of thought leads me towards writing my own fully-featured Silverlight/Reporting engine, which is way beyond the scope of what I'm trying to do. Plus I dont really want to leave a future maintainer with some awful custom-built hacky display & reporting system. (I dont want to end up on TheDailyWTF!) This is the sort of visualisation that Silverlight is made for - I just cant decide where to direct my efforts.
What is the best way to display a grid of a large number of items in Silverlight?
CC BY-SA 2.5
null
2009-07-28T04:38:42.847
2009-07-28T18:51:07.787
null
null
20,122
[ "silverlight", "xaml", "reporting", "silverlight-2.0", "visualization" ]
1,192,101
1
1,192,116
null
0
3,044
I have the css code below along with an image to show it's output. I need help though 2 things. 1. This code works pretty good to show the username on the photo, however I noticed today while using chrome all day often when I would click a link that would take me to the page that has images with this code, it would not show the name on the image, it would just show the name below the image and the transparent black div would not be visible at all and the name would not even be on the image, I would then refresh the page and it would work fine, what could cause this, this was while my PC was acting like it was short on memory, could that be part of the issue? 2. I would like to make a bar show at the top of the image that is the width of the image and like maybe 2-3 pixels tall and have a background color of like blue. What I am wanting to accomplish is for femail users there will be a pink bar over there image and a different color for males. Can someone who knows css help me modify this to do that the best please ![alt text](https://i.stack.imgur.com/X2EdS.jpg) ``` <style type="text/css"> div.imageSub { position: relative; } div.imageSub img { z-index: 1; } div.imageSub div { position: absolute; left: 0px; right: 0px; bottom: 0; padding: 5px; height: 5px; line-height: 4px; text-align: center; overflow: hidden; } div.imageSub div.blackbg { z-index: 2; background-color: #000; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter: alpha(opacity=70); opacity: 0.5; } div.imageSub div.label { z-index: 3; color: white; } </style> <div class="imageSub" style="width: 90px;"> <!-- Put Your Image Width --> <img src="http://cache2.mycrib.net/images/image_group66/0/43/t_6871399b0962b5fb4e29ce477541e165950078.jpg" alt="Something" width="90"/> <div class="blackbg"></div> <div class="label">Sara</div> </div> ```
Adding colored bar to image with CSS
CC BY-SA 4.0
0
2009-07-28T05:37:58.547
2019-04-01T20:02:33.587
2019-04-01T20:02:33.587
4,751,173
143,030
[ "css", "image", "overlay" ]
1,194,176
1
1,194,215
null
1
450
In IE8 and mozilla 3.5 theres an white pixel to the right. How can i get rid of that? Seting background-color changes nothing. neither does width. ``` hr { border-top: 1px solid #111; border-bottom: 1px solid #444; } ``` This is how it looks right now ![enter image description here](https://i.stack.imgur.com/2YSvT.png)
HR tag renders white pixel
CC BY-SA 3.0
null
2009-07-28T13:42:59.540
2012-05-17T14:56:44.167
2012-05-17T14:56:44.167
106,224
null
[ "html", "css" ]
1,194,352
1
1,222,855
null
53
18,796
Given a 2d picture of a rectangle distorted by perspective: ![enter image description here](https://i.stack.imgur.com/rI36D.png) I know that the shape was originally a rectangle, but I do not know its original size. If I know the pixel coordinates of the corners in this picture, how can I calculate the original proportions, i.e. the quotient ( width / height ) of the rectangle? (background: the goal is to automatically undistort photos of rectangular documents, edge detection will probably be done with hough transform) # UPDATE: There has been some discussion on whether it is possible at all to determine the width:height ratio with the information given. My naive thought was that it must be possible, since I can think of no way to project for example a 1:4 rectangle onto the quadrangle depicted above. The ratio appears clearly close to 1:1, so there should be a way to determine it mathematically. I have however no proof for this beyond my intuitive guess. I have not yet fully understood the arguments presented below, but I think there must be some implicit assumption that we are missing here and that is interpreted differently. However, after hours of searching, I have finally found some papers relevant to the problem. I am struggling to understand the math used in there, so far without success. Particularly the first paper seems to discuss exactly what I wanted to do, unfortunately without code examples and very dense math. - Zhengyou Zhang , Li-Wei He, "Whiteboard scanning and image enhancement" [http://research.microsoft.com/en-us/um/people/zhang/papers/tr03-39.pdf](http://research.microsoft.com/en-us/um/people/zhang/papers/tr03-39.pdf) p.11> "Because of the perspective distortion, the image of a rectangle appears to be a quadrangle. However, since we know that it is a rectangle in space, we are able to estimate both the camera’s focal length and the rectangle’s aspect ratio."- ROBERT M. HARALICK "Determining camera parameters from the perspective projection of a rectangle" [http://portal.acm.org/citation.cfm?id=87146](http://portal.acm.org/citation.cfm?id=87146)> "we show how to use the 2D perspective projection of a rectangle of unknown size and position in 3D space to determine the camera look angle parameters relative to the plans of the rectangle."
proportions of a perspective-deformed rectangle
CC BY-SA 3.0
0
2009-07-28T14:09:07.933
2022-11-01T10:57:26.050
2013-02-16T11:46:25.780
145,999
145,999
[ "image-processing", "geometry", "computer-vision", "reverseprojection", "projective-geometry" ]
1,196,341
1
1,196,584
null
0
172
I updated my Sharp-Architecture libraries to the newest version and all of a sudden I'm getting unable to resolve errors - specifically with NHibernate Validators. I am not quite sure why though, here is what my test assembly looks like in reflector: ![alt text](https://content.screencast.com/users/togakangaroo/folders/Jing/media/70c4f0bc-3795-4b5c-9077-d7b6eb733fc8/2009-07-28_1443.png) But the NHibernate.Validator library with the exact same version number/public key is in the same directory! ![alt text](https://content.screencast.com/users/togakangaroo/folders/Jing/media/3327e3b0-fe24-419b-a153-637d2db6ee72/2009-07-28_1446.png) Any ideas?
Why can't this reference be resolved?
CC BY-SA 2.5
null
2009-07-28T19:46:46.660
2009-07-28T20:38:36.900
2017-02-08T14:13:56.830
-1
5,056
[ ".net", "reference" ]
1,196,578
1
null
null
27
73,454
I went from this: [WPF GridViewHeader styling questions](https://stackoverflow.com/questions/1172534/wpf-gridviewheader-styling-questions) to this: ![WPF GridView Headers](https://i.stack.imgur.com/IYvoJ.png) Now I just need to get rid of the white space to the right of the "Size" header. I basically have a template for the GridViewColumnHeader that makes it a TextBlock. Is there any way I can set the background for that header area so that it spans the entire width of the GridView? ADDED CODE: This is my right-most column. The grid does not span 100% of available window area. In the header I need everything to the right of this column to have the same background as the column headers themselves. ``` <Style x:Key="GridHeaderRight" TargetType="{x:Type GridViewColumnHeader}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GridViewColumnHeader}"> <TextBlock Text="{TemplateBinding Content}" Padding="5" Width="{TemplateBinding Width}" TextAlignment="Right"> <TextBlock.Background> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Offset="0.0" Color="#373638" /> <GradientStop Offset="1.0" Color="#77797B" /> </LinearGradientBrush> </TextBlock.Background> </TextBlock> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="OverridesDefaultStyle" Value="True" /> <Setter Property="Background" Value="Green" /> <Setter Property="Foreground" Value="White" /> <Setter Property="FontSize" Value="12" /> <Setter Property="Background"> <Setter.Value> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Offset="0.0" Color="#373638" /> <GradientStop Offset="1.0" Color="#77797B" /> </LinearGradientBrush> </Setter.Value> </Setter> </Style> <GridViewColumn Width="200" HeaderContainerStyle="{ StaticResource GridHeaderRight}" Header="Size"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Path=EmployeeNumber}" HorizontalAlignment="Right"></TextBlock> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> ``` I am one step closer (I think) to solving this. I added the following code inside the GridView tag: ``` <GridView.ColumnHeaderContainerStyle> <Style TargetType="GridViewColumnHeader"> <Setter Property="BorderThickness" Value="1"></Setter> <Setter Property="BorderBrush" Value="Green"></Setter> <Setter Property="Height" Value="Auto"></Setter> <Setter Property="Background"> <Setter.Value> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Offset="0.0" Color="#373638" /> <GradientStop Offset="1.0" Color="#77797B" /> </LinearGradientBrush> </Setter.Value> </Setter> </Style> </GridView.ColumnHeaderContainerStyle> ``` The border is there just so you can see the boundary of what this style covers. This is an enlarged image of what this does. It seems to be what I want if I can get rid of the little white border on the bottom. So I guess removing that tiny white bottom border would also be an accepted answer for this one.
How do you style a WPF GridView Header?
CC BY-SA 4.0
0
2009-07-28T20:37:14.407
2022-07-16T15:41:15.417
2022-07-16T15:41:15.417
6,296,561
103,186
[ "wpf", "gridview", "styles" ]
1,198,000
1
null
null
3
3,428
SQL Server Edition: 2008 Enterprise Visual Studio: 2010 w/ .NET 4.0 [SSMS 2008 Addin - Data Scripter](http://ssmsaddins.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=19122) project source code on CodePlex references I have referenced the DLL under `<<Microsoft SQL Server install location>>\100\Tools\Binn\VSShell\Common7\IDE` But here is the oddity. Microsoft.SqlServer.SqlTools.VSIntegration.dll contains a namespace `Microsoft.SqlServer.Management.UI.VSIntegration`, which in turn contains ServiceCache (public sealed). As soon as I add the reference, ServiceCache is highlighted (meaning there is no reference issue) But the problem arises when I compile the project and VS 2010 throws up an error that it cannot find ServiceCache. > The name 'ServiceCache' does not exist in the current context Why is that ServiceCache is not visible during compile time but looks like it's available right after adding the assembly? And Reflector does show that ServiceCache is part of the assembly that the project is referencing, but Visual Studio intellisense fails to display it. Any had this kind of problem? Some screenshots Reflector clearly shows `ServiceCache` ![alt text](https://farm4.static.flickr.com/3480/3768172732_7bec365bb8_o.png) But Visual Studio 2010 says, otherwise... ![alt text](https://farm4.static.flickr.com/3565/3767373125_4faf492545_o.png)
Microsoft.SqlServer.SqlTools.VSIntegration reference problem/oddities in Visual Studio 2010
CC BY-SA 2.5
0
2009-07-29T04:08:57.730
2011-05-12T16:37:29.213
2017-02-08T14:13:57.843
-1
4,035
[ "sql-server", "visual-studio", "ssms", "assembly-resolution" ]
1,202,535
1
1,204,092
null
1
5,314
I'm getting a thrown error from javax.net.ssl.SSLHandshakeException (see attached picture) ![alt text](https://i1012.photobucket.com/albums/af244/tammens_photos/error.png) Is it possible for Java to have a corrupt or missing CA cert? If so how can I repair or resolve this issue/error? 1. I have removed all versions of JRE from the PC and installed the latest version of JRE (1.6.14). 2. Cleaned and removed all unnecessary Trusted Cert's from the User section of Certificates. 3. Try running keytool to get the fingerprints of the CA's When trying to run the keytool I'm getting the following:
Could not find trusted certificate
CC BY-SA 2.5
null
2009-07-29T19:35:16.167
2011-03-14T10:50:36.523
2017-02-08T14:14:00.227
-1
2,140,183
[ "java", "ssl-certificate", "certificate-authority" ]
1,203,248
1
1,203,299
null
3
1,378
I have some data in a tree structure, and I want to represent them in a graphical way, with the root node in the middle of the stage, his children displaced in a circle around him, and so on for every children, around their parent. I don't want overlapping nodes, so the question is how to arrange space in an optimal way. Something less or more like ![alt text](https://farm3.static.flickr.com/2001/2314258583_89e1109527.jpg) (found via google) What algorhythms I have to search to realize something like this?
Circular representation of a tree structure
CC BY-SA 3.0
0
2009-07-29T21:42:55.673
2014-05-02T11:44:57.440
2017-02-08T14:14:00.570
-1
55,385
[ "algorithm" ]
1,205,285
1
1,205,567
null
4
471
Is it possible to do the following layout with CSS but not using absolute/relative positioning? We tried to solve this riddle for several days but we couldn't fit the box 10. Please also provide css + html files of your solution. So we can discuss solutions. ![is it possible?](https://farm3.static.flickr.com/2497/3770966707_082c23c3ae.jpg)
This layout can be done with CSS?
CC BY-SA 3.0
0
2009-07-30T08:46:04.153
2012-05-03T06:47:02.977
2017-02-08T14:14:00.913
-1
134,845
[ "css", "layout" ]
1,205,809
1
1,206,457
null
0
903
First of all, as I am using VB6, please confine your kind suggestions to techniques applied to VB6. ![alt text](https://i.stack.imgur.com/cSTWr.jpg) I have a set of controls related to each other as the above figure shows. It includes several treeviews, a split bar, a listview, a subform( a usercontrol), and etc. When I click or change the treeview nodes in the left, the right controls will change their display accordingly, and vice versa. The data behind the scene is maintained in an Access database. This set of data management and display is used in several different applications. So I wrote several classes to implement the logic and include these classes modules again and again in my applications. So I am actually my classes in a "copy and paste" mode. It works but it have problems. If I make a change in a class, I have to change it in several applications. These days I am thinking about making them into the so-called ActiveX components. But I am not sure which kind of ActiveX components should I develop to reuse the whole architecture. In a nutshell, I want to know than just "copy and paste". Below is some ideas or expectation of the new "graceful REUSE", but not confine to them. (1) I hope it looks like an ActiveX control which has a property page so that I can set some properties of it during design time. (2) For different applications, the subform in the right may display different information and has different controls and may need extra coding and designing. (3) Also I may need to code some new behaviour for the treeview and listview for different applications. This requirement make a whole usercontrol for the whole form not suitable. because MSDN said “References to ActiveX controls,should never be returned to client applications。"
How can I reuse classes in my VB6 application?
CC BY-SA 4.0
null
2009-07-30T10:44:21.607
2019-04-02T20:06:17.930
2019-04-02T20:06:17.930
4,751,173
118,132
[ "vb6", "activex", "components", "code-reuse", "reusability" ]
1,206,035
1
1,206,057
null
0
315
I am trying to connect MySQL to Windows following the instructions given [here](http://www.dscripts.net/tutorials/2009/01/18/connect-to-mysql-database-using-csharp/). I have installed MySQL 5.1 software, GUI tools and MySQL connector. MySQL is working fine. I want to establish connection between the MySQL database and a C# Windows application. But I am not able to find "MySql.Data" in in the C# Windows application. Can anyone help me to solve this issue? Please refer to the screenshot below: ![alt text](https://i.stack.imgur.com/iddOJ.jpg)
Cannot add connection to MySQL in C# application
CC BY-SA 4.0
null
2009-07-30T11:34:52.440
2019-04-02T20:02:06.627
2019-04-02T20:02:06.627
4,751,173
128,036
[ "c#", "mysql" ]
1,207,173
1
null
null
5
2,880
I implemented a custom DateTimePicker. On the DateTimePicker there is a button. In the examples I've found it's width is set to 16. This is working but I would like to have a dynamic approach. So, is there a way to get the size of this button or is there a general way to get information about .Net-Control sub elements like size etc.? Trying DateTimePicker.Controls didn't help me (it's empty). ![enter image description here](https://i.stack.imgur.com/GsSB7.png)
How to get width of button in DateTimePicker-Control/Controls in general?
CC BY-SA 3.0
0
2009-07-30T14:58:45.657
2011-11-29T19:30:26.687
2011-11-29T19:30:26.687
12,597
97,118
[ "c#", ".net", "winforms", "user-controls" ]
1,209,111
1
null
null
0
394
Here is how my menu looks right now: ![alt text](https://imgur.com/apS9k.png) Here is how I want it to look: ![alt text](https://imgur.com/qAoPd.png) Right now I have the following css: ``` #menu { position:relative; width: 940px; height:90px; } #menuItem { position: absolute; bottom: 0px; padding-left: 50px; float: left; width: 600px; } .titleText { float: right; color:#209202; font-size:22px; font-style:italic; font-family:Georgia; font-weight:bold; } ``` And the following HTML: ``` <div id="titleBar"> <div id="menu"> <div id="menuItem"> <ul class="tabs"> <li><a href="/dashboard/"> <img alt="Dashboard" src="/Content/Images/Dashboard_green.png" /> </a> </li> <li><a href="/placements/"> <img alt="Place Accounts" src="/Content/Images/Place_Accounts_white.png" /> </a> </li> <li><a href="/messages"> <img alt="Messages" src="/Content/Images/Messages_white.png" /> </a> </li> <li><a href="/reports"> <img alt="Reports" src="/Content/Images/Reports_white.png" /> </a> </li> <li><a href="/admin"> <img alt="Admin" src="/Content/Images/Admin_white.png" /> </a> </li> </ul> </div> <div class="titleText"> Dashboard </div> </div> </div> ``` I've tried a million different things to get titleText 40px from the right hand side and 50px from the top, and having the tabs floating 40px from the left bottom, but everything I try gets me close but then fails to work in IE7 for some reason. menu represents the whole grey bar area. menuItem is the tabs. titleText is the green word that says "Dashboard". I should I style menuItem, menu, and titleText so it displays like the correct image below and still works in IE7? Any assistance would be greatly appreciated. I've been trying at this blindly for awhile.
How can I make these elements line up correctly using CSS?
CC BY-SA 2.5
null
2009-07-30T20:22:22.570
2011-11-21T20:29:11.873
null
null
64,878
[ "html", "css", "internet-explorer-7" ]
1,210,456
1
null
null
2
911
I'm trying unsuccessfully to get CoverStory working in an iPhone project. Unfortunately XCode build settings and gcc flags are a big mystery to me. :( I've managed to generate .gcno files but the .gcda files don't show. I've added -lgcov as an other linker flag, set both the GCC_GENERATE_TEST_COVERAGE_FILES and GCC_INSTRUMENT_PROGRAM_FLOW_ARCS flags to YES as specified in the documentation but I still have no luck. I also downloaded the fat libgcov.a file from CoverStory's site and included that in my project. I am trying this with the new built in support for iPhone unit tests using a logic unit test bundle. Could this be the cause? Does the app need to run as an application in order to generate these files? ![alt text](https://codeforfun.files.wordpress.com/2009/07/coverstorysettings.png?w=500&h=344)
CoverStory for iPhone testing?
CC BY-SA 2.5
0
2009-07-31T02:50:27.313
2009-12-23T03:26:32.987
2017-02-08T14:14:01.277
-1
10,631
[ "iphone", "unit-testing", "xcode" ]
1,213,376
1
1,213,406
null
4
9,633
Given a database schema with a parent table and two or more child tables. For example: ![Database Diagram](https://farm4.static.flickr.com/3532/3774659839_3239c97d5c.jpg) Is it possible to create a query, using the `for xml` statement, that outputs the following XML: ``` <?xml version="1.0"?> <person> <name>Joe Bloggs</name> <age>25</age> <address> <streetAddress>123 Test Street</streetAddress> <town>Example Town</town> <postcode>A12 3BC</postcode> </address> <address> <streetAddress>124 Test Street</streetAddress> <town>Example Town</town> <postcode>A12 3BC</postcode> </address> <contact> <type>Home Phone</type> <value>01234 567890</value> </contact> <contact> <type>Work Phone</type> <value>01987 654321</value> </contact> <contact> <type>Email Address</type> <value>joe@example.com</value> </contact> </person> ``` My initial attempt: ``` select person.name, person.age, address.streetAddress, address.town, address.postcode, contact.type, contact.value from Person as person left join Address as address on person.PersonID = address.PersonID left join Contact as contact on person.PersonID = contact.PersonID where person.PersonID = 1 for xml auto, elements ``` Yielded this result in which all the combinations of contact and address are output: ``` <?xml version="1.0" encoding="utf-8"?> <person> <name>Joe Bloggs</name> <age>25</age> <address> <streetAddress>123 Test Street</streetAddress> <town>Example Town</town> <postcode>A12 3BC</postcode> <contact> <type>Home Phone</type> <value>01234 567890</value> </contact> <contact> <type>Work Phone</type> <value>01987 654321</value> </contact> <contact> <type>Email Address</type> <value>joe@example.com</value> </contact> </address> <address> <streetAddress>124 Test Street</streetAddress> <town>Example Town</town> <postcode>A32 1BC</postcode> <contact> <type>Home Phone</type> <value>01234 567890</value> </contact> <contact> <type>Work Phone</type> <value>01987 654321</value> </contact> <contact> <type>Email Address</type> <value>joe@example.com</value> </contact> </address> </person> ``` Using a single left join to either the Contact or Address table produces part of what I'm after, but after adding the second join it starts to go wrong. Is there another technique that could be used to achieve the result I'm looking for?
Producing XML from a multi-table join in SQL Server
CC BY-SA 2.5
null
2009-07-31T15:57:40.557
2009-07-31T16:26:26.457
2017-02-08T14:14:02.010
-1
21,875
[ "sql-server", "xml", "join" ]
1,217,153
1
1,217,260
null
7
2,038
I am rotating my image with the following code: ``` CGAffineTransform rotate = CGAffineTransformMakeRotation( [ratio floatValue] ); [imageView setTransform:rotate]; ``` But it doesn't have sharp edges, does someone know a solution for this? Here's the image I get: ![enter image description here](https://i.stack.imgur.com/c6hIk.png)
My rotated image doesn't have sharp edges
CC BY-SA 3.0
0
2009-08-01T18:19:23.450
2015-09-03T19:20:11.373
2012-10-31T10:05:37.517
488,657
146,441
[ "iphone", "image", "uiimageview", "rotation" ]
1,218,986
1
1,222,790
null
5
4,539
I am building a website for a club that is part of a mother organisation. I am downloading (leeching ;) ) the images that where put on profile pages of the mother organisation to show on my own page. But their website has a nice white background, and my website has a nice gray gradient on the background. This does not match nicely. So my idea was to edit the images before saving them to my server. I am using GDI+ to enhance my images, and when I use the method MakeTransparent of Bitmap, it does work, and it does do what its supposed to do, but I still have these white jpeg artifacts all over the place. The artifacts makes the image so bad, I am better off not making the image transparent and just leaving it white, but thats really ugly on my own website. I can always at a nice border with a white background of course, but I rather change the background to transparent. So I was wondering if and how I can remove some simple JPEG artifacts in C#. Has anyone ever done this before? Thanks for your time. Example image: ![TB-5404](https://i466.photobucket.com/albums/rr27/Arcturus5404/tb5404_full.jpg) Transformed image: ![TB-5404 transformed](https://i466.photobucket.com/albums/rr27/Arcturus5404/transformed.png)
JPEG artifacts removal in C#
CC BY-SA 2.5
0
2009-08-02T14:20:11.250
2010-03-18T22:49:19.073
2017-02-08T14:14:05.990
-1
900
[ "c#", "image-processing", "gdi+", "bitmap" ]
1,219,827
1
1,219,833
null
5
3,089
I working on a simple paint program. It seemed Qt (and KDE) would be a easy way to implement it. I find Qt quite easy to work with, but now I have hit a problem. When I draw something in my program the mouse skips if I move the mouse to fast. like this: ![alt text](https://i229.photobucket.com/albums/ee237/kvasarnomad/dev/camoMaker.png) It susposed to be like one long string. I'm using mouseMoveEvent() to draw a pixel to my image when the left mouse button is pressed down. I have called setMouseTracking(true); so the event should be called as long as I move the mouse. ``` void camoMaker::mouseMoveEvent(QMouseEvent *ev) { if(ev->state()==Qt::LeftButton) { QPoint mPoint=ev->pos(); mPoint.setX(mPoint.x()-80); drawPoint(mPoint); } } ``` camoMaker is the main widget. drawPoint() draws a pixel on both a internal QImage and using QPainter on a QWidget thats the drawing area. It seems to me that either mouseMoveEvent() isn't called for every pixel the mouse moves or that the mouse actually just skips some pixel. I understand that it might just how it works and not Qt fault but X11 or how the OS handle mouse position/input. If so how would I go about to fix it, should I try to interpolate from 2 points that gets registered?
Qt, Mouse skipping, not updating every pixel, mouseMoveEvent()
CC BY-SA 2.5
0
2009-08-02T20:52:42.937
2009-08-02T20:56:13.707
2017-02-08T14:14:06.327
-1
149,091
[ "c++", "linux", "qt", "kde-plasma" ]
1,222,138
1
1,222,216
null
3
2,585
I'm desperately trying to connect controls of NSViews which will reside in a NSCollectionView using outlets. The collection view is fed using an NSArrayController. I created the NSView in a separate NIB file and in the implementation of NSCollectionViewItem I overwrote copyWithZone to load it: ``` -(id)copyWithZone:(NSZone *)zone { id result = [super copyWithZone:zone]; [NSBundle loadNibNamed:@"InputView" owner:result]; return result; } ``` I've used this approach according to this [instructions](http://benedictcohen.co.uk/blog/archives/72). Unfortunately this is what happening: ![alt text](https://i.stack.imgur.com/e7WWO.png) The NSView looks like this: ![alt text](https://i.stack.imgur.com/iheAA.png) The NSCollectionView resides in a NSScrollView and the scrollbar is set to enable automatically. But as you can see there's no scrollbar. I don't really understand what I need to do so the NSCollectionView knows the dimensions of its NSViews. It has worked before when I didn't have a seperate NIB-file, but then I couldn't make outlet connections from the view to the item :-(
How to use NSCollectionView and Outlets properly?
CC BY-SA 3.0
0
2009-08-03T12:41:33.740
2015-06-20T01:46:13.683
2015-06-20T01:46:13.683
4,099,598
149,406
[ "objective-c", "cocoa", "interface-builder", "cocoa-bindings", "nscollectionview" ]
1,229,456
1
1,229,947
null
3
5,817
I've been trying a lot of different things that I would think would work like expected. However, they are causing me some frustration. Here's the scoop: I am using ICEFaces 1.8 components in a Java EE web application. My goal is to render a bunch of ice:commandButtons on the page based on a query to my database. I want these buttons to be able to toggle selections that I will later use for parameters to another query to the database (basically a query front end of sorts for a set of users). I would like the output to look like so: ![Deselected](https://3.bp.blogspot.com/_n_tMTNWlgdQ/SniHmmjWalI/AAAAAAAAAA4/xQDtx0y4P-Y/s320/deselected.PNG) When I click on a button, I would like the following update to my page: ![Selected](https://1.bp.blogspot.com/_n_tMTNWlgdQ/SniHmRVhK2I/AAAAAAAAAAw/SSoOLEugUjc/s320/selected.PNG) When I created the buttons on my page statically, as such: ``` <ice:commandButton id="seasonSEP09" style="background-color: #FFFFFF;" partialSubmit="true" actionListener="#{bean.updateSeasons}" value="2009-2010" /> <ice:commandButton id="seasonSEP08" style="background-color: #FFFFFF;" partialSubmit="true" actionListener="#{bean.updateSeasons}" value="2008-2009" /> <ice:commandButton id="seasonSEP07" style="background-color: #FFFFFF;" partialSubmit="true" actionListener="#{bean.updateSeasons}" value="2007-2008" /> <ice:commandButton id="seasonSEP06" style="background-color: #FFFFFF;" partialSubmit="true" actionListener="#{bean.updateSeasons}" value="2006-2007" /> ``` this works great, and each button works individually as I would expect. My backing bean is updated, the parameters are correctly added in updateSeasons() method, and my output at the end yields the correct records. However, I know this is not what I want. I don't want to update these anytime another season is entered in the system. Maintainance nightmare, right? So what I want to do is dynamically generate these ice:commandButton components based on my database table full of Season objects. Here is the Season class I am using: ``` public class Season { String StartMonth; String Season; public String getStartMonth() { return StartMonth; } public void setStartMonth(String startMonth) { StartMonth = sweep; } public void setSeason(String season) { Season = season; } public String getSeason() { return Season; } } ``` Very straightforward. Two properties, which I'm guaranteed to be unique in the database. Here is the backing bean I am using: ``` public class Bean { public Bean() { defineSeasonsList(); } public List<HtmlCommandButton> seasonsList; // seasonsList getter & setter omitted public List<String> selectedSeasons; // selectedSeasons getter & setter omitted private void defineSeasonsList() { seasonsList = new ArrayList<HtmlCommandButton>(); selectedSeasons = new ArrayList<String>(); try { hibernate.openTransaction(); for(Season season:defineSeasonsListFromDataSource())) { HtmlCommandButton button = new HtmlCommandButton(); button.setId("season" + season.getStartMonth()); button.setValue(season.getSeason); button.setStyle("background-color: #FFFFFF;"); button.setPartialSubmit(true); seasonsList.add(button); } } catch (Exception e) { System.out.println("Error defining seasons list: " + e.getMessage()); } finally { hibernate.commitTransaction(); } } public void updateSeasons(ActionEvent ae) { HtmlCommandButton selected = (HtmlCommandButton) ae.getComponent(); if(selectedSeasons.contains(selected.getValue().toString())) { selectedSeasons.remove(selected.getValue().toString()); selected.setStyle("background: #FFFFFF;"); } else { selectedSeasons.add(selected.getValue().toString()); selected.setStyle("background: #009DD9; color: #FFFFFF;"); } } } ``` OK, so here comes my dilemma(s). First, I tried to render this markup: ``` <p> <ice:panelGroup> <ice:panelSeries id="seasonsList" value="#{bean.seasonsList}" var="season"> <ice:commandButton binding="#{season}"/> </ice:panelSeries> </ice:panelGroup> </p> ``` And I get this output: ![Bad Buttons](https://2.bp.blogspot.com/_n_tMTNWlgdQ/SniLF7r4QbI/AAAAAAAAABA/pS7hhW-kB-I/s320/badButtons.PNG) So, being frustrated and adventurous, I tried to render this markup to achieve my goal: ``` <p> <ice:panelGroup> <ice:panelSeries id="seasonsList" value="#{bean.seasonsList}" var="season"> <ice:commandButton id="#{season.id}" partialSubmit="true" style="background-color: #FFFFFF" value="#{season.value}" actionListener="#{bean.updateSeasons}"/> </ice:panelSeries> </ice:panelGroup> </p> ``` Which yielded the following stacktrace: Aug 4, 2009 2:28:11 PM com.sun.faces.lifecycle.Phase doPhase SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /phase1.jspx) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1a477b7] Aug 4, 2009 2:28:11 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception java.lang.IllegalArgumentException: #{season.id} at javax.faces.component.UIComponentBase.validateId(UIComponentBase.java:549) at javax.faces.component.UIComponentBase.setId(UIComponentBase.java:351) at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:219) at javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:486) at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:670) at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1142) at com.icesoft.faces.component.CommandButtonTag.doStartTag(CommandButtonTag.java:741) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:204) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229) at com.icesoft.faces.webapp.parser.Parser.parse(Parser.java:162) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:464) at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17) at com.icesoft.faces.context.View$2$1.respond(View.java:47) at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:197) at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36) at com.icesoft.faces.context.View$2.serve(View.java:72) at com.icesoft.faces.context.View.servePage(View.java:133) at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52) at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11) at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24) at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42) at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19) at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62) at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23) at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Am I trying to do something that I shouldn't be doing? Is there a better way to accomplish this goal? If more information is necessary I'd be happy to provide it. Thanks in advance, my friends. : So I tried changing the seasonsList collection from List to List and rendering some different markup, like so: ``` <p> <ice:panelGroup> <ice:panelSeries value="#{bean.seasonsList}" var="season"> <ice:commandButton partialSubmit="true" style="background-color: #FFFFFF" value="#{season}" actionListener="#{Phase1EventBean.updateSeasons}"/> </ice:panelSeries> </ice:panelGroup> </p> ``` And changing the defineSeasonsList() method to: ``` public void defineNationalSeasonsList() { try { seasonsList = new ArrayList<String>(); selectedSeasonsList = new ArrayList<String>(); hibernate.openTransaction(); for(UedaNationalDates season:hibernate.getList(new UedaNationalDates(), QueryFactory.getUedaNationalSeasons(hibernate.getHibSession()))) { nationalSeasonsList.add(season.getSeason()); } } catch (Exception e) { System.out.println("Error defining nationalMeasurementPeriods: " + e.getMessage()); } finally { hibernate.commitTransaction(); } } ``` This actually renders all the buttons I would like to see, and adds them correctly to the selectedSeasonsList in my backing bean when I click on them, and removes them from it when I click again. However, on the UI, button appears to be toggled when I click just the one button. For example, when I click on 2009-2010, this is what I see: ![All Selected](https://3.bp.blogspot.com/_n_tMTNWlgdQ/Sni7R9BR2BI/AAAAAAAAABI/unU4vxlm_xk/s320/allSelected.PNG)
Dynamically generate ice:commandButton components
CC BY-SA 2.5
null
2009-08-04T19:32:12.730
2009-08-05T11:55:10.080
2017-02-08T14:14:10.447
-1
318
[ "jsf", "jakarta-ee", "icefaces" ]
1,230,906
1
1,231,036
null
8
5,458
I'm trying to convert an image into an audio signal in MATLAB by treating it as a spectrogram [as in Aphex Twin's song on Windowlicker](http://www.bastwood.com/aphex.php). Unfortunately, I'm having trouble getting a result. Here it what I have at the moment: ``` function signal = imagetosignal(path, format) % Read in the image and make it symmetric. image = imread(path, format); image = [image; flipud(image)]; [row, column] = size(image); signal = []; % Take the ifft of each column of pixels and piece together the real-valued results. for i = 1 : column spectrogramWindow = image(:, i); R = abs(ifft(spectrogramWindow)); % Take only the results for the positive frequencies. signalWindow = R(1 : row / 2.0); signal = [signal; signalWindow]; end end ``` So, I'm taking Inverse Fourier Transforms on columns of my image and then putting them together to form a signal. Also, this function uses the Image Processing Toolbox for MATLAB to read in images. The goal is to have some variation of ``` spectrogram(imagetosignal('image', 'bmp')); ``` result in something that looks like the original image. I would very much appreciate any help! I'm just learning signal processing, so don't be surprised if there's an obvious misconception. Thanks! --- : Thanks Dave! I got it working! I ended up with this: ``` function signal = imagetosignal(path, format) % Read in the image and make it symmetric. image = imread(path, format); image = [image; flipud(image)]; [row, column] = size(image); signal = []; % Take the ifft of each column of pixels and piece together the results. for i = 1 : column spectrogramWindow = image(:, i); signalWindow = real(ifft(spectrogramWindow)); signal = [signal; signalWindow]; end end ``` ![alt text](https://imgur.com/qCLLy.jpg) ![alt text](https://imgur.com/wZEU9.jpg)
Reverse Spectrogram A La Aphex Twin in MATLAB
CC BY-SA 2.5
0
2009-08-05T02:34:12.530
2010-06-28T21:24:34.430
2009-08-05T04:36:09.890
48,096
48,096
[ "matlab", "image-manipulation", "signal-processing", "fft", "inverse" ]
1,233,673
1
null
null
5
11,839
I have a table that looks like this: ![alt text](https://imgur.com/MXqRf.png) ClientID is the only identity column I have in the table. UserID is a FK to a different tables primary key. Here is my Linq to SQL insert code: ``` public void InsertClientByUsername(string username, Entities.Client clientInfo) { using (LinqModelDataContext db = new LinqModelDataContext()) { var existingClient = (from client in db.Clients join ext_usr in db.User_Extendeds on client.UserID equals ext_usr.FriendlyUserID join asp_usr in db.aspnet_Users on ext_usr.UserID equals asp_usr.UserId where asp_usr.UserName.ToLower().Equals(username) select client).SingleOrDefault(); if (existingClient != null) { existingClient.Address1 = clientInfo.Address1; existingClient.Address2 = clientInfo.Address2; existingClient.City = clientInfo.City; existingClient.CompanyName = clientInfo.CompanyName; existingClient.CountryID = clientInfo.CountryID; existingClient.FaxNumber = clientInfo.Fax; existingClient.FirstName = clientInfo.FirstName; existingClient.LastName = clientInfo.LastName; existingClient.MailingAttention = clientInfo.Attention; existingClient.PhoneNumber = clientInfo.PhoneNumber; existingClient.StateID = clientInfo.StateID; existingClient.ZipCode = clientInfo.Zip; } else { int userID = (from ext_usr in db.User_Extendeds join asp_usr in db.aspnet_Users on ext_usr.UserID equals asp_usr.UserId where asp_usr.UserName.ToLower().Equals(username) select ext_usr.FriendlyUserID).SingleOrDefault(); Client newClient = new Client(); newClient.UserID = userID; newClient.Address1 = clientInfo.Address1; newClient.Address2 = clientInfo.Address2; newClient.City = clientInfo.City; newClient.CompanyName = clientInfo.CompanyName; newClient.CountryID = clientInfo.CountryID; newClient.FaxNumber = clientInfo.Fax; newClient.FirstName = clientInfo.FirstName; newClient.LastName = clientInfo.LastName; newClient.MailingAttention = clientInfo.Attention; newClient.PhoneNumber = clientInfo.PhoneNumber; newClient.StateID = clientInfo.StateID; newClient.ZipCode = clientInfo.Zip; db.Clients.InsertOnSubmit(newClient); } db.SubmitChanges(); } } ``` In case you are curious, the reason I have all those assignments is because I'm translating between my POCO domain objects and the linq generated objects. In the case of this exception, it is taking the path of the else statement, creating a new client. You can see that I'm touching the ClientID property which is the ~only~ identity column in the table. Why am I getting the "Cannot insert explicit value for identity column in table 'Client' when IDENTITY_INSERT is set to OFF? In case it is useful, here is my stacktrace: > System.Data.SqlClient.SqlException was unhandled by user code Message="Cannot insert explicit value for identity column in table 'Client' when IDENTITY_INSERT is set to OFF." Source=".Net SqlClient Data Provider" ErrorCode=-2146232060 Class=16 LineNumber=1 Number=544 Procedure="" Server="192.168.168.190" State=1 StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) at System.Data.Linq.ChangeDirector.StandardChangeDirector.DynamicInsert(TrackedObject item) at System.Data.Linq.ChangeDirector.StandardChangeDirector.Insert(TrackedObject item) at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) at System.Data.Linq.DataContext.SubmitChanges() at DomainModel.Repository.Concrete.SqlClientRepository.InsertClientByUsername(String username, Client clientInfo)
Why am I getting "Cannot insert explicit value for identity column" in LINQ to SQL when I'm not specifying a value for an identity column?
CC BY-SA 2.5
0
2009-08-05T14:36:18.943
2012-11-13T07:46:31.690
2009-08-05T14:52:00.103
149,960
149,960
[ "c#", "linq-to-sql" ]
1,234,540
1
1,234,668
null
0
1,171
I am playing around with Sharepoint 2007. I have a virtual machine (win server 2k3) with an instance of sharepoint server 2007 running on it. I am now working on creating web parts. I have successfully created simple ones, such as this one that displays text: ``` public class SimpleWebPart : WebPart { private string _displayText = "Hello World!"; [WebBrowsable(true), Personalizable(true)] public string DisplayText { get { return _displayText; } set { _displayText = value; } } protected override void Render(System.Web.UI.HtmlTextWriter writer) { writer.Write(_displayText); } } ``` I have this one (and a few test ones) inside of a Class Library, which I put into the `_app_bin` folder inside of `C:\Inetpub\wwwroot\wss\VirtualDirectories\80`. The latest one I added utilizes LINQ to get data from a table I added (not part of Sharepoint): ``` public class SimpleDBWebPart : WebPart { protected override void Render(System.Web.UI.HtmlTextWriter writer) { var oDB = new SPWebPartDataClassesDataContext(); var oRes = oDB.GetAllFirstTable(); foreach(var item in oRes) { writer.Write("<div>Item Name: {0}</div>",item.text); writer.Write("<div>Item ID: {0}</div>", item.id); } } } ``` The `GetAllFirstTable()` is a stored procedure that gets all the data from my test table: ``` ALTER PROCEDURE dbo.GetAllFirstTable AS SELECT * FROM FirstTable RETURN ``` When I try to add the WebPart to a page, I get this error: > The "SimpleDBWebPart" Web Part appears to be causing a problem. Could not load file or assembly 'System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. I used Reflector to make sure I have the assembly inside the DLL: ![alt text](https://imgur.com/J5fm3.png) And that appears to be the case. Do I have to add the assembly to the web.config file of the sharepoint site? Or is there something else that I am missing? Thanks guys!
Could Not Load File or Assembly Sharepoint 2007 WebPart
CC BY-SA 2.5
null
2009-08-05T17:08:33.903
2009-08-05T17:35:27.657
null
null
25,515
[ "c#", "linq", "sharepoint", "web-parts" ]
1,234,764
1
1,234,870
null
3
532
So I'm working on a project that will, in the end, generate a kind of flow chart using the Flickr api. You will supply a seed tag, and the program will use that seed tag to find other related Flickr pictures that have common tags... I have all of the back end stuff up and running but I'm stumped on the formatting. Here is a screenie of what I would like it to look like... ![Cool Screenie](https://imgur.com/E4DUe.jpg) Here's my question. Is there a good way of approaching the spacing of each branch? By this is mean, I would like to have a function where I could simply create a new node (or "branch") and specify which existing node I would like it to attach to. This is all good and fine, but I need to be able to automatically and intelligently place the new node on the page so it doesn't overlap any existing lines or nodes. I guess this is more of a general programming question as if I knew the process I could code it, but for those who are interested I am doing this in Javascript/HTML/CSS for the styling and maybe some PHP for the Flickr calls. Feel free to ask any questions to clarify my rambling.
Automatic Spacing for Flowchart
CC BY-SA 2.5
0
2009-08-05T17:58:50.993
2009-08-05T20:19:53.750
null
null
52,749
[ "javascript", "logic", "flickr" ]
1,234,949
1
null
null
-1
14,277
I am making an application that reads an mp3 file , and I want the user to be able to share the mp3 player on his profile and be shown like the image below: ![](https://i.stack.imgur.com/mpiTg.jpg) and not like the normal share button.
how to add mp3 player to facebook members from my facebook application
CC BY-SA 3.0
null
2009-08-05T18:30:57.823
2015-06-20T02:11:51.473
2015-06-20T02:11:51.473
1,159,643
null
[ "facebook", "profile", "fbml", "share" ]
1,235,057
1
1,235,130
null
1
112
I have this dilemma about designing/programming border or gap widths in an application of mine. I'm using Swing but this is sort of implementation-agnostic. I have a splitter pane (JXMultiSplitPane) dividing two subpanes, shown below outlined in black; the black border will be gone in the real application and is just here for debugging. You'll note that there's a gap between the two subpanes. That's the splitter, and it needs to be wide enough to grap onto. You'll also notice the gap between each table and the black border. That's supposed to be there to add some reasonable space... except that if I remove the black borders, I now have a space between the two tables that looks 3x as wide as it should be. My instinct is to get rid of the gap on the right side of the left-hand table, and the gap on the left side of the right hand table, so that the only gap is the splitter itself. Is this the right way to handle it? The only hesitation I have is that I may be giving the user the option to stack these vertically, so the actual border spacing of the left hand table needs to change (spacing adjacent to the splitter should be set to 0) and that seems weird.... ![https://farm3.static.flickr.com/2436/3792188681_21c2c80ae8.jpg](https://farm3.static.flickr.com/2436/3792188681_21c2c80ae8.jpg)
GUI border dilemma
CC BY-SA 2.5
null
2009-08-05T18:50:46.117
2009-08-05T19:04:37.053
2017-02-08T14:14:11.807
-1
44,330
[ "user-interface", "whitespace" ]
1,236,341
1
1,236,649
null
4
1,020
The iPhone is admittedly not the best platform for viewing code, but I'd like to optimize the mobile portion of my web site for the device as best I can. I'm having trouble getting code (Java code, in this case) to display properly. I'm using `<pre>` tags, along with some CSS to render a nice little background for the code. This looks OK: ![](https://imgur.com/Mck1Y.png) However if you scroll to see the rest of the code, you get this: ![](https://imgur.com/xJOv3.png) The text inside the `<pre>` is rendered properly, but the background color stops at the width of the device. I have tried this in the simulator, in a 3G device running 3.0, as well as in a 3G running 3.1-beta and they all behave this way. It render fine in Safari on the Mac; just not on the iPhone. Here is the HTML: ``` <pre> String input = readUserInput(); // assume defined elsewhere int i; try { i = Integer.parseInt(input); } catch (NumberFormatException exception) { System.err.println("You entered an invalid integer: " + exception.getMessage()); } </pre> ``` And the CSS: ``` pre { font-weight: bold; border: 2px solid green; background: #669999; padding: 5px; } ```
How to display code on iPhone using HTML/CSS
CC BY-SA 2.5
0
2009-08-05T23:59:01.437
2009-08-06T02:13:32.653
2009-08-06T01:52:07.490
93,995
93,995
[ "iphone", "html", "css" ]
1,236,473
1
1,246,019
null
8
6,298
I want to use partially transparent images in drag/drop operations. This is all set up and works fine, but the actual transformation to transparency has a weird side effect. For some reason, the pixels seem to be blended against a black background. The following image describes the problem: ![Transparency problem](https://i.stack.imgur.com/AEPKZ.png) Figure a) is the original bitmap. Figure b) is what is produced after alpha blending has been performed. Obviously this is a lot darker than the intended 50% alpha filter intended. Figure c) is the desired effect, image a) with 50% transparency (added to the composition with a drawing program). The code I use to produce the trasparent image is the following: ``` Bitmap bmpNew = new Bitmap(bmpOriginal.Width, bmpOriginal.Height); Graphics g = Graphics.FromImage(bmpNew); // Making the bitmap 50% transparent: float[][] ptsArray ={ new float[] {1, 0, 0, 0, 0}, // Red new float[] {0, 1, 0, 0, 0}, // Green new float[] {0, 0, 1, 0, 0}, // Blue new float[] {0, 0, 0, 0.5f, 0}, // Alpha new float[] {0, 0, 0, 0, 1} // Brightness }; ColorMatrix clrMatrix = new ColorMatrix(ptsArray); ImageAttributes imgAttributes = new ImageAttributes(); imgAttributes.SetColorMatrix(clrMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap); g.DrawImage(bmpOriginal, new Rectangle(0, 0, bmpOriginal.Width, bmpOriginal.Height), 0, 0, bmpOriginal.Width, bmpOriginal.Height, GraphicsUnit.Pixel, imgAttributes); Cursors.Default.Draw(g, new Rectangle(bmpOriginal.Width / 2 - 8, bmpOriginal.Height / 2 - 8, 32, 32)); g.Dispose(); imgAttributes.Dispose(); return bmpNew; ``` Does anyone know why the alpha blending does not work? For clarity, the code does work if I'm alphablending on top of a drawn surface. The problem is that I want to create a completely semitransparent image from an existing image and use this as a dynamic cursor during drag/drop operations. Even skipping the above and only painting a filled rectangle of color 88ffffff yields a dark grey color. Something fishy is going on with the icon. Since I've reseached a whole lot and believe this has got something to do with the Cursor creation, I'm gonna include that code below too. If I GetPixel-sample the bitmap just before the CreateIconIndirect call, the four color values seem to be intact. Thus I have a feeling the culprits might be the hbmColor or the hbmMask members of the IconInfo structure. Here's the IconInfo structure: ``` public struct IconInfo { // http://msdn.microsoft.com/en-us/library/ms648052(VS.85).aspx public bool fIcon; // Icon or cursor. True = Icon, False = Cursor public int xHotspot; public int yHotspot; public IntPtr hbmMask; // Specifies the icon bitmask bitmap. If this structure defines a black and white icon, // this bitmask is formatted so that the upper half is the icon AND bitmask and the lower // half is the icon XOR bitmask. Under this condition, the height should be an even multiple of two. // If this structure defines a color icon, this mask only defines the AND bitmask of the icon. public IntPtr hbmColor; // Handle to the icon color bitmap. This member can be optional if this structure defines a black // and white icon. The AND bitmask of hbmMask is applied with the SRCAND flag to the destination; // subsequently, the color bitmap is applied (using XOR) to the destination by using the SRCINVERT flag. } ``` And here is the code that actually creates the Cursor: ``` public static Cursor CreateCursor(Bitmap bmp, int xHotSpot, int yHotSpot) { IconInfo iconInfo = new IconInfo(); GetIconInfo(bmp.GetHicon(), ref iconInfo); iconInfo.hbmColor = (IntPtr)0; iconInfo.hbmMask = bmp.GetHbitmap(); iconInfo.xHotspot = xHotSpot; iconInfo.yHotspot = yHotSpot; iconInfo.fIcon = false; return new Cursor(CreateIconIndirect(ref iconInfo)); } ``` The two external functions are defined as follows: ``` [DllImport("user32.dll", EntryPoint = "CreateIconIndirect")] public static extern IntPtr CreateIconIndirect(ref IconInfo icon); [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool GetIconInfo(IntPtr hIcon, ref IconInfo pIconInfo); ```
Windows Forms: Making a cursor bitmap partially transparent
CC BY-SA 3.0
0
2009-08-06T00:52:58.857
2021-12-28T22:20:51.223
2021-12-28T22:20:51.223
4,294,399
118,211
[ "c#", "winforms", "gdi+", "alphablending", "mouse-cursor" ]
1,236,607
1
1,236,623
null
4
507
I'm a person that learns best from example. Currently, I'm diving into the field of Web Development after fifteen years of developing desktop apps. I'm still getting used to all the web technologies used for developing modern web sites and everywhere I look, I see cool little UI elements and question how they're implemented. So I thought I'd ask you, the web experts...the wexperts :) What are some straight forward or creative ways you could code this grid-breaking arrow... ![alt text](https://psdtuts.s3.amazonaws.com/001_WebDesignWeek/02_Layout/6.jpg) The basic layout for this page looks like... ![alt text](https://psdtuts.s3.amazonaws.com/001_WebDesignWeek/02_Layout/diagram.jpg) 1. What would the html/css code look like? 2. Would you split the image into multiple images or could you use a single image? I'm sure this is a really simple concept and it completely boggles me. I'm sorry if this is a strange question, remember I'm a noob! :) Thanks in advance for all your help! Here's a [link](http://psdtuts.com/tutorials/interface-tutorials/how-a-simple-layout-can-be-mixed-n-matched-with-patterns-photos-and-backgrounds/) to the original tutorial where I found these images
How would you code this: Grid-breaking shapes
CC BY-SA 2.5
0
2009-08-06T01:58:27.107
2010-06-02T06:39:16.210
2017-02-08T14:14:13.157
-1
191,808
[ "html", "css", "image" ]
1,238,313
1
null
null
0
1,063
I have been playing around with the idea of a single audit table for a few tables in my database. I found the code on this page: [http://www.simple-talk.com/sql/database-administration/pop-rivetts-sql-server-faq-no.5-pop-on-the-audit-trail/](http://www.simple-talk.com/sql/database-administration/pop-rivetts-sql-server-faq-no.5-pop-on-the-audit-trail/) I like the idea, but the only that I am a bit puzzled with is how you would query out the information so that it can be shown in a useful manner. After you make some changes the audit table looks like this: ![alt text](https://i.stack.imgur.com/o1s7r.jpg) Most of the time in order to do history I would just make a copy of table and add a date modified column to the end then just copy the whole row into the history table, but that creates a lot of copied data and lots of history tables if you have lots of things to audit.
Querying single audit table for reporting
CC BY-SA 3.0
null
2009-08-06T11:30:20.440
2015-06-20T02:15:15.513
2015-06-20T02:15:15.513
1,159,643
6,335
[ "sql", "audit" ]
1,241,010
1
null
null
-4
126
![alt text](https://i.stack.imgur.com/IDpUQ.png) How can I accomplish the above using divs and CSS?
How can I accomplish this design using divs and CSS?
CC BY-SA 4.0
null
2009-08-06T19:53:28.090
2019-04-05T08:11:08.900
2019-04-05T08:11:08.900
4,751,173
null
[ "html", "css" ]
1,242,682
1
1,243,239
null
1
158
What library is used to create a window form like below? It certainly does not look/feel/acts like a typical windows forms app. ![alt text](https://farm3.static.flickr.com/2576/3796397035_35c2315cde_o.png)
What technology is used for Visual Studio SDK window?
CC BY-SA 2.5
null
2009-08-07T03:10:43.220
2012-07-03T00:27:12.980
2017-02-08T14:14:14.863
-1
4,035
[ "winforms", "visual-studio", "visual-studio-2008" ]
1,243,795
1
1,243,873
null
6
1,599
This is an idea I have been thinking about, but I do not quite know how to solve it. I would like to know if any solutions like this exists out there, or if you guys have any idea how this could be implemented. ### Steganography Steganography is basically the art of hiding messages. In modern days we do this digitally by e.g. modifying the least significant bits in a image as the one below. Thus for every pixel and for every colour component of that pixel we might be able to hide a byte or two. This alternation is not visibly by the naked eye, but analysing the least significant bits might reveal patterns that exposes the existence and possibly content of a hidden message. To counter this we simply encrypt the message before embedding it in the image, which keeps the message safe and also helps preventing discovery of the existence of a hidden message. Thus, in principle, steganography provides the following: - - - [](https://i.stack.imgur.com/icplF.jpg) [cs.vu.nl](http://www.cs.vu.nl/~ast/books/mos2/zebras.jpg) ### Semacodes Semacodes are a way of encoding data in a visually representation, that may be printed, copied, and scanned easily. The Data Matrix shown below is a example of a semacode containing the famous Lorem Ipsum text. This is essentially a 2D barcode with a higher capacity that usually barcodes. Programs for generating semacodes are readily available, and ditto for software for reading them, especially for cell phones. Semacodes usually contains error correcting codes, are generally very robust, and can be read in very damaged conditions. Thus semacodes has the following properties: - - ![](https://upload.wikimedia.org/wikipedia/commons/b/b6/Lorem_Ipsum.png) ### Combining it So my idea is to create something that combines these two, with all of the combined properties. This means it would have to: - - - So, first of all I would like to know if any solutions, algorithms or research is available on this? Secondly I would like to hear any ideas/thoughts on how this might be done? I really hope to get a good discussion going on the possibilities and feasibility of implementing something like this, and I am looking forward to reading your answers. ## Update Thanks for all the good input on this. I will probably work a bit more on this idea when I have more time. I am convinced it must be possible. Think about research in embedding watermarks in music and movies.
Combining semacodes and steganography?
CC BY-SA 4.0
0
2009-08-07T09:22:41.417
2019-04-05T08:00:24.487
2019-04-05T08:00:24.487
4,751,173
81,398
[ "algorithm", "encoding", "persistence", "barcode", "steganography" ]
1,244,649
1
null
null
0
1,192
![enter image description here](https://i.stack.imgur.com/yx2Cr.png) I am in editing mode. The dark grey is an imageView, that it seems being pushed by the reorder icons, and you can see the UIview in the background (light grey). I do not like this to happen. What do you think?
Weird view, in UITableViewCell at editing mode, while reorder cells
CC BY-SA 3.0
0
2009-08-07T13:16:02.710
2013-04-18T09:26:31.430
2013-04-18T09:26:31.430
664,177
151,093
[ "iphone", "objective-c", "uitableview" ]
1,244,914
1
1,253,907
null
3
289
I have a CSS issue which occurs in IE6 only. I'm completely stumped and am hoping someone else might be able to help. In IE6, if you navigate to www.moneysupermarket.com/loans and search for a loan of £5000 over 5 years, Homeowner - Mortgaged, you will get the Loans results page. Scroll to the bottom of the page and you will see the Personal Pricing results table. How it should and is appearing: ![](https://i.stack.imgur.com/MKJoy.gif) If it looks right when the page loads, clicking onto one of the other tabs knocks it out. Annoyingly the IE6 developer toolbar isn't much use. As soon as I change any of the styles on the UL or LI that make up the tabs, it looks fine. If I make the same change in the CSS file and refresh, it doesn't seem to work. I'm aware of the hasLayout issue, but setting display:inline-block, or height:1% to elements doesn't seem to be doing anything. Any suggestions or assistance would be appreciated! Thanks
IE6 CSS Bug - ULs & LIs
CC BY-SA 3.0
0
2009-08-07T14:08:58.883
2012-09-03T17:02:09.450
2012-09-03T17:02:09.450
389,966
152,509
[ "css", "internet-explorer-6", "html-lists" ]
1,247,444
1
1,316,343
null
0
3,852
I have a RadGrid with a datatable as it's source. I have AllowCustomPaging set to true. ``` <telerik:RadGrid runat="server" ID="RadGridSearchResults" PageSize="50" AllowPaging="true" AllowCustomPaging="true" OnNeedDataSource="RadGridSearchResults_NeedDataSource" Skin="Default"> <PagerStyle Mode="NextPrevNumericAndAdvanced" /> </telerik:RadGrid> ``` The code for my code behind method RadGridSearchResults_NeedDataSource just fills and returns a datatable with the following columns: ``` dataTableSearchResults.Columns.Add("recipeId", typeof(string)); dataTableSearchResults.Columns.Add("ingredientsIds", typeof(string)); dataTableSearchResults.Columns.Add("country", typeof(string)); dataTableSearchResults.Columns.Add("author", typeof(string)); dataTableSearchResults.Columns.Add("style", typeof(string)); dataTableSearchResults.Columns.Add("friendly", typeof(string)); dataTableSearchResults.Columns.Add("name", typeof(string)); ``` Once the RadGrid is databound, I run the following: ``` var expression = GridGroupByExpression.Parse( "recipeId [Recipe], count(recipeId) ingredientsIds [Ingredients] Group By recipeId"); this.RadGridSearchResults.MasterTableView.GroupByExpressions.Add(expression); this.RadGridSearchResults.GroupingEnabled = true; ``` I would expect my radgrid to then look like the one they [have here](http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/expressions/defaultcs.aspx) once you click on the 'Group by expression' button: Instead, it looks like this: ![Hosted by imgur.com](https://imgur.com/PkmSG.png) Only looking right after I click the 'sort' button: ![Hosted by imgur.com](https://imgur.com/TxOph.png) Any clue? I even tried invoking sort manually but that was not successful.
Rad Telerik GridGroupByExpression is not grouped until I click the sort grid button
CC BY-SA 2.5
null
2009-08-07T23:26:08.013
2009-08-22T16:20:21.857
null
null
127,257
[ "asp.net", "grid", "telerik", "radgrid" ]
1,248,809
1
2,157,103
null
2
1,459
I've got an NSSplitView with an NSScrollView in the bottom view. The problem is when I collapse, and then re-open (un-collapse) the bottom view, the height of the scroll view is beyond the height of that bottom view so the top part of the scoll view is being clipped. I've got my scroll view and my split view set to autoresize in all directions in IB. Do I need to adjust the height of that scroll view after the un-collapse or am I setting a resizing property wrong, or something else? Below is a before and after image of what the clipping looks like. Before Collapse: ![alt text](https://farm3.static.flickr.com/2636/3800931532_c46f165595.jpg) After Collapse and re-open (notice the scroll bar in the bottom view is clipped) ![alt text](https://farm3.static.flickr.com/2616/3800931534_31fd2a9693.jpg)
How do I fix the height of my view after collapsing NSSplitView?
CC BY-SA 2.5
0
2009-08-08T12:52:17.130
2012-07-17T12:50:22.963
2017-02-08T14:14:16.887
-1
32,854
[ "cocoa", "height", "nsview", "nssplitview" ]
1,249,400
1
1,249,595
null
1
2,254
How can I configure a ASP.NET GridView to populate it by an Object DataSource where the object method needs a noticeCode to pass by the C# code? ## StudentControlPanel.aspx.cs ``` protected void Page_Load(object sender, EventArgs e) { string username = (string)Request.QueryString["username"]; Student std = Student.GetStudentByUsername(username); if (std != null) { labName.Text = std.StudentName; labUsername.Text = username; labRollNo.Text = std.RollNo; labRegNo.Text = std.RegNo; Dept dpt = std.Department; if (dpt != null) { labDepartment.Text = dpt.DeptName; } else { labDepartment.Text = "?"; } } /* Student-class has a SessionCode-property */ /* I need to pass this to Notice.GetNoticesBySessionCode()...*/ } ``` ## Notice.cs ``` public class Notice { public static List<Notice> GetNoticesBySessionCode(string sessionCode) { List<Notice> notices = null; /* EcecuteReader()..... */ return notices; } } ``` ![alt text](https://farm3.static.flickr.com/2605/3801528214_d00cf7513a.jpg)
ASP.net GridView and Object DataSource
CC BY-SA 2.5
0
2009-08-08T17:17:53.587
2009-08-08T20:31:04.633
2017-02-08T14:14:17.223
-1
159,072
[ "asp.net", "gridview", "objectdatasource" ]
1,249,506
1
1,249,519
null
6
4,547
I find decorator pattern to be most confusing. Please consider the example provided in "Head first design patterns book". ![alt text](https://i.stack.imgur.com/mBVGy.png) So to get a with double mocha and a whip, you have to write ``` Beverage beverage2 = new DarkRoast(); beverage2 = new Mocha(beverage2); beverage2 = new Mocha(beverage2); beverage2 = new Whip(beverage2); ``` I feel this is unnecessary. Here is my implementation, ``` interface Beverage { int Cost(); } class DarkRoast : Beverage { /* .... */ } class Mocha : Beverage { /* .... */ } class Whip : Beverage { /* .... */ } // here is the changed part class Order { List<Beverage> beverages = new List<Beverage> beverages(); public void AddItem(Beverage b) { beverages.Add(b); } public int Cost() { int cost; foreach(Beverage b in beverages) cost += b.Cost(); } } // use it like Order order = new Order(); order.AddItem(new DarkRoast()); order.AddItem(new Mocha()); order.AddItem(new Mocha()); order.AddItem(new Whip()); int cost = order.Cost(); ``` IMO, both does same. If yes, what is the advantage of using decorator pattern here? Any thoughts?
Alternatives to decorator pattern
CC BY-SA 3.0
0
2009-08-08T18:01:39.553
2015-06-20T02:16:14.567
2015-06-20T02:16:14.567
1,159,643
50,419
[ "c#", "java", "design-patterns" ]
1,250,250
1
1,250,293
null
1
2,540
![Diagrams](https://i208.photobucket.com/albums/bb33/bradzeis/diagrams.png) I actually have two questions, I found the answer to the second and didn't update the diagram. I'm not actually sure if these are possible, they really stumped me. Given point A and e, the angle of the line A is on relative to the x-axis where 0<=e<360 degrees, how do you calculate the coordinates of B? BA is perpendicular to A's line and 1 unit long. SOLVED: I start by taking the unit vector from a parallel to the x-axis and then I rotate it 90 + e degrees. I'm using [this](https://stackoverflow.com/questions/1211212/how-to-calculate-an-angle-from-three-points) approach. If anyone has any better suggestions, please let me know. SOLVED: I find the dot product of the vector from step 1 and the normalized vector AC. This one should be pretty self-explanatory from the diagram. I need to find the coordinates of C given A, B, the angle of BAC and the distance between A and C. SOLVED: I rotate BA e degrees and then change the magnitude to d. If anyone spots problems with my solutions, please comment.
Calculating Coords of a point Perpendicular to a Line, Calculating Coords of Third Point in Angle Given Two Points and Angle
CC BY-SA 2.5
null
2009-08-09T00:25:51.667
2009-08-09T02:31:01.997
2017-05-23T12:08:51.063
-1
120,258
[ "geometry" ]
1,251,828
1
4,021,898
null
12
35,039
I need to calculate the 2 angles (yaw and pitch) for a 3D object to face an arbitrary 3D point. These rotations are known as "Euler" rotations simply because after the first rotation, (lets say Z, based on the picture below) the Y axis also rotates with the object. This is the code I'm using but its not working fully. When on the ground plane (Y = 0) the object correctly rotates to face the point, but as soon as I move the point upwards in Y, the rotations don't look correct. ``` // x, y, z represent a fractional value between -[1] and [1] // a "unit vector" of the point I need to rotate towards yaw = Math.atan2( y, x ) pitch = Math.atan2( z, Math.sqrt( x * x + y * y ) ) ``` Do you know how to calculate the 2 Euler angles given a point? --- The picture below shows the way I rotate. These are the angles I need to calculate. (The only difference is I'm rotating the object in the order X,Y,Z and not Z,Y,X) [](https://i.stack.imgur.com/wZXrd.jpg) [](https://i.stack.imgur.com/kK7A0.jpg) --- This is my system. - - - ![my system](https://i.stack.imgur.com/c9A0N.png)
Calculate rotations to look at a 3D point?
CC BY-SA 4.0
0
2009-08-09T17:41:10.427
2019-04-12T13:59:26.093
2019-04-12T13:59:26.093
4,751,173
41,021
[ "math", "3d", "rotation", "angle", "euler-angles" ]
1,252,906
1
1,252,931
null
3
3,194
![alt text](https://farm3.static.flickr.com/2504/3806628370_c50137228d_o.jpg) Do you know any rounded corners tab like this one that I can download? Or how can I create a tab like that? Do the use of images in the tab menus are required or not? I used the: ``` -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius:5px; border-top-right-radius:5px; ``` but it is not perfect. Do you know any helpful links/tutorials about rounded corner tab?
Javascript: How to create a rounded corner tab menu?
CC BY-SA 4.0
0
2009-08-10T02:38:49.407
2021-02-15T15:37:50.327
2021-02-15T15:37:50.327
1,783,163
95,322
[ "javascript", "rounded-corners" ]
1,253,205
1
1,253,615
null
1
398
I have a shared runtime package that I am using to support an application that uses packages as a plugin system. I have included several third party units in the shared package to reduce the number of BPLs that have to be distributed. Delphi seems to have some headaches with this set up, occasionally updating only the DCP file in the "shared DCP" area (C:\Users\Public\Documents\RAD Studio\6.0\Dcp on my machine) and not the one in the DCP output directory (as specified in the project options). That isn't my main problem though... My main problem is that Delphi throws up this dialog quite often: ![Delphi Change Package Dialog](https://www.footy.com.au/nat/images/temp/packagehell.png) (this is just an example, it happens for other packages I have installed as well) Now, in Delphi 2009, at least when I cancel this dialog (and click yes on the dialog that comes up next), it doesn't change anything. Previous versions would still proceed to munge my dpk file. I currently can't get the damned dialog to stop coming up. The package is set as a runtime package, it does not have any packages "required" (other than the VCL ones). I thought I had it licked a month ago, but it has started coming up again. There are no changes to the DPK file or the DPROJ file. I know why it is doing it... Delphi is trying to keep this package internally consistent with other packages in the IDE, just in case I install it. I would like to stop the IDE doing this. Does anyone have any suggestions? N@
Preventing the IDE from changing a package's "requires" clause
CC BY-SA 2.5
0
2009-08-10T05:16:34.817
2009-08-10T08:15:44.753
2017-02-08T14:14:18.920
-1
150,046
[ "delphi", "delphi-2009" ]
1,254,356
1
1,254,445
null
6
2,154
I'm recently working on a tree structure, multiple nodes, multiple and increasable levels, and a print() method. At first, i thought it should be a Composite, i then wrote down some possible design and codes: ![alt text](https://farm3.static.flickr.com/2596/3807730874_4d6d5ed7ee_o_d.gif) ``` $struc = new Node(‘name0’, ‘id0’, ‘desc0’); $node1 = new Node(‘node1’, ‘id1’, ‘desc1’); $node2 = new Node(‘node2’, ‘id2’, ‘desc2’); $node3 = new Node(‘node3’, ‘id3’, ‘desc3’); $leaf1 = new Leaf(‘leaf1’, ‘ld1’, ‘lesc1’); $leaf2 = new Leaf(‘leaf2’, ‘ld2’, ‘lesc2’); $leaf3 = new Leaf(‘leaf3’, ‘ld3’, ‘lesc3’); $leaf4 = new Leaf(‘leaf4’, ‘ld4’, ‘lesc4’); $struc.add($node1); $struc.add($node3); $node1.add($leaf1); $node1.add($leaf2); $node1.add($node2); $node2.add($leaf3); $node3.add($leaf4); ``` Looks good, i think and begin coding, print() method may follow Iterator pattern later. But during coding, i feel is it too complex for these simple nodes? And i have to instantiate a lot of concrete classes (more than 50+, and increasing). I then stopped and thinking a simple similar way by using array: ``` -- Structure Class -- //To be more readable and clear, array here could be //divided to 3 arrays(root/nodes/leafs), then connect //in a similar way Composite does. $struc = array('name0', 'id0', 'desc0', 'children'=>array( array('node1', 'id1', 'desc1', 'children' => array( array('leaf1', 'ld1', 'lesc1'), array('leaf2', 'ld2', 'lesc2'), array('node2', 'id2', 'desc2', 'children'=>array(array('leaf3', 'ld3', 'lesc3')) ) ) ), array('node3', 'id3', 'desc3', 'children' => array(array('leaf4', 'ld4', 'lesc4')) ) ) ); function print($node = $this->struct) { ... if(isset($node['children'])) $this->print($node['children']); ... } ``` The two designs look very similar, now i'm a little confused, what's the value of Composite pattern, am i missed something important of this pattern?
What advantage will Composite pattern bring me over just Array?
CC BY-SA 2.5
0
2009-08-10T11:19:17.300
2010-10-21T09:17:50.057
2017-02-08T14:14:20.277
-1
153,626
[ "php", "design-patterns" ]
1,256,695
1
1,259,402
null
0
1,001
In the following code, why isn't the button text initially displayed when ButtonSkin (from com.sun.javafx.scene.control.caspian) is used? In the following code (running WinXP, NetBeans 6.7.1, JavaFX 1.2 , JDK 1.6), when ButtonSkin is used, the button text starts as blank. After the slider is used, te button text is displayed. ![alt txt](https://i.stack.imgur.com/0GCHR.jpg)[googlepages.com](http://onecynic.googlepages.com/withButtonSkin.jpg) to ![alt text](https://i.stack.imgur.com/YSdEN.jpg)[googlepages.com](http://onecynic.googlepages.com/withButtonSkinAfterAdjust.jpg) If you press the button before moving the slider, the action is triggered, printing "Some action slider 15.0 SliderInt 15". That suggests the information for the button text is present. Yet the button text is not displayed. If the skin isn't set, that is, the code `skin: ButtonSkin { ... }` is commented out, on start-up the result is: ![alt txt](https://i.stack.imgur.com/E4FLS.jpg)[googlepages.com](http://onecynic.googlepages.com/withoutButtonSkin.jpg) If one instead removes the bind in the `text: sliderIntText`, the problem also goes away. However, the button text is no longer updated in sync with the slider movement. Removing the levels of indirection, i.e., just binding to answerSlider.value in the button text makes no change in the start-up issue. Aside: There is a known slider value problem which occurs when the slider min is not 0. I'm not trying to resolve that issue here. ``` package skinbutton; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.text.Text; import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.scene.control.Button; import com.sun.javafx.scene.control.caspian.*; import javafx.scene.paint.Color; import javafx.scene.control.Slider; var answerSlider = Slider { min: 6 max: 32 value: 15 width: 100 translateX: 75 translateY: 20 }; var sliderIntValue:Integer = bind (java.lang.Math.floor(answerSlider.value)) as Integer ; var sliderIntText = bind "SliderInt {%d sliderIntValue}"; var sceneSlider = Scene{ content: [ answerSlider, Text { font : Font { size: 14 } x: 75 y: 50 content: bind "Slider at {%4.1f answerSlider.value}" } Button { translateX: 75 translateY: 60 skin: ButtonSkin { fill: Color.LIGHTCORAL textFill: Color.BLACK } text: bind sliderIntText width: 95 font: Font.font("SansSerif", FontWeight.BOLD, 14) action: function() { println("Some action slider {%4.1f answerSlider.value} {sliderIntText}"); } } ] }; Stage { title: "Button Skin Issue" width: 250 height: 130 scene: sceneSlider } ```
JavaFX ButtonSkin anomaly
CC BY-SA 4.0
null
2009-08-10T19:17:30.397
2019-04-13T01:59:39.963
2019-04-13T01:59:39.963
4,751,173
29,454
[ "button", "slider", "javafx" ]
1,260,146
1
1,264,680
null
1
1,205
I have a virtual machine running windows 2003 server running MOSS 2007. This virtual machine is not being run on my dev machine, but on a different machine on the network. I can ping both the host and guest OS from my dev machine. I just need to know, if it is possible, how to configure visual studio 2008 to deploy the web parts/projects/etc to the remote VM when I do this: ![Right Click, Deploy](https://imgur.com/IAqbj.png) Any input will be greatly appreciated! Thanks.
Is it possible to deploy a Web Part from Visual Studio 2008 to a (virtual) MOSS 2007 server on my network?
CC BY-SA 2.5
null
2009-08-11T12:49:59.243
2009-08-14T10:34:22.377
null
null
25,515
[ "visual-studio", "sharepoint", "deployment", "sharepoint-2007" ]