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,319,461
1
null
null
3
1,993
I am using IIS7 and all our files are served through HTTPS. While looking at the Waterfall View (WebPageTest), I noticed that it takes a some time to do the SSL negotiations for each file. Is there a way I can configure the server or increase timeout for the SSL or TCP connection in IIS 7.0 or Windows so that the browser uses the initial SSL negotiation to make subsequent requests for all the files on that page or during a user's session? I would appreciate your help. ![enter image description here](https://i.stack.imgur.com/HZCXj.png)
How to avoid making multiple SSL negotiations when using IIS
CC BY-SA 2.5
null
2011-03-15T23:56:42.597
2012-07-25T18:41:27.677
2012-02-19T10:02:52.527
21,234
4,957
[ "browser", "ssl", "iis-7", "httpresponse" ]
5,319,711
1
5,320,346
null
18
23,288
I'm trying to arrange a WPF UI as follows: ![Mock up](https://i.stack.imgur.com/MAkNJ.png) 1. At top of the window are some controls of self-determining height (effectively docked to the top of the window, but as tall as they want to be). 2. Beneath those controls is a ListView. The ListView may contain a variable number of items each of varying height. The problem: The ListView mustn't be taller than it needs to be. If all the items in the list view will easily fit into the window, I want the ListView to be exactly the height to show all its items (so the window looks like a web page's flowing layout with blank space at the bottom). On the other hand if all ListView items won't fit into the window, I want the whole UI to fit to the window (as if number 3 below was docked to the bottom of the window, and the ListView was filling the available space). This all has to adjust dynamically as the user resizes the window and/or presses buttons which change the list view's contents. 3. Beneath the ListView are some more controls of self-determining height. These must appear directly under the ListView at all times, with no gap. In particular they mustn't just dock to the bottom of the window if they'll fit directly under the ListView. Solutions would be very welcome; I've fiddled for some time and managed to get things working the controls beneath the ListView, by using an outer DockPanel in the window with the first controls docked to the top, and the ListView filling the remaining space but set to VerticalAlignment="Top". A pure XAML solution would be ideal, but I don't mind code behind if it's unavoidable. Bonus points for a solution which allows multiple such arrangements to be stacked vertically :) Thanks for any help!
How to make a WPF ListView no taller than its contents but fit to the window with other controls?
CC BY-SA 2.5
0
2011-03-16T00:33:46.537
2014-02-27T11:22:48.600
2011-03-16T01:02:13.887
58,063
58,063
[ "wpf", "listview", "wpf-controls", "autoresize", "docking" ]
5,320,161
1
5,320,191
null
0
148
Here I have a dom tree parsed from a html page. I want to select a node in the tree, and highlight its corresponding area in the web page (just like google chrome does, illustrated in the image below). Is there any javascript code to implement this? I tried to wrap the selected tag with a tag, but there are some cases it didn't work. What I need is a general way. Any suggestion would be helpful. Thank you! ![enter image description here](https://i.stack.imgur.com/KKAik.jpg)
Is there a javascript code to locate and highlight a block in a web page corresponding to its dom tree node?
CC BY-SA 2.5
null
2011-03-16T01:49:34.097
2011-03-16T01:54:23.807
null
null
87,955
[ "javascript", "dom" ]
5,320,176
1
8,055,877
null
1
5,204
I'm attempting to open some database files used by a legacy application that I know almost nothing about. The databases appear to be in file pairs of a and , for example: and . I have never seen this type of database before and wasn't able to find anything useful through Google. I also don't know what language or tool the developer used for this app, but it seems that he used the default generic icon for his published executable. This is it: ![Programs Icon](https://i.stack.imgur.com/sUli8.png) Can anyone tell me anything about this application, what type of database it uses and how I might open the database myself?
How do I open .bin/.idx database files?
CC BY-SA 2.5
null
2011-03-16T01:52:16.240
2011-11-08T19:19:06.943
null
null
32,226
[ "windows", "database" ]
5,320,475
1
null
null
0
6,739
We have ERP application that store the data to ORACLE database. And also we have a lot of another application that use the ERP database. Same database but different instances. We got the performance issues when ERP and another application use the same database. We are planning to separate the database server become three. One for ERP and two others for report and applications. these new database servers are came from ERP database, because they use the same database structure and data. So we could say these new database servers are mirror of ERP database. And also sometime data on the mirror database could be updated by other application, and it should be also updated on ERP database. What best practice and method should be used for mirroring this condition? Is it enough by use Data guard from ORACLE? This is the picture of the architecture plan. ![enter image description here](https://i.stack.imgur.com/lEsrk.jpg)
Oracle database mirroring
CC BY-SA 2.5
null
2011-03-16T02:43:00.167
2020-03-27T22:03:20.543
2013-09-21T02:19:53.233
729,907
436,498
[ "database", "oracle", "database-administration" ]
5,320,622
1
5,327,390
null
0
579
Here is an image of the relationship I am debating: ![Core Data Setup](https://i.stack.imgur.com/dpJzs.jpg) I have a UIScrollView setup as a horizontal scroller that scrolls between 3 different UIViewControllers (containing a UITableView of course and the required delegate methods, etc.) Each ViewController in the UIScrollView loads a UITableView of a specific . (E.g. ViewController1 loads a tableview of all where its == ) Does this make sense? You'll notice I've setup an inverse relationship between the objects. A can have many 's but a can only have a single associated to it. When I first load one of the UIScrollView viewController's I need to determine what this UITableView is for. I have this working fine and I set the Table Header accordingly. E.g. `[type valueForKey:@"name"]` where is a fetched result NSManagedObject of . The thing is I'm wondering, when I obtain this NSManagedObject of do I not also have access to a NSSet *array (ie. `[type valueForKey:@"objects"]`) which I can use as the UITableView's datasource? Would this work if after I or an object I the managedContext and then I always `[tableView reloadData]` ? I'm guessing this would work, as long as I don't require the UITableView content to change and update dynamically as new of this type are added? For this we require a NSFetchedResultsController right? Here is my code for loading MyObject's into a UITableView (which works): ``` - (NSFetchedResultsController *)fetchedResultsController { if (_fetchedResultsController != nil) { return _fetchedResultsController; } NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"MyObject" inManagedObjectContext:managedObjectContext]; [fetchRequest setEntity:entity]; NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"creationDate" ascending:NO]; [fetchRequest setSortDescriptors:[NSArray arrayWithObject:sort]]; [fetchRequest setFetchBatchSize:20]; NSFetchedResultsController *theFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:@"transientSectionDate" cacheName:@"Root"]; self.fetchedResultsController = theFetchedResultsController; _fetchedResultsController.delegate = self; [sort release]; [fetchRequest release]; [theFetchedResultsController release]; return _fetchedResultsController; ``` } Could someone PLEASE be as so kind to show my what actual declaration I need to correctly load MyObject's whose == ? Let's assume I already have a stored in a retained NSString inside the ViewController. Thanks in advance!
NSFetchResultsController w/ NSPredicate (relationship) vs. Basic NSFetchRequest (Pic Included)
CC BY-SA 2.5
null
2011-03-16T03:09:16.657
2011-03-16T15:14:34.123
2011-03-16T08:04:03.387
603,977
312,411
[ "iphone", "cocoa", "core-data", "nsfetchedresultscontroller", "nspredicate" ]
5,320,966
1
null
null
4
4,244
Using the Google Maps Static Map API, I'm able to enter a location and retrieve a single composited image at a specified zoom level. I'm interested in adding a dynamic scrolling/zooming interface — how can I use the Google Maps API to retrieve individual map tile images around a specified location and zoom level? For example, if I use a DOM inspector when visiting [http://maps.google.com/](http://maps.google.com/), I can pick out a 256x256 tile image such as this: ![https://mts1.google.com/vt/x=2227&y=3120&z=13](https://i.stack.imgur.com/LgzQ7.png) [https://mts1.google.com/vt/x=2227&y=3120&z=13](https://mts1.google.com/vt/x=2227&y=3120&z=13) How can I calculate values for the `x` and `y` parameters in that URL?
How to retrieve individual tile images using Google Maps API?
CC BY-SA 3.0
0
2011-03-16T04:13:55.147
2014-03-21T15:46:48.130
2013-01-27T06:29:59.010
64,860
64,860
[ "google-maps", "rest" ]
5,321,252
1
5,321,412
null
5
11,499
I have 2 ImageButons like this ![enter image description here](https://i.stack.imgur.com/cKEEb.png) I have tried everything to make it align properly in center of screen. As being new to android i don't have any other clues of what to do. How can i achieve my goal of aligning these 2 Imagebuttons in center of screen This is my layout xml ``` <TableLayout android:id="@+id/TableLayout01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1"> <TableRow android:id="@+id/TableRow01" android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageButton android:id="@+id/btn_Show" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Show" android:src="@drawable/cmd_result_show" android:layout_gravity="right" android:background="@android:color/transparent" /> <ImageButton android:id="@+id/btn_showAll" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Detailed Show" android:layout_gravity="center" android:src="@drawable/cmd_result_details" android:background="@android:color/transparent" /> </TableRow> </TableLayout> ```
Android: Center align ImageButtons
CC BY-SA 3.0
null
2011-03-16T05:02:02.023
2013-07-22T04:52:07.213
2013-07-22T04:52:07.213
521,364
661,847
[ "android", "android-layout", "imagebutton", "tablelayout" ]
5,321,374
1
null
null
0
619
I designed a small camera application, in which I rotated and translated camera overlayview in order to fix in desired position, it worked fine , ![enter image description here](https://i.stack.imgur.com/lmHtQ.png) when i updated to ios 4.3 it didnt worked, initially, it displays transformed view after few seconds the view changed to portrait . ![enter image description here](https://i.stack.imgur.com/G7xiw.png) I did not understand what went wrong.., Please help me..
cameraoverlayview not transformed in updated version ios4.3
CC BY-SA 2.5
null
2011-03-16T05:20:15.357
2011-03-19T05:38:22.497
2011-03-17T05:50:36.007
485,050
485,050
[ "iphone", "ios", "uiimagepickercontroller" ]
5,321,515
1
null
null
2
1,596
Hello all i have created an application in VS 2008 using QT plugin & its is working fine in all the windows systems. But when I try to run the same application in XP it is showing error :: Procedure entry point xxx could not be located in xxx.dll . How can I solve this problem. ![enter image description here](https://i.stack.imgur.com/jwMSj.png)
QT application build in VS 2008 is not working in XP
CC BY-SA 2.5
0
2011-03-16T05:47:04.947
2011-03-17T04:27:24.740
null
null
585,387
[ "windows", "visual-studio-2008", "qt", "windows-7", "windows-xp" ]
5,321,539
1
null
null
1
1,168
I created a TabActivity ... and in the first tab, I call the class 'input' I use ActivityGroup .. this example when I call the class 'input' ``` TabGroupActivity parentActivity = (TabGroupActivity)getParent(); Intent intent = new Intent(getParent(), Input.class); parentActivity.startChildActivity("Input", intent); ``` Within the child activity, I made ​​a edittext. This example image of what I mean ... ![enter image description here](https://i.stack.imgur.com/f8lEs.png) But when I enter text, and a virtual keyboard out ... virtual keyboard does not appear above the tabs, but he pushed the tab above the virtual keyboard .. This example image is what I mean ... ![enter image description here](https://i.stack.imgur.com/igXGT.png) see image above, tab above the virtual keyboard .. This happens if I do it in the child activity group .. if I put edittext on the main tab. everything went smoothly .. I need a solution about a problem that I can ... Kind Regards, Vootsugu
Bugs TabActivity in Child ActivityGroup
CC BY-SA 2.5
0
2011-03-16T05:50:28.377
2012-04-04T06:05:05.377
2011-03-16T06:01:51.393
430,280
430,280
[ "android", "tabactivity", "activitygroup" ]
5,321,970
1
5,322,455
null
5
14,004
I want to see the interfaces of an ".ocx" file. Like this: ![enter image description here](https://i.stack.imgur.com/1Nqio.jpg) But for some .ocx, I can only see 5 functions, Like this: ![enter image description here](https://i.stack.imgur.com/nOzAb.jpg) The question is: How can I see the interfaces of these ocx file. I have try this: A. a) I want register it and see it in visual studio. But when I register it, an error appears "LoadLibrary(path:\filename.ocx) failed". Like this: ![enter image description here](https://i.stack.imgur.com/V7io6.jpg) b) Then I used 'Dependency Walker' open the ocx, found the file dependences no DLL files . ![enter image description here](https://i.stack.imgur.com/Un3PN.jpg) c) How can I register it? B. I use "Dll Export Viewer" and now I can see the function's name but still can not get the function's parameters. How can i get the parameters of a function?
How can I see the interfaces of a ocx file?
CC BY-SA 2.5
0
2011-03-16T06:57:20.317
2011-03-16T12:10:52.920
2011-03-16T07:35:26.130
581,117
581,117
[ "windows", "visual-c++", "com", "ocx" ]
5,322,031
1
5,327,720
null
3
4,301
How does one deal with negative disparity values when they are to be mapped onto gray scale?I try to match the left image pair with the right one and lot of the times negative values show up.Currently I normalize them to 0-255(8 bit image)! ![enter image description here](https://i.stack.imgur.com/Rj5m1.jpg) ![enter image description here](https://i.stack.imgur.com/qtNDS.jpg)
Negative Disparity Values?
CC BY-SA 2.5
null
2011-03-16T07:05:21.640
2011-03-17T00:27:46.600
2011-03-16T18:12:02.730
592,667
592,667
[ "image-processing", "opencv", "computer-vision", "stereo-3d" ]
5,322,220
1
5,322,552
null
0
347
I have a page like this ![enter image description here](https://i.stack.imgur.com/aFOP3.jpg) In my `SQL`, I want calculate some value between these days And this is my code; ``` strQuery = @"SELECT B.HESAP_NO, A.TEKLIF_NO1 + '/' + A.TEKLIF_NO2 AS 'TEKLIF', B.MUS_K_ISIM, CONVERT(VARCHAR(10),A.ISL_TAR,103) AS 'TARIH', SUM(ISNULL(CAST(A.ODENEN_ANAPARA AS FLOAT),0)+ISNULL(CAST(A.FAIZ AS FLOAT),0)+ ISNULL(CAST(A.BSMV AS FLOAT),0)+ISNULL(CAST(A.GECIKME_FAIZ AS FLOAT),0)+ ISNULL(CAST(A.GECIKME_BSMV AS FLOAT),0)) AS 'YATAN', (CASE WHEN B.DOVIZ_KOD = 21 THEN 'EUR' WHEN B.DOVIZ_KOD = 2 THEN 'USD' WHEN B.DOVIZ_KOD = 1 THEN 'TL' END) AS 'KUR', D.AVUKAT, (CASE WHEN D.HESAP IN (SELECT T_HESAP_NO FROM TAKIP) THEN (SELECT ICRA_TAR FROM TAKIP WHERE T_HESAP_NO = D.HESAP) ELSE ' ' END) AS 'ICRA TARİHİ', (CASE WHEN D.HESAP IN (SELECT T_HESAP_NO FROM TAKIP) THEN (SELECT HACIZ_TAR FROM TAKIP WHERE T_HESAP_NO = D.HESAP) ELSE '' END) AS 'HACİZ TARİHİ' FROM YAZ..MARDATA.BIR_TAHSIL A, YAZ..MARDATA.S_TEKLIF B, AVUKAT D WHERE A.TEKLIF_NO1 = B.TEKLIF_NO1 AND A.TEKLIF_NO2 = B.TEKLIF_NO2 AND B.HESAP_NO = D.HESAP AND A.HESAP_NO = D.HESAP "; if (txtBoxText1 != "") { strQuery = strQuery + " AND A.ISL_TAR >= @S_TARIH_B"; dt_stb = DateTime.Parse(txtBoxText1); myCommand.Parameters.AddWithValue("@S_TARIH_B", dt_stb); } if (txtBoxText2 != "") { strQuery = strQuery + " AND A.ISL_TAR <= @S_TARIH_S"; dt_sts = DateTime.Parse(txtBoxText2); myCommand.Parameters.AddWithValue("@S_TARIH_S", dt_sts); } strQuery = strQuery + " GROUP BY B.HESAP_NO, A.TEKLIF_NO1 + '/' + A.TEKLIF_NO2,A.ISL_TAR,B.DOVIZ_KOD ,B.MUS_K_ISIM, D.AVUKAT, D.HESAP"; ``` And this is my `Function`; ``` ALTER FUNCTION [dbo].[fngcodeme] ( @HESAP INT,@BAS DATE, @BIT DATE,@DOV INT ) RETURNS FLOAT AS BEGIN RETURN( SELECT SUM(TUTAR) FROM YAZ..MARDATA.M_GHAREKET WHERE TEMEL_HESAP = @HESAP AND DOVIZ_KOD = @DOV AND REF_KOD = 'GC' AND BACAK_GRUP = 'PERT' AND ISL_KOD = 1 AND ISL_TAR >= @BAS AND ISL_TAR <= @BIT ) END ``` What I want getting a value in this code with this function. `@BAS` is Start Date, `@BIT` is End Date How can I associate `@BAS with Textbox1` and `@BIT with Textbox2` ?
Two Dates Parameters in SQL Function
CC BY-SA 2.5
null
2011-03-16T07:30:32.257
2011-03-16T08:47:40.520
2011-03-16T08:47:40.520
573,261
447,156
[ "c#", "asp.net", "sql", "sql-server", "function" ]
5,322,288
1
5,322,297
null
7
35,589
I have below HTML in my web page: ``` Forum <ul> <li> Stack</li> <li> OverFlow</li> </ul> ``` And as you could see below, I get the items listed perfectly, but there is a fixed gap between `<UL>` and `<LI>` elements. ![HTML Output](https://i.stack.imgur.com/zUab5.gif) Is there a way, I can reduce this gap? i.e. gap between "Forum" and "Stack" text in attached screen?
Reduce Gap between HTML <UL> and <LI> elements
CC BY-SA 2.5
0
2011-03-16T07:38:29.220
2021-10-24T14:32:14.617
null
null
411,540
[ "html", "css", "xhtml" ]
5,322,425
1
null
null
0
2,911
I am using Graph API and using stream.publish, it was previously working fine but now when I separate JS in a js file then I am passing CANVAS URL as an argument to javascript function, following is my code: ``` function feedPublish(message,image,canvasURL){ var attachment = {'media':[{'type':'image','src':image,'href':canvasURL}]}; var action_links= [{ 'text':"Music Mood", 'href': canvasURL }]; message="I am in mood of "+message; FB.ui({'method':'stream.publish','message':message, 'attachment':attachment, 'action_links':action_links }, function(response){ } ); } function publishMessage(message,canvasURL){ var emo_id='id_'+$('emoction').val(); var emo_image=$('#'+emo_id+' img.emoction_image').attr('src'); feedPublish(message,emo_image,canvasURL); } ``` then from html I am calling function publish Message on click here: ``` publishMessage('Gimme More (The Legendary Ms. Britney Spears)','http://apps.facebook.com/musicmood'); return false; ``` And getting the following error that is in screenshot![enter image description here](https://i.stack.imgur.com/uKGW8.png): So I am unable to understand problem, any idea that what's the problem or how can I fix that?
Problem in facebook graph API stream.publish
CC BY-SA 2.5
null
2011-03-16T07:58:11.740
2012-04-20T06:44:33.687
null
null
513,302
[ "facebook", "facebook-graph-api", "facebook-iframe" ]
5,322,516
1
null
null
0
101
I have a MySQL table as following image shows: ![enter image description here](https://i.stack.imgur.com/GJAEv.jpg) Now I want to select the data by keeping the `type`=2 always on the top, like this: ![enter image description here](https://i.stack.imgur.com/PrpFW.jpg) How can I implement this using one SQL statement?
Is possible to keep rows matching a condition always on top in MySQL
CC BY-SA 2.5
null
2011-03-16T08:11:31.540
2011-03-16T08:19:13.503
null
null
263,255
[ "mysql", "select" ]
5,322,562
1
5,322,662
null
0
277
I want to get a animation clipping image effect but I don't know how. This don't work. ``` #img { background: url('i1.jpg'); width: 0; height: 0; } <a href="#">link</a> <div id="img"></div> $(function(){ $('a').click(function(){ $('img').animate({ width: '+=300px', height: '+=212px' }); }); }); ``` ![enter image description here](https://i.stack.imgur.com/i51LQ.jpg) Any clues?
Animation clipping image
CC BY-SA 2.5
null
2011-03-16T08:15:53.143
2011-03-16T08:28:14.297
2011-03-16T08:28:14.297
599,693
599,693
[ "jquery" ]
5,322,617
1
5,323,473
null
0
327
I would like to display the selected stored procedure information not executing or some other kind. I will have my list of stored procedures displayed on the form where the user can select the required and if click on Generate button i would like to display the text of that stored procedure as it is on the web form Sample Image![enter image description here](https://i.stack.imgur.com/1143X.png)
Display the stored procedure on a form on button click
CC BY-SA 2.5
null
2011-03-16T08:22:52.097
2011-03-16T09:48:04.523
null
null
388,388
[ "asp.net", "sql-server-2005" ]
5,322,721
1
5,326,352
null
0
444
I think this is a little problem for you. So I hope it would not waste your time too much. I built a Facebook Application with Adobe Flex by using [facebook-actionscript-api](http://code.google.com/p/facebook-actionscript-api/). In production, they use [SWFObject](http://code.google.com/p/swfobject/) for embed Flash content in HTML page. The problem is, it looks like SWFObject have a problem with FireFox and some browser. So even I set my application's height to 1000px, the Facebook clipped my Flash content to its minimum size. sometime it shows scroll bar. ![enter image description here](https://i.stack.imgur.com/3LpTu.jpg) Do you have any suggestion, or workaround on this problem?
How to solve clipped FB.ui with SWFObject on Facebook Application?
CC BY-SA 2.5
null
2011-03-16T08:34:36.773
2011-03-16T13:56:41.027
null
null
95,974
[ "flash", "apache-flex", "facebook", "firefox", "swfobject" ]
5,322,712
1
5,323,389
null
3
1,694
I have a SQL Server database and I need to manually do an update query. There for no solutions using any programming language can be used.(stored procedures can be used) I have 4 tables affected (/used) in the query. - - - - I need to update the field [Orders].[OrderStatusID] which is a foreign key to [Statuses]. (So actually changing the state of the order. The table [StatusHistoryForOrder] is a linking table to [StatusHistory] and only contains 2 colums. - - Don't say that this is not logically cause I already know that. The company who designed the database is a complete retarded company but the database is now too large to set things straight and there is neither the time or money to do it. The [StatusHistory] table has multiple columns: - - - - The [StatusHistory].[OrderStatusId] is also a foreign key to [Statuses]. In the update query I need to update the status of the order to status 16. But only on rows that now have status 1 and are older then 60 days. I know I can check the date by using the function ``` DATEDIFF(DD,[StatusHistory].[Date],GETDATE()) > 60 ``` But how to implement this query if the date field is not in the orders. And to set the new [StatusHistory] a new row has to be made for that table and the [StatusHistoryForOrder] table also needs a new row and the ID of that row needs to be set in the [Orders] table row. Does anyone know how to do this? I am fairly new to SQL Server (or SQL for that matter) and I have absolutly no clue where to begin. Conclusion: I need a stored procedure that first checks every row in [Orders] if the [StatusHistory].[Date] (which is linked to the order using foreign keys) of that order is older that 60. If it is older then a new StatusHistory row must be inserted with the current date and status 16. Then in [StatusHistoryForOrder] a new row must be inserted with the new ID of the statusHistory been set in [StatusHistoryForOrder].[OrderStatusHistoryid] and the order id set in [StatusHistoryForOrder].[OrderId]. And last but not least: The [Orders].[OrderStatusID] also needs to be set to 16. --- A select query to select the date and status of the order: ``` SELECT TOP (100) PERCENT dbo.Orders.OrderID, dbo.Statuses.Description AS Status, dbo.StatusHistory.Date FROM dbo.Orders INNER JOIN dbo.Statuses ON dbo.Orders.OrderStatusID = dbo.Statuses.StatusId INNER JOIN dbo.StatusHistoryForOrder ON dbo.Orders.OrderID = dbo.StatusHistoryForOrder.OrderId INNER JOIN dbo.StatusHistory ON dbo.StatusHistoryForOrder.OrderStatusHistoryid = dbo.StatusHistory.OrderStatusHistoryId WHERE (dbo.Statuses.StatusId = 1) AND (DATEDIFF(DD, dbo.StatusHistory.Date, GETDATE()) > 60) ``` --- For @marc_s: ![Column info](https://i.stack.imgur.com/QOhp4.png) --- Can anyone help me with that?
SQL Server UPDATE with WHERE spanning over 2 tables
CC BY-SA 2.5
null
2011-03-16T08:32:40.863
2011-03-16T17:21:51.717
2011-03-16T12:13:16.590
637,425
637,425
[ "sql-server", "stored-procedures", "sql-server-2008-r2" ]
5,322,840
1
5,978,662
null
0
100
I have a GWT Application, which loads fine if the device is hold in landscape. If I turn it to portrait-mode the application will fail to load. A SyntaxError: Parse error is shown in the console of the browser. If I reload the app, it load fine. ![Screenshot of the console.log](https://i.stack.imgur.com/g7p73.png) I am using gwt 2.2. I am not sure, if the bug appeard in GWT 2.1.1. What can cause the mobile safari to fail loading the *.nocache.html only in portrait-mode and only sometimes?
Why could the loading of a GWT-App lead to an Parse error, if loaded at an iOs Device in Portrait mode?
CC BY-SA 2.5
0
2011-03-16T08:46:26.060
2011-05-12T13:25:57.523
null
null
233,792
[ "iphone", "ipad", "gwt", "ios4" ]
5,323,161
1
5,323,368
null
0
717
I have done the following: 1. Created ContractInterface in ContractProject 2. Created WCFServiceClass in WCFServiceProject which implements ContractInterface with all needed connection definitions: ![enter image description here](https://i.stack.imgur.com/vt112.png) 1. Created ClientProject with all the needed wrappers 2. Created ConsoleApplication in same solution with all connection definitions and programm which creates client and invokes the wrapper methods. 3. Ran the Console application with Visual studio 2010 like this: a. Start Service application b. ConsoleApplication and it works just fine. 4. Then I created Excel addin in different solution and referenced ContractProject and Client project with same connection definitions as previous Console application which worked: ![enter image description here](https://i.stack.imgur.com/VkrXk.png) 1. Ran the addin in Visual Studio 2010 like this: a. Start Service application in one instance of Visual Studio 2010 b. Start Addin in different instance of Visual Studio And I had a following massage: ![enter image description here](https://i.stack.imgur.com/4OHac.png) Can you please tell me what do i do wrong?
Trying to create WCF client in Visual Studio 2010
CC BY-SA 2.5
null
2011-03-16T09:21:34.010
2011-03-16T09:49:09.637
2011-03-16T09:49:09.637
13,302
520,535
[ "c#", "wcf", "visual-studio-2010" ]
5,323,359
1
null
null
5
8,041
I am trying to insert data in an Oracle table by using ODP.NET from a C# application, but I am getting an error for a column in which I am NOT inserting a null value. This is the stripped down version of the parametrized SQL command I am trying to execute. It is wrapped in an `OracleCommand` and executed with an invokation of `ExecuteNonQuery`: ``` declare c int; begin select count(*) into c from "Entradas" where "Id" = :Id and nvl("AppId", 0) = nvl(:AppId, 0); if c>0 then update "Entradas" set /*...a bunch of columns...*/, "VisitaLaboral" = :VisitaLaboral, /*...some more columns...*/ where "Id" = :Id and nvl("AppId",0) = nvl(:AppId, 0); else insert into "Entradas" ( /*... a bunch of columns...*/, "VisitaLaboral", /*...some more columns...*/ ) values ( /*...a bunch of values...*/, :VisitaLaboral, /*...some more values...*/ ); end if; end; ``` The row does not exist previously so it is the `insert` part of the command the one that is executed. Of course I have verified that all the column names and column value parameters are properly placed in the SQL text. The problem is in the `VisitaLaboral` column. It is of type NUMBER(1,0), it does not accept NULLs, and I am trying to insert a value of 0. This is what Visual Studio displays about the associated `OracleParameter` immediately before the command execution: ![enter image description here](https://i.stack.imgur.com/Ry1IA.png) However if I execute the command directly in Application Express (providing the values directly in the command text), it works fine and the row is inserted. So, what is happening here? Is there a bug in the ODP.NET library, or am I doing something wrong? Additional information: - - - Thank you in advance! Everything works fine if I use the (deprecated) `System.Data.OracleClient` classes instead of ODP.NET. WTF, Oracle? No, really, WTF?
ORA-01400 can't insert null value... but I am NOT inserting null value!
CC BY-SA 2.5
null
2011-03-16T09:39:18.697
2011-05-12T05:19:01.137
2011-05-12T05:19:01.137
135,152
4,574
[ "oracle", "odp.net", "oracle-xe", "ora-01400" ]
5,323,457
1
5,324,880
null
1
5,696
i just installed visual studio 2010 sp1 and i thought asp.net mvc3 came along with that ![enter image description here](https://i.stack.imgur.com/Mp7J9.png) but when i go to create a new project i only see asp.net-mvc2 . am i missing something? ![enter image description here](https://i.stack.imgur.com/kaltp.png)
i just installed visual studio 2010 sp1 but i dont see asp.net mvc 3?
CC BY-SA 2.5
null
2011-03-16T09:46:36.097
2011-03-16T15:23:24.147
null
null
4,653
[ "visual-studio-2010", "asp.net-mvc-3" ]
5,323,529
1
null
null
8
17,094
I'm using `XCode 4` and `iOS SDK 4.3.` My debugging worked fine but now i discovered that when setting a breakpoint, the app pauses but XCode doesn't focus on the line in the Editor. Also the green arrow is not displayed when hitting the break point. I have a `UINavigationController` which is allocated in the `AppDelegate`. When i set a breakpoint in the `didFinishLaunchingWithOptions` everything works as expected: ![enter image description here](https://i.stack.imgur.com/2I3CO.png) This is when i a breakpoint has paused the app in the mapViewController which is the first item added to the navigation controller. (No green arrow but app is paused): ![enter image description here](https://i.stack.imgur.com/74x39.png) I really have no clue why debugging is working in AppDelegate but not in this controller. If you need additional info or screenshots in order to help me, please tell me. Now it's even not working in `AppDelegate` and changed nothing. I can also step through the lines and can see that values are assigned in the Locals and can therefore guess where the app is currently in the code. So obviously everything works, just the currently executed line is not marked as it should.
iOS: Debugging not working in XCode
CC BY-SA 3.0
null
2011-03-16T09:52:12.140
2014-02-06T12:40:32.540
2012-10-20T14:23:46.313
617,801
662,228
[ "xcode", "debugging", "ios" ]
5,323,561
1
null
null
2
1,193
![enter image description here](https://i.stack.imgur.com/VtqL7.png) I drew the line above with a graphics program but the form itself is being created with this code: ``` var form_customer_contact = new Ext.FormPanel({ frame:true, labelWidth: 140, labelAlign: 'left', bodyStyle:'padding:10px', width: 300, height: 600, autoScroll: true, itemCls: 'form_row', defaultType: 'displayfield', items: [{ fieldLabel: 'Customer Contact', name: 'customerContact', allowBlank:false, value: 'Mr. Smith' }, createCombo('Reason for Contact', 'reason', ['data correction', 'new contact', 'missing information']), createCombo('Result', 'result', ['new data', 'old data', 'other data']), createCombo('Communication', 'communication', ['telephone', 'fax', 'e-mail']), createCombo('Related Order', 'relatedOrder', ['345234534','3453453452', '2234234234']) , { fieldLabel: 'Date', xtype: 'datefield', name: 'theDate', format: 'd.m.Y', width: 150, id: 'theDate', vtype: 'daterange' }, { fieldLabel: 'Time', xtype: 'timefield', name: 'theTime', format: 'h:i:s', width: 150, id: 'theTime' },{ fieldLabel: 'Notes', name: 'relatedOrder', value: 'These are the notes and they are very long and these are more notes and they are very long and these are more notes and they are very long and these are more notes and they are very long and these are more.' } ] }); ```
Is there a way to display a line between labels and data columns in an Ext JS form?
CC BY-SA 2.5
null
2011-03-16T09:54:58.213
2011-03-16T11:53:11.473
null
null
4,639
[ "javascript", "forms", "extjs" ]
5,323,679
1
5,326,536
null
5
1,697
I have a little problem with SwingX Components. In my Application I’m using a JXTable and on the table I register a MouseOver ColorHighlighter. The model of the table defines two columns; a String column and a Boolean column. The default renderers of a Boolean column in a JXTable are CheckBoxes. Now the Problem is when the Mouse moves over the rows the ColorHighlighter highlights the columns in different colors; the Boolean column is darker then the String column. In the Example you can see the behavior. I want that all columns were highlighted in the same color. Have anyone an idea to solve the problem? --- ![](https://i.stack.imgur.com/y9h8F.png) --- ```import java.awt.BorderLayout; import java.awt.Color; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.table.DefaultTableModel; import org.jdesktop.swingx.JXTable; import org.jdesktop.swingx.decorator.ColorHighlighter; import org.jdesktop.swingx.decorator.HighlightPredicate; public class BooleanHighlighterDemo { public static void main( String args[] ) { JFrame frame = new JFrame( "Boolean Highlighter" ); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); JXTable table = new JXTable( new BooleanTableModel() ); //Add ColorHighlighter table.addHighlighter( new ColorHighlighter( HighlightPredicate.ROLLOVER_ROW, new Color( 0x330000ff, true ), Color.BLACK ) ); frame.add( new JScrollPane( table ), BorderLayout.CENTER ); frame.setSize( 400, 150 ); frame.setVisible( true ); } } class BooleanTableModel extends DefaultTableModel { public BooleanTableModel() { super( new Object[][]{ { "1", Boolean.TRUE }, { "2", Boolean.TRUE }, { "3", Boolean.FALSE }, { "4", Boolean.TRUE }, { "5", Boolean.FALSE } }, new String[]{ "Number", "Boolean" } ); } @Override public Class<?> getColumnClass( int columnIndex ) { switch ( columnIndex ) { case 0: return String.class; case 1: return Boolean.class; default : return Object.class; } } }```
SwingX JXTable Boolean column have different color on highlight
CC BY-SA 2.5
0
2011-03-16T10:04:17.287
2011-03-17T10:56:49.450
2011-03-17T10:56:49.450
21,234
346,916
[ "java", "swing", "swingx" ]
5,323,899
1
5,323,966
null
0
161
Please see the figure. Here Contacts has stroked. Why so?![enter image description here](https://i.stack.imgur.com/hldMH.png)
Why certain code has shown as strike in Android?
CC BY-SA 2.5
null
2011-03-16T10:23:00.293
2011-03-16T10:55:01.883
null
null
536,091
[ "android" ]
5,324,243
1
5,325,768
null
2
182
In an Ext JS form, I can define the in the form itself. But in this case, I want labels (the headers) to have a wider width. However, even if I define them , they remain just as wide as the others: ![enter image description here](https://i.stack.imgur.com/bTbxR.png) I can of course change all of them to a wider width, but that is also : ![enter image description here](https://i.stack.imgur.com/VNYxX.png) here is the current code: ``` var form_left = new Ext.FormPanel({ frame:true, labelWidth: 100, labelAlign: 'left', bodyStyle:'padding:10px', width: 300, height: 600, autoScroll: true, itemCls: 'form_row', defaultType: 'displayfield', items: [{ fieldLabel: 'BASE PRODUCT', itemCls: 'form_row_header', labelSeparator: '', labelWidth: 200 },{ fieldLabel: 'Product', value: 'Brochure' },{ fieldLabel: 'Format', value: 'DIN A4 portrait (201 x 297 cm)' },{ fieldLabel: 'Amount', value: '50 sheets' },{ fieldLabel: 'Product', value: 'Brochure' },{ fieldLabel: 'Product', value: 'Brochure' },{ fieldLabel: 'Product', value: 'Brochure' },{ fieldLabel: 'ADDITIONAL OPTIONS', itemCls: 'form_row_header', labelSeparator: '', labelWidth: 200 },{ fieldLabel: 'Product', value: 'Brochure' },{ fieldLabel: 'Format', value: 'DIN A4 portrait (201 x 297 cm)' },{ fieldLabel: 'Amount', value: '50 sheets' } ] }); ```
In and Ext JS form, how can I make some field widths wider than others?
CC BY-SA 2.5
null
2011-03-16T10:53:10.680
2011-03-16T13:10:33.173
null
null
4,639
[ "javascript", "forms", "extjs" ]
5,324,359
1
5,324,803
null
5
5,943
I would like to get the color range of the specific color for generating tag cloud. Say that user has entered some color with `RGB/HHHHHH` values then I would like to write a function `f(color, no)` which returns `RGB/HHHHHH` for "no" of different shades from dark to light colors for specified "color". These colors then will be useful to display the different tags with different color of same shade. But I would like to avoid black and white shades in it. Following is example of `F({R:0, G:0, B:255}, 7)` which returns `7` shades of blue. ![f({R:0, G:0, B:255}, 7) returns 7 shades of blue](https://i.stack.imgur.com/YRVtq.png) I would not like it to be true for any RGB combination say for example `(25, 150,150)` also. Is this function possible using JavaScript or is there any formula for RGB with which this can be achieved?
JavaScript function to return "n" shades of a given color from (dark to light)
CC BY-SA 3.0
0
2011-03-16T11:03:31.807
2017-07-18T09:43:07.853
2015-10-12T18:24:50.760
27,555
237,743
[ "javascript", "graphics", "colors", "rgb" ]
5,324,568
1
null
null
1
712
I would to create something like this using the 960 grid, is it possible using the framework or do i have to do some custom work? ![enter image description here](https://i.stack.imgur.com/F7DCa.png)
960 grid overlapping div's
CC BY-SA 2.5
0
2011-03-16T11:25:23.633
2011-03-16T11:39:49.497
null
null
152,381
[ "css", "960.gs" ]
5,324,676
1
5,375,444
null
0
644
I'm trying to achieve something similar to the [Apple Master-Detail pop-up cell example](http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/CocoaBindings/Tasks/onerelation.html) but the bindings don't seem to be working for me. My app allows users to build up a stageplay; so I have a table view of `acts`. Each act can have a list of `lines` so the acts table view drives a second table view of lines (so selecting act one updates the lines table view with the lines of that act). This setup seems to be working fine. Each line is of course spoken by a character, so my document object has a list of `characters` as well as a list of acts. What I want is a pop-up cell in my lines table with values taken from the `characters` array. So I followed the steps in that Apple tutorial but it doesn't work... - `content``CharactersController.arrangedObjects``selectedObject``LinesController.arrangedObjects.character``line``<Character ...>`- If I then bind the column's `contentValues` to `CharactersController.arrangedObjects.name` then I get the following debug error when I run the app:``` 2011-03-16 11:28:49.783 ScriptPreparer[5176:903] Cocoa Bindings: Error setting value <Character: 0x100144f60> of object <NSPopUpButtonCell: 0x100153ff0> through binding selectedObject ``` - If I remove the `selectedObject` binding then I still get the `<Character...>` output in the list. It seems like the `contentValues` binding is the broken one. What am I doing wrong? Here are my bindings: ![enter image description here](https://i.stack.imgur.com/uLtDs.png)
Problem with NSPopupButtonCell bindings
CC BY-SA 2.5
null
2011-03-16T11:37:02.960
2011-03-21T08:48:26.783
null
null
38,883
[ "cocoa", "binding", "master-detail", "nspopupbuttoncell" ]
5,324,754
1
null
null
1
978
My git setup on Windows was working fine till few days back. I use git with Cygwin. One morning, "git pull" on cygwin command line threw the following error. ![SSH Error for Git pull](https://i.stack.imgur.com/G3dIT.png) SSH works fine when I connect to other servers. Only when it is used in conjunction with git, it dies with aforementioned error. Git trace output is shown below. ``` $ git pull trace: exec: 'git-pull' trace: run_command: 'git-pull' trace: built-in: git 'rev-parse' '--git-dir' trace: built-in: git 'rev-parse' '--show-toplevel' setup: git_dir: .git setup: worktree: c:/path/ setup: cwd: c:/path/ setup: prefix: (null) trace: built-in: git 'ls-files' '-u' setup: git_dir: .git setup: worktree: c:/path/ setup: cwd: c:/path/ setup: prefix: (null) trace: built-in: git 'symbolic-ref' '-q' 'HEAD' setup: git_dir: .git setup: worktree: c:/path setup: cwd: c:/path setup: prefix: (null) trace: built-in: git 'config' '--bool' 'branch.master.rebase' trace: built-in: git 'rev-parse' '-q' '--verify' 'HEAD' setup: git_dir: .git setup: worktree: c:/path setup: cwd: c:/path setup: prefix: (null) trace: built-in: git 'fetch' '--update-head-ok' trace: run_command: 'ssh' 'hostname' 'git-upload-pack '\''gitfile.git'\''' fatal: The remote end hung up unexpectedly ``` SSH to the same host seems to be fine. The configuration of the host is in ~/.ssh/config ``` $ ssh -v hostname OpenSSH_5.1p1, OpenSSL 0.9.8h 28 May 2008 debug1: Reading configuration data /home/user/.ssh/config debug1: Applying options for sms debug1: Connecting to gerrit.hostname.com [IP_ADDR] port PORT_NUM. debug1: Connection established. debug1: identity file /home/user/.ssh/id_rsa type 1 debug1: Remote protocol version 2.0, remote software version SSHD-CORE-0.4.0-R897374 debug1: no match: SSHD-CORE-0.4.0-R897374 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.1 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-cbc hmac-md5 none debug1: kex: client->server aes128-cbc hmac-md5 none debug1: sending SSH2_MSG_KEXDH_INIT debug1: expecting SSH2_MSG_KEXDH_REPLY debug1: Host '[hostname.com]:PORT' is known and matches the RSA host key. debug1: Found key in /home/user/.ssh/known_hosts:34 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: /home/user/.ssh/id_rsa_gupshup debug1: Server accepts key: pkalg ssh-rsa blen 277 debug1: read PEM private key done: type RSA debug1: Authentication succeeded (publickey). debug1: channel 0: new [client-session] debug1: Requesting [email protected] debug1: Entering interactive session. debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 gerrit: no shell available debug1: channel 0: free: client-session, nchannels 1 Connection to hostname.com closed. Transferred: sent 2584, received 1888 bytes, in 1.5 seconds Bytes per second: sent 1744.8, received 1274.8 debug1: Exit status 127 ``` Changing the SSH to C:\Program Files\Git\bin\ssh.exe with GIT_SSH variable produced the same error screen. Attempts to configure Git with plink (of Putty) did not yield any results. I couldn't get it right. Git version is `git version 1.7.4.msysgit.0` Any solutions for this error?
Git+SSH on Windows. Git pull dies with "Application Error."
CC BY-SA 2.5
null
2011-03-16T11:46:12.170
2012-03-12T21:56:31.673
null
null
77,308
[ "windows", "git", "windows-xp", "ssh" ]
5,325,137
1
5,325,215
null
3
3,434
(1) This is very likely to be a bug. However, I cannot say for sure whether it is more related to 64bit OS, or VCL, or MFC wrapper. Please check the answers and comments below from Delphi experts. (2) Workaround for me: a. The situation is that I have `six` key-value `pairs` to show in the status bar. The values will be changed in run time. b. It seems I cannot `set text` for more than `10` panels. c. In this respect, I will use `six` calls of `set text` for the values, and use `two` calls for `set text` for the last two keys. Thus, I don't have to exceed the `10` limit. d. In order to make `set text` work, I need provide different text that it already has. e. Sample code can thus be described as: ``` // Designtime stat1.Panels[0].Text := 'Key1' stat1.Panels[2].Text := 'Key2' stat1.Panels[4].Text := 'Key3' stat1.Panels[6].Text := 'Key4' stat1.Panels[8].Text := 'Key5__' stat1.Panels[10].Text := 'Key6__' // runtime stat1.Panels[1].Text := 'Value1' stat1.Panels[3].Text := 'Value2' stat1.Panels[5].Text := 'Value3' stat1.Panels[6].Text := 'Value4' stat1.Panels[9].Text := 'Value5' stat1.Panels[11].Text := 'Value6' stat1.Panels[8].Text := 'Key5' stat1.Panels[10].Text := 'Key6' ``` ================================================================== In my Windows 7 X64, the statusBar does not show text for the panels starting from the 11th correctly. (1) New an empty VCL application project `without` saving it, if I set the Text for the 11th status panel at design time, the text will not be shown at all at run time. (See the attached pictures.) (2) If I save it and reopen it, the text will also not be shown in design time. (3) If I set the Text at run time, the text will be shown only when the new text is different from the old one. Say the Text for the 11th panel is set to `'try'` at design time: ``` Self.stat1.Panels[10].Text := 'try'; // 'try' is not shown self.stat1.Panels[10].Text := 'try_'; // 'try_' is shown ``` (4) This behavior only happens on my Windows 7 X64, but not on my Windows XP. (5) I would think the same behavior allpies to all Delphi versions. (6) It seems the behavior is more related to Windows version than to Delphi. I mean, the same sample application will shown the above behavior on Windows 7 but not on Windows XP. (7) A sample dfm file is dumped as below: ``` object Form3: TForm3 Left = 0 Top = 0 Caption = 'Form3' ClientHeight = 202 ClientWidth = 731 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object stat1: TStatusBar Left = 0 Top = 183 Width = 731 Height = 19 Panels = < item Text = '0' Width = 50 end item Text = '1' Width = 50 end item Text = '2' Width = 50 end item Text = '3' Width = 50 end item Text = '4' Width = 50 end item Text = '5' Width = 50 end item Text = '6' Width = 50 end item Text = '7' Width = 50 end item Text = '8' Width = 50 end item Text = '9' Width = 50 end item Text = '10' Width = 50 end item Text = '11' Width = 50 end> ExplicitLeft = 248 ExplicitTop = 152 ExplicitWidth = 0 end object btn1: TButton Left = 152 Top = 40 Width = 433 Height = 89 Caption = 'btn1' TabOrder = 1 OnClick = btn1Click end end ``` (8) Sample pictures: ![Designtime](https://i.stack.imgur.com/ROnr7.png) ![rumtime](https://i.stack.imgur.com/ckAbd.png) Could some one help to comment on the possible reason? Any suggestion is appreciated!
In Windows 7 X64, statusBar does not show text for the panels starting from the 11th correctly
CC BY-SA 2.5
0
2011-03-16T12:17:49.290
2011-03-17T11:51:31.423
2011-03-17T11:51:31.423
531,199
531,199
[ "delphi", "windows-7", "statusbar", "common-controls" ]
5,325,278
1
5,473,590
null
4
1,360
I would like to know when the "Fix-it" should appear? Is it possible to make appear on all errors (and suggest a change?) ![Assignment when it should be comparison](https://i.stack.imgur.com/UqIqm.png) Clearly an error in my code, which "Fix-it" analyzed and detected. But can it help me even more?
Xcode 4 "Fix it" - when does it appear?
CC BY-SA 2.5
null
2011-03-16T12:28:23.620
2011-03-29T13:48:12.397
2011-03-16T12:47:00.757
253,056
591,137
[ "xcode4", "clang-static-analyzer" ]
5,325,548
1
5,325,853
null
0
618
I'm developing a Windows CE CF3.5 application under Visual Studio 2008, everything went smooth until the designer started throwing a `NullReferenceException`. Restarted VS2008, rebooted Win7 and the exception disappeared but all the forms for the project I was working on and new projects that I tested have this aspect: ![](https://i.stack.imgur.com/tOetn.png) On the emulator it varies, it either appears really tiny in the upper left corner or it displays correctly: ![](https://i.stack.imgur.com/cvQBr.png) Any ideas? I've googled for this to no success. Thanks in advance!
Oversized Windows CE forms in Visual Studio 2008
CC BY-SA 2.5
null
2011-03-16T12:54:53.467
2021-12-24T13:53:57.820
2011-03-16T13:00:36.697
366,904
1,712,265
[ "c#", "winforms", "visual-studio", "visual-studio-2008", "windows-ce" ]
5,325,750
1
5,413,333
null
6
6,633
![enter image description here](https://i.stack.imgur.com/BaOo6.png) All WoW64 apps go through WoW64 emulation layer. I'd like to know what happen in this layer.(especially, how they can convert address space) Please give me some important points.
What does WoW64 emulation layer do?
CC BY-SA 2.5
0
2011-03-16T13:09:32.410
2011-03-24T00:43:12.397
2011-03-16T13:18:40.103
252,047
252,047
[ "windows", "dll", "64-bit", "wow64" ]
5,325,987
1
5,326,044
null
0
118
I have a `SQL` like this; ``` SELECT B.HESAP_NO, B.TEKLIF_NO1 + '/' + B.TEKLIF_NO2 AS 'TEKLIF',B.MUS_K_ISIM, dbo.fngcodeme(B.HESAP_NO, B.DOVIZ_KOD, B.TEKLIF_NO1 + '/' + B.TEKLIF_NO2,'11/03/2011', '11/03/2011'), (CASE WHEN B.DOVIZ_KOD = 21 THEN 'EUR' WHEN B.DOVIZ_KOD = 2 THEN 'USD' WHEN B.DOVIZ_KOD = 1 THEN 'TL' END) AS 'KUR', D.AVUKAT, (CASE WHEN D.HESAP IN (SELECT T_HESAP_NO FROM TAKIP) THEN (SELECT ICRA_TAR FROM TAKIP WHERE T_HESAP_NO = D.HESAP) ELSE ' ' END) AS 'ICRA TARİHİ', (CASE WHEN D.HESAP IN (SELECT T_HESAP_NO FROM TAKIP) THEN (SELECT HACIZ_TAR FROM TAKIP WHERE T_HESAP_NO = D.HESAP) ELSE '' END) AS 'HACİZ TARİHİ' FROM YAZ..MARDATA.S_TEKLIF B, AVUKAT D WHERE B.HESAP_NO = D.HESAP AND ISNULL(dbo.fngcodeme(B.HESAP_NO, B.DOVIZ_KOD, B.TEKLIF_NO1 + '/' + B.TEKLIF_NO2,'11/03/2011', '11/03/2011'),0) > 0 GROUP BY B.HESAP_NO, B.TEKLIF_NO1 + '/' + B.TEKLIF_NO2,B.DOVIZ_KOD ,B.MUS_K_ISIM, D.AVUKAT, D.HESAP ``` Here is my tables; ``` S_TEKLIF (B) AVUKAT TAKIP HESAP_NO (PK) HESAP(PK) T_HESAP_NO (PK) TEKLIF_NO1 MUS_K_ISIM ICRA_TAR TEKLIF_NO2 AVUKAT HACIZ_TAR MUS_K_ISIM DOVIZ_KOD ``` And here is mine `dbo.fngcodeme` Function; ``` ALTER FUNCTION [dbo].[fngcodeme] ( @HESAP INT, @DOV INT, @TEKLIF VARCHAR(10), @BAS VARCHAR(10), @BIT VARCHAR(10) ) RETURNS FLOAT AS BEGIN DECLARE @Result FLOAT SET @Result = (SELECT SUM(TUTAR) FROM YAZ..MARDATA.M_GHAREKET WHERE TEMEL_HESAP = @HESAP AND DOVIZ_KOD = @DOV AND REF_KOD = 'GC' AND BACAK_GRUP = 'PERT' AND ISL_KOD = 1 AND ACIKLAMA LIKE '%' + @TEKLIF + '%' AND ISL_TAR >= CONVERT(DATETIME, + '' + @BAS + '',103) AND ISL_TAR <= CONVERT(DATETIME, + '' + @BIT + '',103) ) RETURN @Result END ``` My top `SQL` is working perfect but gettin two value with the same data. ![enter image description here](https://i.stack.imgur.com/58qc4.jpg) Where the error i could be doing?
Getting value twice in SQL
CC BY-SA 2.5
null
2011-03-16T13:27:55.053
2011-03-16T13:46:19.907
2011-03-16T13:46:19.907
447,156
447,156
[ "sql", "sql-server", "database", "function" ]
5,326,221
1
5,449,688
null
1
253
I have a simple app that has two view controllers. Both of them have a UINavigationBar at the top, as a header. The second UIViewController is displayed as a modal view, when the user clicks on a button on the first one. When my app first launches, the initial view doesn't completely cover the main UIView and seems "pushed" to the top (see image below). ![enter image description here](https://i.stack.imgur.com/BR9wl.png) After I click on the "instructions" button, which displays another view with presentModalViewController:animated:, and dismiss the modal ViewController, everything is displayed correctly. Anybody knows what I might be doing wrong? I have nothing in viewWillAppear, and this is my viewDidLoad ``` - (void)viewDidLoad { [super viewDidLoad]; if (!self.model) { self.model = [[FRRSushiRiceModel alloc] init]; [[self.header.items objectAtIndex:0] setTitle: @"Perfect Sushi Rice: Ingredients"]; } } ``` and my application:didFinishLaunchingWithOptions: ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Create and add the main controller (ingredients) self.ingredientsController = [[FRRIngredientsViewController alloc] init]; [window addSubview:self.ingredientsController.view]; [window makeKeyAndVisible]; return YES; } ``` This small project reproduces this behavior: [Test Case](http://dl.dropbox.com/u/3978473/crap.zip)
UIView is shown displaced to the top
CC BY-SA 2.5
0
2011-03-16T13:45:04.437
2011-03-27T14:01:37.450
2011-03-16T16:59:59.167
74,415
74,415
[ "cocoa-touch", "uiview", "uiviewcontroller" ]
5,326,473
1
5,326,672
null
1
1,337
I want to fill a Rectangle with a LinearGradientBrush. With some Rectangles I get some strange behavior. Example: ``` Rectangle rect = new Rectangle( 20, 20, 20, 34 ); LinearGradientMode mode = LinearGradientMode.Vertical; Brush brush = new LinearGradientBrush( rect, Color.White, Color.Blue, mode ); e.Graphics.FillRectangle( brush, rect ); ``` Most Rectangles work OK, but some (like the one above) fill the first pixel row with the second color (blue in this case). See attached image: ![Linear GradientBrush](https://i.stack.imgur.com/nb63k.png) Any ideas?
Weird behavior of LinearGradientBrush
CC BY-SA 2.5
0
2011-03-16T14:07:07.947
2016-04-11T00:32:35.970
2020-06-20T09:12:55.060
-1
8,976
[ "c#", "winforms", "system.drawing", "brush", "lineargradientbrush" ]
5,326,515
1
5,329,375
null
49
139,510
I am ultimately trying to create a View to Add an Employee to a Database. Here is an image of the .EDMX Model that I am using (the tables that will be used by the create().): ![enter image description here](https://i.stack.imgur.com/bGpU7.jpg) Objectives: 1. Create an Employee (I have the Create.cshtml (strongly typed) made with a Partial View for the StaffNotify Checkboxes) {I am using a separate @model in the Notify Partial View from the Create View not sure if that is safe??? @model ShadowVenue.Models.Employee & @model ShadowVenue.Models.StaffNotify) 2. Create a Dropdown box for StaffTypeId (that will insert the [StaffTypeId] value from the Table "StaffType" (which has a 1 to many relationship), but will show the [Type] string value in the dropdown) 3. Create a Dropdown box for GenderId (that will insert the [GenderId] value from the Table "Genders" (which has a 1 to many relationship), but will show the [Gender] string value in the dropdown) 4. Insert the Record into the database (I have the Staff Notifications in a separate table with a 1 to 1 relationship on the StaffId Primary Key) I seem to be having the trouble with the Controller code for this. I am not sure if I should create Stored Procedure within the EDMX model, or come up with some query or method syntax, not sure which is the best way. This my First Large MVC3 App using Entity Framework Model. (if you need to know any of the Navigation Property Names in order to help with the solution just let me know, I will provide them to you)
Create a Dropdown List for MVC3 using Entity Framework (.edmx Model) & Razor Views && Insert A Database Record to Multiple Tables
CC BY-SA 3.0
0
2011-03-16T14:10:57.060
2018-01-14T19:51:50.557
2018-01-14T19:51:50.557
3,885,376
612,699
[ "entity-framework", "asp.net-mvc-3", "razor", "edmx", "html.dropdownlistfor" ]
5,326,737
1
5,330,300
null
0
261
After adding log4net reference to my MVC 3 project, I see in the Add View dialog (in an Admin Area) a lot of log4net classes... Any suggestions on how to prevent them from showing? Kinda makes the list difficult to navigate. (Almost seems like this dialog needs a type-search function, ie, type in "prospects" to find my prospects model or EF entity class.) ![Add View Dialog showing log4net classes](https://i.stack.imgur.com/Gb5sC.png)
MVC Add View showing log4net classes, doesn't seem to be showing entity-framework classes
CC BY-SA 2.5
null
2011-03-16T14:30:14.503
2011-03-16T18:54:20.070
null
null
323,456
[ "asp.net-mvc" ]
5,326,776
1
5,328,318
null
1
1,378
![enter image description here](https://i.stack.imgur.com/ZWaBx.gif) While trying to run eclipse it gives the above error. Whats the problem?
Eclipse Galileo 32 bit windows trying to run on 64 bit windows?
CC BY-SA 2.5
0
2011-03-16T14:32:53.420
2011-03-16T16:21:29.543
null
null
602,524
[ "jvm", "eclipse-3.5" ]
5,326,881
1
5,327,721
null
0
539
This might be really tricky! Here is what i want to achieve: ![3 column finella](https://i.stack.imgur.com/DoUwD.png) Here is my [test code](http://jsfiddle.net/SMNVx/) on jsfiddle I've tried various things without any luck. The problem is that both the left and right div widths are based on the text width within. I also cant have the joining dotted line going beneath the lef and right divs and just mask it by background colour as the background of the site is a gradient. At least in this case, the parent div is fixed though. Any thoughts?
3 nested divs - Fixed Width parent, Left & Right Width based on content, empty Centre Width equaling the difference?
CC BY-SA 2.5
null
2011-03-16T14:41:33.233
2014-05-28T10:13:47.490
null
null
394,117
[ "css", "html", "fluid" ]
5,326,879
1
5,387,646
null
2
9,833
### Background A subreport with a column title and a detail section both set to 20px high. When the subreport record displays on the main report, the subreport prints as expected until when it reaches at the bottom of the page. Then the subreport prints just the column header and left blank space, then again starts on new page with column header and its detail. ### Question So, would you make it either print the whole subreport on same page, or start whole report from new page? ### Master Report JRXML [http://pastebin.com/V2HRPWVL](http://pastebin.com/V2HRPWVL) Image of the problem faces ![](https://i.stack.imgur.com/TPMEY.png) Thank You Mihir Parekh
Blank space at end of page
CC BY-SA 2.5
null
2011-03-16T14:41:25.717
2013-03-22T21:01:08.093
2011-03-18T20:46:53.123
59,087
388,324
[ "jasper-reports", "ireport" ]
5,327,076
1
5,362,327
null
3
4,345
All, I'm pretty new to AS3, so this is probably a very trivial question. But, I'm stuck. I'm working on a new Flash application (AS3). The app uses a Document class. Here's how I've set up the folder structure: - - > "com" folder- > - > "[mycompany]" folder- > - > - > "[myproject]" folder So, in Flash CS5, in the main FLA, the Class: field points to "com.mycompany.myproject.AppName" If I click the little "pencil" icon next to that field, Flash CS5 loads AppName.as in the IDE. In AppName.as, the first few lines are: ``` package com.mycompany.myproject { import flash.display.Sprite; public class AppName extends Sprite { ``` When I test the movie, everything works just like I'd expect. So far, so good. However, when I try this on my HOME pc, it doesn't work - the constructor in AppName.as is never called. There are no output messages or errors - just that nothing happens. Flash runs the SWF as though there was no ActionScript associated with it (there's no timeline code). So, clearly, something is different on my home PC than on my office PC. But I can't figure out what. Here's what I've ruled out: - - - The strange thing... on my home PC, when I'm in Flash CS5 - if I click the little Pencil icon next to the Class: field, AppName.as loads in the IDE. So, it's as though Flash knows where to find the document. The only problem is that, when I test the movie, the constructor is not called. I know there are no errors in that Class, since it works perfectly on my office PC. But, just to be sure, I reduced the Class to this: ``` package com.mycompany.myproject { import flash.display.Sprite; public class AppName extends Sprite { public function AppName () { trace ("Working!"); } } } ``` On my office PC, I see "Working" in the output window when I test this; on my home PC, nothing. Many thanks in advance for any insight or advice! [UPDATE] In response to several comments, here's screenshots of the various settings: ![enter image description here](https://i.stack.imgur.com/ipBww.jpg) Here's the [full size image](http://resultsimperative.net/FlashSettings2.jpg)
Flash CS5/AS3 - Can't find (or won't execute) the Main Document class - constructor not called
CC BY-SA 2.5
0
2011-03-16T14:54:59.387
2013-12-30T15:41:26.913
2011-03-16T16:42:22.880
49,383
49,383
[ "flash", "actionscript-3", "flash-cs5" ]
5,327,360
1
5,435,209
null
0
6,783
I am wanting to add a menu look and operation similar to [this blog post](http://pietschsoft.com/post/2010/11/17/HTML5-Day-4-Add-DropDown-Menu-ASPNET-MVC-HTML5-Template-using-CSS-and-jQuery.aspx). I am not using HTML5 and I am not using CSS3. Also, I am a CSS n00b and don't really grasp what each tag does (or can do) so I feel like I am drowning here in understanding what to do. I have been scouring the net looking for an example of what I want to do and have had no luck beyond the link above. This is the "standard" ASP.NET MVC 2 template. We actually like the look for our internal applications. But the menu is something that needs help yet. Here is what I have working so far: ![Current menu](https://i.stack.imgur.com/l3EVa.png) HTML: ``` <div id="menucontainer"> <ul id="menu"> <li><%= Html.ActionLink("Home", "Index", "Home")%></li> <li><%= Html.ActionLink("Sign Timesheet", "Index", "Timesheet") %></li> <li> <%= Html.ActionLink("Leave Requests", "Index", "LeaveRequest") %> <ul> <li><%= Html.ActionLink("New Leave Request", "Create", "LeaveRequest")%></li> <li><%= Html.ActionLink("Leave Request History", "History", "LeaveRequest") %></li> </ul> </li> <%--<li><%= Html.ActionLink("About", "About", "Home")%></li>--%> <li><a href="#" target="_blank">NaviLine</a></li> <li><%= Html.ActionLink("Help", "Help", "Home") %></li> </ul> </div> ``` CSS: ``` /* TAB MENU ----------------------------------------------------------*/ ul#menu { border-bottom: 1px #5C87B2 solid; padding: 0 0 2px; position: relative; margin: 0; text-align: right; } ul#menu li { display: inline; list-style: none; } ul#menu li#greeting { padding: 10px 20px; font-weight: bold; text-decoration: none; line-height: 2.8em; color: #fff; } ul#menu li a { padding: 10px 20px; font-weight: bold; text-decoration: none; line-height: 2.8em; background-color: #e8eef4; color: #034af3; } ul#menu li a:hover { background-color: #fff; text-decoration: none; } ul#menu li:hover ul { display: block; } ul#menu li a:active { background-color: #a6e2a6; text-decoration: none; } ul#menu li.selected a { background-color: #fff; color: #000; } ul#menu li ul { position: absolute; right: 0px; top:34px; display: none; } ```
Adding a drop down horizontal menu to the ASP.NET MVC 2 template
CC BY-SA 2.5
null
2011-03-16T15:12:21.753
2011-04-19T16:58:59.687
null
null
2,535
[ "css", "drop-down-menu" ]
5,328,181
1
null
null
1
1,173
I managed to get it to work on IE 8+9 using `<meta http-equiv="X-UA-Compatible" content="IE=7" />` but the problem still persists in 6/7. I'm trying to achieve this effect: ![example](https://i.stack.imgur.com/LJAwy.png) [http://img860.imageshack.us/img860/3905/example.png](http://img860.imageshack.us/img860/3905/example.png) Which I've managed to do in all browsers except IE (all versions including 9) without any extra markup: ``` <div id="content"> <p class="firstPara">Para1</p> <p>Para2</p> <p>Para3</p> </div> ``` And with this CSS: ``` #content { width: 700px; height: 232px; position: relative; background: #ccc url('assets/headerImage.png') left top no-repeat; } #content p { background-color: #fafafa; position: relative; top: 232px; width: 440px; padding: 10px; } #content p.firstPara { position: absolute; top: auto; bottom: 0; background: #eee url('assets/headerTextBack.png') left bottom no-repeat; } ``` In order to position the first paragraph I've opted to set it to absolute position and set the "bottom" property to 0, thus putting it at the bottom of the parent div who's height has been set to the same as the image. However in IE it seems that the height is completely ignored if the sum of the heights of the static/relatively positioned elements exceeds the specified height. As a result the first paragraph hangs down further than it should. Max-height and various fixes I found for it didn't seem to work. Anyway I'm at a loss, I can't seem to get it to work under IE at all unless I separate the first paragraph into a different div. Any help would be much appreciated!
IE (all versions) ignoring height when content overflows
CC BY-SA 3.0
null
2011-03-16T16:11:17.177
2011-12-01T07:46:43.730
2011-12-01T07:46:43.730
234,976
662,854
[ "html", "css", "internet-explorer", "height", "overflow" ]
5,328,452
1
5,329,204
null
4
4,597
I am trying to create a layered histogram like this with ggplot2: ![Style plot that I'd like to create](https://i.stack.imgur.com/t1HV5.png) Here are some data and code that I thought would work: ``` my.data <- data.frame(treat = rep(c(0, 1), 100), prop_score = runif(2 * 100)) my.data <- transform(my.data, treat = ifelse(treat == 1, "treatment", "control")) my.data <- transform(my.data, treat = as.factor(treat)) my.fig <- ggplot() + geom_histogram(data = my.data, binwidth = 0.05, alpha = 0.01, aes(x = prop_score, linetype = treat, position = identity)) ``` But my code produces this: ![enter image description here](https://i.stack.imgur.com/WuuWz.png) Thanks! I would prefer `ggplot2` (while I'm learning, I figured I just learn the common, extensible plotting language), but I'm open to anything/everything.
Overlaid histograms in R (ggplot2 preferred)
CC BY-SA 2.5
0
2011-03-16T16:31:29.640
2011-03-23T20:58:17.047
2011-03-16T17:10:20.000
334,755
334,755
[ "r", "plot", "ggplot2", "histogram" ]
5,328,458
1
5,328,570
null
1
284
How can I attach the edit boxes to the corresponding grid columns, so it will change width when the user change the column width and move around when the user change the order of DBGraid columns. ![Example of the form](https://i.stack.imgur.com/cCzAr.gif)
Attach TEdit boxes to a TDBgrid column
CC BY-SA 2.5
null
2011-03-16T16:31:43.420
2011-03-16T16:39:10.170
null
null
654,311
[ "delphi", "delphi-xe", "tdbgrid" ]
5,328,962
1
5,328,983
null
2
15,176
I have a PHP script (index.php) that changes the page shown depending on the query part of the URL (using GET). All the links in the page access different "pages" using `?page=pageName` and the index.php script loads HTML from text files accordingly (echoing it to the screen). So, if a user goes to `index.php?page=about`, my PHP script loads a file called `about.php` and echoes it in a view container in the browser. : The content I'm loading has PHP scripts inside it, but those scripts aren't executed when echoed using the `index.php` script. That makes it impossible for me to load a page that contains, say, a directory listing pulled from a MySQL database. So basically, I want to know if there is any way that I can echo a PHP file onto a page but execute the PHP code inside the file as well. For clarity, I have attached an annotated screenshot that describes what I mean: Here's the link: ![enter image description here](https://i.stack.imgur.com/fV3gt.jpg)
How do I load content from a PHP file (and executing the script) from another PHP file?
CC BY-SA 2.5
null
2011-03-16T17:07:47.420
2021-05-20T22:30:23.333
2011-03-16T19:47:09.477
408,863
652,625
[ "php", "scripting", "content-management-system", "echo" ]
5,329,272
1
5,329,680
null
10
22,996
I have tried to make a custom alert dialog and it mostly works very well. the functionality is working perfectly but the view is behaving in a weird way. The dialog layout consists of a button and a listview. as you will see in the screenshot below the button is getting a margin on top and bottom. i dont see any reason for these margins, and i would greatly appreciate some help :) for some reason i cant post my xml layout but i can asure you that it contains no paddings or margins of any kind Java Code : ``` View dialogView = ((LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.choose_catagory_dialog_layout, null, false); Button footerButton = (Button) dialogView.findViewById(R.id.choose_catagory_dialog_footer_button); footerButton.setOnClickListener(ButtonClickEvent); builder = new AlertDialog.Builder(mContext); builder.setView(dialogView); builder.setTitle(R.string.choose_catagory); builder.setAdapter(spinnerAdapter, ListclickEvent); alert = builder.create(); alert.getListView().setVerticalFadingEdgeEnabled(false); alert.setOwnerActivity((Activity) mContext); ``` Screenshot: ![http://cl.ly/3S2y3p3E0e3H2o1I272m](https://i.stack.imgur.com/tvaOD.png)
custom alert dialog getting unwanted padding
CC BY-SA 3.0
0
2011-03-16T17:30:34.687
2017-01-10T07:35:31.690
2015-01-07T14:27:02.347
3,360,307
662,994
[ "android", "android-alertdialog" ]
5,329,463
1
5,332,449
null
0
241
I have python script that converts data.xml to html using stylesheet.xsl. And i have a problem with inserting html tags into the stylesheet. I would like to put all the generated values into table cells. maybe someone experienced could help me? ``` xsl:choose xsl:when test="$NECoords = 'true'" xsl:value-of select="concat($PtStr, $NthStr, $EastStr, $ElevStr, ' ', $TimeStr, $hzPrec, $vtPrec, $PDOP, $aRMS, $NbrSat, $NbrInt)"/> /xsl:when> ``` ```` I would like to know how to put above concatenated strings into table cells in output html file, like:![enter image description here](https://i.stack.imgur.com/edc9r.jpg) Every value should be put to separate cell, like this:![enter image description here](https://i.stack.imgur.com/ve8Sp.jpg)
How put html tags into XSL stylesheet?
CC BY-SA 2.5
null
2011-03-16T17:46:27.333
2011-03-17T18:54:50.067
2011-03-16T22:47:30.517
null
649,114
[ "python", "xslt" ]
5,329,494
1
null
null
0
658
Trying to add a background image to a textfield but when a user types over and goes into a horizontal scroll the image seems to be replicated over causing it to look like the following: ![enter image description here](https://i.stack.imgur.com/92d8X.png) Basically i want the 1st textfield to look like the 2nd after the user has inputed a large value. I have a class that extends horizontalfieldManager and in my paint function is the following: ``` protected void paint(Graphics g) { g.clear(); if (mLabelMode) { g.setColor(mLabelColor); } else { g.setColor(mColor); } int x = this.getHorizontalScroll(); g.drawImage(x, 0, mBackground.getWidth(), mBackground.getHeight(), mBackground, 0, 0, 0); super.paint(g); } ``` Any help would be greatly appreciated.
How to add a custom image to a textfield in blackberry?
CC BY-SA 2.5
null
2011-03-16T17:48:31.450
2012-05-15T06:13:38.243
null
null
175,027
[ "blackberry", "textfield", "horizontalfieldmanager" ]
5,329,438
1
null
null
0
793
How do I make a div expand with it's own content to fill the existing space ? The Structure is this ( I am using 960Grid ). I need the DIV1, DIV2, DIV3 and DIV4 to fill the (viewport) Height available, if there is not much content. Or if there is, that the DIV1, DIV2, DIV3 expand their height with the DIV4 content. ``` +--------------------------------+ | +------------------+ | | | Logo Buttons | | | | | | | +------------------+ | |================================| | +------------------+ | | |Title | | | | | | | +------------------+ | |==============DIV1==============|--- | +-------DIV2-------+ | ^ | |+DIV3+ +---DIV4--+| | | | || | | || | | | ||Menu| | Content || | | | || | | || | div | || | | || | 100% of page (not screen) height | || | | || | | | || | | || | | | |+----+ +---------+| | | | +------------------+ | v |================================|--- | +------------------+ | | |Footer | | | +------------------+ | +--------------------------------+ ``` When I dont scroll everything is OK ![When I dont scroll everything is OK](https://i.stack.imgur.com/TxwxX.png) When I scroll the body (in Green) appears ![When I scroll the body (in Green) appears](https://i.stack.imgur.com/OvqGv.png) HTML CODE: ``` <body> <div id="header"> <div class="container_16"> <div id="logo" class="grid_5" onclick="window.location='home.php'"> </div> <div class="grid_3"> &nbsp; </div> <div class="botao grid_2 fs5"> <a href="sobre.php">About</a> </div> <div class="botao grid_2 fs5"> <a href="profissao.php">Services</a> </div> <div class="botao grid_2 fs5"> <a href="noticias.php">Products</a> </div> <div class="botao grid_2 fs5"> <a href="eventos.php">Contact</a> </div> </div> </div><!-- end #header --> <div id="page_name"> <div class="container_16"> <div id="name" class="grid_16"> <h1>Title</h1> </div> </div> </div><!-- end #page_name --> <div id="top_shadow"></div> <div id="page_wrapper"> <div class="container_16"> <div id="menu" class="grid_4"> <ul> <li><a href="">Start</a></li> <li><a href="">We</a></li> <li><a href="">You</a></li> <li><a href="">Us</a></li> <li><a href="">Web</a></li> <li><a href="">ROI</a></li> </ul> </div><!-- end #menu --> <div id="page_content" class="grid_12"> <div class="text"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eu lorem tellus, et posuere lectus. In hac habitasse platea dictumst. Curabitur orci sem, ultrices non consectetur sed, ullamcorper eu magna. Praesent sit amet sollicitudin odio. Donec et urna vel diam pellentesque elementum ut eget lorem. Ut in augue enim, eu varius elit. Aenean quam risus, suscipit in dapibus ut, consequat quis magna. Quisque vulputate vestibulum tempus. Nam tristique tempus mi, a fringilla metus tempor eget. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla velit nibh, pulvinar id rutrum sed, iaculis non turpis.... <div class="clear"></div> </div><!-- end .text --> <div class="clear"></div> </div><!-- end #page_content --> <div class="clear"></div> </div><!-- end .container_16 --> <div class="clear"></div> </div><!-- end #page_wrapper --> <div id="footer"> <div class="container_16"> <div id="news1" class="grid_10"> <p class="white creditos fs6">© Footer</p> </div> <div id="apoio" class="grid_6 direita"> <p class="white creditos fs6">Text</p> </div> </div> </div><!-- end #footer --> </body> ``` CSS Code: ``` html, body {height: 100%;} body { padding: 0px; } .clear { clear: both; } #header{ background: url(../images/header_bg.png) repeat-x; height: 60px; position:relative; } #logo{ margin-top: 10px; background: url(../images/Logo.png) no-repeat; height: 40px; cursor:pointer; } #destaque{ background: url(../images/destaque_bg.png) repeat-x; height: 330px; } #top_shadow{ background: transparent url(../images/anuncios_bg.png) repeat-x; background-position: top; height:6px; width:100%; z-index:800; position:relative; } #page_name{ background: url(../images/destaque_bg.png) repeat-x; height: 80px; position:relative; } #page_name #name{ margin-top:30px; } /*body > #page_wrapper {height:auto;}*/ #page_wrapper{ background-color: #FFFFFF; margin-top:-6px; position:absolute; top:145px; bottom:45px; width:100%; height:auto; } #page_wrapper div.container_16{ background-color: green; bottom: 0px; left: 50%; margin-left: -480px; position: absolute; top: 0px; overflow:visible; } #menu{ background: #fff url(../images/menu_bg.png) right top repeat-y; margin: auto; height:100%; overflow: visible; z-index:10; position: relative; top: 0; } #menu ul{ list-style-type: none; margin-top: 20px; } #menu ul li{ background: transparent url(../images/categoria_separador.png) 5px bottom no-repeat; width: 227px; height: 40px; margin-left: 0px; overflow:visible; } #menu ul li:hover{ } #menu ul li a{ text-decoration: none; display:block; font-size:15px; color: #000000; width: 219px; height: 30px; padding: 11px 0 0 20px; margin-top:-2px; } #menu ul li:hover a{ background: transparent url(../images/categoria_bg.png) left top scroll; color: #FFFFFF; overflow:visible; } #page_content{ display:block; background-color: blue; } #page_content div.text{ padding:25px 0 0 25px; } #anuncios{ background: #fff url(../images/anuncios_bg.png) repeat-x; background-position: top; height: 360px; } #footer{ background-color: #000000; margin-top: -45px; height: 45px; clear:both; position: fixed; width: 100%; bottom:0px; z-index:999; } #shelf{ background: url(../images/shelf.png) no-repeat center 147px white; height: 192px; overflow:visible; padding-bottom: 50px; } #shelf div.book{ height: 110px; /*background-color:yellow;*/ margin-top: 0px; cursor: pointer; position: relative; } #shelf div.book a { width: 100%; text-align: center; position: absolute; bottom: 0px; } /* #shelf div.book a img:hover{ -moz-box-shadow: 1px -1px 2px #555; -webkit-box-shadow: 1px -1px 3px #999; box-shadow: 1px -1px 2px #555; margin-bottom:-2px; }*/ #shelf h2{ height: 35px; } #nba{ background: url(../images/news_b_apoios.png) no-repeat; background-position: right; height: 100px; } #eventos, #concursos{ background: url(../images/separador.png) no-repeat; background-position: right; } #eventos, #concursos, #noticias{ margin-top: 26px; height: 298px; } #concursos h2{ margin-left:40px; } #concursos div{ margin-left:30px; } #noticias h2{ margin-left:30px; } #noticias div{ margin-left:20px; } .anuncio{ margin-top: 9px; margin-left:-10px; height: 120px; cursor:pointer; } .anuncio:hover{ background: url(../images/anuncio_bg.png) no-repeat; } #noticia_destaque{ margin-top:63px; } .texto_noticia_destaque{ line-height: 20px; text-align: justify; width: 370px; margin-top: 30px; } #painel{ background: url(../images/Painel-de-fotos.png) repeat-x; height: 284px; margin-top:28px; } .botao{ height: 30px; color:#fff; margin-top:10px; cursor:pointer; } .botao:hover{ background: url(../images/botao_bg.png) no-repeat; background-position: center; } .botao a{ color:#fff; text-decoration: none; } .creditos{ margin-top:17px; } ```
DIV height to fill the rest of the page, with twist
CC BY-SA 2.5
null
2011-03-16T17:44:32.940
2011-06-30T17:00:28.570
2011-03-16T18:35:37.813
82,502
82,502
[ "javascript", "css", "xhtml", "html" ]
5,329,693
1
5,346,391
null
9
1,802
I'm trying to do something like this: ![the layout](https://i.stack.imgur.com/whYFC.jpg) For all the requests to /admin/* I need the page to be decorated using the B decorator but also that B decorator has to be included in the content of A decorator which is main application layout. How can I do that with Sitemesh? Is it even possible? Or do I have to repeat the same layout from A in the B decorator? Thanks in advance
Is it possible to decorate more than once in Sitemesh?
CC BY-SA 2.5
0
2011-03-16T18:05:04.947
2012-07-02T09:19:11.333
null
null
410,946
[ "layout", "sitemesh" ]
5,329,848
1
5,339,234
null
1
7,504
i am trying to create gauss-legendre code according to the following algorithm: for n points ![for n points](https://i.stack.imgur.com/VCebY.png) That is,it is created a 2n equation system (if we demand to be accurate for polynominals of order 2n-1 , ![](https://i.stack.imgur.com/xksml.png) ti are roots of the legendre polynominals of order n.The legendre poynominals are given :![](https://i.stack.imgur.com/eMdM8.png) and wi : ![](https://i.stack.imgur.com/FtOdg.png) My code is : ``` #include <iostream> #include <cstdio> #include <cstdlib> #include <iomanip> #include <cmath> using namespace std; const double pi=3.14; //my function with limits (-1,1) double f(double x){ double y; y=(pi/4.0)*(log((pi*(x+1.0))/4.0 +1.0)); return y; } double legendre (int n){ double *L,*w,*t; double x,sum1,sum2,result; L=new double [n]; w=new double [n]; t=new double [n]; while(n<10){ L[0]=1; L[1]=x; //legendre coef for (int i=1;i<=10;i++){ L[i+1]=((2.0*i+1.0)*x*L[i] - i*L[i-1])/(i+1.0); } //weights w w=0; for (int i=1;i<=10;i++){ w[i]+=(2.0*(1.0-x*x))/(i*i*(L[i-1]*L[i-1])); } //sums w*t for (int i=1;i<=10;i++){ sum1=0.0; //for k=1,3,5,2n-1 for (int k=1;k<=2*n-1;k+=2){ sum1+=w[i]*(pow(t[i],k)); } sum1=0; sum2=0.0;//for k=0,2,4,2n-2 for(int k=0;k<=2*n-2;k+=2){ sum2+=w[i]*(pow(t[i],k)); } sum2=2.0/n; } } result=w*f(*t); return result; } int main() { double eps=1e-8;//accuracy double exact=0.8565899396;//exact solution for the integral double error=1.0; double result; int n=1;//initial point while (fabs(result-exact)>eps) { result=legendre(n); cout <<"\nFor n = "<<n<<",error = "<<fabs(error-exact)<<",value = "<<result; n++; } return 0; } ``` My problems are: 1) The compiler gives me :error: invalid operands of types ‘double*’ and ‘double’ to binary ‘operator*’ --> at result=w*f(*t); 2) I am not sure if i have done the whole thing right.I mean ,if i combined all the things together and if i implemented right the algorithm.
gauss-legendre in c++
CC BY-SA 2.5
null
2011-03-16T18:18:11.707
2011-06-09T07:27:42.540
2011-03-17T13:08:48.247
11,343
583,464
[ "c++", "numerical" ]
5,329,971
1
5,330,341
null
2
436
Sorry if I can't explain with code, I'm newbie with CSS. How can I do this?: ![enter image description here](https://i.stack.imgur.com/ehcyU.jpg) HTML code: ``` <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>CSS DIV issue</title> </head> <body> <div id="div1"> <img src="image-800x216.gif" /> </div> <div id="div2"> <img src="image-567x43.gif" /> </div> </body> </html> ``` Is intended to work with IE (all), Opera, Safari, Chrome and FF. Is possible or I'm dreamer?
Vertical, right and bottom alignment; cross-browser
CC BY-SA 2.5
null
2011-03-16T18:26:57.813
2011-03-19T02:23:26.600
2011-03-16T19:04:17.157
313,758
496,176
[ "html", "css" ]
5,330,228
1
5,332,566
null
0
153
See the figure below for a solution in VS2008 which implements WCF between a Cient and a Host. The Client is a simple Windows Form Application and the Host is a Console Application. I intend to use a Windows Service as the Host, but for now I am using a Console Application for simplicity and debugging. The communication between the two is the DCCService (WCF portion) using netNamedPipeBinding; the Client and Host will all reside on the same machine. Also, I know it is good practice to separate the WCF service from the Host, so that the Host can easily be changed, which is good in my case. ![WCF Setup in VS2008](https://i.stack.imgur.com/b5gJ9.png) Where should the work be done that clients will call? The work I want my service to do is to poll a hardware controller at a set interval constantly in the background. While the DCCService exposes methods to any clients that want to know about this data. Should the hardware controller code (setup(), connect(), work() etc.) be done in DCCService Project or Host Project? If it is done in the Host Project how does the DCCService class grab the data from the Controller class in the Host project? Likewise, how would this be done if Controller class were in DCCService Project? Which is better? I think I am missing something fairly basic here. I appreciate the help or advice. Please let me know if I need to be more clear. Ryan R.
Beginner WCF Setup / Implementation Design Approach
CC BY-SA 2.5
null
2011-03-16T18:48:32.123
2011-03-17T19:33:48.153
2011-03-16T20:01:31.437
723,980
723,980
[ "visual-studio-2008", "wcf", "wcf-client" ]
5,330,310
1
6,433,945
null
0
366
I'm using the FLIR for Wordpress plugin (v0.8.9.2) with FancyFonts enabled. I'm running Wordpress 3.1. The problem I'm having is that it appears the plugin is cutting off a couple pixels off of the end of some of the text that it generates. It doesn't do it for all text, but where it happens, it happens consistently. Here are some examples: ![enter image description here](https://i.stack.imgur.com/eoTf4.png) ![enter image description here](https://i.stack.imgur.com/PQBXb.png) ![enter image description here](https://i.stack.imgur.com/26A6D.gif) In my search for a solution, I've found a number of people with this issue, but never any solutions. Any ideas would be greatly appreciated. Thank you!
Wordpress FLIR (Facelift Image Replacement) plugin clipping off end of text
CC BY-SA 2.5
null
2011-03-16T18:55:45.003
2013-06-12T02:39:06.047
null
null
185,196
[ "wordpress", "image-replacement", "flir" ]
5,330,713
1
null
null
1
350
I am getting a weird text issue in IE caused by my JavaScript. I tried to paste the JavaScript here but it won't format right so instead I dropped it here: [http://pastebin.me/5201856c0083c61e67f40bd19914241f](http://pastebin.me/5201856c0083c61e67f40bd19914241f) I included a screen grab below. Anyone know how to fix this for IE? ![enter image description here](https://i.stack.imgur.com/CXwl5.jpg)
Text Pixilation in IE8
CC BY-SA 2.5
null
2011-03-16T19:30:05.370
2011-03-16T20:31:55.190
null
null
602,108
[ "jquery", "html", "internet-explorer" ]
5,331,208
1
5,342,108
null
4
1,119
i have an example descendant of `TBitmap`: ``` TMyBitmap = class(TBitmap) public constructor Create; override; end; constructor TMyBitmap.Create; begin inherited; Beep; end; ``` At run-time i construct one of these `TMyBitmap` objects, load an image into it, and place it into a `TImage` on the form: ``` procedure TForm1.Button1Click(Sender: TObject); var g1: TGraphic; begin g1 := TMyBitmap.Create; g1.LoadFromFile('C:\...\example.bmp'); Image1.Picture.Graphic := g1; end; ``` Inside of `TPicture.SetGraphic` you can see that it makes a copy of the graphic, by constructing a new one, and calling `.Assign` on the newly constructed clone: ``` procedure TPicture.SetGraphic(Value: TGraphic); var NewGraphic: TGraphic; begin ... NewGraphic := TGraphicClass(Value.ClassType).Create; NewGraphic.Assign(Value); ... end; ``` The line where the new graphic class is constructed: ``` NewGraphic := TGraphicClass(Value.ClassType).Create; ``` correctly calls my constructor, and all is well. --- i want to do something similar, i want to clone a `TGraphic`: ``` procedure TForm1.Button1Click(Sender: TObject); var g1: TGraphic; g2: TGraphic; begin g1 := TMyBitmap.Create; g1.LoadFromFile('C:\...\example.bmp'); //Image1.Picture.Graphic := g1; g2 := TGraphicClass(g1.ClassType).Create; end; ``` Except this never calls my constructor, nor is it calling `TBitmap` constructor. It's only calling `TObject` constructor. After construction: ``` g2.ClassName: 'TMyBitmap' g2.ClassType: TMyBitmap ``` The type is right, but it doesn't call my constructor, but identical code elsewhere does. --- Even in this hypothethetical contrived example it's still a problem, because the constructor of `TBitmap` isn't being called; internal state variables are not being initialized to valid values: ``` constructor TBitmap.Create; begin inherited Create; FTransparentColor := clDefault; FImage := TBitmapImage.Create; FImage.Reference; if DDBsOnly then HandleType := bmDDB; end; ``` --- The version in TPicture: ``` NewGraphic := TGraphicClass(Value.ClassType).Create; ``` decompiles to: ``` mov eax,[ebp-$08] call TObject.ClassType mov dl,$01 call dword ptr [eax+$0c] mov [ebp-$0c],eax ``` My version: ``` g2 := TGraphicClass(g1.ClassType).Create; ``` decompiles to: ``` mov eax,ebx call TObject.ClassType mov dl,$01 call TObject.Create mov ebx,eax ``` ## Update One Pushing the "cloning" to a separate function: ``` function CloneGraphic(Value: TGraphic): TGraphic; var NewGraphic: TGraphic; begin NewGraphic := TGraphicClass(Value.ClassType).Create; Result := NewGraphic; end; ``` doesn't help. ## Update Two Clearly, i'm clearly providing a clear screenshot clearly of my clearly code that clearly shows that my clearly code is clearly all there clearly is. Clearly: ![enter image description here](https://i.stack.imgur.com/t3BZ5.png) ## Update Three Here's an unambigious version with `OutputDebugString`s: ``` { TMyGraphic } constructor TMyBitmap.Create; begin inherited Create; OutputDebugStringA('Inside TMyBitmap.Create'); end; function CloneGraphic(Value: TGraphic): TGraphic; var NewGraphic: TGraphic; begin NewGraphic := TGraphicClass(Value.ClassType).Create; Result := NewGraphic; end; procedure TForm1.Button1Click(Sender: TObject); var g1: TGraphic; g2: TGraphic; begin OutputDebugString('Creating g1'); g1 := TMyBitmap.Create; g1.LoadFromFile('C:\Archive\-=Images=-\ChessvDanCheckmateIn38.bmp'); OutputDebugString(PChar('g1.ClassName: '+g1.ClassName)); OutputDebugStringA('Assigning g1 to Image.Picture.Graphic'); Image1.Picture.Graphic := g1; OutputDebugString('Creating g2'); g2 := Graphics.TGraphicClass(g1.ClassType).Create; OutputDebugString(PChar('g2.ClassName: '+g2.ClassName)); OutputDebugString(PChar('Cloning g1 into g2')); g2 := CloneGraphic(g1); OutputDebugString(PChar('g2.ClassName: '+g2.ClassName)); end; ``` And the raw results: ``` ODS: Creating g1 Process Project2.exe ($1138) ODS: Inside TMyBitmap.Create Process Project2.exe ($1138) ODS: g1.ClassName: TMyBitmap Process Project2.exe ($1138) ODS: Assigning g1 to Image.Picture.Graphic Process Project2.exe ($1138) ODS: Inside TMyBitmap.Create Process Project2.exe ($1138) ODS: Creating g2 Process Project2.exe ($1138) ODS: g2.ClassName: TMyBitmap Process Project2.exe ($1138) ODS: Cloning g1 into g2 Process Project2.exe ($1138) ODS: g2.ClassName: TMyBitmap Process Project2.exe ($1138) ODS: g1.ClassName: TMyBitmap Process Project2.exe ($1138) ``` And the formatted results: ``` Creating g1 Inside TMyBitmap.Create g1.ClassName: TMyBitmap Assigning g1 to Image.Picture.Graphic Inside TMyBitmap.Create Creating g2 g2.ClassName: TMyBitmap Cloning g1 into g2 g2.ClassName: TMyBitmap g1.ClassName: TMyBitmap ``` ## Update Four i tried turning off all compilers options i could: ![enter image description here](https://i.stack.imgur.com/PLCQc.png) Don't turn off `Extended syntax`. Without it you cannot assign the `Result` of a function (). ## Update Five Following @David's suggestion, i tried compiling the code on some other machines (all Delphi 5): - - - - - - - [Here's the source.](http://www.jet2.net/~iboyd/CannotCloneTGraphic.zip)
Delphi: Construction not calling overridden virtual constructor
CC BY-SA 2.5
null
2011-03-16T20:14:15.340
2011-03-17T16:40:42.197
2011-03-17T13:45:18.027
12,597
12,597
[ "delphi", "constructor", "virtual", "delphi-5" ]
5,331,417
1
5,331,557
null
1
4,702
Hello all I am trying to work through (learn) MVC3 and I was playing aroudn with formatting my view using CSS. When using html / webforms have been able to use div tags and apply to that div teh approiate css style. When using MVC adn creating the layout in my view I have found that multiple CSS styles are not being inheritted. for example: (sorry for the image but razor syntax seemed to fail on the code cut/paste ![enter image description here](https://i.stack.imgur.com/JsYnO.gif) In the above I had a div tag for certain sections. however when I used the class property ``` <div class="myfirststyle" >some content</div> ``` for each of these div tags only the first one would be detected. The remaining div tags seemed to inherit from the main body style. also defined in the main CSS file. Can anyone point me to some information on how to setup and style div tags within a view using CSS instead of the stylel property as shown in the above image OR is this correct as you cannot directly call CSS styles from a view as they are only recognized by the page layout.cshtml or masterpage? Thanks in advance : to help troubleshoot what is happening please refer to the following Code within the view (using razor engine) ![enter image description here](https://i.stack.imgur.com/jTP4I.png) code within the CSS ![code within the CSS](https://i.stack.imgur.com/I4p4I.png) output from developer toolbar notice how first div layer attributes are detected ![enter image description here](https://i.stack.imgur.com/65YSE.png) output from developer toolbar notice now how image div does not have a style applied ![enter image description here](https://i.stack.imgur.com/oqUIr.png) What is interesting is that when viewing the source in html you can still see the CSS tags within the DIV tags they are just not being picked up or inherited for some reason after the first node/div tag Thanks again for any pointers
Help with using CSS id/class id's within MVC3
CC BY-SA 2.5
null
2011-03-16T20:36:18.240
2011-03-17T19:14:29.870
2011-03-17T16:00:13.457
10,202
290,645
[ "html", "css", "asp.net-mvc", "asp.net-mvc-3" ]
5,331,627
1
5,333,337
null
2
992
I need to separate ViewModels in my MVC project from my business models (Data access layer) which lives in a separate library. Assume that I have Database Access Layer classes in a separate library. Our primary project (MVC) does know nothing about those classes and they talk to each other through an Interface. It’s easy enough to use IOC and resolve dependency injection using Ninject or something, right? Now DataAccessLayer contains class named Car with properties Engine and Wheel. In my MVC project (which doesn’t know nothing about DataAccessLayer and its classes) I need to use some Car objects. So I have another Car class (it’s just a pure ViewModel) and it has the same properties – Engine and Wheel (of course in real app there will be some differences between model and viewmodel, for the sake of simplicity let’s ignore that) IDataAccessLayer Interface has a method called IEnumerable GetAllCars() that returns list of DataAccessLayer.Car objects. ![enter image description here](https://i.stack.imgur.com/OZjmE.jpg) Now I need to create MVCProject.Car collection, iterate through IEnumerable which was returned by GetAllCars(), on every iteration I need to create a new MVCProject.Car object, populate Engine and Wheel properties, and finally add that object to the Collection. So: everytime I have to create almost the same structures and somehow manage them in different places. Here is the problem, see? Or it isn’t? I feel like it will end up into big mess if I don’t change that. Don’t repeat yourself principle violation as it is. Tell me please how to make it right. Using I don’t know proxies or prototypes or maybe some other design pattern which I suck anyway. Or some sort of a tool like Ninject (which I only know how to use as IOC container) or Automapper or whatever, which I probably will suck even more than I suck in design patterns.
Design patterns advice - separating ViewModels from domain models
CC BY-SA 2.5
0
2011-03-16T20:54:14.037
2011-03-17T00:11:52.157
2011-03-16T23:42:53.970
358,970
116,395
[ "c#", "design-patterns", "architecture", "asp.net-mvc-3", "dependency-injection" ]
5,332,117
1
5,332,278
null
2
5,778
I am producing graphics for a process control system and I would like to create a system border which would visually wrap the various sub system being displayed in the process mimic. I could use a regular border for this except I want it to not only changing color reflecting system status, but also popping up small "balloons" indicating the piece of the system that is in alarm state. ![Process Mimic](https://i.stack.imgur.com/IoI4u.png) I created a test project with a User Control and added a ListBox (for the balloons) and a ContentPresenter element wrapped in a border control. However, whenever I use this new control in another app, it wont allow me to add content to it. I've tried messing some with the ContentPropertyAttribute and properties of the ContentPresenter element, but I feel I am in the blind here. ``` <UserControl x:Class="SystemStatusBorder.UserControl1" 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" d:DesignHeight="300" d:DesignWidth="300"> <Canvas Height="290" Width="303"> <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <ContentPresenter/> </Border> <ListBox Canvas.Right="0" Canvas.Bottom="0"> <ListBox.RenderTransform> <TranslateTransform X="20"></TranslateTransform> </ListBox.RenderTransform> <ListBoxItem>TagA</ListBoxItem> <ListBoxItem>TagB</ListBoxItem> </ListBox> </Canvas> </UserControl> ``` I don't get it. What more should it need other than just the existence of a contentpresenter? UserControl subclasses ContentControl so I would have thought the wiring was in place. Eventually, I want it to be used something like this: ``` <SystemBorder> <SystemBorder.MonitoredTags> <List of relevant tags for the specific sub system goes here> </SystemBorder.MonitoredTags> <regular content goes here> </SystemBorder> ```
WPF User Control extending border class. "Does not support direct content"?
CC BY-SA 2.5
0
2011-03-16T21:36:15.170
2011-03-17T05:32:48.023
null
null
80,577
[ "wpf", "xaml", "wpf-controls" ]
5,332,152
1
5,332,324
null
1
281
Consider this Matrix: ![enter image description here](https://i.stack.imgur.com/OQ7oM.gif) I have been thinking for a while what could be a good example for each IO-Model. What i get so far: - - - - I would like to know with some help of you guys if my thoughts are right and if you could help me understanding each Model. Thanks! Asynchronous
Help understanding IO-Models
CC BY-SA 2.5
0
2011-03-16T21:39:37.557
2011-10-02T18:31:12.727
2011-10-02T18:31:12.727
416,224
563,679
[ "io", "nonblocking" ]
5,332,212
1
5,334,717
null
3
823
I'm working on a sketch search engine that correlates whatever someone's sketching with a picture in the database (the db is just about 40 pictures now). I'm doing this mostly for fun so I'm not that well-versed in computer imaging techniques. First of all, are there any rules of thumb on how one should create histograms (bin sizes, ranges, etc)? I'm using some histogram code found at [http://www.scribd.com/doc/6194304/Histograms](http://www.scribd.com/doc/6194304/Histograms) (but ported to JavaCV). Sometimes I get good results, sometimes I get bad results, most of the time I get "meh" results. I've been experimenting a TON with bin sizes and ranges and I'm wondering if comparing higher dimensional histograms may be the answer here. Second of all, it seems that black makes a very strong presence in my current histogram setup (even a black dot shifts the entire result set). Should this be expected? Or did I screw something up? Example: ![enter image description here](https://i.stack.imgur.com/dqRSE.png) And after the dot: ![enter image description here](https://i.stack.imgur.com/FhGQE.png) Note how I'm already getting pictures of "earthrise" as "close" matches. I'm also wondering what methods I should use for blob or feature analysis. I think that stuff like SURF may be overkill because I only want to broadly compare blobs, not accurately map templates. Is there any way I can compare the edges after being passed through a Canny filter? (Low complexity if possible): ![enter image description here](https://i.stack.imgur.com/w2X99.png) For example, here, I want the two smiley faces to be at the top because the needle smiley "blob" is more closely related to the smily face shape than to a bunch of passion fruit or a galaxy. Phew long question. If you want to try out the engine for yourself, go to [http://skrch.dvt.name/](http://skrch.dvt.name/) (shameless plug, I know, I know -- only works in FF/Chrome/Safari). Maybe more experienced computer vision people can make suggestions based on results. Oh, I'm using the `CV_COMP_BHATTACHARYYA` distance when comparing histograms (it seemed that it gave the best results although chi-square isn't bad either).
Feature/blob correlation and histogram analysis
CC BY-SA 2.5
0
2011-03-16T21:46:19.580
2011-03-21T01:05:59.110
2011-03-16T22:05:17.620
243,613
243,613
[ "java", "language-agnostic", "opencv", "histogram", "surf" ]
5,332,441
1
5,335,698
null
0
1,581
I have a page like this ![Ödeme](https://i.stack.imgur.com/6knEh.jpg) Baş Tar. --> `Start Date` Bit. Tar --> `End Date` I have a `SQL` like this for this page, ``` SELECT B.HESAP_NO, B.TEKLIF_NO1 + '/' + B.TEKLIF_NO2 AS 'TEKLIF',B.MUS_K_ISIM, dbo.fngcodeme(B.HESAP_NO, B.DOVIZ_KOD, B.TEKLIF_NO1 + '/' + B.TEKLIF_NO2,'01/01/2011', '11/03/2011') AS 'YATAN', (CASE WHEN B.DOVIZ_KOD = 21 THEN 'EUR' WHEN B.DOVIZ_KOD = 2 THEN 'USD' WHEN B.DOVIZ_KOD = 1 THEN 'TL' END) AS 'KUR', D.AVUKAT, (CASE WHEN D.HESAP IN (SELECT T_HESAP_NO FROM TAKIP) THEN (SELECT CONVERT(VARCHAR(10),ICRA_TAR,103) FROM TAKIP WHERE T_HESAP_NO = D.HESAP) ELSE ' ' END) AS 'ICRA TARİHİ', (CASE WHEN D.HESAP IN (SELECT T_HESAP_NO FROM TAKIP) THEN (SELECT CONVERT(VARCHAR(10),HACIZ_TAR,103) FROM TAKIP WHERE T_HESAP_NO = D.HESAP) ELSE '' END) AS 'HACİZ TARİHİ' FROM YAZ..MARDATA.S_TEKLIF B, AVUKAT D WHERE B.HESAP_NO = D.HESAP AND B.KAPANIS_TAR IS NULL AND ISNULL(dbo.fngcodeme(B.HESAP_NO, B.DOVIZ_KOD, B.TEKLIF_NO1 + '/' + B.TEKLIF_NO2,'01/01/2011', '11/03/2011'),0) > 0 GROUP BY B.HESAP_NO, B.TEKLIF_NO1 + '/' + B.TEKLIF_NO2,B.DOVIZ_KOD ,B.MUS_K_ISIM, D.AVUKAT, D.HESAP ``` And this is my `dbo.fngcodeme` Function, ``` ALTER FUNCTION [dbo].[fngcodeme] ( @HESAP INT, @DOV INT, @TEKLIF VARCHAR(10), @BAS VARCHAR(10), @BIT VARCHAR(10) ) RETURNS FLOAT AS BEGIN DECLARE @Result FLOAT SET @Result = (SELECT SUM(TUTAR) FROM YAZ..MARDATA.M_GHAREKET WHERE TEMEL_HESAP = @HESAP AND DOVIZ_KOD = @DOV AND REF_KOD = 'GC' AND BACAK_GRUP = 'PERT' AND ISL_KOD = 1 AND ACIKLAMA LIKE '%' + @TEKLIF + '%' AND ISL_TAR >= CONVERT(DATETIME, + '' + @BAS + '',103) AND ISL_TAR <= CONVERT(DATETIME, + '' + @BIT + '',103) ) RETURN @Result END ``` What i want is ``` IF `Bit. Tar. (End Date)` is less or equal then 28/02/2011 --> Use M_HAREKET(table) IF Baş. Tar. (Start Date) is great or equal then 01/03/2011 --> Use M_GHAREKET(table) ``` How can i do that? Should i change `SQL` or `Function`? Which one?
Using IF in SQL Function with 2 Table
CC BY-SA 2.5
0
2011-03-16T22:08:49.210
2011-03-17T07:04:31.857
null
null
447,156
[ "sql", "sql-server", "database", "function" ]
5,332,616
1
5,332,770
null
26
13,923
I realize there are other questions on SO regarding animations and progressbars, but they seem to revolve around getting rid of the animation drawn on top of the progress bar, ie. the highlight that travels over it. What I want to do is to get rid of the animation that is used when I set the new value of the progress bar. The problem I have now is that the action that is running completes and then the progress bar continues to increase up to their max position the action has completed. In other words, if I set the Value property of the progressbar to 50, I want it to travel to the halfway position (if max is 100) immediately, not slowly build up the progressbar to that position as it does now. If there is indeed a question on SO that already deals with this, just close as duplicate and I'll happily delete it, but I could not find any. This is the one I found: [Disabling WinForms ProgressBar animation](https://stackoverflow.com/questions/2834761/disable-winforms-progressbar-animation), and it deals with the highlight that is animated, and that's not what I'm talking about. Here's a simple [LINQPad](http://linqpad.net) demo that shows the problem: ``` void Main() { using (var fm = new Form()) { var bt = new Button { Text = "Start", Location = new Point(8, 8), Parent = fm, }; var pb = new ProgressBar { Top = bt.Top + bt.Height + 8, Width = fm.ClientRectangle.Width - 16, Left = 8, Parent = fm }; bt.Click += (s, e) => { bt.Enabled = false; Thread t = new Thread(new ThreadStart(() => { Thread.Sleep(1000); bt.BeginInvoke(new Action(() => { pb.Value = 50; })); Thread.Sleep(1000); bt.BeginInvoke(new Action(() => { pb.Value = 100; })); bt.BeginInvoke(new Action(() => { bt.Enabled = true; })); })); t.Start(); }; fm.ShowDialog(); } } ``` This is Windows 7, Glass theme, so yes, I bet this is specific to 7 or possibly also Vista. Here's a GIF-animation that shows the problem, the project from above. You can see that as soon as the button becomes enabled, 1 second after the halfway mark has been set, the progressbar animates up to 100%, the button has become enabled. As you can see above, setting the button back to enabled and setting the progressbar to 100 is done "at the same time". Basically, I don't want the progressive buildup of the progressbar, I want it to jump directly to 50% and then to 100% at the same time as the button becomes enabled. ![LINQPad demo](https://i.stack.imgur.com/OB3F2.gif) --- In response to David Heffernan's answer, this is how I changed the above code: ``` bt.BeginInvoke(new Action(() => { pb.Value = 51; pb.Value = 50; })); Thread.Sleep(1000); bt.BeginInvoke(new Action(() => { pb.Maximum = 101; pb.Value = 101; pb.Maximum = 100; pb.Value = 100; })); ```
Disabling .NET progressbar animation when changing value?
CC BY-SA 2.5
0
2011-03-16T22:28:18.867
2019-06-05T18:36:31.377
2017-05-23T12:34:26.463
-1
267
[ ".net", "winforms", "animation", "progress-bar" ]
5,332,715
1
5,367,297
null
0
1,347
How does one order the bar chart series to render from most to least? Ordering the data before binding does not seem to help. ![bar chart that that is rendering least to most](https://i.stack.imgur.com/rCKab.png) My code: ``` chart.Series.Add("port"); chart.Series["port"].Type = SeriesChartType.Bar; chart.Series["port"]["PointWidth"] = "0.6"; chart.Series["port"]["BarLabelStyle"] = "Center"; chart.Series["port"].ShowLabelAsValue = true; chart.Series["port"].Points.DataBind(myData, "Key", "Value", "Label=Value{p2}"); chart.Series["port"].BorderStyle = ChartDashStyle.Solid; chart.Series["port"].BorderColor = Color.White; chart.Series["port"].BorderWidth = 1; chart.Series["port"].ShowLabelAsValue = true; chart.Series["port"].Font = myfont; chart.ChartAreas.Add("Default"); chart.ChartAreas["Default"].BackColor = Color.Transparent; foreach (var axis in chart.ChartAreas["Default"].Axes) { axis.LabelStyle.Font = myfont; axis.MajorGrid.Enabled = false; } chart.ChartAreas["Default"].AxisX.Interval = 1; chart.ChartAreas["Default"].AxisY.LabelStyle.Format = "p0"; ```
How do I render a Dundas bar chart from most to least?
CC BY-SA 2.5
null
2011-03-16T22:39:56.023
2011-03-20T07:39:36.313
2011-03-18T14:59:32.110
8,088
8,088
[ "mschart", "dundas" ]
5,333,165
1
null
null
1
709
Below is a portion of relational data base. I know how to create table Film and assign primary key to it.. but don't understate creating other tables and assigning primary key to it. Any help? ![enter image description here](https://i.stack.imgur.com/4olfE.png) table `Film` ``` CREATE TABLE Film ( Id INTEGER PRIMARY KEY, Title VARCHAR(35) NOT NULL, Description VARCHAR(256) NOT NULL, Year INTEGER NOT NULL CHECK (Year > 1900), Rating INTEGER NOT NULL DEFAULT 3 CHECK (Rating BETWEEN 1 AND 5) ); ``` how do I create table `FilmFormat` and `OrderItem` ?
How do I create this relational table?
CC BY-SA 3.0
null
2011-03-16T23:45:20.507
2017-12-15T21:45:43.413
2017-01-03T20:48:03.633
4,370,109
656,285
[ "mysql", "database-design", "datatable" ]
5,333,217
1
5,399,001
null
1
1,855
I am using version Galleria 1.2, which I know is a bit out of date, and I am having issues with IE7 and IE8. FireFox works correctly. I tried to upgrade to 1.2.2 but ran into other issues which I will have to deal with later due to time constraints. The problem is that the background of the lightbox opens up black instead of 50% opacity. If I click on the image a second time, the lightbox opens up correctly. First click: ![enter image description here](https://i.stack.imgur.com/JDQkF.png) Second click: ![enter image description here](https://i.stack.imgur.com/TJwht.png) My code: ``` <script type="text/javascript" src="~/content/js/galleria.js"></script> <script type="text/javascript">Galleria.loadTheme('~/content/css/Galleria/galleria.classic.js');</script> $('#imageGallery').galleria({ debug: true, width: 300, height: 225, showInfo: false, showCounter: false, showImagenav: false, data_source: data, on_image: function(image, thumb) { var gallery = this; $(image).click( function() { gallery.openLightbox(); }); } }); ``` Here's the page request using Fiddler which seems to show the css file being loaded: ![enter image description here](https://i.stack.imgur.com/t94gq.png) If I load the css myself prior to the component loading, I get this: ![enter image description here](https://i.stack.imgur.com/jetKe.png) I am not sure how to fix it. Thank you!
Galleria & LightBox IE7 & IE8 css issue
CC BY-SA 3.0
0
2011-03-16T23:51:57.460
2012-01-11T19:31:16.433
2012-01-11T19:31:16.433
131,818
131,818
[ "jquery", "css", "internet-explorer-8", "internet-explorer-7", "galleria" ]
5,333,386
1
5,333,435
null
0
1,400
Is there anyway I can control the way the select box displays. Currently it is showing as below, here I want see select box downwards. That is after text "Test:" I want to see "Select" and the entire box should go down. Is it possible? ![enter image description here](https://i.stack.imgur.com/45lck.png) And here is my code for this: ``` Test: <select multiple="multiple" size="5"> <option value="none" selected >Select</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> <option value="audi">Honda</option> <option value="audi">Toyota</option> <option value="audi">BMW</option> </select> ```
HTML Select box display question
CC BY-SA 2.5
null
2011-03-17T00:21:38.320
2011-03-17T00:42:24.810
null
null
322,492
[ "jquery", "html", "jquery-ui" ]
5,333,391
1
5,832,776
null
4
4,080
I need to have total control of the perspective menu. I already hacked into the platform to disable the CONTEXT menu: ``` private void disablePerspectiveToolbarMenu() { PerspectiveBarManager perspectiveBarManager = ((WorkbenchWindow) PlatformUI.getWorkbench().getActiveWorkbenchWindow()).getPerspectiveBar(); if (perspectiveBarManager!=null){ ToolBar toolBar = perspectiveBarManager.getControl(); Listener[] listeners = toolBar.getListeners(SWT.MenuDetect); if (listeners != null){ for (Listener listener : listeners){ toolBar.removeListener(SWT.MenuDetect, listener); } } } } ``` . There is one option that is always present that gives access to a Perspective List Shell. I need to remove that option from the menu. It's a shame that the perspective menu is totally out of user control. I just need to have the perspectives added to the menu, and nothing more! Thanks. ![enter image description here](https://i.stack.imgur.com/AZI4V.png)
Eclipse RCP: How to configure the Perspective Menu?
CC BY-SA 2.5
0
2011-03-17T00:22:15.057
2022-07-18T20:11:23.707
2022-07-18T20:11:23.707
15,168
130,028
[ "menu", "eclipse-rcp", "perspective" ]
5,333,731
1
5,340,528
null
5
4,297
I cannot figure out how I can setup a form that will create a new `Study` while also creating the related `StudySubject` and the `Facility`. The `user_id`, `facility_id` and `study_subject_id` have to be available to create the `Study` object as you can see in the database relation model. ![Database model](https://i.stack.imgur.com/mTSca.png) Here is the migration for the `studies`. The other tables do not contain foreign keys. ``` def self.up create_table :studies do |t| t.references :user t.references :facility t.references :subject t.date "from" t.date "till" t.timestamps end add_index :studies, ["user_id", "facility_id", "subject_id"], :unique => true end ``` The models define the following associations. ``` # user.rb has_many :studies # subject.rb has_many :studies # facility.rb has_many :studies # study belongs_to :user belongs_to :subject belongs_to :facility ``` 1) Are the `has_many` and `belongs_to` definitions correct? 2) How can I create a `study` using [accepts_nested_attributes_for](http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html)? 3) A study should only belong to one user. Do I need to add the `user_id` into every other object to store the association?
How to create nested objects in Rails3 using accepts_nested_attributes_for?
CC BY-SA 2.5
0
2011-03-17T01:11:08.967
2011-03-17T17:29:30.627
2011-03-17T12:45:41.627
356,895
356,895
[ "ruby-on-rails-3", "associations", "nested-forms", "database-relations" ]
5,333,784
1
null
null
0
555
I'm having a problem with my sliding tabs in IE7. I'm using these sliding tabs ([http://www.queness.com/post/274/jquery-sliding-tab-menu-for-sidebar-tutorial](http://www.queness.com/post/274/jquery-sliding-tab-menu-for-sidebar-tutorial)) You can see the problem on my site ([http://wpmaniac.com/leetpress/](http://wpmaniac.com/leetpress/)) in the sidebar under "Latest Reviews". The sliding tabs are working fine in all other browsers. I can't seem to figure out what the problem is in IE7. Here's a screenshot of what's wrong in IE7: ![IE7 fails](https://i.stack.imgur.com/TEbtO.jpg) Thanks
IE7 problem with Sliding Tabs
CC BY-SA 2.5
null
2011-03-17T01:19:29.870
2011-03-17T01:48:52.290
2011-03-17T01:48:52.290
464,744
442,559
[ "jquery", "internet-explorer-7", "tabs", "slider" ]
5,333,828
1
14,636,370
null
0
696
I have a control that looks similar to the following: ![Controls](https://i.stack.imgur.com/NL7bC.png) I need to add slightly round ends where all that extra end space is. I'm not sure how to add these. It should look similar to the round ends on [this page.](http://www.Apple.com) (At the top) Thanks!
Drawing complex shapes onto a form. (.net)
CC BY-SA 2.5
null
2011-03-17T01:25:08.593
2013-01-31T22:32:28.087
null
null
595,437
[ "vb.net", "drawing" ]
5,333,894
1
5,334,032
null
0
130
Sorry this is probably a really silly question but I am developing a WPF form on a Windows 7 machine with VS2010 yet when running the application the form still looks like a standard WinForms window. I am assuming that it requires an extra component installed on the system to be displayed as shown in the designer? PS: To be more specific what I am referring to is basically the outline and border. ![Designer](https://i.stack.imgur.com/fjUmJ.png) ![Running](https://i.stack.imgur.com/C5B63.png)
WPF form displaying as winform
CC BY-SA 2.5
null
2011-03-17T01:35:49.970
2011-03-17T02:00:26.873
2011-03-17T01:53:27.463
314,661
314,661
[ "c#", "wpf", "windows-7", "rendering" ]
5,333,899
1
5,428,555
null
1
1,851
I'm trying to use jQuery the fullcalendar plugin to create a schedule view for inventory item bookings, but I'm having some difficulties. Inside the system, a user can create a booking for an item between a given start and end date. By default, treating a booking for an item as an event, I can use fullcalendar to display any items that have bookings in a calendar, as in the following screenshot.![enter image description here](https://i.stack.imgur.com/B6pQw.png) This is pretty straight forward, however the preferred functionality would be to have a list of all items down the side as a legend (with or without bookings), then for any items that have bookings, display the event. The best way for me to explain this is to show a mockup of what I'd like to do: ![enter image description here](https://i.stack.imgur.com/vBlDQ.png) I've mucked around with fullcalendar but I can't seem to be able to get it to display the items down the side like in my screenshot. I've searched for examples / other plugins but I haven't been able to find anything that implements this kind of functionality. For the time being I'm not fussed about having the empty items displayed, I'm sure that wouldn't be too hard to achieve later, but for now I would just like to get the items displayed down the side. Has anyone seen anything like this, or have any examples or ideas that could put me on the right track to solving this problem? Thanks in advance!
jQuery fullcalendar - display event title down side
CC BY-SA 2.5
null
2011-03-17T01:36:11.253
2011-03-25T04:29:01.787
null
null
551,093
[ "jquery", "fullcalendar" ]
5,334,110
1
5,334,143
null
3
19,961
I need to create a bash script which will connect to an FTP server, upload a file and close the connection. Usually this would be an easy task but I need to specify some specific proxy settings which is making it difficult. I can connect to the FTP fine using a GUI client i.e. Filezilla with the following settings: ``` Proxy Settings -------------- FTP Proxy : USER@HOST Proxy Host: proxy.domain.com Proxy User: blank Proxy Pass: blank ``` ![Proxy Settings](https://i.stack.imgur.com/fIZUx.png) ``` FTP Settings ------------ Host : 200.200.200.200 Port : 21 User : foo Pass : bar ``` ![FTP Settings](https://i.stack.imgur.com/j9GIE.png) What I can't seem to do is replicate these settings within a text based ftp client i.e. ftp, lftp etc. Can anyone help with setting this script up? Thanks in advance!
Text based FTP client settings behind a proxy
CC BY-SA 2.5
null
2011-03-17T02:12:52.587
2011-03-17T03:44:29.097
2011-03-17T02:40:36.233
null
null
[ "linux", "proxy", "ftp", "fedora" ]
5,334,198
1
5,334,295
null
1
164
I can't for the life of me figure out why specifying a image as a background for a link that it would look like this for IE and look the way it should for every other browser. The top image is IE and the bottom is every other browser. Look at the text, it is supposed to have a transparent PNG behind it and I set it to repeat. Here is the URL if you want to see the code: [http://flesheatingzipper.com](http://flesheatingzipper.com) ![enter image description here](https://i.stack.imgur.com/txIRT.jpg)
CSS Issue in IE Only
CC BY-SA 2.5
null
2011-03-17T01:26:40.203
2011-03-17T03:03:26.410
null
null
663,668
[ "css", "internet-explorer" ]
5,334,194
1
null
null
4
6,488
I have created following Custom Preference Screen. ![enter image description here](https://i.stack.imgur.com/6uIum.png) I want to add Listener on Button1 and Button2. How should I do it? I am using following code for creating above Preference Screen. DemoPref: ``` import android.app.Activity; import android.content.Intent; import android.os.Bundle; public class DemoPref extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); startActivity(new Intent(this, MyPref.class)); } } ``` MyPref: ``` import android.os.Bundle; import android.preference.PreferenceActivity; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class MyPref extends PreferenceActivity{ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); //setContentView(R.layout.tftp_setting); this.addPreferencesFromResource(R.xml.list_pref); /*Button b1 = (Button)findViewById(R.id.button1); b1.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v) { Log.i("MyPref", "Button1 one is clicked."); } }); Button b2 = (Button)findViewById(R.id.button2); b2.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v) { Log.i("MyPref", "Button2 one is clicked."); } });*/ } } ``` res\layout\setting.xml: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:text="TextView1" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> <EditText android:text="EditText2" android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content"></EditText> </LinearLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:text="TextView2" android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> <EditText android:text="EditText2" android:id="@+id/editText2" android:layout_height="wrap_content" android:layout_width="wrap_content"></EditText> </LinearLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:text="Button1" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button> <Button android:text="Button2" android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button> </LinearLayout> </LinearLayout> ``` res\xml\pref.xml: ``` <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen android:title="My Setting" android:layout="@layout/setting" android:summary="This is my setting."></PreferenceScreen> </PreferenceScreen> ```
Custom PreferenceScreen with clickable buttons
CC BY-SA 3.0
null
2011-03-17T02:26:53.050
2012-12-05T05:46:55.370
2012-08-21T09:59:06.197
165,674
484,073
[ "android", "preferences", "android-preferences", "preferencescreen" ]
5,334,346
1
5,334,603
null
1
571
I have a controller view. This controller has a PDFView as a subview and another subview which is like a controller to the pdf. ![image](https://i.stack.imgur.com/vW0iJ.png) The problem is that if I do the following in the controller: ``` self.view addSubview:pdfView]; [self.view addSubview:pdfController]; ``` The pdfController lays on the pdfView, but it will scroll with the pdf if you scroll it. I want to make pdfController view to be immobile and to just sit on the pdfView. Does anyone know how to get this behavior?
Adding subview to view with a PDFView as a subview
CC BY-SA 3.0
null
2011-03-17T02:47:02.183
2012-04-25T20:11:40.437
2012-04-25T20:11:40.437
1,028,709
144,268
[ "cocoa", "macos", "nsview" ]
5,334,405
1
5,337,037
null
1
3,676
i have a jqgrid and when i double click a row, i call jquery blockui as i load a dialogue. In every browser the blockUI loading message shows up in the middle of the jqgrid perfectly but in IE8 it shows at the bottom of the grid all the way to the left and not overlaying: ![enter image description here](https://i.stack.imgur.com/Er63T.png) If i put ie8 into compatibility mode it seems to work fine. Is there any reason why jquery blockui can center the loading message properly in IE8 ?
jquery blockui working strange with IE8
CC BY-SA 2.5
null
2011-03-17T02:58:47.827
2014-02-07T11:34:51.067
2011-03-17T03:21:54.170
4,653
4,653
[ "jquery", "internet-explorer-8", "jqgrid", "jquery-blockui" ]
5,334,423
1
5,334,437
null
0
138
I started doing things on android development and the screen isn't showing what it supposed to show. Is showing what i supposed to look like on the graphical layout but on the emulator i just shows "Android" ![Emulator](https://i.stack.imgur.com/ud9Op.png) ![Graphical layout](https://i.stack.imgur.com/HWqBY.png)
Android Application Screen problem
CC BY-SA 2.5
null
2011-03-17T03:00:52.783
2013-03-16T02:59:18.840
2013-03-16T02:59:18.840
918,414
630,040
[ "android", "mobile", "mobile-phones" ]
5,334,637
1
5,334,682
null
12
25,113
I am getting an error, when running a webpage on IE8. When I click on the error found, it says: ![enter image description here](https://i.stack.imgur.com/v611Z.png) How can I go to this line to see where the error is happening? I can't see this error on any other browser. Also, it says: > line 109213803. I don't understand this, as obviously I don't have so many lines of code. Can someone explain what IE8 is telling me here?
how to debug javascript errors on IE8
CC BY-SA 3.0
0
2011-03-17T03:43:18.960
2014-09-11T16:12:43.260
2014-09-11T16:12:43.260
1,291,492
4,653
[ "javascript", "jquery", "debugging", "internet-explorer-8" ]
5,334,664
1
5,334,702
null
0
85
I wanted so much help from you guys :( ok, my problem is how to create a query that satifies my needs.. I have 3 Tables namely `TableA(ColID, ColName, ColRec)`, `TableB (ColRec, bID)`, and `TableC(bID, xGrade, xTake, ColID)`. ![enter image description here](https://i.stack.imgur.com/FhRIC.jpg) When I search for the `ColID` from `TableA` I want to display all `xGrade` from `TableC` like this below: ![enter image description here](https://i.stack.imgur.com/8ZBQK.jpg) but instead of above result I get this: ![enter image description here](https://i.stack.imgur.com/rtoEr.jpg) It also displays all records that matches `bID` from `TableB` and `bID` from `TableC`. I can't finish my project without this query :( please help me guys.. Thanks in advance!
SQL Server Query problem
CC BY-SA 2.5
null
2011-03-17T03:49:07.947
2011-03-17T05:59:01.527
2011-03-17T05:58:16.753
13,302
491,243
[ "sql", "sql-server", "tsql" ]
5,335,196
1
5,335,241
null
0
1,090
I am getting this error when running a webpage in internet explorer 8 (not sure if it matters but it happens when I load up a jquery ui dialog) ![enter image description here](https://i.stack.imgur.com/udeqC.png) When I click yes, it brings up the IE8 javascript debugging tools but what is weird is that it shows the error being on the doctype line . . ![enter image description here](https://i.stack.imgur.com/F4H2g.png) Can anyone explain what IE is trying to tell me and how I can debug this?? ## Update: in response to folks saying i need to remove the blank line at the top, here is my code. There is no extra blank line on anything in my site.master file so i don't understand what it would take to remove this blank line that i see when i view source in IE8. ``` <%@ Import Namespace="DomainModel" %> <%@ Import Namespace="Mvc.Views.OrganisationalUnit" %> <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage<Mvc.ViewModels.BaseViewModel>" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> ```
In IE8, why am I getting a javascript error on my DocType line
CC BY-SA 2.5
null
2011-03-17T05:22:33.310
2011-03-22T05:52:08.493
2011-03-17T11:40:03.113
4,653
4,653
[ "javascript", "asp.net-mvc", "internet-explorer-8", "doctype" ]
5,335,280
1
5,335,397
null
9
2,136
I'm trying to write a SQL query to generate a summary row for the actions performed by a given user in a given period. I have the following relevant table structure: users - - audit_periods (can be processing, shipping, break, etc) - - - - audit_tasks - - - - audit_task_types - - ![ER Diagram](https://i.stack.imgur.com/Ybomv.png) For each user for a given period, I'd like to create something like the following row of data: users.id users.email time_spent_processing time_spent_shipping ... number_of_scans number_of_pallets which would be calculated by figuring out for each user: - - - - - I've exhausted all of the SQL tricks I know (not many) and came up with something like the following: ``` select u.id as user_id, u.email as email, u.team as team, ap.period_type as period_type, att.name, time_to_sec( timediff(least("2011-03-17 00:00:00", ifnull(ap.finished_at, utc_timestamp())), greatest("2011-03-16 00:00:00", ap.started_at)) ) as period_duration, sum(at.score) as period_score from audit_periods as ap inner join users as u on ap.user_id = u.id left join audit_tasks as at on at.audit_period_id = ap.id left join audit_task_types as att on at.audit_task_type_id = att.id where (ap.started_at >= "2011-03-16 00:00:00" or (ap.finished_at >= "2011-03-17 00:00:00" and ap.finished_at <= "2011-03-17 00:00:00")) and (ap.finished_at <= "2011-03-17 00:00:00" or (ap.started_at >= "2011-03-16 00:00:00" and ap.started_at <= "2011-03-16 00:00:00")) and u.team in ("Foo", "Bar") group by u.id, ap.id, at.id ``` but this seems to be functionally equivalent to just selecting all of the audit tasks in the end. I've tried some subqueries as well, but to little avail. More directly, this generates something like (skipping less important columns): ``` user_id | period_type | period_duration | name | score 1 processing 1800s scan 200 1 shipping 1000s place_in_pallet 100 1 shipping 1000s place_in_pallet 100 1 break 500s null null ``` when I want: ``` user_id | processing | shipping | break | scan | place_in_pallet | score 1 1800s 1000s 500s 1 2 400 ``` I can easily fetch all of the audit_tasks for a given user and roll them up in code, but I might be fetching hundreds of thousands of audit_tasks over a given period, so it needs to be done in SQL. Just to be clear -- I'm looking for a query to generate one row per user, containing summary data collected across the other 3 tables. So, for each user, I want to know how much time he spent in each type of audit_period (3600 seconds processing, 3200 seconds shipping, etc), as well as how many of each audit_task he performed (5 scans, 10 items placed in pallet, etc). I think I have the elements of a solution, I'm just having trouble piecing them together. I know exactly how I would accomplish this in Ruby/Java/etc, but I don't think I understand SQL well enough to know which tool I'm missing. Do I need a temp table? A union? Some other construct entirely? Any help is greatly appreciated, and I can clarify if the above is complete nonsense.
Create a summary row for data across multiple tables
CC BY-SA 2.5
0
2011-03-17T05:35:16.063
2011-03-17T15:25:19.973
2011-03-17T14:31:37.533
182,584
182,584
[ "mysql", "sql" ]
5,335,461
1
5,335,497
null
1
3,036
I have a nested ordered list with this structure ``` <ol> <li> <span>A</span> <ol class="childol"> <li> <span>A1</span> </li> <li> <span>A2</span> </li> </ol> </li> </ol> ``` I'm trying to apply a style to the li, e.g. a background colour: ``` li:nth-child(1) { background-color: hsla(41, 100%, 93%, 1); } ``` and I get this: ![enter image description here](https://i.stack.imgur.com/cLMg4.gif) I'm trying to get the "Introduction to Lists" highlighted on its own with 100% width. I've tried to exclude the child ol like this: ``` li:nth-child(1) :not(.olchild) { background-color: hsla(41, 100%, 93%, 1); } ``` but I just get this: ![enter image description here](https://i.stack.imgur.com/EHmdi.png) How do I do this?
Applying CSS styles to <li> in an ordered list without applying to a nested ol
CC BY-SA 2.5
null
2011-03-17T06:02:21.940
2011-03-17T08:04:14.290
null
null
281,469
[ "html", "css" ]
5,335,501
1
5,336,367
null
0
237
Okay, this is driving me nuts: I have a Visual Studio project with couple of class diagrams which apparently are "broken". When I open them, I get this prompt: ![VS2010 prompt](https://i.stack.imgur.com/9un9b.png) I click "Yes", and Visual Studio does its thing - it takes a moment, maybe 10-20 seconds. Problem is this happens every single time I close and open the diagram! Any suggestions?
Missing code from class diagrams, auto-repair fails?
CC BY-SA 2.5
null
2011-03-17T06:07:19.490
2011-03-17T07:59:41.733
null
null
10,932
[ "c#", ".net", "visual-studio-2010", "class-diagram" ]
5,335,616
1
5,954,607
null
0
226
![when ever](https://i.stack.imgur.com/EvgVv.png) when ever I drag and drop the openfeint in my project , and compile it, it give me the error that llvm-g++4.2 failed with exit code 1 , how can I solve it....???? however I add the all the frameworks but not find the solution yet???
OpenFeint Integration with cocos2d
CC BY-SA 2.5
null
2011-03-17T06:23:36.080
2011-05-10T18:24:41.327
null
null
2,075,384
[ "iphone", "cocos2d-iphone" ]
5,335,714
1
5,336,089
null
0
96
I am trying to get the values that generate the following: ![enter image description here](https://i.stack.imgur.com/TxvgT.png) In my research I've seen several libraries (NAudio seems the most powerful I've looked at so far) that supposedly get these values, but I haven't the first clue how to do it. Essentially I want to poll these values while music is playing, to create animations based on them. However in everything I've searched for, it seems like I'm going to have to do a lot of work just to get these values? Is there any library that simplifies this process, or any example code/projects that show how to make the above, so I can just take the values and apply them to what I'm trying to do? I'm not trying to understand how these values are created or retrieved, just would like to have them so I can make use of them. (Assuming that these lines reference different frequencies in each sample(?) of the music). Low frequencies cause one animation, higher frequencies cause different animations is what I'm attempting to do.
Is there a simple to use library to play music (or get line in) and out put spectrum analysis values?
CC BY-SA 2.5
null
2011-03-17T06:37:43.837
2011-03-17T07:27:27.097
null
null
224,111
[ ".net", "audio", "visualization" ]
5,335,854
1
5,861,793
null
3
1,666
I want to recreate the list of UIButtons (that's what I think it is, at least) that can be seen all over the place, like in the Settings app: ![Screenshot of the settings page](https://i.stack.imgur.com/MVHeI.png) They look like the standard UIButton, but where the top button does not have any corner radius on its bottom left and right corners, the same goes for the bottom button, and all buttons in the middle don't have any corner radius. They might not even be buttons at all, maybe some kind of table view? I don't know. What are they and how do I add them to my app?
Create a list/table of UIButtons
CC BY-SA 2.5
null
2011-03-17T06:58:10.217
2011-05-02T19:51:11.930
null
null
224,732
[ "ios", "uibutton" ]
5,336,058
1
5,336,352
null
3
4,608
I want to have a Button/ImageButton that looks like this (round button on the left) ![enter image description here](https://i.stack.imgur.com/GujHs.png) What are my choices? Can I draw it using a shape? or is it better to use a png icon for that? ideas? What I want to do is to be able to display a new activity when the button is clicked/touched.
Android custom round button
CC BY-SA 2.5
null
2011-03-17T07:24:46.473
2011-03-17T07:58:28.740
null
null
54,538
[ "android" ]
5,336,398
1
5,374,893
null
0
1,016
I am having this strange case, at first time when the page loades, everything goes fine. But as soon as I click on any link which makes any ajax request, after that, I get this error while trying to read the configuration. "System.Configuration.ConfigurationManager.ConnectionStrings' threw an exception of type 'System.Web.HttpException" I am using asp.net mvc 1.0![please refer the attached screenshot](https://i.stack.imgur.com/A9WDJ.jpg) Please help. Thanks in advance.
Problem: System.Configuration.ConfigurationManager throwing exception
CC BY-SA 2.5
null
2011-03-17T08:03:20.417
2011-03-21T07:28:56.883
null
null
84,951
[ "asp.net", "asp.net-mvc", "asp.net-ajax" ]
5,336,496
1
null
null
0
1,139
i surely an committing a very lame mistake but couldn't figure out where... here is my web method ``` [WebMethod] [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)] public int Add(int x, int y) { return x + y; } ``` and im calling it via ajax like this ``` $.ajax({ type: "GET", dataType: 'json', contentType: "application/json; charset=utf-8", data: { x: 4, y: 5 }, url: 'http://localhost:14436/Service1.asmx/Add', success: function (data) { alert('success'); var d = $(data); console.log(d); } }); ``` the problem is i cannot get the returned data in `success`, in fiddler its showing `{"d":9}` but i keep on getting `data` empty... what am i doing wrong here... TIA ![enter image description here](https://i.stack.imgur.com/5Jv53.png) my web service is at [http://localhost:14436/Service1.asmx](http://localhost:14436/Service1.asmx) and my web application from which im accessing the web service is located at [http://localhost:3587/](http://localhost:3587/) so i guess this makes it a cross domain request?
cannot get the web service response
CC BY-SA 2.5
null
2011-03-17T08:16:04.717
2011-03-17T10:24:54.090
2011-03-17T10:24:54.090
474,003
413,670
[ "web-services", "jquery", "asp.net-ajax" ]
5,336,756
1
5,337,228
null
1
474
My problem is that I'm trying to add a child entity, but keep running into problems. Here's my situation: I have a bunch of Profiles. Each Profile has a bunch of CategoryPriorities attached to it. Each CategoryPriorities has one AttributePriority attached to it. ![enter image description here](https://i.stack.imgur.com/f7LEw.png) When I update my model in Visual Studio I get the following: ![enter image description here](https://i.stack.imgur.com/luieV.png) I can without any trouble get the following to work: ``` CategoryPriority _categoryPriority = new CategoryPriority(); Profile _profile = DB.GetProfile(ProfileID); _profile.CategoryPriorities.Add(_categoryPriority); DB.savechanges() ``` But somehow the following will not work: ``` AttributePriority _attributePriority = new AttributePriority(); CategoryPriority _categoryPriority = new CategoryPriority(); _categoryPriority.AttributePriorities.Add(_attributePriority); // Error! There is no option of "Add" or any other operation for the matter. Profile _profile = DB.GetProfile(ProfileID); _profile.CategoryPriorities.Add(_categoryPriority); DB.savechanges() ``` I'm guessing this is due to how the EF model is set up. Ideally I would like to have an one-to-one between CategoryPriority and AttributePriority tables. I'll add an image of my model. Any ideas? Any help much appreciated! Edit: I've added images to my post. Funny thing is that if I write: ``` Profile _p = new Profile(); ``` There is no option of `_p.Add` there either.. obviously I'm missing something.. Edit 2: Ok, so I got it to work, almost... I know, not the most aesthetically pleasing code, I'm working on that.. ``` Profile _profile = this.GetProfile(this.GetUserID(arrangeattributesviewmodel.ProfileID)); int iter = 0; foreach (AttributeListForCategory _category in arrangeattributesviewmodel.AllAttributesForCheckBoxList.CategoryAttributeList) { iter++; CategoryPriority _categoryPriority = new CategoryPriority(); _categoryPriority.ProfileID = arrangeattributesviewmodel.ProfileID; _categoryPriority.CategoryID = _category.CategoryID; _categoryPriority.CategoryName = _category.CategoryName; _categoryPriority.CategoryID = _category.CategoryID; _categoryPriority.CategoryPriorityNR = iter; AttributePriority _attributePriority = new AttributePriority(); _attributePriority.AttributePriorityString = _category.CompilePriorityString(); _categoryPriority.AttributePriority = _attributePriority; _profile.CategoryPriorities.Add(_categoryPriority); db.SaveChanges(); // It fails here with the message below.. } ``` {"A dependent property in a ReferentialConstraint is mapped to a store-generated column. Column: 'CategoryPriorityID'."} Any ideas? Edit 3: Solved it! I had to instanciate an AttributePriority in my CategoryPriority...
Problem adding objects in Entity Framework, I'm guessing it's a problem with my database model
CC BY-SA 2.5
null
2011-03-17T08:47:08.057
2011-03-17T14:37:49.183
2011-03-17T14:37:49.183
598,352
598,352
[ "c#", "entity-framework", "database-design" ]
5,337,020
1
5,338,970
null
2
2,351
As part of more complex algorithm I need following: - - - ![enter image description here](https://i.stack.imgur.com/Kozjl.png) I have thinking of some circle rasterization algorithm, but this will lead to some gaps in filling. Another way is to use some mathematical morphology operation like dilation but this seems to be computationally expensive to do. I am generally looking for way to do this on arbitrary shape but initially circle algorithm will be enough.
How to fill circle with increasing radius?
CC BY-SA 2.5
null
2011-03-17T09:14:48.500
2011-03-17T12:25:45.050
null
null
198,317
[ "algorithm", "image", "image-processing", "geometry" ]