Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
sequence
2,355,931
1
2,355,963
null
8
8,223
This is a similar question to this [one here](https://stackoverflow.com/questions/2350604/get-the-area-of-a-3d-surface). Given a list of 3D coordinates that define the surface( `Point3D1`, `Point3D2`, `Point3D3`, and so on), how to calculate the of the surface? In 2D the computation [is given by the following formula](http://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon): ![alt text](https://upload.wikimedia.org/math/e/e/1/ee14cbb2b170c4bb435f1d84e78f6d66.png) ![alt text](https://upload.wikimedia.org/math/a/4/c/a4cee81a1d18e4d067f66d4d40a8a1fe.png) ![alt text](https://upload.wikimedia.org/math/0/2/a/02aecb75f67f8c7b2fc11fdcbcb6ea80.png) What about the 3D analogue?
Compute the centroid of a 3D planar polygon
CC BY-SA 4.0
0
2010-03-01T13:04:09.757
2020-07-20T03:47:16.823
2020-05-04T08:47:18.827
3,834
3,834
[ "c#", "math", "computational-geometry" ]
2,356,472
1
2,360,143
null
4
795
Some months ago there was a [nice question](https://stackoverflow.com/questions/1519462/maximum-bipartite-graph-1-n-matching) regarding a "" and there seems to be no poly-time algorithm. I would like to add constraints to find a maximum matching for the 1:n matching problem with a polynomial algorithm. I would like to say: "For vertex A1 choose either {B1,B2,B5} or {B2,B3} if the vertices are not already taken from another A-vertex" i.e. I would not allow all possible combinations. This could be expressed if we introduce helper vertices H for each choice and substitute edges with trees => we get a problem similar to the ordinary bipartite matching. Every vertex of A or B can have only one edge in the matching. The edges to or from vertices in H are either all in the matching or none of them is present in the matching. Imagine the following tri-partite graph: ![alt text](https://karussell.files.wordpress.com/2010/02/treematching.png) Now define h_ij="tree rooted that contains H_ij" to express the matching easily: - - Would this problem then be solvable in polynomial time? If yes, is there a polytime solution for the weighted (w(h_ij)) variant? If no, could you argue or even proof it for a "simple-man" like me or suggest other constraints to solve the 1:n matching problem? E.g. could the graph transformed to a general graph which then could be solved with the weighted matching for general graphs? Or could [branchings](http://cis.poly.edu/suel/papers/branch.pdf) or even [matching forests](http://books.google.com/books?id=mqGeSQ6dJycC&pg=PA1006&lpg=PA1006&dq=matching+forest&source=bl&ots=xOLSJ-dnPf&sig=kMwwFRAejcLwxOUHj0tRXs9NZ3k&hl=en&ei=QMaLS6SGHdLz_Aby5PXpBg&sa=X&oi=book_result&ct=result&resnum=10&ved=0CCUQ6AEwCQ#v=onepage&q=matching%20forest&f=false) help here? PS: not a homework ;-)
"(1:k) Tree-Matching" - Solvable in polynomial time?
CC BY-SA 2.5
null
2010-03-01T14:35:35.840
2010-03-02T08:40:41.093
2017-05-23T12:24:21.783
-1
194,609
[ "algorithm", "graph", "matching" ]
2,358,129
1
2,607,228
null
0
366
Help, please. The code - just a styled pre and a styled div (using `float` and `clear`) : ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Ie bug</title> <style type="text/css"> <!-- pre { background-color: #FFFFCC; border: 2px dashed #FF6666; padding-top: 7px; padding-bottom: 8px; padding-left: 10px; margin: 10px; float: left; padding-right: 10px; clear: both; } div { float: left; clear: both; } --> </style> </head> <body bgcolor="#D6D6D6"> <div> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque rhoncus viverra interdum. Etiam ut ornare nulla. Praesent gravida blandit aliquam. Nulla facilisi. Suspendisse vel augue ligula. In interdum, purus et pellentesque tempus, urna tortor malesuada massa. <h3>Description</h3> Mauris quis est erat, a tempus dolor. Duis faucibus ultricies volutpat. Aliquam erat volutpat. Nulla et consectetur est. Sed eleifend ante ac tellus feugiat sed scelerisque nisi vehicula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse potenti. Nunc eget velit vel metus feugiat facilisis. Donec vel risus augue, ut mattis sem. Proin elementum libero ut lectus adipiscing semper. Proin et nibh enim. <h3>Code</h3> Phasellus sodales risus a lectus gravida tincidunt. Nulla sit amet enim ante, vel semper felis. Nullam enim mi, feugiat et porttitor tempus, auctor sed velit. Vivamus ac metus neque, in feugiat velit. Nam vitae dignissim eros. Praesent eros risus, pellentesque rutrum molestie sit amet, volutpat a mauris. Quisque ipsum turpis, placerat gravida aliquam et, placerat at leo. </div> <pre><em>&lt;Firefox bug : the right margin is 0 px instead of 10 px&gt;</em> Vivamus eu mi nulla. Cras ac neque in ante aliquet ultricies eget id risus. Curabitur ut massa metus. Etiam dapibus fringilla diam, id lacinia tortor blandit eu. Nunc commodo commodo dui, eget malesuada purus cursus tempor. Quisque felis tellus, vulputate vitae ullamcorper sit amet, suscipit non augue. Integer vitae condimentum ante. Donec eu nisl magna. Nam ipsum lectus, dapibus a volutpat nec, rutrum sit amet eros. Phasellus velit est, adipiscing a interdum at, commodo id elit. </pre> <div> <h3>Ie6 bug</h3> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ultricies, erat in varius ornare, diam mi semper nisi, eu sagittis mi diam at nisl. Aenean euismod nisl in enim interdum gravida. Maecenas congue, neque non imperdiet dictum, eros arcu ultricies mauris, et rhoncus ligula tortor nec nibh et convallis nulla tempus vel. Morbi ac leo magna, vitae semper felis. Donec tincidunt nunc quis lacus aliquet tempor. Nulla facilisi. </div> </body></html> ``` Firefox won't display the margin in the pre tag (yellow box in image) : ![alt text](https://i1032.photobucket.com/albums/a406/dardanov/ffbug.jpg?t=1267467311) on the other hand ie6 displays the last div as shown : ![alt text](https://i1032.photobucket.com/albums/a406/dardanov/ie6bug.jpg?t=1267467575)
ie6 weird h3 /div behavior - no right margin bug (?) in ff
CC BY-SA 2.5
null
2010-03-01T18:39:35.557
2013-12-24T16:42:09.583
2020-06-20T09:12:55.060
-1
281,545
[ "html", "tags", "internet-explorer-6", "css-float", "pre" ]
2,361,614
1
2,361,625
null
0
177
I added a web service as reference to a project and gave it name "days". But I don't actually understand how to work with it. Can someone show me the way how to get data from it? In posh I get data from a web service this way: ``` $ws= New-WebServiceProxy -uri $xmld.Root.WebService.Address -credential $cred $xml = $ws.getdays() $xml ``` ![alt text](https://i.stack.imgur.com/pvqPY.png)
How does calling a web service from a .net app work?
CC BY-SA 4.0
0
2010-03-02T07:57:28.370
2019-06-24T07:06:54.760
2019-06-24T07:06:54.760
4,751,173
264,244
[ "c#", ".net", "powershell", "service" ]
2,363,720
1
2,363,789
null
0
164
Is there any way to get the work item query results preview pane to auto-size its width? It is very often "too wide", with the controls being way too wide for their content. Here's an example--why do I have to have horizontal scrolling? Is there any way to fix this? ![alt text](https://imgur.com/EZnNq.png) (When one opens a single work item, the width is streched appropriately. This is the behavior I want for the above query results preview.)
Team Explorer work item UI is too wide
CC BY-SA 2.5
null
2010-03-02T14:22:09.150
2010-03-02T14:31:28.787
2010-03-02T14:29:07.887
7,453
7,453
[ "tfs", "workitem", "team-explorer" ]
2,364,689
1
2,365,006
null
3
7,064
Hey everyone, my first time trying to draw a multi-color gradient in actionscript 3. So I got this code from [the help docs](http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Graphics.html#beginGradientFill%28%29), but I can't seem to get a vertical gradient, whatever formula or number I use for rotate, it stays stuck on the default horizontal gradient :( ## My Code: You can see in the traces the rotation code I tried... ``` package { import flash.display.DisplayObject; import flash.display.GradientType; import flash.display.SpreadMethod; import flash.display.MovieClip; import flash.display.Graphics; import flash.display.Sprite; import flash.display.Shape; import flash.geom.Matrix; import flash.events.*; public class MyGradient extends MovieClip { private var colorHolder:MovieClip = new MovieClip(); private var colorGrad:MovieClip = new MovieClip(); private var fillType:String = GradientType.LINEAR; private var colors:Array = [0xFF0000, 0x4F8EEC]; private var alphas:Array = [1, 1]; private var ratios:Array = [0x00, 0xFF]; private var matr:Matrix = new Matrix(); private var spreadMethod:String = SpreadMethod.PAD; public function MyGradient():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init():void { colorHolder = new MovieClip(); colorGrad = new MovieClip(); //matr.rotate(30*Math.PI/180); //matr.rotate(45); //matr.rotate(90); //matr.rotate(Math.PI/90); matr.rotate(Math.PI/9); matr.createGradientBox(200, 200, 0, 0, 1); colorGrad.graphics.beginGradientFill(fillType, colors, alphas, ratios, matr, spreadMethod); colorGrad.graphics.drawRect(0,0,200,200); colorHolder.addChild(colorGrad); addChild(colorHolder); } } } ``` ## Updated Fix by Heavily involved: ``` matr.createGradientBox(200, 200, Math.PI/2, 0, 0); ``` ![alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Degree-Radian_Conversion.svg/600px-Degree-Radian_Conversion.svg.png)
How to create a vertical color gradient (or any other angle besides a flat horizontal gradient)
CC BY-SA 2.5
0
2010-03-02T16:19:06.280
2011-03-03T19:11:27.247
2017-05-23T12:17:03.450
-1
168,738
[ "flash", "actionscript-3", "rotation", "gradient", "draw" ]
2,364,846
1
2,376,700
null
2
2,530
I have problem with Microsoft Access Database to Postgresql database. Filter dialog - for filtering data using multiple selectable checkboxes: ![Check box screenshot](https://i.stack.imgur.com/Qoadt.jpg) doesnt work. How to fix this? I can sort data, I can filter by entering single value, but cant filter by multiple values. Thanks in advance.
MSAccess and ODBC. Filter dialog doesn't show
CC BY-SA 3.0
null
2010-03-02T16:38:17.917
2014-12-03T14:47:17.910
2014-12-03T14:47:17.910
1,085,891
59,528
[ "ms-access", "odbc", "ms-access-2007" ]
2,366,884
1
2,367,078
null
4
460
I want to create sparklines that illustrate the number of posts created on my blog in the last 2 weeks. To do this, I need to first generate an array that contains the number of posts created on each day during the period in question. For example, this array: ``` [40, 18, 0, 2, 39, 37, 22, 25, 30, 60, 36, 5, 2, 2] ``` generates this sparkline: (I'm using the [Googlecharts wrapper around the Google Charts](http://googlecharts.rubyforge.org/) API) ![](https://chart.apis.google.com/chart?chco=orange&chd=s:YLABYWNPSlWDBB&cht=ls&chs=120x60&chxr=0,40,100) My question is how to create these arrays. Here's what I'm doing now: (I'm using [Searchlogic](http://rdoc.info/projects/binarylogic/searchlogic) to do the queries, but it should be understandable even if you've never used it) ``` history = [] 14.downto(1) do |days_ago| history.push(Post.created_at_after((days_ago + 1).day.ago.beginning_of_day).created_at_before((days_ago - 1).days.ago.beginning_of_day).size) end ``` This approach is ugly and slow -- there must be a better way!
Get an array containing the number of posts created in the past 2 weeks
CC BY-SA 2.5
0
2010-03-02T21:25:02.560
2010-03-04T17:51:27.933
2017-02-08T14:22:07.247
-1
25,068
[ "ruby-on-rails", "charts", "reporting", "google-visualization", "sparklines" ]
2,366,919
1
null
null
2
1,730
I'm trying for what is done in Apple's "Maps" app when "Directions" is selected: ![Hosted by imgur.com](https://imgur.com/a3yeT.png) Does anyone know how to have multiple rows of UIBarButtonItems? I haven't found the answer anywhere. I can add items in a single row to the UIToolbar as follows: ``` NSArray *newItems = [NSArray arrayWithObjects: settingsButton, textFieldStartItem, goButton, nil]; toolBar.items = newItems; ``` But that just puts all of the items in the same row. Any ideas?
How to have multiple rows of items on a UIToolbar?
CC BY-SA 2.5
null
2010-03-02T21:28:56.890
2010-03-02T22:09:59.743
null
null
254,507
[ "iphone", "uibarbuttonitem", "uitoolbar" ]
2,367,063
1
2,367,135
null
1
285
Everything else 100% works, so I'm 100% positive the error lies in the file path I'm using for the image. The image doesn't load. Either A) I need the file to appear in the Zend workspace, how do I do that. or B) My path is wrong. Here's my file heirarchy: ![alt text](https://imgur.com/4SCZT.png) And here's my CSS code: ``` #nav-menu li{ float: left; margin: 0 0.15em; } #nav-menu li a:HOVER{ background-color: yellow; } #nav-menu li a{ background: url(./img/buttonbackground.jpg) #fff bottom left repeat-x; height: 2em; line-height: 2em; float: left; width: 9em; display: block; border: 0.1em solid #dcdce9; color: #0d2474; text-decoration: none; text-align: center; } ```
How can I use CSS to set as my <li> background if I'm using the Zend framework?
CC BY-SA 2.5
null
2010-03-02T21:48:34.687
2010-03-02T22:32:18.767
2010-03-02T22:32:18.767
208,809
null
[ "php", "css", "zend-studio" ]
2,367,691
1
2,382,177
null
3
1,734
I have a productVariant object which has child product object. I want to show the value in the DataGridView, can anyone let me know how to do this? Here is the structure of the object. ![alt text](https://lh6.ggpht.com/_QNDkqTv_9oU/S42cZ5WJSzI/AAAAAAAAT_I/iUMG48ux9ww/s640/sshot-1.png) I tried to bind "ProductVariant.Product.Name" to the DataProptertyName in the DataGridView, however, it did not not showing any value. Can anyone help with this? Many thanks.
Windows Form: showing child object value in the DataGridView
CC BY-SA 2.5
0
2010-03-02T23:24:18.097
2010-03-08T17:33:04.730
2017-02-08T14:22:07.927
-1
52,463
[ "c#", "winforms" ]
2,374,339
1
2,374,711
null
0
536
![alt text](https://imgur.com/T8LxL.png) ![alt text](https://imgur.com/JgYmJ.png) For any given date the output should be the last entry for that date. Also the columns need to be become rows. User will provide 2 dates. Say March 2, 2010 and March 3, 2010. ![alt text](https://imgur.com/dEdOZ.png) Since Rev 6 does not have an entry for FldID 52 in Table A, [Placeholder 1] should have Words from Rev 3 (since that is the latest before Rev 6 for FldID 52 in Table A). Similarly, Since Rev 6 does not have an entry for FldID 54 in Table A, [Placeholder 2] should have Words from Rev 5 (since that is the latest before Rev 6 for FldID 54 in Table A). Since Rev 8 does not have an entry for FldId 54 in Table A, [Placeholder 3] should have Words from Rev 7 (since that is the latest before Rev 8 for FldID 54 in Table A). I am unable to come up with a query that can give me the above results. Please help. Datatypes for fields in TABLE B ![alt text](https://imgur.com/hNz6t.png)
Retrieving the most recent revision information for specified dates (SQL)
CC BY-SA 2.5
0
2010-03-03T19:33:14.227
2010-03-03T23:37:02.910
2010-03-03T23:13:52.937
237,121
237,121
[ "sql", "sql-server", "tsql", "sql-server-2008", "greatest-n-per-group" ]
2,374,862
1
2,374,982
null
17
24,456
I'm using the'' library for my chart and I was wondering if anyone figured out how to switch the axes to display the chart vertically Thanks. ![alt text](https://i.imgur.com/78hYN.png)
Changing a horizontal bar chart to a vertical one
CC BY-SA 2.5
null
2010-03-03T20:53:16.463
2014-05-31T17:21:15.030
2012-04-30T16:21:15.790
555,062
1,700,998
[ "c#", "charts", "bar-chart" ]
2,375,047
1
2,375,089
null
0
2,408
I am trying to save html table to sql server table with unique name and save its data in a database. For example, I have a html table like this(it is dynamically created in browser by user). ![int varchar(20)](https://content.screencast.com/users/Telman/folders/Jing/media/4605e7cc-d874-4ac4-ba30-13643fe22f3d/2010-03-04_0211.png) I use asp.net, C#, Sql Server 2008 express. How can after clicking on save button, create table with unique name, 2 colums int and varchar(40) types, and insert data? I think it is possible by rendering table to XML, and then work this xml on C# classes, then save in database. What you sing about it? Added after edit? i want save this: ``` <table> <tr> <td>int</td> <td>varchar(40)</td> </tr> <tr> <td>1</td> <td>USA</td> </tr> <tr> <td>2</td> <td>Canada</td> </tr> <tr> <td>3</td> <td>Mexico</td> </tr> </table> ``` like this: ``` CREATE TABLE uniqueName (key int, values varchar(50)) INSERT INTO uniqueName (key, values) VALUES (1, 'USA') INSERT INTO uniqueName (key, values) VALUES (2, 'Canada') INSERT INTO uniqueName (key, values) VALUES (3, 'Mexico') ``` will help peace of code more:) or links
advice how to save html table to SQL server
CC BY-SA 4.0
null
2010-03-03T21:19:41.307
2020-03-15T21:28:30.970
2020-03-15T21:28:30.970
11,258,674
211,452
[ "asp.net", "html", "sql-server", "xml" ]
2,377,944
1
2,377,956
null
5
3,382
How can I render mathematical notations / expressions in Python with OpenGL? I'm actually using [pyglet](http://www.pyglet.org/) however it uses OpenGL. Such things as [this](http://en.wikipedia.org/wiki/Quadratic_formula#Quadratic_formula): ![Quadratic formula](https://upload.wikimedia.org/math/3/e/a/3ea647783b5121989cd87ca3bb558916.png) I can't store static images as I am generating the expressions as well.
Rendering mathematical notation in Python / OpenGL?
CC BY-SA 2.5
0
2010-03-04T08:59:07.723
2010-03-04T23:47:09.280
2017-02-08T14:22:11.067
-1
2,118
[ "python", "math", "opengl", "rendering", "pyglet" ]
2,379,197
1
2,379,350
null
112
55,326
Java classes are generally divided into logical "blocks". Is there a convention to mark these sections? Ideally, it would be supported by the major IDEs. I personally use this method: ``` //// Section name here //// ``` However, some editors seem to have problems with this. As an example, in Objective-C code you can use this method: ``` #pragma mark - #pragma mark Section name here ``` This will result in a menu in XCode that looks like this: ![alt text](https://debleser.be/stackoverflow/xcode-pragma-mark.png)
How to mark logical sections of code in Java comments?
CC BY-SA 3.0
0
2010-03-04T12:27:19.837
2018-01-08T20:20:18.153
2015-04-23T09:34:23.323
231,298
231,298
[ "java", "comments" ]
2,380,488
1
2,380,587
null
0
737
I created an iPhone application for the App Store. I hear that some things are not allowed in the App Store. For example you can't copy existing iPhone functionality. I didn't find information about these App Store restrictions. --- A friend tell me that I can't develop my own `UITableViewCellAccessoryXXX` (I mean something different than the next image) because it's not allow by Apple. Is that true? ![enter image description here](https://i.stack.imgur.com/e0aHc.png)
Validate my iPhone application
CC BY-SA 3.0
null
2010-03-04T15:33:28.237
2012-03-07T14:19:22.613
2012-03-07T14:19:22.613
689,356
286,378
[ "iphone", "objective-c", "app-store" ]
2,381,378
1
2,406,455
null
6
2,548
I want to be able to draw using this as my stroke. How would I do this as efficient as possible, and on the fly drawing, I was thinking CGPatternRef, but I really don't know how to do that. It does not need to warp to the path. I just coultn't fix that issue in Illustrator. ![alt text](https://imgur.com/zn4eb.png)
How would I draw something like this in Core Graphics
CC BY-SA 2.5
0
2010-03-04T17:30:25.430
2010-03-15T10:51:09.223
2010-03-08T17:31:44.717
225,020
225,020
[ "iphone", "core-graphics", "cgcontext" ]
2,382,324
1
2,402,411
null
3
728
Suppose I have a database like this: ![alt text](https://farm5.static.flickr.com/4054/4406325055_5a65d46086_o_d.jpg) This is set up to give role-wise menu permissions. Please note that, `User``Permission` Then how should I map this class against the database-tables? ``` class User { public int ID { get; set; } public string Name { get; set; } public string Username { get; set; } public string Password { get; set; } public bool? IsActive { get; set; } public IList<Role> RoleItems { get; set; } public IList<Permission> PermissionItems { get; set; } public IList<string> MenuItemKeys { get; set; } } ``` This means, (1) Every user has some `Role`s. (2) Every user has some `Permission`s (depending on to `Role`s). (3) Every user has some permitted `MenuItemKey`s (according to `Permission`s). How should my `User.hbm.xml` look like?
How to map this class in NHibernate (not FluentNHibernate)?
CC BY-SA 2.5
0
2010-03-04T20:00:46.717
2010-03-12T14:15:56.373
2017-02-08T14:22:13.117
-1
159,072
[ "nhibernate", "nhibernate-mapping" ]
2,382,882
1
2,382,962
null
1
260
Here's what I'd like: ![alt text](https://imgur.com/9uKoS.png) Here's my code: ``` <?php require_once ('Zend\Form.php'); class Sergio_Form_registrationform extends Zend_Form { public function init(){ /*********************USERNAME**********************/ $username = new Zend_Form_Element_Text('username'); $alnumValidator = new Zend_Validate_Alnum(); $username ->setRequired(true) ->setLabel('Username:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($username); /*********************EMAIL**********************/ $email = new Zend_Form_Element_Text('email'); $alnumValidator = new Zend_Validate_Alnum(); $email ->setRequired(true) ->setLabel('EMail:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($email); /*********************PASSWORD**********************/ $password = new Zend_Form_Element_Password('password'); $alnumValidator = new Zend_Validate_Alnum(); $password ->setRequired(true) ->setLabel('Password:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($password); /*********************PASSWORD-CONFIRM**********************/ $passwordc = new Zend_Form_Element_Password('passwordc'); $alnumValidator = new Zend_Validate_Alnum(); $passwordc ->setRequired(true) ->setLabel('Confirm Password:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($passwordc); /*********************NAME**********************/ $name = new Zend_Form_Element_Text('name'); $alnumValidator = new Zend_Validate_Alnum(); $name ->setRequired(true) ->setLabel('Name:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($name); /*********************AVATAR**********************/ $avatar = new Zend_Form_Element_File('avatar'); $alnumValidator = new Zend_Validate_Alnum(); $avatar ->setRequired(true) ->setLabel('Please select a display picture:'); $this->addElement($avatar); /*********************SUBMIT**********************/ $this->addElement('submit', 'login', array('label' => 'Login')); } } ?> ``` And in my View, here's the code I use to show the previous form: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Thank you for signing up!</title> <style type="text/css"> #imageSignUp img{ float: right; padding: 3em; } </style> </head> <body> <h1>Thanks for signing up!</h1> <?php echo $this->form; ?> <img alt="signupimg" src="/img/signup.png"> </body> </html> ```
How can I place an image on the right of my form if I'm using the Zend_Form?
CC BY-SA 2.5
0
2010-03-04T21:35:26.053
2010-03-04T22:30:53.133
2010-03-04T22:30:53.133
80,425
null
[ "css", "forms", "zend-form" ]
2,385,365
1
null
null
2
3,538
I want to do a demo just like WaveSecure, which win Android Develop Challenge 2 with a third place. Now I have a problem in locking the screen customly, so I want to know how WaveSecure achieve its locking function, as the following picture show: ![enter image description here](https://i.stack.imgur.com/AuYGx.jpg) When the mobile is locked, WaveSecure can require customer to input their own password. So I think WaveSecure must replace Android's original locking function. And I also google it, but I didn't find anything helpful. I only find two packages may be helpful. They are: - - But after I reading the Android Docs, I still can't have an idea on it. Can you help me? Thx:)
How to lock the Screen customly? Just like WaveSecure in Android
CC BY-SA 3.0
0
2010-03-05T08:18:58.113
2011-08-15T16:38:51.013
2011-08-15T16:38:51.013
665,800
197,165
[ "android", "lockscreen" ]
2,386,866
1
2,386,929
null
672
613,210
Here's my layout code; ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:text="@string/welcome" android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content"> </TextView> <LinearLayout android:id="@+id/LinearLayout" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="bottom"> <EditText android:id="@+id/EditText" android:layout_width="fill_parent" android:layout_height="wrap_content"> </EditText> <Button android:text="@string/label_submit_button" android:id="@+id/Button" android:layout_width="wrap_content" android:layout_height="wrap_content"> </Button> </LinearLayout> </LinearLayout> ``` What this looks like is on the left and what I want it to look like is on the right. ![Android Layout - Actual (Left) and Desired (Right)](https://lh4.ggpht.com/_EW60jqE5_B0/S5D_wMGvK7I/AAAAAAAAALs/p5YdtjqMr-E/s800/Android%20Layout.png) The obvious answer is to set the TextView to fill_parent on height, but this causes no room to be left for the button or entry field. Essentially the issue is that I want the submit button and the text entry to be a fixed height at the bottom and the text view to fill the rest of the space. Similarly, in the horizontal linear layout I want the submit button to wrap its content and for the text entry to fill the rest of the space. If the first item in a linear layout is told to fill_parent it does exactly that, leaving no room for other items. How do I get an item which is first in a linear layout to fill all space apart from the minimum required by the rest of the items in the layout? --- Relative layouts were indeed the answer: ``` <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:text="@string/welcome" android:id="@+id/TextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true"> </TextView> <RelativeLayout android:id="@+id/InnerRelativeLayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" > <Button android:text="@string/label_submit_button" android:id="@+id/Button" android:layout_alignParentRight="true" android:layout_width="wrap_content" android:layout_height="wrap_content"> </Button> <EditText android:id="@+id/EditText" android:layout_width="fill_parent" android:layout_toLeftOf="@id/Button" android:layout_height="wrap_content"> </EditText> </RelativeLayout> </RelativeLayout> ```
How do I align views at the bottom of the screen?
CC BY-SA 4.0
0
2010-03-05T13:04:23.203
2019-09-24T10:59:52.127
2019-09-24T10:41:59.400
63,550
111,734
[ "android", "xml", "user-interface", "android-layout" ]
2,387,033
1
2,387,746
null
26
27,069
How can I make a table with a round border, similar to the photo below, in Android? ![Round-bordered table](https://i.stack.imgur.com/iDwyy.png)
Android table with round border
CC BY-SA 3.0
0
2010-03-05T13:33:32.370
2012-05-29T22:55:57.757
2012-05-29T22:55:57.757
85,950
258,863
[ "android", "tablelayout" ]
2,390,386
1
2,435,656
null
12
29,609
I found this post on [Crystal Reports Cutting Off Text in PDF](https://stackoverflow.com/q/866540/1366033), but it didn't solve my problem. I have a Crystal Report that contains a field within a text object (to control line spacing) and has "can grow" selected. When I export the Crystal Report to a PDF there are instances when the text is cut off. ![enter image description here](https://i.stack.imgur.com/tBsWT.png) In this example the text is being cut off on the right side, but in some cases, when the text consists of many lines, the bottom part of the last line will be partially cut off. I am using Crystal Reports that is bundled with Visual Studio 2008. The text area has "can grow" checked, the font is set to Helvetica LT Condensed, bold 14, and the line spacing is set to 0.75 times normal. Anyone have any thoughts on how can I fix this?
Crystal Reports Cutting Off Text in PDF
CC BY-SA 3.0
0
2010-03-05T22:30:13.130
2021-05-26T08:18:12.887
2017-05-23T12:10:33.983
-1
1,178,532
[ "pdf", "text", "crystal-reports", "crystal-reports-2008", "crystal-reports-10" ]
2,390,400
1
2,412,879
null
8
4,233
I'm developing an augmented reality application for Android that uses the phone's camera to recognise the arrangement of the coloured squares on each face of a Rubik's Cube. One thing that I am unsure about is how exactly I would go about detecting and recognising the coloured squares on each face of the cube. If you look at a Rubik's Cube then you can see that each square is one of six possible colours with a thin black border. This lead me to think that it should be relativly simply to detect a square, possibly using an existing marker detection API. ![Rubik's Cube](https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Rubik%27s_cube.svg/200px-Rubik%27s_cube.svg.png) My question is really, has anybody here had any experience with image recognition and Android? Ideally I'd like to be able to implement and existing API, but it would be an interesting project to do from scratch if somebody could point me in the right direction to get started. Many thanks in advance.
Marker Recognition on Android (recognising Rubik's Cubes)
CC BY-SA 3.0
0
2010-03-05T22:32:39.117
2013-12-09T20:22:08.367
2017-02-08T14:22:15.537
-1
205,877
[ "android", "image-processing", "computer-vision", "augmented-reality", "rubiks-cube" ]
2,391,382
1
2,391,384
null
7
5,275
Some Windows applications add buttons to the control box, which apparently is the name for the group of minimize, maximize, and close buttons. One such application is Skype, which has a button for switching from a one-window-that-contains-everything mode to a one-window-per-conversation mode and vice versa: ![Skype's custom control box button](https://content.screencast.com/users/icktoofay/folders/Jing/media/032188ec-5bf7-42f2-bc25-9fad78edb556/Skype%27s%20custom%20control%20box.png) I'd like to know how you can do this. I've looked around and can't figure out how. I assume it would require P/Invoke and the Windows API, but I'm not sure what function I'd use.
Custom control box button
CC BY-SA 2.5
0
2010-03-06T04:47:53.037
2010-03-06T04:52:51.910
2017-02-08T14:22:15.883
-1
200,291
[ "c#", ".net", "winforms", "winapi" ]
2,391,672
1
2,422,618
null
8
4,524
I am trying to find a fast algorithm with modest space requirements to solve the following problem. > Given this DAG: ![DAG from Wikipedia](https://upload.wikimedia.org/wikipedia/commons/0/08/Directed_acyclic_graph.png) I expect the following result: ``` Vertex # Reacability Count Reachable Vertices in closure 7 5 (11, 8, 2, 9, 10) 5 4 (11, 2, 9, 10) 3 3 (8, 9, 10) 11 5 (7, 5, 2, 9, 10) 8 3 (7, 3, 9) 2 3 (7, 5, 11) 9 5 (7, 5, 11, 8, 3) 10 4 (7, 5, 11, 3) ``` It seems to me that this should be possible without actually constructing the transitive closure. I haven't been able to find anything on the net that exactly describes this problem. I've got some ideas about how to do this, but I wanted to see what the SO crowd could come up with.
Finding the Reachability Count for all vertices of a DAG
CC BY-SA 2.5
0
2010-03-06T07:08:08.210
2019-02-05T18:40:47.377
2017-02-08T14:22:16.240
-1
71,109
[ "algorithm", "graph-theory", "directed-acyclic-graphs" ]
2,393,863
1
null
null
28
115,278
I'm using Microsoft Visual Studio 2008 and I'm trying to set an exe icon for my program. I've searched this site and found this: [How do I set the icon for my application in visual studio 2008?](https://stackoverflow.com/questions/320677/how-do-i-set-the-icon-for-my-application-in-visual-studio-2008) But I can't find this "Resource View". I've looked everywhere in MVS08 How may I access Resource View and set the main icon for my application? ![http://i46.tinypic.com/nd7m8z.jpg](https://i.stack.imgur.com/pa5L7.jpg)
Set an exe icon for my program
CC BY-SA 3.0
0
2010-03-06T19:43:28.010
2022-03-31T19:38:29.197
2017-05-23T11:45:33.393
-1
287,896
[ "c++", "visual-studio-2008", "resources", "executable", "icons" ]
2,395,057
1
2,395,076
null
2
2,633
I am looking to keep track of people in my iPhone app - either adding them from existing contact data, or prompting the user to enter a new contact which will be saved to their Contacts. I know I can create a persons record add write it to the Contact book, ? Or do I have to implement my own view to facilitate creating a contact entry? ![Screenshot of the New Contact screen on an iPhone](https://i.stack.imgur.com/BDblX.jpg)
How to add contact from within an iPhone app?
CC BY-SA 4.0
0
2010-03-07T03:28:14.503
2019-06-27T06:23:54.737
2019-06-27T06:23:54.737
4,751,173
1,390,354
[ "iphone", "iphone-sdk-3.0", "addressbook", "contacts" ]
2,396,147
1
2,396,164
null
2
66
I have two distinct scenarios. One, where there is a many to many case, you must create a third table. But I'm not familiar with MySQL syntaxis. ![alt text](https://imgur.com/1sp6l.png) Two, is this one: ![alt text](https://imgur.com/Gs1SK.png) How can I declare using SQL code?
How can I make tables in MySQL?
CC BY-SA 2.5
null
2010-03-07T11:59:20.547
2010-03-08T09:02:39.040
2010-03-08T09:02:39.040
11,589
null
[ "mysql" ]
2,396,499
1
2,396,523
null
1
2,163
I can't think of an example where the reference count of a file may not be zero even when it is no longer possible to refer a directory or file. The only example that I could find for a general graph directory structure is this: ![example of general graph](https://upload.wikimedia.org/wikipedia/commons/5/50/DC8.png) If I wanted to delete Node 1, it should be okay since there is only one reference to it (Node 8). So my question would be: Could anyone give me an example where the reference count is not zero even if it is no longer possible to refer to that file/directory? This is for a presentation that I would be presenting tomorrow for class. I tried searching for an answer on the net but they all just say the same thing without giving a concrete example. Or maybe I'm just dumb. :)
General graph directory structure needs garbage collection?
CC BY-SA 2.5
0
2010-03-07T14:06:19.543
2010-03-07T14:14:50.963
2017-02-08T14:22:17.613
-1
159,177
[ "filesystems", "directory-structure" ]
2,396,741
1
2,396,818
null
1
146
My form class: ``` <?php require_once ('Zend\Form.php'); class Sergio_Form_registrationform extends Zend_Form { public function init(){ /*********************USERNAME**********************/ $username = new Zend_Form_Element_Text('username'); $alnumValidator = new Zend_Validate_Alnum(); $username ->setRequired(true) ->setLabel('Username:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($username); /*********************EMAIL**********************/ $email = new Zend_Form_Element_Text('email'); $alnumValidator = new Zend_Validate_Alnum(); $email ->setRequired(true) ->setLabel('EMail:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($email); /*********************PASSWORD**********************/ $password = new Zend_Form_Element_Password('password'); $alnumValidator = new Zend_Validate_Alnum(); $password ->setRequired(true) ->setLabel('Password:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($password); /*********************NAME**********************/ $name = new Zend_Form_Element_Text('name'); $alnumValidator = new Zend_Validate_Alnum(); $name ->setRequired(true) ->setLabel('Name:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($name); /*********************LASTNAME**********************/ $lastname = new Zend_Form_Element_Text('lastname'); $alnumValidator = new Zend_Validate_Alnum(); $lastname ->setRequired(true) ->setLabel('Last Name:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($lastname); /*********************DATEOFBIRTH**********************/ $dateofbirth = new Zend_Form_Element_Text('dateofbirth'); $alnumValidator = new Zend_Validate_Alnum(); $dateofbirth->setRequired(true) ->setLabel('Date of Birth:') ->addFilter('StringToLower') ->addValidator('alnum') ->addValidator('regex', false, array('/^[a-z]+/')) ->addValidator('stringLength',false,array(6,20)); $this->addElement($dateofbirth); /*********************AVATAR**********************/ $avatar = new Zend_Form_Element_File('avatar'); $alnumValidator = new Zend_Validate_Alnum(); $avatar ->setRequired(true) ->setLabel('Please select a display picture:'); $this->addElement($avatar); /*********************SUBMIT**********************/ $this->addElement('submit', 'login', array('label' => 'Login')); } } ?> ``` And here I'm saving things: ``` <?php require_once ('Zend\Controller\Action.php'); class RegistrationController extends Zend_Controller_Action { //For each of these methods, you MUST have another phtml file in the respective View folder. public function indexAction(){ $form = new Sergio_Form_registrationform(); $this->view->form = $form; } public function init(){ $this->_setParam('db',Zend_Db_Table_Abstract::getDefaultAdapter()); } public function saveforminformationAction(){ $form = new Sergio_Form_registrationform(); $request = $this->getRequest(); //if($request->isPost() && $form->isValid($_POST)){ $data = $form->getValues(); unset($data['login']); $db = $this->_getParam('db'); $db->insert('user',$data); //} } } ?> ``` And here's a screenshot of how things are being saved: ![alt text](https://imgur.com/QRgQe.png) What am I doing wrong? Not even the dates I write are being saved. Here's the table structure: ![alt text](https://imgur.com/d1PzA.png)
Not all fields are being saved in my MySQL Database
CC BY-SA 2.5
null
2010-03-07T15:20:47.050
2010-03-07T15:42:29.223
2010-03-07T15:33:19.133
208,809
null
[ "php", "mysql", "zend-framework", "forms" ]
2,399,338
1
null
null
6
4,890
My task is to move this VS solution and projects to another SVN server. I'm working with Visual Studio 2010 RC1 and AnkhSVN 2.1.7819.... - `C:\Repositories\foo`- `http://someSite/svn/foo` The most obvious way, I found, was the window (which appears to belong to AnkhSVN). It appears to allow you to change the repository that you're working with. ![alt text](https://i.imgur.com/evQt5.png) ![alt text](https://i.imgur.com/F8Bpu.png) I'm presented with this error message: > Repository UUID '152c39db-5799-4234-85f2-074004a6fcad' doesn't match expected UUID '6c83444d-7f93-d64a-b0a0-23283495cf17' - - - `C:\Repositories\`
AnkhSVN: moving a project to another repo
CC BY-SA 2.5
0
2010-03-08T04:45:00.863
2017-05-22T15:20:49.447
2010-04-02T02:44:41.590
164,901
23,199
[ "svn", "version-control", "ankhsvn" ]
2,399,994
1
2,400,154
null
2
170
Suppose I have an HTML page with three blocks of fixed width (their height can vary if that's important), like shown on picture: ![alt text](https://i.imgur.com/wVO21.jpg) I would like to make it behave as shown on next picture: when browser screen width is reduced so it can't fit all three blocks in one line, first block goes down. ![alt text](https://i.imgur.com/tu56R.jpg) Is it possible to achieve such behavior? Preferably with CSS only but any working solution would be great.
smart page resizing
CC BY-SA 2.5
null
2010-03-08T08:12:15.790
2010-03-08T08:51:55.280
null
null
179,746
[ "html", "css", "positioning" ]
2,404,037
1
2,404,305
null
2
3,615
To use as an example: lets say that I have 2 [EditText](http://developer.android.com/reference/android/widget/EditText.html)s and one Button that I'm using as a login form. I want the EditTexts to be the same size, one after the other, with the login [Button](http://developer.android.com/reference/android/widget/Button.html) half their widths. Something like this: ![example login screenshot](https://imgur.com/P5Z1x.png) The only way that I've been able to find to make the button 1/2 the width (but still maintain it's dynamic sizing) is to use a [TableLayout](http://developer.android.com/reference/android/widget/TableLayout.html) with an empty view as the first field. Something like this: ``` <TableLayout android:stretchColumns="0,1" android:shrinkColumns="0,1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/login_EditText_password"> <TableRow> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" /> <Button android:text="@string/login_login" android:id="@+id/login_Button_login" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </TableRow> </TableLayout> ``` That feels like a god-awful hack and there has GOT to be a better way. Do you know of one?
Dynamically sizing Views as a percentage (or similar)?
CC BY-SA 2.5
0
2010-03-08T19:21:02.963
2010-03-08T21:02:16.193
null
null
76,835
[ "android", "user-interface" ]
2,404,569
1
2,405,514
null
3
11,537
I have modified a working Windows service that had always been starting beforehand. After adding the System.Management reference it now sometimes will not start automatically. I get the following error: > Service cannot be started. System.Runtime.InteropServices.COMException (0x80010002): Call was canceled by the message filter. (Exception from HRESULT: 0x80010002 (RPC_E_CALL_CANCELED)) I found another post here on SO with someone having the same issue. [Why won't my .Net Windows service start automatically after a reboot?](https://stackoverflow.com/questions/998883/why-wont-my-net-windows-service-start-automatically-after-a-reboot) However, the proposed solution was to have the service start after the services it depends on have started. However, when I go to the Dependencies tab for my service, I see: ![alt text](https://imgur.com/GRcKv.jpg) Should I just use the workaround method of putting the thread to sleep, or is there a more proper way of getting this service to start correctly? Is this happening because .NET has not started before my service starts? Thanks, Tomek EDIT: I have added a try-catch statement to catch the exception. Here is the code that I added to the OnStart() method of my service (which is where the exception is being thrown) ``` try { _watcher = new ManagementEventWatcher(query); _watcher.EventArrived += new EventArrivedEventHandler(watcher_EventArrived); _watcher.Start(); } catch (Exception ex) { EventLog.WriteEntry("Could not create Sleep/Resume watcher" + ex.Message); } ``` The service does start now but without the functionality that I have added. I am new to .NET, but I took the watcher code from a sample I found online, so I am pretty sure it is correct. The Event Log displays the same exception: > Could not create Sleep/Resume watcher Call was canceled by the message filter. (Exception from HRESULT: 0x80010002 (RPC_E_CALL_CANCELED))
Why does my .NET Windows service not start automatically sometimes?
CC BY-SA 2.5
null
2010-03-08T20:41:22.373
2012-11-19T13:00:37.927
2017-05-23T12:13:31.853
-1
29,326
[ ".net", "windows", "service", "system.management" ]
2,407,283
1
2,407,414
null
1
1,632
I've been banging my ahead on this IE7 bug for the last few days and it's time to resort to the mind of the crowd. I have the following HTML and CSS: [http://beerpla.net/for_www/ie7_test/test.html](http://beerpla.net/for_www/ie7_test/test.html) The goal is to have a `<ul>`, with each `<li>` containing a small icon and some text. Multiline text would be aligned to itself and not wrap under the image. I've tried using `float:left` on the image and a bunch of other things, and finally I thought the `position:absolute` would work for sure but in IE7 I consistently see the text pop off to the next line and get misaligned with the image: ![alt text](https://i.imgur.com/AN4cI.png) This is what I expect it to look like: ![alt text](https://i.imgur.com/iV3zC.png) I even tried to make the div `display:inline` which kind of worked but then started wrapping under the image for long lines, so it was no good. `zoom:1` also produced a similar effect. I'm at a loss at the moment. This code works fine in all other browsers. IE7 is a special, very special child. Any ideas? Thank you. If you have IE8, you can emulate IE7 by pressing F12 and then Alt-7.
IE7 CSS bug aligning <img> with text in a <ul>
CC BY-SA 2.5
0
2010-03-09T07:26:53.087
2010-03-09T08:28:45.490
2010-03-09T07:31:53.413
47,680
47,680
[ "css", "image", "internet-explorer-7" ]
2,408,613
1
2,408,779
null
50
83,396
I'm having problems reading this one JPEG file using ImageIO.read(File file) - it throws an exception with the message "Unsupported Image Type". I have tried other JPEG images, and they seem to work fine. The only differance I've been able to spot is that this file seems to include a thumbnail - is that known to cause problems with ImageIO.read()? ![Troublesome image](https://i.imgur.com/AD5NOgEm.jpg) EDIT: Added the resulting image: ![Strange colors](https://i.imgur.com/NCdLB7hm.jpg)
Unable to read JPEG image using ImageIO.read(File file)
CC BY-SA 3.0
0
2010-03-09T11:27:32.347
2017-11-30T07:20:56.957
2015-07-14T16:06:15.750
1,044,603
209,641
[ "java", "image", "jpeg", "javax.imageio" ]
2,409,388
1
2,409,886
null
2
578
Sometimes when I set a breakpoint and start debugging its color changes from red to olive: ![yellow bullet](https://imgur.com/kJwpp.png) When it happens debugging doesn't stop at all - breakpoint is ignored. I want to know why this happens and how to avoid it in the future. Edit: It does not happens only when breakpoint is set on commented line of code: ![not commented olive bullet](https://imgur.com/wlRVl.png)
What olive bullet on breakpoint means in SharpDevelop
CC BY-SA 2.5
null
2010-03-09T13:45:10.363
2013-10-02T11:52:12.567
2010-03-10T08:14:23.707
269,362
269,362
[ "c#", "debugging", "sharpdevelop" ]
2,409,774
1
2,410,136
null
7
4,007
I am experimenting with matplotlib at the moment. Some time ago I used Excel VBA code to produce images such as the one attached. You will notice it is not presented in a scientific/research style but rather as if produced by a school-student on graph paper - with three different grid-line styles. Is there a fairly straightforward way to achieve this sort of thing with matplotlib? ![alt text](https://i1038.photobucket.com/albums/a462/geddes_c/old_graph.png)
How can I produce student-style graphs using matplotlib?
CC BY-SA 2.5
0
2010-03-09T14:37:21.143
2021-03-12T22:09:50.413
2017-02-08T14:22:22.083
-1
271,386
[ "python", "matplotlib", "wxpython" ]
2,411,975
1
2,412,186
null
1
430
This chart has been linked a number of times on blogs that I follow and I feel like a rube not getting it. So, going out on a limb here and asking this community. Please explain this grid from the blog post [here](http://www.kevinwilliampang.com/2010/01/14/how-fanboys-see-net-data-access-strategies/). ![alt text](https://lh3.googleusercontent.com/qGMP4tfWzflG9QE8IF_n3qC6ZOM1rhvd-tzMOXpAIn058PaBpp9_rTDZwDZrmRfs0cAqQRCcZSbSvBv6048NPl8Mkg=s512)
Please explain "How Fanboys See .NET Data Access Strategies"
CC BY-SA 2.5
0
2010-03-09T19:35:54.103
2010-03-09T20:08:21.900
null
null
4,594
[ ".net", "persistence", "culture", "data-access" ]
2,417,123
1
2,417,190
null
7
1,103
I'm talking about [these](http://www.w3.org/QA/Tools/Icons). ![alt text](https://www.w3.org/Icons/valid-xhtml11) ![alt text](https://www.w3.org/Icons/valid-css2) ![alt text](https://www.w3.org/Icons/valid-svgtiny12) Yeah, I know they are intended to show that the page conforms to the standards and should link to page revalidation service. Ok. But why should I as a regular user bother with this? As a visitor I'm indifferent to whether the page is strict XHTML or not, whether it contains dirty IE hacks or not. It is important that a page renders correctly, is convenient and works fast. That's all! And in reality, in many cases these requirements don't get along with W3C standards smoothly. So what is the mania to add something targeted toward developers to a product face? Am I missing a point?
What is the point of using W3C valid badges?
CC BY-SA 2.5
0
2010-03-10T13:20:59.477
2010-03-10T14:28:08.693
2017-02-08T14:22:26.473
-1
57,868
[ "html", "css", "validation", "w3c" ]
2,418,722
1
2,418,837
null
41
4,211
I recently saw someone with a T-shirt with some Perl code on the back. I took a photograph of it and cropped out the code: ![alt text](https://i.imgur.com/FS7oo.jpg) Next I tried to extract the code from the image via OCR, so I installed [Tesseract OCR](http://code.google.com/p/tesseract-ocr/) and the Python bindings for it, [pytesser](http://code.google.com/p/pytesser/). Pytesser only works on TIFF images, so I converted the image in Gimp and entered the following code (Ubuntu 9.10): ``` >>> from pytesser import * >>> image = Image.open('code.tif') >>> print image_to_string(image) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pytesser.py", line 30, in image_to_string util.image_to_scratch(im, scratch_image_name) File "util.py", line 7, in image_to_scratch im.save(scratch_image_name, dpi=(200,200)) File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1406, in save save_handler(self, fp, filename) File "/usr/lib/python2.6/dist-packages/PIL/BmpImagePlugin.py", line 197, in _save raise IOError("cannot write mode %s as BMP" % im.mode) IOError: cannot write mode RGBA as BMP >>> r,g,b,a = image.split() >>> img = Image.merge("RGB", (r,g,b)) >>> print image_to_string(img) Tesseract Open Source OCR Engine éi _ l_` _ t ’ ‘" fY` { W IKQW · __·_ ‘ ·-»· :W Z ·· I A n 1 ;f ` ` `T .' V _ ‘ I {Z.; » ;,. , ; y i- 4 : %:,, `· » V; ` ? ‘,—·. H***li¥v·•·}I§¢ ` _ »¢is5#__·¤G$++}§;“»‘7· 71 ’ Q { NH IQ ytéggygi { ;g¤qg;gm·;,g(g,,3) {3;;+- § {Jf**$d$ }‘$p•¢L#d¤ Sc} » i ` i A1: ``` That's clearly gibberish that comes out of the OCR engine. So, my question is: - -
Extracting code from photograph of T-shirt via OCR
CC BY-SA 3.0
0
2010-03-10T16:43:36.980
2022-05-02T09:51:40.870
2016-01-19T01:04:54.363
792,066
50,065
[ "python", "ocr", "tesseract" ]
2,419,186
1
2,419,447
null
11
24,676
I want to draw a graph in my Django-based site, to look like these one: ![http://cssglobe.com/lab/csslinegraph/img.gif](https://i.stack.imgur.com/QFvS4.gif) How can I do this?
Drawing graphs in Django
CC BY-SA 3.0
0
2010-03-10T17:44:29.387
2017-07-02T16:22:37.247
2015-07-07T02:27:27.137
null
290,764
[ "django", "graph" ]
2,420,283
1
null
null
0
117
Given a infinite stream of random 0's and 1's that is from a biased (e.g. 1's are more common than 0's by a know factor) but otherwise ideal random number generator, I want to convert it into a (shorter) infinite stream that is just as ideal but also unbiased. Looking up the [definition of entropy](http://en.wikipedia.org/wiki/Entropy_(information_theory)#Definition) finds this graph showing how many bits of output I should, in theory, be able to get from each bit of input. ![Entropy of a coin flip in bits versus the fairness of the coin](https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Binary_entropy_plot.svg/200px-Binary_entropy_plot.svg.png) The question:
How to adjust the distribution of values in a random data stream?
CC BY-SA 2.5
null
2010-03-10T20:20:38.043
2010-05-26T18:09:49.210
2017-02-08T14:22:26.807
-1
1,343
[ "random", "information-theory" ]
2,420,320
1
2,420,401
null
0
120
I'm merging multiple small images into a rectangular mosaic. When dealing with a small number of source images it turns out fine: ![enter image description here](https://i.stack.imgur.com/5HF0p.png) But when dealing with a larger number of sources it turns out a sepia like effect: ![enter image description here](https://i.stack.imgur.com/ejWs6.jpg) Is there any technique I should be used to preserve the colors? My method for merging the images is essentially running a script that loops through the source images using `imagecreatefromjpeg()` to grab it, followed by `imagecopy()` to merge the source onto the collective destination image (and runs until all images have been added/placed).
When dealing with GD Library unwantedly altering colors
CC BY-SA 3.0
null
2010-03-10T20:26:25.267
2012-07-29T05:59:41.177
2012-07-29T05:59:41.177
352,449
290,895
[ "php", "image", "gdlib" ]
2,420,610
1
2,421,149
null
2
614
I wanted to show problem with [this video. Please watch...](http://screencast.com/t/M2E5MzE1) I've 2 pages. Second page is sending selected pictures to the opener window(first one) using fResimleriEkle function. I'm setting every element of array to another array variables (ArrResimler and ArrMetinler). But when i fire the fAlbumOlustur function by clicking to button, i can't see the values of global variables. Is there any problem about global variables? The problem is in the picture: ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/a1dcc552-8013-4c08-ab23-b95eba2df7f5/2010-03-10_2258.png) Thank you for your help....
Javascript global variable question
CC BY-SA 2.5
null
2010-03-10T21:10:12.113
2010-03-10T22:30:59.797
2017-02-08T14:22:27.140
-1
104,085
[ "javascript" ]
2,421,701
1
2,423,324
null
27
7,029
I recently upgraded to using ReSharper 5 (currently in beta). I noticed that in ASP.Net MVC projects, ReSharper underlines in red all of the return statements inside a controller: ![Annoying Red Underlines](https://i.stack.imgur.com/SROlp.gif) I personally find this pretty annoying because it looks like an error. Clicking on the underlined text doesn't offer any help (ie, a lightbulb). I don't see an option to change the styling of this text in `Environment -> Fonts and Colors`, and so far it looks like the only way to disable it is to un-check the "Enable ASP.Net MVC References" in the `ASP.Net -> Other` Re-Sharper options.
What's the point of the red underline highlighting in ReSharper 5 for ASP.Net MVC?
CC BY-SA 3.0
0
2010-03-11T00:20:13.517
2018-02-25T09:32:46.807
2018-02-25T09:32:46.807
352,841
25,549
[ "asp.net-mvc", "visual-studio", "resharper" ]
2,421,717
1
2,421,802
null
3
11,029
I 'm relatively new to git and and having some problems early on. I've made several commits, but when I try to push them I get a response that says everything is up-to-date. I feel like my problem is the same on listed in [this question](https://stackoverflow.com/questions/999907/git-push-says-everything-up-to-date-even-though-i-have-local-changes), but it recommends the following: ``` $ git log -1 # note the SHA-1 of latest commit $ git checkout master # reset your branch head to your previously detached commit $ git reset --hard <commit-id> ``` What exactly will "checking out the master" do? I just don't want to lose the changes I've made... screenshot of gitk: ![enter image description here](https://i.stack.imgur.com/OvTa4.jpg)
What will git checkout master + git reset --hard do?
CC BY-SA 3.0
0
2010-03-11T00:24:01.537
2011-08-16T14:02:01.183
2017-05-23T12:01:12.863
-1
91,748
[ "git", "branch" ]
2,426,425
1
2,426,822
null
0
895
I'm trying to add textures and shadows outside div elements in a webpage, without using "wrappers". Any suggestions? --- ![alt text](https://imgur.com/9y5XP.png) ![alt text](https://imgur.com/DsxsY.png) --- Help would be very much appreciated!
Adding shadows or textures outside a div? - CSS
CC BY-SA 2.5
0
2010-03-11T15:52:30.107
2010-03-11T18:21:06.737
null
null
208,827
[ "html", "css" ]
2,426,661
1
null
null
2
1,245
I've got an MFC application that is built with VC6. When ClearType is enabled (Windows XP) some texts are rendered smoothly, i.e. with ClearType, and others are not. Dialog texts don't seem to ever get rendered with ClearType. Some list controls, however, have it enabled completely, others only in their headers. What could be the reason for this? Where should I look to find out why it works only in some places and doesn't in others? As requested, here is an enlarged screenshot. Obfuscated but the important parts should be visible. - `List 1`- `List 2`- `Dialog` ![screenshot of cleartype working sometimes and sometimes not](https://i.stack.imgur.com/hlq9f.png)
Why are not all texts of my MFC applicatiopn displayed using ClearType?
CC BY-SA 3.0
null
2010-03-11T16:21:19.213
2013-02-07T20:23:21.527
2013-02-07T20:23:21.527
27,596
27,596
[ "mfc", "fonts", "visual-c++", "dialog", "cleartype" ]
2,426,711
1
2,426,770
null
0
805
I want to compare records between 2 databases on my SQL 2008 Server. The query below works in SSMS. ``` SELECT 'Manual', manual.*, 'Auto', Auto.* FROM (SELECT * FROM TESTINGSOMODS..TESTINGSOManMODS) Manual FULL OUTER JOIN (SELECT * FROM CHELTONCUSTOMIZATIONS..SOMODS) Auto ON manual.[Order No] = auto.fsono ``` I created a solution and when I tried to set up a shared data source, I am confronted with the following: ![DataSource](https://i857.photobucket.com/albums/ab132/DavidSteinJr/shared_data_source.png) So, my first question is, if I want to pull from 2 different databases what do I enter for "Select or enter a database name"?
SSRS Report to read from 2 databases
CC BY-SA 2.5
null
2010-03-11T16:25:57.183
2010-03-11T23:10:54.950
2017-02-08T14:22:28.493
-1
455,292
[ "sql-server-2008", "reporting-services" ]
2,428,109
1
null
null
11
2,208
I'm having an issue using bilinear interpolation for 16 bit data. I have two images, origImage and displayImage. I want to use AffineTransformOp to filter origImage through an AffineTransform into displayImage which is the size of the display area. origImage is of type BufferedImage.TYPE_USHORT_GRAY and has a raster of type sun.awt.image.ShortInterleavedRaster. Here is the code I have right now ``` displayImage = new BufferedImage(getWidth(), getHeight(), origImage.getType()); try { op = new AffineTransformOp(atx, AffineTransformOp.TYPE_BILINEAR); op.filter(origImage, displayImage); } catch (Exception e) { e.printStackTrace(); } ``` In order to show the error I have created 2 gradient images. One has values in the 15 bit range (max of 32767) and one in the 16 bit range (max of 65535). Below are the two images 15 bit image ![alt text](https://i.imgur.com/1bmPp.png) 16 bit image ![alt text](https://i.imgur.com/vEjKC.png) These two images were created in identical fashions and should look identical, but notice the line across the middle of the 16 bit image. At first I thought that this was an overflow problem however, it is weird that it's manifesting itself in the center of the gradient instead of at the end where the pixel values are higher. Also, if it was an overflow issue than I would suspect that the 15 bit image would have been affected as well. Any help on this would be greatly appreciated. I was just wondering why no one is answering, did I provide enough information? Is more info needed? Below is the code I use to generate the AffineTransform. All of the referenced variables are calculated based off of user input (mouse movement) and should be correct (it's been tested by a lot of people including myself). Hopefully this can help with the error. ``` AffineTransform panTranslate = new AffineTransform(); panTranslate.translate(imagePanOffset.x, imagePanOffset.y); AffineTransform rotateCenterTranslate = new AffineTransform(); rotateCenterTranslate.translate(imageRotateCTR.x, imageRotateCTR.y); AffineTransform rotateTransform = new AffineTransform(); rotateTransform.rotate(Math.toRadians(rotateValue)); AffineTransform rotateAntiCenterTranslate = new AffineTransform(); rotateAntiCenterTranslate.translate(-imageRotateCTR.x, -imageRotateCTR.y); AffineTransform translateTransform = new AffineTransform(); translateTransform.translate(imageMagOffset.x, imageMagOffset.y); AffineTransform flipMatrixTransform = new AffineTransform(); switch (flipState) { case ENV.FLIP_NORMAL: // NORMAL break; case ENV.FLIP_TOP_BOTTOM: // FLIP flipMatrixTransform.scale(1.0, -1.0); flipMatrixTransform.translate(0.0, -h); break; case ENV.FLIP_LEFT_RIGHT: // MIRROR flipMatrixTransform.scale(-1.0, 1.0); flipMatrixTransform.translate(-w, 0.0); break; case ENV.FLIP_TOP_BOTTOM_LEFT_RIGHT: // FLIP+MIRROR flipMatrixTransform.scale(-1.0, -1.0); flipMatrixTransform.translate(-w, -h); break; } scaleTransform = new AffineTransform(); scaleTransform.scale(magFactor, magFactor); AffineTransform atx = new AffineTransform(); atx.concatenate(panTranslate); atx.concatenate(rotateCenterTranslate); atx.concatenate(rotateTransform); atx.concatenate(rotateAntiCenterTranslate); atx.concatenate(translateTransform); atx.concatenate(flipMatrixTransform); atx.concatenate(scaleTransform); ``` I still have no idea what's going on here. I'd really appreciate any help that can be provided. I've also attached an example of the bug happening in a real image that I encounter for more reference. Here is the bug happening in an X-ray of the hand ![alt text](https://i.imgur.com/1PZlW.png) Here is a zoomed up version focused on the area between the thumb and first finger. ![alt text](https://i.imgur.com/rOzh0.png) Note again how the bug doesn't occur on the extremely white areas, but on the values in the middle of the dynamic range, just like in the gradient image. I've discovered more information. I was adjusting some of the transforms and found that the bug does not occur if I just filter through an identity matrix. It also doesn't occur if I translate by an integer amount. It does occur if I translate by a non integer amount. It also occurs if I zoom by any amount other than 1 (integer or not). Hopefully this helps. After more experimenting, the bug definitely manifests itself at the boundary pixels between half the max intensity (65535/2 = 32767.5). It also ONLY occurs at this value. I hope this might help diagnosis!! At the request of AlBlue here is code that is completely independent of my application that can generate the bug. Note that in the original post I included an image gradient generated with the below code however I zoomed in on one of the gradients to better show the effect. You should see the effect four times on the 0.5 translated image and not on either of the other two images. Also note that this bug appears while scaling by any amount other than 1. Just replace AffineTransform.getTranslateInstance() with AffineTransform.getScaleInstance(0.9, 0.9) to see the bug also. ``` private static class MyJPanel extends JPanel { BufferedImage displayImage = null; public MyJPanel(double translateValue) { super(); BufferedImage bi = new BufferedImage(1024, 1024, BufferedImage.TYPE_USHORT_GRAY); int dataRange = (int)Math.pow(2, 16); double step = dataRange/(bi.getRaster().getDataBuffer().getSize()/4.0); double value = 0; for (int i=0; i<bi.getRaster().getDataBuffer().getSize(); i++) { bi.getRaster().getDataBuffer().setElem(i, (int)value); if (value >= dataRange) value = 0; else value += step; } displayImage = new BufferedImage(bi.getWidth(), bi.getHeight(), bi.getType()); AffineTransform tx = AffineTransform.getTranslateInstance(translateValue, translateValue); AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR); op.filter(bi, displayImage); } public void paint(Graphics g) { super.paint(g); g.drawImage(displayImage, 0, 0, this); } } private static void showDisplayError() { JDialog dialog1 = new JDialog(); dialog1.setTitle("No Translation"); MyJPanel panel1 = new MyJPanel(0); dialog1.getContentPane().add(panel1); dialog1.setSize(1024, 1024); dialog1.setVisible(true); JDialog dialog2 = new JDialog(); dialog2.setTitle("Translation of 0.5"); MyJPanel panel2 = new MyJPanel(0.5); dialog2.getContentPane().add(panel2); dialog2.setSize(1024, 1024); dialog2.setVisible(true); JDialog dialog3 = new JDialog(); dialog3.setTitle("Translation of 1.0"); MyJPanel panel3 = new MyJPanel(1.0); dialog3.getContentPane().add(panel3); dialog3.setSize(1024, 1024); dialog3.setVisible(true); } ``` As another update, I just tried this on Fedora 10 and saw the bug is still present.
Java error on bilinear interpolation of 16 bit data
CC BY-SA 2.5
0
2010-03-11T19:43:00.720
2010-10-27T17:11:11.933
2010-03-23T00:10:20.683
21,234
59,535
[ "java", "image-processing", "bufferedimage", "16-bit", "affinetransform" ]
2,428,225
1
2,428,315
null
1
436
I've implemented [markitup](http://markitup.jaysalvat.com/home/) to handle users entering markdown text. I want to replace the default image insert command with a nice jquery routine that lets the user browse for an image. I'm able to edit the `set.js` file to call my javascript routine that brings up the file browser: ``` {name: 'Picture', key: 'P', call: 'insertImage'}, ``` My `insertImage` function looks like this: ``` function insertImage() { // launch Image Browser } ``` When the user selects an image in the image browser, another javascript function is called: ``` function addImage(imageurl,alttext) { var imagetext = "!["+alttext+"]("+imageurl+")"; // how do I insert imageurl into markitup?? } ``` I need help implementing `addImage`.
How do I insert text at the focus into a markitup editor with javascript?
CC BY-SA 2.5
null
2010-03-11T19:59:59.023
2010-03-11T20:13:13.923
null
null
28,260
[ "javascript", "markdown", "markitup" ]
2,429,181
1
2,429,250
null
6
15,142
See the chart below. I'm building the chart programatically, so no asp.net control syntax please. ![bar chart example](https://content.screencast.com/users/NathanRidley/folders/Jing/media/593e3f4a-e9ae-4bdf-9abf-c1911d34c23d/2010-03-11_2214.png) How do I change the grid line colours that cross horizontally and vertically behind the bars? As you can see I've worked out how to change the actual axis colours, but the grid colours remain black. ``` public ActionResult RenderChart() { var chart = new Chart(); double[] yValues = { 65.62, 75.54, 60.45, 55.73, 70.42 }; string[] xValues = { "Michelle", "Sarah", "Aliece", "Belinda", "Amanda" }; var series = new Series { Name = "Default", ChartType = SeriesChartType.Column, CustomProperties = "DrawingStyle=Cylinder" }; series.Points.DataBindXY(xValues, yValues); chart.BorderlineColor = Color.Silver; var area = new ChartArea("Test"); area.AxisX.LineColor = Color.DarkGray; area.AxisY.LineColor = Color.DarkGray; chart.ChartAreas.Add(area); chart.Series.Add(series); series.IsValueShownAsLabel = true; series.Font = new Font(series.Font, FontStyle.Bold); chart.Width = 400; chart.Height = 300; using(var ms = new MemoryStream()) { chart.SaveImage(ms, ChartImageFormat.Png); Response.ContentType = "image/png"; Response.BinaryWrite(ms.ToArray()); return new EmptyResult(); } } ```
How to change the axis divider line colors in Microsoft Chart Controls (column chart)
CC BY-SA 2.5
0
2010-03-11T22:25:47.070
2016-02-16T07:28:21.633
2017-02-08T14:22:28.827
-1
98,389
[ ".net", "charts" ]
2,429,902
1
2,430,167
null
8
3,131
I'm using this HTML,CSS and Javascript code (in one document together if you want to test it out): ``` <style type="text/css"> #slider_container { width: 200px; height: 30px; background-color: red; display:block; } #slider { width: 20px; height: 30px; background-color: blue; display:block; position:absolute; left:0; } </style> <script type="text/javascript" src="../../js/libs/jquery-1.4.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#slider").mousedown(function() { $(document).mousemove(function(evnt) { $("#test").html("sliding"); }).mouseup(function() { $("#test").html("not sliding"); $(document).unbind("mousemove mouseup"); });}); }); </script> <div id="test">a</div> <div id="slider_container"> <div id="slider"></div> </div> ``` Everything (surprisingly) works fine in IE, but firefox seems to totally clusterf*ck when this javascript is used. The first "slide" is okay, you drag, it says "sliding", you drop, it says "not sliding". On the second "slide" (or mousedown if you will), firefox suddenly thinks the div is an image or link and wants to drag it around. Screenshot of the dragging: ![http://i.imgur.com/nPJxZ.jpg](https://i.imgur.com/nPJxZ.jpg) Obviously the blue div half-positioned in the red div is the one being dragged. Windows does not capture the cursor when you take a screenshot, but it's a stop sign. Is there someway to prevent this default behaviour?
Firefox drags div like it was an image
CC BY-SA 3.0
0
2010-03-12T01:25:34.587
2013-05-06T14:50:11.940
2013-05-06T14:50:11.940
281,434
281,434
[ "javascript", "jquery", "firefox", "events" ]
2,429,940
1
2,429,991
null
2
1,156
What operating system and UI toolkit is this? It's not some fake Hollywood user interface. It's from Bloomberg. ![image](https://media.npr.org/assets/blogs/planetmoney/images/2010/03/toxic.jpg)
What operating system and UI toolkit is this?
CC BY-SA 2.5
0
2010-03-12T01:35:55.957
2014-04-02T15:51:29.477
2017-02-08T14:22:29.160
-1
292,036
[ "user-interface", "toolkit" ]
2,429,997
1
2,430,071
null
3
3,368
i have a container div which is `position:relative` and the squares are `position:absolute` because i want to play with their positions. ![alt text](https://imgur.com/irZRP.png) Like what you see, the container does not fit the content except if the squares are positioned in Relative, is there a solution for this? I don't want to just set the height for container because the squares are not static so i want something that resizes automatically. Thanks
How to make a DIV auto height resizable even if the content is absolute?
CC BY-SA 2.5
0
2010-03-12T01:51:37.467
2010-03-12T02:35:53.213
null
null
241,654
[ "css" ]
2,430,273
1
2,439,248
null
1
1,146
I have a JPanel that encapsulates two JPanels, one on top of the other. The first holds two JLabels which hold the playing cards. The second holds the player's text (name and score). However, when I remove the player's cards, the lower JPanel moves up to the top, which i would prefer that it not do. Is there a way to keep it in place regardless of whether the top JPanel is occupied or not? Thanks ![alt text](https://i.imgur.com/3lYYl.jpg) ![alt text](https://imgur.com/kYPPm.jpg)
java simple JPanel management (see screenshot)
CC BY-SA 2.5
null
2010-03-12T03:10:47.170
2010-03-13T17:31:24.693
2010-03-13T17:31:24.693
21,234
215,141
[ "java", "user-interface", "swing", "jpanel" ]
2,430,967
1
2,431,002
null
1
2,524
is it possible to balance the position of button(example toolbar in Safari)? ``` UIBarButtonItem *infoButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(support:)]; UIBarButtonItem *next = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay target:self action:@selector(support:)]; [self.navigationController.toolbar setItems:[NSArray arrayWithObjects:infoButton, next,nil] animated:YES]; ``` ![alt text](https://i708.photobucket.com/albums/ww82/RAGOpoR/IMG_0128.png)
how to balance position of UIBarButtonItem in toolbar
CC BY-SA 2.5
0
2010-03-12T06:42:24.243
2010-03-12T06:51:37.050
2017-02-08T14:22:29.497
-1
203,372
[ "iphone", "uitoolbar" ]
2,431,388
1
2,471,355
null
0
658
i have a website and in it is an application with website administration. It is possible to load an assembly from website in administration application? E.G: ![alt text](https://i719.photobucket.com/albums/ww191/ishtec/solution-referencing-parent-applica.jpg) WebAdmin project (web application) : in default.aspx i want to load assembly ClassLibrary1.dll and create instance of type ImportProvider. WebAdmin doesn't have reference to ClassLibrary1. Configuration in IIS: ![alt text](https://i719.photobucket.com/albums/ww191/ishtec/solution-referencing-parent-appl-1.jpg) Application directory "admin" (WebAdmin project) is in Website1 Thanks a lot
ASP.NET load assembly from parent application
CC BY-SA 2.5
null
2010-03-12T08:39:22.673
2010-03-18T16:04:21.233
2017-02-08T14:22:30.180
-1
77,154
[ "c#", "asp.net", "assembly.load" ]
2,431,959
1
2,431,989
null
1
223
I have a really simple Rails app. Basically an article with comments. I want the article page to show the article, comments underneath and then a textbox to write a comment and a submit button to submit it. I got it all working except for one (big) problem. When the page loads.. example.com/article/1 a blank comment is submitted to the database. I fixed that by including "validates_presence_of :body" in the Comment model. But that results in the following image when the page loads: ![alt text](https://imgur.com/P6Khy.png) This is my code by the way: ``` def show @place = Article.find(params[:id]) @comment = Article.find(params[:id]).comments.create(params[:comment]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @article } end end ``` and ``` <% form_for([@article, @comment]) do |f| %> <p> <%= f.label :commenter %><br /> <%= f.text_field :commenter %> </p> <p> <%= f.label :body %><br /> <%= f.text_area :body %> </p> <p> <%= f.submit "Create" %> </p> <% end %> ```
Form is submitting when the page loads
CC BY-SA 2.5
null
2010-03-12T10:21:54.230
2010-03-12T10:27:54.590
null
null
83,452
[ "ruby-on-rails" ]
2,432,312
1
2,504,812
null
3
2,847
i dont know, why the button are disappear after the toolbar set to hide and unhide. how can i fix it? setup a button code ``` -(void)viewDidAppear:(BOOL)animated { //NSLog(@"viewDidAppear "); [self becomeFirstResponder]; //Create a button UIBarButtonItem *back = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRewind target:self action:@selector(goback:)]; UIBarButtonItem *fixspace1 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil]; UIBarButtonItem *next = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFastForward target:self action:@selector(gofwd:)]; UIBarButtonItem *stop = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop target:self action:@selector(stopload:)]; UIBarButtonItem *refresh = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refreshWeb:)]; [self.navigationController.toolbar setItems:[NSArray arrayWithObjects:fixspace1, back, fixspace1, stop, fixspace1, next, fixspace1, nil] animated:YES]; [self.navigationItem setRightBarButtonItem:refresh animated:YES]; [self.navigationController.view addSubview:self.navigationController.toolbar]; [stop release]; [next release]; [back release]; [refresh release]; [fixspace1 release]; } ``` and i setup my button at this method ``` -(void)viewDidAppear:(BOOL)animated ``` this code use for hide toolbar ``` [self.navigationController setNavigationBarHidden:YES animated:YES]; [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; [self.navigationController setToolbarHidden:YES animated:YES]; ``` ![alt text](https://i708.photobucket.com/albums/ww82/RAGOpoR/IMG_0128.png)
button item lost when hide and unhide toolbar
CC BY-SA 2.5
0
2010-03-12T11:21:03.930
2010-03-24T01:35:32.267
2017-02-08T14:22:29.497
-1
203,372
[ "iphone", "uibarbuttonitem" ]
2,433,555
1
2,433,823
null
0
4,250
I'm curious if anyone knows of a way to easily get a double border effect in WPF similar to what you see in the selected items in Windows Explorer in Windows 7. ![Example of what I'm looking for](https://farm5.static.flickr.com/4058/4426553847_74ece107fb_o_d.png) If you look closely, you'll notice that the selected item has a dark border, a lighter, inner-border, and then a gradient background. Currently, I'm using two borders around an object any time I want to achieve this effect. Doing it that way is ugly syntactically and really muddies my view xaml. Being a web developer at heart I'd like to separate the xaml structure from the style as much as possible. So, I've started putting this into Styles and Content Templates in order to pull it out of my view xaml. However, I'm curious if there may be a better way to go about this. I played around for a while using a VisualBrush as a background to try to get the effect. However, I want to be able to apply the background to elements that can be any size and the way the VisualBrush stretched the visual to fit the element background didn't work the way I wanted it to. Essentially, I'd really just like it to stretch the visual the way the WPF layout system would do it. Any ideas would be greatly appreciated. -- Dusty
Double Border with a VisualBrush in WPF
CC BY-SA 2.5
0
2010-03-12T15:00:50.957
2010-03-15T14:51:57.263
2017-02-08T14:22:31.873
-1
77,040
[ "wpf", "visualbrush" ]
2,434,155
1
2,434,202
null
0
535
I'm running into a weird issue that I'm struggling to figure out what's causing the page to break. I have an internal website that's still under development (thus no link to the page) that works great in Firefox and Internet Explorer 8 in IE 7 Standards mode. But when I force it to IE 8 Standards mode the page will only display the title text in the browser tab and an otherwise completely blank page. It seems so broken that the blank page doesn't even have a context menu. The page generally looks like this: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="IE=8" http-equiv="X-UA-Compatible" /> <title>Page Title</title> <link rel="shortcut icon" href="/Images/favicon.ico" type="image/x-icon" /> <link href="/Style/main.less" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <span id="logindisplay">[ <a href="/Account/LogOn">Log On</a> ]</span> </div> <div class="colmask threecol"> <div class="colmid"> <div class="colleft"> <div class="col1"> <div id="title"> <h1>APP TITLE</h1> </div> <div class="logo"> <img alt="Application" src="/Images/info.png" title="Application" /> </div> <div> <div id="company">Offered by: <span>Company Name</span> </div> <div id="version">Version: 0.0.0.0</div> </div> </div> <div class="col2"> <div id="menucontainer"> <ul id="menu"> <li> <a href="/Module1" class="ciApp"> <img alt="module" height="84px" src="/Images/Module1.png" title="module" /> <span>Module</span> </a> </li> </ul> </div> </div> <div class="col3"> <div id="newsfeed"> <span class="welcomemessage">Welcome to <b>Application</b> </span> <div> <span class="newsLabel">New Features</span> <div class="newFeatures"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi egestas condimentum laoreet. Curabitur urna elit, sagittis vel condimentum sit amet, ullamcorper suscipit diam. Suspendisse non ligula metus, nec ultricies libero. Vestibulum molestie ornare urna, eu posuere ipsum lacinia nec. Nulla facilisi. Curabitur elit ligula, laoreet nec vehicula at, ornare sed metus. Suspendisse gravida mattis vulputate. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer rutrum erat sed lacus eleifend et dapibus nisi mollis. Nulla elementum lacus quis mauris pulvinar in accumsan odio malesuada. Aliquam ultrices, mauris sit amet pharetra euismod, nisi nunc rhoncus est, eu commodo nunc sem vitae risus. Ut egestas ligula eu elit blandit consequat. Donec nunc justo, congue non mollis at, porta non massa.</p> <p>Pellentesque consequat fermentum sapien at dictum. In pretium varius tellus, vitae blandit sapien cursus quis. Suspendisse potenti. Sed sollicitudin tempus elit et sodales. Vestibulum fringilla tempus elit, vitae convallis massa laoreet vel. Nulla facilisi. Duis dolor leo, lacinia ut ultrices eu, mollis in purus. Donec sagittis, est id tincidunt pulvinar, magna metus pellentesque nunc, eget tincidunt metus tellus sollicitudin tortor. Donec quis convallis nibh. In luctus, ipsum non sodales ornare, mi lectus molestie orci, id dignissim tellus augue at neque.</p> <p>Phasellus ut molestie leo. Donec egestas odio ut felis lacinia ut interdum diam interdum. Fusce at posuere tortor. Vestibulum cursus elit quis purus porta vitae adipiscing nulla laoreet. Nam pretium orci a sem volutpat nec rhoncus magna viverra. Aenean non orci sapien. Nunc hendrerit sollicitudin lorem viverra porta. Pellentesque ac porttitor elit. Mauris risus sem, dapibus eu convallis vel, posuere in nibh. Phasellus sit amet tortor neque, aliquam volutpat massa. Sed quam libero, porttitor a lacinia in, pellentesque in libero. Suspendisse adipiscing laoreet lacus, eget fringilla felis tristique id. Maecenas lacinia, ante a vulputate gravida, felis libero hendrerit dolor, non tristique ante massa vitae leo. Aenean laoreet porta urna ullamcorper facilisis.</p> <p>Nam a ligula a quam interdum ultricies. Suspendisse tempor pellentesque augue at sollicitudin. Sed vulputate, erat mollis fringilla rhoncus, nulla quam ullamcorper lacus, vel molestie metus ipsum quis eros. Fusce eget turpis tortor, viverra volutpat leo. Vestibulum in augue in augue fringilla volutpat sed eu purus. Ut varius lacus eget orci consequat eget tincidunt mi placerat. Donec suscipit suscipit enim, eget iaculis diam pellentesque in. Cras ac ante et lorem porttitor consectetur. Maecenas semper posuere magna. Aliquam erat volutpat. Sed at ante feugiat lectus hendrerit semper et ut elit. Aenean scelerisque fermentum justo, at blandit risus interdum eget. Donec a nulla pellentesque erat volutpat gravida. Nunc mattis est ac dolor dapibus viverra. Nulla facilisi.</p> <p>Donec diam neque, lobortis quis aliquam nec, fermentum ac quam. Cras porta nisi sed massa pellentesque vitae luctus erat porttitor. Sed porta elit ac ligula semper eget volutpat purus adipiscing. Mauris aliquet convallis consectetur. Aliquam vel neque sit amet odio dapibus feugiat. Morbi vehicula porttitor cursus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque ut augue at tellus iaculis fringilla ut at enim. Ut sed lorem nunc. Aliquam ac accumsan eros. Fusce faucibus, lacus in convallis commodo, turpis nisi gravida ligula, sit amet semper odio ante sit amet lorem. Integer mollis, nibh vel malesuada imperdiet, purus justo ullamcorper ipsum, sed volutpat velit dui eget felis. Quisque sapien ante, dapibus quis malesuada ultrices, tincidunt id nibh. </p> </div> </div> </div> </div> </div> </div> </div> <div id="footer"> </div> </body> </html> ``` You may notice the .less extension for the stylesheet. This is an ASP.NET MVC application and I'm making use of [DotLess](http://www.dotlesscss.com/). I have the HttpHandler hooked up for it in the web.config. Of course there's some additional info on the page, but (in theory) it shouldn't be causing this issue. I've run the CSS and the HTML through the W3C validators and both have come back as completely valid. I'm trying the arduous task of removing/re-adding elements until it displays, but any insight into what could cause this would help. : it appears to be something related to the DotLess stylesheet. The resulting CSS is valid according to the W3C CSS validator. : Digging further, and making use of IE's Developer Tools to control the styles, it appears that IE is reading a single statement twice even though it only occurs once in the output. Here's the output of the Less file: ``` a, abbr, acronym, address, applet, b, big, caption, center, cite, code, dd, dfn, div, dl, dt, em, fieldset, font, form, html, i, iframe, img, kbd, label, legend, li, object, pre, s, samp, small, span, strike, strong, sub, sup, tbody, td, tfoot, th, thead, tr, tt, u, var { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } blockquote, q { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; quotes: none; } body { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; line-height: 1; width: 100%; background: #efebde; min-width: 600px; } del { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; text-decoration: line-through; } h1 { border: 0; outline: 0; vertical-align: baseline; background: transparent; font-size: 2em; margin: .8em 0 .2em 0; padding: 0; } h2 { border: 0; outline: 0; vertical-align: baseline; background: transparent; font-size: 1.8em; margin: .8em 0 .2em 0; padding: 0; } h3 { border: 0; outline: 0; vertical-align: baseline; background: transparent; font-size: 1.6em; margin: .8em 0 .2em 0; padding: 0; } h4 { margin: 0; padding: 0; border: 0; outline: 0; vertical-align: baseline; background: transparent; font-size: 1.4em; } h5 { margin: 0; padding: 0; border: 0; outline: 0; vertical-align: baseline; background: transparent; font-size: 1.2em; } h6 { margin: 0; padding: 0; border: 0; outline: 0; vertical-align: baseline; background: transparent; font-size: 1em; } ins { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; text-decoration: none; } ol, ul { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; list-style: none; } p { border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; margin: .4em 0 .8em 0; padding: 0; } table { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; border-collapse: collapse; border-spacing: 0; } blockquote:before, blockquote:after, q:before, q:after { content: none; } :focus { outline: 0; } .bold { font-weight: bold; } .systemFont { font-family: Arial; } .labelled { font-style: italic; } .groovedBorder { border-color: #adaa9c; border-style: groove; border-width: medium; } #header, #footer { clear: both; float: left; width: 100%; } #header p, #header h1, #header h2 { padding: .4em 15px 0 15px; margin: 0; } #header ul { clear: left; float: left; width: 100%; list-style: none; margin: 10px 0 0 0; padding: 0; } #header ul li { display: inline; list-style: none; margin: 0; padding: 0; } #header ul li a { background: #eeeeee; display: block; float: left; left: 15px; line-height: 1.3em; margin: 0 0 0 1px; padding: 3px 10px; position: relative; text-align: center; text-decoration: none; } #header ul li a span { display: block; } #header ul li a:hover { background: #336699; } #header ul li a.active, #header ul li a.active:hover { background: black; font-weight: bold; } #header #logindisplay { float: right; padding-top: .5em; padding-bottom: .5em; padding-right: 1em; padding-left: 1em; } #title h1 { font-family: Arial; font-style: italic; font-size: 175%; text-align: center; margin-top: 1%; } .col1 { font-family: Arial; border-color: #adaa9c; border-style: groove; border-width: medium; min-height: 350px; float: left; overflow: hidden; position: relative; padding-top: 0; padding-bottom: 1em; padding-left: 0; padding-right: 0; } .col1 div.logo { text-align: center; } .col3 { font-family: Arial; border-color: #adaa9c; border-style: groove; border-width: medium; float: left; overflow: hidden; position: relative; } #layoutdims { clear: both; background: #eeeeee; margin: 0; padding: 6px 15px !important; text-align: right; } #company { padding-left: 10px; padding-top: 10px; margin: 0; } #company span { display: block; padding-left: 1em; } #version { padding-right: 1em; padding-top: 1em; text-align: center; } #menu li { padding: 6px; border-color: #adaa9c; border-style: groove; border-width: medium; min-width: 108px; } #menu li a.ciApp { text-decoration: none; font-size: 112.5%; font-weight: bold; font-family: Arial; color: black; } #menu li a.ciApp span { vertical-align: top; } .welcomemessage { font-size: 60.95%; } .newFeatures { overflow-y: scroll; max-height: 300px; } #newsfeed div .newsLabel { color: red; font-size: 60.95%; font-style: italic; } /************************************************************************************** This statement appears twice in Developer Tools. Disabling one disables both. Disabling it also causes the page to render. Turning it on and the page disappears again **************************************************************************************/ #newsfeed div .newFeatures { margin-left: 1em; margin-right: 1em; font-size: 60.95%; } /************************************************************************************** **************************************************************************************/ .colmask { clear: both; float: left; position: relative; overflow: hidden; width: 100%; } .colright, .colmid, .colleft { float: left; position: relative; width: 100%; } .col2 { float: left; overflow: hidden; position: relative; padding-top: 0; padding-bottom: 1em; padding-left: 0; padding-right: 0; } .threecol .colmid { right: 33%; } .threecol .colleft { right: 34%; } .threecol .col1 { width: 33%; left: 100%; } .threecol .col2 { width: 32%; left: 34%; } .threecol .col3 { width: 32%; left: 68.5%; } ``` Notice the `#newsfeed div .newFeatures` identifier near the end. I don't know what's causing that as it's only appearing once in the output stream. Here's an [image](https://i592.photobucket.com/albums/tt2/Agent_9191/IE_CSS_Error.png) of it too: ![CSS identifier duplication in Developer Tools](https://i592.photobucket.com/albums/tt2/Agent_9191/IE_CSS_Error.png) : It appears that even though it duplicates that particular selector, if I change the `font-size` to a whole number like `61%` instead of the current `60.95%` (that specific to defaultly match the existing desktop app as closely as possible) it works fine. I even moved the font-size (still as `60.95%`) to a more general selector (just the `.newFeature` one a few lines up) and it still causes the page to break. Still not sure why that is. I've added the full HTML to see what's going on.
Internet Explorer 8 Standards Mode Results In Broken Blank Page
CC BY-SA 2.5
null
2010-03-12T16:31:52.343
2010-03-12T20:02:58.730
2017-02-08T14:22:32.207
-1
6,504
[ "xhtml", "internet-explorer-8", "standards" ]
2,434,602
1
14,101,451
null
567
496,118
I'm trying to create some re-usable CSS classes for more consistency and less clutter on my site, and I'm stuck on trying to standardize one thing I use frequently. I have a container `<div>` that I don't want to set the height for (because it will vary depending on where on the site it is), and inside it is a header `<div>`, and then an of items, all with CSS applied to them. It looks a lot like this: ![Widget](https://i.stack.imgur.com/emytO.jpg) I want the to take up the remaining room in the container `<div>`, knowing that the header `<div>` is `18px` tall. I just don't know how to specify the list's height as "the result of `100%` minus `18px`". I've seen this question asked in a couple other contexts on SO, but I thought it would be worth asking again for my particular case. Does anyone have any advice in this situation?
Setting width/height as percentage minus pixels
CC BY-SA 4.0
0
2010-03-12T17:34:54.377
2020-12-28T21:05:58.533
2020-12-28T20:41:16.940
2,756,409
209,113
[ "css", "height", "pixel" ]
2,436,538
1
2,436,551
null
1
183
i want to make an stylized unordered list like the following, but i don't want it to be completely divs, i want to use the `<li>` & `<ul>` tags and maybe a div if it's necessary. ![alt text](https://imgur.com/WhWTH.jpg) Any sample code to make like this ? Thanks
How to do like this list using <li> and CSS?
CC BY-SA 2.5
null
2010-03-12T23:26:32.827
2010-03-13T00:33:04.060
2020-06-20T09:12:55.060
-1
241,654
[ "html", "css" ]
2,439,102
1
2,439,109
null
2
79
I'm working on a bigger project atm, but I made this simple example to show you what happens.. ``` using System.Collections.Generic; using System.Windows; namespace txt { public partial class MainWindow { public MainWindow() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { var obsLst = new List<Info> { new Info { name = "asd" }, new Info { name = "asd" }, new Info { name = "asd" }, new Info { name = "asd" } }; var temp = new List<Info>(); for (var i = 1; i <= 3; i++) { temp.Add(obsLst[0]); //I add 3 of the same item from obsLst to temp } lst.DataContext = temp; //lst = ListBox } } public class Info { public string name { get; set; } } } ``` The ListBox ItemsSource is set to {Binding}.. When I start the application I get 3 txt.Info objects displayed and if I click any of them, 2 or even all of them get selected aswell. From my understanding the problem relies in the fact that the listbox selector cannot differentiate between the items and therefor doesn't know which one I selected. Here's a picture of what it looks like.. ![alt text](https://imgur.com/RkjNT.png) I only clicked on the second txt.Info item. I found a solution where someone said that I have to specify the DisplayMemberPath, but I can't really do that in the other project because I have a datatemplate for the object. Any ideas on how I could fix this would be great.. Thx in advance. EDIT 1: this works but it's not nice.. ``` using System.Collections.Generic; using System.Windows; namespace txt { public partial class MainWindow { public MainWindow() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { var obsLst = new List<Info> { new Info { name = "asd" }, new Info { name = "asd" }, new Info { name = "asd" }, new Info { name = "asd" } }; var temp = new List<Container>(); for (var i = 1; i <= 3; i++) { var t = new Container(); t.obj = obsLst[0]; temp.Add(t); } lst.DataContext = temp; } } public class Info { public string name { get; set; } } public class Container { public Info obj { get; set; } } } ``` In this case you need to set DisplayMemberPath="obj" Assigning an ID to the object, doesn't work.. ``` using System; using System.Collections.Generic; using System.Windows; namespace txt { public partial class MainWindow { public MainWindow() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { var rand = new Random(); var obsLst = new List<Info> { new Info { name = "asd" }, new Info { name = "asd" }, new Info { name = "asd" }, new Info { name = "asd" } }; var temp = new List<Info>(); for (var i = 1; i <= 3; i++) { obsLst[0].id = rand.Next(10000); temp.Add(obsLst[0]); } lst.DataContext = temp; } } public class Info { public string name { get; set; } public int id { get; set; } } } ```
ListBox selector odd behavior when there are dupes
CC BY-SA 2.5
0
2010-03-13T16:40:13.680
2010-03-13T16:49:51.863
2010-03-13T16:49:51.863
178,481
178,481
[ "c#", "wpf" ]
2,439,526
1
2,439,529
null
0
62
i want to do like the following format: ![alt text](https://i.imgur.com/WhWTH.jpg) So this is what i did : ``` <style> .toptitle{ font-size:14px; } .toprating{ background:yellow; float:left; font-size:12px; } .topcontainer{ border-bottom:1px #CCCCCC solid; } </style> <div class="topcontainer"> <div class="toprating">256</div> <div class="toptitle">Lorem Ipsum...</div> </div> <br> <div class="topcontainer"> <div class="toprating">256</div> <div class="toptitle">Lorem Ipsum...</div> </div> ``` Now, in firefox,chrome,safari, this works perfectly, but in IE the title goes about 30 px down. Is there a mistake in the code, or is there any better code to do this?
Floating not right in ie?
CC BY-SA 2.5
null
2010-03-13T18:41:24.893
2010-03-13T18:50:23.580
2020-06-20T09:12:55.060
-1
241,654
[ "css", "xhtml" ]
2,440,360
1
2,441,186
null
0
1,431
Which SQL Server table can I locate keywords associated with a page in DotNetNuke? ![alt text](https://farm5.static.flickr.com/4015/4429819795_b39dea0aeb_o.png)
Where is DotNetNuke page keywords stored in database?
CC BY-SA 3.0
null
2010-03-13T22:53:20.307
2016-12-06T20:12:11.273
2017-02-08T14:22:34.707
-1
4,035
[ "tsql", "dotnetnuke", "keyword", "dotnetnuke-5" ]
2,441,053
1
null
null
6
1,296
I have an iTunes style interface in my application: Source list (NSOutlineView) on the left that contains different libraries and playlists with an NSTableView on the right side of the interface displaying information for "Presentations". Similar to iTunes, I am showing the same type of information in the table view whether a library or playlist is selected (title, author, date created, etc). ![alt text](https://farm5.static.flickr.com/4043/4430302305_d3ce8f20ac_o_d.jpg) I currently have an NSArrayController connected to my NSTableView and was setting the fetch predicate based on what was selected in the source list. This works fine when selecting a library because I can just set the fetch predicate to filter by the "type" field in my Core Data entity. When I try to adjust the fetch predicate for the playlist however, it doesn't look like there is any way to set the fetch predicate because I've got a table in between Playlists and Presentations to keep up with the order within the Playlist. According to the Apple docs, these type of predicates are not doable with Core Data (it basically doesn't multiple inner joins). Below is the relevant portion of my Data Model. ![alt text](https://farm5.static.flickr.com/4024/4431070290_bbd7cd0489_o_d.jpg) Is my data model setup incorrectly? Should I drop the NSArrayController and handle connecting the NSTableView up by hand? I'm trying to figure out if there is a simple fix, or really a design flaw.
How do I bind an iTunes style source list to an NSTableView using Core Data?
CC BY-SA 2.5
0
2010-03-14T03:08:03.493
2011-08-18T08:43:13.933
2017-02-08T14:22:35.397
-1
32,854
[ "cocoa", "core-data", "cocoa-bindings", "nsarraycontroller" ]
2,441,271
1
2,442,879
null
0
303
I have a GTK button on my GUI app, however, the hover effects are different for both Linux and Windows: Heres Linux: ![http://imgur.com/DKAy6](https://i.stack.imgur.com/78G1q.png) Heres Windows: ![http://imgur.com/v0FFU](https://i.stack.imgur.com/0y3fA.jpg) I did not do anything fancy to the animations, in fact, the animation is default, how can I make it uniform? Thank you.
GTK:Button onHover effect different on Linux and Windows
CC BY-SA 3.0
null
2010-03-14T05:02:26.637
2012-12-03T14:33:29.460
2011-12-15T23:32:18.567
84,042
118,644
[ "mono", "gtk", "cairo" ]
2,442,727
1
2,442,859
null
23
20,791
I am creating an app that is having a UIWebView which contains an advert. The size of the view is the same as the advert (image) itself. Still, there is a white margin/padding of some kind above and to the left of the image, inside the UIWebView. Check out the linked image: ![alt text](https://www.iandapp.com/advert.png) Actually, the image is pushed down and to the right due to this padding also. Any idea how I should remove the white padding? Thanks in advance!
Strange padding/margin when using UIWebView
CC BY-SA 3.0
0
2010-03-14T16:02:08.840
2022-09-09T08:21:06.177
2017-02-08T14:22:36.070
-1
229,144
[ "javascript", "iphone", "objective-c", "uiview", "uiwebview" ]
2,443,790
1
2,468,185
null
21
87,520
The diagram below is my very first attempt at creating a UML class diagram describing a user login into a website. ![rubbishlogindesign](https://i.stack.imgur.com/olPK1.gif) I'm sure its a poor design and full of flaws, but I'm hoping to learn from you guys how you would design a simple login like this. I'm particularly interested in your use of design patterns and which patterns you would use, how you would implement it in the design, and why. Any advise, criticisms, comments and suggestions will be really appreciated. Thanks in advance.
UML Class Diagram for User Login
CC BY-SA 3.0
0
2010-03-14T21:07:57.680
2019-07-02T16:05:20.497
2016-02-26T11:25:53.547
1,368,690
225,998
[ "design-patterns", "oop", "class-design", "uml" ]
2,446,373
1
2,447,707
null
23
51,509
> [What do I have to add to a layout to hide the titlebar?](https://stackoverflow.com/questions/2445999/what-do-i-have-to-add-to-a-layout-to-hide-the-titlebar) How do I remove the title below the battery, time bar from showing up? Not sure the terminology for that bar, but on this picture it is the "Nested XML Layout" bar: ![](https://ezmobile.files.wordpress.com/2009/02/020209-2053-isthereanyw72.png)
Android title bar removal
CC BY-SA 2.5
0
2010-03-15T10:30:21.123
2013-05-05T21:45:28.703
2017-05-23T12:24:21.783
-1
166,940
[ "android" ]
2,447,109
1
null
null
141
59,999
I have seen [Vim 80 column layout concerns](https://stackoverflow.com/questions/235439/vim-80-column-layout-concerns), but the answer there highlights only actual content that goes over the 80 character mark. I want to have a 100+ column Vim window open with the leftmost 80 columns using the normal background and anything past that using a slightly different background. The Vim window background should be a different color, not just text that goes over the 80 character point. This would indicate how close I am getting to the 80-char point without having to go over it first. I don't think this is currently possible, but I thought I'd ask just in case. Maybe it could be done with a plugin? ## TextMate Example of Desired Vim Right Margin Highlighting By selecting "Highlight right margin" in TextMate's general preferences, you can see an example of the desired Vim behavior. ![TextMate Right Margin Highlighted Example](https://i.stack.imgur.com/pXRaG.jpg)
Showing a different background colour in Vim past 80 characters
CC BY-SA 3.0
0
2010-03-15T12:43:40.320
2022-04-19T10:00:18.727
2017-05-23T10:31:19.930
-1
293,961
[ "vim" ]
2,447,097
1
2,447,116
null
0
230
I want to create a dialog with a title, borders (left, right, bottom) as well as the content. The current source code: ``` <html> <body> <div style="background: #0ff; width: 152px; height: 112px; position: absolute; top: 24px; left: 128px; display: table"> <div style="display: table-row;"> <div style="background: #f00; width: 100%; display: table-cell;height: 24px;">top</div> </div> <div style="display: table-row;"> <div style="background: #0f0; width: 100%; display: table-cell;"> <div style="display: table;"> <div style="display: table-row;"> <div style="display: table-cell; width: 4px; height: 100%; background: #000;"></div> <div style="display: table-cell;"> <div style="overflow: scroll; white-space: nowrap"> cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe <br /> cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe <br /> cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe <br /> cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe <br /> cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe <br /> cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe <br /> cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe <br /> cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe <br /> cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe cwe <br /> </div> </div> <div style="display: table-cell; width: 4px; height: 100%; background: #000;"></div> </div> </div> </div> </div> <div style="display: table-row;"> <div style="background: #000; width: 100%; display: table-cell; height: 4px;"></div> </div> </div> </body> </html> ``` produces an output of ![alt text](https://i.stack.imgur.com/rqoHN.png) what happened to the left and the right borders and why does the size exceed the width specified in the top parent (152px)?
CSS layout - why do the borders and size behave like this?
CC BY-SA 4.0
null
2010-03-15T12:40:41.507
2019-07-01T07:13:11.047
2019-07-01T07:13:11.047
4,751,173
283,055
[ "html", "css", "layout", "border" ]
2,448,881
1
2,463,609
null
5
2,438
I'm mapping a set of tables that share a common set of fields: ![alt text](https://i291.photobucket.com/albums/ll283/sdplox/Untitled-4.png) So as you can see I'm using a table-per-concrete-type strategy to map the inheritance. But... --- `Entity Data Model Mapping Scenario``Table-per-concrete-type inheritance`[http://msdn.microsoft.com/en-us/library/cc716779.aspx](http://msdn.microsoft.com/en-us/library/cc716779.aspx)
How to implement table-per-concrete-type strategy using entity framework
CC BY-SA 2.5
0
2010-03-15T16:50:32.477
2015-10-06T13:20:54.950
2020-06-20T09:12:55.060
-1
201,142
[ ".net", "entity-framework", "orm", "mapping" ]
2,450,122
1
2,450,136
null
18
21,102
``` - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { if(section != 0) { UIView *view = [[[UIView alloc] initWithFrame:CGRectMake(10, 10, 100, 30)] autorelease]; view.backgroundColor = [UIColor redColor]; return view; } else { return tableView.tableHeaderView; } ``` } This is my implementation of viewForHeaderInSection but whatever frame I make it's always showing me the same red frame. Do you see any problem with my code? Image: ![enter image description here](https://i.stack.imgur.com/W3QZM.png) UPDATE: Mhm now my red block is higher but my first tableHeader is now somehow hidden. The first one was implemented with the titleForHeaderInSection. I thought I just implement the height of the tableHeader height but that doesnt work ``` - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { if(section == 1) return 30; else return tableView.tableHeaderView.frame.size.height; } ```
Frame of viewForHeaderInSection is always the same size
CC BY-SA 3.0
0
2010-03-15T20:08:42.140
2013-04-18T05:17:52.180
2013-04-18T05:17:52.180
664,177
284,701
[ "iphone", "uitableview", "grouped-table" ]
2,452,356
1
2,452,387
null
5
7,434
Quote from Jason Coco it not possible to set multiple in UILabel... but how to do like this? any idea? ![alt text](https://i708.photobucket.com/albums/ww82/RAGOpoR/IMG_0133.png) is it possible to set mix color in UILabel example "TEST" can i set E to red color and another to white color?
is it possible to set multiple color in UILabel?
CC BY-SA 2.5
0
2010-03-16T05:46:49.683
2017-06-30T14:32:24.890
2017-02-08T14:22:40.160
-1
203,372
[ "iphone", "uilabel" ]
2,453,029
1
2,453,057
null
1
2,221
I am trying to make a chatroom layout like the following: ![chatroom layout](https://i.imgur.com/02ITTTo.png) Now my problem is that I am not sure how to have the container box occupy the whole width and height (with valid doctype) and then make the center div grow if the window grows keeping the rest constant. i am well aware of js/css. so i just need some beginning guideline. i would like to avoid javascript to process and then set heights and widths.
Relative width for a CSS layout, fixed and fluid mix
CC BY-SA 3.0
null
2010-03-16T08:51:49.547
2015-01-13T16:54:55.710
2015-01-13T16:54:55.710
1,762,224
426,996
[ "javascript", "css" ]
2,456,005
1
2,456,205
null
4
12,702
I've got the new autocomplete widget in jQuery UI 1.8rc3 working great in Firefox. It doesn't work at all in IE. Can someone help me out? ``` <input type="text" id="ctrSearch" size="30"> <input type="hidden" id="ctrId"> ``` ``` $("#ctrSearch").autocomplete({ source: "ctrSearch.do", minLength: 3, focus: function(event, ui){ $('#ctrSearch').val(ui.item.ctrLastName + ", " + ui.item.ctrFirstName); return false; }, select: function(event, ui){ $('#ctrId').val(ui.item.ctrId); return false; } }); ``` The red box is the `<ul>` element created by jQuery. ![](https://i.stack.imgur.com/NHbBl.jpg) I also get this error: When I open it in the IE8 script debugger, it highlights `f[b]=d` on line 116 of jquery.min.js. Note that I'm using version 1.4.2 of jQuery hosted on Google's servers ([https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js](https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js)). I've tried removing some of the options, but even when I call `.autocomplete()` with no options, or with only the source option, I still get the same result. Once again, it's working in Firefox, but not in IE. Any suggestions? Thanks. As suggested, I used jquery.js (instead of jquery.min.js) and got the error on line 4618. See jitter's answer below. Please see [this other Stack Overflow question](https://stackoverflow.com/questions/2426802/jquery-offset-not-working-in-some-browsers-on-some-computers) that was posted a few days ago. I discovered that jQuery UI autocomplete uses an invalid property `this.element.height`, when it should be using the function `this.element.height()`
jQuery UI autocomplete works in Firefox but not in IE
CC BY-SA 4.0
0
2010-03-16T16:07:18.200
2019-07-01T10:12:48.817
2019-07-01T10:12:48.817
4,751,173
102,451
[ "javascript", "jquery", "jquery-ui", "jquery-ui-autocomplete" ]
2,456,155
1
2,494,010
null
4
5,790
How would you create a line in JasperReports that follows the trend for the data, in addition to showing the data points? Here are before and after shots: ![](https://i.imgur.com/hOW8g.png) ![](https://i.imgur.com/grMcm.png) The Time Series report does not appear to have any such option to draw the orange line. (The orange line should be smooth, and thinner, but that's the general idea.) Any ideas how to craft such a report with iReport 3.7.1?
Reporting Trend Line
CC BY-SA 2.5
0
2010-03-16T16:28:27.643
2010-03-22T20:03:39.123
2010-03-16T16:36:56.877
59,087
59,087
[ "reporting", "jasper-reports", "ireport" ]
2,456,336
1
2,456,465
null
4
2,734
I want to have my own base TabItem class and use other classes that derive from it. ![](https://imgur.com/SK2s7.png) I define base class in MyNs namespace like this: ``` public class MyCustomTab : TabItem { static MyCustomTab() { DefaultStyleKeyProperty.OverrideMetadata(typeof(MyCustomTab), new FrameworkPropertyMetadata(typeof(TabItem))); } } ``` And this is what I do for the class that inherits from it: code-behind in MyNs namespace: ``` public partial class ActualTab : MyCustomTab { public ActualTab() { InitializeComponent(); } } ``` XAML: ``` <MyCustomTab x:Class="MyNs.ActualTab" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid> </Grid> </MyCustomTab> ``` The error I get is "The tag 'MyCustomTab' does not exist in XML namespace '[http://schemas.microsoft.com/winfx/2006/xaml/presentation](http://schemas.microsoft.com/winfx/2006/xaml/presentation)'". If I use `TabItem` tag in XAML the error says that it's not possible to define to different base classes. How to fix this?
How to add custom-control-derived TabItem to TabControl in WPF?
CC BY-SA 2.5
null
2010-03-16T16:49:21.033
2010-03-16T17:03:58.887
null
null
1,271,135
[ "c#", "wpf", "user-controls", "controls", "wpf-controls" ]
2,456,825
1
2,456,902
null
0
4,676
I've been thinking for a while in my head and I've not been able to find the solution to it ! Please help me. I've always loved the visual studio tabs and how they look. They're small and perfect. The normal .NET TabControl, well is plain and boring! I've seen these tabs being used in many applications. My question is: > Is there a DLL that is available that has this kind of tabcontrol? Here's a picture for reference: ![Visual Studio Tabs](https://img201.imageshack.us/img201/8205/seequalmicrosoftvisuals.jpg)
How do i get visual studio like tabs?
CC BY-SA 4.0
0
2010-03-16T17:55:43.723
2020-09-06T20:37:43.567
2020-09-06T20:37:43.567
14,124,084
235,055
[ "c#", "visual-studio", "user-controls", "tabs" ]
2,458,245
1
2,458,649
null
3
8,561
this is my core data model: ![enter image description here](https://i.stack.imgur.com/RkXWx.jpg) I'm trying to get all LanguageEntries from a database for a given category.categoryName and languageset.languageSetName e.g. ``` NSFetchRequest* fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"LanguageEntry" inManagedObjectContext:del.managedObjectContext]; [fetchRequest setEntity:entity]; NSString* predicateString = [NSString stringWithFormat:@"Category.categoryName = %@ AND LanguageSet.languageSetName = %@", @"Food", @"English####Spanish"]; fetchRequest.predicate = [NSPredicate predicateWithFormat:predicateString]; NSError *error = nil; NSArray* objects = [del.managedObjectContext executeFetchRequest:fetchRequest error:&error]; ``` This always returns 0 objects. If I set the predicate string to match on one relationship (e.g. Category.categoryName = Food or languageSet.languageSetName = English####Spanish) it will return data. This is baffling, can anyone shed some light? ->Ken
iPhone CoreData join
CC BY-SA 3.0
0
2010-03-16T21:21:21.027
2015-04-24T08:28:12.743
2012-03-23T09:44:16.337
457,406
295,171
[ "sqlite", "core-data", "iphone-sdk-3.0" ]
2,459,270
1
null
null
5
4,291
Is there a way to model table inheritance using MySQL Workbench? I'd like the ERD to look similar to the left side of this image: ![alt text](https://www.martinfowler.com/eaaCatalog/leafInheritanceTableSketch.gif)
Is there a way to model table inheritance using MySQL Workbench?
CC BY-SA 2.5
0
2010-03-17T01:03:36.373
2017-05-27T11:27:44.027
2017-05-27T11:27:44.027
4,370,109
154,065
[ "inheritance", "mysql-workbench", "erd", "single-table-inheritance" ]
2,459,326
1
2,459,483
null
10
14,095
Is there a way I can remove the background bar image in the SeekBar android widget? I just want it to show a slider with no progress bar behind it. ![Remove this](https://i.stack.imgur.com/C6X2l.png) Any help?
Android Remove SeekBar Background
CC BY-SA 3.0
0
2010-03-17T01:21:52.153
2017-12-21T15:39:53.800
2017-12-21T15:39:53.800
2,235,972
118,241
[ "java", "android", "seekbar" ]
2,459,402
1
2,459,541
null
50
29,972
I am working with a hexagonal grid. I have chosen to use this coordinate system because it is quite elegant. ![grid](https://i.imgur.com/AJoDm.gif) [This question](https://stackoverflow.com/questions/2049196/generating-triangular-hexagonal-coordinates-xyz) talks about generating the coordinates themselves, and is quite useful. My issue now is in converting these coordinates to and from actual pixel coordinates. I am looking for a simple way to find the center of a hexagon with coordinates x,y,z. Assume (0,0) in pixel coordinates is at (0,0,0) in hex coords, and that each hexagon has an edge of length s. It seems to me like x,y, and z should each move my coordinate a certain distance along an axis, but they are interrelated in an odd way I can't quite wrap my head around it. Bonus points if you can go the other direction and convert any (x,y) point in pixel coordinates to the hex that point belongs in.
Hexagonal Grid Coordinates To Pixel Coordinates
CC BY-SA 3.0
0
2010-03-17T01:43:38.003
2013-05-12T22:58:29.800
2017-05-23T11:46:56.480
-1
121,660
[ "math", "coordinate-systems", "hexagonal-tiles" ]
2,462,261
1
2,462,438
null
0
5,864
I ended up with this horrible code below, I can't get a better result now. What is a better way of doing that? It's about this part of my database: ![Hosted by imgur.com](https://imgur.com/lKxnK.png) EDIT A `Patient` has a `Subscription` to multiple `MonitoringObjects`. `Target` records refer to these `Subscriptions`. I want to retrieve the target records with the newest date per `Subscription` for a given `Patient` and a `Category` of `MonitoringObjects`. These target records may have different max dates, as `Targets` can be added for `Subscriptions` to `MonitoringsObjects` independently. ``` var subs = db.Subscriptions.Where(p => p.PatientID == patID).Where(p => p.MonitoringObject.Category.Name == "Medication"); var targets1 = from t in db.Targets where subs.Contains(t.Subscription) select t; var maxTa = from t in db.Targets group t by t.SubscriptionID into g select new { Ky = g.Key, Date = g.Max(p => p.Date) }; var targets2 = from t in targets1 where maxTa.Select(p => p.Ky).Contains( t.SubscriptionID ) && maxTa.Select(p => p.Date).Contains( t.Date ) select t; ```
LINQ to SQL, select targets with max date
CC BY-SA 2.5
null
2010-03-17T12:50:43.617
2010-03-17T16:12:18.327
2010-03-17T16:12:18.327
63,550
262,350
[ "linq", "linq-to-sql", "join", "group-by" ]
2,462,979
1
2,463,223
null
4
11,070
I have a following problems with eclipse, when I installed ClearCase plugin from this url [http://www3.software.ibm.com/ibmdl/pub/software/rationalsdp/clearcase/60/update/windows/](http://www3.software.ibm.com/ibmdl/pub/software/rationalsdp/clearcase/60/update/windows/) : ![alt text](https://i.stack.imgur.com/i7ELL.png) Has anyone experienced the similar problem? I'm using Windows 7 and eclipse galileo. I've installed the plugin from this URL, what can I do to work this problem out? ``` +----------------------------------------------------------------------+ | Connect to the Rational ClearCase failed | | | | Connect to the Rational ClearCase failed | | | | Reason: | | Select Details >> for more information. | | | | +------------+ +------------+ | | | OK | | << Details | | | +------------+ +------------+ | | | |Could not connect to the Rational Clearcase. Please ensure that proper| |version of ClearCase is installed with the proper patches. Consult the| |ClearCase SCM Adapter documentation for further details. | | | | | |Provider name: IBM | |Plugin name: Rational ClearCase SCM Adapter | |Plugin ID: com.rational.clearcase | |Version: 7.5.0.v200910221234 | +----------------------------------------------------------------------+ ``` Google doesn't help much ..
Problems with clear case plugin eclipse
CC BY-SA 3.0
0
2010-03-17T14:23:19.300
2013-05-29T18:05:53.053
2012-08-27T05:35:46.617
6,309
169,277
[ "java", "eclipse", "windows-7", "clearcase", "eclipse-3.5" ]
2,464,094
1
2,464,165
null
3
5,872
With the following entity relationship structure I'm struggling to figure out if the relationship between the LOAN and ITEM entities is valid? The weak entity of LOAN uses a partial key of 'loan_dateLeant' and the primary keys from CUSTOMER and ITEM to form LOANs primary key. However LOAN has a 'one to many' relationship with ITEM as a loan can consist of more than one item. But surely this means that if more than one item is loaned, then the loan record will have two item_id values for part of its primary key? ![alt text](https://i915.photobucket.com/albums/ac354/jonoistehdaddy/entityRelationshipModeledit.jpg?t=1268844638)
Entity Relationships - Can a weak entity take part in a 'one to many' relationship as the 'one'
CC BY-SA 2.5
null
2010-03-17T16:40:49.100
2011-03-11T17:04:53.340
2017-02-08T14:22:40.823
-1
271,132
[ "primary-key", "entity", "relationship", "cardinality" ]
2,464,106
1
2,464,288
null
0
106
I have created a WebPart. When I add the WebPart to a page I get the error below. ![Error MEssage](https://i.stack.imgur.com/CrKse.png) If I delete what is in my constructor for my WebPart it will then add to the page. Then if I deploy my code with the WebPart all ready on a page the WebPart will display correctly. I can't add it to other pages I get the error before. So I presume that there is a problem with the constructor. The line that is breaking it is ``` var site = new SPSite("http://website/site"); ``` This has been found by commenting code out. Can you not create an SPSite when installing a WebPart?
"CallList: Cannot import this Web Part" when installing SharePoint Web Part
CC BY-SA 4.0
null
2010-03-17T16:42:03.730
2019-07-02T08:29:06.893
2019-07-02T08:29:06.893
4,751,173
201,865
[ "sharepoint", "moss", "sharepoint-2007" ]
2,465,413
1
2,465,449
null
29
11,444
Is there a way to add a clickable hyperlink in a Qt Dialog? I.e. it should look like a hyperlink (blue text), and when you click on it, it should open the hyperlink in the browser. Something like that: ![enter image description here](https://i.stack.imgur.com/gdzV2.png)
Qt - add a hyperlink to a dialog
CC BY-SA 3.0
0
2010-03-17T19:57:14.023
2018-12-31T19:28:09.560
2014-01-12T18:45:46.407
492,336
163,394
[ "c++", "qt", "hyperlink" ]
2,465,645
1
2,503,097
null
7
6,120
We've had out for a couple of months now. It's done pretty well, and so we've been updating it as time allows. However, one thing continues to bug me. I've never been able to get my layered cards to anti-alias correctly. Here's a sample: ![alt text](https://www.rpg.net/pictures/show-pic.phtml?picid=17352) Cards that are laid straight are very clean, but whenever they're angled the black lines around the cards get jagged. I've tried this depending on both lines implicit to the artwork and lines drawn through drawRect:, and they both do the same thing. I've tried the edgeAntiAliasingMask and it doesn't do a thing as far as I can tell. I've tried masksToBounds for the sublayers set to NO and YES. Right now my card is set up as a CALayer that has sub-CALayers for the front and the back, plus for a few other things like a lightening mask and a darkening mask. Here's some snippets of the code: ``` CArdLayer *theCardLayer = [CArdLayer layer]; theCardLayer.edgeAntialiasingMask = kCALayerLeftEdge | kCALayerRightEdge | kCALayerBottomEdge | kCALayerTopEdge; theCardLayer.front = [CALayer layer]; theCardLayer.front.edgeAntialiasingMask = kCALayerLeftEdge | kCALayerRightEdge | kCALayerBottomEdge | kCALayerTopEdge; theCardLayer.front.bounds = theCardLayer.bounds; theCardLayer.front.masksToBounds = YES; theCardLayer.front.contents = (id)[cardDrawing CGImage]; [theCardLayer addSublayer:theCardLayer.front]; ``` Etc ... Any ideas on how to make the cards actually anti-alias?
How to Anti-Alias Layers in iPhoneOS
CC BY-SA 2.5
0
2010-03-17T20:29:51.563
2012-10-22T14:28:45.373
2017-02-08T14:22:41.923
-1
80,263
[ "iphone", "core-animation" ]
2,466,170
1
2,466,587
null
12
14,542
So, I am kind of confused about drawing a stack frame for my assembly code. I have a feeling I started out wrong. Here is what I got so far, but as you can see I am confused at step 5, because I think my initial layout is wrong. ![enter image description here](https://i.stack.imgur.com/qncLL.png) ![enter image description here](https://i.stack.imgur.com/giFmp.png) Can you tell me where I went wrong?
Drawing a stack frame for x86 assembly
CC BY-SA 3.0
0
2010-03-17T21:50:30.817
2012-11-30T11:01:26.717
2012-03-09T02:16:10.647
74,865
74,865
[ "assembly", "x86" ]
2,467,961
1
2,468,015
null
14
11,215
When manipulating matrices it is often convenient to change their shape. For instance, to turn an N x M sized matrix into a vector of length N X M. In MATLAB a function exists: > RESHAPE(X,M,N) returns the M-by-N matrix whose elements are taken columnwise from X. An error results if X does not have M*N elements. In the case of converting between a matrix and vector I can use the Mathematica function which takes advantage of Mathematica's nested list representation for matrices. As a quick example, suppose I have a matrix X: ![4x4 matrix](https://imgur.com/TIYq9.jpg) With [X] I can get the vector {1,2,3,...,16}. But what would be far more useful is something akin to applying Matlab's (X,2,8) which would result in the following Matrix: ![4x4 matrix](https://imgur.com/Xe6aB.jpg) This would allow creation of arbitrary matrices as long as the dimensions equal N*M. As far as I can tell, there isn't anything built in which makes me wonder if someone hasn't coded up a Reshape function of their own.
How to reshape matrices in Mathematica
CC BY-SA 2.5
0
2010-03-18T06:42:48.643
2017-09-10T13:43:17.117
null
null
39,584
[ "wolfram-mathematica" ]
2,468,452
1
2,468,542
null
1
422
I have a DGV with columns "code" and "name". Depends of lenght of a code I want to add tabulation to the "name" cells, to show structure of a data. Like that in this picture: ![https://lh3.ggpht.com/_DoguEKXT64k/S6Hoq7Eu7sI/AAAAAAAABRs/wwjf7TXTLmk/dgv.jpg](https://lh3.ggpht.com/_DoguEKXT64k/S6Hoq7Eu7sI/AAAAAAAABRs/wwjf7TXTLmk/dgv.jpg) How is it better to do? I think there is a better way then just loop for all rows and add spaces in front of names, right?
DataGridView formatting
CC BY-SA 2.5
null
2010-03-18T08:53:33.863
2010-09-28T08:21:38.617
2017-02-08T14:22:42.600
-1
295,593
[ ".net", "vb.net", "winforms", "datagridview" ]
2,468,576
1
2,469,192
null
4
7,318
Most of the idea is in the title, I just would like to know if it is possible to start 2 emulators at the same time with 2 different locale (to test the I18n of my app). If there was a way of doing it in Eclipse, that would be greater... Something like ![This](https://i.stack.imgur.com/nU5x0.jpg)
Start two Android emulators with different locale
CC BY-SA 3.0
0
2010-03-18T09:14:37.810
2014-01-09T13:41:32.347
2014-01-09T13:41:32.347
1,077,364
263,521
[ "android", "android-emulator", "locale", "emulation", "qemu" ]
2,469,551
1
null
null
-2
295
![alt text](https://i771.photobucket.com/albums/xx354/sharma336110/city.jpg) For a particular name i want to fetch other names who have lived in three or more cities lived by this person.
Please help me design a sql query for this problem
CC BY-SA 2.5
0
2010-03-18T11:54:11.640
2010-03-18T14:54:36.883
2017-02-08T14:22:42.937
-1
296,329
[ "sql", "mysql", "denormalization" ]