Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
5,018,129
1
5,018,299
null
0
1,072
does anyone knows how to get the text content of a backBarButtonItem when using a UINavigationController ? It's the name of the previous view but I'd like to get it in the next view. ![backBarButtonItem](https://i.stack.imgur.com/OcilL.png) Thanks!
How to get the text in a backBarButtonItem?
CC BY-SA 2.5
0
2011-02-16T15:09:22.680
2012-08-01T18:38:56.063
null
null
135,288
[ "iphone", "objective-c", "cocoa-touch", "uinavigationcontroller" ]
5,018,138
1
null
null
6
13,033
![enter image description here](https://i.stack.imgur.com/3kSNr.png) ![enter image description here](https://i.stack.imgur.com/o2sEY.png) i cant get the button to align the same for all the browsers.. is there a hack for doing this alignment? ``` input, button { float: left; height: 20px; } ```
css input align with button
CC BY-SA 2.5
0
2011-02-16T15:10:46.770
2014-04-15T14:18:19.120
null
null
75,799
[ "forms", "input", "css", "alignment" ]
5,018,229
1
5,019,869
null
0
238
I'm creating a method that populates some textboxes with data retrieved from an Access database using table adapters. The `GetCasesWithUserFromCaseId` method return a single case with the `username` which is found by left joining my cases table with my users table. For some reason I get a NullReferenceException when trying to access the joined data (userdata) from the users table but data from the cases table works. I'm sure that all fields is set for all users and all cases-tablerows. If this doesn't work how do I then alternately get my data? I've attached an image showing my simple database. The sql-statement: ``` SELECT * FROM cases LEFT JOIN users ON cases.caseCreatedBy = users.userId WHERE caseId = caseNum ``` The C# code: ``` public void populateBoxes(int caseId) { caseDBTableAdapters.casesTableAdapter casesAdapter = new caseDBTableAdapters.casesTableAdapter(); caseDB.casesDataTable cases; cases = casesAdapter.GetCasesWithUserFromCaseId(caseId); foreach (caseDB.casesRow casesRow in cases) { tbCaseName.Text = casesRow.caseName; tbOwner.Text = casesRow.usersRow.firstName.ToString(); } } ``` ![database layout](https://i.stack.imgur.com/eZ6bj.jpg) ![enter image description here](https://i.stack.imgur.com/h1NLO.jpg)
How do I access all data from a SQL query where left join is used?
CC BY-SA 2.5
null
2011-02-16T15:18:03.533
2011-02-16T17:38:40.077
2011-02-16T17:38:40.077
436,802
436,802
[ "c#", "database", "tableadapter" ]
5,018,236
1
5,115,470
null
6
2,740
I have a problem with Pocos and nullable foreign keys . I have 2 tables (orders and products) each table have a composite primary key (orderid,orderid2) and (productid,productid2) And I have set a 0,1..* association between the two tables. One order can be related to 0 or 1 product. And one product has * orders related to him. How to crash : - - - - When I add an order to the product's orders list, it crashes trying to fixup the association (setting the product navigation property on the new order) ``` CREATE TABLE [dbo].[Products]( [productid] [int] IDENTITY(1,1) NOT NULL, [productid2] [int] NOT NULL, [productname] [nchar](10) NULL, CONSTRAINT [PK_Products] PRIMARY KEY CLUSTERED ( [productid] ASC, [productid2] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] CREATE TABLE [dbo].[Orders]( [orderid] [int] NOT NULL, [orderid2] [int] NOT NULL, [ordername] [nchar](10) NULL, [productid] [int] NULL, [productid2] [int] NULL, CONSTRAINT [PK_orders] PRIMARY KEY CLUSTERED ( [orderid] ASC, [orderid2] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] ``` ![Entity model](https://i.stack.imgur.com/HlIB6.png) Code to crash : ``` var product = context.CreateObject<Products>(); context.Products.AddObject(product); var order = context.CreateObject<Orders>(); context.Orders.AddObject(order); product.Orders.Add(order); if (order.Product != product) Console.WriteLine("error"); ``` Exception : ``` System.Data.EntityException was unhandled Message=Unable to set field/property Product on entity type System.Data.Entity.DynamicProxies.Orders_A0290D8629F0336D278E5AEF2C0F2A91FF56726ED5E3A9FA668AC902696A8651. See InnerException for details. Source=System.Data.Entity StackTrace: at System.Data.Objects.Internal.PocoPropertyAccessorStrategy.SetNavigationPropertyValue(RelatedEnd relatedEnd, Object value) at System.Data.Objects.Internal.EntityWrapper`1.SetNavigationPropertyValue(RelatedEnd relatedEnd, Object value) at System.Data.Objects.DataClasses.EntityReference`1.AddToObjectCache(IEntityWrapper wrappedEntity) at System.Data.Objects.DataClasses.RelatedEnd.Add(IEntityWrapper wrappedTarget, Boolean applyConstraints, Boolean addRelationshipAsUnchanged, Boolean relationshipAlreadyExists, Boolean allowModifyingOtherEndOfRelationship, Boolean forceForeignKeyChanges) at System.Data.Objects.DataClasses.RelatedEnd.Add(IEntityWrapper wrappedEntity, Boolean applyConstraints) at System.Data.Objects.DataClasses.EntityCollection`1.Add(TEntity entity) at Proxies.CSharp.Program.Main(String[] args) in Program.cs:line 20 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.NullReferenceException Message=Object reference not set to an instance of an object. Source=Proxies.CSharp StackTrace: at Proxies.CSharp.Orders.FixupProduct(Products previousValue, Boolean skipKeys) in Orders.cs:line 134 at Proxies.CSharp.Orders.set_Product(Products value) in Orders.cs:line 106 at System.Data.Entity.DynamicProxies.Orders_A0290D8629F0336D278E5AEF2C0F2A91FF56726ED5E3A9FA668AC902696A8651.SetBasePropertyValue(String , Object ) at lambda_method(Closure , Object , String , Object ) at System.Data.Objects.Internal.EntityProxyFactory.TrySetBasePropertyValue(Type proxyType, String propertyName, Object entity, Object value) at System.Data.Objects.Internal.EntityProxyFactory.<>c__DisplayClass8.<CreateBaseSetter>b__7(Object entity, Object value) at System.Data.Objects.Internal.PocoPropertyAccessorStrategy.SetNavigationPropertyValue(RelatedEnd relatedEnd, Object value) ``` Note : It works with entytobjects, it works with self-tracking entities, and It works if the key is not composite or not nullable. Am I doing something wrong or it it a real bug ?
Exception during association fixup with nullable composite foreign keys
CC BY-SA 2.5
0
2011-02-16T15:18:42.550
2011-02-25T09:15:41.987
null
null
472,095
[ "entity-framework", "poco" ]
5,018,283
1
5,018,327
null
0
466
This is the effect I would like to achieve when the mouse cursor is over an image: ![enter image description here](https://i.stack.imgur.com/EA1KN.png) Here is my approach so far: ``` <div id="moviethumb2" class="moviethumb"> <a onmouseover="javascript:mouseOverThumb(2)" href="movie.php?id=38055"> <img src="img2.jpg"> </a> </div> <div id="moviethumb3" class="moviethumb"> <a onmouseover="javascript:mouseOverThumb(3)" href="movie.php?id=605"> <img src="img3.jpg"> </a> </div> ``` But I have not been able to come up with a very simple approach. `z-index` I've tried to use. My question to you is, what is the simplest way of achieving the above effect using css, jquery/javascript. I would appreciate pointers in the right direction so I don't overcomplicate this problem. Thanks
Triggering a 'further information' div on mouseover (with overlaps)
CC BY-SA 2.5
null
2011-02-16T15:23:27.423
2011-02-16T15:49:27.427
null
null
482,800
[ "javascript", "jquery", "css" ]
5,018,635
1
5,019,257
null
9
1,816
I've never worked with Java drawing methods before, so I decided to dive in and create an analog clock as a PoC. In addition to the hands, I draw a clock face that includes tick marks for minutes/hours. I use simple sin/cos calculations to determine the position of the lines around the circle. However, I've noticed that since the minute tick-marks are very short, the angle of the lines looks wrong. I'm certain this is because both `Graphics2D.drawLine()` and `Line2D.double()` methods cannot draw with subpixel accuracy. I know I can draw lines originating from the center and masking it out with a circle (to create longer, more accurate lines), but that seems like such an inelegant and costly solution. I've done some research on how to do this, but the best answer I've come across is to use an `AffineTransform`. I assume I could use an `AffineTransform` with rotation only, as opposed to having to perform a supersampling. Is this the only/best method of drawing with sub-pixel accuracy? Or is there a potentially faster solution? `RenderingHint``Graphics2D` As requested, here is a little bit of the code (not fully optimized as this was just a PoC): ``` diameter = Math.max(Math.min(pnlOuter.getSize().getWidth(), pnlOuter.getSize().getHeight()) - 2, MIN_DIAMETER); for (double radTick = 0d; radTick < 360d; radTick += 6d) { g2d.draw(new Line2D.Double( (diameter / 2) + (Math.cos(Math.toRadians(radTick))) * diameter / 2.1d, (diameter / 2) + (Math.sin(Math.toRadians(radTick))) * diameter / 2.1d, (diameter / 2) + (Math.cos(Math.toRadians(radTick))) * diameter / 2.05d, (diameter / 2) + (Math.sin(Math.toRadians(radTick))) * diameter / 2.05d)); } // End for(radTick) ``` Here's a screenshot of the drawing. It may be somewhat difficult to see, but look at the tick mark for 59 minutes. It is perfectly vertical. ![Sample image](https://i.stack.imgur.com/mHZ1b.png)
Java - Does subpixel line accuracy require an AffineTransform?
CC BY-SA 2.5
0
2011-02-16T15:53:16.353
2011-02-17T07:55:29.403
2011-02-16T16:26:39.197
559,467
559,467
[ "java", "drawing", "line", "affinetransform", "subpixel" ]
5,018,713
1
5,018,841
null
0
48
So I've been googling around, but just havn't found any good solution for this layout yet. What Im trying to do is like a gallery. First thumbs, then a large below the clicked thumb. The problem is to separate different events. > 1. A click with no visible div. (Slide down selected div) 2. A click with a visible div. (Transition to new div. Hide old, then show the new one or something) 3. A click with an already selected div. (Slide up selected div) Been struggling around with different solutions, but either it's glitchy or sometimes it doesn't react to clicks at first. Basic structure so far: ``` <ul> <li id="case1">Thumb1</li> <li id="case2">Thumb2</li> <li id="case3">Thumb3</li> </ul> <div id="case1box">Content</div> <div id="case2box">Content</div> <div id="case3box">Content</div> ``` Then repeating that snippet. Any better solution, as it's UL(3xLI) then DIV, UL(3xLI) then DIV? --- ![Default state](https://i.stack.imgur.com/JbAvh.png) --- ![Clicked state](https://i.stack.imgur.com/usAd4.png)
Having problems making a gallery with lists, jquery and a lot of toggling
CC BY-SA 2.5
null
2011-02-16T15:59:15.377
2011-02-16T16:53:51.950
null
null
543,365
[ "jquery", "jquery-selectors", "jquery-effects" ]
5,018,895
1
5,018,929
null
0
1,392
First I don't know what a good title for this question Example ![enter image description here](https://i.stack.imgur.com/wWOJc.gif) On `postid` and `wordid` I can click and it will go to another table. I want to know what code to make data in phpmyadmin can be click and link to related table?
How do I link data on Phpmyadmin
CC BY-SA 2.5
null
2011-02-16T16:11:23.020
2011-02-16T16:35:50.447
null
null
106,111
[ "php", "mysql", "phpmyadmin" ]
5,018,931
1
5,023,183
null
0
845
if I have this grammer for example `start : TKN id '{' '}' {cout<<$2<<endl;} ;` - iostream is included , TKN is declaered as token, id type is declared as char *- as input I enter `tkn aaa { }` shouldn't the output be `aaa`?? sometimes , it prints `}` and `0` and sometimes it just hangs I want to get the value of `id` ,how to get it right ?? # lex.l ``` %{ #include "yacc.hpp" #include <math.h> #include<iostream> #include<string> int rows = 1,tmp=0; %} Id [a-zA-Z_][0-9a-zA-Z_]* %x String ... %option c++ %option noyywrap %% {Id} {strcpy(yylval.strVal,yytext);cout<<"lex= "<<yytext<<endl;return Id;}//output line 1 ... ``` # yacc.y ``` %output ="yacc.cpp" %defines %verbose %token Id %token NAMESPACE %union{ int iVal; float fVal; char* strVal; class Symbol* symPtr; class NS* nsPtr; }; %token <iVal> INT_VAL; %token <fVal> F_VAL; %token <strVal> STR_VAL INT FLOAT STRING Id ; %type <nsPtr> namespacedecl %type <symPtr> ns_closer %type <strVal> Q_ID //------------------------------------------- namespacedecl : NAMESPACE Q_ID '{' '}' {cout<<"ns= "<<$2<< endl ;} // output line 3 | NAMESPACE Q_ID '{' typedecl_closer '}' ; Q_ID : Q_ID '.' Id {cout<<$3<< endl ;$$ = $3;} | Id {$$ = $1;cout<<"qid="<<$$<<endl;} // output line 2 ``` of course the files are bigger than this but copy/paste everything will make u get lost ^^ if there's a way to attach the file please tell me cuz I'm still newbie here and it would be much easier than copy/paste. and this is the what I get when running : ![enter image description here](https://i.stack.imgur.com/NWtv3.jpg) thanks for responding
yacc output help
CC BY-SA 2.5
null
2011-02-16T16:14:21.377
2011-02-19T00:28:17.463
2011-02-18T19:49:08.873
14,065
559,465
[ "compiler-construction", "yacc", "bison" ]
5,019,956
1
null
null
1
442
I was integrating the blogengine 2.0.what i did is 1. created folder inside my project called blogs. 2. copied all the files from the blogengine.net 2.0 (web). 3. made changes in the web.config and changed master page path. as per > [http://www.ajaymatharu.com/integrating-blogengine-into-an-existing-site/](http://www.ajaymatharu.com/integrating-blogengine-into-an-existing-site/) 4.while running the project it is showing the error in styles. the screen shoot of the error is...![enter image description here](https://i.stack.imgur.com/RIOpz.jpg) screen shoot of the project solution explorer is. ![enter image description here](https://i.stack.imgur.com/oXqtE.jpg) web.config file... ![enter image description here](https://i.stack.imgur.com/YZbHc.jpg)
error while integrating blogengine.net 2.0 to a website
CC BY-SA 2.5
null
2011-02-16T17:37:19.183
2011-03-08T20:56:49.537
2011-02-16T17:52:12.230
579,474
579,474
[ "c#", ".net", "asp.net", "blogengine.net" ]
5,019,986
1
10,590,743
null
6
569
I'm using microsoft's CDN for pulling down the Ajax libraries. And I'm using SSL on some pages. This URL resolves fine in Firefox and IE: [https://ajax.microsoft.com/ajax/4.0/MicrosoftAjax.js](https://ajax.microsoft.com/ajax/4.0/MicrosoftAjax.js) However in google chrome (on my PC, today...) it seems to time out with a very odd response: ![enter image description here](https://i.stack.imgur.com/0CSs4.jpg) On other PCs it seems to work fine, however I know I'm not the only one experiencing the problem as we've had occasional complaints from some of our clients about certain pages timing out and failing, that seems to point to the same problem.
Why won't MicrosoftAjax.js load over SSL in google chrome on some PCs?
CC BY-SA 2.5
0
2011-02-16T17:40:11.550
2012-05-14T20:44:22.410
null
null
32,055
[ "ssl", "google-chrome", "cdn", "microsoft-ajax" ]
5,020,231
1
5,020,242
null
1
432
Why am I getting told that there is a missing ; when trying to create this for loop? ![; error](https://i.stack.imgur.com/eT7Im.png)
C++ Being told that there is a missing semicolon by compiler when trying to create a for loop
CC BY-SA 2.5
null
2011-02-16T17:59:09.370
2011-02-16T17:59:59.907
null
null
477,528
[ "c++", "visual-c++" ]
5,020,345
1
5,020,394
null
15
33,291
I have a problem with my jQuery script that send data via POST method. The problem is whenever it sends data via Ajax that has an "&" ampersand in the sentence, it will cut the sentence when found "&". Please check the images below for more info. ![The text that pass to ajax POST](https://i.stack.imgur.com/SWJtK.jpg) ![Output after ajax POST on firebug](https://i.stack.imgur.com/2Xkpe.jpg) ![Data that has been save in the database](https://i.stack.imgur.com/5APCo.jpg) ![The jQuery ajax POST](https://i.stack.imgur.com/jCDDp.jpg)
How to escape "&" ampersand character in form input using jQuery
CC BY-SA 2.5
0
2011-02-16T18:09:22.693
2014-05-07T17:56:57.737
2020-06-20T09:12:55.060
-1
464,123
[ "php", "jquery", "ajax", "codeigniter" ]
5,020,442
1
5,136,489
null
8
5,018
I am having a problem with the initial page load of a site after refresh. I use Chrome for development but the problem is evident across all browsers. I get the message and the loading indicator keeps spinning. This stays like this for about 10 seconds and then Chrome gives up and tells me from within the developer console. The image is definitely at the path stated. Sometimes it loads sometimes it doesn't. If I remove reference to this image altogether the error will fall on a different image within the page. This is a regular but intermittent fault. My site is javascript heavy (2500+ lines) I suspect it could be something to do with either: 1. Javascript loading interfering with image loads. 2. Something funny going on regarding the caching of images. Does anyone have any experience of this type of page load problem? Appreciate any help you can give! Example URL: [http://dev.thebeer.co/imgs/UI/inboxIcon.png](http://dev.thebeer.co/imgs/UI/inboxIcon.png) ![Dev Tools Overview](https://i.stack.imgur.com/rU7C5.jpg) ![Healthy Image](https://i.stack.imgur.com/TZrxw.jpg) ![Unhealthy Image in Question](https://i.stack.imgur.com/zQMgR.jpg) This is an example screenshot from firebug. You can see that the request for the resource doesn't time out but takes ages to retrieve. ![enter image description here](https://i.stack.imgur.com/cZa5L.jpg) The file that fails can vary from CSS background-image to normal image to even a font file. I think this problem is deeper than client side. We have also been experiencing The Chrome "The following pages have become unresponsive. Your can wait for them to become responsive or kill them" error occasionally. We have stripped the page of ALL javascript, it's almost a bare shell! The image load problems continue to occur cross browser. I have found that the following errors in http error log seem to be linked with the problem. Anyone know what they mean and how to solve them? ``` [ Wed Feb 23 06:54:17 2011] [debug] proxy_util.c(1854): proxy: grabbed scoreboard slot 0 in child 5871 for worker proxy:reverse [Wed Feb 23 06:54:17 2011] [debug] proxy_util.c(1967): proxy: initialized single connection worker 0 in child 5871 for (*) [Wed Feb 23 06:54:24 2011] [debug] proxy_util.c(1854): proxy: grabbed scoreboard slot 0 in child 5872 for worker proxy:reverse [Wed Feb 23 06:54:24 2011] [debug] proxy_util.c(1873): proxy: worker proxy:reverse already initialized [Wed Feb 23 06:54:24 2011] [debug] proxy_util.c(1967): proxy: initialized single connection worker 0 in child 5872 for (*) [Wed Feb 23 06:59:15 2011] [debug] proxy_util.c(1854): proxy: grabbed scoreboard slot 0 in child 5954 for worker proxy:reverse [Wed Feb 23 06:59:15 2011] [debug] proxy_util.c(1873): proxy: worker proxy:reverse already initialized ```
Last Image in Document Fails to Load - "Failed to Load Resource"
CC BY-SA 2.5
0
2011-02-16T18:19:15.830
2011-02-27T22:28:58.417
2011-02-23T14:43:26.217
516,629
516,629
[ "php", "javascript", "apache" ]
5,020,696
1
null
null
2
808
I'm trying to polish up by database design skills. I've been working through a few IT-related puzzles today, most of which have been fairly straightforward. ...And then I came across this supposed 'oldie', which is frustrating the bezeejers out of me. The premise is that there's an error with the class hierarchy in the diagram below. No further information regarding the nature of the classes/interface is given. I cannot find any logical issue with it. The best I can do is whimper that a point is not technically a shape, but I'd like to think the answer is a little less weaselly than that. If anyone has any suggestions, I'd love to hear. It really is doing my head in. ![Diagram Here](https://i.stack.imgur.com/uXpAw.jpg)
Database Design Puzzle: What's wrong with this diagram?
CC BY-SA 2.5
0
2011-02-16T18:44:11.670
2011-02-16T22:10:28.077
2011-02-16T18:45:33.123
106,224
620,159
[ "database-design", "class-diagram" ]
5,021,201
1
5,021,329
null
0
203
With an div and iframe I generate an popup with jQuery: ``` <div id="popup_add_onderhoud" class="popup_block"> <iframe src="add_onderhoud.php" frameborder="0" scrolling="no" width="425" height="260"> </iframe> </div> ``` Now I'm trying to use an jQuery calendar script found on: [http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePicker.html](http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePicker.html) Works nice but the calendat generate in my script is much larger then the one on the original site, it seems I can't change this. Any ideas? Also the posistion is not right, I have tried to change it with [http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerPosition.html](http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerPosition.html) but no luck. ``` <script type="text/javascript"> $(function() { $('.date_pick').datePicker(); ('#bl').dpSetPosition($.dpConst.POS_BOTTOM, $.dpConst.POS_LEFT); }); </script> <input type="text" class="date_pick" id="bl" name="datum_volgende" size="10" value="<?php echo $datum_volgende ?>" /> ``` ![enter image description here](https://i.stack.imgur.com/Uvofc.gif) ![enter image description here](https://i.stack.imgur.com/B5gs9.gif)
jquery.datePicker questions
CC BY-SA 2.5
null
2011-02-16T19:33:01.610
2011-02-16T19:44:57.657
null
null
586,645
[ "jquery", "css", "calendar" ]
5,021,255
1
null
null
0
1,846
I am new to WatiN, but not new to writing automated Web UI tests. At my new job, we are trying to use WatiN for our Web UI tests (thanks to a few CUIT fails). I've solved this problem in the past using ArtOfTest.WebAii, by using a Win32 mouse click with a magic number offset from the containing element, but I can't seem to find documentation on how to do that in WatiN and I can't figure it out myself :\ This dialog appears and I can't seem to find a way for WatiN to click it. ![enter image description here](https://i.stack.imgur.com/B18AG.png) The dialog has the following markup: ``` <OBJECT style="FILTER: alpha(opacity=1); WIDTH: 329px; HEIGHT: 100px; mozOpacity: 0.01; opacity: 0.01; mozopacity: 0.01" data="data:application/x-oleobject;base64, <a bunch of data>" width=329 height=100 type=application/x-silverlight-2></OBJECT> <param name="source" value="/CuteWebUI_Uploader_Resource.axd?type=file&file=silverlight.xap&_ver=634334311861475176"/> <param name="windowless" value="true" object="" <=""/> ``` my test code: ``` [TestMethod] public void SomeTest() { Settings.MakeNewIeInstanceVisible = true; Settings.AutoStartDialogWatcher = true; Settings.AutoMoveMousePointerToTopLeft = false; using (IE ie2 = new IE()) { ie2.GoTo(URL); ie2.Link(SomeButtonID).Click(); ie2.Image(AnotherButtonID).FireEvent("onclick"); // some debugging code wrapped around the next user action // which is clicking on the attach file button var helper = new DialogHandlerHelper(); using (new UseDialogOnce(ie2.DialogWatcher, helper)) { Thread.Sleep(1 * 1000); // wait for attach button to be "ready" // Click button that triggers the dialog that states: // "file browsing dialog has been blocked" // "please click here and try again" // ie2.Button(FileAttachButtonID).FireEvent("onclick"); } foreach(string dialogHandler in helper.CandidateDialogHandlers) { // nothing prints out here :( Console.Out.WriteLine(dialogHandler); } // debug print out all elements with tagname = object foreach (Element objectElement in ie2.ElementsWithTag("object")) { StringBuilder elementInfo = new StringBuilder(); elementInfo.AppendLine("--------------------------------------------"); elementInfo.AppendLine("element.tagname = " + objectElement.TagName); elementInfo.AppendLine("element.style = " + objectElement.Style); elementInfo.AppendLine("element.type = " + objectElement.GetAttributeValue("type")); elementInfo.AppendLine("element.data = " + objectElement.GetAttributeValue("data")); elementInfo.AppendLine("--------------------------------------------"); Console.Out.WriteLine(elementInfo.ToString()); // none of these clicks make the dialog go away objectElement.ClickNoWait(); objectElement.Click(); objectElement.DoubleClick(); objectElement.MouseEnter(); objectElement.MouseDown(); Thread.Sleep(500); objectElement.MouseUp(); } // wait to see if dialog disappears after click Thread.Sleep(300 * 1000); } } ``` Any and all help will be very much appreciated. Thanks!
Can WatiN handle the CuteWebUI Uploader popup dialog?
CC BY-SA 2.5
null
2011-02-16T19:37:18.240
2011-02-24T18:22:18.920
null
null
289,402
[ "dialog", "click", "watin", "ui-testing" ]
5,021,500
1
5,029,654
null
1
2,703
How can i draw a shape, that is at it's bottom, without using [flex](/questions/tagged/flex) libraries? ![enter image description here](https://i.stack.imgur.com/s4mby.jpg) ``` var _myShape:Shape = new Shape(); _myShape.graphics.lineStyle(4,0x000000,1,true,....); _myShape.graphics.drawRoundRect(0,0,50,50,10); ```
Draw bottom rounded corner
CC BY-SA 3.0
null
2011-02-16T20:02:48.703
2016-04-29T10:16:53.110
2016-04-29T10:16:53.110
365,265
365,265
[ "flash", "actionscript-3", "adobe", "air" ]
5,021,545
1
5,063,960
null
7
4,782
I want to display a PDF document in my Microsoft Surface application. I did some searching and found a lot of possibilities, but all of the seem to have a little drawback if used in Microsoft Surface. [This insteresting](http://www.screencast.com/users/chujanen/folders/Jing/media/e313edbb-e09f-4df6-a4ed-f953e58701ad) approach seems nice, but I have trouble to check how to enable scrolling. ![enter image description here](https://i.stack.imgur.com/bgGNO.jpg) Any idea how to enable scrolling in there?
How to display a PDF document in a Microsoft Surface application?
CC BY-SA 2.5
null
2011-02-16T20:08:13.590
2011-02-27T10:43:07.337
2011-02-17T09:48:51.767
329,637
329,637
[ "c#", "wpf", "pdf", "pixelsense", "acrobat" ]
5,021,898
1
5,022,157
null
0
923
i don't get it. i can plot one point successfully with the BalloonItemizedOverlay, however, when i plot multiple points, the background switches from a street view to a solid ocean blue color. the markers are plotted correctly on the overlay and i can click on the markers and it does what it's told, but i just don't get why my street view disappears and gets replaced by a ocean blue background. anyone else run into this? What am i doing wrong? I noticed that when it gets to the animateTo() command, it switches to blue. ``` List<Overlay> mapOverlays = mapView.getOverlays(); Drawable drawable = getResources().getDrawable(R.drawable.marker); LocatorItemizedOverlay itemizedOverlay = new LocatorItemizedOverlay(drawable, mapView); for (SingleLocation mloc : Locations) { String strLocationAddress = mloc.AddressLine1 + ", " + mloc.City + ", " + mloc.State + " " + mloc.ZipCode; point = new GeoPoint((int) (Double.parseDouble(mloc.Longitude) * 1E5),(int) (Double.parseDouble(mloc.Latitude) * 1E5)); overlayItem = new OverlayItem(point,mloc.LocName,strLocationAddress); itemizedOverlay.addOverlay(overlayItem); } mapOverlays.add(itemizedOverlay); mapView.getController().animateTo(point); mapView.getController().setZoom(10); ``` ![blue background image](https://i.stack.imgur.com/AT20n.png)
Anyone implemented the BalloonItemizedOverlay (with multiple points) successfully?
CC BY-SA 2.5
null
2011-02-16T20:45:41.267
2011-02-16T21:12:01.187
2011-02-16T20:54:59.653
244,296
250,043
[ "android", "android-mapview", "itemizedoverlay", "android-maps" ]
5,022,223
1
5,022,355
null
3
1,960
![Sample UML diagram](https://i.stack.imgur.com/hOQ3s.png) Domain Driven Design can be really confusing at times and since I am rather new to this technique I would like to have some answers regarding those scenarios that are currently bugging me. Here a simple diagram to represent my question using DDD principles. My question is about aggregate roots, domain validation and "ways to do" or best practices. 1. In this scenario, how would you implement a way to count the number of comments written by a user? Would it be a method in "Review"? Or would it be best to be a method in a repository (ReviewRepository)? 2. How do I make other entities access comments if they need to? Having this scenario, does that mean that Comment isn't part anymore of the "Review" aggregates? 3. What if comment have a composition relationship with some other entity? How would you manage the access to that entity? Is comment responsible of this entity or the root? 4. Any other suggestions or facts regarding this model? Any best practices I should fellow when designing a model? Thanks. There a little error in the Review entity. "Compte" in the Add method is "Account" and should be A instead of C.
Best practices to apply in Domain Driven Design principles?
CC BY-SA 3.0
0
2011-02-16T21:18:21.263
2016-05-26T20:46:04.560
2016-05-26T20:46:04.560
1,466,970
575,065
[ "domain-driven-design", "uml" ]
5,022,495
1
5,022,519
null
0
93
Which SQL Server 2008 message is spelled correctly? ![enter image description here](https://i.stack.imgur.com/iW3yM.jpg)
Which SQL Server message is spelled correctly?
CC BY-SA 2.5
0
2011-02-16T21:43:35.593
2011-02-16T21:46:52.373
null
null
381,082
[ "sql-server", "ssms", "spelling" ]
5,022,533
1
5,047,194
null
1
151
Is there a Visual Studio 2010 extension that draws a dividing rule between the members of a class? VisualBasic had this feature: ![enter image description here](https://i.stack.imgur.com/7gZ9g.png) I'm considering writing such extension if it doesn't exist yet -- probably a Resharper plugin if it allows this kind of interaction with the IDE. Any directions? Thank you very much.
Visual Studio extension to draw a rule between class members
CC BY-SA 2.5
null
2011-02-16T21:47:25.687
2011-02-18T22:27:30.333
null
null
126,052
[ "visual-studio-2010", "plugins", "resharper" ]
5,022,613
1
5,024,045
null
4
1,758
I am working with a WPF application that uses alot of drag and drop. Everything is working fine, with exception of ListBoxItems. I have a ListBox with ListBoxItems that can be dragged to another target( a StackPanel). The problem is, when I drag the cursor outside the ListBox, I cant see the Adorner that I have setup with the ListBoxItem? I know this is a common problem, but I am just not sure how to fix it. Is there something that I need to do to allow me to drag outside of the ListBox control? Below I have attached what the UI looks like so far. As you can see, there is a ListBox on the bottom left. When I drag an item, the adorner appears, and follows the cursor around while the cursor is over the ListBox, but if I try to move the cursor away from the listbox, the Adorner seems to almost go under the other controls(zIndex?). ![enter image description here](https://i.stack.imgur.com/MgTFJ.png) I have changed the code to handle the AdornerLayer relative to the window as oppose to relative to the AdornedElement So I changed ``` layer = AdornerLayer.GetAdornerLayer(_originalElement); ``` to ``` layer = AdornerLayer.GetAdornerLayer(this); ``` This solved the problem of the ScrollViwer clipping the AdornerLayer
Cant Drag ListBoxItem Adorner outside of ListBox in WPF -ScrollViewerProblem
CC BY-SA 2.5
null
2011-02-16T21:55:10.497
2011-02-17T16:26:39.473
2011-02-17T16:26:39.473
180,253
180,253
[ "wpf", "drag-and-drop", "listbox" ]
5,022,897
1
null
null
1
16,122
While using Jquery autocomplete, in particular after the list of recommended terms is being outputed, if you change the size of your browser's window, the whole position of the list is shifted in oposite direction in which the change is being performed. Is there a way to avoid this from happening? ![Before browser's window size has been changed](https://i.stack.imgur.com/FlDy3.png) ![After browser's window size has been changed](https://i.stack.imgur.com/rIbWM.png) JS file: ``` function autocomplet() { $("input#ui-autocomplete-input").autocomplete({ minLength: 2, source: '/store.json', focus: function(event, ui){ $("input#ui-autocomplete-input").val(ui.item.product.name); return false; }, select: function(event, ui){ $("input#ui-autocomplete-input").val(ui.item.product.name); $("input#ui-autocomplete-input").val(ui.item.product.name); return false; } // source: '<%= products_path(:json) %>' // source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"] }).data("autocomplete")._renderItem = function(ul, item){ return $("<li></li>").data("item.autocomplete", item).append("<a>"+item.product.name+"</a>").appendTo(ul); } }; $(document).ready(autocomplet); ``` CSS file: ``` body { font-size: 62.5%; } table { font-size: 1em; } tr:first-child{ font-size: 4em; font-weight: bold; } td{ width: 100px; height: 30px; } /* Site -------------------------------- */ body { font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; } /* Normal -------------------------------- */ .normal h3, .normal h4 { margin: 0; font-weight: normal; } .normal h3 { padding: 0 0 9px; font-size: 1.8em; } .normal h4 { padding-bottom: 21px; border-bottom: 1px dashed #999; font-size: 1.2em; font-weight: bold; } .normal p { font-size: 1.2em; } ul { list-style: none; border:none; } /* Misc visuals ----------------------------------*/ /* Search textbox*/ fieldset.search{ border:none; width: 285px; } .search input.btn:hover{ background: #FFFFFF no-repeat left; } .search input.btn{ border:none; font-size: 1.2em; width: 50px; height: 40px; cursor: pointer; background: #fbc900; } .search input.box{ border-top:5px solid #fff; border-bottom:5px solid #fff; border-left:0px; color: #fff; font-size: 1.2em; width: 190px; height: 38px; text-indent:8px; background: #D63737; } .search input.box:focus{ outline-width:0; } .search button.btn:hover{ background: #fbc900 no-repeat bottom right; } /* Corner radius */ .ui-state-focus, .ui-widget-content, .ui-state-focus, .ui-widget-header, .ui-state-focus { background: #DADADA; color: #212121; cursor: pointer; width:206px; } .ui-corner-all { position:relative; background-color: #213216; width: 206px; } .ui-active-menuitem, .ui-state-hover, .ui-state-highlight{ height: 38px; background:#D63737; cursor:pointer; width: 206px; } .ui-menu-item{ font-size: 1em; text-indent:9px; height:38px; width:206px; } ```
Jquery autocomplete styling
CC BY-SA 2.5
null
2011-02-16T22:26:38.300
2012-02-01T18:39:38.433
2011-02-16T23:12:02.947
352,539
352,539
[ "jquery" ]
5,023,292
1
5,026,491
null
0
357
I wass wondering why I can't setup an enviroment with Netbeans 6.9.1 in combination with Tomcat 5.5 and Java 1.5. ![enter image description here](https://i.stack.imgur.com/7JeTO.png) I can only choose for Java 1.4. Is this a restriction of Netbeans? In the past this web application has run under Myeclipse tomcat 5.5 and Java 1.5. But because of the huge memory issues of myeclipse I want to try Netbeans.
Run Java webapp under Netbeans with tomcat 5.5 and Java 1.5
CC BY-SA 2.5
0
2011-02-16T23:07:42.957
2011-02-17T08:17:07.233
2011-02-17T07:52:05.073
193,850
193,850
[ "java", "eclipse", "tomcat", "netbeans", "myeclipse" ]
5,023,365
1
5,033,812
null
1
2,445
In my application, I have to write a query that displays data from a number of the tables. In other words, I have to create a query that will make a join for number of tables and will show wanted information from this query. The query has to display all the events (and all data about the events in `DataGrid`) for a specific (chosen) worker. Here is a code of my LINQ: ``` IList dataList = (from dWorker in App.glidusContext.tbl_workers where dWorker.workerTZ == strSplit join d2 in App.glidusContext.tbl_workers_has_tbl_events on dWorker.workerID equals d2.workerID join dEvent in App.glidusContext.tbl_events on d2.eventID equals dEvent.eventID join dAct in App.glidusContext.tbl_activities on d2.eventID equals dAct.eventID select new { d2.damagedVacantionEnd, dEvent, dAct }).ToList(); return dataList; ``` Where `strSplit` is a specific (chosen) worker. XAML-code of `DataGrid`: ``` <DataGrid.Columns> <DataGridTextColumn Header="{x:Static res:Resources.WinSafetyByEmployee_DataGrid_ColHead_Event_type}" Width="130" IsReadOnly="True" Binding="{Binding Path=dEvent.tbl_eventsType.eventTypeName}" /> <DataGridTextColumn Header="{x:Static res:Resources.WinSafetyByEmployee_DataGrid_ColHead_Classification}" Width="130" Binding="{Binding Path=dEvent.tbl_eventsClassification.eventClassificationName}" /> <DataGridTextColumn Header="{x:Static res:Resources.WinSafetyByEmployee_DataGrid_ColHead_Catagory}" Width="130" Binding="{Binding Path=dEvent.tbl_eventsCategories.eventCategoryName}" /> <DataGridTextColumn Header="{x:Static res:Resources.WinSafetyByEmployee_DataGrid_ColHead_Evacuation}" Width="130" Binding="{Binding Path=d2.damagedEvacuationDescription}" /> <DataGridTextColumn Header="{x:Static res:Resources.WinSafetyByEmployee_DataGrid_ColHead_EvacuationStart}" Width="130" Binding="{Binding Path=d2.damagedVacantionStart}" /> <DataGridTextColumn Header="{x:Static res:Resources.WinSafetyByEmployee_DataGrid_ColHead_EvacuationEnd}" Width="130" Binding="{Binding Path=d2.damagedVacantionEnd}" /> <DataGridTextColumn Header="{x:Static res:Resources.WinSafetyByEmployee_DataGrid_ColHead_ActivityName}" Width="*" Binding="{Binding Path=dAct.activityName}" /> </DataGrid.Columns> </DataGrid> ``` How to fix this query? Now this variant doesn't return values. I also cannot reach tbl_objects in the query because I need to do it thought the connection table `tbl_object_has_tbl_events` and `App.glidus` do not show such a table. Here is an ERD of my database: ![DB ERD](https://i.stack.imgur.com/9ISaE.png)
LINQ query for multiple join tables in C#
CC BY-SA 4.0
null
2011-02-16T23:14:50.407
2022-11-23T13:52:50.670
2022-11-23T13:52:50.670
462,347
462,347
[ "c#", "linq" ]
5,023,440
1
5,023,475
null
0
305
According to the [JQuery 1.5 release notes](http://blog.jquery.com/2011/01/31/jquery-15-released/), the speed performance charts show that Chrome 8 is faster for the mentioned JQuery methods `children()`, `prev()`, `next()`. I wonder how that would be, since recently Chrome reported they are using the new [crankshaft javascript optimization engine](http://blog.chromium.org/2010/12/new-crankshaft-for-v8.html) Screenshot where you can see the Chrome 8 columns are taller than Chrome 10 (and thus faster): ![JQuery 1.5 performance screenshot](https://farm6.static.flickr.com/5099/5404543659_82b480e578.jpg) So the question is: If the numbers reported here is true, then why would Chrome 10 be a slower browser than the mainstream Chrome 8?
Why is JQuery slower on Chrome 10 than on Chrome 8?
CC BY-SA 2.5
null
2011-02-16T23:23:43.330
2011-02-16T23:32:24.200
2017-02-08T14:31:33.377
-1
109,305
[ "jquery", "browser", "google-chrome", "performance" ]
5,023,535
1
5,023,842
null
0
935
I am in the process of developing a universal iOS app. What I want is for all my views to automatically resize depending on the screen sisze, I mean I dont want to hard code any `CGRect` sizes or use Interface Builder; I am using a specific app example but I would very much appreciate an answer that is usable in many similar scenarios. This is a very simple app but I hope the answer can show me how to go about doing this for all my views, so they can adjust to any size. For this specific app I am building something that will look like this: ![A simple mockup of a screen used in my app.](https://i.stack.imgur.com/gFIy2.png) This is a particularly tricky example as the MKMapView has to be initialized with a frame but I hope you can help me. The first problem I ran into was the fact that in my loadView method: ``` MKMapView *mapView=[[MKMapView alloc ] initWithFrame:CGRectZero]; mapView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); self.view=mapView; ``` The autoresizing mask does not work unless the view controller is managed by a `UINavigationController`; I do not know why. The next problem comes when I want to add my UIToolbar at the bottom of the screen. In order to get this I do the following: ``` UIToolbar *toolBar=[[UIToolbar alloc] initWithFrame:CGRectMake(0, 420, 320, 40)]; toolBar.autoresizingMask = UIViewAutoresizingFlexibleWidth; [self.view addSubview:toolBar]; ``` This works perfectly with an iPhone but it does not with an iPad (the toolbar's width is adjusted but it obviously is no loger at the bottom of the screen) as the size is hard coded. Sorry for posting such a long question but I think the answers can be a great resource for me and other developers in need. Please tell me If I am not clear.
Making Universal ViewControllers
CC BY-SA 2.5
0
2011-02-16T23:35:40.673
2011-02-17T22:49:30.897
null
null
382,489
[ "iphone", "ipad", "ios", "uiview", "uiviewcontroller" ]
5,023,702
1
5,023,945
null
1
351
I am in desperate need of either algorithm or query construction assistance. We have a user-generated, flexible database that is created using a form builder we have created. The data for these forms is stored in two tables as follows: ![enter image description here](https://i.stack.imgur.com/X0QeX.png) The instances table tell us what form the user is viewing, and then the instance_records table has all the data for the instance. The field_id column tells us what field on the form the data maps to. The reason we use a single table like this instead of creating a table for each form is that MySQL limits how many columns we can have in table given that the data is varchar of a significant length. One possibility would be to use Text fields for the data, but then we would lose the built in MySQL searching capabilities. Things work quite well and very fast on basic forms. The problem is that one instance of a form can refer to another instance of the form. For example, we have user created form called Appointments. On this form, it refers to the Patient form, the Technician form, the Doctor form, etc. So, on the Appointment form with instance id, the value for the patient field is actually an instance id of a patient, the doctor field value is the instance id for the doctor, etc. At the first level of references, things aren’t too bad. But, you can have chains of references. I can have a prescription that refers to an appointment that refers to a patient, etc. So, if I want to get the value of the patient name on the prescription, I have to follow the chain down to get the right instance id and field id for the data. So, if I want to do a report on Appointments and show the Patient name, the Doctor name, and the Technician name, I have to go through some hoops. What I have tried is creating views and then joining the views to a final view that shows all the data for the query. But, it eats a ton of memory and starts writing the view temporary tables to disk and gets slow as all heck. Using query caching, the second time the report runs, it’s fast as heck. But, that first run can take over a minute once we get above 5000-7000 instances. Something tickling at the back of my mind is that there might be some sort of a way to store the data in a way that I can take advantage of some faster tree search algorithms.
Algorithm or MySQL Query Advice Needed
CC BY-SA 2.5
null
2011-02-17T00:05:11.903
2011-02-17T04:55:54.123
null
null
56,830
[ "php", "mysql", "algorithm", "performance", "memory" ]
5,023,994
1
null
null
0
45
![enter image description here](https://i.stack.imgur.com/Um244.jpg) Without javascript, I think about just float left all the element but I do need to control the size of the picture to be 2 times or 4 times height or width to each other
Any plugin using jquery that can do some layout like this?
CC BY-SA 2.5
0
2011-02-17T00:54:58.090
2011-02-17T00:59:57.050
2011-02-17T00:59:57.050
280,598
620,144
[ "javascript", "jquery", "plugins" ]
5,024,038
1
5,048,250
null
27
13,994
I'm trying to make this layout happen without javascript. I have a parent div and a child div that contains content which keeps being appended. I want the child to be bottom aligned inside the parent and grow vertically. I also want when the height of the child > height of parent. ![Child expands from the bottom, causing parent to scroll](https://i.stack.imgur.com/Uofuv.png) The first part is pretty easy with: ``` #child { position:absolute; bottom: 0 } ``` The second part is difficult because absolutely positioned elements are outside of the content-flow and won't trigger scrolling. The parent div spans the entire height of the browser window
How can I bottom align a div that can grow and cause it's container to scroll
CC BY-SA 4.0
0
2011-02-17T01:03:30.897
2018-12-05T18:16:34.720
2018-12-05T18:16:34.720
2,756,409
13,216
[ "html", "css", "layout" ]
5,024,191
1
5,045,270
null
2
8,162
I'm working on a web design that has a fixed sidebar and breadcrumb header, and a scrollable content section taking up the remaining space. Here's what I envision the end result looking like: ![Layout Mockup](https://i.stack.imgur.com/OMbbb.jpg) The rub is, I can't figure out how to make this work without nasty container `<div>`s or hacky CSS. I like semantic HTML (HTML 5, for this specific project) so I don't really want to budge on keeping styling elements out of the markup. The sidebar will have two fixed widths (expanded and collapsed) and the header will always have a fixed height. This is (essentially) how I'd like the markup to look: ``` <body> <aside> <!-- sidebar content --> <h1>My Site</h1> </aside> <section> <nav> <!-- breadcrumbs --> <a href="#home">Home</a> <a href="#area">Area</a> <a href="#category">Category</a> <a href="#">Item</a> </nav> <article> <!-- page content --> <h2>Item Title</h2> <p> Item Content </p> </article> </section> </body> ``` Can someone help me make the CSS work for this? My CSS thus far: ``` html { font-family: "Segoe UI", sans-serif; font-size: 9pt; height: 100%; } html body { margin: 0px; height: 100%; padding: 0px; } html body aside { background-color: rgb(32, 80, 128); float: left; height: 100%; width: 256px; } html body section { background-color: rgb(16, 40, 64); height: 100%; margin-left: 256px; } html body section nav { background-color: rgb(242, 242, 242); height: 32px; } html body section article { background-color: rgb(255, 255, 255); margin: 0px 32px 32px 32px; } ```
CSS 100% layout with fixed sidebar and header
CC BY-SA 2.5
null
2011-02-17T01:30:44.703
2011-02-18T18:44:49.690
2011-02-17T01:42:24.543
180,043
180,043
[ "css", "html" ]
5,024,355
1
5,062,838
null
4
1,101
I am inserting an NSAttributedString into an NSTableView, and depending on it's content I am adding attributes to its style dictionary. ``` - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { NSAttributedString *theValue; NSMutableDictionary *attributes = [[NSMutableDictionary alloc] init]; [attributes setObject:[NSFont systemFontOfSize:11] forKey:NSFontAttributeName]; currentObject = [ticketsDataSource objectAtIndex:rowIndex]; if ([[currentObject valueForKey:aTableColumn.identifier] isKindOfClass:([NSString class])]) { NSString *currentValue = [currentObject valueForKey:aTableColumn.identifier]; if ([currentValue isEqualToString:@"resolved"]) { [attributes setObject:[NSColor colorWithCalibratedRed:0.344 green:0.619 blue:0.000 alpha:1.000] forKey:NSForegroundColorAttributeName]; } if ([previousValue isEqualToString:@"resolved"]) { [attributes setObject:[NSNumber numberWithInteger:NSUnderlinePatternSolid | NSUnderlineStyleSingle] forKey:NSStrikethroughStyleAttributeName]; } theValue = [[NSAttributedString alloc] initWithString:currentValue attributes:attributes]; previousValue = currentValue; } ``` As you can see, basically what happens is when it writes a string called "resolved" it knows that the very next column, which is the title column, gets a strikethrough. It works just fine, but for whatever reason, the strikethrough is not drawing over the entirety of the text! Here is an image: ![enter image description here](https://i.stack.imgur.com/IwMc5.png) What is going on here?
NSAttributedString Strikethrough does not draw over entire length of text
CC BY-SA 2.5
null
2011-02-17T02:06:28.673
2011-02-21T05:58:45.283
null
null
409,038
[ "nstableview" ]
5,024,328
1
null
null
1
1,794
Embedding Ogre into a qt application [Link:QtOgre](http://www.ogre3d.org/tikiwiki/QtOgre&structure=Cookbook) But it is mac and linux platform,I try to migrate to windows platform, but failed. My app run like this: ![enter image description here](https://i.stack.imgur.com/NJ0US.png) ``` enter code here #ifndef OGREWIDGET_H #define OGREWIDGET_H #include "XVQCUGLLIB_Global.h" #include <QGLWidget> #include <Ogre/Ogre.h> class XVQCUGLFXLIB_API OgreWidget : public QGLWidget { //Q_OBJECT; public: OgreWidget( QWidget *parent=0 ); virtual ~OgreWidget(); protected: virtual void initializeGL(); virtual void resizeGL( int, int ); virtual void paintGL(); void init(); virtual Ogre::RenderSystem* chooseRenderer( Ogre::RenderSystemList* ); Ogre::Root *mOgreRoot; Ogre::RenderWindow *mOgreWindow; Ogre::Camera *mCamera; Ogre::Viewport *mViewport; Ogre::SceneManager *mSceneMgr; }; #endif // OGREWIDGET_H ``` /////////////////////////////////////// ``` #include "XVQCUGLLIB_Internal.h" #include "OgreWidget.h" #define THIS OgreWidget OgreWidget::OgreWidget(QWidget *parent) : QGLWidget( parent ), mOgreWindow(NULL) { init(); } OgreWidget::~OgreWidget() { mOgreRoot->shutdown(); delete mOgreRoot; destroy(); } /** * @brief init the object * @author kito berg-taylor */ void THIS::init() { // create the main ogre object mOgreRoot = new Ogre::Root; mOgreRoot->loadPlugin("RenderSystem_GL_d"); Ogre::String rName("OpenGL Rendering Subsystem"); Ogre::RenderSystemList rList = mOgreRoot->getAvailableRenderers(); Ogre::RenderSystemList::iterator it = rList.begin(); Ogre::RenderSystem *rSys = 0; while(it != rList.end()) { rSys = * (it++); Ogre::String strx=rSys->getName(); if(strx == rName) { mOgreRoot->setRenderSystem(rSys); break; } } mOgreRoot->initialise(false); // don't create a window } /** * @brief setup the rendering context * @author Kito Berg-Taylor */ void THIS::initializeGL() { //== Creating and Acquiring Ogre Window ==// // Get the parameters of the window QT created Ogre::String winHandle=Ogre::StringConverter::toString((size_t)(HWND)winId()); Ogre::NameValuePairList params; params["parentWindowHandle"] = winHandle; mOgreWindow = mOgreRoot->createRenderWindow( "QOgreWidget_RenderWindow", this->width(), this->height(), false, &params ); //mOgreWindow->setActive(true); //WId ogreWinId = 0x0; //mOgreWindow->getCustomAttribute( "WINDOW", &ogreWinId ); //assert( ogreWinId ); //this->create( ogreWinId ); setAttribute( Qt::WA_PaintOnScreen, true ); setAttribute( Qt::WA_NoBackground ); //== Ogre Initialization ==// Ogre::SceneType scene_manager_type = Ogre::ST_EXTERIOR_CLOSE; mSceneMgr = mOgreRoot->createSceneManager( scene_manager_type ); mSceneMgr->setAmbientLight( Ogre::ColourValue(1,1,1) ); mCamera = mSceneMgr->createCamera( "QOgreWidget_Cam" ); mCamera->setPosition( Ogre::Vector3(0,1,0) ); mCamera->lookAt( Ogre::Vector3(0,0,0) ); mCamera->setNearClipDistance( 1.0 ); Ogre::Viewport *mViewport = mOgreWindow->addViewport( mCamera ); mViewport->setBackgroundColour( Ogre::ColourValue( 1.0,1.0,1.0 ) ); } /** * @brief render a frame * @author Kito Berg-Taylor */ void THIS::paintGL() { //QGLWidget::paintGL(); assert( mOgreWindow ); mOgreRoot->_fireFrameStarted(); mOgreWindow->update(); // mOgreRoot->renderOneFrame(); mOgreRoot->_fireFrameEnded(); } /** * @brief resize the GL window * @author Kito Berg-Taylor */ void THIS::resizeGL( int width, int height ) { //QGLWidget::resizeGL(width,height); assert( mOgreWindow ); mOgreWindow->windowMovedOrResized(); mCamera->setAspectRatio(Ogre::Real(width) / Ogre::Real(height)); } /** * @brief choose the right renderer * @author Kito Berg-Taylor */ Ogre::RenderSystem* THIS::chooseRenderer( Ogre::RenderSystemList *renderers ) { // It would probably be wise to do something more friendly // that just use the first available renderer return *renderers->begin(); } ```
Embedding Ogre into a qt application on windows platform
CC BY-SA 2.5
null
2011-02-17T02:00:18.010
2012-11-06T19:47:01.153
null
null
561,235
[ "windows", "qt", "opengl", "qglwidget", "ogre" ]
5,024,479
1
null
null
0
1,620
I have written a c++ wrapper dll for a C dll with lib file I have, now everything is partially working, all the functions I have written in the c++ wrapper class work as expected bar one. Here it is in the C++ dll ``` __declspec(dllexport) long ReadRawDataByTime(char * tagname, long serverhandle, IHU_TIMESTAMP * StartTime, IHU_TIMESTAMP * EndTime, int * number_of_samples, IHU_DATA_SAMPLE **data_values){ return ihuReadRawDataByTime(serverhandle, tagname, StartTime, EndTime, number_of_samples, data_values); } ``` and here is my definition and how I call it in C# ``` [DllImport("IHUAPIWrapper.dll")] public static extern long ReadRawDataByTime(String tagname, long serverhandle, IHU_TIMESTAMP* StartTime, IHU_TIMESTAMP* EndTime, int* number_of_samples, IHU_DATA_SAMPLE** data_values); ... long lRet = ReadRawDataByTime ( tagname,//the handle returned from the connect serverhandle, //the single tagname to retrieve &temp_start_time, //start time for query &temp_end_time, //end time for query &number_of_samples, //will be set by API &pSamples //will be allocated and populated in the user API ); ``` where tagname is defined as a string and the rest are their appropriate structs. Now if I set the debugger in the C++ dll I can see all the values being passed in correctly, serverhandle is as expected, tagname holds the correct string, endTime has the correct time, number of samples and pSamples are blank as expected however startTime is 'undefined' when I am definitely passing in a valid struct. If I dummy up the variables in the debugger it even returns expected data it just appears it is not passing the variables correctly. I did some experimentation and swapped the order of the variables so serverhandle was passed first and tagname was passed second, if I do this all the variables are correct except tagname is now 'undefined' is there something wrong with how I am passing the string that is corrupting the next variable? do I need to specifiy some special calling convention and currently it is just a fluke that everything else works? Any help would be much appreciated. :) edit: here is a screenshot of the debugger to show what I mean about all variables being passed except one. ![http://img602.imageshack.us/img602/5281/47739520.jpg](https://i.stack.imgur.com/jTD0A.jpg)
Passing char*and struct in C# to c++ DLL, all variables pass successfully except one
CC BY-SA 2.5
null
2011-02-17T02:33:26.203
2011-02-22T04:28:58.087
2011-02-17T02:49:55.900
434,537
434,537
[ "c#", "c++", "dll", "interop", "dllimport" ]
5,024,485
1
5,024,525
null
2
4,587
I have a parent div, and it houses a bunch of child divs. One of those is floated left, but the rest are floated right. It worked fine when only a few of the divs were floated right, but I've since added more and the results appear like this: ![](https://i.stack.imgur.com/Xfrpi.png) Light green is parent div background, other colors are the divs in question. A few actually float correctly for some reason, but green should be after the blue, and the pink after the red. I have `overflow: hidden;` on the parent-most div, and the height has no affect on this child-div behavior. How should I fix this? Here's the relevant CSS: ``` #reviews { background-color: #16ff21; //green float: right; text-align: left; text-indent: 40px; width: 40%; height: 150px; } #rating { background-color: #ff114b; //red float: right; width: 40%; text-align: center; font-size: 200%; height: 150px; } #validFor { background-color: #19ceff; //blue float: right; width: 40%; text-align: center; font-size: 200%; height: 150px; } #stats { background-color: #ffe8e5; //pink width: 40%; float: right; vertical-align: middle; text-align: center; font-size: 250%; } ``` Here's the parent div of all that up there: ``` #description { text-align: left; width: 100%; } ``` And the parent div of #description: ``` #main { background-color: #d3ffd3; margin-left: auto; margin-bottom: 0; margin-right: auto; padding: 10px; width: 75%; text-align: center; overflow:hidden; } ```
Divs not floating properly
CC BY-SA 2.5
null
2011-02-17T02:34:13.690
2012-05-22T17:37:37.470
2012-05-22T17:37:37.470
44,390
361,883
[ "css", "html", "overflow", "css-float" ]
5,024,765
1
5,026,638
null
1
2,167
I need the following alignment ![enter image description here](https://i.stack.imgur.com/JgcSW.png) For that I have created the xaml file as follows, ``` <!--LayoutRoot is the root grid where all page content is placed--> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <!--TitlePanel contains the name of the application and page title--> <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> <TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/> <TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/> </StackPanel> <!--ContentPanel - place additional content here--> <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <ListBox ItemsSource="{Binding Collections}"> <ListBox.ItemTemplate> <DataTemplate> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid.ColumnDefinitions> <ColumnDefinition Width="80"/> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Image Grid.Column="0" Source="{Binding Icon}" HorizontalAlignment="Left" VerticalAlignment="Center" /> <Grid Grid.Column="1" HorizontalAlignment="Right" > <Grid HorizontalAlignment="Stretch"> <Grid.RowDefinitions> <RowDefinition Height="0.600*" /> <RowDefinition Height="0.400*" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Text="{Binding MainTextBlock}" VerticalAlignment="Center" /> <Grid Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" > <Grid.ColumnDefinitions> <ColumnDefinition Width="0.300*" /> <ColumnDefinition Width="0.700*" /> </Grid.ColumnDefinitions> <TextBlock Grid.Column="0" Text="{Binding Value}" HorizontalAlignment="Left" VerticalAlignment="Center" /> <TextBlock Grid.Column="1" Text="{Binding DateString}" HorizontalAlignment="Right" VerticalAlignment="Center" /> </Grid> </Grid> </Grid> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid> </Grid> ``` but I did not get the as expected result. what should i do for that? sub2 is always left aligned but actually we need it to be Right aligned. Thanks in advance dinesh
Allignment of controls in Datatemplate of listbox in silverlight
CC BY-SA 2.5
null
2011-02-17T03:24:40.490
2011-02-17T10:31:43.027
2011-02-17T05:38:34.387
123,719
123,719
[ "windows-phone-7", "silverlight-3.0" ]
5,024,881
1
5,024,940
null
0
242
Is it possible to display information in TableView as given in screenshot? Here: 'MyFund' is sum of amounts of Rob, Mike and Sam Fund. I am not sure how will I sum up the amounts and display in Table headers. Please help! ![enter image description here](https://i.stack.imgur.com/QnTaf.png)
How to display Summation in TableView in iPhone SDK?
CC BY-SA 2.5
null
2011-02-17T03:52:01.697
2011-02-17T04:14:42.913
2011-02-17T04:14:42.913
null
480,346
[ "iphone", "objective-c", "cocoa-touch", "iphone-sdk-3.0", "ios4" ]
5,024,901
1
null
null
1
248
hello i was setting up environment for android and when ever i try to launch the android emulator i get this Before launching emulator screenshot(WITH FIREFOX IN THE BACKGROUND) ![enter image description here](https://i.stack.imgur.com/16PK9.jpg) After launching emulator screenshot(WITHOUT FIREFOX) ![enter image description here](https://i.stack.imgur.com/KFvu4.jpg) when i freshly start my system PF usage is exactly 290MB after launching Android Emulator it gets to nearly 850MB and as soon as i open Eclipse it nearly gets to 1.01GB i have Intel Pentium D with 1GB of RAM(as you can see in task manager) and i have only installed SDK 2.3.3 API 10,revision 1 package. So, is it normal?? cause all things get very slow and response of emulator is very very slow
is it normal with android emulator?
CC BY-SA 2.5
null
2011-02-17T03:56:32.493
2011-02-17T04:35:41.870
2011-02-17T04:35:41.870
408,863
574,649
[ "android", "process", "emulation" ]
5,025,143
1
null
null
4
526
I'm knee deep in font metrics with NSTextView at the moment. I was hoping a developer here could shed some light as to what's going on. With Myriad Pro in a default NSTextView (dragged from IB and run in a fresh project), here's what you get: ![selected text](https://i.stack.imgur.com/HoFZ9.png) ![unselected text](https://i.stack.imgur.com/lR3Ys.png) Notice how the selected rect has the same height as the insertion point. Now for behavior from Pages: ![unselected pages text](https://i.stack.imgur.com/5wWUb.png) ![selected pages text](https://i.stack.imgur.com/B1TfL.png) Notice how the selected rect is similar to the regular text view version, but the insertion point height is actually more reflective of the font (and smaller!). Weird. Why do I care? Here is a screen of my application with Helvetica, and then with Myriad: ![My App Helvetica](https://i.stack.imgur.com/BX2VG.png) ![My App Myraid Pro](https://i.stack.imgur.com/qpUs8.png) Notice that in both cases, the outline symbol is perfectly centered with the insertion point height. Those symbols are actually subviews, and not in the text stream. Notice those symbols in Pages. They remain centered for Myriad. Clearly Apple realized something and fixed it. Any ideas what they did? Thanks!
Crazy Font Issue with NSTextView
CC BY-SA 2.5
0
2011-02-17T04:45:24.377
2011-02-17T12:24:54.917
null
null
323,929
[ "cocoa", "macos", "fonts", "nstextview", "core-text" ]
5,025,473
1
null
null
0
6,295
So I see there are a lot of questions regarding Barcode Scanning in Android applications, but this one is relating to Barcode Scanning in the App Inventor. I followed a tutorial I found online to create a barcode scanning application where you press a button, it launches the scanner and then based on the results, the second button on the screen launches a URL with a passed variable through it. I developed the app myself in App Inventor so I could modify it to my needs, but I have encountered a problem. The barcode scanner launches, scans successfully (Product Found confirmation), but then upon returning to the main screen, the resultLabel.Text value is not changed and neither is the resultActionButton.Text value. Below is the block diagram of my application and a link to the tutorial I followed. Thank you in advance! Here is the block diagram image: ![http://imm.io/3N60](https://i.stack.imgur.com/O7TBU.jpg) Link to tutorial: [http://androidadvice.blogspot.com/2010/09/app-inventor-sample-project-barcode.html](http://androidadvice.blogspot.com/2010/09/app-inventor-sample-project-barcode.html)
Android App Inventor Barcode Scanning
CC BY-SA 3.0
0
2011-02-17T05:41:15.537
2020-03-23T03:02:20.603
2011-11-26T06:06:36.563
234,976
620,824
[ "android", "barcode-scanner", "app-inventor" ]
5,025,800
1
null
null
4
2,439
How can I represent chemical reactions in windows form? I am using c# language. It is possible to represent mathematical formulas using `mimetxt.dll`, but what about chemical reactions? In short, I want to represent on win forms `2H2 + O2 = 2H2O` and complex forms in proper format like: ![enter image description here](https://i.stack.imgur.com/YF8pa.jpg) How can I achieve this?
How to render chemical reactions in Windows Forms?
CC BY-SA 2.5
0
2011-02-17T06:36:06.523
2019-04-28T14:53:18.403
2011-02-17T07:06:28.110
14,860
165,309
[ "c#", "winforms", "mime", "chemistry" ]
5,025,823
1
5,025,954
null
5
2,980
I've a Entity Framework 4.0, with poco object. the edmx model file is generated from the database. This datacontext is accessed through WCF service, it's only mean that I receive some objects and I need to attach them to the current datacontext(or reload them with the key correspondance). Everything seems to work fine, except for one case: I've a N-N relationship between two table, so I've an association table, without any field other than ID of two tables: ![Database model](https://i.stack.imgur.com/rR67Z.png) LINQ transform this into the following schema, this seems to be right. ![LINQ Data model](https://i.stack.imgur.com/ZUzuF.png) When I retrieve data, there is no problem, data I've inserted myself in the Right_group are correctly transformed into "new object in my collection of Rights/Groups". But if I try to modify something and save, it doesn't work ``` public void SaveRights(Group group, List<Rights> rights){ //here, group and rights are objects attached to the database group.Rights.Clear(); group.Rights.AddRange(rights); _dataContext.SaveChanges(); } ``` So my question is: How to save this "relationship" of two objects ? Thank you!
Save a relation with between two entities an N-N association
CC BY-SA 2.5
0
2011-02-17T06:40:12.290
2011-02-17T07:06:49.390
null
null
397,830
[ "c#", "wcf", "linq-to-entities", "entity-relationship" ]
5,025,910
1
5,025,971
null
489
240,507
> What is the diffirence between the `@id/` and `@+id/`? In `@+id/` the plus symbol `+` instructs to create a new resource name and add in to the `R.java` file but what about `@id/`? From the documentation of [ID](http://developer.android.com/guide/topics/ui/declaring-layout.html#id): when referencing an Android resource `ID`, you do not need the plus symbol, but must add the android package namespace, like so: ``` android:id="@android:id/list" ``` But in the image below Eclipse doesn't suggest any kind of `@android:id/`. ![Image showing the suggestion for the @/id and @+/id](https://i.stack.imgur.com/zgbUz.png) > Are `@id/` and `@android:id/` the same?
Difference between "@id/" and "@+id/" in Android
CC BY-SA 4.0
0
2011-02-17T06:52:31.837
2020-05-20T11:16:09.143
2018-10-29T13:30:05.957
7,666,442
457,982
[ "android", "android-xml" ]
5,026,089
1
5,032,184
null
22
1,447
I might say I'm getting quite familiar with Code Contracts: I've read and understood most of the [user manual](http://research.microsoft.com/en-us/projects/contracts/userdoc.pdf) and have been using them for quite a while now, but I still have questions. When I search SO for 'code contracts unproven' there are quite a few hits, all asking why their specific statement couldn't be statically proven. Although I could do the same and post my specific scenario (which is btw: > ![enter image description here](https://i.stack.imgur.com/ooT9f.png)), I'd much rather understand why Code Contract condition can or can't be proven. Sometimes I'm impressed with what it can prove, and sometimes I'm... well... to say it politely: definately not impressed. If I want to understand this, I'd like to know the mechanisms the static checker uses. I'm sure I'll learn by experience, but I'm spraying `Contract.Assume` statements all over the place to make the warnings go away, and I feel like that's not what Code Contracts are meant for. Googling didn't help me, so I want to ask you guys for your experiences: what (unobvious) patterns have you seen? And what made you see the light?
C# Code Contracts: What can be statically proven and what can't?
CC BY-SA 2.5
0
2011-02-17T07:14:15.383
2011-03-02T20:44:55.457
2011-02-17T10:40:34.090
null
308,451
[ "c#", "static-analysis", "code-contracts", "proof" ]
5,026,283
1
null
null
0
630
I am using GLScene in my delphi project. I add some freeform on my scene (for example tooth). in the past I don't use material libs. I add my texture via the material property directrly of the freeform. Now I have to use materiallibs because I want to use some shader. But if I add a materiallib to my free from I get a ugly result from it. You can see the effect on this picture ![Link to image](https://i.stack.imgur.com/xw5W5.jpg) Where is my mistake? Thanks for any answer or tip
Glscene Ugly Texture with Materiallib
CC BY-SA 3.0
null
2011-02-17T07:44:14.357
2020-04-26T09:07:03.367
2020-04-26T09:07:03.367
6,782,707
620,948
[ "textures", "glscene" ]
5,026,714
1
5,027,444
null
1
562
I can not retrieve data from db in sql server. I use the c3p0 as the pool,this is the c3p0.properties: ``` c3p0.user=test c3p0.password=123456 c3p0.jdbcUrl=jdbc:sqlserver://xxxxxx:1433;databaseName=TIMDB;SelectMethod=cursor c3p0.driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver c3p0.maxPoolSize=15 c3p0.testConnectionOnCheckin=true c3p0.idleConnectionTestPeriod=3600 ``` In the sql server,I have create a new user named test,and its default db is TIMDB,the server roles is public,and this is the user mapping: ![enter image description here](https://i.stack.imgur.com/vsyKE.png) But when I start the application,I can get nothing. From the log created by log4j,I can get the sql used to retrieve data,but if I copy the sql to the sql management stutio and create a new query,I can retrieve some data. I wonder why?
can not retrieve data from sql server
CC BY-SA 2.5
null
2011-02-17T08:45:20.040
2011-02-17T10:02:39.810
null
null
306,719
[ "sql", "sql-server", "c3p0" ]
5,027,089
1
null
null
0
796
I am currently following the procedural tutorial on creating procedural spheres found [here](http://iphonedevelopment.blogspot.com/2009/05/procedural-spheres-in-opengl-es.html) and I am trying to merge it with the textures tutorial with it to create a 3d version of Earth found [here](http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-part-6_25.html). So far, I was able to successfully bind the texture on the sphere. However, I am having some problems with the way it was displayed. I have attached links to the screen captures to further show the result. As you can see, the image is repeated and is not entirely wrapped on the sphere. ![enter image description here](https://i.stack.imgur.com/og8Sw.png) ![enter image description here](https://i.stack.imgur.com/2Juyi.png) I am using this code, which I am guessing might cause the problem: ``` glTexCoordPointer(3, GL_FLOAT, 0, sphereTriangleStripVertices); ``` I hope you can help me with this as I have been trying to fix this for weeks now. Thank you very much in advance.
Procedural Sphere Texture
CC BY-SA 2.5
null
2011-02-17T09:27:13.053
2015-03-14T02:24:27.230
2015-03-14T02:24:27.230
1,118,321
621,046
[ "iphone", "opengl-es", "geometry", "textures" ]
5,027,204
1
6,857,600
null
17
2,935
As a bit of background - Windows has a facility for Touch/TabletPCs whereby it shifts the position of popups/menus depending on your "handedness" (to prevent the menu appearing under your hand). Essentially what this does is if you are set to "right handed" (which it seems to default to once you've connected a touch device), every popup you open is artificially kicked to the left - this causes massive layout issues where we try and line up a popup with the item it "popped up from" : ![Tablet PC Settings set to Left handed - no artificial correction from Windows](https://i.stack.imgur.com/NY33t.jpg) ![Tablet PC Settings set to Right handed - Windows artificially adjusts our positioning](https://i.stack.imgur.com/ruH8E.jpg) We can detect what this setting is set to with [SystemParameters.MenuDropAlignment](http://msdn.microsoft.com/en-us/library/system.windows.systemparameters.menudropalignment.aspx), and for trivial popups we can adjust this using the actual width of the popup - but for dynamic popups and when we throw right to left support into the mix, this just doesn't work. Currently it's looking more likely that we are going to have to go through every popup, manually work out a value to adjust the kick, and add something like this to every one: ``` <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Source={x:Static SystemParameters.MenuDropAlignment}}" Value="True"/> <Condition Binding="{Binding RelativeSource={RelativeSource Mode=Self}, Path=FlowDirection}" Value="RightToLeft"/> </MultiDataTrigger.Conditions> <MultiDataTrigger.Setters> <Setter Property="HorizontalOffset" Value="-50"/> <!-- Set to arbitrary value to test --> </MultiDataTrigger.Setters> </MultiDataTrigger> ``` So.. back to the question :-) Does anyone know of a way to stop a WPF popup looking at this setting at all? For those that don't have a touch device you can access the Tablet PC settings by running: C:\Windows\explorer.exe shell:::{80F3F1D5-FECA-45F3-BC32-752C152E456E} And see the mess it makes for yourself :-)
Is it possible to get a popup to ignore MenuDropAlignment in a WPF / Touch app?
CC BY-SA 2.5
0
2011-02-17T09:39:07.957
2018-12-28T15:42:01.213
2013-07-20T14:06:02.030
2,176,945
26,507
[ "wpf", "xaml", "touch", "multi-touch", "multidatatrigger" ]
5,027,346
1
5,027,943
null
1
1,934
Im using this Layout to put two ImageViews one next to the other, but the two images seems to be separated by 1 transparent pixel space. The blue background is there to make easier to observe the problem... ``` <?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" android:background="#0000FF"> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="5dip"> <ImageView android:src="@drawable/i_position_icon" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <ImageView android:src="@drawable/i_position_seekbar" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> </LinearLayout> ``` The .java is: ``` public class MainActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); } } ``` Im using a device with android 2.2. I wasnt able to reproduce the glitch on a 2.1-update1 emulator neither on a 1.6 emulator... Ive checked the images and they have no extra pixels arround them. Also i tried adding a red 1px width border on the images separately and the glitch is still there, so the images dont seem to be the problem. These are the problematic images (correctly shown here): ![Image A](https://i.stack.imgur.com/wRUX7.png)![Image B](https://i.stack.imgur.com/KFRGQ.png) [http://dl.dropbox.com/u/7024937/i_position_icon.png](http://dl.dropbox.com/u/7024937/i_position_icon.png) [http://dl.dropbox.com/u/7024937/i_position_seekbar.png](http://dl.dropbox.com/u/7024937/i_position_seekbar.png) And this is what i see in my device: ![Transparent pixel between ImageViews](https://i.stack.imgur.com/JpIIc.png) Thanks.
Unwanted space between two ImageView on android
CC BY-SA 2.5
null
2011-02-17T09:53:59.160
2011-02-17T10:50:25.263
2011-02-17T10:18:55.223
13,116
13,116
[ "android", "imageview", "padding", "margin", "android-linearlayout" ]
5,027,434
1
5,037,087
null
3
5,128
In my application i want to show the size of downloading image in label.like, 5 KB of 2MB . Progress bar is used to show the image downloading and i want to show the total size of ![enter image description here](https://i.stack.imgur.com/6zqKB.png)currently downloading image as well as completed size of downloading(like,5 KB of 2 MB) Anyone give me guidance to do this. For this What should i do.please give me any sample code or tutorial for this. Already i'm using ASIHTTP Library .There are several delegate methods.In which method i want to give the code for finding the total size of the download image and progress of the downloding image.Please give me a code for findout the size of both (total size and downloaded size ) of an image.Please help me .stil i have no idea to find the size and which delegate method is used to support.
progress bar downloading image
CC BY-SA 3.0
0
2011-02-17T10:01:44.797
2013-01-09T11:56:02.567
2013-01-09T11:56:02.567
1,471,203
563,645
[ "iphone", "progress-bar" ]
5,027,453
1
5,027,534
null
4
2,875
i search google for restyling tab control in WPF and i found many but i am not getting any sample according to my requirement. here i am attaching the picture of the tab control which looks good. ![enter image description here](https://i.stack.imgur.com/r48AO.png) i want to have the same look tab control in WPF so please some one guide me how to do it. thanks
How to restyle tab control in WPF
CC BY-SA 2.5
0
2011-02-17T10:03:22.180
2012-06-03T17:54:16.423
2012-06-03T17:54:16.423
577,417
508,127
[ "wpf", "styles", "tabcontrol" ]
5,027,675
1
5,027,763
null
3
1,282
I would like to create a PopoverController containing buttons, like this one: ![enter image description here](https://i.stack.imgur.com/GpzrB.jpg) I can create a UIViewController containing two buttons, but they won't be identical to those shown on screenshot above How can I achieve this ? Thanks
iPad UIPopoverController with buttons, same as Contacts App
CC BY-SA 3.0
null
2011-02-17T10:25:34.933
2011-11-14T20:27:18.300
2011-11-14T20:27:18.300
219,883
621,167
[ "ipad", "ios", "uipopovercontroller" ]
5,027,731
1
5,038,556
null
0
1,704
Microsoft VB6 (Visual Basic 6) had a [FlatScrollBar Control](http://msdn.microsoft.com/en-us/library/aa231260%28v=vs.60%29.aspx). I was terribly devastated not to find any such implementation in C#. ![enter image description here](https://i.stack.imgur.com/7dLkh.gif) I humbly ask to my fellow C# developers and Windows Forms gurus if this feat is achievable in C# or not ? I thank any reply or insight into this matter in advance.
How to create a FlatScrollBar
CC BY-SA 2.5
null
2011-02-17T10:30:48.597
2011-02-18T07:08:24.450
2011-02-17T11:00:15.463
39,278
39,278
[ "c#", "winforms", "customization", "scrollbars" ]
5,027,790
1
null
null
0
647
## Background Using a JSF `listShuttle` component. ## Problem Put the selected value of the second box to be in the other `outtext` box. ## Question How do I put the value selected in the right-hand box of a list shuttle into an `outputText` field? ## Editor's Note The following image is my interpretation of the original question: ![](https://i.stack.imgur.com/mGF9W.png)
List shuttle selected value
CC BY-SA 2.5
null
2011-02-17T10:37:03.933
2011-02-25T00:48:00.623
2011-02-24T23:14:32.093
59,087
621,190
[ "jsf", "richfaces" ]
5,027,854
1
null
null
1
214
I have launched a performance wizard in VS2010 to audit thread concurrency in my Application. Is there a way to identify exactly what specific threads "Worker Threads" point to in my app ? Indeed, I launch worker threads. Is there a way to name them and/or timestamp same logical thread that is launched many times. (Am I using this right or is it a loony idea ?) This would allow me to identify threads which cause high Cross-Core context switches and take action (right ? ) ![Core View](https://i.stack.imgur.com/anMQn.jpg)
VS 2010 Performance Profiler : Identifying Threads
CC BY-SA 2.5
null
2011-02-17T10:43:12.720
2011-02-17T10:48:28.443
2011-02-17T10:48:28.443
374,804
426,332
[ ".net", "visual-studio", "multithreading", "visual-studio-2010" ]
5,027,995
1
5,038,461
null
1
1,268
I have a standard `ListView` control in a VB.Net Windows Forms project. The view is set to Tile. Users report that they see the following: ![ListView spacing problem in Tile mode](https://i.stack.imgur.com/C7Dcs.png) Do you know how I could fix the problem? All the design work was done using VS 2010.
Spacing problems in a ListView control
CC BY-SA 2.5
0
2011-02-17T10:54:56.373
2011-02-18T06:51:31.573
2011-02-18T06:36:55.120
695,591
695,591
[ ".net", "winforms", "listview", "spacing" ]
5,028,125
1
null
null
5
9,726
I'd like to be able to change the default duration of any newly created events. I'm in dayView and if I simply click (not drag&drop) on the calendar, I get a half hour session. I'd like to set it to one hour by default. Maybe with this kind of code: ``` , select: function (startDate, endDate, allDay, jsEvent, view) { endDate = new Date(startDate); endDate.setHours(endDate.getHours() + 1); } ``` This is effectively setting the good endDate but not visualy updated ![half hour selection screenshot](https://i.stack.imgur.com/oE2C8.png) --- I'm trying to make the behavior similar to Google Calendar: If the user clicks it will select a 1h event, but the user can still select half hours.
FullCalendar - Default Event Duration
CC BY-SA 3.0
null
2011-02-17T11:08:08.550
2018-03-16T03:34:47.357
2012-04-24T09:54:06.350
305,189
305,189
[ "javascript", "jquery", "fullcalendar" ]
5,028,208
1
null
null
4
2,715
I'm using Imagemagick to create thumbnails images of pdf files with this command: ``` convert 'input.pdf[0]' -resize "100x140>" -colorspace 'rgb' 'output.jpg' 2>/dev/null ``` Some of the PDFs are in CMYK color space, hence the specification of the expected -colorspace as rgb. This was working fine until I updated to the latest versions of Imagemagick(6.6.7-1) and ghostscript(9.01_0), now it looks like the conversion to rgb isn't working any longer, here is an example output: ![failed cymk-rgb conversion](https://i.stack.imgur.com/CrDW1.jpg) (The background should be white, not black) It seems though that the problem comes from the -resize option because if I remove it the output is correct. To get the expected output I now do two passes, the first to convert to rgb and the second to resize the image, but that's not very elegant. Is there a better solution?
Creating JPG thumbnails from PDF causes problems with new version of ImageMagick
CC BY-SA 3.0
0
2011-02-17T11:16:17.923
2012-07-12T13:36:15.947
2012-07-12T11:58:59.923
359,307
244,618
[ "pdf", "imagemagick", "paperclip", "thumbnails", "ghostscript" ]
5,028,218
1
5,028,810
null
1
1,204
I have got an application where I need to draw random number of points at random locations in the activity. Then I need to move those points at any direction too like steroids. How can I do that? Please see image below. ![enter image description here](https://i.stack.imgur.com/JBGQv.png)
Drawing circles at random points
CC BY-SA 2.5
null
2011-02-17T11:17:11.070
2011-02-17T12:15:45.763
null
null
340,002
[ "android" ]
5,028,771
1
null
null
0
240
The layout gets broken in IE6 like in a picture:![enter image description here](https://i.stack.imgur.com/0TbGV.jpg) [The site code](http://www.automatydrzwiowe.pl/trunk/index.php?event=product&parent_id=30&menu_id=2) Does anybody knows how to fix it? Thanks
IE bug push content down and right - how to solve it?
CC BY-SA 2.5
null
2011-02-17T12:12:39.573
2011-03-01T15:49:46.450
null
null
217,681
[ "html", "css", "internet-explorer", "internet-explorer-6" ]
5,029,442
1
5,029,557
null
7
6,443
I am currently searching for an icon that shows a green check mark, such as this: ![enter image description here](https://i.stack.imgur.com/hyKmt.jpg) Basically what I want to do is the following: My C# WPF application contains a ListView with some entries and each of the entry gets validated. Depending on the outcome of the validation, such a green check mark or a red cross should be displayed. I found a very nice red cross in the class SystemIcons. It is called SystemIcons.Error. The SystemIcons class also provides other icons like "Exclamation", "hand", "Shield", "Question" and various other icons, however there is no such a check mark thing. Does anyone know whether such a check mark icon exists in some default library? I googled but I could not find anything alike. In case there is no such Icon, I would have to take some image from the web (like I posted here), but that would be the last option since my application should look consistent and I'm pretty sure Microsoft uses lots of those green things in many places of Windows. So there must be some icon I could use, right? Best wishes, Christian
Searching for a default "check mark" icon
CC BY-SA 2.5
null
2011-02-17T13:18:45.850
2013-12-02T16:08:12.003
2011-02-17T13:25:49.620
39,709
490,230
[ "wpf", "icons" ]
5,029,446
1
5,029,563
null
0
273
After installing Xcode 3.2.5 iOS 4.2 an app that was perfectly working stopped working. I have seen that this has happened to others but cant understand how to solve it. My questions are: 1. How can I know where it is crashing? 2. What can I do to better debug and pinpoint the problem. Here is the call stack. ![Call Stack](https://i.stack.imgur.com/IzlKV.png) Tommy thanks for the answer. I have build and run and suggested but when it crashes it does not shows where it crashed. Also I added a breakpoint inside the method but it does not stops there. Any further ideas? Here is the code snippet. ``` - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { ApplicationData *appdata = [ApplicationData sharedInstance]; if(appdata.currentCategoryIndex >= 0) { Category *category = [appdata.categoryList objectAtIndex:appdata.currentCategoryIndex]; if(category.records) { [lab_norecords setHidden:YES]; } else { [lab_norecords setHidden:NO]; return 0; } return [category.records count]; } return 0; ``` } ![enter image description here](https://i.stack.imgur.com/1lQIi.png) Now I am getting this error: ![enter image description here](https://i.stack.imgur.com/IIzo0.png) I believe the source of the problem is here in the same subCategoryView: ``` - (id)init { if([[NSBundle mainBundle] loadNibNamed:@"SubCategoryView" owner:self options:nil]) { //if(self = [super initWit]) cellowner = [[TableCellOwner alloc] init]; [listTableView setBackgroundColor:[UIColor clearColor]]; [listTableView setSeparatorColor:[UIColor whiteColor]]; [listTableView initialize]; } return self; ``` }
Iphone app wont run after upgrading to iOS 4.2
CC BY-SA 2.5
null
2011-02-17T13:19:10.107
2011-02-21T13:13:40.917
2011-02-21T13:13:40.917
104,506
104,506
[ "xcode", "ios4" ]
5,029,519
1
5,182,578
null
45
59,709
Does anyone know what event or property I need to query in order to get a percentage figure of the amount an HTML5 video has loaded? I want to draw a CSS styled "loaded" bar that's width represents this figure. Just like You Tube or any other video player. So just like you tube a video will play even if the whole video hasn't loaded and give the user feedback on how much of the video has loaded and is left to load. ![enter image description here](https://i.stack.imgur.com/MIaxL.jpg)
HTML5 Video - Percentage Loaded?
CC BY-SA 2.5
0
2011-02-17T13:24:58.260
2022-06-21T03:02:48.690
null
null
516,629
[ "javascript", "css", "video", "html5-video" ]
5,029,644
1
5,029,814
null
0
610
In dreamweaver while positioning the controls (design tab) the css position values (left, top etc) are generated in pixels. Is there any setting through which I can get the values generated in percentages(%) ? Update: Added my current layout for reference. Regards ![enter image description here](https://i.stack.imgur.com/DYvpH.jpg)
Adobe dreamweaver - how do I set default positioning of divs to percent instead of pixels
CC BY-SA 2.5
null
2011-02-17T13:36:40.653
2021-01-10T21:09:15.207
2011-02-17T14:15:15.987
194,595
194,595
[ "css", "layout", "dreamweaver" ]
5,029,733
1
5,029,796
null
5
4,999
Is there any control available which shows line number in Textbox either in the left side or right side? If not how to approach to create a control like that? ![enter image description here](https://i.stack.imgur.com/Cz7sa.png)
How to design a TextBox which shows line number int he Left or Right Side?
CC BY-SA 2.5
0
2011-02-17T13:45:42.740
2021-02-22T10:31:53.703
2011-02-17T13:51:22.750
144,373
144,373
[ "wpf" ]
5,029,741
1
null
null
0
1,447
Do you have any ideas on the implementation of the image slideshow on Google Image for iPhone ? They use the slide animation, you can swipe using your fingers. It's really well done. ![SlideShow for image results on Google Images for iPhone](https://i.stack.imgur.com/9rJuH.png)
Google Image Mobile SlideShow
CC BY-SA 2.5
null
2011-02-17T13:46:30.477
2011-06-24T09:47:23.857
null
null
292,431
[ "javascript", "iphone", "html" ]
5,030,315
1
5,074,263
null
31
12,897
This question is about iOS device rotation and multiple controlled views in a UINavigationController. Some views should be orientation, and some should . If you try and create the simplest setup with three views, you'll notice that the autorotation behavior has a few very nasty quirks. The scenario is, however, very simple, so I think I'm either not doing the autorotation implementation correctly, or I'm forgetting something. I have a very basic demo app that shows the weirdness, and I made a video showing it in action. - [Download the app (XCode project)](http://grabs.epologee.com/86a550fe0c65cd7d8ab0b3c346a342f7.zip)- [View the classes as a gist (rather lengthy)](https://gist.github.com/b8670e5976635a629842)- [Watch the question video (YouTube, 2m43s)](http://www.youtube.com/watch?v=pugXOhTbJaY) The setup is very basic: Three view controllers called `FirstViewController`, `SecondViewController` and `ThirdViewController` all extend an `AbstractViewController` that shows a label with the class' name and that return YES for `shouldAutorotateToInterfaceOrientation:` when the device is in portrait orientation. The SecondViewController overrides the this method to allow for all rotations. All three concrete classes add a few colored squares to be able to navigate between the views by pushing and popping the controllers onto/off the `UINavigationController`. So far a very simple scenario, I would say. If you hold the device in portrait or landscape orientation, this is the result I would not only like to achieve, but would also expect. In the first image you see that all views are 'upright', and in the second you see that only the second view controller counter-rotates the device's orientation. To be clear, it should be possible to navigate from the second view in landscape mode to the third, but because that third only supports portrait orientation, it should only be shown in portrait orientation. The easiest way to see if the results are alright, is by looking at the position of the carrier bar. ![Expected view orientation for the device in portrait mode](https://i.stack.imgur.com/dQNQr.png) ![Expected view orientation for the device in landscape mode](https://i.stack.imgur.com/IRON5.png) But this question is here because the actual result is completely different. Depending on what view you're at when you rotate the device, and depending on what view you navigate to next, the views will not rotate (to be specific, the `didOrientFromInterfaceOrientation:` method is never called). If you're in landscape on the second and navigate to the third, it will have the same orientation as the second (=bad). If you navigate from the second back to the first however, the screen will rotate into a 'forced' portrait mode, and the carrier bar will be at the physical top of the device, regardless of how you're holding it. The video shows this in more detail. ![Actual view orientation for the device in landscape mode](https://i.stack.imgur.com/xCg96.png) My question is twofold: 1. Why does the first view controller rotate back, but not the third? 2. What needs to be done to get the correct behavior from your views when you only want some views to autorotate, but not others? Cheers, EP.
How to constrain autorotation to a single orientation for some views, while allowing all orientations on others?
CC BY-SA 2.5
0
2011-02-17T14:36:09.353
2013-02-10T21:51:09.773
2011-02-19T13:15:09.533
432,782
432,782
[ "objective-c", "cocoa-touch", "uiviewcontroller", "uinavigationcontroller", "device-orientation" ]
5,030,389
1
null
null
21
34,883
This question is a continuation of the previous [question](https://stackoverflow.com/questions/5027480/how-to-add-a-new-column-and-aggregate-values-in-r) I asked. Now I have a case where there is also a category column with Prop. So, the dataset becomes like ``` Hour Category Prop2 00 A 25 00 B 59 00 A 55 00 C 5 00 B 50 ... 01 C 56 01 B 45 01 A 56 01 B 35 ... 23 D 58 23 A 52 23 B 50 23 B 35 23 B 15 ``` In this case I need to make a stacked area plot in R with the percentages of these different categories for each day. So, the result will be like. ``` A B C D 00 20% 30% 35% 15% 01 25% 10% 40% 25% 02 20% 40% 10% 30% . . . 20 21 22 25% 10% 30% 35% 23 35% 20% 20% 25% ``` So now I would get the share of each Category in each hour and then plot this is a stacked area plot like this where the x-axis is the hour and y-axis the percentage of Prop2 for each category given by the different colours![this](https://i.stack.imgur.com/PVTMr.png)
Getting a stacked area plot in R
CC BY-SA 2.5
0
2011-02-17T14:42:31.033
2012-04-19T12:08:58.220
2017-05-23T11:47:26.130
-1
213,334
[ "r", "plot", "ggplot2", "reshape", "stacked-area-chart" ]
5,030,401
1
null
null
17
3,197
I'm using the MS asp.net charting controls. And I'm using the radar chart to draw some values, but for some reason, the lines of the X-axis doesn't really meet in the middle. I have set the `LineWidth = 1`, but the line still takes like 2 pixels and some of the markers are totally off, or maybe it's the line that's totally off. Maybe my text is a little bit off as well, so please see picture and hopefully you'll understand my problem. =) ![enter image description here](https://i.stack.imgur.com/ZTAQF.png) Code that generates the chart: ``` // Populate series data Chart chart1 = new Chart(); chart1.ChartAreas.Add(new ChartArea("ChartArea1")); chart1.Height = new Unit(380); chart1.Width = new Unit(880); //chart1.AntiAliasing = AntiAliasingStyles.Graphics; //chart1.BackColor = Color.Transparent; chart1.Customize += new EventHandler(Chart_Customize); // Show as 3D chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = false; chart1.ChartAreas["ChartArea1"].AxisY.IntervalAutoMode = IntervalAutoMode.FixedCount; chart1.ChartAreas["ChartArea1"].AxisY.Interval = 10; chart1.ChartAreas["ChartArea1"].AxisY.Maximum = 100; chart1.ChartAreas["ChartArea1"].AxisY.IsReversed = true; chart1.ChartAreas[0].AxisY.LineWidth = 1; chart1.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.Gray; chart1.ChartAreas[0].AxisY.LineColor = Color.Gray; chart1.ChartAreas[0].AxisY.MajorTickMark.Enabled = false; List<string> names = new List<string>(); int namecounter = 1; foreach (var p in Model.Participants) { if (SessionHandle.ShowNamesInDiagrams) names.Add(p.Person.Name); else names.Add(namecounter.ToString()); namecounter++; } #region firstresult if (SessionHandle.ShowFirstResult) { chart1.Series.Add(new Series("FirstResult")); List<double> firstresult = new List<double>(); foreach (var p in Model.Participants) { var resultSummary = from r in Model.ResultSummary where r.userID == p.ParentID && Model .Modules .Where(x => x.hasResult) .ToList() .Exists(x => x.ID == r.moduleID) select r; firstresult.Add(resultSummary.Sum(x => x.scorePercent) / Model.Modules.Where(x => x.hasResult).Count()); } chart1.Series["FirstResult"].Points.DataBindXY(names, firstresult); // Set radar chart type chart1.Series["FirstResult"].ChartType = SeriesChartType.Radar; // Set radar chart style (Area, Line or Marker) chart1.Series["FirstResult"]["RadarDrawingStyle"] = "Marker"; chart1.Series["FirstResult"].Color = Color.DarkBlue; chart1.Series["FirstResult"].MarkerImage = Url.Content("~/Content/Images/firstresult.png"); // Set circular area drawing style (Circle or Polygon) chart1.Series["FirstResult"]["AreaDrawingStyle"] = "Circle"; // Set labels style (Auto, Horizontal, Circular or Radial) chart1.Series["FirstResult"]["CircularLabelsStyle"] = "Horizontal"; } #endregion ```
Ugly drawing of MS asp.net radar chart
CC BY-SA 3.0
0
2011-02-17T14:44:08.053
2014-05-20T03:13:04.557
2014-01-22T11:48:57.147
332,071
219,437
[ "c#", "asp.net", "charts", "asp.net-charts", "radar-chart" ]
5,030,890
1
5,031,213
null
2
2,408
I can't for the life of me figure out what I'm doing wrong. I have a `SearchModel` class that my view inherits from ``` public class SearchModel { public String Something { get; set; } public List<SearchField> SearchFields { get; set; } } public class SearchField { [XmlIgnore] public Boolean Include { get; set; } [XmlAttribute("Required")] public Boolean Required { get; set; } [XmlAttribute("Field")] public String FieldName { get; set; } [XmlText] public String DisplayName { get; set; } [XmlIgnore] public FilterMethod FilterOperator { get; set; } [XmlIgnore] public String Value { get; set; } } ``` I have a controller called `SearchController` ``` public ActionResult Index() { SearchModel model = new SearchModel { Something = "Hello", SearchFields = customer.Config.Fields }; return View(model); } [AcceptVerbs(HttpVerbs.Post)] public ActionResult Index(SearchModel searchModel) { return View("Index", searchModel); } ``` The SearchController index page has this to render the fields ``` <% using (Html.BeginForm()) {%> <%= Html.TextBox("Something", Model.Something) %> <% for (int i = 0; i < Model.SearchFields.Count; i++) { %> <%= Html.Label(Model.SearchFields[i].DisplayName) %> <%= Html.DropDownListFor(x => x.SearchFields[i].FilterOperator, Model.SearchFields[i].FilterOperator.ToSelectList(), new { @class = "textField" })%> <%= Html.TextBoxFor(x => x.SearchFields[i].Value) %> <%= Html.ValidationMessageFor(x => x.SearchFields[i].Value) %> <% } %> <button type="submit" value="Search" class="SearchBtn"> Search</button> <% } %> ``` When I modify the value of the SearchField .Value property and press the submit button, it posts to the `public ActionResult Index(SearchModel searchModel)` method. The searchModel variable contains the collection `SearchFields`, however only the "`Value`" and "`FilterOperator`" properties are not null. How can I include the other properties in the post, even if I don't want to explicitly list them in the form? This image below shows the values being sent to the "index" display page ![enter image description here](https://i.stack.imgur.com/VtjFE.png) This image below shows the output from POST ![Output From POST](https://i.stack.imgur.com/XmSz6.png)
Asp.net MVC2 - Form Post Binding
CC BY-SA 2.5
0
2011-02-17T15:23:50.223
2011-02-17T15:50:55.293
2011-02-17T15:31:52.410
33,082
33,082
[ "c#", "asp.net-mvc-2", "model-binding" ]
5,031,143
1
5,031,205
null
6
1,789
Well, It has been sometime since this keep popping in and I never had the time to ask why: so here is my very simple HTML: ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Page Title</title> <style> div{ width: 200px; background: green; } p{ background: yellow; margin: 40px; } </style> </head> <body> <div> <p>Testing</p> </div> </body> </html> ``` nothing particular, only a simple page with a div and a paragraph inside that div. but you can notice that on the css I declared the paragraph to stay away 40px from divs bounds...and this happens ![no top and bottom margins](https://cl.ly/4eO1/Screen_shot_2011-02-17_at_16.34.13.png) That's right...top and bottom margin being ignored.... but then if I add a 1px red border to the `div` like: ``` div{ width: 200px; background: green; border: 1px solid red; } ``` here's what I get: ![working this time](https://cl.ly/4enw/Screen_shot_2011-02-17_at_16.34.24.png) so yes, it really sounds weird for me...this is happening in safari, but I am sure it will happen the same on other browsers...my question would be..why this is happening? Is there any way to fix it? Thanks in advance
css margin-top property only works if border is declared
CC BY-SA 2.5
0
2011-02-17T15:43:16.750
2012-03-02T13:05:13.957
2017-02-08T14:31:34.057
-1
165,750
[ "html", "margin", "css" ]
5,031,388
1
5,035,414
null
12
2,587
I have a MySQL database containing a table of rentable properties and a table of bookings for these properties. There is also a search feature for finding available properties between two provided dates. When searching, the user can enter the start date, the amount of days they wish to stay, and a date flexibility of up to +/- 7 days. A booking can start on the same day as another booking ends (party 1 leaves in the morning, party 2 arrives in the evening). I am having difficulty implementing the flexibility feature efficiently. ``` CREATE TABLE IF NOT EXISTS `property` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `property_booking` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `property_id` bigint(20) DEFAULT NULL, `name` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, `date_start` date DEFAULT NULL, `date_end` date DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ``` ``` INSERT INTO `property` (`name`) VALUES ('Property 1'), ('Property 2'), ('Property 3'); INSERT INTO `property_booking` (`property_id`,`name`,`date_start`,`date_end`) VALUES (1, 'Steve', '2011-03-01', '2011-03-08'), (2, 'Bob', '2011-03-13', '2011-03-20'), (3, 'Jim', '2011-03-16', '2011-03-23'); ``` The user selects that they want to start their stay on 2011-03-10, they want to stay for 7 days, and they have a flexibility of +/- 2 days. I have compiled an image that visualises the data and parameters below. ![](https://i.stack.imgur.com/o9TUC.png) Property 1 Property 3 My current query checks for overlap for all 7 day date ranges within the total searchable date range, like this: ``` SELECT p.`id`, p.`name` FROM `property` p WHERE (NOT (EXISTS (SELECT p2.`name` FROM `property_booking` p2 WHERE (p2.`property_id` = p.`id` AND '2011-03-10' < DATE_SUB(p2.`date_end`, INTERVAL 1 DAY) AND '2011-03-17' > DATE_ADD(p2.`date_start`, INTERVAL 1 DAY))))) OR (NOT (EXISTS (SELECT p3.`name` FROM `property_booking` p3 WHERE (p3.`property_id` = p.`id` AND '2011-03-11' < DATE_SUB(p3.`date_end`, INTERVAL 1 DAY) AND '2011-03-18' > DATE_ADD(p3.`date_start`, INTERVAL 1 DAY))))) OR (NOT (EXISTS (SELECT p4.`name` FROM `property_booking` p4 WHERE (p4.`property_id` = p.`id` AND '2011-03-09' < DATE_SUB(p4.`date_end`, INTERVAL 1 DAY) AND '2011-03-16' > DATE_ADD(p4.`date_start`, INTERVAL 1 DAY))))) OR (NOT (EXISTS (SELECT p5.`name` FROM `property_booking` p5 WHERE (p5.`property_id` = p.`id` AND '2011-03-12' < DATE_SUB(p5.`date_end`, INTERVAL 1 DAY) AND '2011-03-19' > DATE_ADD(p5.`date_start`, INTERVAL 1 DAY))))) OR (NOT (EXISTS (SELECT p6.`name` FROM `property_booking` p6 WHERE (p6.`property_id` = p.`id` AND '2011-03-08' < DATE_SUB(p6.`date_end`, INTERVAL 1 DAY) AND '2011-03-15' > DATE_ADD(p6.`date_start`, INTERVAL 1 DAY))))); ``` On the sample dataset, it's reasonably quick, but on much larger datasets it's going to get pretty sluggish, even more so when you build the full +/- 7 day flexibility. Does anyone have any suggestions as to how this query could be better written?
MySQL: Matching records that have x consecutive dates available between two dates
CC BY-SA 2.5
0
2011-02-17T16:01:15.510
2011-02-18T14:57:12.827
2011-02-17T16:10:42.770
621,615
621,615
[ "mysql", "date", "date-range" ]
5,031,442
1
5,032,742
null
3
7,449
I am trying to popup div with error messages. The markup is as shown ``` .popup { background: #7ABC45 none; border: 1px solid #7ABC45; border-radius: 5px; -moz-border-radius:5px; font-size: 8pt; font-weight:bold; position: relative; bottom:4px; right:4px; z-index:2; } .popuptop{height:7px; text-align:right; padding:0px 4px 2px 0;z-index:1;} .popup-message { text-align:left; padding:3px 3px 3px 3px;z-index:1; } .popup-shadow {background-color:#ccc;position: relative; bottom:4px; right:4px; border-radius:5px;-moz-border-radius:5px;z-index:1;} .popupContainer{position:relative;z-index:1;} #emailErrorAlert{position:absolute;top:-40px; left:10px;} #duplicateEmailAlert{position:absolute;top:-40px; left:10px;} #duplicateMobileAlert{position:absolute;top:-40px; left:10px;} <tr step="step1"> <td class="grid_4"> <span>My Mob No/Email is </span><a href="#" style="font-size:8pt; padding-left:20px;">we protect your privacy</a> <div class="popupContainer"> <div id="emailErrorAlert" style="display:none;"> <div class="popup-shadow"> <div class="popup"> <div class="popuptop"><a href="#" class="closepopup">X</a></div> <div class="popup-message"><p>Please Enter a Valid Email Or Mobile Phone Number</p></div> </div> </div> </div> </div> <div class="popupContainer"> <div id="duplicateEmailAlert" style="display:none;"> <div class="popup-shadow"> <div class="popup"> <div class="popuptop"><a href="#" class="closepopup">X</a></div> <div class="popup-message"><p>You may provide just one email address</p></div> </div> </div> </div> </div> <div class="popupContainer"> <div id="duplicateMobileAlert" style="display:none;"> <div class="popup-shadow"> <div class="popup"> <div class="popuptop"><a href="#" class="closepopup">X</a></div> <div class="popup-message"><p>You may provide just one mobile phone number</p></div> </div> </div> </div> </div> </td> </tr> ``` The divs have to be positioned adjacent to the field. I am trying to position using absolute position as can be seen in css above for #duplicateMobileAlert. The problem is the div is getting cut beyond the tr. So if I change left:10px to left:-90px most of the div disappears behind the container. I want it to go over the tr and its container. How can I do that? Any pointers? ![enter image description here](https://i.stack.imgur.com/Puv7A.png)
How to position div so that it renders outside container
CC BY-SA 2.5
null
2011-02-17T16:06:21.003
2014-07-09T13:16:15.653
null
null
324,143
[ "html", "css" ]
5,031,765
1
null
null
0
1,275
My Delphi 7 installation started giving this error. The error message shows the correct help path, but with the backslashes removed. The Help files are present in the expected location (C:\Program Files\Borland\Delphi7\Help). I'm running D7 under Windows 7. It was working previously. ![enter image description here](https://i.stack.imgur.com/rYSwC.png) Sometimes I also get this error : ![enter image description here](https://i.stack.imgur.com/8zMhm.png) I have searched on Google, and I find others reported the problem, but no solution has been posted.
Delphi context help says "Cannot find the C:Program FilesBorlandDelphi7Helpd7.hlp file"
CC BY-SA 2.5
null
2011-02-17T16:36:37.927
2013-02-14T00:39:21.563
2011-11-08T02:40:57.637
1,022,826
82,287
[ "delphi", "delphi-7", "winhelp" ]
5,032,058
1
5,033,920
null
3
1,853
What's the correct way to track mouse position, from Adobe Flash, when someone has: 1. Started a drag within the Flash application (a MOUSE_DOWN event), 2. Dragged the mouse outside the app or even the browser window (a MOUSE_MOVE event), and 3. Released the mouse button (a MOUSE_UP event)? For example (imagine Stack Overflow is a Flash application): ![enter image description here](https://i.stack.imgur.com/9STcu.png) Within the app, I'm able to track the mouse X and Y positions with a MOUSE_MOVE event listener, but I lose it when it goes outside of the browser... So, how do I track the position of the mouse no matter where it goes? For a good example, try [Google Finance](http://www.google.com/finance?q=INDEXSP:.INX). Try dragging the chart around; it'll still drag around if you move your mouse out of the browser window, and the mouse will be outside of the browser when you release it. Also, check out [KOKO KAKA](http://www.kokokaka.com/); If you click on the scrollbar (make the browser window really small) and move outside of the browser window, the scroll bar moves just like a real one would. I believe both only work because the MOUSE_DOWN event "captures" the mouse, allowing the Flash application to track the position of the mouse even when it is outside of the browser. How would you be able to keep the event fired like this?? Thanks! ♥
Flash: Tracking mouse position after click-and-drag (down-and-move), even outside the stage/browser?
CC BY-SA 2.5
0
2011-02-17T17:02:36.230
2011-02-17T20:00:43.783
2011-02-17T19:21:27.690
621,790
621,790
[ "javascript", "flash", "actionscript", "mouse", "position" ]
5,032,111
1
5,043,266
null
1
510
I've got [a site](http://p2plendingdata.com/fin/stats/credithistory) which produces charts such as the one below ![P2P Lending Data Chart](https://i.stack.imgur.com/aujSl.png) I'd like to encourage visitors to embed the generated graphic on their own sites and blogs. Is it possible to include views for that chart in google Analytics? I want to be able to see when a site embeds the image so that it's tracked in the analytics reports. I'd envision some API that I can call from the server-side method which generates the PNG, but haven't been able to find anything specific. Thanks!
Track embedded charts via Google Analytics
CC BY-SA 2.5
0
2011-02-17T17:07:05.497
2011-02-18T16:32:53.473
null
null
5,416
[ "c#", "asp.net-mvc", "google-analytics" ]
5,032,219
1
5,032,257
null
1
3,099
anyone know how to fix this! on 'Get In Touch button' ![enter image description here](https://i.stack.imgur.com/4Uuh8.gif) it works find in another browser except IE7; HTML: ``` <NAV> <UL> <LI><a href="#">Home</a></LI> <LI><a href="#">Branding</a></LI> <LI><a href="#">About</a></LI> <LI><a href="#">Get In Touch</a></LI> </UL> </NAV> ``` CSS: ``` nav { float:right;} nav ul { margin:0px; padding:0px; } nav ul li { float:left; } nav ul li { display:block; background:#ccc; padding:5px; margin-left:5px;} ```
css float right space
CC BY-SA 2.5
0
2011-02-17T17:16:04.227
2016-05-26T05:51:20.463
null
null
551,559
[ "css", "html" ]
5,033,463
1
5,033,683
null
23
26,514
I have installed all packages in cygwin. I have also added C:\cygwin\bin to my PATH variable. But when I try to compile a c++ file in command line I get the error 'Access is denied'. The same commands work in the cygwin batch window. Does anyone know what's wrong? I changed the permissions for gcc and g++. I no longer get the 'Access Denied' error, but get a new one: "This version of C:\cygwin\bin\g++.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.". ![enter image description here](https://i.stack.imgur.com/40cWP.png) ![enter image description here](https://i.stack.imgur.com/4l2YQ.png)
Get "Access is denied" when trying to compile with g++ from command line. Cygwin
CC BY-SA 2.5
0
2011-02-17T19:15:06.383
2020-03-22T20:00:40.603
2011-02-17T20:29:09.213
111,471
111,471
[ "c++", "gcc", "g++", "cygwin" ]
5,033,690
1
5,046,984
null
2
3,914
Is there any way to display controls (like buttons) on the splitter that displays between the two panels in a .NET `SplitContainer`? Example: ![Diagram](https://i.stack.imgur.com/araMv.png) I don't think `SplitContainer` natively supports this, but overriding the control to get this functionality that seems omni-present in numerous applications seems a bit much to me - I feel like I'm over-thinking this or missing something obvious.
Add button control(s) to SplitContainer Splitter
CC BY-SA 2.5
0
2011-02-17T19:37:56.397
2011-02-18T21:52:03.450
2011-02-17T19:46:29.323
18,524
18,524
[ ".net", "winforms", ".net-2.0", "splitcontainer" ]
5,033,706
1
5,037,494
null
1
173
I'd like to ask you, where can I find the system picture for "edit" like here: ![enter image description here](https://i.stack.imgur.com/tqt3T.png) Thanks!
The "edit" button pictogram
CC BY-SA 2.5
0
2011-02-17T19:39:18.347
2011-02-18T08:37:22.703
2011-02-17T19:49:19.083
1,338
184,376
[ "cocoa", "macos" ]
5,033,846
1
5,034,011
null
16
682
I have an algorithmic problem in which I have derived a transfer matrix between a lot of states. The next step is to exponentiate it, but it is very large, so I need to do some reductions on it. Specifically it contains a lot of symmetry. Below are some examples on how many nodes can be eliminated by simple observations. My question is whether there is an algorithm to efficiently eliminate symmetry in digraphs, similarly to the way I've done it manually below. In all cases the initial vector has the same value for all nodes. --- In the first example we see that `b`, `c`, `d` and `e` all receive values from `a` and one of each other. Hence they will always contain an identical value, and we can merge them. ![Digraph A](https://i.stack.imgur.com/doI8Y.png) ![Digraph B](https://i.stack.imgur.com/NAjvF.png) --- In this example we quickly spot, that the graph is identical from the point of view of `a`, `b`, `c` and `d`. Also for their respective sidenodes, it doesn't matter to which inner node it is attached. Hence we can reduce the graph down to only two states. ![Digraph C](https://i.stack.imgur.com/MPqBE.png) ![Digraph D](https://i.stack.imgur.com/2vsbS.png) --- Some people were reasonable enough not quite sure what was meant by "State transfer matrix". The idea here is, that you can split a combinatorial problem up into a number of state types for each `n` in your recurrence. The matrix then tell you how to get from `n-1` to `n`. Usually you are only interested about the value of one of your states, but you need to calculate the others as well, so you can always get to the next level. In some cases however, multiple states are symmetrical, meaning they will always have the same value. Obviously it's quite a waste to calculate all of these, so we want to reduce the graph until all nodes are "unique". Below is an example of the transfer matrix for the reduced graph in example 1. ``` [S_a(n)] [1 1 1] [S_a(n-1)] [S_f(n)] = [1 0 0]*[S_f(n-1)] [S_B(n)] [4 0 1] [S_B(n-1)] ``` --- Any suggestions or references to papers are appreciated.
Eliminating symmetry from graphs
CC BY-SA 2.5
0
2011-02-17T19:52:26.787
2012-05-20T05:45:59.963
2011-02-18T14:04:43.803
205,521
205,521
[ "algorithm", "graph", "graph-algorithm", "symmetric", "symmetry" ]
5,034,060
1
5,034,114
null
2
13,210
I am looking for the code to implement share buttons for twitter, buzz and facebook with a counter like youtube have in their share option, please see the screen shot. ![enter image description here](https://i.stack.imgur.com/lSEE0.png) I’ve been looking over some codes but none of them does exactly what I want, either it is a bit square or it is a “like count” to facebook. I hope one of you could help me with this. Sincere - Mestika
Code for sharing buttons to facebook, twitter and buzz with counter
CC BY-SA 2.5
null
2011-02-17T20:13:59.493
2013-08-06T12:03:09.700
null
null
188,082
[ "facebook", "twitter", "share", "buzz" ]
5,034,947
1
5,035,023
null
4
5,098
I'm creating a custom dialog with a background image which has rounded corners. I remove the white border using a custom style, but it's displayed as if a black rectangle of the same size was behind my image, as shown below (the background image of the dialog is the brown one): ![enter image description here](https://i.stack.imgur.com/REqne.png) How can I keep the transparent background of my image with the round corners? Layout of my dialog: ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/confirmation" android:orientation="vertical" android:background="@drawable/dialog_background" android:layout_width="279dp" android:layout_height="130dp" > ... ``` I remove the white border by applying the following style to my dialog: ``` <style name="Theme_Dialog_Translucent" parent="android:Theme.Dialog"> <item name="android:windowBackground">@null</item> </style> ``` My CustomDialog class is: ``` public class CustomDialog extends Dialog implements OnClickListener { Button okButton; public CustomDialog(Context context) { // Custom style to remove dialog border - corners black though :( super(context, R.style.Theme_Dialog_Translucent); // 'Window.FEATURE_NO_TITLE' - Used to hide the title requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.custom_dialog); okButton = (Button) findViewById(R.id.button_ok); okButton.setOnClickListener(this); } ... } ```
Issue with image having transparent background in Android
CC BY-SA 2.5
0
2011-02-17T21:34:57.263
2011-02-17T21:41:48.173
null
null
326,849
[ "android", "image", "dialog", "transparent" ]
5,034,997
1
null
null
0
1,272
Restating my question to be simpler.... I want to be able to link an Action Script event to clicking text within a text box.The only thing I can see is to just create a basic Hyper Link, but not apply any action: ![enter image description here](https://i.stack.imgur.com/pmp3u.png) I have been messing around for over an hour but just can't see a way to apply actionscript and all the tutorials on the internet seem to target ActionScript 3 or not do exactly what I want. The reason for this is that there is background music to the site and when YouTube is launched, it needs to be muted. I know the code to mute and have done this on custom objects before, but I can't see any way to apply script to a textbox hyperlink. Whilst I would ideally like to do it this way, I am happy to consider any solution resulting in opening a page and muting the site. To be honest, I tried doing a quick switch to AS3, but as there are so many problems that would need addressing, I would rather spend the time converting the site to HTML/Jquery or even Silverlight.... I just hope there is something small I have overlooked which can get this done without too many changes needed.
Event action on clicking a hyperlink from a textbox
CC BY-SA 2.5
null
2011-02-17T21:39:37.833
2011-11-05T12:19:33.873
2011-02-17T23:24:25.090
1,205,001
1,205,001
[ "flash", "actionscript", "flash-cs5" ]
5,035,040
1
5,035,122
null
5
309
I don't know how to find the place part (one of 4 triangles) of a cursor in a rectangle. This image is more efficient than my explication :s ![enter image description here](https://i.stack.imgur.com/RLqV6.png) Im in javascript (so the rectangle is a DIV, 0,0 placed) I have those varaibles : ``` var cursor_x = e.clientX + $(document).scrollLeft() var cursor_y = e.clientY + $(document).scrollTop() var rect_w = $( rectangle ).width() var rect_h = $( rectangle ).height() ``` I just want to know mathematically where is the cursor, in the triangle 1, 2, 3 or 4
Find the place of a cursor in rectangle
CC BY-SA 4.0
0
2011-02-17T21:43:27.017
2022-01-13T20:44:59.543
2022-01-13T20:44:59.543
4,294,399
538,032
[ "javascript", "jquery", "mouse-cursor" ]
5,035,031
1
5,035,161
null
0
1,798
Does anyone know if Tomcat running inside of Eclipse truly uses the `<tomcat>\bin\` directory when you've configured your server to use your local Tomcat install (Server view) inside Eclipse? For example: I'm using a colleagues jar, which subsequently requires the file. I've been instructed to place that properties file in the `<tomcat>\bin\` directory. This is sort of odd to me, but the line that fails is simply: ``` InputStream in = new FileInputStream("X.properties"); ``` Anyhow, I'm pretty sure [editing any of the Server config](http://wiki.eclipse.org/WTP_Tomcat_FAQ#How_can_I_view_or_modify_the_launch_configuration_properties_for_a_Tomcat_server.3F) files will not help me, though I'm open to any suggestions. Or perhaps there's something in my launch configuration (below) that I can change? ![enter image description here](https://i.stack.imgur.com/tsCO0.png) ``` java.io.FileNotFoundException: X.properties (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileInputStream.<init>(FileInputStream.java:66) at com.mycompany.myteam.colleaguesproject.colleaguesservlet.init(colleaguesservlet.java:93) at javax.servlet.GenericServlet.init(GenericServlet.java:212) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) ``` Any help is greatly appreciated! :-)
How can I access <tomcat>\bin\*.properties when running from inside eclipse?
CC BY-SA 3.0
0
2011-02-17T21:42:47.953
2015-09-23T14:58:37.037
2015-09-23T14:58:37.037
320,399
320,399
[ "java", "eclipse", "tomcat", "configuration", "classpath" ]
5,035,070
1
null
null
2
672
[vsinstr.exe](http://msdn.microsoft.com/en-us/library/ms182402(v=vs.80).aspx) has the option to include only the namespaces that needs to profile. With this option, I could get the vsp file. ``` cl /Zi helloclass.cpp /link /Profile vsinstr helloclass.exe /include:Fpga::* vsperfcmd /start:trace /output:trace.vsp helloclass vsperfcmd /shutdown ``` However, it still contains the `std::` namespaces. ![enter image description here](https://i.stack.imgur.com/D381o.jpg) ## ADDED I tried with /exclude:std::*, and I get way too many functions including the `std::` functions. ![enter image description here](https://i.stack.imgur.com/CISSk.jpg) What might be wrong?
Profiling only the namespaces that I need with VS2010
CC BY-SA 2.5
null
2011-02-17T21:45:43.647
2016-01-07T12:04:15.187
2011-02-17T21:58:02.840
260,127
260,127
[ "c++", "visual-studio-2010", "profiling", "profiler" ]
5,035,120
1
5,035,266
null
14
9,307
I am trying to animate the color the the text on a UILabel to pulse from: [Black] to [White] to [Black] and repeat. ``` - (void)timerFlash:(NSTimer *)timer { [[self navTitle] setTextColor:[[UIColor whiteColor] colorWithAlphaComponent:0.0]]; [UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{[[self navTitle] setTextColor:[[UIColor whiteColor] colorWithAlphaComponent:1.0]];} completion:nil]; } ``` . ``` [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timerFlash:) userInfo:nil repeats:YES]]; ``` Firstly I am not sure of my method, my plan (as you can see above) was to set up a animation block and call it using a repeating NSTimer until canceled. My second problem (as you can see above) is that I am animating from black (alpha 0) to white (alpha 1) but I don't know how to animate back to black again so the animation loops seamlessly Essentially what I want is the text color to pulse on a UILabel until the user presses a button to continue. # EDIT_001: I was getting into trouble because you can't animate [UILabel setColor:] you can however animated [UILabel setAlpha:] so I am going to give that a go. # EDIT_002: ``` - (void)timerFlash:(NSTimer *)timer { [[self navTitle] setAlpha:0.5]; [UIView animateWithDuration:2 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{[[self navTitle] setAlpha:0.9];} completion:nil]; } ``` This works (BTW: I do want it to stop which is why I hooked it up to a NSTimer so I can cancel that) the only thing is that this animates from midGray to nearWhite and then pops back. Does anyone know how I would animate back from nearWhite to midGray so I get a nice smooth cycle? ![enter image description here](https://i.stack.imgur.com/RIgcJ.png) # EDIT_003: (Solution) The code suggested by Dave DeLong (see below) does indeed work when modified to use the CALayer opacity style attribute: ``` UILabel *navTitle; @property(nonatomic, retain) UILabel *navTitle; ``` . ``` // ADD ANIMATION CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"opacity"]; [anim setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; [anim setFromValue:[NSNumber numberWithFloat:0.5]]; [anim setToValue:[NSNumber numberWithFloat:1.0]]; [anim setAutoreverses:YES]; [anim setDuration:0.5]; [[[self navTitle] layer] addAnimation:anim forKey:@"flash"]; ``` . ``` // REMOVE ANIMATION [[[self navTitle] layer] removeAnimationForKey:@"flash"]; ```
Animating a pulsing UILabel?
CC BY-SA 2.5
0
2011-02-17T21:51:15.800
2012-10-19T05:35:42.193
2011-02-22T19:18:49.400
164,216
164,216
[ "iphone", "objective-c", "cocoa-touch" ]
5,035,124
1
8,292,459
null
4
1,283
I am trying to create table using `TTTableViewController`. I want to display an image in the section header along with some caption text, something similar to what instagram and many other application does. I tried using the sample from `TTNavigatorDemo` to display data from `TTSectionedDatasource`, (I am not sure if this is the right way to do it, please suggest some better way if you know any). It contains section name/headers as regular strings and data as `TTTableViewItem`. I tried implementing `<UITableViewDelegate>` protocol and achieved it using `viewForHeaderInSection` method, now the data is separated from section, Is there any better way using [Three20](http://three20.info) through which I can pass on my Header/Section view and `TableItemView` along in a datasource as it would allow me to implement the `TTTableViewDragRefreshDelegate`, which I was not able to implement when implementing the `<UITableViewDelegate>` protocol in my class. My class declaration right now, looks something like ``` @interface ImageTable : TTTableViewController <UITableViewDelegate> { } ``` I would like to show section headers with image and text like: ![Instagram](https://i.stack.imgur.com/QN9ta.png): I am currently using the `TTNavigatorCode` to populate the data in my Table which is: ``` self.dataSource = [TTSectionedDataSource dataSourceWithObjects: @"Food" [TTTableViewItem itemWithText:@"Porridge" URL:@"tt://food/porridge"], [TTTableTextItem itemWithText:@"Bacon & Eggs" URL:@"tt://food/baconeggs"], [TTTableTextItem itemWithText:@"French Toast" URL:@"tt://food/frenchtoast"], @"Drinks", [TTTableTextItem itemWithText:@"Coffee" URL:@"tt://food/coffee"], [TTTableTextItem itemWithText:@"Orange Juice" URL:@"tt://food/oj"], @"Other", [TTTableTextItem itemWithText:@"Just Desserts" URL:@"tt://menu/4"], [TTTableTextItem itemWithText:@"Complaints" URL:@"tt://about/complaints"], @"Other", [TTTableTextItem itemWithText:@"Just Desserts" URL:@"tt://menu/4"], [TTTableTextItem itemWithText:@"Complaints" URL:@"tt://about/complaints"], nil]; ``` I was able to make something similar by implementing the method: ``` - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { return myCustomView; } ``` But since my data is coming from the Model Class and I want my generate views and add them to datasource in a formatted way. I would like to know if there is a way using Three20 through which I specify an Array of my data for sections and another array for corresponding data under the sections? Your help is highly appreciated Thanks
Add Image and Caption Text to Three20 Table section using TTSectionedDataSource
CC BY-SA 3.0
0
2011-02-17T21:51:39.247
2011-11-28T07:03:01.730
2011-08-26T01:15:25.160
264,802
417,777
[ "iphone", "objective-c", "ios", "three20", "sectionheader" ]
5,035,305
1
5,038,263
null
1
1,237
Does anybody know if there is a symbol for page connector in UML's activity diagrams? Common flowcharts have a symbol to represent that a process continues on another page such as: ![flowchart off page connector symbol](https://i.stack.imgur.com/YBIul.png) This symbol sometimes has a text in it. Thanks.
UML page connector
CC BY-SA 2.5
null
2011-02-17T22:11:29.060
2018-02-07T22:52:37.737
2018-02-07T22:52:37.737
1,677,912
535,724
[ "uml" ]
5,035,373
1
5,035,759
null
1
526
I'm trying to find the equivalent of [IsFilled="False"](http://msdn.microsoft.com/en-us/library/system.windows.media.pathfigure.isfilled(v=VS.95).aspx) that is used in a PathGeometry, but for [Path Mini](http://msdn.microsoft.com/en-us/library/cc189041(v=VS.95).aspx#abouthisdocument). ![left is Path Mini and right is PathGeometry](https://i.stack.imgur.com/aTfvE.png) You can see that the two paths below are identical, except for the one with geometries has `IsFilled="False"` in the second `<PathGeometry>.<PathGeometry.Figures>.<PathFigure>`. This is the desired behavior, but I'd like to have it for a Path Mini (i.e. in the first `<Path>`). I've looked through the documentation and can't seem to locate anything on it as it appears that Path Mini is not a collection of figures. As I understand it, all shapes/geometries will get converted to path mini at run-time, so is there some way to reflect the compiled XAML to see how the interpreter renders the one with PathGeometry to Path Mini? ``` <Canvas Background="#FDB" Width="800" Height="600"> <!-- this is the LEFT-HAND Path in the picture above --> <Path Canvas.Left="100" Canvas.Top="100" Stroke="#385D8A" StrokeThickness="2" StrokeLineJoin="Round" Fill="#4F81BD" Data="M0,0L102,0L102,102L0,102Z M46.15,49.01L-73.36,130.99L-96.42,-96.12L109.35,355.18"> </Path> <!-- this is the RIGHT-HAND Path in the picture above --> <Path Canvas.Left="300" Canvas.Top="100" Stroke="#385D8A" StrokeThickness="2" StrokeLineJoin="Round" Fill="#4F81BD"> <Path.Data> <GeometryGroup> <PathGeometry> <PathGeometry.Figures> <PathFigure StartPoint="0,0" IsClosed="True"> <PathFigure.Segments> <LineSegment Point="102,0" /> <LineSegment Point="102,102" /> <LineSegment Point="0,102" /> </PathFigure.Segments> </PathFigure> </PathGeometry.Figures> </PathGeometry> <PathGeometry> <PathGeometry.Figures> <PathFigure IsFilled="False" StartPoint="46.15,49.01"> <PathFigure.Segments> <LineSegment Point="-73.36,130.99" /> <LineSegment Point="-96.42,-96.12" /> <LineSegment Point="109.35,355.18" /> </PathFigure.Segments> </PathFigure> </PathGeometry.Figures> </PathGeometry> </GeometryGroup> </Path.Data> </Path> </Canvas> ```
Equivalent of IsFilled="false" for PathFigure in Path Mini-language (Silverlight/WPF)
CC BY-SA 2.5
null
2011-02-17T22:16:42.880
2011-02-17T22:59:00.743
2011-02-17T22:28:13.250
149,573
149,573
[ "wpf", "silverlight", "path", "pathgeometry" ]
5,035,538
1
5,036,654
null
0
271
I want that the picture that comes from the usercontrol will stratch all over the yellow background and not only in that thin line there . I have stretched every possible thing there but still i have this problem my main window ``` <Window x:Class="DBTool.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:View="clr-namespace:DBTool.View" xmlns:ViewModel="clr-namespace:DBTool.ViewModel" Title="MainWindow" Height="332" Width="528" > <Window.Resources> <!-- These four templates map a ViewModel to a View. --> <DataTemplate DataType="{x:Type ViewModel:SelectDataBaseViewModel}"> <View:SelectDataBase /> </DataTemplate> <DataTemplate DataType="{x:Type ViewModel:MySqlPageViewModel}"> <View:MySqlPageView /> </DataTemplate> </Window.Resources> <Grid ShowGridLines="True" HorizontalAlignment="Stretch" > <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*" /> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <ToolBar Grid.Row = "0" Height="26" HorizontalAlignment="Stretch" VerticalAlignment="Top" Name="toolBar1" Width="Auto" DockPanel.Dock="Top" /> <!-- <View:SelectDataBase x:Name="DetailView"/>--> <Grid VerticalAlignment="Bottom" Grid.Row = "2" HorizontalAlignment="Stretch"> <Grid.RowDefinitions> <RowDefinition/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> <ColumnDefinition/> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Button Grid.Row="0" Grid.Column="4" Background="Azure" Margin="10" Command="{Binding Path=MoveNextCommand}" >Next</Button> <Button Grid.Row="0" Grid.Column="3" Background="Azure" Margin="10" Command="{Binding Path=MovePreviousCommand}">Previous</Button> </Grid> <Border Background="Yellow" Grid.Row = "1"> <HeaderedContentControl VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" Content="{Binding Path=CurrentPage}" Header="{Binding Path=CurrentPage.DisplayName}" /> </Border> </Grid> ``` the user control ``` <UserControl x:Class="DBTool.View.SelectDataBase" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" VerticalContentAlignment="Stretch" VerticalAlignment="Stretch" d:DesignHeight="300" d:DesignWidth="300" > <UserControl.Background > <ImageBrush Stretch="UniformToFill" ImageSource="..\Resources\DBSelection.jpg" ></ImageBrush > </UserControl.Background > <Grid VerticalAlignment="Stretch"> <!--<RadioButton Content="MySQL" Height="16" HorizontalAlignment="Left" Margin="36,112,0,0" Name="radioButton1" VerticalAlignment="Top" /> <RadioButton Content="MsSQL" Height="16" HorizontalAlignment="Left" Margin="36,134,0,0" Name="radioButton2" VerticalAlignment="Top" />--> <ItemsControl FontWeight="Normal" ItemsSource="{Binding Path=AvailableBeanTypes}"> <ItemsControl.ItemTemplate> <DataTemplate> <RadioButton Content="{Binding Path=DisplayName}" IsChecked="{Binding Path=IsSelected}" GroupName="BeanType" Margin="2,3.5"/> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </Grid> ``` will be glad for any help , just cannot solve this out :-( ![My code](https://i.stack.imgur.com/4SZRB.png)
what is wrong with stretching of my usercontrol
CC BY-SA 2.5
0
2011-02-17T22:31:19.560
2011-02-18T01:18:05.667
null
null
140,100
[ ".net", "wpf" ]
5,035,708
1
5,035,751
null
0
136
I dont even know the name which I should google it, I tried genie effect, but it`s not actually a genie effect! If someone has an link how to do this in flex,flash, pixel bender, will help a lot as well, or just the name of the animation will help too. ![animation](https://i.stack.imgur.com/hMOyS.png)
Someone know the name of that animation?
CC BY-SA 2.5
null
2011-02-17T22:53:23.997
2011-07-21T23:37:46.037
null
null
534,150
[ "flash", "actionscript-3", "animation", "pixel-bender" ]
5,035,737
1
null
null
1
160
As I am new to socialengine4 so i am having trouble in designing custom template. I want to convert HTML/CSS template into Socialengine4 module. Example: ![enter image description here](https://i.stack.imgur.com/iEd2C.jpg) Suppose this is the template and i want to design it into socialengine4. 1. how can i create custom layout like above template ? 2. How can i create custom common page elements like header, footer ? What are the directory structure as well as file structure to get above two points. I need to create it manually not from the layouts provided default in Admin panel.
how to design custom template in socialengine4 framework?
CC BY-SA 3.0
0
2011-02-17T22:56:58.547
2015-02-05T10:46:17.810
2011-12-23T17:23:37.430
184,184
445,646
[ "php", "zend-framework", "themes" ]
5,035,993
1
null
null
0
482
I set up diffuse lighting: ``` private float[] lightAmbient = { 0.5f, 0.5f, 0.5f, 1.0f }; private float[] lightDiffuse = { 1.0f, 1.0f, 1.0f, 1.0f }; private float[] lightPosition = { 0.0f, 0.0f, 2.0f, 1.0f }; gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_AMBIENT, lightAmbientBuffer); gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_DIFFUSE, lightDiffuseBuffer); gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, lightPositionBuffer); gl.glEnable(GL10.GL_LIGHT0); gl.glShadeModel(GL10.GL_SMOOTH); ``` But I get triangulated shading or flat color on the cube located at origin ( center) and rotated 45 deg around x and y. So the cube is directly in front of the light. Any reasons why I am getting such poor results? Attached is the cube image. ![enter image description here](https://i.stack.imgur.com/rbbAJ.jpg)
Poor shading problem in Android OpenGL ES
CC BY-SA 2.5
null
2011-02-17T23:25:02.173
2011-06-01T17:49:15.517
2011-02-18T10:06:28.767
574,122
574,122
[ "android", "opengl-es" ]
5,036,108
1
5,037,081
null
3
8,830
I'd like to display Day (Percentage) eg Fri (22%) on the chart Can do each individually: Series Label Properties, Label data: #PERCENT{p0} or: =Fields!DayOfWeek.Value How to display both? ![enter image description here](https://i.stack.imgur.com/xDgTV.png)
SSRS Charting - Display Legend and Percent
CC BY-SA 2.5
null
2011-02-17T23:42:29.657
2015-06-17T03:43:52.780
null
null
26,086
[ "reporting-services", "reportviewer", "charts" ]
5,036,398
1
5,036,472
null
1
3,612
I am interested in seeing if I can use the `:before` pseudo-element on a `<a href` wrapped around a `<button>` element? Currently, Firefox shows a thin blue line behind the `<button>` element - this is due to it being wrapped in an `<a href`. If I use an within the `<a href` the line goes away: ``` <a href="#" style="text-decoration:none;"><button> ``` However, since I have `<button>` elements on multiple pages, I want to target them using if possible (and I don't particularly want to go and add a class to all the `<a href` that are wrapping the `<button>`'s on the site). This is where I was thinking the `:before` pseudo-element would come in handy but it doesn't seem to work: ``` a:before button{ text-decoration:none !important; } ``` This is how the `<button>`'s display in Firefox, see the blue default text-decoration applied to the `<a href`. The reason it is showing up only on the right hand side is because a class of `margin-left:5px` is applied to the `<button>` element: ![enter image description here](https://i.stack.imgur.com/Ney7n.png) Here's a basic version of the buttons up on jsfiddle (ignore slight appearance differences): [http://jsfiddle.net/Vtjue/2/](http://jsfiddle.net/Vtjue/2/) Any ideas?
Using :before pseudo-element on '<a href' that is wrapping a <button> element - can it be done?
CC BY-SA 3.0
null
2011-02-18T00:24:39.137
2011-11-10T03:49:24.583
2011-11-10T03:49:24.583
106,224
605,812
[ "html", "css", "button", "css-selectors", "pseudo-element" ]
5,036,477
1
5,037,157
null
1
236
I successfully followed instructions on getting a Three20 photo gallery created. However, when I click a thumbnail it behaves like the native Photo App. Is this functionality easily overridden? When I click the thumbnail I want to produce a view like the image below. ![Desired View after clicking on thumbnail](https://i.stack.imgur.com/pLq71.png)
Which Three20 view should I use after a thumbnail is clicked to produce an Instagram look?
CC BY-SA 2.5
null
2011-02-18T00:36:16.043
2011-02-18T02:46:56.260
null
null
415,469
[ "iphone", "objective-c", "three20" ]