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,879,785
1
4,879,910
null
10
11,432
![enter image description here](https://i.stack.imgur.com/6u7Dx.png) With emacs (non windows), I see '$' mark at the end of the line when the terminal width is narrow. Is there a way to break the long line to the next line instead of showing the '$' mark? ## ADDED M-x auto-fill-mode works fine for text-mode, but with org-mode, the $ mark remains with the auto-fill-mode.
Can I break the long line in emacs (non windows) to the next line?
CC BY-SA 2.5
0
2011-02-02T20:58:48.507
2020-10-06T06:48:15.137
2020-06-20T09:12:55.060
-1
260,127
[ "emacs", "split", "line" ]
4,879,961
1
4,880,152
null
4
12,776
I have two vectors in a game. One vector is the player, one vector is an object. I also have a vector that specifies the direction the player if facing. The direction vector has no z part. It is a point that has a magnitude of 1 placed somewhere around the origin. I want to calculate the angle between the direction the soldier is currently facing and the object, so I can correctly pan some audio (stereo only). The diagram below describes my problem. I want to calculate the angle between the two dashed lines. One dashed line connects the player and the object, and the other is a line representing the direction the player is facing from the point the player is at. ![Angle Problem](https://i.stack.imgur.com/FuXTH.png) At the moment, I am doing this (assume player, object and direction are all vectors with 3 points, x, y and z): ``` Vector3d v1 = direction; Vector3d v2 = object - player; v1.normalise(); v2.normalise(); float angle = acos(dotProduct(v1, v2)); ``` But it seems to give me incorrect results. Any advice? Test of code: ``` Vector3d soldier = Vector3d(1.f, 1.f, 0.f); Vector3d object = Vector3d(1.f, -1.f, 0.f); Vector3d dir = Vector3d(1.f, 0.f, 0.f); Vector3d v1 = dir; Vector3d v2 = object - soldier; long steps = 360; for (long step = 0; step < steps; step++) { float rad = (float)step * (M_PI / 180.f); v1.x = cosf(rad); v1.y = sinf(rad); v1.normalise(); float dx = dotProduct(v2, v1); float dy = dotProduct(v2, soldier); float vangle = atan2(dx, dy); } ```
Calculate Angle from Two Points and a Direction Vector
CC BY-SA 2.5
0
2011-02-02T21:16:47.190
2014-06-14T06:34:54.240
2011-02-02T23:02:10.530
590,032
590,032
[ "math", "vector" ]
4,880,132
1
4,937,382
null
0
2,994
When I look at Word VBA on my work computer I have what looks like junk projects. On another PC I have only the normal and currently open documents? Is there a way I can clear this? ![enter image description here](https://i.stack.imgur.com/vsfbQ.jpg)
How do I get rid of Word VBA project junk?
CC BY-SA 2.5
null
2011-02-02T21:37:21.123
2020-07-06T21:40:58.530
2020-07-06T21:40:58.530
100,297
83,147
[ "vba", "ms-word" ]
4,880,479
1
4,884,948
null
1
2,709
I'm trying to move movieclip Ball along the borders of movieclip Ground. You would move the Ball with the arrow keys which would increase and decrease its x value, but the y value will always be equal to the top edge of the Ground movieclip. To do this I need to find the y value of the points on the edges of movieclip Ground. How is this possible? ![Ground MovieClip](https://i.stack.imgur.com/hnOrA.png) This is what the Ground MovieClip would look like. It is an irregular shape. What I want is for any x point a y point at the top edge of this shape.
AS3 - Get edge coordinates
CC BY-SA 2.5
0
2011-02-02T22:08:48.800
2011-02-11T16:01:28.600
2011-02-03T09:32:00.467
330,286
330,286
[ "actionscript-3" ]
4,880,566
1
4,880,802
null
1
3,742
what is the right way to do user activity logs like how facebook does it and really fast at it too. i have a website for a client, which has activity logs the activity of user and show to his/her friends/family/followers but its very slow, we are willing to make changes in database, if it will help improve user interactivity and do the logs right way. im sure lots of people already research on it, but i cant find any links for it, that shows how its done proper way, so i can implement that too. any help? ![enter image description here](https://i.stack.imgur.com/25xG0.png)
Database structure for user activity done right way?
CC BY-SA 2.5
0
2011-02-02T22:18:38.253
2011-02-03T00:55:58.303
2011-02-03T00:55:58.303
75,799
75,799
[ "sql", "mysql", "database-design", "data-structures", "relational-database" ]
4,880,723
1
null
null
0
478
I want to extract the points from given image. the image is shown below.. ![enter image description here](https://i.stack.imgur.com/ApVf8.jpg) The points I want are the green upper point and the red point. I tried pixel by pixel comparison but it is too slow. I need a better algorithm. What are your suggestions ?
get the points from image
CC BY-SA 2.5
null
2011-02-02T22:35:16.383
2012-08-22T21:16:13.637
2012-08-22T21:16:13.637
752,878
459,904
[ "image", "image-processing", "vision" ]
4,881,346
1
4,889,671
null
7
1,519
I'm trying to transition to MacVim for ruby dev. One of the hangups I have is running specs quickly and getting results (passes/failures) easily. When I run `:Rake` (or `:!rspec %`) it runs the specs in the current file. The output is shown in the command window. If I run this in regular Terminal, I get colored output. That is, the dots are green and the failures are red. In MacVim, I get these weird `[32m` and `[0m` tokens. Here's an example: ![enter image description here](https://i.stack.imgur.com/lSZVM.png) Any ideas on how to fix this?
MacVim Command Window text coloring help (Rspec output)
CC BY-SA 2.5
0
2011-02-02T23:54:09.130
2013-11-25T13:51:06.927
null
null
3,381
[ "ruby", "vim", "rspec", "macvim" ]
4,881,350
1
4,881,369
null
2
626
Does anyone knows what might be causing the weird artifacts I am seeing in my C# Managed DirectX application. Here is a screenshot of the problem I am having: ![enter image description here](https://i.stack.imgur.com/57fVg.png) What you are looking at is some terrain with a flat plane under it. - - - This must be a Z-Buffer issue but I have not been able to sort it out. Has anyone else run into this same problem? It is driving me nuts!
DirectX Z-Buffer Issue
CC BY-SA 2.5
null
2011-02-02T23:55:03.513
2011-02-03T13:41:14.233
null
null
259,808
[ "c#", "xna", "directx", "managed-directx", "zbuffer" ]
4,881,397
1
4,882,558
null
1
10,441
I am making a simple program to log data and do a few calculations with a .MDB database. accessed via Jet 4. I wish to be able to get the value out of / into any field from a sql query on a primary key(one result) I have currently connected to the database and I am able to view edit the data via "data controls" as shown below: ![enter image description here](https://i.stack.imgur.com/zfeR4.jpg) How do I access the data in the database such that I may put the values into a suitable variable and then write them back?
How to Get database values into and out of code. in Delphi 7
CC BY-SA 2.5
null
2011-02-03T00:02:07.650
2011-02-07T12:04:12.667
2011-02-07T12:04:12.667
2,548
53,915
[ "database", "delphi", "ms-access", "delphi-7" ]
4,881,589
1
4,881,675
null
2
8,414
I have a UITabbarController with a UINavigationController. The view in the NavigationController presents an MVC (AddClockNavigationController). This MVC has a nib with an view and an UINavigationController. The NavigationController.view is added as an subview to the MVC's view. The NavigationController in my MVC has two buttons, an Cancel and an Done. When pressing either one of them the MVC should be dismissed. The IBActions of these buttons are in the UINavigationController's view (AddClockViewController), but whenever pressing them the MVC does not dissappear. If I put the actions into the MVC, it does disapear. If I put the function in my MVC and call it from my viewController using [self.parentViewController myFunction] it does not disappear. How can I get it to disappear from my view? I guess my explenation is quite messy but I hope you understand it. A view from my IB: ![enter image description here](https://i.stack.imgur.com/yhyN3.png) Best regards, Paul Peelen I have tried this with `[self dismissModalViewControllerAnimated:YES];`, `[self.parentViewController dismissModalViewControllerAnimated:YES];`, `[self.navigationController dismissModalViewControllerAnimated:YES];`, `[self.parentViewController.navigationController dismissModalViewControllerAnimated:YES];` and, as stated, with a function in the parentView dismissing it. Nothing works.
dismissModalViewControllerAnimated not working
CC BY-SA 2.5
null
2011-02-03T00:36:59.980
2012-06-28T07:45:44.037
2011-02-03T14:52:12.403
406,677
406,677
[ "iphone", "model-view-controller", "ios", "uinavigationcontroller" ]
4,881,867
1
4,881,880
null
0
121
I got my inv finally working! :D But, you know... now... it's dumb. I want it to say "Use Item 1" or whatever when I Right-click so I do this: ``` if (actItemx == "Item 1") { popup.add(dropMenuItem + " " + actItemx); // should print "Use Item 1" popup.add(cancelMenuItem); } ``` Looks fine to me... but... when I compile, it's fine. When I run it, it's fine... but when I DO IT: ![waaaaht](https://i.stack.imgur.com/PEYhS.jpg) I would have sworn that because it's displayed correctly in CMD that it would display correctly on JMenu... weird.
JMenuItem displays weird name
CC BY-SA 2.5
null
2011-02-03T01:32:11.923
2011-02-03T01:54:00.980
2011-02-03T01:54:00.980
513,838
272,501
[ "java", "swing", "jmenu" ]
4,882,332
1
5,035,743
null
3
6,036
I have a `UITableViewController` with a `UISearchDisplayController` (and `UISearchBar`) that is contained in a `UINavigationController` as the root element. Is it possible to configure it so the `UISearchBar` appears in place of the `UINavigationBar`? I don't think hiding the navigation bar will work, a the next screen (pushed on) requires it to be visible (and this will create a strange animation glitch). I'm basically going for a screen like the search tab. I've uploaded a sample screenshots of how it looks now: ![Default Configuration](https://i.stack.imgur.com/a3gL7.png) ![Selected Configuration](https://i.stack.imgur.com/PV12F.png)
UISearchBar in place of UINavigationController UINavigationBar
CC BY-SA 2.5
0
2011-02-03T03:18:19.407
2014-07-23T23:49:59.270
2011-02-17T21:52:51.430
259,900
259,900
[ "iphone", "cocoa-touch", "interface-builder" ]
4,882,459
1
4,882,538
null
1
383
Alright, I know HOW to do but It's doing something weird. I am trying to get the correct X Y coords for a `JMenu` to appear. I've found a way but it's only a hack. All the right-clicking takes place on the `JList`, for now until I add character panel, so let's say you right-click near the top-left. You expect the Y coord to be around 40~ pixels and the Y coord to be around 100~ pixels right? Because you're clicking on the near left where the `JList` is. Wrong. The x y coords count from the top left of the `JList` when I want it to count from the top left of the WHOLE application. :S So, what did I do? Since the Y coord is correct, I added 512 pixels to the X coord so it's always in the JList. Like so: ``` int newMouseX = 512+e.getX(); popup.show(tileOffline.this, newMouseX, e.getY()); // show item at mouse ``` However, as you can tell I will not be right-clicking in the `JList` forever. How can I make it so I get the exact X Y coords of the mouse from the WHOLE applet? Here's a pic to describe the situation WITHOUT the 512 hack: ![enter image description here](https://i.stack.imgur.com/v78cI.png)
Getting the EXACT coords of Mouse in Java
CC BY-SA 2.5
0
2011-02-03T03:41:04.170
2011-02-03T03:58:14.833
2011-02-03T03:58:14.833
300,311
272,501
[ "java", "user-interface", "swing" ]
4,882,486
1
6,462,626
null
5
4,590
It should behave like [Delicious toolbar](https://addons.mozilla.org/en-us/firefox/addon/delicious-bookmarks/) for Firefox does; it lists possible tags to click. The effect is shown as below: ![enter image description here](https://i.stack.imgur.com/8PU8T.png) The code should be able to find key words for the text. Any good algorithm or open source project to recommend? I found [this post](https://stackoverflow.com/questions/2853384/how-to-identify-ideas-and-concepts-in-a-given-text), but it is a bit too general for my specific need.
How to identify tags (key words) automatically from a given text?
CC BY-SA 2.5
0
2011-02-03T03:45:07.547
2011-06-24T02:10:24.367
2017-05-23T12:13:26.330
-1
323,941
[ "algorithm", "full-text-search", "text-analysis" ]
4,882,564
1
4,882,615
null
2
343
I have a bunch of Posts. - - ![enter image description here](https://i.stack.imgur.com/tQCMT.png) What is the idiom to do this in Rails? What's the "right" way? ### UPDATE @coreyward, thanks: So, I would have: - - - But then, the layout (left side bar, right content) (the black box in image) would need to be repeated in index and show templates. Is the solution to this making yet another partial (containing left side bar, right content) and then rendering that partial in index and show?
How to show index and instance items on same page?
CC BY-SA 2.5
0
2011-02-03T04:00:10.170
2011-02-03T04:17:49.010
2020-06-20T09:12:55.060
-1
382,818
[ "templates", "ruby-on-rails-3", "view" ]
4,882,683
1
4,973,946
null
3
296
I've created an application for Mac that uses a horizontal resize view (technically a BWToolkit resize view) that is linked to a `toggleCollapse` button. After collapsing and expanding the panel a few times, this happens (see image) right table-view should be flush with panel divider. Any one have any info on why this is happening. I've carefully adjusted my alignment and anchors to be correct but it seems like this is a weird issue that bugs out the view? ![Table should be flush with panel divider..](https://i.stack.imgur.com/M284R.png) Is anyone NOT having this issue? Any input would be helpful! Maybe I just need to start fresh?
(Mac) Panel Re-size issue
CC BY-SA 2.5
0
2011-02-03T05:00:33.283
2011-02-11T20:54:39.187
2011-02-09T03:09:17.073
578,388
578,388
[ "objective-c", "cocoa", "macos", "interface-builder" ]
4,882,732
1
4,882,764
null
2
1,360
I would like to permanently add a glow effect to a bunch of images. preferably using either Ruby or Python (open to other ideas as well). Example of what I'm looking to do (see top half): ![](https://i.imgur.com/oyFKQ.png)
Adding glowy effect to an image
CC BY-SA 3.0
0
2011-02-03T05:12:40.440
2011-07-22T19:02:00.740
2011-07-22T19:02:00.740
204,927
204,927
[ "python", "ruby", "image-processing", "imagemagick" ]
4,882,993
1
4,898,913
null
49
49,083
Mesh generation from 3D points (with x, y and z coordinates). ![enter image description here](https://i.stack.imgur.com/dbOFa.png) ![enter image description here](https://i.stack.imgur.com/eryG7.png) What I have is points in 3D space (with x, y and z coordinates) you can see it in image 1. What would be the output is image 2 or image 3, or image 4. In short it would be mesh. Material on it can be provided if I have the mesh. I have seen many people say about Delaunay triangulations or constrained Delaunay triangulations will help me in mesh generation, but what I mostly found is its implementation in 2D points (with only x and Y coordinates). But my problem is: I have points in 3D as you can see from image 1. Will Delaunay triangulations or constrained Delaunay triangulations work fine with 3D Points? If yes, then how? Or do I have to find another algorithm for generating mesh from 3D points? One good explanation of Delaunay triangulations for 2D points can be found [here](http://www.geom.uiuc.edu/~samuelp/del_project.html)
Mesh generation from points with x, y and z coordinates
CC BY-SA 4.0
0
2011-02-03T05:59:46.583
2019-04-09T12:54:07.760
2019-04-09T12:54:07.760
4,359,451
468,968
[ "algorithm", "geometry", "3d", "delaunay" ]
4,883,162
1
4,883,288
null
11
8,572
This is with reference to: > [http://googlecode.blogspot.com/2011/01/go-daddy-makes-web-faster-by-enabling.html](http://googlecode.blogspot.com/2011/01/go-daddy-makes-web-faster-by-enabling.html) But I still don't know how it works the in background to dynamically optimize pages. One more thing I could NOT understand why "Cached subsequent requests are slow" ? ![enter image description here](https://i.stack.imgur.com/d0JcP.png)
What does mod_pagespeed do?
CC BY-SA 2.5
0
2011-02-03T06:46:53.290
2015-03-23T22:21:10.217
2011-02-04T00:22:20.420
419
368,472
[ "performance", "optimization", "mod-pagespeed" ]
4,883,182
1
4,883,400
null
7
16,853
Please see the picture below ![enter image description here](https://i.stack.imgur.com/NweJl.jpg) Following is the code for this :: ``` <Grid> <ListView Style="{StaticResource listViewStyle}" Name="transactionListView" HorizontalAlignment="Stretch" VerticalAlignment="Top" ItemsSource="{Binding}" MouseDoubleClick="transactionListView_MouseDoubleClick" IsSynchronizedWithCurrentItem="True" > <ListView.View> <GridView ColumnHeaderContainerStyle="{StaticResource gridViewHeaderColumnStyle}"> <GridView.Columns> <GridViewColumn Width="70" Header="Serial" DisplayMemberBinding="{Binding Path=Serial}" /> <GridViewColumn Width="100" Header="Date" DisplayMemberBinding="{Binding Path=Date, StringFormat={}{0:dd-MM-yyyy}}" /> <GridViewColumn Width="200" Header="Seller" DisplayMemberBinding="{Binding Path=Seller}" /> <GridViewColumn Width="200" Header="Buyer" DisplayMemberBinding="{Binding Path=Buyer}" /> <GridViewColumn Width="70" Header="Bales" DisplayMemberBinding="{Binding Path=Bales}" /> </GridView.Columns> </GridView> </ListView.View> </ListView> </Grid> ```
Content alignment for Gridviewcolumn in the listview
CC BY-SA 2.5
0
2011-02-03T06:50:50.187
2015-06-19T20:28:35.683
null
null
570,928
[ "wpf", "xaml", "gridviewcolumn" ]
4,883,223
1
4,905,800
null
1
1,089
![enter image description here](https://i.stack.imgur.com/Sjki8.png) This is my application screenshot.There is only one NSScrollView on the window.I have made the other parts of the scrollview transparent,except the knob slot. Here is my draw code for custom NSScroller subclass. ``` - (void) drawRect: (NSRect)dirtyRect { [[NSColor clearColor] set]; NSRectFill(dirtyRect); [self drawKnob]; } ``` Does anyone have a clue to make this work? Thanks a lot.
How to make knob track of a NSScroller transparent?
CC BY-SA 2.5
0
2011-02-03T06:55:49.383
2011-02-05T08:06:36.680
2011-02-03T23:54:08.083
115,271
115,271
[ "cocoa", "nsscroller" ]
4,883,874
1
4,884,949
null
3
5,910
I'm using raphaelJS to draw a "radar chart" to display statistical data. For each axis it should accept values between 0 and 10. For example, the vales of a polygon with its center point right in the center of the chart [10,10,10,10,10]. Simple... However, it might happen that data looks like this: ``` [26, 14, 48, 18, 1], [ 3, 14, 8, 9, 5], [10, 6, 4, 16, 3] ``` which leads to this (displaying the polygon with its center point in the bottom left off the chart): ![radar off scale](https://i.stack.imgur.com/WzC84.png) If I would normalize data based on its biggest value (in this case 48), all of the other center points would be too near to the center the chart, and and its informative value would be around 0. --- same data normalized based on its biggest value: ``` [5.42, 2.92, 10, 3.75, 0.21], [0.63, 2.92, 1.67, 1.88, 1.04], [2.08, 1.25, 0.83, 3.34, 0.63] ``` ![radar normalized](https://i.stack.imgur.com/8zmtC.png) So now all of the other center points are clustered in the center of the chart, and have lost all of their explanatory power... If there was more than 3 center points, they would most likely overlap each other. ![centered](https://i.stack.imgur.com/rMOkX.png) I was thinking about a relative way to display each polygon, without losing too much relation between each polygon, if it's possible... Any ideas how to do this, or maybe another approach how to normalize?
how to normalize statistics for a radar chart
CC BY-SA 2.5
0
2011-02-03T08:34:00.573
2011-02-03T17:47:33.433
2011-02-03T14:46:06.517
293,885
293,885
[ "statistics", "charts", "raphael", "scale", "data-visualization" ]
4,884,404
1
4,884,939
null
1
108
how would you approach the design of the following layout without using any tables? i have tried but cannot get the height of the 3 central div elements to 100% height. ![enter image description here](https://i.stack.imgur.com/5mrpZ.png) any help would be appreciated. thanks in advance!
designing css fluid/fixed layout with css and not using tables
CC BY-SA 2.5
0
2011-02-03T09:36:40.760
2011-02-03T10:25:31.153
null
null
436,493
[ "css" ]
4,884,490
1
4,884,664
null
3
5,125
I'm not sure if this is a beginner's question, so excuse me if it is. I can't install the WWDR Apple certificate. I downloaded but then on keychain it tells me the following: (It's in spanish so I'm translating as good as I can) "The "Root System" keychain cannot be modified." "To change if a root certificate is of trust or not, open the Keychain and modify the trust settings. New root certificates must be added to the startup session of the current user, or to the keychain system if they have to be shared by all users of this computer" How can I solve this? Update: I actually can't install a custom certificate I made and submitted for approval (approved) I downloaded it but I can't install it! I have the same error popping up. This is the error: ![enter image description here](https://i.stack.imgur.com/ACxhI.png) Thank you for your help!
Problem installing the WWDR Apple Certificate on Keychain
CC BY-SA 2.5
null
2011-02-03T09:44:38.133
2011-02-03T10:01:09.233
2011-02-03T09:56:40.080
582,829
582,829
[ "iphone", "osx-snow-leopard", "certificate" ]
4,884,527
1
4,884,569
null
1
798
I have dynamic table as shown . ![Image of the table](https://i.stack.imgur.com/lsZKH.jpg) How can restrict the rows have same values in both the columns using jquery or javascript thanks in advance
Jquery dynamic table validation
CC BY-SA 2.5
0
2011-02-03T09:48:10.243
2011-02-03T10:03:33.107
2011-02-03T09:54:35.587
405,143
529,246
[ "javascript", "jquery" ]
4,884,676
1
4,884,757
null
1
1,089
I have the following issue, Im creating a windows 7 gadget, which uses Iframe to load content.I have full control on the contents of the Iframe, what I want to do is, call a function in the parent (windows 7 gadget html document), from within this Iframe, or even trigger a flyout from within the Iframe, when there is hover on a link or something. Any help is greatly appreciated. Thanks ![enter image description here](https://i.stack.imgur.com/gtxGl.png)
Accessing parent DOM/function from within an Iframe embedded in Windows 7 gadget
CC BY-SA 2.5
null
2011-02-03T10:01:37.377
2011-02-03T15:05:33.850
null
null
558,243
[ "javascript", "jquery", "iframe", "parent", "windows-desktop-gadgets" ]
4,884,766
1
4,889,044
null
2
280
Until now I thought justify meant that the text will start and end at the same pixel, but i was surprised a few hours ago, when I saw this: ![justify bug](https://i.stack.imgur.com/oJwNK.png) I got similar results in 2 computers (win7+chrome, ubuntu+firefox), and not just at this place, there are more similar bugs on the same [site](http://teebeey.wordpress.com/). After my second chec I thought this is general and I just haven't noticed yet, but other sites don't show this strange behaviour. Also refreshing the site and restarting the browser didn't solved it. Has anybody else noticed this? What causes this?
Should't justify mean pixel perfect?
CC BY-SA 2.5
null
2011-02-03T10:10:35.490
2011-02-03T16:53:10.303
null
null
73,657
[ "html", "css", "browser", "text", "justify" ]
4,884,920
1
4,895,699
null
40
26,898
I'm trying to use valums ajax uploader. [http://valums.com/ajax-upload/](http://valums.com/ajax-upload/) I have the following on my page: ``` var button = $('#fileUpload')[0]; var uploader = new qq.FileUploader({ element: button, allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'], sizeLimit: 2147483647, // max size action: '/Admin/Home/Upload', multiple: false }); ``` it does post to my controller but qqfile is always null. I tried these: ``` public ActionResult Upload(HttpPostedFile qqfile) AND HttpPostedFileBase file = Request.Files["file"]; ``` without any luck. I found an example for ruby on rails but not sure how to implement it in MVC [http://www.jigsawboys.com/2010/10/06/ruby-on-rails-ajax-file-upload-with-valum/](http://www.jigsawboys.com/2010/10/06/ruby-on-rails-ajax-file-upload-with-valum/) In firebug i see this: [http://localhost:61143/Admin/Home/Upload?qqfile=2glonglonglongname+-+Copy.gif](http://localhost:61143/Admin/Home/Upload?qqfile=2glonglonglongname+-+Copy.gif) ![enter image description here](https://i.stack.imgur.com/c1IxN.png) ![enter image description here](https://i.stack.imgur.com/h4lV8.png) ![enter image description here](https://i.stack.imgur.com/56PYm.png) ![enter image description here](https://i.stack.imgur.com/56PYm.png)
MVC3 Valums Ajax File Upload
CC BY-SA 2.5
0
2011-02-03T10:23:33.370
2013-04-19T22:36:01.920
2011-02-03T10:36:56.260
455,042
455,042
[ "asp.net", "asp.net-mvc", "asp.net-mvc-3" ]
4,884,959
1
null
null
3
20,133
So currently I open images created with openCV with something like ``` cvNamedWindow( "Original Image", CV_WINDOW_AUTOSIZE ); cvShowImage( "Original Image", original ); ``` but my images are quite large and go off the screen like shown here ![Lena](https://i.imgur.com/yy5NKKS.jpg) I want windows to be resizable or at least the size of the users screen but with scrolling. How to do such thing?
OpenCV - How to enable scrolling to windows with images?
CC BY-SA 3.0
0
2011-02-03T10:27:17.237
2019-11-08T02:34:59.130
2016-11-03T11:36:46.483
1,116,508
434,051
[ "c++", "c", "windows", "user-interface", "opencv" ]
4,885,017
1
4,885,340
null
0
234
I wish to update my SDK 2.3 to the latest revision of 2.3. I don't want to update to 3.0 preview and lose the GPS emulation and have a slow emulator. 2.3 is just fine for me. I've updated the ADT plugin to 9.0.0 by the Eclipse 'check for updates'. If I run the AVD manager from Eclipse and look at my installed packages, I have installed : ![enter image description here](https://i.stack.imgur.com/xgxLZ.jpg) and the available packages with the ones that I I want checked are: ![enter image description here](https://i.stack.imgur.com/5H6eg.jpg) My question is: what do I get with the platform tools? Is it just what goes in the platform-tools folder (i.e. the aapt.exe, adb.exe etc)? I don't want to overwrite the tools folder and end up with the slow emulator.
Updating SDK 2.3 - what exactly are the SDK Platform tools?
CC BY-SA 2.5
null
2011-02-03T10:31:53.040
2011-02-03T11:05:27.477
null
null
440,010
[ "android" ]
4,885,095
1
4,885,405
null
49
21,809
The method hashCode() in class Enum is final and defined as super.hashCode(), which means it returns a number based on the address of the instance, which is a random number from programmers POV. Defining it e.g. as `ordinal() ^ getClass().getName().hashCode()` would be deterministic across different JVMs. It would even work a bit better, since the least significant bits would "change as much as possible", e.g., for an enum containing up to 16 elements and a HashMap of size 16, there'd be for sure no collisions (sure, using an EnumMap is better, but sometimes not possible, e.g. there's no ConcurrentEnumMap). With the current definition you have no such guarantee, have you? ### Summary of the answers Using `Object.hashCode()` compares to a nicer hashCode like the one above as follows: - - - - - - - - - `HashSet` I'd personally prefer the nicer hashCode, but IMHO no reason weights much, maybe except for the speed. ## UPDATE I was curious about the speed and wrote a [benchmark](https://dl.dropboxusercontent.com/u/4971686/published/maaartin/so/EnumHashCodeBenchmark.java) with surprising [results](https://microbenchmarks.appspot.com/runs/6af10de0-e379-4aad-a354-cbc8815a466c). For a price of a single field per class you can a deterministic hash code which is nearly . Storing the hash code in each field would be even faster, although negligibly. ![](https://i.stack.imgur.com/rtb85.png) The explanation why the standard hash code is not much faster is that it can't be the object's address as objects gets moved by the GC. ## UPDATE 2 There are some strange things [going on](https://stackoverflow.com/q/24222991) with the `hashCode` performance in general. When I understand them, there's still the open question, why `System.identityHashCode` (reading from the object header) is way slower than accessing a normal object field.
What is the reason behind Enum.hashCode()?
CC BY-SA 3.0
0
2011-02-03T10:39:52.687
2017-11-14T14:03:54.057
2017-11-14T14:03:54.057
1,266
581,205
[ "java", "enums", "hash" ]
4,885,136
1
4,885,288
null
6
13,244
![enter image description here](https://i.stack.imgur.com/jaYbU.gif) ![enter image description here](https://i.stack.imgur.com/9jYQU.gif) I need the content to force to scroll on X axis, not down the Y axis. I know this is formatted badly but it's dynamically generated and has no white space. ``` <div class="folderWrapper" id="folderContainer"><div class="folderBox ui-droppable folderBoxSel" onclick="folderSelected(0)" id="fBox0"><div class="counter" id="fCount0">4</div><div class="folderName">Unsorted</div></div><div class="folderBox ui-droppable" onclick="folderSelected(1)" id="fBox1"><div class="counter" id="fCount1">0</div><div class="folderName">test</div></div><div class="folderBox" onclick="folderSelected(1)" id="fBox1"><div class="counter" id="fCount1">0</div><div class="folderName">test</div></div><div class="folderBox" onclick="folderSelected(1)" id="fBox1"><div class="counter" id="fCount1">0</div><div class="folderName">test</div></div><div class="folderBox" onclick="folderSelected(1)" id="fBox1"><div class="counter" id="fCount1">0</div><div class="folderName">test</div></div><div class="folderBox" onclick="folderSelected(1)" id="fBox1"><div class="counter" id="fCount1">0</div><div class="folderName">test</div></div></div> ``` Formatted nicely with one folder inner box: ``` <div class="folderWrapper" id="folderContainer"> <div class="folderBox ui-droppable folderBoxSel" onclick="folderSelected(0)" id="fBox0"> <div class="counter" id="fCount0">4</div> <div class="folderName">Unsorted</div> </div> </div> ``` ``` .folderWrapper{ overflow-x:scroll; overflow-y:hidden; height:85px; white-space:nowrap; margin-bottom:5px; } .folderBox{ float:left; background-image:url(../images/artworking/folder.png); background-position:center top; background-repeat:no-repeat; width:85px; height:55px; position:relative; padding:5px; z-index:4; white-space:nowrap; } .folderBox:hover{ cursor: pointer; } ``` Thanks if anyone can help! Bazzz's answer works in all browsers except IE compatability mode (unfortunatly it has to be compatible) which gives the following look: ![enter image description here](https://i.stack.imgur.com/FDaRH.gif) With IE hack: ![enter image description here](https://i.stack.imgur.com/xOzjN.gif)
CSS Horizontal scroll problem
CC BY-SA 2.5
0
2011-02-03T10:43:19.647
2011-02-03T13:24:45.580
2011-02-03T12:13:11.433
356,635
356,635
[ "css", "horizontal-scrolling" ]
4,885,251
1
4,890,188
null
8
10,462
I want to draw a heatmap in R but my datafile is like this ``` Lat, Long, Zip, Zvalue ``` I basically need to interpolate between lat and long values and draw colors based on the zvalue How can I do that in R I eventually want to get something like this ![enter image description here](https://i.stack.imgur.com/KcKyF.jpg)
Drawing a heatmap in R based on zipcodes only
CC BY-SA 2.5
0
2011-02-03T10:54:42.483
2022-12-14T19:50:34.910
2022-12-14T19:50:34.910
109,941
55,362
[ "r", "heatmap" ]
4,885,928
1
4,887,965
null
3
1,518
I'm successfully drawing the convex polys which make up the following white concave shape. ![Outline Example](https://i.stack.imgur.com/UhkXS.png) The orange color is my attempt to add a outline around the white shape. As you can see it's not so uniform. On some edges the orange doesn't show at all. Evidently using... ``` glScalef(1.1, 1.1, 0.0); ``` ... to draw a slightly larger orange shape before I drew the white shape wasn't the way to go. I just have a nagging feeling I'm missing a more simple way to do this. Note that the white part is going to be mapped with a texture which has areas of transparency, so the orange part needs to be the white shapes too, not just surrounding them. Also, I'm using a parallel projection matrix, that's why glScalef's z is set to 0.0 - reminds me there is no perspective scaling. Any ideas? Thanks!
How do I add an outline to a 2d concave polygon?
CC BY-SA 3.0
null
2011-02-03T12:07:13.273
2022-03-18T13:03:34.257
2013-02-28T05:27:45.200
135,557
135,557
[ "opengl-es" ]
4,885,983
1
4,886,053
null
4
8,005
So I've created a WCF service application and hosted it on IIS7. It currently has a few test 'helloworld' methods. When I run it in my browser I get this screen: ![enter image description here](https://i.stack.imgur.com/GIfiX.png) Now the service itself works great, but how can I display the operations like this: ![enter image description here](https://i.stack.imgur.com/jG9TP.png) Thanks to marc_s for the link: [http://www.dotnetcurry.com/ShowArticle.aspx?ID=399](http://www.dotnetcurry.com/ShowArticle.aspx?ID=399) which I've followed so my web config is now setup like: ``` <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <services> <service name="WcfServer.Service1"> <endpoint address="" binding="webHttpBinding" contract="WcfServer.IService1" behaviorConfiguration="HelpBehaviour" /> </service> </services> <behaviors> <serviceBehaviors> <behavior> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true" /> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="AjaxBehavior"> <enableWebScript /> </behavior> <behavior name="HelpBehaviour"> <webHttp helpEnabled="true"/> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> <directoryBrowse enabled="true" showFlags="Date, Time, Size, Extension" /> </system.webServer> </configuration> ``` However, this only works locally. When I publish to my server on IIS7 I get a 404 error page when I click on the help link. Does anyone know why this is, or has come across it before? (Last bit was solved by running: `aspnet_regiis.exe -iru`)
Displaying WCF Web service operations
CC BY-SA 2.5
0
2011-02-03T12:11:56.143
2013-06-03T21:22:58.133
2011-02-03T15:07:15.363
143,979
143,979
[ "c#", "wcf", "web-services", "iis-7", "operations" ]
4,887,030
1
4,897,651
null
2
1,227
I have a ZedGraph stacked bar graph, and I want each bar to show its value on a label. So far no problem. But is there any built-in function to prevent labels from overlapping? Here is a screenshot showing the problem: ![enter image description here](https://i.stack.imgur.com/eb22G.jpg)
How can I prevent labels from overlapping each other in ZedGraph?
CC BY-SA 3.0
null
2011-02-03T13:59:09.853
2011-05-08T07:11:38.447
2011-05-08T07:11:38.447
63,550
601,616
[ "c#", "zedgraph" ]
4,887,101
1
4,918,571
null
0
696
i have asp.net mvc application where my model has a relation like "Question can have multiple answers". So while creating its .dbml file and classes question class would contain the EntitySet right? but each object in the EntitySet (means Answer object) will having the Property as "Question" , so framework automatically creates there circular reference and dependencies. which does comes in focus when we going to serialize the List of Question (List) to generate the json output, for particular action in controller. If we use [ScriptIgnore] attribute to property as "Answers" in "Question" class in designer.cs file (generated by framework, generally people avoids to disturb it and me too) then everything running fine. Can we solve this by using partial classes? but i think partial properties are not exist in c#. My question is , is this BUG ? or some remedy to resolve it? my relationship is :![enter image description here](https://i.stack.imgur.com/HO2bR.jpg) And Error is: ``` A circular reference was detected while serializing an object of type 'myApp.Models.Question'. ```
Is this bug ?...got reason behind circular reference ... how to solve but?
CC BY-SA 2.5
0
2011-02-03T14:05:26.110
2011-03-17T15:14:38.907
2011-02-07T06:15:39.913
76,337
165,309
[ "entity-framework", "asp.net-mvc-2", "list", "serialization" ]
4,887,219
1
null
null
0
1,104
Imagine I have an Item entity and a Basket entity. The Basket may contain any number of items. The typical Spring Roo interface for the basket might look something like this: ![enter image description here](https://i.stack.imgur.com/r0aJ7.png) Lets say I want to add another button to the basket list, perhaps a checkout button. What would be the best way of going about that? Also assuming I haven't yet finished with my entities and Roo might re-generate alot of stuff. I thought about modifying the tags, but I'm quite new to MVC, spring and jsp so battling through at the moment.
Spring roo and the user interface
CC BY-SA 2.5
null
2011-02-03T14:16:37.810
2011-06-07T13:45:19.837
null
null
344,079
[ "java", "jsp", "jsp-tags", "spring-roo" ]
4,887,241
1
4,887,979
null
1
752
This is a question about organising lots of images in a web project. Say you had the following two icons in a web project that represeneted, for example, a product selected or a product not selected: ![product selected icons](https://i.stack.imgur.com/Xx4bd.png) What would you name them? Seems a simple question, but I suspect naming images is something of an art. For example: - : Seems fair enough but what if you want to replace the star at a later date with a circle say. Then your name is misleading so you would have to rename it and then update all your css etc.- : Great for the when used for the specific action of selecting a product but what if I wanted to use the same image for a different purpose. Then the name is confusing and too specific.- Should the image size be part of the image name? eg. someImage_16.png What is the best naming convention you have found for naming images?
Naming convention for images in a large website
CC BY-SA 2.5
null
2011-02-03T14:18:33.707
2011-02-03T15:20:50.630
null
null
98,357
[ "image", "web", "naming-conventions" ]
4,887,346
1
4,887,499
null
1
5,406
I have ``` <footer class="meta"> <ul> <li><a href="#" class="numNotes">3 notes</a></li> <li><a href="#" class="numComments">10 comments</a></li> <li><a href="#" class="datePosted">3rd Feb 2011</a></li> <li class="tags"> <ul> <li><a href="#">Tag name</a></li> <li><a href="#">Tag name</a></li> </ul> </li> </ul> </footer> ``` I am wondering why my last tag item goes to the next line ![](https://imgur.com/3YvQb.jpg) [http://jiewmeng.kodingen.com/demos/folio-wip/index.html](http://jiewmeng.kodingen.com/demos/folio-wip/index.html)
Why is (floated) list item going to next line
CC BY-SA 2.5
null
2011-02-03T14:28:15.880
2011-02-03T18:49:15.440
null
null
292,291
[ "css" ]
4,887,366
1
4,887,421
null
1
83
I'd like to get a collection of Students whose average grade (by adding each individual subject score and dividing by the amount of subjects) is above 55. Since this year is 2011, I also need to calculate this field only for the 2011 records. ![enter image description here](https://i.stack.imgur.com/nASQ2.jpg) ``` private void cmbGradeParalelo_SelectedIndexChanged(object sender, EventArgs e) { StudentRepository studentRepo = new StudentRepository(): dataGridView1.DataSource = studentRepo.FindAllStudents() .Where(s=>s.ScoreRecords.) } ``` Any suggestions?
Help with this Linq query
CC BY-SA 2.5
null
2011-02-03T14:29:29.970
2011-02-03T14:39:36.173
null
null
null
[ "c#", "linq" ]
4,887,456
1
4,888,128
null
10
14,623
In the application that I'm working on right now, I need to periodically check eligibility of tens of thousands of objects for some kind of a service. The decision diagram itself is in the following form, just way larger: ![Decision diagram](https://i.stack.imgur.com/qnS1b.jpg) In each of the end nodes (circles), I need to run an action (change an object's field, log information etc). I tried using Drool Expert framework, but in that case I'd need to write a long rule for every path in the diagram leading to an end node. Drools Flow doesn't seem to be built for such a use case either - I take an object and then, depending on the decisions along the way, I end up in one of the end nodes; and then again for another object. Or is it? Could you give me some examples/links to such solutions? Drools Flow calls might look like this: ``` // load up the knowledge base KnowledgeBase kbase = readKnowledgeBase(); StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); Map<String, Object> params = new HashMap<String, Object>(); for(int i = 0; i < 10000; i++) { Application app = somehowGetAppById(i); // insert app into working memory FactHandle appHandle = ksession.insert(app); // app variable for action nodes params.put("app", app); // start a new process instance ProcessInstance instance = ksession.startProcess("com.sample.ruleflow", params); while(true) { if(instance.getState() == instance.STATE_COMPLETED) { break; } } // remove object from working memory ksession.retract(appHandle); } ``` That is: I'd take an Application object, start a new process for it, when the process is finished (the final, action node would modify the application somehow), I'd remove the object from working memory and repeat the process for a new App object. What do you think about this solution? I've ended up using Drools Flow and it has been working quite fine. My decision process isn't as straightforward as Drools Expert asks for and depending on where in the decision tree the process is it needs to load lists of objects from the database, transform them, make decisions, log everything etc. I use a Process object that is passed to the process as a parameter and stores all my global variables (for the process) and some convenience methods that are repeated at different points in the tree (as writing Java code in the `Script Task` nodes isn't very convenient itself). I also ended up using Java to make decisions (and not `mvel` or rules) - it's faster and I'd say easier to control. All objects that I work with are passed as parameters and used as normal Java variables in the code.
Decision trees and rule engines (Drools)
CC BY-SA 3.0
0
2011-02-03T14:38:46.427
2014-05-26T12:35:20.517
2011-05-06T12:08:52.813
265,289
265,289
[ "java", "drools", "decision-tree", "expert-system", "drools-flow" ]
4,887,660
1
null
null
0
215
Here's the current dependency graph (with freehand circles for [TheTXI](https://meta.stackexchange.com/questions/19478/the-many-memes-of-meta/19775#19775)) ![Dependencies](https://i.stack.imgur.com/Tg44V.png) A game has players and a single board shared between them. A player also has access to the board to be able to add/move/remove units from it. A player has access to the units it owns, both on and off the board (A unit also knows it's owner, but that can probably be removed and just do a lookup). A board has units on it and knows units' positions. Units have abilities (Players possibly can as well) The big one that I'm having trouble figuring out is Unit's Abilities. They should be able to affect anything in the game, healing/damaging a player/unit, reposition things on the board, possibly even the game itself (so far there isn't a need, but it could come up). How can I have abilities that can affect anything without them having a reference to everything? I realize each ability can and should have references to only what it needs, but a unit class has abilities built in to them, so if a unit's ability affects the board, it will need to get a reference to the board from the unit somehow? I'm trying to keep the design as flexible as possible, because the rules aren't set in stone yet (we're creating a game, and still pretty early on, so it's try something, see how it feels, change the rules until the game feels right) Even whether there's a board/map at all is still up in the air, so the units should be decoupled from that, which they currently are. There is no global state or any "god object" (yet), and I'd like to keep it that way. Specifically it's in Python, webapp, so while the question itself is language agnostic, any specifics based on a dynamic language with first class functions are certainly welcome.
Help with decoupling a game design
CC BY-SA 2.5
null
2011-02-03T14:52:21.593
2020-06-17T08:40:46.470
2020-06-20T09:12:55.060
-1
23,822
[ "language-agnostic", "dependencies", "decoupling" ]
4,887,792
1
4,888,345
null
0
1,126
I'm using [Ocilib](http://orclib.sourceforge.net/) to perform a bulk insert on a Oracle database but I'm having some trouble while filling a string buffer. The documentation says: > For string/RAW arrays, the input array MUST BE a contiguous block of data and not an array of pointers. So to bind an array of 10 elements for a varchar2(30) column, binded variable must be a like array[10][31] And a sample proceeds to fill a buffer like this: ``` ... char tab_str[1000][21]; ... OCI_BindArrayOfStrings(st, ":s", (char*) tab_str, 20, 0); ... for(i=0;i<1000;i++) { sprintf(tab_str[i],"Name %d",i+1); } ... ``` I'm trying to fill the string buffer while looping through a std::vector of MyClass. MyClass has a std::string member. I'm trying to use the std::string::copy method to copy over the string contents to the buffer. But I don't know exactly how to index the buffer to do it. ``` ... OCI_BindArrayOfStrings(st, ":f2", NULL, VCHAR_SIZE, 0); char** vc_buffer = (char**)OCI_BindGetData(OCI_GetBind(st, 2)); ... int i = 0; for(vector<MyClass>::const_iterator it = myVec.begin(); it != myVec.end(); ++it) { /* 1st try */ it->m_string.copy((vc_buffer + (i * VCHAR_SIZE)), VCHAR_SIZE); /* 2nd try */ it->m_string.copy(vc_buffer[i], VCHAR_SIZE); ++i; ... } ... ``` The first way gives me buggy data in the database. The second makes me hit a null pointer. What I'm doing wrong? : The second approach, along the approach proposed by Alessandro Vergani below, results in null strings inserted. The first approach gives this (somewhat bizarre) result: ![database contents](https://i.stack.imgur.com/luQ0W.png) The gvim window shows what it's supposed to look like, the apex screen shows what ends up in the database.
Filling a string buffer when using Ocilib
CC BY-SA 2.5
null
2011-02-03T15:03:46.410
2011-02-03T17:30:25.577
2020-06-20T09:12:55.060
-1
61,207
[ "c++", "c", "oracle-call-interface" ]
4,887,972
1
4,888,194
null
1
1,204
I tried to make a Symbol Button with MFC. The Icon-Resource (*.ico) has a size of 16x16 pixels. When I load the icon into the button, the icon appears twice as large. Do you know how I can specify the size of the icon drawn onto the button-surface? The Code Fragment I'm using: ``` CButton* btn = reinterpret_cast<CButton*>(GetDlgItem(IDC_BUTTON_RUNTER)); btn->SetIcon(AfxGetApp()->LoadIconA(MAKEINTRESOURCE(IDI_RUNTER))); ``` ![enter image description here](https://i.stack.imgur.com/R7m2i.png) Thanks for your help!
How to make a Symbol-Button with 16x16 pixel icon-size?
CC BY-SA 2.5
null
2011-02-03T15:19:42.657
2011-02-03T15:40:12.410
2011-02-03T15:24:44.793
237,483
237,483
[ "windows", "mfc" ]
4,888,015
1
null
null
0
152
I'm testing iPhone allocations. I have a UITableView with 3 custom cells. When I switch between 2 views Malloc parameter is rising for about 0.1KB. ![enter image description here](https://i.stack.imgur.com/lUvKd.png) Is that normal? No leaks found.
iPhone memory testing
CC BY-SA 2.5
null
2011-02-03T15:23:23.890
2011-02-03T15:38:57.557
null
null
132,257
[ "iphone", "testing", "memory", "memory-management" ]
4,888,711
1
null
null
0
623
To allow high-performance editing of `UITableView` cells I maintain a single `UITextField` which is displayed/hidden as needed. I've extended `UITableView` so that double-tapping a cell enters text edit mode, at which stage the text field is added as a subview to the tapped `UITableViewCell` and becomes the first responder. The cell textLabel is purposefully hidden at this point. My issue is: I set the and for my `UITableViewCell` and the `UITextField`, yet the two do not exactly overlap. I have produced an image illustrating this behaviour: the left side shows on top the `UITableViewCell` textLabel, below this is the `UITextField` overlaid with cell textLabel hidden, and on the right are both made visible. ![inexact overlay](https://i.stack.imgur.com/ha182.png) I'm not keen on "fudge factor" value fixes, so can anyone tell me what's missing? I am running the app under `iOS 4.2` in the xcode iPad simulator. Many thanks!
xcode/iOS: UITextField overlaid onto UITableViewCell with same frame does not match
CC BY-SA 3.0
0
2011-02-03T16:24:59.790
2018-03-13T11:11:49.640
2018-03-13T11:11:49.640
8,882,062
490,123
[ "cocoa-touch", "ios", "uitableview", "uitextfield" ]
4,889,129
1
null
null
0
197
Same like date_format(ExpenditureDate,'%d-%m-%Y') between '01-01-2011' AND '31-01-2011' , Also i cant able to check cond with between, ???? ExpenditureDate -- DATE type![enter image description here](https://i.stack.imgur.com/YzEtR.jpg) Below query Displaying correctly , latest dates are coming top and one by one ``` SELECT ExpenditureName,ExpenditureAmount,ExpenditurePlaceTypeWhome,ExpenditureDate FROM tblexpenditure WHERE Status=1 AND EntryUser=2 ORDER BY ExpenditureDate DESC ``` but if i add date_format(ExpenditureDate,'%d-%m-%Y') as ExpenditureDate Then loose my proper order, it displaying inordered ``` SELECT ExpenditureName,ExpenditureAmount,ExpenditurePlaceTypeWhome,date_format(ExpenditureDate,'%d-%m-%Y') as ExpenditureDate FROM tblexpenditure WHERE Status=1 AND EntryUser=2 ORDER BY ExpenditureDate DESC ```
order by problem in date type
CC BY-SA 2.5
null
2011-02-03T16:58:47.427
2011-02-03T17:18:27.700
2011-02-03T17:18:27.700
246,963
246,963
[ "mysql" ]
4,889,189
1
4,890,693
null
3
14,021
why does this code produce this graph? ``` digraph { rankdir = TB; 1 -> 2 -> 3 -> 1; } ``` ![](https://i.stack.imgur.com/o9XDe.jpg) How can I get graphviz/dot to produce a clockwise direction like this? ![](https://i.stack.imgur.com/JSPoy.jpg) This is the final graph I want to generate (afaik logically correct this way) ``` digraph { rankdir = TB start -> 1 1 -> 2 -> 3 -> 1 3 -> end 3 -> increment end -> product {rank = same; 2; 3; increment} {rank = same; end; product} } ``` Which produces this result ![](https://i.stack.imgur.com/xtbpL.jpg) While I want this ![](https://i.stack.imgur.com/1qO3K.jpg) Thanks
Why does a top to bottom graphviz dot graph get layed out counter clockwise?
CC BY-SA 2.5
0
2011-02-03T17:03:02.177
2011-02-04T09:37:28.687
2011-02-04T09:37:28.687
192,107
192,107
[ "graphviz", "dot" ]
4,889,230
1
null
null
0
7,732
I have this html file ``` <div class="con" style="width:100px;height:200px;"> 1 </div> <div class="con" style="width:100px;height:200px;"> 2 </div> <div class="con" style="width:100px;height:400px;"> 3 </div> <div class="con" style="width:100px;height:400px;"> 4 </div> <div class="con" style="width:100px;height:100px;"> 5 </div> <div class="con" style="width:100px;height:100px;"> 6 </div> <div class="con" style="width:100px;height:100px;"> 7 </div> <div class="con" style="width:100px;height:100px;"> 8 </div> ``` And I want with this html have this result : ![Html result](https://i.stack.imgur.com/uiPIV.png) But I write this css : ``` <style> body { width:440px; height:440px; } .con{ float:left; background:#bebebe; margin:1px; } </style> ``` And I got this result! :-( ![enter image description here](https://i.stack.imgur.com/2lBZD.png) I repeat that I would have the result of the first image using only the html code that I wrote.
CSS Block float left
CC BY-SA 2.5
null
2011-02-03T17:06:39.663
2012-05-10T14:19:07.173
2020-06-20T09:12:55.060
-1
337,395
[ "css", "css-float" ]
4,889,309
1
4,901,439
null
2
82
I'll be very specific here. If you go to [UtahRealEstate.com](http://www.utahrealestate.com) and do a search and look at the results in the map view, there are plots all over the map and listings off to the right. If you click a pin on the map you get a pop-up, then click the MLS # and you get another popup with the property description. You can also click the MLS number on a listing on the right and open a property description popup. I want to add a button in the html of that popup. I can insert the html fine, but the challenge is, how do I determine when that property description has loaded so I can then read the html inside it and add my button? Screenshots: ![enter image description here](https://i.stack.imgur.com/h44ha.png) ![enter image description here](https://i.stack.imgur.com/KkoAG.png) ![enter image description here](https://i.stack.imgur.com/21qz8.png)
Working with KRL & Ajax
CC BY-SA 2.5
null
2011-02-03T17:14:13.747
2011-02-04T20:42:06.920
2011-02-03T22:32:08.417
117,068
292,709
[ "javascript", "ajax", "krl" ]
4,889,496
1
4,890,139
null
0
189
Given the following equation: ![sum on j (Aij * Xj)=bi i,j=1:N](https://i.stack.imgur.com/MVJg9.png) It will be 3N linear equations. Each `Aij` is a 3x3 matrix. `Xj` s are 3x1 unknowns. And `bi` s are known 3x1 matrix. How can I Combine 3x3 matrix to build a 3Nx3N matrix? I'm trying to find a method to work out this question.
3N linear Equations
CC BY-SA 2.5
null
2011-02-03T17:32:33.647
2011-02-03T18:35:28.483
2011-02-03T17:56:25.477
97,160
601,908
[ "matlab", "linear-algebra" ]
4,889,634
1
4,889,827
null
3
3,244
I have 2 curves illustrated with the following Mathematica code: ``` Show[Plot[PDF[NormalDistribution[0.044, 0.040], x], {x, 0, 0.5}, PlotStyle -> Red], Plot[PDF[NormalDistribution[0.138, 0.097], x], {x, 0, 0.5}]] ``` ![Mathematica graphics](https://i.stack.imgur.com/jgkJ6.png) I need to do 2 things: 1. Find the x and y coordinates where the two curves intersect and 2. Find the area under the red curve to the right of the x coordinate in the above intersection. I haven't done this kind of problem in Mathematica before and haven't found a way to do this in the documentation. Not certain what to search for.
Find intersection of 2 curves & area under a curve to the right of the intersection w/ Mathematica
CC BY-SA 3.0
0
2011-02-03T17:44:51.457
2012-01-03T20:24:51.383
2012-01-03T20:24:51.383
615,464
591,235
[ "wolfram-mathematica", "calculus" ]
4,889,779
1
4,889,936
null
0
793
What options do I have when creating menu with options (contextual menus). What is allowed and what does Apple provide? I have a toolbar with buttons and a click of a button opens a menu with options: Examples: ![enter image description here](https://i.stack.imgur.com/1UOn0.png)
iPhone option menus
CC BY-SA 2.5
null
2011-02-03T17:56:48.270
2011-02-03T18:15:02.547
null
null
132,257
[ "iphone", "menu", "contextmenu", "optionmenu" ]
4,889,972
1
4,890,036
null
0
665
I have a C# project that references a C++/CLI mixed mode assembly. That assembly is stored inside a folder into the PATH and it is also present at the GAC but when it is executed I get a: System.IO.FileNotFoundException: Could not load file or assembly 'PcsSocketCommunications500, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' The version 0.0.0.0 is because the C++/CLI does not has an Assembly version class but as far as I know this shouldn't be a problem. Running process monitor I've seen that the system just looks for the assembly at the same folder as the main process ... I'm not an expert of assembly loading but I expected to see at least some GAC searchs and 'maybe' some PATH searchs .. That's what I got (PcsSocketCommunication500.dll is the C++/CLI assembly and in black it's the working directory): ![enter image description here](https://i.stack.imgur.com/tk8IV.jpg) Any idea about why the loader is not checking the GAC or the PATH?
Why the assembly loader is not checkin the GAC for a C++/CLI mixed mode assembly?
CC BY-SA 2.5
null
2011-02-03T18:14:48.627
2011-02-03T18:32:40.237
2011-02-03T18:32:40.237
507,256
166,452
[ "c++-cli", "classloader", "mixed-mode", ".net-assembly" ]
4,890,010
1
4,890,305
null
0
740
I'm working on a project for an Artist, the project has been passed to me as the design has been completed. I have receieved the design in a .psd file and the size is huuuuuuuge 2504px x 1781px to be exact! As there are lots of patterns and gradients on it, I'm a little unsure as to how to set the image up. I have put the image up online, I think the first pressing thing is to resize it to suit more modern screen sizes. The image is attached, Any help or suggestions on how to manage the image are much appreciated. ![Background Image](https://i.stack.imgur.com/fAy5S.jpg) Cheers
CSS Background Image
CC BY-SA 2.5
null
2011-02-03T18:17:35.570
2011-02-03T19:20:50.743
null
null
265,431
[ "css", "xhtml" ]
4,890,123
1
4,899,742
null
4
3,274
Why is the ? I configure with . The is quite simple: - - - - - - - It could be a basic mapping mistake, as it's my first take on NHibernate. I want , and thought that by setting Inverse on the Store.Staff property, then Store table would be responsible for saving, and hence the aggregate root. Is that a misconception? Actually if I use Inverse or not I still get the same result. So maybe that's not the problem, but I would like to understand that too. ``` class EmployeeRepository public static void Delete(Employee employee) { using (ISession session = FNH_Manager.OpenSession()) { using (ITransaction transaction = session.BeginTransaction()) { if (employee.Id != 0) { var emp = session.Get(typeof(Employee), employee.Id); if (emp != null) { session.Delete(emp); transaction.Commit(); } } } } } ``` ``` public class StoreMap : ClassMap<Store> { public StoreMap() { Id(x => x.Id); Map(x => x.Name); HasMany(x => x.Staff) // 1:m .Inverse() // tried both with and without, what is correct? .Cascade.All(); HasManyToMany(x => x.Products) // m:m .Cascade.All() .Table("StoreProduct"); } } public class EmployeeMap : ClassMap<Employee> { public EmployeeMap() { Id(x => x.Id); // By default an int Id is generated as identity Map(x => x.FirstName); Map(x => x.LastName); References(x => x.Store); // m:1 } } public class ProductMap : ClassMap<Product> { public ProductMap() { Id(x => x.Id).GeneratedBy.Identity(); Map(x => x.Name).Length(20); Map(x => x.Price).CustomSqlType("decimal").Precision(9).Scale(2); HasManyToMany(x => x.StoresStockedIn) .Cascade.All() .Inverse() .Table("StoreProduct"); } } ``` ``` public class Store { public int Id { get; private set; } public string Name { get; set; } public IList<Product> Products { get; set; } public IList<Employee> Staff { get; set; } public Store() { Products = new List<Product>(); Staff = new List<Employee>(); } // AddProduct & AddEmployee is required. "NH needs you to set both sides before // it will save correctly" ?? public void AddProduct(Product product) { product.StoresStockedIn.Add(this); Products.Add(product); } public void AddEmployee(Employee employee) { employee.Store = this; Staff.Add(employee); } } public class Employee { public int Id { get; private set; } public string FirstName { get; set; } public string LastName { get; set; } public Store Store { get; set; } } ``` Program startup Load: Stores stores = StoreRepository.GetAll() Add parent: Add store to empty collection stores Save: StoreRepository.SaveOrUpdate(stores) Load: stores = StoreRepository.GetAll() Add child: to empty child collection, for selected store Save: StoreRepository.SaveOrUpdate(stores) Load: stores = StoreRepository.GetAll() Delete child: (Delete Employee for selected store) EmployeeRepository.Delete(employee) Load: stores = StoreRepository.GetAll() (no result, database is empty) --- Program startup Load: Stores stores = StoreRepository.GetAll() Add parent: Add store to empty collection stores Save: StoreRepository.SaveOrUpdate(stores) Load: stores = StoreRepository.GetAll() Add child: to empty child collection, for selected store Save: StoreRepository.SaveOrUpdate(stores) Load: stores = StoreRepository.GetAll() Delete child: (Delete Employee for selected store) EmployeeRepository.Delete(employee) Load: stores = StoreRepository.GetAll() (Still; no result, database is empty) Store collection and child collection of selected store is bound to BindingSource/DataGridView/BindingNavigator like this: ![enter image description here](https://i.stack.imgur.com/Aq6Z1.png) --- ``` private static ISessionFactory CreateSessionFactory() { if (sessionFactory == null) { return Fluently.Configure() .Database(MsSqlConfiguration.MsSql2008 .ConnectionString(Properties.Settings.Default.FnhDbString) .Cache(c => c .UseQueryCache()).ShowSql()) .Mappings(m => m.FluentMappings.AddFromAssemblyOf<EmployeeMap>() .Conventions.Add(FluentNHibernate.Conventions.Helpers.DefaultLazy.Never()) .Conventions.Add(FluentNHibernate.Conventions.Helpers.DefaultCascade.All()) .ExportTo("D:/VB/")) .ExposeConfiguration(c => cfg = c) .BuildSessionFactory(); } return sessionFactory; } ``` --- I have now tried all different mappings below (1-6). Without cascade-convention, I get exception on all alternatives. Am I ? I thought it should not be required. --- Findings to above exceptions: 1) Store is aggregate root ( No Inverse set). Since no cascade: I need to handle added children manually on saving aggregate. (OK) 2) Employee is aggregate root (Inverse set). Still, since no cascade: I need to handle added Employee manually, simply because the stores collection contain both persistent and transient entities. So the clue of 1 and 2 is simply that cascade = none. Inverse is irrelevant. (OK) 3) Store is aggregate root (No inverse set). Cascade=all, and it works in both directions, not only from the aggregate root? So we can not delete the child without first removing it's reference to the parent. (Maybe OK). 4) Same reason as 3. Inverse makes no difference on the cascade. (Maybe OK) 5) Same reason as 3. 6) Same as 1. If this is the conclusion. Then it means we are forced to remove the reference between bidirectional entities before delete of child. No matter the setting of Inverse. So: ? --- (breathe..) Even setting the It still gives : deleted object would be re-saved by cascade (remove deleted object from associations)[FNHib_Test.Entities.Employee#1] This was with mapping; ``` public static void Delete(Employee employee) { using (ISession session = FNH_Manager.OpenSession()) { using (ITransaction transaction = session.BeginTransaction()) { employee.Store = null; if (employee.Id != 0) { // var emp = session.Get(typeof(Employee), employee.Id); Employee emp = session.Get<Employee>( employee.Id); if (emp != null) { emp.Store = null; session.Delete(emp); transaction.Commit(); } } } } } ``` I wonder if there can be a problem related to the entity-Id's not being set when I save transient instances. This is why I Load after each Save. But I don't know why they are not set. As I described here: [NHibernate: How is identity Id updated when saving a transient instance?](https://stackoverflow.com/questions/4896001/nhibernate-how-is-identity-id-updated-when-saving-a-transient-instance)
NHibernate; Deleting child deletes parent?
CC BY-SA 2.5
null
2011-02-03T18:26:39.373
2011-02-04T21:02:21.863
2017-05-23T10:30:21.840
-1
445,533
[ "c#", ".net", "database", "nhibernate", "fluent-nhibernate" ]
4,890,741
1
9,626,377
null
1
1,477
do you know what is the default cell's font showed in the UITableView of the Interface Builder? This one: ![enter image description here](https://i.stack.imgur.com/zG2Z7.png) When I'm running the simulator I'm not getting that font. Thanks a lot.
Default font in UITableViewCells
CC BY-SA 3.0
null
2011-02-03T19:30:49.093
2015-04-01T09:41:00.087
2015-04-01T09:41:00.087
3,766,168
591,266
[ "iphone", "fonts", "tableview" ]
4,890,818
1
4,891,923
null
1
227
I am trying to reference a project in my main project. I am a .NET developer so I am having a hard time knowing the correct way to reference it. I have a data project and a data project in a MAVEN multiple project setup. In the screenshot you can see I am trying to reference a DAO object from my data project in the security.xml file in my Spring MVC web project. When I run the project it says it can not find the correct class. ![enter image description here](https://i.stack.imgur.com/nUyz9.png)
Reference External Project in Spring Configuration
CC BY-SA 2.5
null
2011-02-03T19:39:17.827
2011-02-03T21:26:48.103
null
null
280,602
[ "spring", "spring-security" ]
4,890,805
1
4,910,809
null
5
1,940
I'd like to highlight my toolbar icons when their associated action has it's "checked" property set to true. I'd like to do it in a manner similar to how Microsoft Office 2003 did it, e.g. see the Bold and Align Left icons in this image: ![Toolbar example](https://i.stack.imgur.com/UkuXD.gif) The image is drawn with a box around it and the background has been changed to orange. How could I implement this using Delphi 2009? As a bonus, is there also a way to do the same thing with the icon in the menu for the associated item? e.g. as below with the Ruler and Markup entries: ![Menu example](https://i.stack.imgur.com/DLIHY.gif) --- Followup: Thank you Andreas, for what is a simple and correct answer to my question. As a Delphi 4 programmer converted to Delphi 2009, I was not familiar enough with the VCL additions of Delphi 5 to 7, so the TActionManager, TActionToolbar and their workings were not in my Delphi vocabulary. And this is based on Delphi's ability to use a style that is akin to a Microsoft O/S's theme. However, with your answer, and a bit of research using it, I confirm that I do not want to do this in this manner. An illuminating Embarcadero thread re: Popup menus: ["Checked" items with icon no longer shown as sunken?](https://forums.embarcadero.com/thread.jspa?messageID=310325) with Peter Below contributing his expertise, made me realize that I don't want to change to the XP theme at all, since that will do baaaaad things to Vista and Windows 7 users, taking them back to the Bronze Age. The true culprit here is that there are certain things that the O/S themes want you to respect. Delphi tries to follow the rules. I can go back to XP, the XP style/theme, and the XP Color Map. In this mode, checked items will be hilighted. And this is really all I wanted - to highlight the checked items. I used Office 2003 as an example, because it was the sort of hilighting I wanted. But I really didn't want to entirely change themes and force an entire new look on my program. It would especially make things look unnatural for Vista and Windows 7 users. What would be ideal is if I could have another set of Images that would apply when the object is Checked ... but there is not a "CheckedImages" property. Or a way of programmatically or automatically modifying the image if it is checked (e.g. like disabled images get a grayscale version of their enabled image). I still wouldn't mind hearing from anyone if there are any ways to implement this or something else that might work equally well, without changing the entire look of my program.
How Can I Implement Highlighted Toolbar Icons With Delphi?
CC BY-SA 2.5
0
2011-02-03T19:38:00.163
2019-07-30T11:37:58.473
2011-02-04T03:20:38.183
30,176
30,176
[ "delphi", "user-interface", "menu", "toolbar" ]
4,890,900
1
4,891,271
null
3
6,591
I have a basic UITableView that I want to enable the style check marks while having no selection style. I have the following snippet: ``` #define UITableViewCellEditingStyleMultiSelect (3) - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewCellEditingStyleMultiSelect; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } ``` However, this will never display the check marks on selection (although the empty circles are displayed). Any ideas on how to fix it? I know it uses undocumented features but I'd really like to add support for the check marks. My actual example uses a very customized `UITableViewCell` and I can't enable the selection style! ![sample table view](https://i.stack.imgur.com/UZcPK.png)
Multi Select Table View Cell and no Selection Style
CC BY-SA 2.5
0
2011-02-03T19:46:48.370
2011-02-03T20:21:29.307
null
null
259,900
[ "iphone", "cocoa-touch", "uitableview" ]
4,891,431
1
null
null
2
1,020
Is there any way to disable the inane popup which appears when the mouse hovers over code? ![inane popup](https://i.stack.imgur.com/r3HHk.png)
Flash Builder + Eclipse: disable mouse hover popup?
CC BY-SA 2.5
0
2011-02-03T20:37:37.520
2011-02-03T21:54:14.163
null
null
71,522
[ "eclipse", "flash-builder" ]
4,891,663
1
4,891,786
null
2
4,591
I currently have an issue where Firefox is taking away 1-2 pixels of padding around some text which is in a div. Before writing too much, I will show some pics and post the code so you know what I mean. It might just be the way Firefox renders. Anywho code and pics below: Chrome/Safari/Ie Screen: ![enter image description here](https://i.stack.imgur.com/PPzGM.png) Firefox Screen: ![enter image description here](https://i.stack.imgur.com/LoBfy.png) And here is the code: html page: ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head> <title>Test Page One</title> <LINK REL=StyleSheet HREF="stylesheets/test.css" TYPE="text/css" MEDIA=screen> </head> <body> <div class="single_label blue_label">Test<div class="remove"></div></div> </body> </html> ``` Css: ``` .single_label{ float: left; padding-right: 5px; padding-left: 7px; height: 14px; color: black; font-size: 10px; font-family: Helvetica, Verdana, Arial, sans-serif; text-align: left; width: 74px; vertical-align: bottom } .blue_label { background-color: #3acbff; -moz-border-radius: 4px; border-radius: 4px; } ``` So can anyone tell me why Firefox is rendering like this and how to fix this?
Padding issue in Firefox?
CC BY-SA 3.0
0
2011-02-03T20:58:43.887
2013-10-21T11:11:31.623
2013-10-21T11:11:31.623
1,591,233
599,018
[ "html", "css", "firefox", "padding" ]
4,891,711
1
4,892,344
null
3
5,841
Is it possible to programatically, or via xml configuration (and not via 9patch png), to achieve the effects as seen on Springpad widget: ![enter image description here](https://i.stack.imgur.com/8pNRq.jpg) If you look closely, there's a sharp border/line between the upper (brighter) and lower (darker) gradients. Also, there are inner and outer shadows for that embossed area on the right. I know how to set gradient background on a button, but that gradient is constant, without that sharp line in the middle. Also, I couldn't find any reference on shadow creation and manipulation. Thanks.
Gradients and shadows on buttons
CC BY-SA 3.0
0
2011-02-03T21:03:17.317
2012-04-10T10:05:27.310
2012-04-10T10:05:27.310
593,709
501,638
[ "android", "android-widget" ]
4,891,832
1
4,891,932
null
0
1,471
I have built my new website in Visual Studio 2010 (C# - ASP.NET 4). Back when I started the project, I selected "ASP.NET Web Application" in the 'New Project' window. I have also just gotten a new web host / domain, where I will put my website. And yes, the server does support ASP.NET 4. I wanted to make a small "test project", to see if my final website would work as well. Problem is, I can't even make this small test project work on the server. If you have Visual Studio installed, you can follow these steps if you like, but I will write what happens too: - - - - - - `<customErrors mode="Off"/>`- - - - I get this error: ![enter image description here](https://i.stack.imgur.com/T7db3.jpg) In the file "Web.config". Please, I have no idea how to fix this and please let me know any info on how to get my test site up and running.
C# website built in Visual Studio 2010 doesn't work on server
CC BY-SA 2.5
null
2011-02-03T21:16:27.587
2011-11-14T15:10:49.407
null
null
554,002
[ "c#", "visual-studio-2010", "publishing" ]
4,891,933
1
4,891,939
null
4
420
How do I structure my meta data or site map in a way that when my site is googled the result can be displayed like the image displayed? What is the code that I would need to use to achieve this? ![enter image description here](https://i.stack.imgur.com/ql57k.jpg)
How do I code my meta data to allow my site when googled to display meta description and links
CC BY-SA 3.0
null
2011-02-03T21:27:46.600
2017-08-26T16:37:06.697
2012-06-16T18:34:29.953
210,916
495,874
[ "html", "xml", "seo", "sitemap", "meta-tags" ]
4,891,955
1
4,892,073
null
11
7,545
Just moved from VS2010 Professional to Premium. When I hit a failing Assert using MSTEST, it doesn't stop in the debugger anymore (it does produce a correct fail in the Test Results) How to get the debugger to stop on the failing assert when I run tests ![enter image description here](https://i.stack.imgur.com/LT2yr.png)
Visual Studio - Assert not stopping when fails
CC BY-SA 2.5
0
2011-02-03T21:30:24.620
2011-02-03T21:42:52.917
2011-02-03T21:42:52.917
23,283
26,086
[ "visual-studio", "visual-studio-2010", "mstest" ]
4,892,005
1
4,892,066
null
0
138
So I have my web page, [http://vercas.webuda.com](http://vercas.webuda.com), which works only on Opera, at least for all my computers and my friend's. Well, more precisely, the CSS and JS only work on Opera. Other browsers see the standard HTML tags style. Can anybody help me, please? You may see the source with any browser... And I can also send someone the files via email. One more thing, please tell me if this is not the right place to post. Edit: Here are the screenshots: ![Internet Explorer View](https://i.stack.imgur.com/53MKk.png) ![Opera View](https://i.stack.imgur.com/xoyCm.png)
My page only works in Opera!
CC BY-SA 2.5
null
2011-02-03T21:35:06.693
2011-02-03T21:41:59.340
2011-02-03T21:40:54.557
485,098
485,098
[ "cross-browser", "html" ]
4,892,457
1
4,893,126
null
3
1,566
I'm trying to configure a second Eclipse installation to access the Eclipse WTP sources. I think I'm doing exactly what I did successfully in another installation, but I get the following error:![enter image description here](https://i.stack.imgur.com/ootBe.png) Any ideas?
Eclipse CVS setup problem - Error validating location
CC BY-SA 2.5
null
2011-02-03T22:25:35.623
2011-02-03T23:53:02.743
null
null
556,617
[ "eclipse", "cvs", "eclipse-wtp" ]
4,892,532
1
4,892,557
null
3
22,893
I realize my title probably doesnt explain my situation very well, but I honestly have no idea how to word this. I am using SQL to access a DB2 database. Using my screenshot below as a reference: column 1 has three instances of "U11124", with three different descriptions (column 2) I would like this query to return the first instance of "U11124" and its description, but then also unique records for the other rows. 2 shows my desired result. ![image1](https://i.stack.imgur.com/5wiqf.jpg) ![image2](https://i.stack.imgur.com/fqI5b.jpg) ----- EDIT ---- to answer some of the questions / posts: technically, it does not need to be the first , just any single one of those records. the problem is that we have three descriptions, and only one needs to be shown, i am now told it does not matter which one.
SQL select first records of rows for specific column
CC BY-SA 2.5
null
2011-02-03T22:34:27.273
2016-12-07T18:39:22.180
2011-02-03T22:45:46.423
558,552
558,552
[ "sql", "db2" ]
4,892,877
1
5,670,942
null
0
1,385
I'm struggling with an odd one. I see the Layered Navigation headers Category, Price, etc... But no clickable sub options, even though I can see products that fall into each right in front of me. I have a category called Projectors with two sub categories called Red and Blue. Projectors is an anchor and has no products of its own. Red and Blue have products assigned to them and both categories appear in the drop down navigation at the top. When navigating to Projectors, you see all of the sub products and the layered navigation headers, but no sub categories or price brackets. What am I doing wrong? ![Missing Filter Options](https://i.stack.imgur.com/PhUHx.png) Rich
Layered navigation headers showing, but no sub categories or price ranges
CC BY-SA 2.5
0
2011-02-03T23:16:31.663
2011-04-14T23:42:43.170
null
null
110,010
[ "magento", "navigation" ]
4,892,868
1
4,893,154
null
1
699
This is something I've never been able to figure out. You've got a button offscreen you want to animate in. We'll call it 'btn.' You've got a hit area that serves as the proximity sensor to trigger btn's animation. We'll call it 'hitZone' (as to not cause confusion with the hitArea property of display objects). ![btn is off stage and hitZone is the white box with the blue border](https://i.stack.imgur.com/C1wv7.png) Both btn and hitZone are MovieClips. The listeners go something like this. ``` import com.greensock.*; import com.greensock.easing.*; import flash.events.MouseEvent; var endPoint:Number = 31; hitZone.addEventListener(MouseEvent.ROLL_OVER, onHitZoneOver); hitZone.addEventListener(MouseEvent.ROLL_OUT, onHitZoneOut); hitZone.addEventListener(MouseEvent.CLICK, onHitZoneClick); btn.addEventListener(MouseEvent.ROLL_OVER, onBtnOver); btn.addEventListener(MouseEvent.ROLL_OUT, onBtnOut); btn.addEventListener(MouseEvent.CLICK, onBtnClick); btn.mouseChildren = false; function onHitZoneOver(e:MouseEvent):void { TweenLite.to(btn, 0.75, {x:endPoint, ease:Expo.easeOut}); trace("over hitZone"); } function onHitZoneOut(e:MouseEvent):void { TweenLite.to(btn, 0.75, {x:-1, ease:Expo.easeOut}); trace("out hitZone"); } function onBtnOver(e:MouseEvent):void { hitZone.mouseEnabled = false; hitZone.removeEventListener(MouseEvent.ROLL_OVER, onHitZoneOver); hitZone.removeEventListener(MouseEvent.ROLL_OUT, onHitZoneOut); trace("over BTN"); // This line is the only thing keeping the btn animation from being fired continuously // causing jumpiness. However, calling this allows the animation to be interrupted // at any point. TweenLite.killTweensOf(btn); } function onBtnOut(e:MouseEvent):void { hitZone.mouseEnabled = true; hitZone.addEventListener(MouseEvent.ROLL_OVER, onHitZoneOver); hitZone.addEventListener(MouseEvent.ROLL_OUT, onHitZoneOut); trace("out BTN"); } function onBtnClick(e:MouseEvent):void { trace("click BTN"); } function onHitZoneClick(e:MouseEvent):void { trace("click hitZone"); } ``` The issue is when your mouse is over both the hitZone btn. The button continuously jumps unless you call TweenLite.killAllTweensOf(). This fixes the jumpiness, but it introduces a new problem. Now, it's very easy to interrupt the animation of the btn at any point, stopping it before it's totally visible on the stage. I've seen [similar](http://www.kirupa.com/forum/showthread.php?t=350932) posts, but even they suffer from the same issue. Perhaps it's a problem with how Flash detects edges, because I've never once seen a workaround for this.
How can you prevent both jumpiness, and interrupting tweens with animated Flash buttons?
CC BY-SA 2.5
null
2011-02-03T23:15:03.003
2011-02-03T23:56:47.580
2011-02-03T23:22:16.933
398,574
398,574
[ "flash", "actionscript-3" ]
4,893,776
1
4,893,788
null
2
739
Ok, so on my website, I have nested divs. Using my code, I shift them like so: ``` float:left; position:relative; top: 5em; left: -4em; margin-left: auto; margin-right: auto; ``` So, when the website loads, everything is in the right place. However, other content is still affected by where the div USED to be. Which, I'll just refer to as a "ghost div" I'm sure this is a common problem, but I have no idea how to phrase it properly so I have been unable to search for the right issue. Example: ![Ghost Div](https://i.stack.imgur.com/eRIBp.png)
Shifted divs still take up original space?
CC BY-SA 2.5
0
2011-02-04T01:49:06.243
2011-02-04T02:01:36.457
null
null
573,634
[ "html", "css" ]
4,893,783
1
4,894,955
null
0
778
I am using the following XML for tabs and this displays the tab at the bottom. However the tabs are being overlapped by the list and i cannot access any tab feature. The picture might be able to explain it better. ![enter image description here](https://i.stack.imgur.com/s0W7o.png) The list is draw over the tab. I appreciate any suggestions of bringing the tab to the front XML: ``` ![<TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RelativeLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <View android:layout_width="fill_parent" android:layout_height="0.5dip" android:background="#000"/> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="0dip" android:layout_marginRight="0dip" android:layout_alignParentBottom="true" /> <View android:layout_width="fill_parent" android:layout_height="2dip" android:background="#696969" /> <View android:layout_width="fill_parent" android:layout_height="2dip" android:background="#000" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </RelativeLayout> </TabHost>][1] ```
Android + Bringing Tab to Front
CC BY-SA 2.5
null
2011-02-04T01:50:22.683
2019-12-06T18:49:55.253
null
null
539,401
[ "android", "user-interface", "tabs" ]
4,894,109
1
4,894,127
null
2
660
![enter image description here](https://i.stack.imgur.com/SSvur.jpg) Guys I am new to data structures.Most of the time in books and references i see this structure for a binary tree ``` struct btree { int data; struct btree *left; struct btree *right; }; ``` But in above image it would be like ``` struct btree { int data; struct btree *left; struct btree *right; struct btree *parent; }; ``` So my question is that is it dependent on programmer to choose the structure of a node of a tree (for e.g also including a pointer to the parent )or we can have only two pointers one to the left child and other to the right child.
Binary Trees in c
CC BY-SA 3.0
null
2011-02-04T02:54:59.903
2012-01-07T09:07:55.940
2012-01-07T09:07:55.940
507,519
462,445
[ "c", "tree", "binary-tree" ]
4,894,274
1
4,899,304
null
2
657
![enter image description here](https://i.stack.imgur.com/L6sKD.png) How do I reproduce the two buttons at the bottom of the Twitter app in this screenshot (Update and Cancel)? You can see a similar design pattern in the official Facebook app too when creating a Facebook message. Are they created with 9 patch images or is it something easier than that (setting a background color and somehow keeping border/state press color changes to orange). This would be really simple if Twitter had open sourced their official Android app like they said they would (but never did).
How can I reproduce these buttons found in the official Twitter app?
CC BY-SA 2.5
0
2011-02-04T03:27:05.137
2011-02-04T14:48:24.087
null
null
396
[ "android", "image", "button" ]
4,894,329
1
4,894,569
null
6
20,385
I'm trying to add a horizontal line on top to divide the header text from the actual values in my pdf file: ![enter image description here](https://i.stack.imgur.com/CJixV.jpg) Here's my code: ``` public class StudentList { public void PrintStudentList(int gradeParaleloID) { StudentRepository repo = new StudentRepository(); var students = repo.FindAllStudents() .Where(s => s.IDGradeParalelo == gradeParaleloID); try { Document document = new Document(PageSize.LETTER); PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\\Alumnos.pdf", FileMode.Create)); document.Open(); PdfContentByte cb = writer.DirectContent; cb.SetLineWidth(2.0f); // Make a bit thicker than 1.0 default cb.SetGrayStroke(0.95f); // 1 = black, 0 = white cb.MoveTo(20, 30); cb.LineTo(400, 30); cb.Stroke(); PdfPTable table = new PdfPTable(3); float[] widths = new float[] { 0.6f, 0.75f, 2f }; table.SetWidths(widths); PdfPCell numeroCell = new PdfPCell(new Phrase("Nro.")); numeroCell.Border = 0; numeroCell.HorizontalAlignment = 0; table.AddCell(numeroCell); PdfPCell codigoCell = new PdfPCell(new Phrase("RUDE")); codigoCell.Border = 0; codigoCell.HorizontalAlignment = 0; table.AddCell(codigoCell); PdfPCell nombreCell = new PdfPCell(new Phrase("Apellidos y Nombres")); nombreCell.Border = 0; nombreCell.HorizontalAlignment = 0; table.AddCell(nombreCell); int c = 1; foreach (var student in students) { PdfPCell cell = new PdfPCell(new Phrase(c.ToString())); cell.Border = 0; cell.HorizontalAlignment = 0; table.AddCell(cell); cell = new PdfPCell(new Phrase(student.Rude.ToString())); cell.Border = 0; cell.HorizontalAlignment = 0; table.AddCell(cell); cell = new PdfPCell(new Phrase(student.LastNameFather + " " + student.LastNameMother + " " + student.Name)); cell.Border = 0; cell.HorizontalAlignment = 0; table.AddCell(cell); c++; } table.SpacingBefore = 20f; table.SpacingAfter = 30f; document.Add(table); document.Close(); } catch (DocumentException de) { Debug.WriteLine(de.Message); } catch (IOException ioe) { Debug.WriteLine(ioe.Message); } } } ``` I don't understand why the cb.Stroke() isn't working. Any suggestions?
Code isn't drawing a horizontal line in my PDF
CC BY-SA 2.5
0
2011-02-04T03:37:33.363
2011-02-04T04:40:52.013
null
null
null
[ "c#", "itext" ]
4,894,790
1
4,895,415
null
0
303
As I was browsing through Stack Overflow, I had to flag something to the mods. While doing so, I saw a wonderfully designed popup and I have shamelessly ported that. :) ![enter image description here](https://i.stack.imgur.com/DY79W.png) Now I would like to have a modal associated with it. I would like to have a generic solution. My questions are: 1. Can jQuery UI dialog be themed like this easily or shall I go with blockui? 2. Is it illegal to copy this style from Stack Overflow? Also I didnt see any plugins used by SO for this. Have they implemented their own popup? Update: I would like to use jQueryUI dialog as I really would like to implement explode on hide. ``` hide: "explode" ```
Implementing Stack Overflow flag like modal
CC BY-SA 3.0
0
2011-02-04T05:12:08.423
2014-02-22T23:10:48.213
2014-02-22T23:10:48.213
578,411
17,447
[ "jquery", "jquery-ui", "modal-dialog", "blockui" ]
4,895,177
1
4,895,311
null
0
248
In my app, i need to show two datas in each titles of a table view like this ![enter image description here](https://i.stack.imgur.com/NHrjC.png) In left side the day & in right side the date will be shown. The problem here is, the day & dates are not properly aligned because of variations in letters. The day should be left aligned whereas the date should be right aligned. What should i do to get this? Please give a brief explanation Thanks in Advance
How to customize the title of a table view?
CC BY-SA 2.5
null
2011-02-04T06:25:46.430
2011-02-04T06:48:35.943
null
null
null
[ "iphone", "uitableview", "alignment", "customization", "title" ]
4,895,301
1
4,895,360
null
1
523
I am trying to implement something similar to a functionality on Stack Overflow. On a user's profile page, where there are listed the Answers by user, when you click on the link to question, you are redirected to the question page and the answer is highlighted. ![Answer by a user](https://i.stack.imgur.com/8zrYN.png) This works even if the answer clicked on happens to be lying on like 2nd page below, the page is displayed. ![Paged answer](https://i.stack.imgur.com/yUi0N.png) How can I implement this? The only way I can think of right now is by implementing the following steps: When listing the answers by a user.. - - - - But this seems very memory-consuming process. Is there an easier way to do this?
Stack Overflow functionality how-to: create link to user's answer on OP's questⅰon from user's profile page
CC BY-SA 3.0
0
2011-02-04T06:47:55.877
2014-02-22T23:10:35.790
2014-02-22T23:10:35.790
578,411
206,613
[ "mysql" ]
4,895,395
1
4,895,470
null
0
285
When am using build and analyse method the following error occurs:- `/Users/ghost/demo/libs/cocos2d/CCSprite.m:476:2 Assigned value is garbage or undefined` in:- `-(void)updateTransform` method am getting above error here is my screenshot for this error:- ![enter image description here](https://i.stack.imgur.com/y7qwJ.png) Is it my fault that the program is leaking memory or in cocos2d libraries leaking memory. recently i asked question regarding this same issue refer the link :- [memory leakage in system libraries](https://stackoverflow.com/questions/4863977/memory-leakage-in-system-libraries) how to rectify this issue:-
CCsprite.m am getting analyser error in Cocos2d
CC BY-SA 2.5
0
2011-02-04T07:02:10.957
2011-02-04T07:17:47.253
2017-05-23T10:30:23.117
-1
554,683
[ "iphone", "objective-c", "xcode", "cocos2d-iphone" ]
4,895,427
1
null
null
1
534
Do we have any roadMap UI in jQuery or asp.net I am not sure about the UI name but the UI will look like ![enter image description here](https://i.stack.imgur.com/BgFi6.jpg) I have seen the same kind of UI in SAP where every step will be highlightened in the complete process
RoadMap(?) UI in jQuery/ asp.net
CC BY-SA 2.5
0
2011-02-04T07:06:42.730
2011-02-04T22:51:52.407
null
null
2,922,388
[ "javascript", "asp.net", "jquery-ui", "user-interface", "asp.net-webcontrol" ]
4,895,465
1
4,913,615
null
53
58,413
I'm working with the Code First feature of Entity Framework and I'm trying to figure out how I can specify the column data types that should be created when the database is auto-generated. I have a simple model: ``` public class Article { public int ArticleID { get; set; } public string Title { get; set; } public string Author { get; set; } public string Summary { get; set; } public string SummaryHtml { get; set; } public string Body { get; set; } public string BodyHtml { get; set; } public string Slug { get; set; } public DateTime Published { get; set; } public DateTime Updated { get; set; } public virtual ICollection<Comment> Comments { get; set; } } ``` When I run my application, a SQL CE 4.0 database is automatically created with the following schema: ![DB Schema](https://i.stack.imgur.com/A4OI9.gif) So far, so good! However, the data I will be inserting into the `Body` and `BodyHtml` properties is routinely larger than the maximum allowed length for the `NVarChar` column type, so I want EF to generate `Text` columns for these properties. However, I cannot seem to find a way to do this! After quite a bit of Googling and reading, I tried to specify the column type using `DataAnnotations`, from information found in [this answer](https://stackoverflow.com/questions/4829776/generate-money-type-fields-using-code-first-ef-ctp5/4833477#4833477): ``` using System.ComponentModel.DataAnnotations; ... [Column(TypeName = "Text")] public string Body { get; set; } ``` This throws the following exception (when the database is deleted and the app is re-run): ``` Schema specified is not valid. Errors: (12,6) : error 0040: The Type text is not qualified with a namespace or alias. Only PrimitiveTypes can be used without qualification. ``` But I have no idea what namespace or alias I should be specifying, and I couldn't find anything that would tell me. I also tried changing the annotation as per [this reference](http://msdn.microsoft.com/en-us/library/system.data.linq.mapping.columnattribute.dbtype.aspx): ``` using System.Data.Linq.Mapping; ... [Column(DbType = "Text")] public string Body { get; set; } ``` In this case a database created, but the `Body` column is still an `NVarChar(4000)`, so it seems that annotation is ignored. Can anyone help? This seems like it should be a fairly common requirement, yet my searching has been fruitless!
How do I specify that a property should generate a TEXT column rather than an nvarchar(4000)
CC BY-SA 3.0
0
2011-02-04T07:13:38.697
2017-05-19T22:37:05.237
2017-05-23T12:26:33.380
-1
43,140
[ "c#", "entity-framework", "ef-code-first", "sql-server-ce", "data-annotations" ]
4,895,996
1
4,896,160
null
2
1,969
I am working on the design for a web site, and I am having trouble with what seems to be a IE7 related problem when building my navigation bar. This is the issue I get : ![issues in IE7](https://i.stack.imgur.com/Suy5c.png) You can notice that some of the menu items are not showing. I [created a Fiddle](http://jsfiddle.net/vKtHH/6/) for it. (not sure it helps in IE7 , though :-/, so I also made a skeletton where the same problem happens : [here it is](http://www.2shared.com/document/CnE73zTD/mypage.html) ) The menu has this structure : ``` <nav> <h3>Navigation header 1</h3> <h4>Navigation header level2</h4> <ul> <li><a>my link 1</a></li> <li><a>my link 2</a></li> </ul> <h4>Navigation header level2</h4> <ul> <li><a>my link 1</a></li> <li><a>my link 2</a></li> </ul> <h3>Navigation header 2</h3> <h4>Navigation header level2</h4> <ul> ... </ul> </nav> ``` I am using Jquery UI CSS Framework to make it skinnable, so the generated HTML for this page is the following (using classes form jQuery UI and icons) : ``` <nav class="company-ui-nav ui-widget ui-helper-reset ui-corner-all ui-widget-content"> <h3 class="ui-corner-top ui-widget-header">Examples</h3> <h4 class="first ui-state-default ui-button-text ui-state-highlight"><span class="ui-icon ui-icon-triangle-1-s"></span>Default styles</h4> <ul style="display: block;"> <li class="ui-state-default ui-priority-secondary no-border-top ui-state-highlight"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="/Examples/Contents" class="on">Page contents</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="/Examples/Forms">Forms</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="/Examples/Buttons">Buttons</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top no-border-bottom"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="/Examples/Validation">Validation</a> </li> </ul> <h4 class="ui-state-default ui-button-text"><span class="ui-icon-triangle-1-e ui-icon"></span>JS related</h4> <ul style="display: none;"> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="/Examples/Widgets">Widgets</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top no-border-bottom"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">????</a> </li> </ul> <h3 class="ui-widget-header no-border-top">Navigation h3</h3> <h4 class="first ui-state-default ui-button-text"><span class="ui-icon-triangle-1-e ui-icon"></span>Tests navi 0</h4> <ul style="display: none;"> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 0.0</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 0.1</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top no-border-bottom"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 0.2</a> </li> </ul> <h4 class="ui-state-default ui-button-text no-border-top"><span class="ui-icon-triangle-1-e ui-icon"></span>Tests navi 1</h4> <ul style="display: none;"> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 1.0</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 1.1</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top no-border-bottom"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 1.2</a> </li> </ul> <h4 class="ui-state-default ui-button-text no-border-top"><span class="ui-icon-triangle-1-e ui-icon"></span>Tests navi 2</h4> <ul style="display: none;"> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 2.0</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 2.1</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top no-border-bottom"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 2.2</a> </li> </ul> <h3 class="ui-widget-header no-border-top">Another title</h3> <h4 class="first ui-state-default ui-button-text"><span class="ui-icon-triangle-1-e ui-icon"></span>Tests 0</h4> <ul style="display: none;"> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 0.0</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 0.1</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top no-border-bottom"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 0.2</a> </li> </ul> <h4 class="ui-state-default ui-button-text no-border-top"><span class="ui-icon-triangle-1-e ui-icon"></span>Tests 1</h4> <ul style="display: none;"> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 1.0</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 1.1</a> </li> <li class="ui-state-default ui-priority-secondary no-border-top no-border-bottom"> <span class="ui-icon ui-icon-arrowreturn-1-e"></span><a href="#">Sous-niveau 1.2</a> </li> </ul> </nav> ``` Any clue about what might cause this ? I suspect a CSS-related problem...
How can I fix UI items not appearing in IE 7?
CC BY-SA 2.5
null
2011-02-04T08:38:47.517
2011-02-04T08:58:18.130
null
null
474,763
[ "html", "css", "jquery-ui", "internet-explorer-7" ]
4,896,157
1
null
null
0
268
I am dealing with a overlays on mapview. I have 2 types of them, lets say type and They both are overlayed on same or diffrent condition. When are overlayed on same condition one overlaps the other. and earlier one hides behind the latter one. I want to give option to user to cycle through these overlapped overlays if this overlapping case occurs. Any solution? Can overlay handle double taps ? ![Example](https://i.stack.imgur.com/SHoGS.png)
Rotating map overlays
CC BY-SA 2.5
null
2011-02-04T08:57:53.603
2011-02-04T09:52:46.900
2011-02-04T09:36:05.693
447,238
447,238
[ "android", "overlay", "hide", "android-mapview" ]
4,896,293
1
4,896,594
null
0
219
I am creating 1 of those CSS3 ribbons [http://www.jsfiddle.net/G4QQ2/](http://www.jsfiddle.net/G4QQ2/) ![](https://imgur.com/X7OlS.jpg) It works in FF & Chrome but in IE, the `z-index` does not seem to work ![](https://imgur.com/C5LMx.jpg) Why is that?
z-index not working in IE?
CC BY-SA 2.5
null
2011-02-04T09:15:12.427
2011-02-05T02:43:23.967
null
null
292,291
[ "css" ]
4,896,335
1
4,896,943
null
3
11,183
This is a follow up on my previous [question](https://stackoverflow.com/questions/4887456/decision-trees-and-rule-engines). I have a decision tree in the following form: ![Decision tree diagram](https://i.stack.imgur.com/okefu.jpg) and I want to transform it into rules in Drools Expert. The use of `insertLogical` has been [proposed](https://stackoverflow.com/questions/4887456/decision-trees-and-rule-engines). Drools documentation says [this](http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html#d0e5121) about `insertLogical`: > `insertLogical(new Something())`; is similar to insert, but the object will be automatically retracted when there are no more facts to support the truth of the currently firing rule. The fact that these objects are retracted is useful (as I'll have tens of thousands of objects in memory and each will create a bunch of these). There's also a method `retract(object)`, which removes an object from working memory. When I get to an end node and remove (`retract`) the base object that would get there (following the decision tree), does it also remove all these objects created with `insertLogical` during the traversal?
Drools: insertLogical and retract
CC BY-SA 3.0
0
2011-02-04T09:19:38.870
2016-01-06T13:08:59.330
2017-05-23T12:01:09.963
-1
265,289
[ "java", "drools", "decision-tree", "expert-system" ]
4,896,513
1
4,898,664
null
9
11,697
How can I scale down the images used in a `UISegmentedControl`? I am creating the segmented control programmatically: ``` UISegmentedControl * segmentButton; segmentButton = [UISegmentedControl segmentedControlWithItems: [NSArray arrayWithObjects: [UIImage imageNamed:@"option_one.png"], [UIImage imageNamed:@"option_two.png"], nil]]; segmentButton.contentMode = UIViewContentModeScaleToFill; segmentButton.frame = CGRectMake(10, 10, 200, 32); [view addSubview:segmentButton]; ``` The result is not what I expect. The original .png images are about 100 pixels high, and they are scaled down to fit the 32-pixel height of the segmented control. This results in a segmented control being drawn with enormous images overlapping it: ![screen shot](https://i.stack.imgur.com/Xe26y.jpg) How can I tell the control to scale down those images?
UISegmentedControl image scaling
CC BY-SA 2.5
0
2011-02-04T09:40:37.950
2021-10-11T05:10:13.570
null
null
33,686
[ "image", "ios", "scaling", "uisegmentedcontrol" ]
4,896,507
1
4,896,987
null
0
797
I have data model classes as follows: ``` public class QuizItem { public int QuizItemId { get; set; } public string Question { get; set; } public IEnumerable<Choice> Choices { get; set; } } ``` and ``` public class Choice { public int ChoiceId { get; set; } public string Description { get; set; } public bool IsCorrect { get; set; } } ``` I made a setup in a controller action as follows: ``` public class HomeController : Controller { public ActionResult Index() { IEnumerable<Choice> choices = new Choice[] { new Choice{ChoiceId=1,Description="Black",IsCorrect=true}, new Choice{ChoiceId=2,Description="Red",IsCorrect=false}, new Choice{ChoiceId=3,Description="Yellow",IsCorrect=false} }; QuizItem qi = new QuizItem { QuizItemId = 1, Question = "What color is your hair?", Choices = choices }; return View(qi); } ``` The last, here is my view: ``` @model MvcApplication1.Models.QuizItem @{ ViewBag.Title = "Index"; } <h2> Index</h2> <fieldset> <legend>QuizItem</legend> <div class="display-label"> Question</div> <div class="display-field">@Model.Question</div> @foreach (var x in Model.Choices) { <text>@Html.RadioButtonFor(y => Model.QuizItemId, x.Description, new { @checked = x.IsCorrect }) @x.Description<br /></text> } </fieldset> ``` At runtime, the selected option should be Black. But Yellow gets selected. How to resolve this issue? ![enter image description here](https://i.stack.imgur.com/UQFQe.png)
Why does the selected radio button at runtime differ from my programmatic setup?
CC BY-SA 2.5
null
2011-02-04T09:39:57.987
2011-02-04T13:22:11.847
null
null
596,314
[ "asp.net-mvc" ]
4,896,524
1
null
null
2
1,977
I use on listbox control own datatemplate. Listbox item consist one image control and some textblock. On image source I bind property type of Uri (absolute url - for example: [http://u.aimg.sk/fotky/1730/71/17307141.jpg?v=2](http://u.aimg.sk/fotky/1730/71/17307141.jpg?v=2)) Listbox have about 50 - 300 items. If I test app, I sometimes see blank - white or black image instead user images. The problem you can see on this images: ![enter image description here](https://i.stack.imgur.com/fwV0Q.png) ![enter image description here](https://i.stack.imgur.com/0bPAK.png) I would like to know what cause this problem and how can I solve this problem. Image sources are good, I check it in browser. Thank for advice.
Blank - Black Image control in WPF if image source is absolute Uri
CC BY-SA 3.0
null
2011-02-04T09:42:38.227
2015-08-31T16:58:59.067
2015-08-31T16:58:59.067
1,677,912
null
[ "wpf", "image", "uri", "absolute" ]
4,897,181
1
null
null
4
6,458
I would like to draw a color wheel on my iPhone Application, how can I do so? What is the Algorithm behind the color wheel? Thank you. ![http://realcolorwheel.com/colorwheel.htg/RCW600x600.png](https://i.stack.imgur.com/sGj1F.png)
What is the Algorithm behind a color wheel?
CC BY-SA 2.5
0
2011-02-04T10:54:54.730
2015-06-28T19:41:40.443
null
null
148,956
[ "objective-c", "colors" ]
4,897,584
1
4,897,702
null
6
758
Just curious about the control shown below, the straight line with label beside it. I tried to find a similar control for it but there was none nor any group box setting, so instead I just made a GroupBox with a height of 2 that replicates it. But is there an actual control or setting to do this? And what is the actual control called? ![Internet Options property dialog](https://i.stack.imgur.com/R1IJ1.png)
What is this control? Group Box or Not!
CC BY-SA 2.5
0
2011-02-04T11:41:44.763
2011-04-21T10:34:01.847
2011-02-04T11:59:28.540
366,904
437,759
[ ".net", "winforms", "controls", "ui-design" ]
4,897,621
1
4,900,107
null
0
2,733
opengles -eaglview have a particle animation with background black color.but i don't want black color.i like only transparent view because my view controller already have an image(BG). i want to apply particle effects on the uiimageview. how to change black background to transparent view in opengl-es(iphone)?please help me...![enter image description here](https://i.stack.imgur.com/PFnEI.png) it is actual output.. it is created in opengles view; but i don't wants background black color...
how to change black background to transparent view in opengl-es(iphone)?
CC BY-SA 2.5
null
2011-02-04T11:46:47.293
2011-02-04T16:06:32.980
null
null
555,055
[ "iphone", "ios4", "opengl-es" ]
4,897,974
1
null
null
2
6,864
On [this page](http://www.iol.ie/~murtaghd/stef/service.html) I would like to add a white gap between the background of the "Before" and "After table headings, that aligns with the gap between the photos in each column ![enter image description here](https://i.stack.imgur.com/bxxyz.png) I've tried setting the `width`, `max-width` and `margin-right` properties of the "Before" heading and also tried setting the `margin-left` of the "After" heading, but none of these seem to work. Thanks, Don
add margin to table header
CC BY-SA 2.5
null
2011-02-04T12:30:00.307
2022-05-20T04:25:45.670
null
null
2,648
[ "html", "css" ]
4,897,989
1
4,899,848
null
4
527
I have N^2 matrixes. Each one is a 3x3 matrix. One way to concatenation them to a 3Nx3N matrix is to write `A(:,:,i)= # 3x3 matrix i=1:N^2` ![matrix](https://i.stack.imgur.com/podvp.png) `B=[A11 A12 ..A1N;A21 ...A2N;...]` But When N is large is a tedious work. What do you offer?
concatenation of N^2 3x3 matrixes into a 3Nx3N matrix
CC BY-SA 2.5
0
2011-02-04T12:31:38.350
2011-02-04T18:32:51.907
2011-02-04T12:36:30.140
12,183
601,908
[ "matlab", "matrix" ]
4,898,244
1
4,898,315
null
2
532
I have the below in FF ![](https://imgur.com/IwKxr.jpg) But in IE6, I get ![](https://imgur.com/0mjcB.jpg) In debugBar, I get ![](https://imgur.com/5wlOZ.jpg) Whats with the large offset. [http://jsfiddle.net/eteQ7/2/](http://jsfiddle.net/eteQ7/2/)
IE6 added a large left offset to my element?
CC BY-SA 2.5
0
2011-02-04T13:01:38.020
2011-04-27T01:46:48.837
null
null
292,291
[ "css" ]
4,898,476
1
4,923,070
null
14
15,146
I wanted to work with custom DB provider in Visual Studio. I need it to use Entity Framework. For example, I downloaded NpgSQL, registered them in GAC: ``` gacutil -i c:\temp\npgsql.dll gacutil -i c:\temp\mono.security.dll ``` and added to machine.config file: ``` <add name="Npgsql Data Provider" invariant="Npgsql" support="FF" description=".Net Framework Data Provider for Postgresql Server" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.6.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" /> ``` But Npgsql did not appear in Datasource list in Visual Studio: ![Data source in VS](https://i.stack.imgur.com/KUT60.png) How to add custom DB provider to this list? UPD: If I use command string edmgen.exe I got error: > error 7001: Failed to find or load the registered .Net Framework Data Provider.
How to add custom DB provider to be accessible in Visual Studio?
CC BY-SA 3.0
0
2011-02-04T13:25:54.737
2017-09-11T16:03:09.767
2017-09-11T16:03:09.767
1,033,581
291,896
[ "visual-studio", "postgresql", "npgsql", "dbproviderfactories" ]
4,898,616
1
4,924,120
null
2
1,017
Does "Create project from existing sample" modify in the original sample project files? If so, what is the best way to "Create project from existing sample" modifying anything in the original sample project files? (I am assuming project duplication is involved, but step-by-step instructions would be very helpful for future Android-newbies) The following is a snapshot of the options available, to further clarify my question: ![enter image description here](https://i.stack.imgur.com/Hva22.png)
Does "Create project from existing source" modify existing sample?
CC BY-SA 2.5
null
2011-02-04T13:43:38.313
2011-02-07T17:53:27.687
2011-02-07T16:54:38.200
418,055
418,055
[ "android", "eclipse", "sample" ]
4,898,752
1
5,816,970
null
4
3,927
I am about to wrap up the implementation for my first ExtJS based application. But I am facing a weird issue at this point. I am using ASP.net at the server and then ExtJS at the client. I noticed that, If I run this project from Visual Studio Debugger then it works nice, and in that case my browser URL was set to [http://localhost/MyApp/Home.aspx](http://localhost/MyApp/Home.aspx) But As soon as I open a new browser and hit [http://MyWorkStationName/MyApp/Home.aspx](http://MyWorkStationName/MyApp/Home.aspx) it behaves slightly different. For instance, some Button Shapes are not rendered properly. ![See this image](https://i.stack.imgur.com/qxNqn.png) Can any body give me a clue how can I debug this issue. basically how the style can be influenced by the machine name vs localhost in URL ? Thanks in advance!
CSS Style differs in Localhost vs Machine Name
CC BY-SA 2.5
0
2011-02-04T13:57:54.343
2013-07-12T20:32:16.980
2011-07-06T00:08:17.843
213,738
124,996
[ "browser", "coding-style", "localhost" ]
4,898,855
1
4,899,216
null
0
939
I use openGl ES 2.0. When I load 3d model, it looks turned . The surface inside the model looks perfect. How can I make outer surface look like inner surface? Thanks in advance! ![View on iPhone](https://i.stack.imgur.com/3Z1bD.png)
3d model looks turned inside out
CC BY-SA 2.5
0
2011-02-04T14:06:47.243
2011-02-05T15:41:46.310
2011-02-04T14:55:06.793
21,234
378,882
[ "opengl-es", "opengl-es-2.0" ]