Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
4,234,387
1
4,234,853
null
7
759
Since layered rendering with a geometry shader in OpenGL seems a bit dodgy on some drivers/hardware, I would like to substitute the functionality with my own solution. This by using a big texture as rendertarget, with for example a resolution of 300². Then simulating layered rendering by rendering to 100² chunks in the texture. With that resolution it would result in 9 tiles/layers as shown in the mockup below: ![Tiles](https://i.stack.imgur.com/gPUPb.png) The question is; how to this with OpenGL? Supposedly with help of a geometry shader that renders the scene to the different tiles in one pass.?
Render to part of texture
CC BY-SA 2.5
0
2010-11-20T18:55:11.293
2010-11-20T20:29:19.127
null
null
434,480
[ "opengl", "3d" ]
4,234,431
1
null
null
5
2,418
I noticed that one of my projects references 3 different versions of mscorlib: 1. 1.0.5000.0 2. 2.0.0.0 3. 4.0.0.0 ![alt text](https://i.stack.imgur.com/8rGf1.png) This [post about "mscorlib.dll & System.dll](https://stackoverflow.com/questions/402582/mscorlib-dll-system-dll)" helped me understand what mscorlib is for, but I'm wondering whether it's normal/necessary for an application to require multiple versions of this assembly. Perhaps this happened because I upgraded my project from VS 2005 to VS 2010.
My project references 3 different versions of mscorlib.dll
CC BY-SA 2.5
0
2010-11-20T19:06:08.900
2011-06-27T03:41:13.273
2017-05-23T11:48:22.880
-1
287,311
[ "asp.net", "visual-studio-2010", "reference", "mscorlib" ]
4,234,521
1
null
null
0
202
I'm having a pretty weird problem : requesting data with xml format in a rails 3 app works on my local environment but on my hosted environment, I get a NoMethod Error. More precisely : undefined method `type' for nil:NilClass Here is the method I'm talking about : ``` def getclosest radius = params[:radius].gsub(",",".").to_d origin = [params[:lat].gsub(",",".").to_d,params[:lng].gsub(",",".").to_d] @groceries = Grocery.within(radius, :origin => origin) respond_to do |format| format.html # index.html.erb format.xml { render :xml => @groceries } end end ``` This method is called when I go to the url : [http://www.mysite.com/groceriesclosest/myradius/mylat/mylng](http://www.mysite.com/groceriesclosest/myradius/mylat/mylng) The .html works but the .xml doesnt and I get the error described above. However, in my local environment, when I go to [http://localhost:3000/groceriesclosest/radiues/lat/lng.xml](http://localhost:3000/groceriesclosest/radiues/lat/lng.xml) it works fine Any idea what's going wrong on my hosted version ? Btw, I'm using Mongrel as webserver. Thanks ! Some precisions : first, the data set in "prod" is the same as locally and second, it's the line `format.xml { render :xml => @groceries }` that causes the error. Here is part of the application trace : app/controllers/groceries_controller.rb:92:in block (2 levels) in getclosest app/controllers/groceries_controller.rb:90:in getclosest And some part of the full trace : ![alt text](https://i.stack.imgur.com/R5zaB.jpg)
Problem getting xml in a rails3 app
CC BY-SA 2.5
null
2010-11-20T19:25:38.890
2011-03-12T23:14:08.330
2010-11-21T13:32:10.050
451,252
451,252
[ "xml", "ruby-on-rails-3", "mongrel" ]
4,235,291
1
4,257,203
null
39
202,849
I use the [MySQL Connector/Net](http://dev.mysql.com/downloads/connector/net/) to connect to my database by referencing the assembly (MySql.Data.dll) and passing in a connection string to `MySqlConnection`. I like that because I don't have to install anything. (I don't want to use ODBC btw) ![alt text](https://i.stack.imgur.com/sx7sf.png) ![alt text](https://i.stack.imgur.com/iNBi2.png)
How to connect to a MySQL Data Source in Visual Studio
CC BY-SA 2.5
0
2010-11-20T22:16:45.107
2022-07-28T19:27:53.693
null
null
287,311
[ "mysql", "visual-studio-2010", "datasource", "mysql-connector" ]
4,235,375
1
4,235,402
null
12
7,515
I want to round the top right and top left of the UINavigationBar. I know that there are functions for changing the views corner radius, but is it possible to do something similar to the standard UINavigationBar? If you don't know what I'm talking about, check out this: ![](https://i.stack.imgur.com/uvflI.png) Thanks!
UINavigationBar Rounded Two Corners
CC BY-SA 3.0
0
2010-11-20T22:37:09.433
2012-02-11T19:43:29.763
2011-08-20T15:55:48.627
257,550
455,929
[ "iphone", "objective-c", "cocoa-touch", "uinavigationbar", "rounded-corners" ]
4,235,514
1
null
null
0
1,718
I'm using TLF to lay out a dictionary entry. It's working fairly well, but I need finer grained control of layout than I'm able to achieve through setting style properties on FlowElements, primarily for horizontal spacing and setting padding on SpanElements independently of their parents. The solution that seems most promising is separating the various elements of the entry into separate containers and flowing the text through them by progressively adding new containers and ContainerControllers for each new element with size set to their content bounds so that the text will flow into each new container. This ALMOST works, but the text will only flow correctly into the next container if an extra line break is inserted between the two sections of text that should go to different containers. Without the line break, the containers are sized correctly, but no text displays. In these examples I've added borders to the container sprites so you can see where they're being drawn. Aside from the line break, the text is exactly the same. The syllable field is a SpanElement inside a ParagraphElement. The pronunciation label and text are separate SpanElements inside another ParagraphElement. Without line break: ![no line break](https://i.stack.imgur.com/UukI9.png) With line break between 'rab-bit' and 'Sounds Like:': ![1 break](https://i.stack.imgur.com/rA6Vj.png) With line break AFTER 'rae biht' (line break beforehand has no effect): ![2 breaks](https://i.stack.imgur.com/wByfr.png) As you can see, the pronunciation doesn't show unless a line break is added after the text, but the alignment is then off. No combination of line breaks seems to align them correctly. Any ideas? Are these bugs in TLF? Should I try a different method? I would really like to have all the text selectable as one unit, and I love the better rendering and control that TLF offers, but I also need the layout flexibility. I suppose it's possible that I could hack something together like this with line breaks and positioning offsets, but it certainly wouldn't be pretty (or maintainable). Thanks for reading.
TLF - Flowing text through multiple containers and line breaks
CC BY-SA 2.5
null
2010-11-20T23:09:37.400
2010-11-21T20:20:12.317
null
null
238,751
[ "flash", "actionscript-3", "text", "tlf" ]
4,235,749
1
null
null
4
2,116
I have a WPF UserControl in which I try to implement the MouseClick (because `MouseClick`) event. I got the following: ![alt text](https://i.stack.imgur.com/3zW8p.jpg) Some code: ``` /// <summary> /// Occurs when users left clicks the MyControl. /// </summary> public event MouseButtonEventHandler MouseClick { add { AddHandler(MouseClickEvent, value); } remove { RemoveHandler(MouseClickEvent, value); } } protected virtual void OnMouseClick(MouseButtonEventArgs e) { base.RaiseEvent(e); //this.RaiseEvent(new RoutedEventArgs(MouseClickEvent, this)); } protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e) { base.OnMouseLeftButtonUp(e); if (!this.movedAfterMouseDown) { OnMouseClick(e); } this.gotLeftButtonDown = false; this.movedAfterMouseDown = false; } ``` So, where is the problem? # UPDATE 1 ``` protected virtual void OnMouseClick(MouseButtonEventArgs e) { //base.RaiseEvent(e); MouseButtonEventArgs args = new MouseButtonEventArgs(e.MouseDevice, e.Timestamp, e.ChangedButton); this.RaiseEvent(args); } ``` Value cannot be null. Parameter name: routedEvent ![alt text](https://i.stack.imgur.com/BCSlk.jpg) # UPDATE 2 An other custom event I implemented successfully (work without problems) - `SelectedChanged`: ``` static void OnIsSelectedChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { var s = (MyControl)source; s.RaiseEvent(new RoutedEventArgs(SelectedChangedEvent, s)); } ``` # UPDATE 3 System.Windows.Controls.Control's OnPreviewMouseDoubleClick implementation: ``` protected virtual void OnPreviewMouseDoubleClick(MouseButtonEventArgs e) { base.RaiseEvent(e); } ``` # Update 5 (for people in the tank) ``` class Foo : FrameworkElement { event EasterCameEvent; // I named it MouseClick public DoSomething() { EasterCameArgs args= ... if (Date.Now = EasterDate) OnEasterCame(args) } protected virtual void OnEasterCame(EasterCameArgs e) { base.RaiseEvent(e); } } ```
'System.StackOverflowException' occurred in PresentationCore.dll
CC BY-SA 2.5
null
2010-11-21T00:17:46.163
2010-11-21T22:43:27.547
2010-11-21T16:16:58.130
185,593
185,593
[ ".net", "wpf", "events", "wpf-controls" ]
4,235,926
1
4,239,227
null
0
1,315
I just converted a WPF project from .NET 3.5 to .NET 4.0. I'm now using the .NET 4.0 `DataGrid` control rather than the WPF Toolkit `DataGrid` control. Functionally, everything is still working, but my styles are not applying as expected. As you can see from the below screen captures, the alternating row formatting, padding, bold headings, etc. have stopped working. --- ![Screen capture of WPF Toolkit DataGrid](https://i.stack.imgur.com/rMTze.png) ![Screen capture of .NET 4.0 DataGrid](https://i.stack.imgur.com/KUnvH.png) --- Here is my entire resource dictionary. ``` <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style x:Key="DataGrid_ColumnHeaderStyle" TargetType="DataGridColumnHeader"> <Setter Property="FontWeight" Value="Bold" /> <Setter Property="TextBlock.TextAlignment" Value="Center" /> <Setter Property="TextBlock.TextWrapping" Value="WrapWithOverflow" /> </Style> <Style x:Key="DataGrid_CellStyle" TargetType="DataGridCell"> <Setter Property="Padding" Value="5,5,5,5" /> <Setter Property="TextBlock.TextAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="DataGridCell"> <Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}"> <ContentPresenter /> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style TargetType="DataGrid"> <Setter Property="ColumnHeaderStyle" Value="{StaticResource DataGrid_ColumnHeaderStyle}" /> <Setter Property="CellStyle" Value="{StaticResource DataGrid_CellStyle}" /> <Setter Property="Background" Value="White" /> <Setter Property="AlternatingRowBackground" Value="#F0F0F0" /> <Setter Property="VerticalGridLinesBrush" Value="LightGray" /> <Setter Property="HeadersVisibility" Value="Column" /> <Setter Property="SelectionMode" Value="Single" /> <Setter Property="SelectionUnit" Value="FullRow" /> <Setter Property="GridLinesVisibility" Value="Vertical" /> <Setter Property="AutoGenerateColumns" Value="False" /> <Setter Property="CanUserAddRows" Value="False" /> <Setter Property="CanUserDeleteRows" Value="False" /> <Setter Property="CanUserReorderColumns" Value="True" /> <Setter Property="CanUserResizeColumns" Value="True" /> <Setter Property="CanUserResizeRows" Value="False" /> <Setter Property="CanUserSortColumns" Value="True" /> <Setter Property="IsReadOnly" Value="True" /> <Setter Property="BorderBrush" Value="#DDDDDD" /> <Setter Property="HorizontalGridLinesBrush" Value="#DDDDDD" /> <Setter Property="VerticalGridLinesBrush" Value="#DDDDDD" /> </Style> <Style x:Key="DataGrid_FixedStyle" TargetType="DataGrid" BasedOn="{StaticResource {x:Type DataGrid}}"> <Setter Property="CanUserReorderColumns" Value="False" /> <Setter Property="CanUserResizeColumns" Value="False" /> <Setter Property="CanUserResizeRows" Value="False" /> <Setter Property="CanUserSortColumns" Value="False" /> </Style> </ResourceDictionary> ``` --- Here is a usage example (note that the style is set to "DataGrid_FixedStyle"): ``` <DataGrid Style="{StaticResource DataGrid_FixedStyle}" Grid.Column="0" Foreground="Black" SelectedIndex="{Binding SelectedParticipantIndex, Mode=TwoWay}" ItemsSource="{Binding Participants}"> <DataGrid.Columns> <DataGridTextColumn Foreground="Black" Header="Participant" Binding="{Binding ParticipantId}" /> .... </DataGrid.Columns> </DataGrid> ``` --- To make sure the resource dictionary was really being used, I added the following setter to the `<Style TargetType="DataGrid">...</Style>`: ``` <Setter Property="FontSize" Value="24" /> ``` As you can see from the screen capture below, the font size is cartoonishly large, so the style itself is definitely not being ignored. The problem is that many of the settings are not being used or not working for some reason. ![alt text](https://i.stack.imgur.com/4PQ8X.png) --- Any theory on what might have caused my styles to break?
Why did my DataGrid styling break when upgrading from .NET 3.5 w/ WPF Toolkit to .NET 4.0?
CC BY-SA 2.5
null
2010-11-21T01:18:02.877
2010-11-21T19:10:33.573
2010-11-21T06:40:57.603
129,164
129,164
[ "wpf", "xaml", "datagrid", "wpftoolkit" ]
4,236,128
1
null
null
0
318
I have a navigation bar at the top of a page I am developing. I want a certain `<div>` to be centered in the bar (which is another `<div>`). Is there an easy way to do this with CSS? I tried using pixels but that does not work when you resize the window. I am trying to center it horizontally not vertically. Update: The `<div>` that I want centered is one of three `<div>`s in one `<div>`. It is a search bar. below is an image of what I want and what it is with margin set to auto. (sorry the image does not exactly show where I want the search bar placed. I want it placed a little more to the left (at the center of the nav bar) ![alt text](https://i.stack.imgur.com/k5Z6r.png)
Is there an easy way to center a <div> inside another <div> with css?
CC BY-SA 2.5
null
2010-11-21T02:35:09.997
2010-11-21T04:23:11.657
2010-11-21T03:46:07.100
407,756
407,756
[ "html", "css" ]
4,236,156
1
4,236,225
null
0
156
This is my HTML: ``` <form method="POST" action=""> <?php $skillSubCategory = $skills->showSkills(24); for ($i = 0; $i < count($skillSubCategory); $i++) { ?> <input type="hidden" name="skillid" value="<?php echo $skillSubCategory[$i]['skill_id']; ?>" /> <?php echo $skillSubCategory[$i]['title']; ?> <input type="submit" name="add" value="add" /><br /> <?php } ?> </form> <?php if (isset($_POST['add'])) { echo $_POST['skillid']; } ?> ``` Resulting source code: ``` <form method="POST" action=""> <input type="hidden" name="skillid" value="25" /> Animal Grooming 25 <input type="submit" name="add" value="add" /><br /> <input type="hidden" name="skillid" value="26" /> Dog Trainer 26 <input type="submit" name="add" value="add" /><br /> <input type="hidden" name="skillid" value="27" /> Dog Walking 27 <input type="submit" name="add" value="add" /><br /> <input type="hidden" name="skillid" value="28" /> Vet 28 <input type="submit" name="add" value="add" /><br /> <input type="hidden" name="skillid" value="29" /> Beekeeping 29 <input type="submit" name="add" value="add" /><br /> </form> ``` What it looks like: ![alt text](https://i.stack.imgur.com/xhRfg.jpg) I get number 29 for any button clicked. Any ideas what's wrong? Why the correct number wont show up when i click add?
Problem with displaying correct hidden field
CC BY-SA 2.5
null
2010-11-21T02:44:54.943
2010-11-21T03:08:52.543
null
null
363,004
[ "php", "html" ]
4,236,212
1
4,288,099
null
2
3,812
I'm doing some webpage parsing in VBA within Excel; I'm MSHTML to download and parse the webpage. However, on certain sites, a dialog box pops up. It works fine; however, I would like to know if there is a way to disable this or possibly get around it. Thank-you for your time. My code snippet for the document creation should be below the image. ![Dialog Box](https://i.stack.imgur.com/2SXta.jpg) ``` Dim objMSHTML As New MSHTML.HTMLDocument Dim objDocument As MSHTML.HTMLDocument Set objDocument = objMSHTML.createDocumentFromUrl(url, "") ```
Silencing VBA MSHTML HTMLDocument.CreateDocumentFromURL
CC BY-SA 2.5
null
2010-11-21T03:03:35.513
2010-11-26T19:35:46.733
2018-07-09T19:34:03.733
-1
365,090
[ "vba", "excel" ]
4,236,271
1
4,236,310
null
1
520
Hey guys... today is my first day hacking away on the iphone SDK. Having a blast but have a quick question. I'm trying to move an UIView around the screen dynamically by sending it information from a slider. My slider is working fine but I cant seem to figure out how to get the UIView to move. My .h file... ``` @interface Slider_BallViewController : UIViewController { IBOutlet UISlider *theslider; IBOutlet UITextField *ytext; IBOutlet UIView *theball; } - (IBAction)moveVert:(id)sender; ``` My .m file... ``` - (IBAction)moveVert:(id)sender { int progressAsInt = (int)(theslider.value); NSString *newText = [[NSString alloc] initWithFormat:@"%d", progressAsInt]; ytext.text = newText; theball.frame.origin.y += progressAsInt; } ``` I get an error on the frame.origin line in my .m file that says... lvalue required as left operand assignment. Not sure what im doing wrong. Any help is great, thanks. ![alt text](https://i.stack.imgur.com/5Q3Ig.png)
Moving an UIView - newbie iphone sdk
CC BY-SA 2.5
0
2010-11-21T03:23:53.757
2010-11-21T03:40:32.423
2010-11-21T03:40:32.423
106,435
385,097
[ "iphone", "cocoa-touch" ]
4,236,279
1
4,739,537
null
11
1,129
After talking with a friend of mine from Google, I'd like to implement some kind of Job/Worker model for updating my dataset. This dataset mirrors a 3rd party service's data, so, to do the update, I need to make several remote calls to their API. I think a lot of time will be spent waiting for responses from this 3rd party service. I'd like to speed things up, and make better use of my compute hours, by parallelizing these requests and keeping many of them open at once, as they wait for their individual responses. Before I explain my specific dataset and get into the problem, I'd like to clarify what answers I'm looking for: 1. Is this a flow that would be well suited to parallelizing with MapReduce? 2. If yes, would this be cost effective to run on Amazon's mapreduce module, which bills by the hour, and rounds hour's up when the job is complete? (I'm not sure exactly what counts as a "Job", so I don't know exactly how I'll be billed) 3. If no, Is there another system/pattern I should use? and Is there a library that will help me do this in python (On AWS, usign EC2 + EBS)? 4. Are there any problems you see with the way I've designed this job flow? Ok, now onto the details: The dataset consists of users who have favorite items and who follow other users. The aim is to be able to update each user's queue -- the list of items the user will see when they load the page, based on the favorite items of the users she follows. But, before I can crunch the data and update a user's queue, I need to make sure I have the most up-to-date data, which is where the API calls come in. There are two calls I can make: - - After I call for the user being updated, I need to update the favorite items for each user being followed. Only when all of the favorites are returned for all the users being followed can I start processing the queue for that original user. This flow looks like: ![Updating UserX's Queue](https://i.stack.imgur.com/9DDQP.png) Jobs in this flow include: - - - So, again, my questions are: 1. Is this a flow that would be well suited to parallelizing with MapReduce? I don't know if it would let me start the process for UserX, fetch all the related data, and come back to processing UserX's queue only after that's all done. 2. If yes, would this be cost effective to run on Amazon's mapreduce module, which bills by the hour, and rounds hour's up when the job is complete? Is there a limit on how many "threads" I can have waiting on open API requests if I use their module? 3. If no, Is there another system/pattern I should use? and Is there a library that will help me do this in python (On AWS, usign EC2 + EBS?)? 4. Are there any problems you see with the way I've designed this job flow? Thanks for reading, I'm looking forward to some discussion with you all. , in response to JimR: Thanks for a solid reply. In my reading since I wrote the original question, I've leaned away from using MapReduce. I haven't decided for sure yet how I want to build this, but I'm beginning to feel MapReduce is better for distributing / parallelizing computing load when I'm really just looking to parallelize HTTP requests. What would have been my "reduce" task, the part that takes all the fetched data and crunches it into results, isn't that computationally intensive. I'm pretty sure it's going to wind up being one big SQL query that executes for a second or two per user. So, what I'm leaning towards is: - - -
Should I learn/use MapReduce, or some other type of parallelization for this task?
CC BY-SA 2.5
0
2010-11-21T03:25:28.487
2011-01-19T19:10:11.547
2010-12-04T21:41:57.723
311,901
311,901
[ "python", "amazon-web-services", "parallel-processing", "mapreduce" ]
4,236,287
1
4,301,998
null
0
171
[jsFiddle](http://jsfiddle.net/Essy3/) I'm trying to output images and text horizontally. The text elements use the [jQuery Cycle Lite Plugin](http://jquery.malsup.com/cycle/lite/) to cycle over a list of words. As you can see in the jsFiddle above, the cycling text elements are on the page, but for some reason the positioning of the elements is messed up. Some of the text elements appear in/on the images, then there are a bunch stacked on top of each other at the end. What is causing this? I know there are some plugins, like [jQuery Masonry](http://desandro.com/resources/jquery-masonry/), that may be able to automatically position the elements, but I need to maintain the order that the HTML outputs them all. All I really need is to have the text elements interspersed with the pictures so that they are all visible, and not jumbled up and appearing on each other. Thanks for reading. EDIT: HTML ``` <script src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.lite.1.0.min.js" type="text/javascript"></script> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <span id="a"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span></span> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <span id="b"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span></span> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <span id="c"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span></span> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <a href="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" rel="temp1"><img src="http://www.andynortnik.com/gif/st-patricks-day-clipart.gif" /></a> <span id="d"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span></span> <span id="e"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span></span> <span id="f"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span></span> <span id="g"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span></span> <span id="h"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span></span> <span id="i"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span></span> <span id="j"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span></span> ``` Javascript: ``` $(document).ready(function() { $('#a').cycle(); $('#b').cycle(); $('#c').cycle(); $('#d').cycle(); $('#e').cycle(); $('#f').cycle(); $('#g').cycle(); $('#h').cycle(); $('#i').cycle(); $('#j').cycle(); }); ``` EDIT 2: Here is an image representing what I'm trying to do. The blue boxes are the images, and the red ones represent the area that I want the cycling text to appear. ![alt text](https://i.stack.imgur.com/ElWVV.jpg)
Strange positioning behaviour when using pictures and text
CC BY-SA 2.5
null
2010-11-21T03:27:33.587
2010-11-29T20:28:30.287
2010-11-29T03:28:23.177
173,634
173,634
[ "jquery", "html" ]
4,236,667
1
4,236,677
null
0
7,732
I am working in C# Windows Forms Application I want to make shadow of my form, so I have taken a image having shadow and set it as Form's Background image and also set `TransparentKey` to Form's BackColor i.e. `Control Color`, so that it will transparent the area which contains Control color and `FormBorderStyle` to `None`. My problem is that I am not getting the shadow transparent, it is of Control Color. I also want to change shape of my form ![Form Image](https://i.stack.imgur.com/69237.png)
Shadow to windows form
CC BY-SA 2.5
0
2010-11-21T06:05:21.837
2010-11-21T07:29:50.313
2010-11-21T07:23:48.330
479,468
479,468
[ "c#", ".net", "winforms", "background-image", "transparent" ]
4,236,716
1
4,237,473
null
0
196
I am newbie in Sql Server.I am trying to attach AdventureWorks database with Sql Server 2008(Window 7).following Error - ![alt text](https://i.stack.imgur.com/IpsqT.png) Can anyone tell me that how I can solve this problem? Thanks in advance.
Getting error in attach AdventuresWorks database in SQL Server (Using window 7)
CC BY-SA 2.5
null
2010-11-21T06:23:27.770
2014-05-05T01:50:30.310
null
null
214,651
[ "sql", "sql-server", "windows-7" ]
4,237,222
1
4,238,491
null
17
15,008
I cannot understand what I'm doing wrong. I want to group items in listView. In result I want to see something like that: ![enter image description here](https://i.stack.imgur.com/9zF5o.jpg) It'm using MVVM pattern. It's my XAML code. ``` <CollectionViewSource x:Key="EmploeeGroup" Source="{Binding Path=AllEmploees}"> <CollectionViewSource.GroupDescriptions> <PropertyGroupDescription PropertyName="FirstName" /> </CollectionViewSource.GroupDescriptions> </CollectionViewSource> <ListView AlternationCount="2" DataContext="{StaticResource EmploeeGroup}" ItemsSource="{Binding IsAsync=True}" Padding="0,0,0,10"> <ListView.GroupStyle> <GroupStyle> <GroupStyle.ContainerStyle> <Style TargetType="{x:Type GroupItem}"> <Setter Property="Margin" Value="0,0,0,5"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GroupItem}"> <Expander IsExpanded="True" BorderBrush="#FFA4B97F" BorderThickness="0,0,0,1"> <Expander.Header> <DockPanel> <TextBlock FontWeight="Bold" Text="Name: "/> <TextBlock FontWeight="Bold" Text="{Binding Path=FirstName}"/> </DockPanel> </Expander.Header> <Expander.Content> <ItemsPresenter /> </Expander.Content> </Expander> </ControlTemplate> </Setter.Value> </Setter> </Style> </GroupStyle.ContainerStyle> </GroupStyle> </ListView.GroupStyle> <ListView.View> <GridView> <GridViewColumn Width="150" Header="FirstName" DisplayMemberBinding="{Binding Path=FirstName}"/> <GridViewColumn Width="150" Header="LastName" DisplayMemberBinding="{Binding Path=LastName}"/> </GridView> </ListView.View> </ListView> ``` It's my ``` public class EmploeeListViewModel: ViewModelBase { readonly EmploeeRepository _emploeeRepository; private ObservableCollection<EmploeeViewModel> _allmpl; public ObservableCollection<EmploeeViewModel> AllEmploees { get { if (_allmpl == null) { _allmpl = new ObservableCollection<EmploeeViewModel>(); CreateAllEmploee(); } return _allmpl; } } public EmploeeListViewModel(EmploeeRepository emploeeRepository) { if (emploeeRepository == null) throw new ArgumentNullException("emploeeRepository"); _emploeeRepository = emploeeRepository; _emploeeRepository.EmploeeAdded += this.OnEmploeeAddedToRepository; } private void CreateAllEmploee() { List<EmploeeViewModel> all = (from emploee in _emploeeRepository.GetEmploees() select new EmploeeViewModel(emploee)).ToList(); foreach (EmploeeViewModel evm in all) { evm.PropertyChanged += this.OnEmploeeViewModelPropertyChanged; AllEmploees.Add(evm); } this.AllEmploees.CollectionChanged += this.OnCollectionChanged; } //this.OnCollectionChanged; //this.OnEmploeeViewModelPropertyChanged; } ``` ``` public class EmploeeViewModel : ViewModelBase { #region Fields Emploee _emploee; bool _isSelected; #endregion #region Constructor public EmploeeViewModel(Emploee emploee) { if (emploee == null) throw new ArgumentNullException("emploee"); this._emploee = emploee; } #endregion #region Emploee Properties public bool IsSelected { get { return _isSelected; } set { if (value == _isSelected) return; _isSelected = value; base.OnPropertyChanged("IsSelected"); } } public string FirstName { get { return _emploee.FirstName; } set { if (value == _emploee.FirstName) return; _emploee.FirstName = value; base.OnPropertyChanged("FirstName"); } } public string LastName { get { return _emploee.LastName; } set { if (value == _emploee.LastName) return; _emploee.LastName = value; base.OnPropertyChanged("LastName"); } } #endregion } ``` - - How should I change my XAML or .CS code to produce [these results](https://i.stack.imgur.com/9zF5o.jpg)?
MVVM Grouping Items in ListView
CC BY-SA 3.0
0
2010-11-21T09:39:38.537
2020-11-10T10:28:12.787
2013-08-05T19:47:56.490
719,186
398,429
[ "c#", "wpf", "listview", "mvvm" ]
4,237,318
1
null
null
2
2,320
How can Set power settings turn off: never (turn off the display= never, put the computer to sleep = never), by c# code ![enter image description here](https://i.stack.imgur.com/bwaKN.gif)
How can Set power settings turn off: never (turn off the display= never, put the computer to sleep = never), by c# code
CC BY-SA 3.0
null
2010-11-21T10:05:00.720
2015-02-26T22:03:58.867
2015-02-26T22:03:58.867
21,244
389,314
[ "c#", ".net" ]
4,237,472
1
4,238,788
null
0
264
I'm trying to debug my controller but I'm getting the error message "Unable to evaluate the expression" in my Watch window and my Locals and Autos window do not display anything at all. ![The watch window showing the error](https://i.stack.imgur.com/X4FZu.png) What is the problem here? How can get I see my variables?
Getting "Unable to evaluate the expression." while debugging my controller
CC BY-SA 2.5
null
2010-11-21T10:55:37.877
2010-11-21T16:05:22.530
null
null
1,741,868
[ "asp.net-mvc", "asp.net-mvc-3" ]
4,237,581
1
4,237,677
null
3
7,130
I had problems in some flow with unicode chars in some of my flows. So i fixed the flow and added a test. ``` assertEquals("Björk", buyingOption.getArtist()); ``` the buyingOption.getArtist() will return the same name that is on ,here is a snippet : ![alt text](https://i.stack.imgur.com/mcI87.jpg) but junit will fail with the message : ``` junit.framework.ComparisonFailure: null Expected :Bj?rk Actual :Bj?rk at com.delver.update.system.AECSystemTest.basicOperationtsTest1(AECSystemTest.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ```
Comparing unicode characters in Junit
CC BY-SA 2.5
null
2010-11-21T11:23:49.467
2013-05-17T15:58:21.193
null
null
141,321
[ "java", "unicode", "junit" ]
4,237,919
1
4,451,304
null
0
832
I am working with Crystal Report 2008 but when I export my report my report in MS Word format the Table in report does not exported as Table but each line and item in table is exported as object. ![alt text](https://i.stack.imgur.com/gYzEy.jpg) Means you can not extend the column or row size other wise it behave like this ![alt text](https://i.stack.imgur.com/oWGzh.jpg) I want to export the table like table as in MS Word Table that you can Increase or Decrease Column or Row Height or width.
Crystal Report 2008 export does not export Table correctly as table but every item & line as an object?
CC BY-SA 2.5
0
2010-11-21T12:56:14.057
2010-12-15T15:01:00.250
2010-11-22T07:13:29.593
228,755
228,755
[ ".net", "crystal-reports", "crystal-reports-2008", "crystal-reports-export" ]
4,238,166
1
4,238,262
null
2
7,857
I have a problem with a `RelativeLayout` containing two `TextView`s and a `ImageView`, that I use for displaying items in a `ListView`. The items are correctly displayed on Android 1.6, but on Android 2.2 the `TextView`s are overlapping. Here is an image that shows the correct and incorrect behavior side-by-side: ![alt text](https://i.stack.imgur.com/TaAcq.png) And here is the source code of my RelativeLayout: ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:padding="6dip"> <ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_marginRight="6dip" /> <TextView android:id="@+id/secondLine" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="marquee" android:singleLine="true" android:layout_below="@+id/firstLine" android:layout_toRightOf="@id/icon" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" /> <TextView android:id="@+id/firstLine" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold" android:ellipsize="marquee" android:singleLine="true" android:layout_toRightOf="@id/icon" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" /> </RelativeLayout> ``` Any idea what I am doing wrong? Thanks a lot, Philipp
Overlapping TextView items in RelativeLayout in 2.2; no problem in 1.6
CC BY-SA 2.5
0
2010-11-21T13:49:25.513
2010-11-21T14:14:41.970
2010-11-21T14:14:41.970
400,334
400,334
[ "android", "overlap", "android-relativelayout" ]
4,238,177
1
null
null
1
498
I have a custom TableViewCell (without Interface Builder) when I use the swipe gesture to trigger the DeleteConfirmationButton to appear and then touch it the button disappears as usual. But when I set the whole TableView in editing mode with the default edit button: ``` [self.navigationItem setRightBarButtonItem:[self editButtonItem]]; ``` and then touch the DeleteConfirmationButton it only gets dark red and don't dissapears. Any ideas? PS: Is it possible to don't show the button when using the swipe gesture (so it only is available in editing mode)? EDIT: To get an idea what I mean (I'm only using the delete button to clear the stars) ![http://dl.dropbox.com/u/940415/Screenshot%202010.11.21%2016.42.34.png](https://i.stack.imgur.com/iVXoY.png)
DeleteConfirmationButton does not disappear when using custom TableViewCell
CC BY-SA 3.0
null
2010-11-21T13:51:43.127
2015-07-11T19:56:29.830
2015-07-11T19:56:29.830
4,370,109
503,059
[ "ios", "iphone", "uitableview", "cocoa-touch", "button" ]
4,238,529
1
4,238,558
null
1
289
![alt text](https://i.stack.imgur.com/Uc1XN.png) I understood changing corner and disable navigation bar. but i need to build through in xib. Now you will get clear idea about my question. .
How can I build IB for multiple screen layer in iphone
CC BY-SA 2.5
0
2010-11-21T15:06:00.827
2010-11-22T19:06:58.077
2010-11-22T10:20:25.537
106,435
508,535
[ "iphone", "cocoa-touch", "interface-builder" ]
4,238,560
1
null
null
0
2,820
I have a video on a page and I cannot get the play list control to appear above it. I have set the z-index of the play list to 99999 but the video is still being rendered on top of it. Here is an image that shows the problem and the CSS. I have tried setting the z-index of the video to -1, 1 etc. ![image](https://i.stack.imgur.com/2Duf6.jpg) So my question is, how do I force the flash video to appear below the play list?
How to make this div go over embedded video
CC BY-SA 2.5
null
2010-11-21T15:13:12.463
2010-11-22T09:59:28.667
2010-11-21T15:27:42.583
170,224
223,863
[ "css", "flash", "z-index" ]
4,238,618
1
4,446,603
null
3
2,546
I am making a pitch detection program using fft. To get the pitch I need to find the lowest frequency that is significantly above the noise floor. All the results are in an array. Each position is for a frequency. I don't have any idea how to find the peak. I am programming in C#. Here is a screenshot of the frequency analysis in audacity. ![alt text](https://i.stack.imgur.com/epFsN.png)
How can find an peak in an array?
CC BY-SA 2.5
null
2010-11-21T15:24:16.790
2010-12-15T04:10:02.563
2010-11-21T18:02:07.513
186,964
186,964
[ "c#", "arrays", "find", "signal-processing" ]
4,238,790
1
4,240,536
null
3
2,315
I am writing an application with a listbox allowing multi-selection (SelectionMode=Multiple); the items in the lisbox are ingredients for a recipe. Unfortunately, clicking on a listbox item selects this item, which may not be desired. I would like the following scenario: - - What I did is style the ListBoxItem to include a checkbox and a ContentPresenter (like [in this blog](http://alexshed.spaces.live.com/blog/cns!71C72270309CE838!133.entry)). Still, clicking on the ingredient name selects it. So, I trap the MouseDown event on the textblock containing the ingredient name, find the underlying ListBoxItem, call Focus() on it and set the Handled property of the event to true. Now, the Listbox item has the focus but is not selected. Using the up and down keys shows that the focus was on the right item. My problem is that the user cannot see that he has clicked on the right item. The dotted rectangle is not shown on this item. Here is the result: ![alt text](https://i.stack.imgur.com/7eZ2O.png) And here is what I'd like: ![alt text](https://i.stack.imgur.com/rg7E5.png) I've tried calling private WPF methods, like KeyboardNavigation.ShowFocusVisual, I've tried sending keystrokes to the listbox (when done by a human, pressing the right cursor key or the Alt key makes the dotted rectangle appear). Any idea ?
WPF: How to programmatically give visual feedback that the keyboard focus is in a listbox?
CC BY-SA 2.5
0
2010-11-21T16:05:43.233
2012-04-13T13:15:14.990
null
null
279,404
[ "wpf", "listbox" ]
4,238,924
1
4,238,953
null
12
13,161
I want to use Google's spelling correction/suggestions in an app I'm doing. I've googled it but all I found was examples for Google's canceled SOAP API and the newly deprecated XML Web Search API. I just want to be able to send a search query and get back the suggested correction. > ![alt text](https://i.stack.imgur.com/LHG81.png) Which API can I use now? Could you give an example of its usage? Is there a C# Wrapper around it? Thanks! EDIT: The problem with Bing and Yahoo's spelling API is that they seem to check against a dictionary, so some brand/product names are not recognized, Googles seem to be based on usual spelling mistakes and pages they ended up visiting, so it can suggest spell checking for the most common things, ie: if you type > "hello word" it will say > "do you mean hello world?" even though it is spelled correctly
Accessing Google spelling/suggestion API via C#
CC BY-SA 2.5
0
2010-11-21T16:35:35.577
2014-05-15T19:35:15.377
2010-11-22T00:41:44.700
193,282
193,282
[ "c#", "api", "spell-checking" ]
4,239,205
1
4,239,554
null
18
23,750
I was wondering how to create a matrix and compute its inverse using SymPy in Python? For example, for this symbolic matrix: ![](https://i.stack.imgur.com/5utZb.png)
Inverse of a matrix in SymPy?
CC BY-SA 3.0
0
2010-11-21T17:34:56.343
2018-03-28T11:42:50.097
2018-03-28T11:42:50.097
7,851,470
156,458
[ "python", "matrix", "sympy" ]
4,239,395
1
4,239,469
null
2
1,775
[mybatis' homepage has this quote](http://www.mybatis.org/) ``` mybatis, the world's most popular sql mapping framework ``` There are only 16 questions on StackOverflow about mybatis, compared to 5,299 on hibernate. Look at Google trends. Are they completely BSing, or am I missing something (red is hibernate, blue is ibatis)? ![alt text](https://i.stack.imgur.com/4GSBL.png)
mybatis, the world's most popular sql mapping framework?
CC BY-SA 2.5
0
2010-11-21T18:10:02.103
2010-11-22T09:02:47.837
2010-11-22T09:02:47.837
11,236
11,236
[ "java", "hibernate", "orm", "mybatis" ]
4,239,706
1
4,239,816
null
1
162
I need your help, I can't find the error, it's an emergency, here is my method and a image of the error the error say "syntax error INSERT INTO statement" here is an image, how can I fix it, no matter how its the structure [http://img718.imageshack.us/img718/8864/erroruh.jpg](http://img718.imageshack.us/img718/8864/erroruh.jpg)![alt text](https://i.stack.imgur.com/bNQ45.jpg) ``` private void btnCronograma_Click(object sender, EventArgs e) { string connstring = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\amaury\\Documents\\TEC\\Septimo Semestre\\Administracion de proyectos de ingenieria de softwaere\\nuevo4\\nuevo\\Office\\Office\\Policias.accdb"; using (OleDbConnection conn = new OleDbConnection(connstring)) { conn.Open(); string sql = "INSERT INTO IndicadorProyecto (idProyecto, idMes, meta, real) VALUES(@idProyecto , @idMes , @meta, @real)"; OleDbCommand cmd = new OleDbCommand(sql, conn); foreach (DataGridViewRow row in dataGridView8.Rows) { DataGridViewComboBoxCell combo3 = row.Cells["idProyecto"] as DataGridViewComboBoxCell; DataGridViewComboBoxCell combo4 = row.Cells["idMes"] as DataGridViewComboBoxCell; if (combo3 == null || combo4 == null) { MessageBox.Show("No se pudo convertir"); continue; } int idProyecto = int.Parse(combo3.Value.ToString()); int idMes = int.Parse(combo4.Value.ToString()); int meta = int.Parse(row.Cells[3].Value.ToString()); int real = int.Parse(row.Cells[4].Value.ToString()); cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@idProyecto", idProyecto); cmd.Parameters.AddWithValue("@idMes", idMes); cmd.Parameters.AddWithValue("@meta", meta); cmd.Parameters.AddWithValue("@real", real); cmd.ExecuteNonQuery(); } } } ```
Syntax error in this method button C#?
CC BY-SA 2.5
null
2010-11-21T19:07:03.410
2010-11-21T19:37:13.817
2010-11-21T19:37:13.817
13,302
464,686
[ "c#", "ms-access", "syntax-error" ]
4,239,714
1
5,471,360
null
13
14,643
I recently converted a project from WPF 3.5 to WPF 4.0. Functionally, everything works, but the DataGrid style I was applying on top of the Aero theme has suddenly stopped working. As you can see from the before/after pictures below, my DataGrids went from having an Aero look plus bold headings, extra padding, and alternating row formats to just looking plain "Aero". Besides removing all references to the WPF Toolkit (since the DataGrid is now native to WPF 4.0), I really didn't change anything about my code/markup. ![Looks like Aero w/ bold headings, extra padding, and alternate row styles](https://i.stack.imgur.com/ncYN5.png) ![Looks like Aero w/ nothing](https://i.stack.imgur.com/JUohX.png) As I learned in [an earlier question](https://stackoverflow.com/questions/4235926/why-did-my-datagrid-styling-break-when-upgrading-from-net-3-5-w-wpf-toolkit-to), I am able to get the custom DataGrid styling to work again if I stop referencing the Aero resource dictionary, but then everything looks "Luna" on Windows XP (which is not what I want). So, how do I ensure that my app always uses the Aero theme, but still apply styling on top of that theme ? ``` <Application x:Class="TempProj.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" /> <ResourceDictionary Source="/CommonLibraryWpf;component/ResourceDictionaries/DataGridResourceDictionary.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application> ``` ``` <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style x:Key="DataGrid_ColumnHeaderStyle" TargetType="DataGridColumnHeader"> <Setter Property="FontWeight" Value="Bold" /> <Setter Property="TextBlock.TextAlignment" Value="Center" /> <Setter Property="TextBlock.TextWrapping" Value="WrapWithOverflow" /> </Style> <Style x:Key="DataGrid_CellStyle" TargetType="DataGridCell"> <Setter Property="Padding" Value="5,5,5,5" /> <Setter Property="TextBlock.TextAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="DataGridCell"> <Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}"> <ContentPresenter /> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style TargetType="DataGrid"> <Setter Property="ColumnHeaderStyle" Value="{StaticResource DataGrid_ColumnHeaderStyle}" /> <Setter Property="CellStyle" Value="{StaticResource DataGrid_CellStyle}" /> <Setter Property="Background" Value="White" /> <Setter Property="AlternatingRowBackground" Value="#F0F0F0" /> <Setter Property="VerticalGridLinesBrush" Value="LightGray" /> <Setter Property="HeadersVisibility" Value="Column" /> <Setter Property="SelectionMode" Value="Single" /> <Setter Property="SelectionUnit" Value="FullRow" /> <Setter Property="GridLinesVisibility" Value="Vertical" /> <Setter Property="AutoGenerateColumns" Value="False" /> <Setter Property="CanUserAddRows" Value="False" /> <Setter Property="CanUserDeleteRows" Value="False" /> <Setter Property="CanUserReorderColumns" Value="True" /> <Setter Property="CanUserResizeColumns" Value="True" /> <Setter Property="CanUserResizeRows" Value="False" /> <Setter Property="CanUserSortColumns" Value="True" /> <Setter Property="IsReadOnly" Value="True" /> <Setter Property="BorderBrush" Value="#DDDDDD" /> <Setter Property="HorizontalGridLinesBrush" Value="#DDDDDD" /> <Setter Property="VerticalGridLinesBrush" Value="#DDDDDD" /> </Style> <Style x:Key="DataGrid_FixedStyle" TargetType="DataGrid" BasedOn="{StaticResource {x:Type DataGrid}}"> <Setter Property="CanUserReorderColumns" Value="False" /> <Setter Property="CanUserResizeColumns" Value="False" /> <Setter Property="CanUserResizeRows" Value="False" /> <Setter Property="CanUserSortColumns" Value="False" /> </Style> </ResourceDictionary> ``` ``` <DataGrid Grid.Row="0" Grid.Column="0" Style="{StaticResource DataGrid_FixedStyle}" ItemsSource="{Binding Coordinates}"> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding X}" Header="X" /> <DataGridTextColumn Binding="{Binding Y}" Header="Y" /> <DataGridTextColumn Binding="{Binding Z}" Header="Z" /> </DataGrid.Columns> </DataGrid> ``` It just occurred to me that maybe the problem is that I'm referencing the wrong version of the Aero framework. Here's what I have now: ``` <ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" /> ``` Should this be updated to version 4.0? What is the `PublicKeyToken` for version 4 (or how do I figure this out)?
Why can't I style a control with the Aero theme applied in WPF 4.0?
CC BY-SA 2.5
0
2010-11-21T19:08:38.987
2011-04-20T02:46:11.517
2017-05-23T12:01:34.363
-1
129,164
[ ".net", "wpf", "xaml", ".net-4.0", "wpf-4.0" ]
4,239,864
1
4,239,977
null
3
156
Here's the mock-up a client asked me to create: ![alt text](https://i.stack.imgur.com/N2d8B.jpg) Here's what I have in actual software: ![alt text](https://imgur.com/mrS38.png) The problem is that I need to be able to delete a picture from the control below. I don't know how to approach this problem. Any guidance whatsoever? Here's the code to the custom user control I made: ``` using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; namespace WebServiceScanner { public partial class selectablePicture : UserControl { public selectablePicture(Image image) { InitializeComponent(); ptbImage.BackgroundImage = image; ptbImage.BackgroundImageLayout = ImageLayout.Zoom; } public Image GetImage() { return ptbImage.BackgroundImage; } public bool IsSelected() { return chkSelected.Checked; } public void DisableCheckbox() { this.chkSelected.Enabled = false; } private void ptbImage_Click(object sender, EventArgs e) { SelectControl(); ptbImage.Focus(); ToggleCheckBox(); } private void selectablePicture_Click(object sender, EventArgs e) { SelectControl(); this.Focus(); ToggleCheckBox(); } private void ToggleCheckBox() { if (!chkSelected.Enabled == false) { if (chkSelected.Checked) { chkSelected.Checked = false; } else { chkSelected.Checked = true; } } } private void chkSelected_Click(object sender, EventArgs e) { SelectControl(); chkSelected.Focus(); } private void SelectControl() { if (!chkSelected.Enabled == false) { this.BackColor = Color.FromArgb(89, 168, 248); } } private void chkSelected_Leave(object sender, EventArgs e) { DeSelectControl(); } private void ptbImage_Leave(object sender, EventArgs e) { DeSelectControl(); } private void selectablePicture_Leave(object sender, EventArgs e) { DeSelectControl(); } private void DeSelectControl() { //If none of the controls inside the usercontrol have focus, set this control to white. if (!chkSelected.Enabled == false) { if (!this.Focused && !this.ptbImage.Focused && !this.chkSelected.Focused) { this.BackColor = Color.White; } } } } } ``` And here's how I use it: ``` using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WebServiceScanner { public partial class MainForm : Form { int pictureXPosition = 0; List<selectablePicture> Images; public MainForm() { InitializeComponent(); ptbNewestPicture.BackgroundImageLayout = ImageLayout.Zoom; Images = new List<selectablePicture>(); } private void button1_Click(object sender, EventArgs e) { LoadImageFromScanner(); } private void scanToolStripMenuItem_Click(object sender, EventArgs e) { LoadImageFromScanner(); } private void scanBatchToolStripMenuItem_Click(object sender, EventArgs e) { LoadBatchImagesFromScanner(); } private void btnScanBatch_Click(object sender, EventArgs e) { LoadBatchImagesFromScanner(); } private void connectionSettingsToolStripMenuItem_Click(object sender, EventArgs e) { ShowConfigurationForm(); } private void LoadImageFromScanner() { selectablePicture picture = new selectablePicture(Image.FromFile(@"C:\Users\Public\Pictures\Sample Pictures\Penguins.jpg")); ptbNewestPicture.BackgroundImage = picture.GetImage(); picture.Location = new Point(pictureXPosition + panel1.AutoScrollPosition.X, 0); panel1.Controls.Add(picture); pictureXPosition += 130; } private void LoadBatchImagesFromScanner() { throw new NotImplementedException(); } private void ShowConfigurationForm() { ConnectionSettingsForm connectionConfig = new ConnectionSettingsForm(); connectionConfig.ShowDialog(); } private void btnDeleteSelected_Click(object sender, EventArgs e) { DeleteSelectedPictures(); } private void DeleteSelectedPictures() { foreach (Control c in panel1.Controls) { if (((selectablePicture)c).IsSelected()) { DisablePicture(c); Images.Remove((selectablePicture)c); } } } private void DisablePicture(Control c) { c.BackColor = Color.Gray; ((selectablePicture)c).DisableCheckbox(); } } } ``` I thought about maintaining a list of my user control and redrawing the entire list every time something changes, but this is no good because what happens if there are a lot of pictures? Any guidance? What steps do I need to follow if I want to able to drag and reorder pictures? Thanks!
Don't Even Know How To Begin To Tackle This Problem
CC BY-SA 2.5
null
2010-11-21T19:32:12.713
2010-11-21T20:33:18.377
2010-11-21T20:18:16.033
null
null
[ "c#", "winforms", "user-controls" ]
4,239,968
1
4,239,996
null
-2
5,893
edittted: I need your help, I can't control the exception,here is my method and the error say System.NullReferenceException: Object reference not set to an instance of an object", how can I fix it, control the exeption, no more messages of this type?, no matter how its the structure : the error is the line ** if (combo3 == null || combo4 == null) ** ![alt text](https://i.stack.imgur.com/4qAOz.jpg) ``` private void btnCronograma_Click(object sender, EventArgs e) { string connstring = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\amaury\\Documents\\TEC\\Septimo Semestre\\Administracion de proyectos de ingenieria de softwaere\\nuevo4\\nuevo\\Office\\Office\\Policias.accdb"; using (OleDbConnection conn = new OleDbConnection(connstring)) { conn.Open(); string sql = "INSERT INTO IndicadorProyecto (idProyecto, idMes, meta, real) VALUES(@idProyecto , @idMes , @meta, @real)"; OleDbCommand cmd = new OleDbCommand(sql, conn); foreach (DataGridViewRow row in dataGridView8.Rows) { DataGridViewComboBoxCell combo3 = row.Cells["idProyecto"] as DataGridViewComboBoxCell; DataGridViewComboBoxCell combo4 = row.Cells["idMes"] as DataGridViewComboBoxCell; if (combo3 == null || combo4 == null) { MessageBox.Show("No se pudo convertir"); continue; } int idProyecto = int.Parse(combo3.Value.ToString()); int idMes = int.Parse(combo4.Value.ToString()); int meta = int.Parse(row.Cells[3].Value.ToString()); int real = int.Parse(row.Cells[4].Value.ToString()); cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@idProyecto", idProyecto); cmd.Parameters.AddWithValue("@idMes", idMes); cmd.Parameters.AddWithValue("@meta", meta); cmd.Parameters.AddWithValue("@real", real); cmd.ExecuteNonQuery(); } } } ``` this is the complete error > Consulte el final de este mensaje para obtener más detalles sobre cómo invocar a la depuración Just-In-Time (JIT) en lugar de a este cuadro de diálogo.************** Texto de la excepción ************** System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto. en Office.Form1.btnCronograma_Click(Object sender, EventArgs e) en C:\Users\amaury\Documents\TEC\Septimo Semestre\Administracion de proyectos de ingenieria de softwaere\nuevo4\nuevo\Office\Office\Form1.cs:línea 726 en System.Windows.Forms.Control.OnClick(EventArgs e) en System.Windows.Forms.Button.OnClick(EventArgs e) en System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) en System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) en System.Windows.Forms.Control.WndProc(Message& m) en System.Windows.Forms.ButtonBase.WndProc(Message& m) en System.Windows.Forms.Button.WndProc(Message& m) en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Exception: System.NullReferenceException: Object reference not set to an instance of an object. in C#?
CC BY-SA 2.5
0
2010-11-21T19:49:51.063
2010-11-21T22:01:50.520
2010-11-21T21:07:20.930
464,686
464,686
[ "c#" ]
4,240,015
1
4,240,030
null
6
43,388
how can I center text on following (Sorry I'm new to CSS): ![alt text](https://i.stack.imgur.com/0TNEf.png) ``` suggestion_active { background-image: url(../images/suggestion_active.jpg); background-repeat:no-repeat; position:inherit; float:inherit; width: 100px; height: 36px; } suggestion_active_text { possition: absolute; font-family: "Lucida Grande", Tahoma; font-size: 12px; font-weight: lighter; text-align: center; color:#000; vertical-align: middle; padding:0px; } ``` ``` <suggestion_active><suggestion_active_text>1</suggestion_active_text></suggestion_active> ``` Also it would be nice if you tell me the best practices of how to do this :)
CSS text in center of background image
CC BY-SA 2.5
0
2010-11-21T19:59:09.437
2021-06-01T07:43:21.037
null
null
5,369
[ "html", "css" ]
4,240,218
1
4,240,288
null
3
1,354
This is what I'm trying to achieve ![alt text](https://i.stack.imgur.com/AuUDm.jpg) I have a fluid tooltip and a button. Their width is determined by the text and div padding. The text can vary. That said how would it be possible to vertically align them via Jquery? The reason I want to use jquery is to avoid using tables and excessive HTML. I tried the width() function but it doesn't give the exact width. I suppose one should get the padding too? Lastly, I'm terrible with numbers.. I'm not sure what formula can be used but I suspect maybe dividing both div widths by 2 and somehow centering the middles? EDIT: When clicking the button, the tooltip appears and is absolute not to interfere/push other divs. EDIT: Work in progress jsfiddle.net/Aezb6
jquery vertical align 2 divs
CC BY-SA 2.5
null
2010-11-21T20:36:16.747
2010-11-21T22:23:51.063
2010-11-21T21:54:11.283
468,312
468,312
[ "jquery", "css", "alignment" ]
4,240,416
1
4,240,672
null
7
1,185
I'm trying to figure out what's going on in the javascript of Google's live page preview. [Why aren't the links I'm adding to the DOM with Javascript clickable?](https://stackoverflow.com/questions/4239792/why-arent-the-links-im-adding-to-the-dom-with-javascript-clickable) (for a bit more context) [http://chesser.ca/2010/11/google-visual-image-search-hack-marklet/](http://chesser.ca/2010/11/google-visual-image-search-hack-marklet/) for the "latest demo" If you search on google, the results come up on page via live search. Then, if you mouseover one of the magnifying glasses in your result set, a number of things happen. 1. the mousover event for the magnifying glass fires 2. this calls an (as of yet) unknown function with unknown parameters 3. the function makes a cross-site call to google's image results query server 4. those results are stored in google's VS class memory `google.vs.ha` I've copied the code from google's library and run it through an un-minifier so it's slightly more readable. I've also installed breakpoints in the code through firebug so I can inspect the dom & memory space before during and after I load the page. My end goal is to be able to replicate the `mousover` event in code by calling the same function that is called - but - I'm stuck in trying to find the right function. (i'm sure it involves `google.vs.Ga(a, b, c)` but I'm just not quite there yet. I know this is pretty much the craziest obsession ever - but - I dunno. Maybe if you're also reading stack on a Sunday you understand :) What function is being called "On Hover" that sends out the command to get the image requests? EDIT: There are a few upvotes on this so far tho I thought I'd add a bit more background to anyone wanting to catch up in firebug, you can follow what's happening in javascript at any time. ![](https://imgur.com/fODwR.png) Is a picture of what google looks like "in memory" you can look at all of the functions and calls and the current state of variables. You can also actually access and call those variables by putting links in your bookmarks bar. for example `javascript:alert(google.base_href)` after a search will tell you the URL you're at... and it gets way more exciting from there. a huge thanks to Matt who managed to crack this in one go :) ``` <a href="javascript: (function(){ var all_divs = document.getElementsByTagName('div'); for (i=0;i < all_divs.length; i++) { if (all_divs[i].className == 'vsc') { google.vs.ea(all_divs[i]); } } })();">test all vsc</a> ```
Reverse Engineering the DOM, Javascript events & "what's going on"?
CC BY-SA 2.5
0
2010-11-21T21:18:25.397
2010-11-21T23:01:30.917
2017-05-23T11:53:32.547
-1
398,055
[ "javascript", "dom", "firebug", "reverse-engineering" ]
4,240,498
1
4,240,749
null
2
158
When I click on items at the top of the toolbar (Safari) there is a nice fading and window-changing effect. I've seen this effect in a few third-party applications as well. ![Safari Image](https://i.stack.imgur.com/V6e9W.png) I'm wondering if there is a way to "duplicate" this effect in objective-c.
Preference-apperance similar to Finder, Safari and Mail
CC BY-SA 2.5
0
2010-11-21T21:32:43.437
2010-11-21T22:24:55.683
null
null
220,935
[ "objective-c", "cocoa" ]
4,240,523
1
4,240,548
null
14
13,698
I have no idea how this option got turned off but... ![alt text](https://i.stack.imgur.com/Q4Yi3.png) ![alt text](https://i.stack.imgur.com/uvLIg.png) How do I turn this option back on so that it's showing again?
Visual Studio - Client Objects & Events drop down list missing?
CC BY-SA 2.5
null
2010-11-21T21:37:59.117
2016-11-05T21:45:21.887
null
null
47,167
[ "visual-studio-2010" ]
4,240,542
1
null
null
1
1,951
I've been trying various methods to trigger some code when returning to the first level of a UINavigationController, but none of the below work... ``` // HomeViewController.m -(void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated { NSLog(@"trigger 1"); } - (void)viewWillAppear:(BOOL)animated { NSLog(@"trigger 2"); } -(void) viewDidAppear:(BOOL)animated { NSLog(@"trigger 3"); } ``` I'm starting to think I've set up my app wrong.. is it something about having UIViewControllers within UIViewControllers? This is the nib for the app.. it's a UITabBarController with a navigation controller for each tab, and within that the first page of the UINavigationController. Is this setup the reason why the methods are not triggering? ![alt text](https://i.stack.imgur.com/xE8Rb.png) Not shown in this is a UIView at the bottom which is linked to the File Owner's view. And to make it more complicated, MainViewController is actually the flip side of a Utility-style app.
How to trigger viewWillAppear when going back in the navigation controller hierarchy?
CC BY-SA 2.5
null
2010-11-21T21:41:51.613
2010-11-22T00:22:29.697
2010-11-21T23:28:24.717
121,646
121,646
[ "iphone", "objective-c", "ios", "uinavigationcontroller", "viewwillappear" ]
4,240,853
1
4,240,904
null
1
9,882
How to find out which type of barcode is this in my sample ? I looked on wikipedia and there are quite many types of barcodes, most common should be Code 39 and Code 128. Is there any lib for barcode OCR (python, java, C#, delphi) ? ![alt text](https://i.stack.imgur.com/C5AY7.png) On this barcode should be encoded time and date of expiration. --- EDIT I need to know how to read and decode above barcode. This barcodes were generated in legacy system and It would be nice if my app could OCR and understand them On my barcode should be date 19.11.2010 15:43
How to read this barcode?
CC BY-SA 2.5
0
2010-11-21T22:44:37.620
2011-10-08T11:59:35.577
2010-11-22T11:10:42.007
423,278
423,278
[ "ocr", "barcode" ]
4,240,909
1
4,245,843
null
1
1,781
I have a widget containing two QTableViews in a horizontal layout. I would like them to resize to their preferred size (so that they don't have to show autoscrolls). I also don't want them to grow more than their preferred size and leave empty space to the right if there is any left. It should look like this: ![alt text](https://i.stack.imgur.com/BjGIM.png) I've tried to achieve it with a spacer on the right, but the views don't grow because of autoscrolls. Can you propose any solution?
Layout with two tableviews problem
CC BY-SA 2.5
0
2010-11-21T22:55:19.017
2010-11-22T17:57:54.923
null
null
46,484
[ "qt", "layout" ]
4,241,186
1
4,241,331
null
5
382
I have the following code: ``` #include <irrlicht.h> using namespace irr; using namespace core; using namespace scene; using namespace video; using namespace io; using namespace gui; int main(int argc, char** argv) { IrrlichtDevice *device = createDevice(EDT_SOFTWARE, dimension2d<unsigned int>(640, 480), 16, false, false, false, 0); device->setWindowCaption(L"Train Simulator Demo"); IVideoDriver* driver = device->getVideoDriver(); ISceneManager* smgr = device->getSceneManager(); IGUIEnvironment* guienv = device->getGUIEnvironment(); IAnimatedMesh* mesh1 = smgr->getMesh("media/simple_engine.b3d"); IAnimatedMesh* mesh2 = smgr->getMesh("media/simple_track.b3d"); IAnimatedMeshSceneNode* node1 = smgr->addAnimatedMeshSceneNode( mesh1 ); IAnimatedMeshSceneNode* node2 = smgr->addAnimatedMeshSceneNode( mesh2 ); if (node1) node1->setMaterialFlag(EMF_LIGHTING, false); if (node2) { node2->setMaterialFlag(EMF_LIGHTING, false); node2->setMaterialTexture( 0, driver->getTexture("media/grass.jpg") ); } ICameraSceneNode * pCamera = smgr->addCameraSceneNode(0, vector3df(5,0,5), vector3df(0,0,0)); pCamera->setNearValue(0.5f); pCamera->setFarValue(40.0f); while(device->run()) { driver->beginScene(true, true, SColor(0,0,0,0)); u32 cur_time = device->getTimer()->getTime(); float f_time = (float)cur_time / 1000.0f; // Change the camera pCamera->setPosition(vector3df(sinf(f_time) * 8.0f ,3.0f ,cosf(f_time) * 8.0f)); smgr->drawAll(); guienv->drawAll(); driver->endScene(); } device->drop(); return 0; } ``` ...which when run produces the following: ![alt text](https://i.stack.imgur.com/bm1CR.jpg) ...which is fine except that the grass is supposed to be a grid of 16x16 squares and it looks like some of the triangles are being clipped for some reason. It also appears that this has something to do with the triangles being only partially displayed on the screen as only the triangles that are completely within the window's viewport are being displayed. How can I fix this? Ubuntu 10.04 64-bit version: 1.7 beta
Why are triangles being clipped in this mesh?
CC BY-SA 2.5
0
2010-11-22T00:04:13.917
2015-03-03T12:41:56.677
2015-03-03T12:41:56.677
1,118,321
193,619
[ "geometry", "irrlicht", "clipped" ]
4,241,282
1
4,241,316
null
4
10,945
Ok, I have four tables: Table 1: "f_withholdings" ![alt text](https://i.stack.imgur.com/yBbP1.png) Table 2: "f_wh_list" ![alt text](https://i.stack.imgur.com/UyPd4.png) Table 3: "f_rpayments" ![alt text](https://i.stack.imgur.com/6Nh2s.png) Table 4: "f_rp_list" ![alt text](https://i.stack.imgur.com/73XOQ.png) Table 1 and Table 2 are connected with each other by `wh_id` field and Table 3 and Table 4 are connected by `rp_id` as seen in picture. I want to union select both tables into one, something like: ``` SELECT `wh_list_id`, `wh_name` AS `name`, `wh_list_date` AS `date`, `wh_list_amount` AS `amount`, `wh_list_pending` AS `pending`, `wh_list_comment` AS `comment` FROM `f_wh_list` LEFT JOIN `f_withholdings` ON `f_wh_list`.`wh_id` = `f_withholdings`.`wh_id` UNION ALL SELECT `rp_list_id`, `rp_name` AS `name`, `rp_list_date` AS `date`, `rp_list_amount` AS `amount`, `rp_list_pending` AS `pending`, `rp_list_comment` AS `comment` FROM `f_rp_list` LEFT JOIN `f_rpayments` ON `f_rp_list`.`rp_id` = `f_rpayments`.`rp_id` ``` and I get this: ![alt text](https://i.stack.imgur.com/ZLuYS.png) there is only one id field from first SELECT `wh_list_id` in result table, but no `rp_list_id` I'd like to have both ids in result table, something like below: ![alt text](https://i.stack.imgur.com/s2DG1.png) Thanks!
How to union SELECT two tables with ids of both tables?
CC BY-SA 2.5
0
2010-11-22T00:27:38.307
2010-11-22T00:48:09.267
2010-11-22T00:48:09.267
135,152
381,447
[ "sql", "mysql", "union", "union-all" ]
4,241,311
1
4,241,327
null
2
568
This bug is driving me absolutely crazy. I'm trying to filter a number of complex table rows using jQuery 1.4.4. The rows contain `<input type="button" />` elements which are styled using jQuery UI 1.8.5. This screenshot shows what the rows look like with no search filter applied. ![Correct Row layout](https://i.stack.imgur.com/OWlub.png) These rows are dynamically added via an AJAX post call and are inserted after templating. This is the JS code for the post call. ``` $.post($.url('Asset/GetSites/'), { assetType: assetType, siteType: siteType }, function (data) { //hide the progress spinner $('.progSpinner').fadeOut(); if (data.error) { ShowErrorBar(); return; } $('#SiteRowTemplate').tmpl(data).appendTo(tbody); $('#assetTable input[type=button]').button(); //tbody.hide().fadeIn(); //trigger a sort $('#assetTable').trigger('update'); $('#assetTable').trigger('sorton', [[[0, 0]]]); $('#pageLbl').text(assetTypeName + ' Assets: ' + siteTypeName); }); ``` I'm then using a basic text input to filter based on the site and the description columns. This is where the issue arises. This is the code for that: ``` var rows = $('#assetTable tbody tr.assets-site-row'); rows.each(function () { var row = $(this); var id = row.attr('id'); if (row.attr('id').toLowerCase().indexOf(val) != -1 || row.children('td').text().toLowerCase().indexOf(val) != -1) { //Search is a match row.show(); $('#details' + id).show(); } else { //Search is not a match row.hide(); $('#details' + id).hide(); } }); ``` In Chrome, IE8, Firefox, this works correctly. The rows that are not part of the search query are hidden correctly, but in IE7 things get broken. ![Failed table layout](https://i.stack.imgur.com/kEEEi.png) You can see that the jQuery UI buttons are not correctly hidden from view, for the rows that are suppose to be hidden. If I open up the developer tools and toggle the inline `diplay:none` style off and on the particular 'hidden' row, then the row hides correctly. I'm basically at my wits end with this one. Anyone have any suggestions?
Hiding <TR> in IE7, jQuery UI buttons are still visible
CC BY-SA 2.5
null
2010-11-22T00:33:17.390
2010-11-22T00:50:17.423
null
null
120,243
[ "jquery", "jquery-ui", "internet-explorer-7" ]
4,241,427
1
4,241,448
null
0
511
Please Consider the following table : ![alt text](https://i.stack.imgur.com/mfqa0.png) As you can see the `Name` column has some repeated values with is a group like I need to have a query so I can fetch just the first row of a group something like this: ![alt text](https://i.stack.imgur.com/2Q0Rg.jpg) Please take in to account that I need the fastest way because the real table is not like that and could have lots of data to be filter that way. Thanks in advance.
Grouping data in SQL Server
CC BY-SA 2.5
0
2010-11-22T01:02:32.940
2010-11-22T06:25:24.977
2010-11-22T06:25:24.977
13,302
501,373
[ "sql", "sql-server", "tsql", "sql-server-2008", "greatest-n-per-group" ]
4,241,527
1
4,241,544
null
1
404
When looking at mscorlib.dll via Object Browser in Visual Studio 2008, the IDE indicates that Int64 (as well as the other data types) has a base type of ValueType. In C#, I am aware that structs (which Int64 is) do not support object inheritance. I even checked the type metadata of an assembly in which I declared a System.Int64 property of a class, and there was no indication of Int64 extending any classes. Structs can extend interfaces, and I am aware of this. I am confused on why the struct Int64 is showing a BaseType of ValueType. Could someone please explain? d![alt text](https://i.stack.imgur.com/PUSpo.jpg)
.NET C# : Does System.Int64 have a base type of System.ValueType?
CC BY-SA 2.5
null
2010-11-22T01:30:31.623
2010-11-22T01:47:06.990
2010-11-22T01:47:06.990
366,904
175,057
[ ".net", "visual-studio", "inheritance", "types", "structure" ]
4,241,531
1
4,241,593
null
3
6,806
I would like to have several subplots in a row in a plot. However the apprearance of each subplot is narrow. How can I adjust the aspect ratio so that each subplot will become wider? Thanks!![alt text](https://i.stack.imgur.com/THlml.png) ``` par(mfrow=c(1,3)) for (i in 1:3){ dest=density(out[,i]) hist(out[,i], xlim=range(dest$x),xlab=paste("x[",i,"]"),ylab="density", main="", prob=TRUE) lines(dest,col="red") } ```
adjust aspect ratio of plot in R
CC BY-SA 2.5
0
2010-11-22T01:30:47.747
2010-11-22T10:23:33.430
null
null
156,458
[ "r" ]
4,241,660
1
4,241,892
null
0
586
I need a control like this: ![alt text](https://i.stack.imgur.com/BWtEb.png) This is from the Microsoft Word: Insert => Symbols. 1. This dialog has a grid-like control with a list of Unicode Characters; 2. You can select any character; 3. The selected character's Unicode is displayed; 4. User cannot edit the character; Besides, I need to extend it's feature: 1. User can delete the cell with the selected character; 2. User can add a list of characters (from a file or whatever). I'm asking what built-in controls I should use to implement this specific control. Thanks. Peter
How Can I Implement the Grid-like Control Using C# 2010 Express
CC BY-SA 2.5
null
2010-11-22T02:08:42.303
2010-11-22T03:06:57.963
null
null
301,336
[ "c#", "controls" ]
4,241,858
1
4,242,522
null
1
1,596
I have a nice polynomial, which is in fact the non-posted answer to [this question](https://stackoverflow.com/questions/4237694/finding-the-maximum) (I guess it is homework, so I'll post nothing until the asker shows some brain activity :D ): ``` jj = 1 + 54 #1 + 855 #1^2 + 6300 #1^3 + 37296 #1^4 + 221706 #1^5 + 385782 #1^6 + 1899783 #1^7 - 713709 #1^8 - 8772909 #1^9 + 1718343 #1^10 + 17264169 #1^11 - 3659847 #1^12 - 20026899 #1^13 + 3423276 #1^14 + 13768320 #1^15 - 1610712 #1^16 - 5314050 #1^17 + 881651 #1^18 + 1545093 #1^19 - 151263 #1^20 - 298626 #1^21 - 24552 #1^22 + 21978 #1^23 + 6594 #1^24 + 792 #1^25 + 45 #1^26 + #1^27 & ``` I want the first root. Just checking: ``` p[f_] := Plot[f[t], {t, Root[f, 1] - .003, Root[f, 1] + .003}]; p[jj] ``` ![alt text](https://i.stack.imgur.com/3F8gp.png) Seems steep but good. But look now: ``` In[394]:= N[jj[Root[jj, 1]]] Out[394]= -2.9523*10^13 ``` If I ask for some precision: ``` In[396]:= N[jj[Root[jj, 1]], 1] During evaluation of In[396]:= N::meprec: Internal precision limit $MaxExtraPrecision = 50.` reached while evaluating 1+<<11>>+<<18>>. >> Out[396]= 0.*10^-49 ``` So the question is ... How different is the precision managing in Mma when you ask for a Plot and when you ask for a numeric result?
Precision in Plots and in N[]
CC BY-SA 2.5
null
2010-11-22T02:49:02.643
2011-08-24T04:18:47.933
2017-05-23T12:13:39.697
-1
353,410
[ "wolfram-mathematica" ]
4,242,058
1
4,242,070
null
6
8,614
Any way I can know the length of the response stream so I can show the user a percentage progress of download instead of an indeterminate one? I find that the Response looks like below, non seekable and with no length ![](https://imgur.com/PEdHA.jpg)
How to know the length of Response (HttpWebRequest.GetResponse().GetResponseStream())
CC BY-SA 2.5
0
2010-11-22T03:36:53.047
2014-10-29T15:25:56.527
null
null
292,291
[ "c#", "httpwebrequest" ]
4,242,268
1
4,242,314
null
1
169
I am trying to make a really easy xml layout and I can't seem to get it to look the way I want. I attached a picture of what I want it to look like: ![alt text](https://i.stack.imgur.com/idES9.png) Basically, I have a static background image in my imagebutton at the top. Below that I have a picture the user snapped in the Photo Box. I assume I need an image view for that, but would it be possible for me to instead pass the pic to the background of an image button too so I can make the size easier to manage? Based on what the user chooses in the options before this layout, an option photo is shown based on what they select. The photo would display to the right of the centered image, if that option is selected. Below that would be a centered text view, with another separate one below that. Finally, I would have two buttons on top of each other at the very bottom. Could someone show me a good way to get this layout and also tell me if it is possible to take a picture that is snapped and make it the background of an image button - or if that is a bad idea? Thanks so much!
How do I go about making this layout? Having so much trouble
CC BY-SA 2.5
null
2010-11-22T04:24:45.480
2010-11-22T04:35:05.420
null
null
496,686
[ "android", "xml", "image", "layout", "text" ]
4,242,326
1
4,242,399
null
5
10,787
I asked [this](https://stackoverflow.com/questions/4212563/how-to-debug-large-server-side-distributed-java-application) question about how to debug server side applications and I think I was looking for [Java remote Debugging](http://www.ibm.com/developerworks/library/os-ecbug/#N101A1). I have configured my server side startup script: ``` JAVA_OPTS="-Xmx2G -server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n" ``` By this, I assume the remote java app should be available on localhost:1044 (try it first using localhost) But, what do I do next? I have configured the debug options to the class to be debugged via `Run-->Debug Configurations`. But it asks me to click Debug. But my class does not have a main() method. Say, I want to debug `getValue()` in `Methods.java`, now `getValue()` is invoked from a client (via tcp). So, how do I attach the java process to eclipse remote debugger when that method is invoked? Am I missing out on something basic about remote debugging? UPDATE: (I can see this in my debug view, that means, the remote app is connected and in the debug mode, now how do I put a breakpoint in the file where I want) ![alt text](https://i.stack.imgur.com/R7MhZ.png)
Remote debugging using Eclipse - How to set breakpoints?
CC BY-SA 2.5
0
2010-11-22T04:38:23.853
2019-03-14T03:28:48.893
2017-05-23T12:07:06.850
-1
231,917
[ "java", "eclipse", "remote-debugging" ]
4,242,350
1
4,245,020
null
6
1,052
I have created a custom control TOuterControl that is the parent for multiple TInnerControls. Everything is working fine except that the IDE is creating icons for each the child TInnerControl's (InnerControl1 and InnerControl2 in the screenshot). How do I prevent the IDE from generating the icons? ![alt text](https://i.stack.imgur.com/yhrV0.png) ``` unit TestControl; interface Procedure Register; implementation Uses Classes, Controls, SysUtils, DesignEditors, DesignIntf, VCLEditors; Type TOuterControl = Class; TInnerControl = Class(TComponent) Protected FOuterControl : TOuterControl; function GetParentComponent: TComponent; Override; Function HasParent : Boolean; Override; procedure SetParentComponent (Value: TComponent); Override; End; TOuterControl = Class(TCustomControl) Protected FInnerControls : TList; Procedure Paint; Override; Public Constructor Create(AOwner : TComponent); Override; Procedure AddInnerControl(AInnerControl : TInnerControl); procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; End; TOuterControlEditor = Class(TDefaultEditor) Public Procedure ExecuteVerb(Index : Integer); Override; Function GetVerb (Index : Integer) : String; Override; Function GetVerbCount : Integer; Override; End; procedure TOuterControl.AddInnerControl(AInnerControl: TInnerControl); begin AInnerControl.FOuterControl := Self;; FInnerControls.Add(AInnerControl); Invalidate; end; constructor TOuterControl.Create(AOwner: TComponent); begin inherited; FInnerControls := TList.Create; end; procedure TOuterControl.GetChildren(Proc: TGetChildProc; Root: TComponent); var I : Integer; begin inherited; For I := 0 To FInnerControls.Count - 1 Do Proc(FInnerControls[I]); end; procedure TOuterControl.Paint; begin inherited; Canvas.FillRect(ClientRect); Canvas.TextOut(0,0, Format('Inner Control Count = %d', [FInnerControls.Count])); end; function TInnerControl.GetParentComponent: TComponent; begin Result := FOuterControl; end; function TInnerControl.HasParent: Boolean; begin Result := True; end; procedure TInnerControl.SetParentComponent(Value: TComponent); begin If Value Is TOuterControl Then If FOuterControl <> Value Then Begin FOuterControl := TOuterControl(Value); FOuterControl.AddInnerControl(Self); End; end; procedure TOuterControlEditor.ExecuteVerb(Index: Integer); Var OuterControl : TOuterControl; InnerControl : TInnerControl; begin inherited; OuterControl := TOuterControl(Component); If Index = 0 Then Begin InnerControl := TInnerControl.Create(OuterControl.Owner); OuterControl.AddInnerControl(InnerControl); End; end; function TOuterControlEditor.GetVerb(Index: Integer): String; begin Result := 'Add Inner'; end; function TOuterControlEditor.GetVerbCount: Integer; begin Result := 1; end; Procedure Register; Begin RegisterComponents('AA', [TOuterControl]); RegisterComponentEditor(TOuterControl, TOuterControlEditor); End; Initialization Classes.RegisterClasses([TInnerControl]); end. ```
Prevent Delphi IDE creating component icons at design time
CC BY-SA 2.5
null
2010-11-22T04:41:46.147
2010-11-22T21:40:51.070
2010-11-22T05:48:23.223
4,474
4,474
[ "delphi", "custom-controls" ]
4,242,759
1
null
null
1
412
I trying to write a job monitor on Listview, I get information from `sysjob` and `sysjobhistory` tables in msdb database. How I know when job occur on list view? I don't understand about run_time column. I want to show last job on top line and show time when job occur as shown in picture (i have 2 job Fern and Same) ![alt text](https://i.stack.imgur.com/wNv0I.png) Form `sysjobhistory` show number code that I don’t know it mean such as 70000,71000 … but I want to show time as 11.00am, 10.00am... as shown in picture. I want to show info continuously follow time schedule recurring for monitoring JOB. ``` public void GetJobsAndStatus() { string sqlJobQuery = "select j.job_id, j.name, j.enabled, jh.run_status, jh.message, jh.run_date, jh.step_name, jh.run_time from sysjobs j inner join sysjobhistory jh on j.job_id = jh.job_id"; // create SQL connection and set up SQL Command for query using (SqlConnection _con = new SqlConnection("server=10.15.13.70;database=msdb;user id=sa;pwd=")) using (SqlCommand _cmd = new SqlCommand(sqlJobQuery, _con)) { try { // open connection _con.Open(); // create SQL Data Reader and grab data using (SqlDataReader rdr = _cmd.ExecuteReader()) { // as long as we get information from the reader while (rdr.Read()) { Guid jobID = rdr.GetGuid(0); // read Job_id string jobName = rdr.GetString(1); // read Job name byte jobEnabled = rdr.GetByte(2); // read Job enabled flag int jobStatus = rdr.GetInt32(3); // read run_state from jobhistory string jobMessage = rdr.GetString(4); int jobRunDate = rdr.GetInt32(5); string jobStepName = rdr.GetString(6); int jobRunTime = rdr.GetInt32(7); String[] lviData = new String[] { jobID.ToString(), jobName.ToString(), jobStepName.ToString(), jobMessage.ToString(), jobStatus.ToString(), jobRunDate.ToString(), jobRunTime.ToString(), }; ListViewItem lvi = new ListViewItem(lviData); listView1.Items.Add(lvi); } rdr.Close(); } } catch (Exception e) { MessageBox.Show(e.Message); } // close connection again _con.Close(); // return _jobs; } } ``` The result did not meet expectations such as the arrangement of the line. ![alt text](https://i.stack.imgur.com/zmPC8.png) Please suggestion how to do.(using MS Visual Studio 2008 (C#)) Thank you. And Thank you for your past help.
How i know when job occur on list view (SQL Server 2000)
CC BY-SA 2.5
null
2010-11-22T06:09:50.020
2016-07-08T05:42:21.013
2010-11-22T06:15:00.863
13,302
453,447
[ "c#", "sql-server" ]
4,242,829
1
4,242,892
null
0
965
According to [Using Rich Edit Controls](http://msdn.microsoft.com/en-us/library/bb787877%28VS.85%29.aspx) I use RichEdit in such way: ``` MyControl::OnCreate() { handle = LoadLibrary(_T("Riched20.dll")); } MyControl::OnDestroy() { FreeLibrary(handle); } ``` It works fine for win32 but recently I’ve built x64 configuration and now my control fails after the page reload. ![alt text](https://i.stack.imgur.com/DYIa4.png) I’ve noticed that if do this: ``` MyControl::OnCreate() { handle = LoadLibrary(_T("Riched20.dll")); FreeLibrary(handle); handle = LoadLibrary(_T("Riched20.dll")); } ``` everything works fine. I don't wish to put this code into production, so is there any suggestions about better solution/workaround?
Crash after the second RichEdit initialization in x64
CC BY-SA 2.5
null
2010-11-22T06:21:08.320
2010-11-22T06:41:53.217
null
null
92,957
[ "windows", "activex", "crash", "64-bit", "richedit" ]
4,242,856
1
4,243,057
null
3
540
I have a TreeView Control (that should look like this) ![alt text](https://i.stack.imgur.com/It3Zk.png) But I don't know how to populate it with my query: ``` SELECT T.TableName, C.Column_Name FROM Information_Schema.Tables T INNER JOIN Information_Schema.Columns C ON T.TableName= C.TableName WHERE T.TableName IN('BASE_TABLE', 'BASE TABLE') ORDER BY 1, C.Ordinal_Position ``` Can anyone help me please... Thanks. This is what I tried, but just the table names... ``` private void PopulateTreeView() { SqlCeCommand cmd = new SqlCeCommand(); try { using (SqlCeConnection conn = new SqlCeConnection("Data Source=" + connString)) { cmd.CommandType = CommandType.Text; cmd.CommandText = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES"; conn.Open(); cmd.Connection = conn; cmd.ExecuteNonQuery(); // Don't know what's next... } } catch (Exception x) { MessageBox.Show(x.GetBaseException().ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { cmd.Dispose(); } } ```
How to populate a TreeViewControl with hierarchy level?
CC BY-SA 3.0
null
2010-11-22T06:26:54.933
2015-05-12T16:30:44.587
2015-05-12T16:30:44.587
4,640,209
396,335
[ "c#", "winforms", "linq" ]
4,242,893
1
4,242,964
null
0
203
I have a tableView which lists the contents of the document directory. It contains files(jpg, png, mp4, pdf, sql, mp3,...) and folders(they even have subfolders too). Here is my screen shot. ![alt text](https://i.stack.imgur.com/2edjJ.png) where "SQLTutorial" in the list is a folder. Then I have a detailViewController which opens the file when selected in the tableView. Here is my screen shot. ![alt text](https://i.stack.imgur.com/eZ7YB.png) ![alt text](https://i.stack.imgur.com/Oni3t.png) ![alt text](https://i.stack.imgur.com/koJlz.png) The problem is I have no idea how to check the condition for a folder and make it list the subfolders in the next view. I am checking the conditions for pictures and videos like the following and it works. Condition for a image ``` if ([detailedViewController.strType isEqualToString:@"jpg"]) { } ``` Condition for a video ``` if ([detailedViewController.strType isEqualToString:@"mp4"]) { } ``` Condition for a pdf ``` if ([detailedViewController.strType isEqualToString:@"pdf"]) { } ``` I am checking the condition for a folder like this ``` if ([detailedViewController.strType isEqualToString:@""]) { } ``` But it does'nt works. Any idea how to make it work? Thanks in advance..
iPhone - check condition for folder
CC BY-SA 2.5
0
2010-11-22T06:33:50.543
2010-11-22T06:46:56.650
2020-06-20T09:12:55.060
-1
500,625
[ "iphone", "uitableview", "detailsview" ]
4,242,962
1
4,266,119
null
8
24,802
In the Magento default theme's page we see the following totals box towards the right mid of the screen: ![alt text](https://i.stack.imgur.com/y43sf.png) I want to modify the labels of the 5 fields in the above box, and I have been able to change the Grand Totals, by overriding the following design file: ``` /html/app/design/frontend/default/mine/template/tax/checkout/grandtotal.phtml ``` So, now it looks like this: ![alt text](https://i.stack.imgur.com/RmHX3.png) My Problem is to: Change the labels for other 3 fields in the box, and the label of a discount box that appears there if a discount applies. I have spent some time grepping through other design files, but couldn't find any. It might be some classes to override, but I haven't been able to locate them either. I am using Magento 1.4.1.1 : After turning on template path hints, following are template paths for > Subtotal: app/design/frontend//tax/checkout/subtotal.phtmlTotal: app/design/frontend//checkout/total/default.phtmlGrandTotal: app/design/frontend//tax/checkout/grandtotal.phtmlTax: app/design/frontend//tax/checkout/tax.phtml Same as for cart and the following additional one for > Shipping: app/design/frontend//tax/checkout/shipping.phtml But when one goes into these template files, no labels are found except in grandtotal.phtml. I found the solution to the problem, which I have mentioned in my own answer. This question originally asked for help on two separate problems. I posted the other one later as [another question](https://stackoverflow.com/questions/4267090/magento-have-different-set-of-fields-and-labels-for-cart-and-checkout-order-re).
Magento - Modify labels for cart and checkout (order review) screens
CC BY-SA 2.5
0
2010-11-22T06:46:28.200
2014-05-07T04:12:32.867
2017-05-23T11:53:59.063
-1
365,188
[ "magento", "e-commerce" ]
4,242,985
1
4,638,104
null
2
1,735
I am facing a strange problem. My app works fine in 2.1 (emulator + device). But, when I use 2.2 (both emulator + device) then there is an issue with the soft keyboard. There is a Activity in landscape mode in the app (use android:screenOrientation="landscape"). There are two EditText in that Activity. But, soft keyboard is not displaying for those. In fact, softkeyboard seems to apprear, but as a bar in the bottom. Please view the screenshot. ![screenshot](https://i.stack.imgur.com/56XJg.png) Any help will be appreciated. Regards Sarwar Erfan tried different things for android:windowSoftInputMode , did not work ``` <Activity android:name=".PriceCalculator" android:screenOrientation="landscape" android:windowSoftInputMode="stateAlwaysVisible|adjustPan" android:configChanges="orientation" android:label="Pricing Calculator"> .... </Activity> <EditText android:id="@+id/adhesiveUnitPrice" android:inputType="numberDecimal" android:imeOptions="actionDone|flagNoExtractUi" android:layout_column="4" android:gravity="right"/> ```
Softkeyboard not displaying in 2.2 landscape mode
CC BY-SA 2.5
0
2010-11-22T06:50:34.340
2011-03-27T14:26:25.870
2010-11-22T10:23:30.490
418,183
408,863
[ "android" ]
4,243,070
1
null
null
0
1,391
i want to get data between xml tags? how to navigate? and get values.. im using wsdl2objc from google code:[http://code.google.com/p/wsdl2objc/](http://code.google.com/p/wsdl2objc/) output soapbody follows: ![alt text](https://i.stack.imgur.com/Dz2bk.jpg) read instruction here: [http://code.google.com/p/wsdl2objc/wiki/UsageInstructions](http://code.google.com/p/wsdl2objc/wiki/UsageInstructions) my header file: #import "MService.h" how to get image source and text value???? please help me....
xml parsing iphone, objective C?
CC BY-SA 2.5
null
2010-11-22T07:05:41.087
2010-11-28T16:55:21.910
2010-11-22T10:12:39.330
106,435
505,854
[ "iphone", "cocoa-touch", "soap", "xml-parsing" ]
4,243,405
1
4,243,603
null
1
4,696
I recently started coding in C++ with Visual Studio 2010. Now I am looking for an option to warn if a function has been declared, but not defined. That option would be found in the compiler options, wouldn't it? After a quick search on Google I found this: [http://msdn.microsoft.com/en-us/library/c553zwz0.aspx](http://msdn.microsoft.com/en-us/library/c553zwz0.aspx) which is exactly what I needed... except (this may be due to me using the German version of Visual Studio) I can't find the compile tab on the Project properties. Just to make sure: We have a solution (root node in the Solution explorer) and its child nodes are the projects (am I right?) after right clicking what translates to "properties" I end up in a window called "-Properties". But that window has no tab layout. It looks like this: ![Procjectname-Properties](https://i.stack.imgur.com/0yEQ3.png) How can I fix this?
How do I configure compiler warnings in Visual Studio 2010?
CC BY-SA 3.0
null
2010-11-22T07:56:00.393
2017-05-21T19:34:06.467
2017-05-21T19:34:06.467
63,550
2,275
[ "c++", "visual-studio-2010", "warnings" ]
4,243,500
1
null
null
1
207
I'm troubleshooting an issue with the positioning of the PART_Popup section of a ComboBox in a WPF application. It aligns differently depending on what system you run it on. I don't have enough PCs available to determine the pattern behind it. Sorry for the poor images. I've requested some larger ones. You can think of the surface area of the Window like this (in pseudo): ``` <Grid> <Column> <StackPanel> <Button>Create Story</Button> <Button>Continue Story</Button> <Button>Close Story</Button> </StackPanel> </Column> <Column> <Border> <Grid> <Row> <Column><TextBlock>Story Name</TextBlock></Column> <Column><ComboBox ItemsSource="..." /></Column> </Row> <Row> <Column /> <Column><Button /></Column> </Row> </Grid> </Border> </Column> </Grid> ``` ![alt text](https://i.stack.imgur.com/jQsba.jpg) ![alt text](https://i.stack.imgur.com/MxBrc.jpg) On one PC, PART_Popup aligns to the left edge of the Control. On another PC, it aligns to the right side. The exe is identical. The ComboBox uses [this style][3] as a `{DynamicResource}`. The `ToggleButton` and `ComboBoxItem` have [these styles][4]. Responses: - - - -
Why does this ComboBox render differently on other PCs?
CC BY-SA 2.5
null
2010-11-22T08:13:32.530
2010-11-23T03:37:05.567
2010-11-23T03:37:05.567
56,998
56,998
[ "c#", "wpf", "xaml" ]
4,243,616
1
4,243,942
null
0
3,140
I'm using .NET 3.5, C#, and WinForms. My grid has lots of columns: SellerName, BuyerName, LoadType, LoadName, DriverName, CarSerialNumber, etc. I want to filter the BindingSource. I did this using ComboBoxes which is filled on DropDown with the grid cells' values, but it's not practical and makes for a bad-looking form. I need advice on what is the best way to let the user choose values of the grid and then filter with a button. Can I make it like in Excel? There is a button on the column header, and when the user presses it, it shows a little menu with a checked list box. When the user checks any values and press a button it begins filtering. Please advise me something. This is pic of Excel: ![Screenshot](https://i.stack.imgur.com/J77Ju.jpg) Thanks!
Need advice about filtering DataGrid
CC BY-SA 3.0
0
2010-11-22T08:35:06.233
2015-06-04T15:17:08.990
2015-01-28T18:25:52.087
4,220,785
508,284
[ "c#", "datagrid", "filter" ]
4,243,632
1
4,243,649
null
0
1,284
Paypal claims that customers without paypal accounts could pay with their credit cards directly, and it looks like true with the real paypal account payment interface like this: ![alt text](https://i.stack.imgur.com/bMy1d.jpg) however, when I tested with their sandbox interface, the interface looks like: ![alt text](https://i.stack.imgur.com/2Y8Po.png) it seems like the sandbox testing environment has not been upgraded yet? Or we could trust that the IPN etc.. will work the same as the new credit card processing etc..?
why paypal sandbox testing UI has no direct credit card payment method?
CC BY-SA 2.5
null
2010-11-22T08:36:49.840
2011-09-21T08:37:53.870
null
null
196,975
[ "user-interface", "paypal", "sandbox" ]
4,243,712
1
null
null
1
847
just have found strange problem in ie7 rendering (may be for previous versions else). If I have input inside td it create cell with height more then other browsers (ff, ie8, chrome). All margins are reset, paddings removed, cellcpacing to zeroes. The only possibly way to make them equivalent that I have found is specify height for all tds in pixels. But it seems to me very ugly. here is html: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <link type="text/css" href="styles/main.css" rel="Stylesheet" /> </head> <body> <br /> <table cellspacing="0" cellpadding="0" border="0" class="details-table"> <tr class="details-row"> <td> <label for="txtFirstName">First Name</label> </td> <td> <label for="txtFirstName">Last Name</label> </td> </tr> <tr class="alt-details-row"> <td> <label for="txtFirstName">First Name2</label> <input type="text" class="details-input textField" id="txtFirstName2" name="txtFirstName2" /> </td> <td> <label for="txtLastName2">Last Name2</label> <input type="text" class="details-input textField" id="txtLastName2" name="txtLastName2" /> </td> </tr> <tr class="details-row"> <td> <label for="txtFirstName3">First Name3</label> <input type="text" class="details-input textField" id="txtFirstName3" name="txtFirstName3" /> </td> <td> <label for="txtLastName3">Last Name3</label> <input type="text" class="details-input textField" id="txtLastName3" name="txtLastName3" /> </td> </tr> </table> </body> </html> ``` here is css: ``` html, body, form, table, tr, td { margin: 0; padding:0; border: 0; outline: 0; font-size: 100%; } body { font-family: Arial, Helvetica, sans-serif; font-size: 12px ; } input.textField { margin:0px; padding:0px; border: 1px solid #BFBFBF; height: 17px; font-family: Arial, Helvetica, sans-serif; font-size: 12px ; } .details-table { width:100%; color: #666 } .details-table tr.details-row, .details-table tr.details-row td { background: #ebe4bc; } ``` and here is screen shot: ![alt text](https://i.stack.imgur.com/zbpCN.jpg)
ie7 td with input extra vertical space
CC BY-SA 2.5
null
2010-11-22T08:50:59.887
2011-03-23T21:43:02.143
null
null
316,821
[ "html", "internet-explorer-7" ]
4,243,858
1
4,244,654
null
2
95
The table consists of columns calling_party and called_party and the record describes the connection between two users where one plays a role of calling party and the other is called party. The same two users can have two connections - in this case the roles calling/called party are switched when the direction is changed. In the original table (monthly_connections) I added additional columns common_neighbors and total_neighbors where the number of common and total neighbors are stored. To clarify the terms common and total_neighbors I added the following image: ![alt text](https://i.stack.imgur.com/oPXx2.jpg) In this case for the observed connection there are 2 common neighbors of calling and called party and 6 total neighbors. In order to get these two values I wrote the following stored procedure: ``` CREATE PROCEDURE [dbo].[spCountNeighbors] AS Declare @CallingParty varchar(50), @CalledParty varchar(50), @RecordsUpdated int SET @CallingParty ='a' SET @RecordsUpdated = 0 PRINT GETDATE() WHILE @CallingParty IS NOT NULL BEGIN SET @CallingParty = NULL SELECT TOP 1 @CallingParty = calling_party, @CalledParty = called_party FROM monthly_connections WHERE common_neighbors IS NULL --PRINT @CallingParty IF @CallingParty IS NOT NULL BEGIN WITH callingPartyNeighbors AS ( SELECT called_party as neighbor FROM monthly_connections WHERE calling_party = @CallingParty UNION SELECT calling_party as neighbor FROM monthly_connections WHERE called_party = @CallingParty ), calledPartyNeighbors AS ( SELECT calling_party as neighbor FROM monthly_connections WHERE called_party = @CalledParty UNION SELECT called_party as neighbor FROM monthly_connections WHERE calling_party = @CalledParty ) UPDATE mc SET common_neighbors = (SELECT COUNT (*) FROM ( SELECT neighbor FROM callingPartyNeighbors INTERSECT SELECT neighbor FROM calledPartyNeighbors ) t1 ), total_neighbors = (SELECT COUNT (*) FROM ( SELECT neighbor FROM callingPartyNeighbors UNION SELECT neighbor FROM calledPartyNeighbors ) t2 ) FROM monthly_connections mc WHERE (mc.calling_party = @CallingParty AND mc.called_party = @CalledParty) OR (mc.called_party = @CallingParty AND mc.calling_party = @CalledParty); SET @RecordsUpdated = @RecordsUpdated + @@ROWCOUNT PRINT @RecordsUpdated END END PRINT @RecordsUpdated ``` The procedure above is supposed to go through the table of connections which contains 23M connections and update values common_neighbors and total_neighbors for each row. The problem however is that the procedure is too slow - it took 212 s to update 1000 records. I would really appreciate if anyone of you suggested any fix for the procedure above in order to speed up the execution time. Thank you!
Any suggestion for optimizing the following query which counts common and all neighbors?
CC BY-SA 2.5
null
2010-11-22T09:14:00.140
2010-11-22T10:53:59.067
null
null
22,996
[ "sql", "sql-server-2008" ]
4,243,894
1
null
null
53
131,298
Why when i use SimpleCursorAdapter for ListView i have items height in ListView like this - ![listview image](https://i.stack.imgur.com/tS8xS.jpg) (My code based on [this](https://stackoverflow.com/questions/2982948/sqlite-and-populating-list-view-android)) ![listview big](https://i.stack.imgur.com/tSrYu.png) (I learn listview based on [this](http://androidpeople.com/android-listview-example/)) Row layout for item listview is ``` <?xml version="1.0" encoding="utf-8"?> <TextView android:id="@+id/text1" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"/> ```
android listview item height
CC BY-SA 3.0
0
2010-11-22T09:19:37.273
2016-07-19T17:02:41.113
2017-05-23T12:34:28.393
-1
515,837
[ "android", "listview", "row", "android-arrayadapter", "simplecursoradapter" ]
4,244,126
1
null
null
1
252
In a WPF control I have a hosted WinFormUserControl control via a WindowsFormsHost Now, in the WPF control code I do: ``` void ShowWinFormUserControl() { ... windowsFormsHost1.Visibility = System.Windows.Visibility.Visible; bool success; success = windowsFormsHost1.Focus(); // true success = windowsFormsHost1.Child.Focus(); // false success = windowsFormsHost1.Child.CanFocus; // false windowsFormsHost1.Select(); // any effect if first display // _arretSelection is the windowsFormsHost1.Child this._arretSelection.Select(); // any effect if first display ... } ``` Why? How do I force focus on the WinFormsHost child? Difference between the situation when the windowsFormsHost is still hidden ![alt text](https://i.stack.imgur.com/EEhrz.jpg) or already visible ![alt text](https://i.stack.imgur.com/dmXYU.jpg)
WindowsFormsHost1.Child.Can't Focus
CC BY-SA 2.5
null
2010-11-22T09:51:16.803
2011-05-30T02:31:29.863
2010-11-22T10:21:14.647
185,593
185,593
[ ".net", "wpf", "winforms" ]
4,244,150
1
4,244,231
null
3
7,358
I would like to have this tab animate when hovered over Before:![before](https://i.stack.imgur.com/SPHoN.png) On hover:![after](https://i.stack.imgur.com/Bh4ME.png) How do I go about this with jquery? ``` <div class="recruiterLink"> <a href="http://mydomain.com/recruiter/"> <span>Recruiting?</span> <br> Advertise a vacancy » </a> </div> ``` Thanks!
How do I make this tab animate up with jquery?
CC BY-SA 2.5
0
2010-11-22T09:53:56.377
2010-11-22T11:23:06.223
2010-11-22T11:23:06.223
437,806
437,806
[ "jquery", "hover", "jquery-animate" ]
4,244,157
1
35,865,764
null
27
36,570
``` library(ggplot2) orderX <- c("A" = 1, "B" = 2, "C" = 3) y <- rnorm(20) x <- as.character(1:20) group <- c(rep("A", 5), rep("B", 7), rep("C", 5), rep("A", 3)) df <- data.frame(x, y, group) df$lvls <- as.numeric(orderX[df$group]) ggplot(data = df, aes(x=reorder(df$x, df$lvls), y=y)) + geom_point(aes(colour = group)) + geom_line(stat = "hline", yintercept = "mean", aes(colour = group)) ``` I want to create a graph like this: ![graph with averages for each group](https://i.stack.imgur.com/e20c9.png) This does work, when I do not need to reorder the values of X, however, when I do use reorder, it doesn't work anymore.
ggplot2: add line for average per group
CC BY-SA 2.5
0
2010-11-22T09:54:21.343
2016-03-08T11:29:06.897
2010-11-22T13:01:29.153
392,445
392,445
[ "r", "ggplot2" ]
4,244,328
1
null
null
2
8,043
I am trying to get a rectangle box with an arrow on hover the links. ``` <a href="//">NAME</a> ``` on hover this i am trying to get a rectangle box with an arrow . For example like what we have in Facebook on hover of the Username we will be getting a rectangle box with contents inside it. How to apply Css for this one ? ![alt text](https://i.stack.imgur.com/rZHJV.png)
Getting a Rectangle box with arrow on hover the link in CSS
CC BY-SA 2.5
0
2010-11-22T10:15:02.037
2010-11-22T11:58:49.030
2010-11-22T10:56:31.470
79,980
79,980
[ "html", "css" ]
4,244,898
1
4,246,551
null
11
6,967
: [http://www.legodata.com/kc/kc.html](http://www.legodata.com/kc/kc.html) I've got a border display issue with jScrollPane, would you know which css rule to use to remove this border? when clicking inside it, it displays a blue border around the jScrollPane div, it disappears (sometimes) when clicking outside the jScrollPane div. It looks like this: ![alt text](https://i.stack.imgur.com/gKaiT.png) Here is the current CSS: ``` background-color: transparent; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; bottom: auto; color: #999E92; display: block; float: right; font-family: VerdanaArial, Helvetica, sans-serif; font-size: 16px; height: 802px; left: auto; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: hidden; overflow-y: hidden; position: relative; right: auto; top: auto; visibility: visible; width: 200px; z-index: 1; ``` I can reproduce this issue in Chromium and Safari (not tested in other places).
Blue border on jScrollPane div
CC BY-SA 2.5
0
2010-11-22T11:23:56.880
2012-01-23T21:01:30.557
2010-11-22T11:37:40.513
16,974
16,974
[ "jquery", "css", "webkit", "jscrollpane" ]
4,244,909
1
4,245,315
null
15
3,516
When entering an invalid email in Mail's one get's this (a and ): ![alt text](https://i.stack.imgur.com/RtiPo.png) Is there any recommendable way to accomplish this? Is NSTokenField even the right tool for this? Or would I be abusing it? In this particular project I need to allow the user to enter a file name pattern , with support for predefined tokens. Right now I'm requiring the input to be entered like this: ``` Glue Text %[Tag]Other Glue Text%[Another Tag]More Text ``` I'd like to change this to some fool-proof graphical solution like this: ![alt text](https://i.stack.imgur.com/Pb2EI.png) NSTokenField always(!) turns entered text into tokens. Either I'm using the wrong keywords in my web searches, or I'm really the first to need this (mixed) behaviour?! I did read thru Apple's NSTokenField Guide, but couldn't find any info on my problem.
NSTokenField with mixed token/string input, possible?
CC BY-SA 2.5
0
2010-11-22T11:25:35.647
2011-05-19T14:43:47.433
null
null
227,536
[ "objective-c", "cocoa", "nstokenfield" ]
4,245,015
1
4,246,797
null
0
4,292
I wanted to find out the names of the cells user selected in excel sheet. Check out the below image for clarity. In the sample, i need to retrieve all the cell names (A1,B1,C1,D1,E1,F1) using VBA macro. ![alt text](https://i.stack.imgur.com/KgxeX.jpg) I am able to find out how many cells selected, But dont know how to retrieve their names.
How to find out the cell names on range selection using VBA
CC BY-SA 2.5
null
2010-11-22T11:40:04.900
2015-02-23T19:24:41.150
2015-02-23T19:24:41.150
3,204,551
97,572
[ "excel", "vba" ]
4,245,510
1
4,245,742
null
0
530
We are using the dotNETCHARTING to portray our charts, they accepts `Series` for their `SeriesCollection`. This is a new chart I'm working on, all the previous ones have a 1:1 relation between value shown and value extracted. Now I have a list of values to show as a list of values 12:12. I currently have my 2 lists of data showing (Actual vs Budgetted over the past 12 months) - but in a single `Series`, where they should be 2 `Series`. I have the data sorted and listed as needed, well almost listed right. Restrictions: .NET 3.5 (VS2008), dotNETCHARTING. It will be a very sad solution if I had to create 12 SQLs for each month and 12 for the budgetted. From what I see that is not necessary, as soon as I find a way to seperate each list into seperate `Series`. Each Module has a `List<ModuleValue>`, I have tried with a `Dictionary<int, List<ModuleValue>>` so that each series of values (12months) could have a seperate List. I have tried the For each list of Values, add each value in the list to a `Series`, repeat until out of List of values. (`Foreach` in a `Foreach`) My question is: Can anyone give me some pointers to a possible solution. Graph below is per say correct, if there weren't lined up one after the other, but started and ended at the same timeframe (month). Eg budget for Jan compares to actual for Jan. I'm not asking about the dotNETCHARTING module, they have plenty of help. I'm asking for this mid-between and how it feeds the data to the module. Main logic body: This logic is the old logic, should remain as is - because all the other charts rely on it. Can be used as a point of reference. Consider this logic locked. This is the new Logic and should be changed to reflect the desired logic. Consider this as free as can be. ![alt text](https://i.stack.imgur.com/e43sv.jpg) This is how it shouldn't be, listing data in a sequal line. Though it shows it has all the required data. I'd appreciate anything you could add. Thank you.
I need to move from One Series to Two Series
CC BY-SA 2.5
null
2010-11-22T12:44:48.783
2010-11-22T13:20:32.133
2010-11-22T13:20:32.133
455,900
185,084
[ "c#", ".net", "charts", "logic" ]
4,245,945
1
4,324,651
null
0
1,127
i am doing work on an app like MS Outlook Calender where user can put events etc. i am having problem with event object layout according to size etc. as user can drag and re size the event object in MS outlook calender and the size of event objects sets automatically. i need the algorithm for doing so i have write my own but there are several problems help needed. this screen shot will show the event object arrangement that is dynamic.![alt text](https://i.stack.imgur.com/qoayD.jpg)
help needed for making a calendar like MS Outlook?
CC BY-SA 2.5
null
2010-11-22T13:36:34.240
2015-01-21T12:19:30.100
2010-11-26T18:00:44.743
118,587
233,572
[ "layout", "calendar" ]
4,245,946
1
64,192,327
null
5
2,584
Is there any way of abstracting the vertex order that GraphPlot applies to VertexCoordinate Rules from the (FullForm or InputForm) of the graphic produced by GraphPlot? I do not want to use the GraphUtilities function VertexList. I am also aware of GraphCoordinates, but both of these functions work with the graph, NOT the graphics output of GraphPlot. For example, ``` gr1 = {1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 1}; gp1 = GraphPlot[gr1, Method -> "CircularEmbedding", VertexLabeling -> True]; Last@(gp1 /. Graphics[Annotation[x___], ___] :> {x}) ``` gives the following list of six coordinate pairs: VertexCoordinateRules -> {{2., 0.866025}, {1.5, 1.73205}, {0.5, 1.73205}, {0., 0.866025}, {0.5, 1.3469*10^-10}, {1.5, 0.}} How do I know which rule applies to which vertex, and can I be certain that this is the same as that given by VertexList[gr1]? For example ``` Needs["GraphUtilities`"]; gr2 = SparseArray@ Map[# -> 1 &, EdgeList[{2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6}]]; VertexList[gr2] ``` gives {1, 2, 3, 4, 5} But .... ``` gp2 = GraphPlot[gr2, VertexLabeling -> True, VertexCoordinateRules -> Thread[VertexList[gr1] -> Last@(gp1 /. Graphics[Annotation[x___], ___] :> {x})[[2]]]]; Last@(gp2 /. Graphics[Annotation[x___], ___] :> {x}) ``` gives SIX coordinate sets: VertexCoordinateRules -> {{2., 0.866025}, {1.5, 1.73205}, {0.5, 1.73205}, {0., 0.866025}, {0.5, 1.3469*10^-10}, {1.5, 0.}} How can I abstract the correct VertexList for VertexCoordinateRules for gr2, for example? (I am aware that I can correct things by taking the VertexList after generating gr2 as follows, for example) ``` VertexList@ SparseArray[ Map[# -> 1 &, EdgeList[{2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6}]], {6, 6}] ``` {1, 2, 3, 4, 5, 6} but the information I need appears to be present in the GraphPlot graphic: how can I obtain it? (The reason I convert the graph to an adjacency matrix it that, as pointed out by Carl Woll of Wolfram, it allows me to include an 'orphan' node, as in gp2) ![alt text](https://i.stack.imgur.com/KKNga.gif)
VertexCoordinate Rules and VertexList from GraphPlot Graphic
CC BY-SA 2.5
0
2010-11-22T13:36:52.020
2020-10-04T07:56:48.120
2010-11-23T00:32:06.243
499,167
499,167
[ "wolfram-mathematica" ]
4,246,038
1
4,248,572
null
1
1,339
With [this](http://graphics.cs.msu.ru/ru/science/research/calibration/cpp) toolbox I was performing calibration of my camera. However the toolbox outputs results in matrix form, and being a noob I don't really understand mathy stuff. The matrix is in the following form. ![alt text](https://i.stack.imgur.com/G0EdD.png) Where R is a rotation matrix, T is a translation vector. And these are the results I got from the toolbox. It outputs values in pixels. ``` -0.980755 -0.136184 -0.139905 217.653207 0.148552 -0.055504 -0.987346 995.948880 0.126695 -0.989128 0.074666 371.963957 0.000000 0.000000 0.000000 1.000000 ``` Using this data can I know how much my camera is rotated and distance of it from the calibration object?
Camera Calibration Matrix how to?
CC BY-SA 2.5
0
2010-11-22T13:47:05.323
2010-11-23T04:16:38.787
null
null
142,299
[ "language-agnostic", "math", "matrix", "camera", "camera-calibration" ]
4,246,184
1
4,246,259
null
1
106
what view is this in android, I have seen this in iphone can any one help![alt text](https://i.stack.imgur.com/Bx4kz.png) the one shown in bottom near footer ![alt text](https://i.stack.imgur.com/w7pP3.png)
what view is this in android, I have seen this in iphone can any one help
CC BY-SA 2.5
null
2010-11-22T14:03:45.707
2010-11-22T14:14:32.257
null
null
392,574
[ "android" ]
4,246,932
1
4,247,811
null
3
398
I have two monitors. I am seeing some strange behaviour when I access the MenuStrip of my C# application near the edge of my left monitor. Case 1: In this screenshot I have opened SubMenu1 when the window is fairly close to the edge of my left monitor. SubMenu2 shows up on the leftmost edge of my right monitor. ![Gap](https://i.stack.imgur.com/caUtr.jpg) Case 2: I then move my application a few pixels to the left and now SubMenu2 appears to the left of SubMenu1. ![No Gap](https://i.stack.imgur.com/iCDi6.jpg) In my opinion, Case 2 looks much nicer. Is there any way to force C# to always show the menu like in Case 2?
C# Control menu position across multiple monitors
CC BY-SA 2.5
0
2010-11-22T15:21:58.503
2010-11-22T16:41:40.373
null
null
325,129
[ "c#", "menu", "multiple-monitors" ]
4,247,127
1
4,247,383
null
0
483
Hello How Can I make a login view easily like this? It seems username and password are both in a table? Also I see some system preferences editing uses this kind of label+textfield thing. Can someone tell me whether I can directly use some views in the lib, or I have to build the view on my own I mean the username password part in the pic, not the whole window, not including the tool bar, etc. thanks ![alt text](https://i.stack.imgur.com/WozXr.png)
ipad - how can I make a Login dialog easily ? such as this one?
CC BY-SA 2.5
null
2010-11-22T15:37:43.223
2010-11-22T15:59:50.747
null
null
213,076
[ "ipad", "uiview", "authentication" ]
4,248,102
1
4,248,294
null
2
7,749
i had used this plugin before, but now when i want to use it for another project it simply does not work, where am i going wrong. here is the code i am using in my root index.php file ``` <html> <head> <link href="/uploadify/uploadify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="/uploadify/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="/uploadify/swfobject.js"></script> <script type="text/javascript" src="/uploadify/jquery.uploadify.v2.1.4.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#file_upload').uploadify({ 'uploader' : '/uploadify/uploadify.swf', 'script' : '/uploadify/uploadify.php', 'cancelImg' : '/uploadify/cancel.png', 'folder' : '/uploads', 'auto' : true }); }); </script> </head> <body> <input id="file_upload" name="file_upload" type="file" /> </body> </html> ``` and as per the instruction i have put the following file in the uploadify folder in root directory here is the screenshot of theuploadify directory. ![alt text](https://i.stack.imgur.com/Ko20i.png) where am i going wrong? in case you want to check the documentation of the plugin here is the path. [http://www.uploadify.com/documentation/](http://www.uploadify.com/documentation/)
why is uploadify (jQuery Plugin) not working ? what is wrong with my code?
CC BY-SA 2.5
null
2010-11-22T17:11:39.487
2011-01-03T12:36:41.467
null
null
396,476
[ "jquery", "file-upload", "uploadify" ]
4,248,593
1
4,248,654
null
0
137
I have a complex regex I want to apply. Here is my pattern: ``` /(?:^|\s|[\.(\+\-\,])(?:\$?)\$((?:[0-9]+(?=[a-z])|(?![0-9\.\:\_\-]))(?:[a-z0-9]|[\_\.\-\:](?![\.\_\.\-\:]))*[a-z0-9]+)/i ``` How can I declare this as a String and make sure everything is escaped?
How can I escape this string properly?
CC BY-SA 2.5
null
2010-11-22T18:00:54.507
2010-11-22T18:07:04.080
null
null
19,875
[ "java", "regex", "string" ]
4,248,889
1
4,281,318
null
4
4,864
I have the following table in an application I am developing using ruby on rails: ![alt text](https://i.stack.imgur.com/npv6u.png) I want to create a test in cucumber where I select a user from the table and delete it or edit it. I don't know what is the step definition for that. I'd like to be able to do something like: ``` Feature: User Manegement In order to manage users As an admin I want to see a users list and change user properties Background: Given the following activated users exists | name | email | | Alice Hunter | [email protected] | | Bob Hunter | [email protected] | And the following user records | name | email | | Jonh Doe | [email protected] | Scenario: I delete a user from the table Given I am logged in as admin When I follow "Administration" And I follow "User Management" And I delete "Alice Hunter" Then I should not see "Alice Hunter"` ``` Can anyone help? Thank you. @brad The error returned: ``` wrong number of arguments (2 for 1) (ArgumentError) ./features/step_definitions/table_steps.rb:26:in `within' ./features/step_definitions/table_steps.rb:26:in `/^I delete "(.*)"$/' ``` --- ---
Cucumber: selecting an element from a table for deletion or addition
CC BY-SA 2.5
0
2010-11-22T18:30:31.863
2011-10-01T06:24:00.343
2011-02-18T11:07:22.597
16,784
166,789
[ "ruby-on-rails", "cucumber", "webrat" ]
4,249,181
1
4,249,439
null
1
173
I need to manipulate an image such that a sub-rectangle of it is flipped or rotated relative to the rest of the image. Here's an example: ![alt text](https://i.stack.imgur.com/JBJxt.jpg) This manipulation needs to happen many times, each time producing a new modified image from the original (rather than applying successive modifications to one image). The size of the sub-rectangle needs to vary systematically (perhaps in 5% increments from 10% to 75%) and the location of the sub-rectangle needs to vary randomly. Lastly, this procedure needs to be carried out on a large number of images. My options are PHP, C#, or batching in Gimp. That said, I'm prepared to learn something new if there's a particularly sensible approach.
How would I perform many random operations to a set of images?
CC BY-SA 2.5
null
2010-11-22T19:03:06.570
2010-11-22T20:25:28.097
null
null
50,151
[ "c#", "php", "image-manipulation", "batch-processing", "gimp" ]
4,249,454
1
4,249,481
null
0
159
I have the following database schema (Microsoft SQL Server Compact Edition): ![alt text](https://i.stack.imgur.com/fdixd.png) How can I select a customer record or customer records, with an additional field containing the total book value of all vehicles owned by the customer? I tried something like: `SELECT Customers.ID, Customers.FirstName, ..., SUM(Receipts.BookValue) FROM Customers INNER JOIN Vehicles ON Vehicles.CustomerID = Customers.ID INNER JOIN Receipts ON Receipts.VehicleID = Vehicles.ID;` but was unsuccessful. I'm thinking I might need a GROUP BY or something?
Select the total book value of all vehicles for a customer (SQL)
CC BY-SA 2.5
null
2010-11-22T19:35:20.973
2010-11-22T19:45:12.687
null
null
343,845
[ "sql", "sql-server", "sql-server-ce" ]
4,249,502
1
7,586,948
null
5
1,187
Ok, I would have thought this was a simple question, but apparently it's got me confused. When I try to set the height of my RibbonComboBox, it's not moving actual size of it, just the box that surrounds it. ![alt text](https://i.stack.imgur.com/iAZDJ.jpg) Here is my XAML: ``` <ribbon:RibbonComboBox DisplayMemberPath="CompanyCode" Height="22" Margin="0,0,0,-30" VerticalAlignment="Bottom" Width="102"> <ribbon:RibbonGallery SelectedValue="{Binding Path=Companies.SelectedItem, ValidatesOnDataErrors=true, NotifyOnValidationError=true }"> <ribbon:RibbonGalleryCategory ItemsSource="{Binding Path=Companies.Items, NotifyOnValidationError=true, ValidatesOnDataErrors=true}" /> </ribbon:RibbonGallery> </ribbon:RibbonComboBox> ``` I can change the height to 200 or 1 but the height never changes. What am I doing wrong? Thanks, Eroc
WPF RibbonComboBox Height
CC BY-SA 3.0
0
2010-11-22T19:39:23.623
2012-12-12T18:11:50.807
2012-10-28T14:35:22.917
1,696,979
302,613
[ "wpf", "xaml", "ribbon", "ribbon-control", "visualtreehelper" ]
4,249,648
1
4,249,711
null
173
259,167
I was hoping to craft a control where a user could click inside a div, then drag the mouse, then let up on the mouse in order to indicate how long they want something to be. (This is for a calendar control, so the user will be indicating the length, in time, of a certain event) It looks like the best way to do this would be to register a "mousedown" event on the parent div that in turn registers a "mousemove" event on the div until a "mouseup" event is triggered. The "mousedown" and "mouseup" events will define the start and end of the time range and as I follow "mousemove" events, I can dynamically change the size of the range so that the user can see what they are doing. I based this off of how events are created in google calendar. The issue I'm having is that the jQuery event seems to only provide reliable mouse coordinate information in reference to the whole page. Is there any way to discern what the coordinates are in reference to the parent element? Heres a picture of what I'm trying to do: ![alt text](https://i.stack.imgur.com/geTtf.gif)
jQuery get mouse position within an element
CC BY-SA 3.0
0
2010-11-22T19:58:04.607
2018-03-14T16:49:44.263
2013-12-27T21:48:25.133
5,640
84,131
[ "jquery", "mouseevent" ]
4,251,180
1
4,268,250
null
1
3,629
I have a form with dynamically added fields (varying sizes). I would like to put a number of form fields in a fieldset, and have the fieldset border just large enough to contain all the fields. Here is an (ugly) example that shows the issue: ``` var win = new Ext.Window({ xtype: 'form', layout: 'form', height: 200, width: 500, title: 'Testing', items: [{ xtype: 'fieldset', layout: 'hbox', autoHeight:true, autoWidth: false, title: 'Fieldset', defaults: { border: false, layout: 'form', labelAlign: 'top', labelSeparator: '' }, items: [{ items: new Ext.form.TextField({ fieldLabel: 'Col1', name: 'col1', value: 'nothing', }) }, { items: new Ext.form.TextField({ fieldLabel: 'Col2', name: 'col2', value: 'something' }) }] }, new Ext.form.TextField({ fieldLabel: 'Col3', name: 'col3', value: 'anything' }) ] }).show(); ``` This is what it looks like: ![alt text](https://i.stack.imgur.com/lF7O2.jpg) Thanks for any suggestions.
How can I get this fieldset border to wrap tightly around it's contents
CC BY-SA 2.5
0
2010-11-22T23:13:44.697
2010-11-24T15:08:46.050
null
null
429,982
[ "extjs", "fieldset" ]
4,251,294
1
4,272,932
null
5
4,414
Using `ggplot()`, I am trying to plot the results of an ANCOVA in which slopes of the two linear components are equal: i.e., `lm(y ~ x + A)`. The default behavior for `geom_smooth(method = "lm")` is to plot separate slopes and intercepts for each level of each factor. For example, with two levels of `A` ``` library(ggplot2) set.seed(1234) n <- 20 x1 <- rnorm(n); x2 <- rnorm(n) y1 <- 2 * x1 + rnorm(n) y2 <- 3 * x2 + (2 + rnorm(n)) A <- as.factor(rep(c(1, 2), each = n)) df <- data.frame(x = c(x1, x2), y = c(y1, y2), A = A) p <- ggplot(df, aes(x = x, y = y, color = A)) p + geom_point() + geom_smooth(method = "lm") ``` ![Default ggplot()](https://i.stack.imgur.com/6ul8y.png) I can fit the ANCOVA separately with `lm()` and then use `geom_abline()` to manually add the lines. This approach has a couple of drawbacks like having the lines extend beyond the range of the data and manually specify the colors. ``` fm <- lm(y ~ x + A, data = df) summary(fm) a1 <- coef(fm)[1] b <- coef(fm)[2] a2 <- a1 + coef(fm)[3] p + geom_point() + geom_abline(intercept = a1, slope = b) + geom_abline(intercept = a2, slope = b) ``` ![With geom_abline()](https://i.stack.imgur.com/OUhjy.png) I know `ancova()` in the HH package automates the plotting, but I don't really care for lattice graphics. So I am looking for a `ggplot()`-centric solution. ``` library(HH) ancova(y ~ x + A, data = df) ``` Is there a method to accomplish this using `ggplot()`? For this example, `A` has two levels, but I have situations with 3, 4, or more levels. The `formula` argument to `geom_smooth()` doesn't seem to have the answer (as far as I can tell).
Constraining slope in stat_smooth with ggplot (plotting ANCOVA)
CC BY-SA 2.5
0
2010-11-22T23:28:33.920
2010-11-25T01:09:10.323
null
null
168,137
[ "r", "plot", "ggplot2" ]
4,251,790
1
4,252,044
null
27
9,971
I'm using NSOutlineView for a project, and can't seem to figure out two things: - ![alt text](https://i.stack.imgur.com/1ZZYV.png) Is there some sort of NSOutlineView Delegate method that is used for this? Or does it require a subclass? -
NSOutlineView: remove disclosure triangle and indent
CC BY-SA 2.5
0
2010-11-23T01:05:32.517
2020-07-23T14:57:10.963
null
null
153,112
[ "objective-c", "cocoa", "nsoutlineview", "nstreecontroller" ]
4,251,796
1
4,271,819
null
2
182
I'm trying to create an interactive 3d representation of cells that are defined by the intersection of arbitrary surfaces. I'm having a hard time figuring out how to create a mesh from this (or is there something better than a mesh that I should be aiming for to represent 3d volumes?). Each surface s is given by an analytical expression for a plane, sphere, cylinder, cone, etc. as s = f(x,y,z) = 0, such as those here: ![enter image description here](https://i.stack.imgur.com/Oz7qj.png) For each cell I have a list of surfaces and a +/- sense for each surface. With this it's easy to determine if an x,y,z point lies inside the cell by plugging that point into the equation for each of the bounding surfaces, and if the result is + for all + surfaces and - for all - surfaces the point lies inside. Obviously if the result is zero for any surface then the point lies on that surface. I can test thousands of grid points, noting for each cell those points that lie inside that cell and then using the outer-most of those points to create a mesh for that cell. However, I have thousands of cells and this simply wouldn't be fast enough. Many cells are very small or low aspect ratio compared to others, so I would need a very fine grid of points if I was going to do it this way. Can anyone suggest an efficient way of putting cells defined in this way into a static 3d model? Is there any sort of library that works with this kind of geometry specification that can build 3d meshes for me? Am I missing something obvious? Thanks, Nick
modelling 3d cells defined by intersections of surfaces
CC BY-SA 3.0
0
2010-11-23T01:06:23.180
2014-06-19T23:11:41.963
2014-06-19T23:11:41.963
64,046
516,837
[ "3d", "intersection", "modeling", "mesh", "geometry-surface" ]
4,252,110
1
null
null
2
872
It seems like we've done a bit of merge "spaghetti" with git. ![alt text](https://i.stack.imgur.com/dGIlh.png) We are new to this and would basically like to have the following branches ``` Master A - B - C __// Core / A - B - C - D - E - F | iPhone A - B - C ``` But it seems like at some point we merged master into core, then core back to master, then master back to core .. not sure what / how / why did this happen .. but I would love some help to put this back on track without messing around too much ! Any help is appreciated.
Git merge Spaghetti - How to fix it?
CC BY-SA 2.5
null
2010-11-23T02:11:24.307
2010-11-23T02:59:35.203
2010-11-23T02:41:44.503
390,944
390,944
[ "git" ]
4,252,586
1
4,277,055
null
13
3,983
XCode 3.2.5 Organizer hanged when I try to "Use for Development" a Touch (2nd Generation), for over 30 mins: ![alt text](https://i.stack.imgur.com/rWmxH.png) If I try to quit, it shows a warning: ![alt text](https://i.stack.imgur.com/FJkix.png) How can I fix it?
How to fix Xcode Organizer hanged at "Installing team provisioning profile"?
CC BY-SA 4.0
0
2010-11-23T03:46:53.243
2019-02-11T23:49:57.580
2019-02-11T23:49:57.580
513,951
88,597
[ "iphone", "xcode" ]
4,252,733
1
null
null
6
1,813
I have nested tables within a table that has the tablesorter applied to it. It adds sort headers to the nested tables, but they don't sort the rows and a Javascript error is thrown. ![alt text](https://i.stack.imgur.com/L42h5.png) I would like to have either: - - but not the status quo.
Nested tables with tablesorter
CC BY-SA 2.5
0
2010-11-23T04:18:44.507
2017-06-14T18:47:25.533
2017-06-14T18:47:25.533
4,370,109
80,282
[ "javascript", "jquery", "tablesorter" ]
4,253,431
1
4,253,499
null
3
5,311
My wordpress blog is having issues with plugin, and there's this weird div element popping out: ``` <div style="z-index: -1; position:absolute; top:0px; left: 0px; width: 100%; height: 4031px;"></div> ``` This causes my page to extend, creating a big space at the end of the page. This also is found on every wordpress blog. Funny thing is, only chrome sees that (using Inspect Element). I've already tried in IE9 developer tools and FF firebug, the div is not there and my page is fine. : I've already posted a separate question [here](https://wordpress.stackexchange.com/questions/4417/wheres-did-this-div-element-come-from). And my question here is different from that. I want to fix this little problem so bad, and it just came to my mind to use JavaScript for this. What I want to do is: . It's easy removing a div with an ID or class, but this one doesn't have any. I also do not want to affect all the other divs. How can I accomplish this? It has no parent IDs or class. It's right after the container class div. It's parent is `<body>`. : Here's the html: ![alt text](https://i.stack.imgur.com/kxcYy.png)
Removing a div with no id or class with Javascript
CC BY-SA 2.5
null
2010-11-23T06:44:51.370
2010-11-23T07:27:01.513
2017-04-13T12:37:28.450
-1
459,338
[ "javascript", "html" ]
4,253,519
1
4,254,055
null
2
10,274
hai how set video in full screen now i am attach my screen shot.... ![alt text](https://i.stack.imgur.com/MGGT6.png) ![alt text](https://i.stack.imgur.com/ZJbsQ.png) ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="videothumb.videothumb" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".videothumb" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="ViewVideo" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> <intent-filter><action android:name="android.intent.action.VIEW"></action> <category android:name="android.intent.category.DEFAULT"></category> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="8" /> <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"> </uses-permission> </manifest> ``` ViewVideo.java ``` package videothumb.videothumb; import android.app.Activity; import android.content.Intent; import android.media.MediaPlayer; import android.os.Bundle; import android.view.SurfaceView; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.view.View.OnClickListener; import android.widget.GridView; import android.widget.MediaController; import android.widget.VideoView; public class ViewVideo extends Activity { private String filename; private VideoView Video; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main1); Video=(VideoView)findViewById(R.id.VideoView01); System.gc(); Intent i = getIntent(); Bundle extras = i.getExtras(); filename = extras.getString("videofilename"); Video.setVideoPath(filename); Video.setMediaController(new MediaController(this)); Video.requestFocus(); Video.start(); } } ` ``` xml coding: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <VideoView android:id="@+id/VideoView01" android:layout_width="fill_parent" android:layout_height="fill_parent"> </VideoView> </LinearLayout> ```
how to set video in full screen
CC BY-SA 2.5
null
2010-11-23T06:59:40.293
2017-09-01T11:28:28.903
2010-11-23T10:32:05.213
486,554
486,554
[ "java", "android", "video" ]
4,253,917
1
4,365,925
null
0
2,531
I am creating some CALayers and transforming them using CATransform3D using ``` imageLayer.frame = CGRectMake(-22.0f, 188.0f, 180.0f, 50.0f); imageLayer.transform = CATransform3DMakeRotation(120.0f * M_PI / 180.0f, 0.0f, 15.0f, 0.0f); imageLayer.contents = (id)[[UIImage imageNamed:@"photo.png"] CGImage]; [caLayer addSublayer:imageLayer]; ``` here is an sample image with the output... ![alt text](https://i.stack.imgur.com/uaayE.png) I have kept the untransformed image as image view so that i can handle swipes. I have an array of 10 images. So, when a user swipes on the main images the corresponding images should load up in the layers and image view. I can load the image view but had some problems loading the CALayers dynamically. I have tried ``` NSArray *array=[caLayer sublayers]; caLayer = [array objectAtIndex:entryImageIndex]; //caLayer.contents=(id)[[UIImage imageNamed:@"flashImage1.jpg"] CGImage]; caLayer.contents=(id)[[UIImage imageWithCGImage:[imageArray objectAtIndex:entryImageIndex-1]]]; ``` But this gave me errors. Can anyone plz tell me how to populate the CALayers dynamically with images...Any sample code will be of great help...
How to dynamically change the content of CALayer
CC BY-SA 2.5
0
2010-11-23T08:06:36.097
2010-12-06T11:31:44.747
null
null
303,155
[ "iphone", "iphone-sdk-3.0", "ios4", "calayer" ]
4,253,954
1
4,254,057
null
1
10,933
i have this code which is not working. ``` <jsp:useBean id="abbreviationlist" class="AbbreviationListType"/> <jsp:setProperty name="abbreviationlist" property="id"/> <table> <c:forEach items="${abbreviationlist.list}" var="abbreviation"> </c:forEach> </table> ``` and i have the class AbbreviationListType with set and get methods for the list- get singnature is = ``` public List<AbbreviationType> getList() ``` can someone please point out what i am doing wrong ? cause this doesnt work and i get this stack trace: > javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext; java.lang.NoSuchMethodError:javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContex; at javax.servlet.jsp.jstl.core.LoopTagSupport.unExposeVariables(LoopTagSupport.java:620) ..................... here is my WEB-INF/lib ![WEB-INF/lib](https://i.stack.imgur.com/L84gU.png) and my catalina/common/lib ![catalina/common/lib](https://i.stack.imgur.com/OZty8.png)
java.lang.NoSuchMethodError:javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContex
CC BY-SA 2.5
null
2010-11-23T08:13:38.977
2011-01-11T09:57:27.290
2011-01-11T09:56:39.043
486,209
486,209
[ "jsp", "jstl", "el", "javabeans" ]