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
6,062,455
1
6,067,985
null
0
4,271
I downloaded from [Microsoft website](http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=80e44913-24b4-4113-8807-caae6cf2ca05) and move it to to next to . then go to Zend server Panel "Server Setup > Extensions" to turn it on. after restarting php, Zend Server says: "The system could not load this extension"! What should I do? : Zend Configured on Apache : I also tried "php_sqlsrv_5.3_ntc_vc9.dll" but it failed either! ![enter image description here](https://i.stack.imgur.com/xHSEm.png)
How to install sqlsrv php driver on zend server?
CC BY-SA 3.0
null
2011-05-19T17:24:40.320
2012-10-20T18:21:05.247
2012-10-20T18:21:05.247
367,456
757,166
[ "php", "sql-server", "php-extension", "zend-server" ]
6,062,884
1
6,062,950
null
6
4,254
I have a class called ".spr" (for an image sprite) and many classes that alter the width, height and background-position attributes to show various parts of the sprite. I also have ".on" classes to toggle between images appearing in an "on" or an "off" state. The problem is that, in IE, the "on" class that should be associated with a certain class is being applied to a button that doesn't have that associated class (but a different one). ![enter image description here](https://i.stack.imgur.com/yZSlK.png) ``` .spr.burst.been {background-position: -241px -89px; .spr.burst.on { background-position: -301px -89px !important; } .spr.radiobutton {background-position: -250px -249px; } .spr.radiobutton.on { background-position: -250px -218px; border: 3px dashed red; } ``` As you can see, IE9 interprets the class ``` .spr.radiobutton.on ``` as ``` .spr.on ``` and, since it comes later in the stylesheet, overrides the properties of ``` .spr.burst.on ``` ``` .spr.burst ``` does not have the class ``` .radiobutton ``` How can I properly apply these composite styles in IE?
multiple-class CSS inheritance problem in IE
CC BY-SA 3.0
0
2011-05-19T18:01:23.047
2012-10-22T09:50:39.157
null
null
28,118
[ "internet-explorer", "css-selectors", "internet-explorer-9", "css" ]
6,063,166
1
6,093,172
null
1
366
![enter image description here](https://i.stack.imgur.com/pAWaZ.png) I am trying to create a popover as seen above. It can be a button or a TableViewController with just one item. I looked over a bunch of tutorials but they all seem way more complicated than necessary. Is there a way to do this without creating a new ViewController? How?
iOS: UIPopoverController
CC BY-SA 3.0
null
2011-05-19T18:24:31.143
2011-05-23T05:29:25.160
null
null
236,924
[ "ios" ]
6,063,257
1
6,067,117
null
0
147
I am trying to install app engine plugin into eclipse but when put the url [http://dl.google.com/eclipse/plugin/3.5](http://dl.google.com/eclipse/plugin/3.5) and installion began it comes with the error as listed below ![enter image description here](https://i.stack.imgur.com/Y9JC9.png) Thanks
installing app engine plugin in eclipse IDE
CC BY-SA 3.0
null
2011-05-19T18:32:58.430
2011-05-20T20:34:57.687
2011-05-19T18:35:20.767
345,415
667,340
[ "java", "eclipse", "google-app-engine", "eclipse-plugin" ]
6,063,432
1
6,072,101
null
1
2,389
I'm trying to create a pdf report using iTextSharp and I'm stumped as to why it's not correctly going to the next row to add the cells. Here's the code: ``` public class Centralizador { public void PrintCentralizador(int gradeParaleloId, string gradeName, string paraleloName, string courseName) { var studentRepo = new StudentRepository(); var students = studentRepo.FindAllStudentsFromGradeParalelo(gradeParaleloId).OrderBy(s => s.LastNameFather); int rowHeight = 13; string filePath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\\Centralizador.pdf"; try { Document document = new Document(PageSize.LETTER); //Landscape the document. document.SetPageSize(iTextSharp.text.PageSize.A4.Rotate()); BaseFont baseFont = BaseFont.CreateFont(BaseFont.COURIER, BaseFont.CP1250, BaseFont.EMBEDDED); Font font = new Font(baseFont, 8); PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(filePath, FileMode.Create)); document.Open(); GradeParaleloRepository paraRep = new GradeParaleloRepository(); var gra = paraRep.FindGradeParalelo(gradeParaleloId); Paragraph p = new Paragraph(new Phrase("Centralizador - Gestion " + DateTime.Now.Year + " \n " + courseName + " " + gra.Grade.Name + " " + gra.Name + "\n Colegio Madre Vicenta Uboldi \n " + DateTime.Now, font)); document.Add(p); PdfPTable table = new PdfPTable(36); //36 Column table. table.TotalWidth = 800f; table.LockedWidth = true; float[] widths = new float[] { 0.13f, 1.4f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f, 0.13f }; table.SetWidths(widths); PdfPCell blankCell = new PdfPCell(new Phrase("", font)); blankCell.FixedHeight = 25; PdfPCell blankCellB = new PdfPCell(new Phrase("", font)); blankCellB.FixedHeight = 25; table.AddCell(blankCell); table.AddCell(blankCellB); PdfPCell mat = new PdfPCell(new Phrase("MAT", font)); mat.Colspan = 3; mat.HorizontalAlignment = 1; table.AddCell(mat); PdfPCell len = new PdfPCell(new Phrase("LEN", font)); len.HorizontalAlignment = 1; len.Colspan = 3; table.AddCell(len); PdfPCell psi = new PdfPCell(new Phrase("PSI", font)); psi.Colspan = 3; psi.HorizontalAlignment = 1; table.AddCell(psi); PdfPCell cna = new PdfPCell(new Phrase("CNA", font)); cna.Colspan = 3; cna.HorizontalAlignment = 1; table.AddCell(cna); PdfPCell soc = new PdfPCell(new Phrase("SOC", font)); soc.Colspan = 3; soc.HorizontalAlignment = 1; table.AddCell(soc); PdfPCell ing = new PdfPCell(new Phrase("ING", font)); ing.Colspan = 3; ing.HorizontalAlignment = 1; table.AddCell(ing); PdfPCell efi = new PdfPCell(new Phrase("EFI", font)); efi.Colspan = 3; efi.HorizontalAlignment = 1; table.AddCell(efi); PdfPCell mus = new PdfPCell(new Phrase("MUS", font)); mus.Colspan = 3; mus.HorizontalAlignment = 1; table.AddCell(mus); PdfPCell apl = new PdfPCell(new Phrase("APL", font)); apl.Colspan = 3; apl.HorizontalAlignment = 1; table.AddCell(apl); PdfPCell rel = new PdfPCell(new Phrase("REL", font)); rel.Colspan = 3; rel.HorizontalAlignment = 1; table.AddCell(rel); PdfPCell com = new PdfPCell(new Phrase("COM", font)); com.Colspan = 3; com.HorizontalAlignment = 1; table.AddCell(com); PdfPCell blankCellC = new PdfPCell(new Phrase("", font)); blankCellC.FixedHeight = 25; table.AddCell(blankCellC); //This is supposed tobe on a new row. But isn't. It seems //everything below this comment doesn't even get added. PdfPCell numero = new PdfPCell(new Phrase("No.", font)); numero.FixedHeight = rowHeight; numero.HorizontalAlignment = 0; table.AddCell(numero); PdfPCell nombres = new PdfPCell(new Phrase("Apellidos y Nombres", font)); nombres.FixedHeight = rowHeight; nombres.HorizontalAlignment = 0; table.AddCell(nombres); for (int i = 0; i < 2; i++) { PdfPCell pa = new PdfPCell(new Phrase("PA.", font)); table.AddCell(pa); PdfPCell re = new PdfPCell(new Phrase("RE.", font)); table.AddCell(re); PdfPCell nf = new PdfPCell(new Phrase("NF.", font)); table.AddCell(nf); } PdfPCell obs = new PdfPCell(new Phrase("OBS.", font)); table.SpacingBefore = 20f; table.SpacingAfter = 20f; document.Add(table); document.Close(); } catch (DocumentException de) { Debug.WriteLine(de.Message); } catch (IOException ioe) { Debug.WriteLine(ioe.Message); } } } ``` Here's a picture of how it ends up: So it add the last column com correctly, also adds the blank padding cell, then it doesn't add what comes next. It just doesn't display. Any suggestions? ![enter image description here](https://i.stack.imgur.com/E2U3j.jpg)
Why are these table cells not being added?
CC BY-SA 3.0
null
2011-05-19T18:47:31.950
2017-05-05T18:10:15.177
2017-05-05T18:10:15.177
4,370,109
699,978
[ "c#", ".net", "itext", "cell" ]
6,063,841
1
6,064,004
null
5
4,031
I'm confused about Materialized views. Either it is the Toad IDE that I am using that is confusing me, or its that I don't understand MVs enough. I created a materialized view in Oracle by something like this.... ``` CREATE MATERIALIZED VIEW TESTRESULT NOCACHE LOGGING NOCOMPRESS NOPARALLEL BUILD IMMEDIATE REFRESH FORCE ON DEMAND WITH PRIMARY KEY AS SELECT ... FROM tables... ``` I would expect that the materialized view would be created and populated with the data returned from the query. Okay, not a big deal. What I am confused on is why my Toad IDE shows a table 'TESTRESULT' under the tables section. It even has a 'Create Table Script' that I can look at. ![enter image description here](https://i.stack.imgur.com/tzk10.png) But I also see my materialized view under the 'Materialized View' section.![enter image description here](https://i.stack.imgur.com/jE1ok.png) Behind the scenes is Oracle creating a table when I create a materialized view? It looks as if there are two seperate objects, a materialized view and a table? Could someone please explain what is going on here behind the scenes when creating a materialized view? Is Toad wrong or am I misunderstanding something? Toad version: 9.6.1.1 Oracle: 10g
Oracle - Materialized View confusion (is Toad IDE wrong in displaying MV in Tables section?)
CC BY-SA 3.0
0
2011-05-19T19:25:14.470
2011-05-19T19:42:02.777
null
null
175,057
[ "oracle", "oracle10g", "toad", "materialized-views" ]
6,063,977
1
null
null
1
2,834
The website is Confluence. It has many things on the website one being a calendar. The calendar has events and such and I would like to extract those events and dates so that I can read the text I obtain to a user through with computer voice reading. Below is a picture of the whole thing. If anyone is aware of Twilio I am trying to get callers to obtain information from the calendar. ![http://img64.imageshack.us/img64/2052/calendarf.png](https://i.stack.imgur.com/d2yiM.png)
How do I extract data from a calendar on a website using php?
CC BY-SA 3.0
null
2011-05-19T19:38:30.607
2015-12-26T11:12:01.117
2015-12-26T11:12:01.117
4,370,109
761,669
[ "php", "calendar", "extract", "confluence" ]
6,064,084
1
6,143,463
null
0
367
I'm implementing a TTTableViewController with a searchViewController part, and I'm running into issues when displaying the results of the search in the search's TableView. If I add TTTableTextItems to the datasource `items` property, it works fine, but if I try to add a TTTableCaptionItem or a TTTableImageItem or any custom cell I've created, the rendering is messed up. Can anyone confirm that it's possible to use custom table cells in a searchViewController and perhaps point me in the right direction for how to make it work? I've attached 3 screen shot to show what's working and what's not working. ``` [self.items addObject:[TTTableTextItem itemWithText:[item objectForKey:@"title"]]]; ``` ![TTTableTextItem](https://i.stack.imgur.com/ZnFCU.png) ``` [self.items addObject:[TTTableCaptionItem itemWithText:[item objectForKey:@"title"] caption:[item objectForKey:@"excerpt"]]]; ``` ![TTTableCaptionItem](https://i.stack.imgur.com/39RNC.png) ``` [self.items addObject:[TTTableImageItem itemWithText:[item objectForKey:@"title"] imageURL:[item objectForKey:@"thumbnail"]]]; ``` ![TTTableImageItem](https://i.stack.imgur.com/11tqF.png)
In Three20, can I not use custom table cells in a searchViewController?
CC BY-SA 3.0
null
2011-05-19T19:49:48.757
2011-05-26T18:38:45.757
null
null
478,460
[ "iphone", "three20", "uisearchdisplaycontroller" ]
6,064,151
1
6,064,178
null
6
3,609
A client has given me a task to do that I've not done before, and so I'm looking for the best way to do it. They have a form they want users to fill in, but for one field, they want an option of thousands to be placed into three dropdown menus. For example: ![enter image description here](https://i.stack.imgur.com/bZj6E.gif) So a user will only be able to choose a Venue once they've chosen a City, only a City once they'd chosen a State. (A nice way to break up the thousands of options.) I suppose I could this quite easily using POSTBACKs and a simple database, but I imagine that doing something with AJAX and a simple database would be the slicker solution. Are there any other ways that this problem might be tackled? If not, does anyone have any links to tutorials or code snippets I could grab? Secondly, how long do you think it would take to implement such a system? I've never done this before so I'm hoping to avoid as many unforeseen pitfalls as possible. Thanks.
Thousands of items in multiple dropdown menus
CC BY-SA 3.0
0
2011-05-19T19:56:24.483
2011-05-20T14:19:15.593
2011-05-19T20:08:10.523
199,700
199,700
[ "php", "javascript", "html", "ajax", "drop-down-menu" ]
6,064,179
1
6,096,336
null
0
7,547
I'm having some trouble figuring out how to add another directory for a single project. On a regular C/C++ project I'm allowed the option of navigating to the directory, but here I have to enter the directory myself, but this is a CUDA c/C++ project. My question is how would I add lets just say: `C:\Users\USERNAME\Documents\Visual Studio 2010\Projects\CUDA Programs\common` as an include directory. ![A screen grab of my project](https://i.stack.imgur.com/4apCz.png)
Adding an additional include directory for VS10
CC BY-SA 3.0
null
2011-05-19T19:59:01.433
2011-05-23T11:04:22.337
null
null
522,665
[ "visual-studio-2010", "directory", "cuda", "include-path", "project-settings" ]
6,064,214
1
6,064,265
null
3
3,694
I have multiple webpages that work together. Most of them have the same css from a master file. The issue I am having is that one page needs the css to be a little different. Here is what I mean: ``` .Close { position: relative; top: 0px; /* Different */ display: block; /* Different */ margin: auto; /* Different */ } .ArrowLeft { background-image: url(arrow_left.png); border: 0 none transparent; padding: 0 0 0 0; position: relative; top: 0px; height: 37px; width: 47px; z-index: 10; display: none; background-color: transparent; float: left; /* Different */ } .ArrowRight { background-image: url(arrow_right.png); border: 0 none transparent; padding: 0 0 0 0; position: relative; top: 0px; height: 37px; width: 47px; z-index: 10; display: none; background-color: transparent; float: right; /* Different */ } ``` ``` .ArrowLeft { background-image: url(arrow_left.png); border: 0 none transparent; padding: 0 0 0 0; position: absolute; height: 24px; width: 25px; z-index: 10; display: none; } .ArrowRight { background-image: url(arrow_right.png); border: 0 none transparent; padding: 0 0 0 0; position: absolute; left: 258px; height: 24px; width: 25px; z-index: 10; display: none; } .Close { position: relative; top: -1px; left: 105px; } ``` Notice the small differences (`margin: auto`, `float: left` .. ect) I want to have these differences not happen in my page's css. I know that `float: none` will remove the `floats` but how can i remove the `display`, `top`, and `margin` properties that are different? I would just change the class name but all the pages use the same .js file so renaming them would be very long/unwanted. Suggestions? Is there a way to just turn off the master css or disable it for these classes? Here is what I am talking about (The arrow): ![enter image description here](https://i.stack.imgur.com/CTuQw.png)
Removing CSS On Webpage from Masterpage
CC BY-SA 3.0
null
2011-05-19T20:02:15.190
2011-05-19T20:29:58.797
2011-05-19T20:29:58.797
650,489
650,489
[ "css", "master-pages" ]
6,064,227
1
6,064,271
null
2
2,612
As can be seen below I have 1st image an original JPEG image .Second one was taken to buffer image and than save using [http://www.lac.inpe.br/JIPCookbook/6040-howto-compressimages.jsp](http://www.lac.inpe.br/JIPCookbook/6040-howto-compressimages.jsp) with 1.0 quality . Still image became smaller in size and a really small destortion. Is it possible to save image to its quality as it is ? Pleas not that saving image as it is was just a sample test. After adding text I save it with highest quality which looses information too. ![enter image description here](https://i.stack.imgur.com/hAw2d.jpg) ![enter image description here](https://i.stack.imgur.com/dZZ7S.jpg)
Java Saving Original JPEG Without Loss
CC BY-SA 3.0
0
2011-05-19T20:03:20.697
2011-05-19T20:54:08.300
2011-05-19T20:54:08.300
608,576
608,576
[ "java", "image-processing" ]
6,064,230
1
6,117,351
null
2
1,430
I'm trying out very simple search popup on the JqGrid. Please see the code below. There are few issues: - The popup comes up with AND/OR and [+] controls at the very top. See screenshot below: (from FF 4)![enter image description here](https://i.stack.imgur.com/ydwmc.png)- You can click on [-] button to remove the very first (and only) filter row. It shouldn't be allowed. First filter row should never be allowed to be removed.- Code:``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>JQGRID Test</title> <link rel="stylesheet" type="text/css" media="screen" href="http://trirand.com/blog/jqgrid/themes/redmond/jquery-ui-1.8.1.custom.css"/> <link rel="stylesheet" type="text/css" media="screen" href="http://trirand.com/blog/jqgrid/themes/ui.jqgrid.css"/> <script type="text/javascript" src="http://trirand.com/blog/jqgrid/js/jquery.js"></script> <script type="text/javascript" src="http://trirand.com/blog/jqgrid/js/jquery-ui-1.8.1.custom.min.js"></script> <script type="text/javascript" src="http://trirand.com/blog/jqgrid/js/i18n/grid.locale-en.js"></script> <script type="text/javascript" src="http://trirand.com/blog/jqgrid/js/jquery.jqGrid.min.js"></script> <script type="text/javascript"> $(function() { createGrid(); }); function createGrid() { $("#jqgrid-table").jqGrid({ colNames:['First Name', 'Last Name', 'Age', 'IQ', 'Type'], colModel:[ {name:'firstName',index:'firstName', width:100}, {name:'lastName',index:'lastName', width:100}, {name:'age', index:'age', width:50}, {name:'iq', index:'iq', width:50, stype:'select', searchoptions: {dataUrl:'/api/domains/putcalldomain'}}, {name:'type', index:'type', width: 56} ], width: 800, datatype:'local', pager: '#pager2', viewrecords: true, caption:"JSON Example" }); var searchOptions = { caption: 'Filter...', multipleSearch:true, closeAfterSearch:true, closeAfterReset:true, Find: 'Filter' }; jQuery("#jqgrid-table").jqGrid('navGrid', '#pager2', {search:true, edit:false, add:false, del:false, refresh:false}, null, null, null, searchOptions ); var data = getData(); for(var i =0; i < data.length; i++) { var r = data[i]; jQuery("#jqgrid-table").addRowData(r.id, r); } } function getData() { return [ {id:1, firstName: 'John', lastName: 'XXX', age:'30', iq:'200', type: 'Nice'}, {id:2, firstName: 'Ashley', lastName:'YYY', age:'31', iq:'210', type:'Nicer'}, {id:3, firstName:'Smith', lastName:'ZZZ', age:'23', iq:'90', type:'Nicest'} ]; } </script> </head> <body> <div id='jqgrid-div'> <table id='jqgrid-table'></table> <div id="pager2"></div> </div> </body> </html> ```
jqgrid search popup allows all filters to be removed!
CC BY-SA 3.0
null
2011-05-19T20:03:21.927
2011-05-24T21:49:50.593
2011-05-24T13:29:58.080
613,602
613,602
[ "jqgrid" ]
6,064,434
1
6,064,555
null
1
35,802
![table products](https://i.stack.imgur.com/sv2tr.png) I have a table that I want to calculate the sum total of all the values in column "Price" and echo the results. I have seen MySQL statement SELECT sum(column) FROM table but I am finding it difficult to use it in PHP and echo the results.
calculate sum total of all the figures in a column
CC BY-SA 3.0
null
2011-05-19T20:23:06.413
2022-04-07T21:13:39.117
2011-05-19T20:25:32.637
398,242
759,355
[ "php", "mysql" ]
6,064,571
1
null
null
0
2,466
When I call mydomain.com/images/test.jpg I see the pic fine but then if I do mydomain.com/index.cfm I get the following![enter image description here](https://i.stack.imgur.com/3ClGS.png) Also I've make sure that in IIS Handler Mappings I've put cfm and cfc. Anything else I forgot? Running: IIS 7.5, windows 2008, Coldfusion 9, cfwheels I've remote web.config and now I get ![enter image description here](https://i.stack.imgur.com/Hs4eq.png)
HTTP Error 404.0 - Not Found IIS 7.5 for Coldfusion files
CC BY-SA 3.0
null
2011-05-19T20:35:54.137
2011-05-22T07:24:27.237
2011-05-19T20:55:00.287
490,570
490,570
[ "iis", "coldfusion", "coldfusion-9" ]
6,064,989
1
6,065,036
null
37
27,144
I found some sample code posted at [https://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/4d45e9ea5471cba4/4519371a77ed4a74?hl=en&pli=1](https://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/4d45e9ea5471cba4/4519371a77ed4a74?hl=en&pli=1) for self installing a Windows Service. I am in C# on fx 4.0. Trying to figure out where I went off the rails... My questions: 1. I created a Win Service project. In program.cs / main() I pretty much copied the code example. It appears most everything is working except launching a console window if I am in DEBUG mode (passing in - c of course). For some reason the console window never opens. 2. The other challenge I had was the call to StartUp() / ShutDown() in the console portion would not compile. I ended up have to initialize my service object and then call it. 3. I am getting the following error when the Console.ReadKey() method is called: > Cannot read keys when either application does not have a console or when console input has been redirected from a file. Try Console.Read. My code and stuff: An image of my project structure: ![http://screencast.com/t/zVjqkmoED](https://i.stack.imgur.com/803Q0.png) NOTE: I was duplicating the startup sequence in the TestHarness when in DEBUG mode. If/when I get this working I will be dropping that from the solution. The Library project is where the majority of my code lives. PROGRAM.CS ``` using System; using System.Collections.Generic; using System.Linq; using System.ServiceProcess; using System.Text; using System.ComponentModel; using System.Configuration.Install; using System.Collections; using RivWorks.FeedHandler.Service; namespace RivWorks.FeedHandler { static class Program { /// <summary> /// The main entry point for the application. /// </summary> static int Main(string[] args) { bool install = false, uninstall = false, console = false, rethrow = false; try { foreach (string arg in args) { switch (arg) { case "-i": case "-install": install = true; break; case "-u": case "-uninstall": uninstall = true; break; case "-c": case "-console": console = true; break; default: Console.Error.WriteLine("Argument not expected: " + arg); break; } } if (uninstall) { Install(true, args); } if (install) { Install(false, args); } if (console) { Console.WriteLine("Starting..."); FeedListener fl = new FeedListener(); fl.StartUp(); Console.WriteLine("System running; press any key to stop"); Console.ReadKey(true); fl.ShutDown(); Console.WriteLine("System stopped"); } else if (!(install || uninstall)) { rethrow = true; // so that windows sees error... ServiceBase[] services = { new Service.FeedListener() }; ServiceBase.Run(services); rethrow = false; } return 0; } catch (Exception ex) { if (rethrow) throw; Console.Error.WriteLine(ex.Message); return -1; } } static void Install(bool undo, string[] args) { try { Console.WriteLine(undo ? "uninstalling" : "installing"); using (AssemblyInstaller inst = new AssemblyInstaller(typeof(Program).Assembly, args)) { IDictionary state = new Hashtable(); inst.UseNewContext = true; try { if (undo) { inst.Uninstall(state); } else { inst.Install(state); inst.Commit(state); } } catch { try { inst.Rollback(state); } catch { } throw; } } } catch (Exception ex) { Console.Error.WriteLine(ex.Message); } } } [RunInstaller(true)] public sealed class MyServiceInstallerProcess : ServiceProcessInstaller { public MyServiceInstallerProcess() { this.Account = ServiceAccount.NetworkService; } } [RunInstaller(true)] public sealed class MyServiceInstaller : ServiceInstaller { public MyServiceInstaller() { this.Description = "Provides a service to listen for, then import, feed files from various sources."; this.DisplayName = "RIVWorks Feed Handler (.NET 4.0)"; this.ServiceName = "FeedListener"; this.StartType = System.ServiceProcess.ServiceStartMode.Automatic; } } } ``` FEEDLISTENER.CS ``` using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceProcess; using System.Text; using System.IO; using sysIO = System.IO; using RivWorks.FeedHandler; using System.Collections; using RivWorks.FeedHandler.Library; using System.Threading; namespace RivWorks.FeedHandler.Service { public partial class FeedListener : ServiceBase { #region Declarations static private List<string> _keys = new List<string>(); static private System.Threading.Timer _clock = null; static private FileSystemWatcher _watcher; static private RivWorks.FeedHandler.Library.QueueHandler _qHandler = null; static private bool _isDequeueing = false; #endregion #region Constructor public FeedListener() { InitializeComponent(); } #endregion #region Internal Methods internal void StartUp() {...} internal void ShutDown() {...} #endregion #region Start/Stop protected override void OnStart(string[] args) { StartUp(); } protected override void OnStop() { ShutDown(); } #endregion #region Event Handlers static void qHandler_QueuesGrew() {...} static void qHandler_QueuesShrunk() {...} static void qHandler_QueuesChanged() {...} static void fileCreatedOrChanged(object sender, sysIO.FileSystemEventArgs e) {...} #endregion #region Private Methods private static void Tick(object state) {...} private static void WriteToEventLog(Exception ex, EventLogEntryType eventLogEntryType) {...} private static void WriteToEventLog(string message, EventLogEntryType eventLogEntryType) {...} #endregion } } ```
Running a Windows Service in Console mode?
CC BY-SA 3.0
0
2011-05-19T21:17:31.783
2016-05-05T10:10:27.487
2012-03-20T07:06:35.637
19,635
86,555
[ "c#-4.0", "windows-services", "console" ]
6,065,054
1
null
null
-1
350
In iPhone app, the Google maps API looks like this, is there any way to change it to black? ![enter image description here](https://i.stack.imgur.com/kHejI.png)
Is there a way to change the default blue color of the Google maps API?
CC BY-SA 3.0
null
2011-05-19T21:24:26.603
2014-03-03T00:30:42.217
2014-03-03T00:30:42.217
1,947,286
602,257
[ "ios", "google-maps" ]
6,065,150
1
6,065,181
null
0
1,538
I created `UItableViewController`. I want to resize the table and add my application background image, labels and a button... But I can't. Does anyone have any idea why? This is what I've made in interface builder: ![enter image description here](https://i.stack.imgur.com/bUFZX.png) But when I build, I have the table view in the whole interface .
Resize UITableView in interface builder
CC BY-SA 3.0
null
2011-05-19T21:36:27.410
2014-03-28T12:51:13.290
2014-03-28T12:51:13.290
165,071
761,812
[ "iphone", "objective-c", "interface-builder" ]
6,065,239
1
6,065,277
null
0
244
Please see designer's picture: ![enter image description here](https://i.stack.imgur.com/3pyUH.png) Now see what I'm getting: ![enter image description here](https://i.stack.imgur.com/fxBQQ.png) Here is my layout: ``` <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/nav_back"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableTop="@drawable/home" android:background="@drawable/nav_selected" android:layout_weight="1" android:textColor="#FFF" android:textSize="10dp" android:text="Home"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableTop="@drawable/home_g" android:background="@drawable/nav_back" android:layout_weight="1" android:textColor="#FFF" android:textSize="10dp" android:text="This is long string that pushes layout"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableTop="@drawable/available_g" android:background="@drawable/nav_back" android:layout_weight="1" android:textColor="#FFF" android:textSize="10dp" android:text="Available"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableTop="@drawable/completed_g" android:background="@drawable/nav_back" android:layout_weight="1" android:textColor="#FFF" android:textSize="10dp" android:text="Completed"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableTop="@drawable/mail_g" android:background="@drawable/nav_back" android:layout_weight="1" android:textColor="#FFF" android:textSize="10dp" android:text="Mail"/> </LinearLayout> ``` Questions. How do I: 1. Make sure no matter what - screen broken down to 5 even segments - so all buttons even no matter text inside. 2. If one button pushes layout down - how do I make sure other buttons fill that vertical space as well? Like home button is not all way down - you can see where nav_selected ends 3. I have icons in PNG in 3 sizes as per google format. I want to have some padding for drawableTop if possible so icons look smaller on my screen - closer to what designers screen look. Thanks!
Layout breaking down - how to get it even/aligned?
CC BY-SA 3.0
null
2011-05-19T21:47:38.800
2012-08-25T02:24:45.463
2012-08-25T02:24:45.463
667,810
509,600
[ "android", "android-layout", "android-widget" ]
6,065,328
1
null
null
0
365
I am not worried about tablets at the moment, just android phones. I have some pay as you go LG phone that I use to develop on. I have a frame layout with a `VideoView` and a `WebView` in it. My XML file defined the width and height at specific pixels and that worked fine for testing on my one device. I tried it on another device which had a larger screen and they dont fill the window like on my go phone. I was wondering how I can fill the top half of the screen with my video and the bottom half with and image. I tried `layout_width` as `match_parent`, but then I wasn't sure how to define the height. Here is the layout I want to achieve on all devices. ![ss](https://i.stack.imgur.com/aKghn.png) and my layout.xml ``` <?xml version="1.0" encoding="UTF-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/mobile_vforum_bg" > <VideoView android:id="@+id/vidPlayer" android:layout_width="320px" android:layout_height="240px"> </VideoView> <WebView android:id="@+id/slideHolder" android:layout_width="320px" android:layout_height="240px" android:layout_gravity="bottom"> </WebView> </FrameLayout> ``` Obviously I cant use a pixel amount here, so what are my options? Thank you and I hope my question was clear enough.
How to achieve this layout on all devices excluding tablets
CC BY-SA 3.0
null
2011-05-19T22:00:15.937
2011-05-19T22:33:35.617
null
null
736,967
[ "android", "android-framelayout" ]
6,065,347
1
6,065,440
null
16
10,566
The layout I try to implement is (I think) pretty simple. One TextView expands depending on what is inside. Just below are two buttons (OK/Cancel). I can make the buttons stick to the bottom of the screen and that works fine. But I would like to have those buttons just below the TextView. I have tried a lot of different things, but here is my latest layout : ``` <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ScrollView android:id="@+id/Scroll" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" > <TextView android:id="@+id/Text" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </ScrollView> <RelativeLayout android:id="@+id/buttons" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_below="@+id/Scroll" android:layout_above="@+id/bottom" > <LinearLayout android:orientation="horizontal" android:layout_height="wrap_content" android:layout_width="fill_parent"> <Button android:id="@+id/ButtonOK" android:layout_height="80dp" android:layout_width="fill_parent" android:text="OK" android:layout_weight="1"/> <Button android:id="@+id/ButtonCancel" android:layout_height="80dp" android:layout_width="fill_parent" android:text="Cancel" android:layout_weight="1"/> </LinearLayout> </RelativeLayout> <LinearLayout android:id="@+id/bottom" android:layout_height="0px" android:layout_width="fill_parent" android:layout_alignParentBottom="true"/> </RelativeLayout> ``` The empty linearlayout at the end is an (unsuccessful) attempt to prevent the view to extend past the bottom of the screen... In everything I tried, either the buttons are at the bottom of the screen or they would go past it when the TextView is too big. Here is a sketch of what I am trying to do :![enter image description here](https://i.stack.imgur.com/1X9Ie.png)
buttons below expanding scrollview
CC BY-SA 3.0
0
2011-05-19T22:03:08.090
2016-01-29T23:58:30.157
2011-05-19T22:44:09.897
347,565
347,565
[ "android", "user-interface", "android-layout" ]
6,065,548
1
6,065,842
null
5
2,043
I have a Visual Studio 2010 solution containing several C# projects, with Resharper 5.1 installed and enabled. All these projects target the .NET Framework 4. This solution has been working fine for months, but this morning I got the following message when the solution was loaded: ![Visual Studio 2010 error](https://i.stack.imgur.com/7ZJye.png) I've looked around for an explanation on the meaning of this message, but with little luck. Additionally, I haven't been able to repro this error, and it doesn't seem to have broken anything on my project. Still, I don't like these kind of unexplained errors, so I was wondering if anyone reading this knows the root cause?
Automatically attaching to support behavior not completely successful
CC BY-SA 3.0
0
2011-05-19T22:29:27.973
2015-10-24T04:11:56.647
null
null
556,595
[ "visual-studio-2010", "resharper-5.1" ]
6,065,855
1
6,065,883
null
4
1,895
Anyone know of a good calendar event entry setup similar to Google calendar? Looking for a plugin for one of the major javascript frameworks. Preferably jQuery. Here is what Google is doing and looking for something similar... ![Google Calendar - Event Repeat](https://i.stack.imgur.com/mdvQG.png) ![Google Calendar - Event Setup](https://i.stack.imgur.com/LzlzS.png)
Calendar Events Entry Similar to Google Calendar
CC BY-SA 3.0
null
2011-05-19T23:12:04.007
2011-10-11T15:01:54.517
2011-05-19T23:17:30.933
438,971
635,027
[ "javascript", "jquery", "jquery-plugins" ]
6,066,256
1
6,066,547
null
2
142
Is there a way to prevent this in Firefox 4.0 using CSS? It's where you click on a link (or anything) and begin to drag it, and another semi-transparent image of it appears under your cursor as you drag... Looks something like this: ![enter image description here](https://i.stack.imgur.com/uDt56.png)
Preventing FF4's new drag feature
CC BY-SA 3.0
null
2011-05-20T00:21:00.417
2011-05-20T01:19:12.260
null
null
null
[ "css", "firefox4" ]
6,066,374
1
null
null
3
219
This always happens to me but I'm at a loss to work out why. Here is my designer ![windows forms designer](https://i.stack.imgur.com/uz2mp.png) here is the actual form![actual form](https://i.stack.imgur.com/6qrVd.png) look at the W in the heading on each. See how it's all jagged in the second? WHy is that? I've tried changing AutoSizeMode to Font (I've got it off at hte moment) but it didnt seem to make any difference.
Windows FOrms fonts look jagged in compiled application
CC BY-SA 3.0
0
2011-05-20T00:43:15.953
2011-11-17T16:49:46.047
null
null
126,597
[ "winforms", "fonts", "windows-forms-designer" ]
6,066,458
1
null
null
0
302
In my app I've got a CCTexture2D, which I'm creating using an image, creating a sprite from the texture, then adding to the stage, like this: ``` UIImage* faceUIImage = [UIImage imageNamed:@"face.jpg"]; CCTexture2D* faceTest = [[CCTexture2D alloc] initWithImage:faceUIImage]; CCSprite* testSprite = [CCSprite spriteWithTexture:faceTest]; [self addChild:testSprite]; testSprite.position = CGPointMake(200, 100); ``` (I know this might seem a weird way to do it, but I'm doing some stuff to the pixel data elsewhere in the program, so I cant just use a pure sprite). In the simulator, it looks fine: ![enter image description here](https://i.stack.imgur.com/eZHKa.png) However, when I run it on my iPhone (running 4.2), I get this: ![enter image description here](https://i.stack.imgur.com/bBpAg.png) Ignoring the fact that they are different orientations, how come the image on my device is in the background, and really dark? Can anyone help me with this? Thanks, Rich
Weird behaviour with CCTexture2D (v simple code)
CC BY-SA 3.0
null
2011-05-20T01:00:21.220
2011-05-21T09:09:34.650
2011-05-20T01:06:10.867
702,840
702,840
[ "iphone", "ios", "cocos2d-iphone" ]
6,067,008
1
6,112,818
null
4
3,526
I recently discovered the emptyText config value for lists in Sencha Touch to display when the store is empty. The problem I am having is that this text appears in the top left corner and I can't seem to find a way to place it in the middle of the screen. ![enter image description here](https://i.stack.imgur.com/2PpRS.png)
How can I center emptyText in the middle of the screen in a List in Sencha Touch?
CC BY-SA 3.0
0
2011-05-20T02:55:57.030
2011-05-24T15:40:50.920
null
null
302,246
[ "sencha-touch" ]
6,067,128
1
6,067,191
null
2
2,192
How to push an ViewController display not as full screen on iPad like the image below ![enter image description here](https://i.stack.imgur.com/ZHDxk.png) Welcome any comment
ipad pushViewController display not as full screen
CC BY-SA 3.0
0
2011-05-20T03:23:37.037
2011-05-20T03:53:52.060
null
null
629,453
[ "iphone" ]
6,067,488
1
6,146,060
null
0
813
I have like below: ![after change show entries datatable no response](https://i.stack.imgur.com/Df0rH.png) After I have changed show entries to 25 in datatable, the datatable seems no response. Its just show `processing` inside datatable body. This the server side script for show entries: ``` $sLimit = ""; if ( isset( $_POST['iDisplayStart'] ) ) { $sLimit = " LIMIT ".mysql_real_escape_string( $_POST['iDisplayStart'] ).", ". mysql_real_escape_string( $_POST['iDisplayLength'] ); } ``` why its happen? how to fix that? Exactly I have two datatables inside this page.I put them in different tabs. [Datatable script](http://pastebin.com/emzG7cri) [html table](http://pastebin.com/RTLdudng) [serverside script](http://pastebin.com/nVjZN4EE) --- The trouble come during show `range` column but if not use this column all can work properly.the query like: ``` $sQuery = "SELECT DATE(A.Inspection_datetime) AS Date, A.Line, A.Model, A.Lot_no,A.Range_sampling,COUNT(A.Serial_number) AS Error,B.name AS PIC FROM inspection_report A LEFT JOIN Employee B ON A.NIK=B.NIK WHERE CHAR_LENGTH( A.Range_sampling ) < 17 AND MONTH(A.Inspection_datetime)=MONTH(CURRENT_DATE)" .$sWhere.$sGroupBy.$sOrder.$sLimit; ``` Whether `CHAR_LENGTH` is the root cause? exactly this problem only occurs on the database a server for a local computer everything goes well.why?
Datatable freeze during change show entries
CC BY-SA 3.0
null
2011-05-20T04:32:08.807
2011-05-26T23:05:40.993
2011-05-23T09:06:45.367
751,947
751,947
[ "php", "jquery", "mysql", "datatables" ]
6,067,689
1
null
null
2
2,234
Im using @font-face to render a custom font on a site the font is 'Ministry ExtraLight' Im also using this website to generat font files [http://www.fontsquirrel.com](http://www.fontsquirrel.com). it looks fine on FireFox. but on Chrome/IE/Safari it looks like the font is bloded. when I inspect the font, its actually set to ``` font-weight: normal; font-style: normal; font-variant:normal ``` but it renders bold or added weight to the font. has any one bumped into anything like that? ![Rendering on Chrome/FF](https://i.stack.imgur.com/06Hj2.jpg)
@font-face rendering bigger in Chrome/IE, fontsquirrel
CC BY-SA 3.0
0
2011-05-20T05:06:09.117
2011-10-17T15:39:43.667
2011-10-17T15:39:43.667
106,224
638,077
[ "css", "font-face" ]
6,067,898
1
6,067,986
null
3
3,794
I want to create a bar with a value. If i move the circle, then the value in the field should change. How can i do this? Here is the screen shot. How can i achieve this? Something similar to this is also ok. Please help me with this. Thank you in advance :) ![enter image description here](https://i.stack.imgur.com/iGAje.png)
Movable bars with value using java
CC BY-SA 3.0
null
2011-05-20T05:43:14.560
2012-05-01T17:58:01.723
2012-05-01T17:58:01.723
453,912
669,879
[ "java", "swing", "user-interface", "jslider" ]
6,067,967
1
null
null
0
200
I am using facebook login through javascript SDK (fb.login). and when i was login through, sometimes it works properly but sometimes it continuously asking for email and password. for example, i have enter email id and pwd in this window: ![enter image description here](https://i.stack.imgur.com/tSmxY.png) after that it continuously asking for email and password. i have included this: ``` <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <script src="http://connect.facebook.net/en_US/all.js"></script> <div id="fb-root"></div> <img src="<?= $this->baseUrl(); ?>/public/images/facebook_signup.jpg" onclick="fb_login();"/> <script> FB.init({appId: '061665c433986c406bbeda1b465350c1', status: true, cookie: true, xfbml: true}); function fb_login() { FB.login(function(response) { if(response.session!=null) { window.location.href="http://www.allindiaarchitects.com/registration"; } },{perms:'email,user_birthday,offline_access,publish_stream,read_friendlists'}); } </script> ``` Please anybody help me.
not login properly in facebook in my application
CC BY-SA 3.0
null
2011-05-20T05:52:15.810
2011-05-20T06:41:50.463
2011-05-20T06:03:55.243
550,991
550,991
[ "facebook", "authentication", "facebook-javascript-sdk" ]
6,067,974
1
6,068,173
null
2
2,974
I want to to generate a `Microsoft Report(.rdlc)` in C# with dynamic columns at the time of report generation . I mean not by selecting any column from database table at the time of `Microsoft Report(.rdlc)` design. Instead of that passing an SQl query string and get the `Microsoft Report(.rdlc)` dynamically at runtime in ASP.net C#. Is there any tutorial which will guide me how do i proceed with this? I an very new to Reports and it is getting difficult for me even to search google regarding my query. Hope someone guides me to help me generate reports.Any tutorial or useful link with source code would be very helpful. Report outlook ![enter image description here](https://i.stack.imgur.com/rfnQ5.jpg)
Generating reports at runtime
CC BY-SA 3.0
0
2011-05-20T05:53:04.880
2011-05-20T06:20:26.047
2011-05-20T06:13:26.500
243,680
243,680
[ "c#", "asp.net", "rdlc", "report" ]
6,068,148
1
6,068,420
null
1
2,185
Consider the following snap on my site. ![enter image description here](https://i.stack.imgur.com/qcRMK.jpg) The area in red is a table that's being rendered dynamically and is in a separate div. The bottom 3 rows are in a different tables in a different div which is static. As these two are basically different tables, the check boxes don't align themselves. These divs are part of a liquid layout and are in the left hand column. Is there a way to align them without fixing the table, row and column widths? Or maybe fool those two tables to believe that they are actually one and align them? Here is the structure ``` <div id='dynamic_in_red_border'> <table id="one"> </table> </div> <div id="bottom"> <table id="static"> </table> </div> ``` Hope my question is clear. PS: the red box is just to make my point, its not there on the actual UI
How to align these tables in different Divs
CC BY-SA 3.0
null
2011-05-20T06:17:30.703
2017-07-30T21:30:27.047
2017-07-30T21:30:27.047
4,370,109
726,239
[ "html", "css", "html-table", "alignment" ]
6,068,152
1
6,076,749
null
1
1,653
I'm attempting to adjust a scroll view when a user taps the keyboard's "Next" button. The tricky part is that I'm programmatically generating custom table cells. Each cell holds a text field. It looks something like this: ![https://img.skitch.com/20110520-n8k7cm224mtfdc2wsgpjpmghke.jpg](https://i.stack.imgur.com/qCZfl.jpg) I tried following [Apple's instructions](http://developer.apple.com/library/ios/#documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html%23//apple_ref/doc/uid/TP40009542-CH5-SW1) for moving the content from behind the keyboard, but I found that it doesn't quite work for this instance, primarily because the UIKeyboardDidShowNotification is only called once, not for each time the "Next" button is tapped. My solution was to rewire Apple's example to use UIKeyboardDidShowNotification to store the keyboard height and textFieldDidBeginEditing to handle the scroll view adjustment. Here's how I'm (attempting) to adjust the scroll view: ``` - (void)textFieldDidBeginEditing:(UITextField *)textField { activeField = textField; UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0, 0.0, kbHeight, 0.0); scrollView.contentInset = contentInsets; scrollView.scrollIndicatorInsets = contentInsets; CGRect aRect = self.view.frame; aRect.size.height -= kbHeight; if (!CGRectContainsPoint(aRect, activeField.frame.origin) ) { CGPoint scrollPoint = CGPointMake(0.0, activeField.frame.origin.y-kbHeight); [scrollView setContentOffset:scrollPoint animated:YES]; } } ``` In this function, the if block never fires. I used a couple of NSLog statements to find that each instance of activeField reports the same origin (despite not sharing a visible origin when the application is running). I know that the activeField variable is updating properly, as I've dumped it to the log, and the field's tag is different every time this function is called. So, my question--I think--is: how do I get programmatically generated, custom table cells that contain a text field to have the correct origin?
ScrollViews, Keyboards, Hidden Text Fields, and Programmatically Drawn Custom Table Cells
CC BY-SA 3.0
0
2011-05-20T06:18:02.450
2011-11-28T06:06:12.123
2011-11-28T06:06:12.123
234,976
544,135
[ "ios" ]
6,068,355
1
null
null
0
672
![News item](https://i.stack.imgur.com/jPn5r.jpg) In the image above, I am displaying news items in a bubble format. These are all in a list, like so: ``` <ul> <li> <h2>South West Training Association</h2> <p>South West Training Association to get online makeover ....</p> <a href="#"><img src="images/readmore.jpg" alt="Read More" width="72" height="22" border="0" /></a> </li> </ul> ``` ``` ul{ list-style-type:none;} ul h2{color:#01558a; text-decoration:none; font-size:90%; font-weight:bold; font-style:normal;} ul p{font-size:.7em; font-style:italic; line-height:1.1em; padding:4px 0; margin:0;} ul li{background:#f8f5d4 url(../images/news-li-bottom.jpg) no-repeat left bottom; border:#ebe6b3 2px solid; padding:8px; -moz-border-radius: 6px;-webkit-border-radius: 6px;border-radius: 6px;behavior: url(border-radius.htc); margin:0 0 20px 0; display:block;} ``` The CSS generates a round cornered box for the news item. I want to place the arrow below as I have mentioned in the list item background. Now I want to move it 20px below the bottom. How can I do that?
Background image to be moved below li tag
CC BY-SA 3.0
null
2011-05-20T06:42:22.980
2012-09-04T21:19:36.677
2012-09-04T21:19:36.677
246,246
490,932
[ "html", "css", "background", "html-lists" ]
6,068,817
1
6,069,605
null
1
960
I have been looking at posts about determining if a point lies within a polygon or not and the answers are either too vague, abstract, or complex for me. So I am going to try to ask my question specific to what I need to do. I have a set of points that describe a non-straight line (sometimes a closed polygon). I have a rectangular "view" region. I need to determine as efficiently as possible whether any of the line segments (or polygon borders) pass through the view region. I can't simply test each point to see if it lies within the view region. It is possible for a segment to pass through the region without any point actually inside the region (ie the line is drawn across the region). Here is an example of what I want to determine (red means the function should return true for the set of points, blue means it should return false, example uses straight lines and rectangles because I am not an artist). ![Red indicates the function should return true, blue indicates it should return false](https://i.stack.imgur.com/oDu82.png) Another condition I want to be able to account for (though the method/function may be a separate one), is to determine not just whether a polygon's border passes through the rectangular region, but whether the region is entirely encompassed by the polygon. The nuance here is that in the situation first described above, if I am only concerned with drawing borders, the method should return false. But in the situation described here, then I need the function to return true. I currently do not need to worry about testing "donut" shaped polygons (thank God!). Here is an example illustrating the nuance (the red rectangle does not have a single vertex or border segment passing through the on-screen region, but it should still be considered on-screen): ![The red rectangle does not have a single vertex or border segment passing through the on-screen region, but it should still be considered on-screen.](https://i.stack.imgur.com/tl0tf.png) For the "does any line segment or polygon border pass through or lie on screen?" problem I know I can come up with a solution (albeit perhaps not an efficient one). Even though it is more verbose, the conditions are clear to me. But the second "is polygon region on screen?" problem is a little harder. I'm hoping someone might have a good suggestion for doing this. And if one solution is easily implemented on top of the other, well, booya. As always, thank you in advance for any help or suggestions. PS I have a function for determining line intersection, but it seems like overkill to use it to compare each segment to each side of the on-screen region because the on-screen region is ALWAYS a plain [0, 0, width, height] rectangle. Isn't there some kind of short-cut?
How do I determine if a series of points (or polygon) is within a rectangular region?
CC BY-SA 3.0
null
2011-05-20T07:31:25.037
2011-05-20T08:56:30.467
null
null
602,680
[ "apache-flex", "actionscript-3", "polygon", "point-in-polygon", "line-intersection" ]
6,068,866
1
6,068,946
null
0
123
EDIT: Solved this by from Java-code adding headers and footers with transparent background to the ListView. Hi, I'm trying to make a ListView that has a gradient as a background and the content inside a frame. I have some screenshots of what I'm trying to acheive. The first screenshots shows how I want it too look from start. The list is shown in a box with rounded corners and a green background. This is acheived by adding padding to the LinearLayout surronding the ListView. However, when I add padding on top, the scrolling looks like in the third picture, which is not what I want. The first field with name and phonenumber is a header for the listview. Any suggestions on how to make the listview behave like this? ![Here is the list before the scroll](https://i.stack.imgur.com/34oR5.png) ![This is what I want it too loo like](https://i.stack.imgur.com/sc3b6.png) ![This is how it behaves now](https://i.stack.imgur.com/bVuDn.png)
Customized ListView with scolling background
CC BY-SA 3.0
null
2011-05-20T07:37:39.280
2011-05-20T10:44:54.727
2011-05-20T10:44:54.727
548,723
548,723
[ "android" ]
6,068,873
1
6,070,738
null
3
2,522
I'm plotting a histogram of a population that seems to be of [log Laplacian](http://en.wikipedia.org/wiki/Log-Laplace_distribution) distribution: ![enter image description here](https://i.stack.imgur.com/wSl5u.png) I'm trying to draw a line of best fit for it to verify my hypothesis, but I'm having problems getting meaningful results. I'm using the Laplacian PDF definition from [Wikipedia](http://en.wikipedia.org/wiki/Laplace_distribution) and taking 10 to the power of the PDF (to "reverse" the effects of the log histogram). What am I doing wrong? Here is my code. I pipe things through standard input (`cat pop.txt | python hist.py`) -- [here's](http://pastebin.com/8RHeqNb3) a sample population. ``` from pylab import * import numpy def laplace(x, mu, b): return 10**(1.0/(2*b) * numpy.exp(-abs(x - mu)/b)) def main(): import sys num = map(int, sys.stdin.read().strip().split(' ')) nbins = max(num) - min(num) n, bins, patches = hist(num, nbins, range=(min(num), max(num)), log=True, align='left') loc, scale = 0., 1. x = numpy.arange(bins[0], bins[-1], 1.) pdf = laplace(x, 0., 1.) plot(x, pdf) width = max(-min(num), max(num)) xlim((-width, width)) ylim((1.0, 10**7)) show() if __name__ == '__main__': main() ``` OK, here is the attempt to match it to a regular Laplacian distribution (as opposed to a log Laplacian). Differences from above attempt: - - - `laplace` Output: ![enter image description here](https://i.stack.imgur.com/9KerO.png) As you can see, it isn't the best match, but the figures (the histogram and the Laplace PDF) are at least now in the same ballpark. I think the log Laplace will match a lot better. My approach (source above) didn't work. Can anybody suggest a way to do this what works? Source: ``` from pylab import * import numpy def laplace(x, mu, b): return 1.0/(2*b) * numpy.exp(-abs(x - mu)/b) def main(): import sys num = map(int, sys.stdin.read().strip().split(' ')) nbins = max(num) - min(num) n, bins, patches = hist(num, nbins, range=(min(num), max(num)), log=False, align='left', normed=True) loc, scale = 0., 0.54 x = numpy.arange(bins[0], bins[-1], 1.) pdf = laplace(x, loc, scale) plot(x, pdf) width = max(-min(num), max(num)) xlim((-width, width)) show() if __name__ == '__main__': main() ```
Matplotlib histogram with log Laplacian PDF
CC BY-SA 3.0
0
2011-05-20T07:38:44.120
2011-05-20T15:23:38.377
2011-05-20T13:28:15.260
356,020
356,020
[ "python", "matplotlib", "histogram" ]
6,068,903
1
6,099,703
null
1
2,138
I'm writing a 2D game using OpenGL, using png images (64x64 pixels, with transparency) stored in my resources. My code looks like this : ``` import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import javax.microedition.khronos.opengles.GL11; import javax.microedition.khronos.opengles.GL11Ext; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.opengl.GLUtils; import android.opengl.GLSurfaceView.Renderer; public class TestGLRenderer implements Renderer { private int mTexGLNames[]; private Context mContext; public TestGLRenderer(Context ctx) { mContext = ctx; } public void onSurfaceCreated(GL10 gl, EGLConfig config) { // setup the gl renderer gl.glClearColor(0.2f, 0.4f, 0.6f, 1.0f); gl.glEnable(GL10.GL_TEXTURE_2D); gl.glShadeModel(GL10.GL_FLAT); gl.glEnable(GL10.GL_BLEND); gl.glBlendFunc(GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA); // reserve GL texture names mTexGLNames = new int[1]; gl.glGenTextures(1, mTexGLNames, 0); // load image from resources Bitmap b; b = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.image); // load image in opengl gl.glBindTexture(GL10.GL_TEXTURE_2D, mTexGLNames[0]); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, b, 0); } public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); gl.glBindTexture(GL10.GL_TEXTURE_2D, mTexGLNames[0]); int crop[] = new int[] { 0, 64, 64, -64 }; ((GL11) gl).glTexParameteriv(GL10.GL_TEXTURE_2D, GL11Ext.GL_TEXTURE_CROP_RECT_OES, crop, 0); ((GL11Ext) gl).glDrawTexfOES(160, 240, 0, 64, 64); } public void onSurfaceChanged(GL10 gl, int w, int h) { } } ``` The result is working as expected in the emulator (running Android 2.2), but the image appears as a black square on my phone (LG-P500, Android 2.2). Attached are screenshots from both the emulator and my phone. Is there something wrong with my code, or is it a problem with my phone (my phone can run other 3D games without problems) ? ![Screenshot from the emulator](https://i.stack.imgur.com/0OXRb.png) ![Screenshot from my phone](https://i.stack.imgur.com/UbqQl.png)
glDrawTexfOES draws black texture on phone, and correct in emulator
CC BY-SA 3.0
0
2011-05-20T07:41:52.850
2014-05-11T00:19:44.387
null
null
612,206
[ "android", "opengl-es" ]
6,068,993
1
6,069,501
null
2
1,391
I really have problems with the jQuery drag and drop. So let me explain the situation a bit. What I want to achieve is the following: when you drag one of the teardrops on the timeline, the id from the div and the id from the item it's dropped on, should be stored in my db immediately after the drop. I managed to do that with ajax, here's the code: ``` $('#dropzone ul li').droppable({ drop: function(event, ui) { var day = $(".confirmday").val(); var $drag = $(ui.draggable), var $drop = $(this); var drag = $drag.attr('id'); var drop = $drop.attr('id'); console.log(drag); if(drag == 'drag1') { drag = 'Medicijnen'; werkwoord = ' ingenomen om '; } else if(drag == 'drag2') { drag = 'Snack'; werkwoord = ' gegeten om '; } else if(drag == 'drag3') { drag = 'Frisdrank'; werkwoord = ' gedronken om '; } else if(drag == 'drag4') { drag = 'Thee'; werkwoord = ' gedronken om '; } else if(drag == 'drag5') { drag = 'Koffie'; werkwoord = ' gedronken om '; } else if(drag == 'drag6') { drag = 'Alcohol'; werkwoord = ' gedronken om '; } $.post("ajax/save.php", { drag: drag, drop: drop, userid: <?php echo $_SESSION['id']; ?>, day: day}, function(data) { }); return false; }, }); ``` But when I do that, the dragged item (or the clone of that item) just disappears. I don't know why, because the page doesn't refresh. The new item just won't store. The other option I tried was to put the dragged item's ID and the dropped on item ID in a text box and to save that every time something is dropped. But that won't work as well. I really hope someone can help me! Thanks in advance. ![enter image description here](https://i.stack.imgur.com/VyqAl.png)
Dragged item disappears after drop with ajax
CC BY-SA 3.0
0
2011-05-20T07:52:29.887
2011-05-20T08:47:57.767
2011-05-20T08:35:05.760
358,556
null
[ "jquery", "jquery-ui", "jquery-ui-draggable", "jquery-ui-droppable" ]
6,068,939
1
6,072,034
null
0
323
im starting to use css, and im having a problem aligning images and block within the page. this is my html source: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta HTTP-EQUIV="Pragma" CONTENT="no-cache"/> <title>Title</title> <link href="resources/css/style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper"> <div id="header-menu"> <img id="barleft" src="resources/images/barleft.png" alt=""/> <div id="header-content"> <div id="menu"> <div id="logo"> <img id="imgLogo" src="resources/images/logoPINFTyny.png" alt="PINF"/> </div> <div id="search"></div> <ul> <li class="current_page_item"><a href="index.html">/home</a></li> <li><a href="index.html">/usr</a></li> <li><a href="index.html">/etc</a></li> </ul> </div> </div> <img id="barright" src="resources/images/barright.png" alt=""/> <div style="clear:both;"></div> </div> <!-- end #header --> <div id="page"> <div id="left-sidebar"> <div id="actions"> <h3> Acciones </h3> <ul> <li>accion1</li> <li>accion2</li> <li>accion3</li> <li>accion4</li> </ul> </div> <div id="news"> <h3> Noticias </h3> <ul> <li>Noticia1</li> <li>Noticia2</li> <li>Noticia3</li> <li>Noticia4</li> </ul> </div> </div> <div id="content"> <h1> Este es el titulo el content </h1> <h3> Este es el subtítulo del content </h3> <p> Esto es lo que debe ir escrito en el content<br/>In posuere eleifend odio. Quisque semper augue mattis wisi. Maecenas ligula. Pellentesque viverra vulputate enim. Aliquam erat volutpat. Pellentesque tristique ante ut risus. Quisque dictum. Integer nisl risus, sagittis convallis, rutrum id, elementum congue, nibh. Suspendisse dictum porta lectus. Donec placerat odio vel elit. Nullam ante orci, pellentesque eget, tempus quis, ultrices in, est. Curabitur sit amet nulla. Nam in massa. Sed vel tellus. Curabitur sem urna, consequat vel, suscipit in, mattis placerat, nulla. Sed ac leo. Pellentesque imperdiet. </p> </div> <div id="right-sidebar"> <div id="actions"> <h3> Acciones </h3> <ul> <li>accion1</li> <li>accion2</li> <li>accion3</li> <li>accion4</li> </ul> </div> <div id="news"> <h3> Noticias </h3> <ul> <li>Noticia1</li> <li>Noticia2</li> <li>Noticia3</li> <li>Noticia4</li> </ul> </div> </div> </div> <!-- end #page --> </div> <div style="clear:both;"></div> <div id="footer"> <p>© 2011 Todos los derechos reservados. Sistema diseñado y desarrollado por <a href="http://www.css.com"><img id="logoFooter" src="resources/images/logo-SIR-trans.png" alt="SIR" width="30px" height="30px"/>Sistemas Integrales Roraima</a></p> </div> <!-- end #footer --> </body> </html> ``` and this is my css: ``` body { margin: 0; padding: 0; /* background: #F7F7F7 url(../images/img01.jpg) repeat left top; font-family: Georgia, "Times New Roman", Times, serif; */ font-family: Verdana, Arial, Helvetica, sans-serif;c font-size: 14px; /*color: #5A554E;*/ } div { display: block; } h1, h2, h3 { margin: 0; padding: 0; font-weight: normal; /*color: #32639A;*/ font-family: Verdana, Arial, Helvetica, sans-serif; } h1 { font-size: 2.4em; font-weight: 600; } h2 { font-size: 2em; } h3 { font-size: 1.6em; } p, ul, ol { margin-top: 0; /*line-height: 200%;*/ font-family: Verdana, Arial, Helvetica, sans-serif; } ul, ol { margin: 0px; padding: 0px; list-style: none; } a { text-decoration: underline; color: #516C00; } a:hover { text-decoration: none; } #wrapper { margin: 0px; padding: 0px; /*background: url(../images/img02.jpg) repeat-x left top;*/ } /* Header */ #header-menu { width: auto; height: 50px; padding: 0px; display: block; /*background: url(../images/usb.jpg);*/ } #barleft { float:left; top: 0px; left: 0px; } #header-content { margin: 0px 30px 0px 0px; /*padding: 0px 30px 0px 30px;*/ position: relative; left: 30px; right: 30px; height:50px; background-color: black; } #header-content #search { width:auto; height:auto; } #header-content #menu { position: relative; right:30px; top: 0px; } #header-content ul { height: 50px; width: auto; /* line-height: 100%;*/ float: right; clear:none; } #barright { float:right; top: 0px; right: 0px; } /* Logo */ #logo { width: 250px; height: 50px; margin: 0px; padding: 0px 0px 0px 0px; color: #000000; float:left; } /* Menu */ #menu { width: auto; height: 50px; margin: 0 auto; padding: 0; display: block; /*background: url(../images/inter-top-body.png) repeat left top;*/ } #menu li { display: inline; } #menu a:hover, #menu .current_page_item a { text-decoration: none; } #menu .current_page_item a { background: url(../images/img06.jpg) no-repeat left top; padding-left: 0; color: #493E2B; } /* Page */ #page { width: 1024px; padding: 0px 0px 0px 0px; background: #FFFFFF; display: inline-block; } /* Content */ #content { width: 736px; padding: 0px 0px 0px 0px; display: block; } /* Sidebar */ #left-sidebar { float: left; width: 256px; padding: 0px; color: #787878; display: block; } #right-sidebar { float: right; width: 256px; padding: 0px; color: #787878; display: block; } /* Footer */ #footer { clear: both; width: 1024px; height: 50px; margin: 0 auto; padding: 0px 0px 0px 0px; background: url(../images/img15.jpg) no-repeat left top; font-size: 12px; color: #887450; height: 50px; margin: 0 auto; padding: 0px 0 15px 0; font-family: Arial, Helvetica, sans-serif; } #footer p { text-align:center; } ``` the thing is, my header-menu bar doesnt align with images i put at both extremes to eliminate corners... the same seems to happen with the "page" section. Left-sidebar, content and right-sidebar are not at the same level as i thought i was doing. heres the screenshot: ![screenshot](https://i.stack.imgur.com/YSlfQ.png) Notice the little black piece at the right that sould be inline with the black bar, and the black bar should end 30px before the left top, so that little piece can fit in there. Something simmilar seems to be happening with the page section... Im pretty lost because im just learning css... hope you can help me thanks!
Problem aligning divs using html and css
CC BY-SA 3.0
null
2011-05-20T07:44:35.047
2011-05-20T12:42:38.220
2011-05-20T07:51:20.127
667,599
667,599
[ "html", "css" ]
6,069,122
1
6,124,375
null
101
82,201
I am building an application that uses camera to take pictures. Here is my source code to do this: ``` File file = new File(Environment.getExternalStorageDirectory(), imageFileName); imageFilePath = file.getPath(); Intent intent = new Intent("android.media.action.IMAGE_CAPTURE"); // Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file)); startActivityForResult(intent, ACTIVITY_NATIVE_CAMERA_AQUIRE); ``` On `onActivityResult()` method, I use `BitmapFactory.decodeStream()` to pickup the image. When I run my application on Nexus one, it runs well. But when I run on Samsung Galaxy S or HTC Inspire 4G, the image's direction is not correct. - ![image preview after shot](https://i.stack.imgur.com/6MXUL.png) ![real image on SD card](https://i.stack.imgur.com/yiNdx.png) Image preview after shot --------- Real image on SD card - ![Image preview after shot](https://i.stack.imgur.com/pFvwi.png) ![Real image on SD card](https://i.stack.imgur.com/kZmx7.png) Image preview after shot --------- Real image on SD card
Camera orientation issue in Android
CC BY-SA 4.0
0
2011-05-20T08:07:21.660
2023-01-13T10:30:20.550
2023-01-13T10:29:31.060
1,788,806
523,325
[ "android", "orientation", "android-camera-intent" ]
6,069,135
1
6,069,263
null
1
1,801
I want to set some default text in background of control (e.g. TreeView, ListView, GridView etc). Text is shown when no item in items control and hides when items control is not empty. I imagine it like this: ![enter image description here](https://i.stack.imgur.com/lA5ei.jpg)
how to set text in background of control
CC BY-SA 3.0
null
2011-05-20T08:08:37.737
2011-05-21T04:08:08.723
null
null
368,140
[ "wpf", "xaml" ]
6,069,225
1
6,072,516
null
10
5,392
I've seen this tool in YouTube [Chrome Dev Tools Reloaded](http://www.youtube.com/watch?v=N8SS-rUEZPg&feature=player_embedded) ![enter image description here](https://i.stack.imgur.com/PVyLh.jpg) But I have not found in my Chrome dev tools ,, What is the reason? ![enter image description here](https://i.stack.imgur.com/OT1K6.png) thanks
I have not found pretty print built in my Chrome dev tools
CC BY-SA 3.0
null
2011-05-20T08:16:58.123
2012-01-21T21:04:08.157
2011-05-20T10:10:25.487
554,019
554,019
[ "google-chrome", "google-chrome-devtools" ]
6,069,249
1
6,124,063
null
0
712
friends i want to display this screen from my application of google map builtin application. ![enter image description here](https://i.stack.imgur.com/ZULGW.jpg) my function ``` String url = "http://maps.google.com/maps?f=d&hl=en&saddr=" + lat + "," + longi + "&daddr=" + bankDetail.getCoordinates() + "&dirflg=t"; Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(url)); startActivity(i); ``` it show mentioned screen in emulator but not in phone. any one guide me what mistake am i doing here?
how to display google map route screen from your application?
CC BY-SA 3.0
null
2011-05-20T08:19:42.723
2011-05-25T11:55:33.537
null
null
249,991
[ "android", "google-maps" ]
6,069,238
1
6,070,286
null
2
622
I guess this is a slightly awkward question, so let me rephrase it with an illustration: ![enter image description here](https://i.stack.imgur.com/7teHO.png) I have an UITextView which is limited to a certain amount of chars. This is regularly checked with `- (BOOL)textView:(UITextView *)aTextView shouldChangeTextInRange:(NSRange)aRange replacementText:(NSString *)aText`. Once the text is larger than the thresh hold (in the illustration it would be 8 chars), the app changes to the next textView and copies the next char entered (in this case p) to the new UITextView. The user can then enters the rest of the word (in this case py). Instead of splitting the word over two UITextViews, I would like to have the entire word 'happy' in the next UITextView. In other words, I need to copy the 'hap' from string 1 to the beginning of string 2 and then delete 'hap' from string 1. I came up with this code which checks string 1 for spaces and copies everything after a space into string 2. But it won't work: ``` NSLog(@"text of current string: %@", aTextView.text); // e.g. "I am hap" NSLog(@"chars in aTextView.text: %i", aTextView.text.length); // e.g. 8 chars NSLog(@"text for next string: %@ ", aText); // e.g. "py" NSString *aTextModified = aText; for (int i = aTextView.text.length; i > 0; i--) { NSLog(@"I currently check: '@%'", [aTextView.text characterAtIndex:i]); if ([[aTextView.text characterAtIndex:i] isEqualToString:@" "]) { // job done } else { NSLog(@"I add %@ infront of %@", [aTextView.text characterAtIndex:i], aText); aTextModified = [NSString stringWithFormat:@"%@%@", [aTextView.text characterAtIndex:i], aText]; NSLog(@"I delete %@ as I have put it into the next string...", [aTextView.text characterAtIndex:i]); [aTextView.text characterAtIndex:i] = @""; } } ``` XCode gives me the warning 'Invalid receiver type 'unichar'' for the line `if ([[aTextView.text characterAtIndex:i] isEqualToString:@" "])`. I guess I'm not using the characterAtIndex right? Am I not allowed to apply this to a text (which should be an UIString) in an UITextView? Also, I get the error 'LValue required as left opperand of assignement' for the last line `[aTextView.text characterAtIndex:i] = @"";` Again, I guess I don't really understand how to access a char in an UITextView and modify it. I'd be very grateful for any suggestions of how to do this right - and if there are easier ways to achieve what I'm trying to do.
How to avoid splitting a word over two UITextViews
CC BY-SA 3.0
null
2011-05-20T08:18:36.063
2011-05-20T10:35:44.023
null
null
648,371
[ "iphone", "objective-c", "cocoa-touch", "uitextview" ]
6,069,366
1
6,094,284
null
1
1,982
Do somebody know if it's possible change the UISearchBar's background? I mean to the inside (see image attached), i think that component is a UITextField. ![enter image description here](https://i.stack.imgur.com/UD3T4.jpg) Thank you!
UISearchBar with background in the text
CC BY-SA 3.0
0
2011-05-20T08:32:43.457
2013-07-05T07:57:56.363
2013-07-05T07:57:56.363
455,302
455,302
[ "ios", "background", "ios4", "uitextfield", "uisearchbar" ]
6,069,482
1
6,069,524
null
1
571
I have first manually created a `DataSet` in my project name `recvd.xsd` having corresponding `recvd.xss`. On my button click event i have done the following coding. ``` try { DataSet recvd_REPORT = new DataSet(); DataTable REPORT = new DataTable(); String dd_webCofig = ConfigurationManager.ConnectionStrings["server2"].ConnectionString; OdbcConnection ddlistconn = new OdbcConnection(dd_webCofig); ddlistconn.Open(); REPORT = recvd_REPORT.Tables["REPORT"]; DataColumn myDataColumn = new DataColumn(); myDataColumn.DataType = typeof(System.Int32); myDataColumn.ColumnName = "RECEIVED"; myDataColumn.ReadOnly = false; myDataColumn.Unique = false; // Add the Column to the DataColumnCollection. REPORT.Columns.Add(myDataColumn); string query = "SELECT case_no as \"RECEIVED\" from dcpanaji.Civil_t where dt_regis > '" + txtStartDate.Text + "' AND dt_regis < '" + txtEndDate.Text + "' AND court_no = " + DropDownList1.SelectedItem + ""; Response.Write(query); OdbcCommand cmd = new OdbcCommand(query, ddlistconn); OdbcDataReader loginMyReader = cmd.ExecuteReader(); OdbcDataAdapter adptr = new OdbcDataAdapter(query, ddlistconn); adptr.Fill(REPORT); ddlistconn.Close(); } catch (Exception ex) { Response.Write(ex.Message); } ``` I am getting the error as > Object reference not set to an instance of an object. If i remove `as \"RECEIVED\"` from my SQL query and simply execute my SQL query than the result of my query is as follows (varies depending on user input) `200200000452011` ......, n numbers of 12 digit number. Please help me to remove the error as to why am i not able to bind to DataTable. I am getting the error before `Response.Write(query);` is executed, why is that problem? I removed the try catch block and now i get the error as ![enter image description here](https://i.stack.imgur.com/LCCeu.jpg)
Problem in using DataSet
CC BY-SA 3.0
null
2011-05-20T08:45:33.810
2011-05-20T10:32:44.003
2011-05-20T10:32:44.003
243,680
243,680
[ "c#", "mysql", "ado.net", "dataset" ]
6,069,649
1
6,251,157
null
7
21,576
I am having VS 2010 Professional with SP1. I can see EF listed under Uninsall/remove a program list. I have already referred these questions which don't have any solution. Hence starting a new thread. - [SO entry1](https://stackoverflow.com/questions/5696436/no-entity-data-model-edmx-template-with-visual-studio-2010-sp1-ado-net-entity)- [SO entry2](https://stackoverflow.com/questions/2846048/dont-see-entity-framework-template-after-visual-studio-2010-install-on-windows-7) Searching over internet didn't provide much help either. There were few blogs suggesting to reinstall VS 2010. Is there a way I can download and copy ADO.net EF template on my machine without the need to reinstall VS 2010. Thank you. ![Screen capture from Unistall/remove programs](https://i.stack.imgur.com/8y8p6.jpg) ![Missing Template in VS 2010 SP1](https://i.stack.imgur.com/IhJPm.jpg) ![enter image description here](https://i.stack.imgur.com/cPs4m.jpg) ![enter image description here](https://i.stack.imgur.com/9lH72.jpg)
Missing ADO.net Entity framework template in VS 2010 SP1
CC BY-SA 3.0
0
2011-05-20T09:01:16.087
2012-04-07T01:31:24.797
2017-05-23T12:02:50.043
-1
458,548
[ "visual-studio-2010", "entity-framework", "templates", "ado.net" ]
6,069,792
1
6,070,497
null
1
208
How to Avoid hexadecimal characters before parsing XML? ![enter image description here](https://i.stack.imgur.com/EG5AE.jpg)
Avoid hexadecimal characters before parsing XML
CC BY-SA 3.0
null
2011-05-20T09:13:46.880
2017-08-01T03:22:05.917
2017-08-01T03:22:05.917
1,033,581
762,438
[ "c#", "xml", "parsing", "hex" ]
6,069,981
1
6,070,026
null
34
64,837
Here is table with email and checkbox cells. But how i can disable textwrapping? Code is someting like: ``` <table> <tr> <td> <input type="checkbox" /> <td> Dmitry soloviev ([email protected]) </tr> ........... </table> ``` ![enter image description here](https://i.stack.imgur.com/ZhNsr.png)
Disable text wrapping
CC BY-SA 3.0
0
2011-05-20T09:29:51.297
2019-02-19T11:25:51.297
null
null
290,082
[ "html", "css" ]
6,069,983
1
null
null
3
2,961
Sorry for the long post, but I tried to explain the problem very detailed so that no confusion should arise. The last sentence contains the actual question. I'm programming a multi-thread application with C#/.NET. The application consists of a main window, which visualizes data, coming from a pressure sensor. The sensor data is acquired in an own thread. The data is also logged in an instance of class `ListView`: ![enter image description here](https://i.stack.imgur.com/iO05j.png) There is the possibility to save the logged data to file on disk via a "Save" button (should open an instance of .NET class `SaveFileDialog`). This `SaveFileDialog` is also running in an own thread. Now there's a problem when calling the method `SaveFileDialog.ShowDialog()`: > System.InvalidOperationException was unhandled Message="Cross-thread operation not valid: Control 'tlpMain' accessed from a thread other than the thread it was created on." Source="System.Windows.Forms" The problem arises because the owner (the main window) of the is running in another thread. Here's the code, which creates the thread for the SaveFileDialog(): ``` private void bSave_Click(object sender, EventArgs e) { Thread saveFileDialog = new Thread(OpenSaveFileDialog); saveFileDialog.SetApartmentState(ApartmentState.STA); saveFileDialog.Start(); } ``` Code for method OpenSaveFileDialog(): ``` private void OpenSaveFileDialog() { SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.Filter = "Text Files (*.txt)|*.txt|CSV (*.csv)|*.csv|All Files (*.*)|*.*"; saveFileDialog.FilterIndex = 0; /* Call "ShowDialog" with an owner ("this.Parent") to achieve, so that * the parent window is blocked and "unclickable". * * Danger of an "InvalidOperationException" because "this.Parent" control * is running (was created) in another thread. * But "this.Parent" should not be modified by this method call. */ DialogResult pressedButton = saveFileDialog.ShowDialog(this.Parent); ... ``` The is only thrown/displayed when running the application with Visual Studio's debugger. It is no problem - so far - when running the application "normally". But I would like to avoid this problem. I tried to build a wrapper method (SaveFileDialog): ``` private void OpenSaveFileDialog() { SaveFileDialog saveFileDialog = new SaveFileDialog(); ... SaveFileDialog(saveFileDialog, this.Parent); } ``` Wrapper method : ``` private void SaveFileDialog(SaveFileDialog saveFileDialog, Control owner) { if (owner.InvokeRequired) BeginInvoke(new dSaveFileDialog(SaveFileDialog), new object[] { saveFileDialog, owner }); else { DialogResult pressedButton = saveFileDialog.ShowDialog(owner); ... ``` This leads to a `TargetInvocationException` although the `Main()` method is labeled with `[STAThreadAttribute]`: > InnerException: System.Threading.ThreadStateException Message="Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process." Source="System.Windows.Forms" Does anybody have a clue how to open the `SaveFileDialog` in a way, so that the main window will be blocked ("unclickable") without having the (thread) trouble? Thank you.
SaveFileDialog: InvalidOperationException due to "owner" parameter in a multi-threaded application
CC BY-SA 3.0
0
2011-05-20T09:30:05.820
2012-10-24T07:50:59.443
2011-12-11T23:59:32.657
91,299
762,467
[ "c#", ".net", "winforms", "multithreading", "savefiledialog" ]
6,070,364
1
6,086,259
null
2
1,005
I've strange deadlock graph where the victim chosen by MSSQL server 2008 isn't part of the deadlock loop. This deadlock is between `select` and `insert`. The deadlock resource is a single table where all `select`s want `waitresource = "KEY: 6:72057594098810880 (ffffffffffff)"` : Does ffffffffffff here mean they want a full range lock on whole table? Or whole key range? Or something else? We are following a rule where table will never have a row with primary key id = 0. There are few places where we do this kind of check `select foo from bar where @someId = 0 OR SomeId = @someId`. I also came to know about that SQL doesn't short-circuit the expression. So if I pass `@someId = 0` that doesn't guarantee the other part won't be evaluated. So it's possible that SQL can execute at runtime `SomeId = @someId`. : Since it wasn't able to find 0 in SomeId, SQL will acquire a range lock on whole table (or row) so no one else inserts 0 id. Right? With that assumption in mind I changed the where clause to this ``` (CASE WHEN @someId = 0 THEN 1 WHEN SomeId = @someId THEN 1 ELSE 0 END = 1) ``` hoping that this will force evaluation order. But I'm wrong. I'm getting the deadlock again. I've attached the deadlock graph below. I've renamed tables and sprocs involved (Company policy) : Do you know what I'm missing here? ![enter image description here](https://i.stack.imgur.com/EW5xI.png) ``` <deadlock-list> <deadlock victim="process722c508"> <process-list> <process id="process722c508" taskpriority="0" logused="0" waitresource="KEY: 6:72057594098810880 (ffffffffffff)" waittime="6217" ownerId="24219001" transactionname="SELECT" lasttranstarted="2011-05-17T03:29:16.033" XDES="0x80073a40" lockMode="RangeS-S" schedulerid="13" kpid="20436" status="suspended" spid="91" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2011-05-17T03:29:16.033" lastbatchcompleted="2011-05-17T03:29:16.033" clientapp=".Net SqlClient Data Provider" hostname="SOMEHOST" hostpid="28820" loginname="someloginname" isolationlevel="serializable (4)" xactid="24219001" currentdb="6" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056"> <executionStack> <frame procname="fnGetTableResultAByBId" line="44" stmtstart="2246" stmtend="3566" sqlhandle="0x03000600800d7f0bda124000d99e00000000000000000000"> INSERT INTO @ReturnTable SELECT Foo, Bar FROM TheOneTable WHERE ZId = @zId AND (CASE WHEN @yId = 0 THEN 1 WHEN YId = @yId THEN 1 ELSE 0 END = 1) AND (CASE WHEN @xId = 0 THEN 1 WHEN XId = @xId THEN 1 ELSE 0 END = 1) </frame> <frame procname="GetViewCByDId" line="9" stmtstart="272" stmtend="2984" sqlhandle="0x03000600c21629025d8f3f00d99e00000100000000000000"> </frame> </executionStack> <inputbuf> Proc [Database Id = 6 Object Id = 36247234] </inputbuf> </process> <process id="process7185048" taskpriority="0" logused="0" waitresource="KEY: 6:72057594098810880 (ffffffffffff)" waittime="6217" ownerId="24218992" transactionname="SELECT" lasttranstarted="2011-05-17T03:29:16.030" XDES="0x179980430" lockMode="RangeS-S" schedulerid="13" kpid="30616" status="suspended" spid="79" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2011-05-17T03:29:16.030" lastbatchcompleted="2011-05-17T03:29:16.030" clientapp=".Net SqlClient Data Provider" hostname="SOMEHOST" hostpid="28820" loginname="someloginname" isolationlevel="serializable (4)" xactid="24218992" currentdb="6" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056"> <executionStack> <frame procname="fnGetTableResultAByBId" line="44" stmtstart="2246" stmtend="3566" sqlhandle="0x03000600800d7f0bda124000d99e00000000000000000000"> INSERT INTO @ReturnTable SELECT Foo, Bar FROM TheOneTable WHERE ZId = @zId AND (CASE WHEN @yId = 0 THEN 1 WHEN YId = @yId THEN 1 ELSE 0 END = 1) AND (CASE WHEN @xId = 0 THEN 1 WHEN XId = @xId THEN 1 ELSE 0 END = 1) </frame> <frame procname="GetViewCByDId" line="9" stmtstart="272" stmtend="2984" sqlhandle="0x03000600c21629025d8f3f00d99e00000100000000000000"> </frame> </executionStack> <inputbuf> Proc [Database Id = 6 Object Id = 36247234] </inputbuf> </process> <process id="process7223048" taskpriority="0" logused="0" waitresource="KEY: 6:72057594098810880 (ffffffffffff)" waittime="5330" ownerId="24235090" transactionname="SELECT" lasttranstarted="2011-05-17T03:29:16.927" XDES="0x840d3b30" lockMode="RangeS-S" schedulerid="15" kpid="23452" status="suspended" spid="88" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2011-05-17T03:29:16.927" lastbatchcompleted="2011-05-17T03:29:16.927" clientapp=".Net SqlClient Data Provider" hostname="SOMEHOST" hostpid="28820" loginname="someloginname" isolationlevel="serializable (4)" xactid="24235090" currentdb="6" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056"> <executionStack> <frame procname="GetOneRowEByFId" line="11" stmtstart="260" stmtend="2456" sqlhandle="0x03000600db082c08ba823f00d99e00000100000000000000"> SELECT TOP 1 Col1, Col2, Col3 FROM The2ndTable INNER JOIN [dbo].[TheOneTable] ON [dbo].[TheOneTable].[LinkBetweenOneAndTwoId]=[The2ndTable].[LinkBetweenOneAndTwoId] WHERE [dbo].[TheOneTable].ZId= @ActivityId and [TheOneTable].[n </frame> </executionStack> <inputbuf> Proc [Database Id = 6 Object Id = 137103579] </inputbuf> </process> <process id="process6334088" taskpriority="0" logused="0" waitresource="KEY: 6:72057594098810880 (ffffffffffff)" waittime="5668" ownerId="24229434" transactionname="SELECT" lasttranstarted="2011-05-17T03:29:16.587" XDES="0x17ea9ac90" lockMode="RangeS-S" schedulerid="12" kpid="5104" status="suspended" spid="86" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2011-05-17T03:29:16.587" lastbatchcompleted="2011-05-17T03:29:16.587" clientapp=".Net SqlClient Data Provider" hostname="SOMEHOST" hostpid="28820" loginname="someloginname" isolationlevel="serializable (4)" xactid="24229434" currentdb="6" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056"> <executionStack> <frame procname="GetOneRowEByFId" line="11" stmtstart="260" stmtend="2456" sqlhandle="0x03000600db082c08ba823f00d99e00000100000000000000"> SELECT TOP 1 Col1, Col2, Col3 FROM The2ndTable INNER JOIN [dbo].[TheOneTable] ON [dbo].[TheOneTable].[LinkBetweenOneAndTwoId]=[The2ndTable].[LinkBetweenOneAndTwoId] WHERE [dbo].[TheOneTable].ZId= @ActivityId and [TheOneTable].[n</frame> </executionStack> <inputbuf> Proc [Database Id = 6 Object Id = 137103579] </inputbuf> </process> <process id="process8808e08" taskpriority="0" logused="0" waitresource="KEY: 6:72057594098810880 (ffffffffffff)" waittime="6652" ownerId="24217112" transactionname="SELECT" lasttranstarted="2011-05-17T03:29:15.610" XDES="0x833b5ca0" lockMode="RangeS-S" schedulerid="1" kpid="19752" status="suspended" spid="89" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2011-05-17T03:29:15.610" lastbatchcompleted="2011-05-17T03:29:15.610" clientapp=".Net SqlClient Data Provider" hostname="SOMEHOST" hostpid="28820" loginname="someloginname" isolationlevel="serializable (4)" xactid="24217112" currentdb="6" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056"> <executionStack> <frame procname="GetOneRowEByFId" line="11" stmtstart="260" stmtend="2456" sqlhandle="0x03000600db082c08ba823f00d99e00000100000000000000"> SELECT TOP 1 Col1, Col2, Col3 FROM The2ndTable INNER JOIN [dbo].[TheOneTable] ON [dbo].[TheOneTable].[LinkBetweenOneAndTwoId]=[The2ndTable].[LinkBetweenOneAndTwoId] WHERE [dbo].[TheOneTable].ZId= @ActivityId and [TheOneTable].[n </frame> </executionStack> <inputbuf> Proc [Database Id = 6 Object Id = 137103579] </inputbuf> </process> <process id="process5c08988" taskpriority="0" logused="1644" waitresource="KEY: 6:72057594098810880 (91a0638558d2)" waittime="4889" ownerId="24214248" transactionname="user_transaction" lasttranstarted="2011-05-17T03:29:15.327" XDES="0x186609470" lockMode="RangeI-N" schedulerid="9" kpid="9000" status="suspended" spid="102" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2011-05-17T03:29:15.330" lastbatchcompleted="2011-05-17T03:29:15.330" clientapp=".Net SqlClient Data Provider" hostname="SOMEHOST" hostpid="28820" loginname="someloginname" isolationlevel="serializable (4)" xactid="24214248" currentdb="6" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056"> <executionStack> <frame procname="InsertIntoTheOneTable" line="25" stmtstart="1334" stmtend="2608" sqlhandle="0x03000600bbbacb5d25883f00d99e00000100000000000000"> INSERT INTO [dbo].[TheOneTable] (Some,Col,Here) VALUES (@some,@col,@here) </frame> </executionStack> <inputbuf> Proc [Database Id = 6 Object Id = 1573632699] </inputbuf> </process> </process-list> <resource-list> <keylock hobtid="72057594098810880" dbid="6" objectname="TheOneTable" indexname="PK_TheOneTable" id="lock6b17a00" mode="RangeI-N" associatedObjectId="72057594098810880"> <owner-list /> <waiter-list> <waiter id="process722c508" mode="RangeS-S" requestType="wait" /> </waiter-list> </keylock> <keylock hobtid="72057594098810880" dbid="6" objectname="TheOneTable" indexname="PK_TheOneTable" id="lock6b17a00" mode="RangeI-N" associatedObjectId="72057594098810880"> <owner-list /> <waiter-list> <waiter id="process7185048" mode="RangeS-S" requestType="wait" /> </waiter-list> </keylock> <keylock hobtid="72057594098810880" dbid="6" objectname="TheOneTable" indexname="PK_TheOneTable" id="lock6b17a00" mode="RangeI-N" associatedObjectId="72057594098810880"> <owner-list /> <waiter-list> <waiter id="process7223048" mode="RangeS-S" requestType="wait" /> </waiter-list> </keylock> <keylock hobtid="72057594098810880" dbid="6" objectname="TheOneTable" indexname="PK_TheOneTable" id="lock6b17a00" mode="RangeI-N" associatedObjectId="72057594098810880"> <owner-list /> <waiter-list> <waiter id="process6334088" mode="RangeS-S" requestType="wait" /> </waiter-list> </keylock> <keylock hobtid="72057594098810880" dbid="6" objectname="TheOneTable" indexname="PK_TheOneTable" id="lock6b17a00" mode="RangeI-N" associatedObjectId="72057594098810880"> <owner-list> <owner id="process5c08988" mode="RangeI-N" /> </owner-list> <waiter-list> <waiter id="process8808e08" mode="RangeS-S" requestType="wait" /> </waiter-list> </keylock> <keylock hobtid="72057594098810880" dbid="6" objectname="TheOneTable" indexname="PK_TheOneTable" id="lock6372e80" mode="RangeS-S" associatedObjectId="72057594098810880"> <owner-list> <owner id="process7223048" mode="RangeS-S" /> <owner id="process6334088" mode="RangeS-S" /> </owner-list> <waiter-list> <waiter id="process5c08988" mode="RangeI-N" requestType="wait" /> </waiter-list> </keylock> </resource-list> </deadlock> </deadlock-list> ```
Deadlock puzzle : Victim doesn't own any resource, used to kill to resolve deadlock
CC BY-SA 3.0
0
2011-05-20T10:08:43.580
2011-05-22T05:41:28.103
2011-05-20T10:19:36.133
566,878
566,878
[ "sql", "sql-server", "sql-server-2008", "deadlock", "database-deadlocks" ]
6,070,472
1
9,130,637
null
3
3,039
I have a TabLayout. In that I have a tablelayout with dynamically added rows. When a TableRow is selected/clicked I want to set its background color to the Pressing or Clicked color of Tab. I don't want to set any static color but want to use the default theme color. How to get the color info of Tablayout ? How to handle the left and right side of the tabs ? This is what I get begore and after setting the tab_background.xml as th backgroundRsourse for all tabs : ![Tab bg settings](https://i.stack.imgur.com/FjLwY.png) On the left hand side, both the images are without any settings, but the right and left corners are smooth. On right hand side, both images are with setings, see the corners of selected tabs are just a square, they should be rounded off or smoth like the ones without any settings. It seems I got to use tab_selected_bar_right and tab_selected_bar_left. I have copied them to my drawable, but can't make out how do I use them. What settings to give int the xml below provided by @mudit. Please guide me. Any help is highly appreciated. I am in a hurry. Thanks
android: Set clicked color of Tab to background color of a TableRow
CC BY-SA 3.0
0
2011-05-20T10:17:34.933
2012-02-03T14:57:14.360
2011-05-24T08:52:18.023
455,979
455,979
[ "android", "tabs" ]
6,070,574
1
6,080,245
null
1
1,371
in jqgrid 4.0, i am trying to see if you can change the width of the advanced search screen Right now a horizontal scroll bar comes up). Is there anyway to make the width of the form bigger as it seems to not be adjustable. Here is a pic: ![enter image description here](https://i.stack.imgur.com/ATciQ.png)
How can i increase the default width of the advanced search form in the latest jqgrid?
CC BY-SA 3.0
0
2011-05-20T10:27:28.733
2013-12-10T10:15:13.407
null
null
4,653
[ "jquery", "search", "jqgrid" ]
6,070,669
1
6,105,410
null
1
167
Thanks to all, My question looks stupid but I have problem with UITextView. Why cursor doesn't reach to the end frame and than scroll. ![enter image description here](https://i.stack.imgur.com/XI3qn.png)
Why cursor doesn't reach till end of frame in UITextView
CC BY-SA 3.0
null
2011-05-20T10:35:06.997
2011-05-24T04:03:02.087
null
null
687,331
[ "iphone", "objective-c", "uitextview" ]
6,070,749
1
6,070,830
null
0
1,005
In my application,I want to display some static files(.html,.htm,.txt) which will be uploaded by the user(the admin),then I put them in a specified directory. Also,the admin can add new folder or files to the directory,so I think using the asp:treeview to display the file list is a good idea,and I found this : [http://mattberseth.com/blog/2007/07/hwo_to_create_an_aspnet_ajax_s.html](http://mattberseth.com/blog/2007/07/hwo_to_create_an_aspnet_ajax_s.html) ![enter image description here](https://i.stack.imgur.com/VwY1t.png) The tree view in the left is what I want even it just read the folders and list the in the tree,so I made some fix to list both folders and files,also I make the tree can be edited: ``` <form id="form" runat="server"> <div> <table id="tbl" cellpadding="0px" cellspacing="0px"> <tr> <td style="border:solid 1px black" valign="top"> <div style="overflow:auto;width:300px;height:450px;"> <asp:TreeView ID="tvFolders" runat="server" OnSelectedNodeChanged="TvFolders_SelectedNodeChanged"> <NodeStyle ImageUrl="Img/folder.gif" HorizontalPadding="3px" Font-Underline="false" ForeColor="black" /> <SelectedNodeStyle Font-Underline="true" Font-Bold="true" /> </asp:TreeView> </div> </td> </tr> </table> <br /> </div> <!-- The tree editor controls --> <div id="addFold" runat="server"></div> <div id="addFile" runat="server"></div> <div id="deleteFile" runat="server"></div> <div id="deleteFold" runat="server"></div> <!-- Div used to show the content of the file --> <div id="contentDiv" runat="server"></div> </form> ``` The rule.aspx.cs: ``` private DbService db=new DbService(); private bool isAdmin; protected void Page_Load(object sender, EventArgs e) { isAdmin=db.isUserAdmin(Context.Identify.user.name); if (!this.IsPostBack) { string rootFolder = this.Server.MapPath("files/"); TreeNode rootNode = new TreeNode("Root", rootFolder); rootNode.Expanded = true; rootNode.Select(); this.tvFolders.Nodes.Add(rootNode); BindDirs(rootFolder, rootNode); //set the editor button display or not according the type of current user setEditorVisibility(); } } private void setEditorVisibility(){ //if user select the directory,and he is the admin,so he can add fold/file under this directory,or delete this fold. addFold.visibile=deleteFold.visibile=addFile.visibile=isAdmin && Directory.Exist(ootNode.selectedNode.value); // if user select the file,and he is the admin,he can delte/update it. deleteFile.visibe=isAdmin && File.Exist(ootNode.selectedNode.value); } protected void TvFolders_SelectedNodeChanged(object sender, EventArgs args) { setEditorVisibility(); //now show the content in the contentDiv of the page if(File.Exist(ootNode.selectedNode.value)){ this.contentDiv.innerHtml=xxxx? //here how to make the content of the file displayed in the div? //I am sure the type of the file will be .html .htm or .txt. } } private static void BindDirs(string path, TreeNode treeNode) { if (!string.IsNullOrEmpty(path)) { foreach (string directoryPath in System.IO.Directory.GetDirectories(path)) { System.IO.DirectoryInfo directory = new System.IO.DirectoryInfo(directoryPath); TreeNode subNode = new TreeNode(directory.Name, directory.FullName); treeNode.ChildNodes.Add(subNode); // bind sub directories BindDirs(directoryPath, subNode); } //add the file in the tree list foreach (string filePath in File.getFiles(path)) { FileInfo info = new FileInfo(filePath); TreeNode subNode = new TreeNode(info.Name, info.FullName); treeNode.ChildNodes.Add(subNode); } } } ``` Now I just do not know how to display the file content when user select a node which is binded to a file. ANy suggestion?
display the content of the asci file in the web page
CC BY-SA 3.0
null
2011-05-20T10:43:08.397
2011-05-20T12:06:50.927
null
null
306,719
[ "asp.net", "treeview", "asp.net-controls" ]
6,071,015
1
null
null
1
2,752
When I am downloading from various websites. And if it contain in One . And when i clicking on the main solution file……it opens only one main projects other projects though it is present in folders…with their project files……… and though i am trying to add manually each project in Solution though it gives me errore see image of error message also.... i am using VS2010 and i am trying to load SilverLight Projects See below image ![enter image description here](https://i.stack.imgur.com/46QFK.png) ![enter image description here](https://i.stack.imgur.com/ayjfF.png)
Project unavailable if Solution Contain Multiple Projects. [VS2010]
CC BY-SA 3.0
null
2011-05-20T11:06:15.500
2011-05-20T11:13:16.637
null
null
468,968
[ "visual-studio-2010" ]
6,071,563
1
6,187,153
null
12
8,193
I'm trying implement a bracket in my program (using C#/.NET MVC) and I am stuck trying to figure out some algorithm. For example, I have a bracket like this with 8 entries (A,B,C,D,E,F,G,H) ![Bracket Example](https://i.stack.imgur.com/iLLOr.png) I'm trying to figure out if there's an algorithmic way to 1. depending on # of entries, find # of games per round 2. depending on # of entries, for a specific game #, what is the corresponding game # in the next round? For example, in this case, for 8 entries, the example are: 1. for round 1, there are 4 games. Round 2, 2 games. Round 3, 1 game 2. game 2 in round 1 corresponds to game 5 in round 2. I also thought about storing this info in a table, but it seems overkill since it never changes, but here it is anyway: ![enter image description here](https://i.stack.imgur.com/y3frw.png) Any help will be greatly appreciated! Cheers, Dean
algorithms for tournament brackets (NCAA, etc.)
CC BY-SA 3.0
0
2011-05-20T11:57:19.797
2011-05-31T12:05:42.640
2020-06-20T09:12:55.060
-1
422,304
[ "c#", "algorithm" ]
6,071,662
1
6,071,911
null
0
2,183
In ArgoUML, I have the ability to put a class Type to any property of a class. For example, I can declare a `customer` property with a `Customer` type in the `Order` class. I can also easily draw a relationship from class to class: ![Class diagram](https://i.stack.imgur.com/HBlMF.png) But I can't figure out how to "draw" the link from the `customer` property to the `Customer` class. The link is never really connected to the property, but rather to the entire `Order` class. I can move the position of the link manually: ![enter image description here](https://i.stack.imgur.com/6YRyH.png) But it's never really "locked" to the `customer` property, and can be moved automatically by the software at any moment. Is there a way to do this?
How to draw a relationship between a property and a class in ArgoUML?
CC BY-SA 3.0
null
2011-05-20T12:08:18.487
2015-05-20T13:50:44.583
2014-10-04T22:10:55.433
759,866
759,866
[ "uml", "argouml" ]
6,071,744
1
null
null
2
1,846
How to validate the report parameters while running the report in WebViewer. I am using the eclipse to design the reports. I am using the date fields and some select boxes as parameters. But my requirement is - user should not type the date, he should select the date from date picker(jquery UI) and at select boxes I want some kind of validation at server side that is select box should not be greater than select box. I need to do this validation at server side with ajax calls. Is there any way to customize the dialog box to get this functionality or I should design new page to do that and link that report after validation. I need export functionality also in my page, if i want that how to pass the selected parameters(Export Format, Pages, Auto) to report. ![enter image description here](https://i.stack.imgur.com/XSAo9.png) ![enter image description here](https://i.stack.imgur.com/lR3ts.png)
Birt report design validating report parameters while running the report
CC BY-SA 3.0
null
2011-05-20T12:15:38.977
2017-02-26T13:10:16.897
2017-02-26T13:10:16.897
1,033,581
701,571
[ "javascript", "eclipse", "modal-dialog", "birt" ]
6,071,921
1
6,072,055
null
1
3,430
``` #include <GL/glut.h> GLint winWidth = 600, winHeight = 600; GLfloat x0 = 100.0, y0 = 100.0, z0 = 50.0; GLfloat xref = 50, yref = 50.0, zref = 0.0; GLfloat Vx = 0.0, Vy = 1.0, Vz = 0.0; GLfloat xwMin = -40.0, ywMin = -60.0, xwMax = 40.0, ywMax = 60.0; GLfloat dnear = 25.0, dfar = 125.0; void init (void) { glClearColor (1.0, 1.0, 1.0, 0.0); //glMatrixMode(GL_MODELVIEW); //gluLookAt(x0, y0, z0, xref, yref, zref, Vx, Vy, Vz); glMatrixMode(GL_PROJECTION); glLoadIdentity(); //glOrtho(0,1,0,1, 0,0.1); //gluOrtho2D(0, 1,0,1); //gluPerspective(45, 1.2, 1, 10); glFrustum(0, 1, 0, 1, 0, 1); //gluPerspective(45.0, 1, 1, 15); } void displayFcn (void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glColor3f(0.0, 1.0, 0.0); //glPolygonMode(GL_FRONT, GL_FILL); //glPolygonMode(GL_BACK, GL_FILL); glBegin(GL_TRIANGLES); glVertex3f(0.0, 0.0, 0.0); glVertex3f(1.0, 0.0, 0.0); glVertex3f(0.5, 1.0, 0.0); glEnd(); glFlush(); } void reshapeFcn(GLint newWidth, GLint newHeight) { glViewport(0,0,newWidth, newHeight); winWidth = newWidth; winHeight = newHeight; } void main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB); glutInitWindowPosition(400,200); glutInitWindowSize(winWidth, winHeight); glutCreateWindow("Test"); init(); glutDisplayFunc(displayFcn); glutReshapeFunc(reshapeFcn); glutMainLoop(); } ``` This is the full source code, you can copy and paste to your VS solution and compile. You'll need to have glut installed. The result comes up like this: ![enter image description here](https://i.stack.imgur.com/JESeY.png)
Opengl: how to make this triangle centred on the window
CC BY-SA 3.0
null
2011-05-20T12:31:45.370
2011-05-20T13:26:28.570
null
null
469,652
[ "opengl", "glut" ]
6,072,020
1
null
null
1
1,311
Here's an image: ![enter image description here](https://i.stack.imgur.com/Ow2v0.png) Can one, using the algorithm, write a program that given an input image like above, produces the following output: chained line segments, one forming the above contours (hill-like), the other one forming the encapsuled circle contour? If not, how else would you recommend doing it?
Marching squares and encapsulated contours
CC BY-SA 3.0
null
2011-05-20T12:40:50.543
2011-05-20T16:22:11.967
2011-05-20T13:46:44.580
573,432
762,742
[ "image-processing", "marching-cubes" ]
6,072,045
1
6,072,297
null
1
105
I mis-clicked something, and now user.tag is treated as a textfile instead of as a tag file. I tried deleting it and recreating it, but that didn't help - the file is still shown without any syntax highlighting. ![enter image description here](https://i.stack.imgur.com/kVo8p.png)
How to make IntelliJ treat a file by its extension instead of as a text file?
CC BY-SA 3.0
null
2011-05-20T12:43:40.090
2011-05-20T13:02:50.500
null
null
11,236
[ "intellij-idea" ]
6,072,066
1
6,072,457
null
7
1,522
I have been having an issue with Visual Studio 2010 that is driving me completely bonkers. The general problem is that Visual Studio 2010 does not seem to be remembering my window positions. (Visual Studio 2010, v.10.0.40219.1 SP1Rel on Windows XP SP3.) Now, I am aware that Visual Studio 2010 has different window layouts for Build and Design mode. I have come to accept this as there are some things in life I cannot change. If I could turn off this feature, I would be over-joyed, but I do not think it is possible. My biggest issue at this point is that Visual Studio 2010 doesn't remember the window positions in Design mode after going into Build mode and returning to Design mode. Here are some screenshots to illustrate this issue: ![Screenshot 1 -- Design mode.](https://i.stack.imgur.com/GcPYK.png) Imagine me coding. OK, time to build. ![Screenshot 2 -- Build mode.](https://i.stack.imgur.com/kk6ET.png) OK, the window layouts changed. This is annoying, but whatever. Let's go back to design mode. ![Screenshot 3 -- Back to Design mode.](https://i.stack.imgur.com/fpOK4.png) This looks OK, but WAIT -- why don't the windows return to their previous position? ![Screenshot 4 -- Why won't you line up?!](https://i.stack.imgur.com/njAS8.png) I'm using a small Visual Studio window size here, but as the red box shows -- there is a difference. Why does this happen and what can I do to fix this issue? It is driving the OCD in me completely nuts. It doesn't look like a big change in these screen shots, but when I have my VS instance maximized across my two monitors (configured to display as one continuous desktop, instead of two desktops) -- it's a very noticeable and annoying change. Possible problems that I thought were causing this issue: - - - - [Visual Studio Productivity Power Tools](http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/) I've also had this same problem in Visual Studio 2008.
Why is Visual Studio 2010 changing my Design window positions after returning to Design mode from Build mode?
CC BY-SA 3.0
0
2011-05-20T12:45:19.583
2011-10-31T11:42:51.513
2011-05-20T15:41:42.520
146,516
146,516
[ "visual-studio-2010" ]
6,072,269
1
6,076,407
null
14
7,836
I will have to create a multi-threading project soon I have seen experiments ( delphitools.info/2011/10/13/memory-manager-investigations ) showing that the default Delphi memory manager has problems with multi-threading. ![enter image description here](https://i.stack.imgur.com/BeKpL.jpg) So, I have found this SynScaleMM. Anybody can give some feedback on it or on a similar memory manager? Thanks
Need multi-threading memory manager
CC BY-SA 3.0
0
2011-05-20T13:00:52.423
2017-07-15T18:51:28.913
2015-06-01T11:48:29.587
46,207
46,207
[ "delphi", "delphi-xe" ]
6,072,340
1
6,072,461
null
2
326
How would you implement this app in JavaScript using principles of MVC? ![enter image description here](https://i.stack.imgur.com/IWtAi.png) As you can see, the app basically has 3 views: "Sidebar", "Visualization" & "Timeslider". The underlying model must keep track of selected countries and year. When initing the app, it should load a json file that populates the model with data. With some sort of event system (please advice), the controller should be notified of a stable model, and corresponding views should be set. For example, adding a country in the sidebar should trigger data reload, followed by updating of x/y scales of the visualization view to accomodate for more countries etc. How would you separate the logic from the views (what would go in the model, view & controller respectively) and what libraries would you use? (especially re. event handling). Code is much appreciated ... Thanks.
Implementing 1-page JavaScript web app using the principles of MVC
CC BY-SA 3.0
0
2011-05-20T13:06:39.780
2011-05-20T13:25:50.417
null
null
104,059
[ "javascript", "jquery", "model-view-controller", "web-applications", "state-management" ]
6,072,585
1
6,105,792
null
2
394
I'm having a strange problem with my UINavigationController. the stacktraces are: ![trace](https://i.stack.imgur.com/mOQGj.png) which is very odd to me because all I did was: ``` CommonVC* cvc = [[CommonVC alloc] init]; //CommonVC is my customized viewController. and i did some setting after the init. [self.navigationController pushViewController:cvc animated:TRUE]; [cvc release]; ``` and after 3 times pushing and popping it crashes. i also ran it with NSZombie but it told the zombie is the CommonVC itself. ![enter image description here](https://i.stack.imgur.com/xBiHb.png) so can anyone help me find where the problem would be?
UINavigationController strange crash
CC BY-SA 3.0
0
2011-05-20T13:27:21.390
2011-05-24T04:48:52.003
2020-06-20T09:12:55.060
-1
353,044
[ "iphone", "uinavigationcontroller" ]
6,072,576
1
6,072,606
null
2
311
I'm creating a Java swing app and I'm having a real hard time getting elements positioned nicely. How would I go about making the input boxes and combo boxes to say 30px high? Also, how would I go about making the right edge of all the text line up vertically and the left edge of all the input boxes line up vertically? I have a main JPanel which is BoxLayout.Y_AXIS, and then I have 6 JPanels on the main JPanel. These 6 JPanels are set to BorderLayout and as you can see I have used WEST for the JLabels and EAST for the input fields. Here's a snippet of how I'm creating the 1st panel which is on top of the main panel. ``` private JPanel getProtocolPanel() { protocolNumber.setBorder(BorderFactory.createLineBorder(Color.GREEN)); protocolNumberInput.setBorder(BorderFactory.createLineBorder(Color.CYAN)); protocolNumber.setVerticalAlignment(SwingConstants.TOP); protocolPanel = new JPanel(); protocolPanel.setLayout(new BorderLayout()); protocolPanel.setBorder(BorderFactory.createLineBorder(Color.RED)); protocolPanel.add(protocolNumber, BorderLayout.WEST); protocolPanel.add(protocolNumberInput, BorderLayout.EAST); return protocolPanel; } ``` ![enter image description here](https://i.stack.imgur.com/hebPp.jpg) Let me know if there is a better way to do this type of layout. Thanks.
Java Swing elements sizing and positioning issue
CC BY-SA 3.0
null
2011-05-20T13:26:23.770
2011-05-20T13:29:21.690
null
null
222,403
[ "java", "swing", "layout" ]
6,072,612
1
6,073,112
null
2
262
I have an HTML5 Canvas. When the user double-clicks in a particular region of that canvas, I want a single-field form to appear at that spot, so that the user can edit some text. My intended effect is similar to this screenshot from Google Docs. I double-clicked on the shape with the "Hello" text, and the editable text field appeared. I've worked out how to detect the double-click, the mouse location, and the text. But so far I'm using a javascript "prompt(...)" dialog to edit the text, which is not what I want. ![enter image description here](https://i.stack.imgur.com/Z7jPB.png) I guess I'm looking for something to put in this function to replace prompt: ``` // let the user edit the text, by showing a popup-field that appears at (x, y) function editText(x, y, text) { return prompt('Text:', text); } ``` If it is relevant, I'm using jQuery a little.
How can I make a tiny JavaScript form appear as if in a dialog at a location I choose?
CC BY-SA 3.0
null
2011-05-20T13:29:35.450
2011-05-20T15:35:09.017
null
null
2,959
[ "javascript", "jquery", "html" ]
6,073,081
1
6,073,156
null
1
301
What I'm trying to achieve is a custom calendar where I place events. I've created a basic custom control which simply lists the events: ``` namespace MyControls { using System; using System.Collections; using System.Collections.Generic; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; public class Calendar : CompositeDataBoundControl { protected override Int32 CreateChildControls(IEnumerable dataSource, Boolean dataBinding) { Int32 itemCounter = 0; if (dataSource != null) { IEnumerator dataSourceEnumerator = dataSource.GetEnumerator(); while (dataSourceEnumerator.MoveNext()) { LinkButton eventLink = new LinkButton(); eventLink.Click += new EventHandler(EventLinkClick); HtmlGenericControl eventContainer = new HtmlGenericControl(); eventContainer.Controls.Add(eventLink); eventContainer.TagName = "p"; this.Controls.Add(eventContainer); if (dataBinding) { CalendarEvent currentEvent = (CalendarEvent) dataSourceEnumerator.Current; eventLink.CommandArgument = String.Concat(currentEvent.Name, "§", currentEvent.Day.ToBinary()); eventLink.Text = currentEvent.Name; eventLink.ToolTip = currentEvent.Description; } itemCounter++; } } return itemCounter; } protected void EventLinkClick(Object sender, EventArgs e) { } } } ``` The control works, when I pass it a `List<CalendarEvent>` it displays every event's `LinkButton` inside its own `<p />`, when I click a `LinkButton` the `EventLinkClick` method gets called, and after the postback the `LinkButton`s are still there with their values. However, I don't need a plain list of the event, I need to place my events inside a calendar, inside the correct day. I create my calendar like this: ``` Int32 year = 2011; Table monthTable = null; TableRow weekRow = null; for (DateTime day = new DateTime(year, 1, 1); day.Year == year; day = day.AddDays(1)) { if (day.Day == 1) { HtmlGenericControl monthName = new HtmlGenericControl(); monthName.InnerText = CultureInfo.CurrentUICulture.DateTimeFormat.GetMonthName(day.Month); monthName.TagName = "h2"; this.Controls.Add(monthName); monthTable = new Table(); TableHeaderRow headerRow = new TableHeaderRow(); headerRow.TableSection = TableRowSection.TableHeader; monthTable.Rows.Add(headerRow); for (Int32 i = 0; i < 7; i++) { TableHeaderCell dayOfWeekCell = new TableHeaderCell(); dayOfWeekCell.Text = CultureInfo.CurrentUICulture.DateTimeFormat.GetShortestDayName((DayOfWeek) i); headerRow.Cells.Add(dayOfWeekCell); } weekRow = new TableRow(); weekRow.TableSection = TableRowSection.TableBody; for (Int32 i = 0; i < (Int32) day.DayOfWeek; i++) { weekRow.Cells.Add(new TableCell()); } } if (day.DayOfWeek == DayOfWeek.Sunday && day.Day != 1) { monthTable.Rows.Add(weekRow); weekRow = new TableRow(); weekRow.TableSection = TableRowSection.TableBody; } TableCell dayCell = new TableCell(); dayCell.Text = Convert.ToString(day.Day); weekRow.Cells.Add(dayCell); if (day.Day == DateTime.DaysInMonth(day.Year, day.Month)) { for (Int32 i = (Int32) day.DayOfWeek; i < 6; i++) { weekRow.Cells.Add(new TableCell()); } monthTable.Rows.Add(weekRow); this.Controls.Add(monthTable); } } ``` which yields to something like this: ![An example of my calendar](https://i.stack.imgur.com/qmD8X.png). Now, how can I integrate the two things? What I came up with is casting the `dataSource` parameter to `IEnumerable<CalendarEvents>` and after the `dayCell.Text = Convert.ToString(day.Day);` line I get the events of the day from the `IEnumerable<CalendarEvents>` through LINQ. However, this breaks on postback because when the control is recreating itself after a postback the `dataSource` parameter is full of nulls, so I can't fetch the events of the day, so I can't recreate the controls. I couldn't find anything on the net about this, and I'm completely stuck. Am I missing (or messing) something? What should I do to achieve what I'm looking for? # Update #1 As StriplingWarrior [suggested](https://stackoverflow.com/questions/6073081/how-to-place-child-controls-in-a-certain-order-when-binding-a-custom-control/6073156#6073156) I tried to save the `dataSource` in the ViewState, however I failed dramatically. What I tried is this: at the beginning of the `CreateChildControls` method I placed ``` if (dataBinding) { this.ViewState.Add("myDataSource", dataSource); } IEnumerable myDataSource = (IEnumerable) this.ViewState["myDataSource"]; ``` and replaced every call to `dataSource` with `myDataSource`. However, when the page post backs `this.ViewState["myDataSource"]` is `null`, and I'm back to square one. I'm starting to regret when I decided to go with a `CompositeDataBoundControl`... :\ # Update #2 I tried to create a new project containing only the custom control, and I rewrote it from scratch, and [StriplingWarrior's suggestion](https://stackoverflow.com/questions/6073081/how-to-place-child-controls-in-a-certain-order-when-binding-a-custom-control/6073156#6073156) worked: ``` if (dataBinding) { this.ViewState.Add("DataSource", dataSource); } else { dataSource = (IEnumerable) this.ViewState["DataSource"]; } ``` However, I haven't been able to pinpoit what was causing the `this.ViewState["DataSource"]` in the original solution.
How to place child controls in a certain order when binding a custom control?
CC BY-SA 3.0
null
2011-05-20T14:03:27.010
2011-05-24T10:53:58.223
2017-05-23T11:47:53.717
-1
91,696
[ "c#", "asp.net", "custom-controls" ]
6,073,238
1
6,073,575
null
3
4,617
Is it possible to filter out subsets of the data that have small numbers of observations within a ggplot2 call? For example, take the following plot: `qplot(price,data=diamonds,geom="density",colour=cut)` ![Density plot](https://i.stack.imgur.com/LSY13.png) The plot is a little busy, and I would like the exclude the `cut` values with a small number of observations, ie, ``` > xtabs(~cut,diamonds) cut Fair Good Very Good Premium Ideal 1610 4906 12082 13791 21551 ``` the `Fair` and `Good` qualities of the `cut` factor. I'm wanting a solution that can fit an arbitrary data set and if possible be able to select not just by a threshold number of observations, but by top 3 for example.
Filter ggplot2 density plot by number of observations
CC BY-SA 3.0
null
2011-05-20T14:16:47.423
2011-05-20T14:47:34.443
2011-05-20T14:25:10.600
269,476
269,476
[ "r", "ggplot2" ]
6,073,392
1
6,075,823
null
0
852
I'm trying to put a UIBarButtonItem with a custom image on a UINavigationBar. When I do however, the image doesn't look right. I want the button on the navigation bar to look like the one below it. ![screenshot](https://i.stack.imgur.com/hw5JS.png) (This is a screenshot from the simulator, by the way, Interface Builder) I created the custom UIBarButtonItem by creating a UIButton, using the cog-wheel image as a background, and then simply dragging it to the the right bar button item place in Interface Builder. Seeing as creating a UIBarButtonItem programmatically with the aforementioned UIButton as its 'custom view' (-initWithCustomView) has the same result, I believe this is what is happening as well. What I don't understand is why the button image lost its nice edges and color gradient when I added it to the navigation bar wrapped in a bar button item. Can anyone tell me? Thanks in advance.
Button image in navigation bar has different appearance. Why?
CC BY-SA 3.0
null
2011-05-20T14:29:49.400
2011-05-20T17:54:15.503
null
null
138,576
[ "ios", "uibutton", "uinavigationbar", "uibarbuttonitem" ]
6,073,821
1
6,073,857
null
1
1,348
I have read the discussion on [how to create a DMG for Mac OS X using command-line tools](https://stackoverflow.com/questions/96882/how-do-i-create-a-nice-looking-dmg-for-mac-os-x-using-command-line-tools) and now I would like to go further: can I possibly produce a DMG which displays a different background image, based on the active language of the system? I know there are tricks to display different folder names based on the active locale; but can this be extended to different backgrounds? It would be a pity to have to produce and distribute one DMG for every language our product supports, just to have a different background image. Here are two background images I would like to use, in English: ![Install Crésus (English version)](https://i.stack.imgur.com/W5kjv.png) or in French: ![Install Crésus (French version)](https://i.stack.imgur.com/vu4QV.png)
How do I create a nice-looking DMG for Mac OS X with a localized background?
CC BY-SA 3.0
0
2011-05-20T15:02:55.117
2011-05-20T15:14:12.433
2017-05-23T10:27:30.357
-1
4,597
[ "macos", "localization", "dmg", "diskimage" ]
6,073,846
1
10,468,840
null
6
4,160
So I have this Phonegap application built using Sencha Touch. I have a textarea control for users to type in some information. When the box gets focus it brings up the virtual keyboard. But the virtual keyboard has next previous and done buttons on it. How to I remove the next and previous buttons? They don't seem to do anything anyway. ![enter image description here](https://i.stack.imgur.com/6X1vv.png)
How do you remove the Next and Prev buttons from virtual keyboard in Sencha Touch / Phonegap application
CC BY-SA 3.0
0
2011-05-20T15:05:16.647
2014-07-31T20:45:55.953
2014-07-31T20:45:55.953
1,783,163
1,398,981
[ "javascript", "ios", "cordova", "extjs", "sencha-touch" ]
6,074,276
1
null
null
1
711
I can't find the one I want anywhere, yet it's really simple. All I want is a simple jQuery script that when I click on a link, it pops a small div out (over the top of the current page, not hiding a DIV and sliding it in). If I've not explained it very well, best think to look at is the notifications popout on Facebook, that's basically what I want. This is also a good example, except it doesn't seem to work properly when I download the code from here: [http://www.awmcreative.com/blog/jquery/jquery-pop-menu/#more-713](http://www.awmcreative.com/blog/jquery/jquery-pop-menu/#more-713) Here's an image of what I mean: ![enter image description here](https://i.stack.imgur.com/HxI19.gif) Doesn't matter if it retracts by clicking again, or by moving mouse out of the area. Cheers.
A simple jquery dropdown box when clicked
CC BY-SA 3.0
null
2011-05-20T15:37:58.290
2011-05-20T15:51:50.373
2011-05-20T15:51:50.373
464,744
734,463
[ "jquery", "drop-down-menu" ]
6,074,380
1
6,074,486
null
0
385
Like on the following screen. It looks less than standard size. And without vertical lines between icons. ![screen](https://i.stack.imgur.com/YTywF.jpg)
How to create custom tab size?
CC BY-SA 3.0
null
2011-05-20T15:46:56.923
2011-05-20T15:54:16.457
2011-05-20T15:51:01.950
135,946
604,388
[ "android", "android-layout" ]
6,074,387
1
6,074,437
null
19
13,405
I need to compare dates in two separate list. Each list is constructed of MyFile Objects. That is a class that I created in order to have specific information about a file such as name, dateModified, extension, etc. The only problem is that a lot of MyFiles objects in my second list (got those from external hard drive) do not have the dateTime stamp (LastWriteTime) till the millisecond. I believe that is the reason why my comparison is not working. For example here is an example of how my comparison is failing: "Why does c# thinks the dates are not equal?" ![Debug](https://i.stack.imgur.com/xEgqf.png) a and b are MyFile objects and MyFile class contains a property ticks and that is equal to the file.LastWriteTime.Ticks they are not used in the program I just included them for debugging purposes. So after debugging several times I realized that the last 7 digits represent the milliseconds of a file. As a result my ticks property in MyFile now contains 11 significant figures instead than 18 ( note 18-11 = 7). The problem with this is that when I compare the ticks I get strange results when I try to update the ticks property by dividing by 10000000 and then multyplying by 10000000. Since my ticks propery is a long int it will lose the last 7 digits when I divide. I get less 'errors'. But there is some other times when I get something like this: ![enter image description here](https://i.stack.imgur.com/lEFEA.png) Here we can see that the dates are the same at least till the second. Why is c# thinking its not the same date? Do I have to create my own "Ticks" function? I know I convert dateTime to string then compare it but I want to have the posiblility of knowing if a object a.dateModified is newer than object b.dateModified
Compare datetime without millisecond
CC BY-SA 3.0
0
2011-05-20T15:47:30.410
2013-09-19T11:02:58.307
null
null
637,142
[ "c#", "datetime" ]
6,074,467
1
6,117,048
null
1
1,166
I am using a custom title bar and a LinearLayout inside a ScrollView below it. I see this strange white color while I scroll above or below. Images attached. ![Normal view](https://i.stack.imgur.com/gBeuk.png) Strange White color as soon as white background scrolls towards the custom title bar. Image below. ![Strange White color as soon as white background scrolls towards the custom title bar](https://i.stack.imgur.com/topEE.png) How do I get rid of this white color, it also shows at the bottom of the layout. FYI, I am using Theme.Light. Update: I get the same effect even at the bottom of the layout and it is more pronounced when the color in the foreground is white.
Strange White color at top and bottom of layout
CC BY-SA 3.0
null
2011-05-20T15:52:56.190
2013-05-13T14:59:55.377
2011-05-20T16:18:32.070
746,360
746,360
[ "android", "android-layout" ]
6,074,634
1
6,074,673
null
2
1,524
I got this small problem but I find it hard to explain so bear with me please. I got a label in front of a textarea and it looks like this: ![screenshot](https://i.stack.imgur.com/beeX3.jpg) And I actually would like this: ![enter image description here](https://i.stack.imgur.com/R0kw2.jpg) This is my code: ``` <form method="post" action="" name="myform" id="form"> <label>Naam :</label> <input type="text" id="naam" name="naam" size="40" /> <br /> <label>Email :</label> <input type="text" id="email" name="email" size="40" /> <br /> <label>Bericht :</label> <textarea cols="30" rows="7" id="bericht" name="bericht"></textarea> <br /> <label>&nbsp;</label> <input class="submit" id="btnZend" name="submit" type="submit" value="Verzend bericht" /> ``` The labels in css are: `width:150px; text-align:right;` Thanks in advance
Textarea layout problem
CC BY-SA 3.0
null
2011-05-20T16:04:00.370
2011-05-20T16:07:30.197
2011-05-20T16:07:30.197
468,793
527,003
[ "html", "css", "forms", "textarea" ]
6,074,684
1
null
null
1
1,147
I'm using telerik radgrid control with following layout: ![page layout](https://i.stack.imgur.com/bvoV7.png) I'm curious if anybody can provide general guidance in what approach I should take to reliably update user control that initiated popup window action?
Updating nested usercontrol after popup window close guidance
CC BY-SA 3.0
null
2011-05-20T16:07:35.673
2011-05-27T19:22:08.500
2020-06-20T09:12:55.060
-1
39,715
[ "asp.net", "telerik", "radgrid" ]
6,074,897
1
7,824,500
null
2
1,527
I'd like to calculate the local volatility surface for a series of option strikes, similar to the surface described in this paper: [http://www.ederman.com/new/docs/gs-local_volatility_surface.pdf](http://www.ederman.com/new/docs/gs-local_volatility_surface.pdf) This is the image I am referring to in the aforementioned paper: ![enter image description here](https://i.stack.imgur.com/QVS0J.png) I know QuantLib has the ability to do this - but does anyone know the correct C# function call(s)? I'm using the C# build of QuantLib, from: [http://www.resolversystems.com/products/quantlib-binary/](http://www.resolversystems.com/products/quantlib-binary/)
How to calculate the local volatilty surface using QuantLib?
CC BY-SA 3.0
0
2011-05-20T16:23:59.650
2012-11-02T03:54:06.450
null
null
107,409
[ "quantlib" ]
6,074,951
1
6,074,993
null
0
127
I've got relative layout in my view hierarchy and I want it to have this as background: ![enter image description here](https://i.stack.imgur.com/saYM3.png) Here's xml: ``` <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/background" > <RelativeLayout android:layout_height="wrap_content" android:layout_width="fill_parent" > <TextView <!-- --> android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="10dp" android:layout_centerVertical="true" /> <Spinner <!-- --> android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_alignParentRight="true" android:minWidth="200dp" /> </RelativeLayout> <!-- Nested Relative layouts as above go here --> </RelativeLayout> ``` And here's what I receive: ![enter image description here](https://i.stack.imgur.com/9CKZe.jpg) ![enter image description here](https://i.stack.imgur.com/8FeDo.jpg) It seems that 9patch causes the problem, because I tried other drawables and my layout didn't behave like this. Could you point me what's wrong?
Yet another 9patch drawable question
CC BY-SA 3.0
null
2011-05-20T16:30:15.333
2011-05-20T16:34:27.437
2020-06-20T09:12:55.060
-1
null
[ "android", "android-layout" ]
6,075,059
1
6,075,173
null
9
291
Several special characters (⬇, for example) when being used in labels, etc are replaced with images automatically. Where can I find the complete list of such replacements? Thanks in advance I know that I can simply copy-paste a lot of special characters to define what are the magic ones but I am interesting whether this magic is documented anywhere? --- ``` UILabel *lbl = [[[UILabel alloc] initWithFrame:CGRectMake(50, 200, 220, 25)] autorelease]; lbl.text = @"Did you see that? ⬇"; [self.view addSubview:lbl]; ``` ![result](https://i.stack.imgur.com/7TCXl.png)
Where can I find the list of 'autoreplaceable' iOS special characters?
CC BY-SA 3.0
0
2011-05-20T16:40:22.830
2011-05-20T16:50:51.350
2011-05-20T16:48:13.263
355,130
355,130
[ "cocoa-touch", "ios" ]
6,075,063
1
6,075,991
null
3
1,137
how "Stretch" property of Image in WPF effects Transforms ? I found that Stretch property of image effets the transforms applied to it. When stretch=fill, then everything is fine but if stretch=uniform, the transforms are chaged. I not getting why this happening. Plz explain. ## ![Image 2](https://i.stack.imgur.com/6OkEI.jpg) CODE: ``` <Canvas Height="200" Width="200"> <Image Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Source="Image.jpg" Stretch="Fill"> <Image.RenderTransform> <TransformGroup> <RotateTransform Angle="200" /> <TranslateTransform X="100" Y="100"/> </TransformGroup> </Image.RenderTransform> </Image> <Rectangle Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Fill="RoyalBlue" Opacity="0.5"> <Rectangle.RenderTransform> <TransformGroup> <RotateTransform Angle="200" /> <TranslateTransform X="100" Y="100"/> </TransformGroup> </Image.RenderTransform> </Rectangle> </Canvas> ``` --- ``` <Canvas Height="200" Width="200"> <Image Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Source="Image.jpg" Stretch="Uniform"> <Image.RenderTransform> <TransformGroup> <RotateTransform Angle="200" /> <TranslateTransform X="100" Y="100"/> </TransformGroup> </Image.RenderTransform> </Image> <Rectangle Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Fill="RoyalBlue" Opacity="0.5"> <Rectangle.RenderTransform> <TransformGroup> <RotateTransform Angle="200" /> <TranslateTransform X="100" Y="100"/> </TransformGroup> </Rectangle.RenderTransform> </Rectangle> </Canvas> ```
how "Stretch" property of Image in WPF Effects Transform?
CC BY-SA 3.0
0
2011-05-20T16:40:35.047
2011-05-20T18:09:28.650
2011-05-20T17:16:22.207
496,841
496,841
[ "wpf" ]
6,075,129
1
6,078,337
null
2
3,093
I need to remove the blur this image: ![enter image description here](https://i.stack.imgur.com/3k3ZQ.jpg) Image source: [http://www.flickr.com/photos/63036721@N02/5733034767/](http://www.flickr.com/photos/63036721@N02/5733034767/) Any Ideas?
How can I deblur an image in matlab?
CC BY-SA 3.0
0
2011-05-20T16:46:56.663
2012-04-29T09:04:33.117
2012-04-29T09:04:33.117
388,787
761,607
[ "image", "matlab", "image-processing" ]
6,075,196
1
6,076,887
null
0
303
I have a problem with the following SQL ``` SELECT c1.* FROM rmanager.requisitos_nao_funcionais c1 left join rmanager.requisitos_nao_funcionais c2 on c1.document_id = c2.document_id and c1.versao < c2.versao where c1.id_projeto = 15 and c1.id_req_fun = 5 and c2.document_id is null order by ordem ASC; ``` I've tried by a subselect also ``` SELECT * FROM rmanager.requisitos_nao_funcionais A WHERE versao = ( SELECT MAX(versao) FROM rmanager.requisitos_nao_funcionais B WHERE B.document_id = A.document_id ) and id_req_fun = 5 order by ordem asc; ``` but both returns me ![return](https://i.stack.imgur.com/cNyBX.png) it doesn't get the document_id 1, it should return me 1,2,3 getting the lastest version of them The table data is below ![enter image description here](https://i.stack.imgur.com/EiDbU.png) The SQL ideia is to get the lastest version of a document_id group(each document_id can has many versions) from a id_project and id_req_fun I can't find any problem.
Get Latest Version of a document SQL
CC BY-SA 4.0
null
2011-05-20T16:52:42.717
2018-12-15T05:13:32.740
2018-12-15T05:13:32.740
1,033,581
531,466
[ "mysql", "sql" ]
6,075,235
1
6,075,763
null
3
3,329
I am interested in creating a ListView where each row is marked the way it is done in GMail for 3.0+. This creates a nice separation of the left and right ListFragment. Other examples include also Google Calendar on 2.3.4 for instance where a color marker is on the left of the ListView. ![GMail ListView](https://i.stack.imgur.com/lElkN.png) See the grey vertical divider between the two lists. How does one achive something like this? A bonus would be also the alternating width, but I guess that is only a smaller layout change. I know I could probably do something like inserting an ImageView in there and then fill it with the color I would like but it seems to me that this is an ugly hack. Another question would be also if there is a generalized way to combine the two ListView fragments somehow the way the GMail or Mail applications do it. ![GMail ListView across two fragments](https://i.stack.imgur.com/Mhged.png)
ListView row marker ala GMail
CC BY-SA 3.0
0
2011-05-20T16:56:36.950
2011-05-20T18:06:02.013
null
null
164,128
[ "android", "android-layout", "android-listview", "android-3.0-honeycomb", "android-fragments" ]
6,075,273
1
6,075,312
null
1
1,319
I want to know how to make this circle between the "18 minutes ago" and the "Like". Is there html for this? Is it a styled period? ![enter image description here](https://i.stack.imgur.com/04jTP.png)
How do you make this little circle thingy?
CC BY-SA 3.0
null
2011-05-20T17:00:37.020
2011-05-20T17:09:38.390
null
null
421,109
[ "html", "css" ]
6,075,333
1
null
null
1
484
I want the Domain Service Class to show my entities so that I can have it generate CRUD for me. Why is nothing showing up? Project structure: EF model sits in class library and POCO (.tt) sits in another class library ![enter image description here](https://i.stack.imgur.com/9cLXW.png) For now I have manually created the CRUD operations, but I want the dialog to create them. @Akash Kava: Here is a primary key for one of the pocos: ``` [DataMember] public int CVAdvancementQuotientId { get { return _cVAdvancementQuotientId; } set { if (_cVAdvancementQuotientId != value) { if (ChangeTracker.ChangeTrackingEnabled && ChangeTracker.State != ObjectState.Added) { throw new InvalidOperationException("The property 'CVAdvancementQuotientId' is part of the object's key and cannot be changed. Changes to key properties can only be made when the object is not being tracked or is in the Added state."); } _cVAdvancementQuotientId = value; OnPropertyChanged("CVAdvancementQuotientId"); } } } private int _cVAdvancementQuotientId; ```
How to use POCO with Domain Service Class Dialog?
CC BY-SA 3.0
null
2011-05-20T17:06:00.120
2013-05-16T11:36:04.537
2011-05-24T19:31:28.187
322,518
322,518
[ "wcf", "entity-framework", "poco", "wcf-ria-services" ]
6,075,377
1
null
null
1
305
Given the following tables/relationships ![enter image description here](https://i.stack.imgur.com/YvZmB.png) Which if populated using the SQL below should return this.... ![enter image description here](https://i.stack.imgur.com/z1XxL.png) ``` SELECT TOP (100) PERCENT dbo.Task.Name AS Expr1, dbo.Role.Name FROM dbo.Role INNER JOIN dbo.RoleTask ON dbo.Role.Id = dbo.RoleTask.RoleId INNER JOIN dbo.Task ON dbo.RoleTask.TaskId = dbo.Task.Id ORDER BY dbo.Task.Name, dbo.Role.Name ``` I'm trying to populate RoleGroup (The one that is just hanging there!) with the groups of roles defined by the many to many relationship between Role and Task, recognising that some may already be in the RoleGroup table. So, given the example results as above, this is what I need to see in RoleGroup (I've modified this since the original post to hopefully make it clearer as to what I am trying to acheive) ... ``` GroupId RoleId 1 Plumber 2 Gardener 2 Topiary Guru 3 Electrician 4 Cleaner 4 Housekeeping Supervisor 4 Toilet Cleaning Specialist 5 Housekeeping Supervisor ``` Due to the fact that roles have been associated with certain Tasks, groups of roles can be identified. In my example, "Cleaner, Housekeeping Supervisor, and Toilet Cleaning Specialist", have all been associated with "Toilet clean" tasks. I can therefore say that that is a group, and would like to extract that information. Likewise, "Housekeeping Supervisor" has been associated with "Toilet Inspection" tasks; and no other roles have. This means another new group should be extracted (2 - Housekeeping Supervisor). If the "Housekeeping Supervisor" was associated with another task, and no other roles were, I wouldn't need to create another group, as it has already been recognised. Oh, I'm trying to achieve this using SQL in SQL Server 2008. Any tips or hints appreciated. # SQL ``` USE TestDatabase GO CREATE TABLE [dbo].[Task]( [Id] [int] NOT NULL, [Name] [nvarchar](50) NOT NULL, CONSTRAINT [PK_Type] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO CREATE TABLE [dbo].[Department]( [Id] [int] NOT NULL, [Name] [nvarchar](50) NOT NULL, CONSTRAINT [PK_Department] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO CREATE TABLE [dbo].[RoleGroup]( [Id] [int] NOT NULL, [RoleId] [int] NOT NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[Role]( [Id] [int] NOT NULL, [Name] [nvarchar](50) NOT NULL, [DepartmentId] [int] NOT NULL, CONSTRAINT [PK_Role] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO CREATE TABLE [dbo].[RoleTask]( [RoleId] [int] NOT NULL, [TaskId] [int] NOT NULL, CONSTRAINT [PK_RoleTask] PRIMARY KEY CLUSTERED ( [RoleId] ASC, [TaskId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ``` ``` /****** Object: ForeignKey [FK_Role_Department] Script Date: 05/20/2011 17:56:49 ******/ ALTER TABLE [dbo].[Role] WITH CHECK ADD CONSTRAINT [FK_Role_Department] FOREIGN KEY([DepartmentId]) REFERENCES [dbo].[Department] ([Id]) GO ALTER TABLE [dbo].[Role] CHECK CONSTRAINT [FK_Role_Department] GO /****** Object: ForeignKey [FK_RoleTask_Role] Script Date: 05/20/2011 17:56:49 ******/ ALTER TABLE [dbo].[RoleTask] WITH CHECK ADD CONSTRAINT [FK_RoleTask_Role] FOREIGN KEY([RoleId]) REFERENCES [dbo].[Role] ([Id]) GO ALTER TABLE [dbo].[RoleTask] CHECK CONSTRAINT [FK_RoleTask_Role] GO /****** Object: ForeignKey [FK_RoleTask_Task] Script Date: 05/20/2011 17:56:49 ******/ ALTER TABLE [dbo].[RoleTask] WITH CHECK ADD CONSTRAINT [FK_RoleTask_Task] FOREIGN KEY([TaskId]) REFERENCES [dbo].[Task] ([Id]) GO ALTER TABLE [dbo].[RoleTask] CHECK CONSTRAINT [FK_RoleTask_Task] GO ``` ``` /** DATA **/ INSERT INTO [Department] ([Id], [Name]) VALUES (1, 'Housekeeping'); INSERT INTO [Department] ([Id], [Name]) VALUES (2, 'Security'); INSERT INTO [Department] ([Id], [Name]) VALUES (3, 'External Maintenance'); INSERT INTO [Department] ([Id], [Name]) VALUES (4, 'Internal Maintenance'); INSERT INTO [Role] ([Id], [Name], [DepartmentId]) VALUES (1, 'Cleaner', 1); INSERT INTO [Role] ([Id], [Name], [DepartmentId]) VALUES (2, 'Housekeeping Supervisor', 1); INSERT INTO [Role] ([Id], [Name], [DepartmentId]) VALUES (3, 'Toilet Cleaning Specialist', 1); INSERT INTO [Role] ([Id], [Name], [DepartmentId]) VALUES (4, 'Security Guard', 2); INSERT INTO [Role] ([Id], [Name], [DepartmentId]) VALUES (5, 'Electrician', 4); INSERT INTO [Role] ([Id], [Name], [DepartmentId]) VALUES (6, 'Plumber', 4); INSERT INTO [Role] ([Id], [Name], [DepartmentId]) VALUES (7, 'Gardener', 3); INSERT INTO [Role] ([Id], [Name], [DepartmentId]) VALUES (8, 'Topiary Guru', 3); INSERT INTO [Task] ([Id], [Name]) VALUES (1, 'Toilet Clean'); INSERT INTO [Task] ([Id], [Name]) VALUES (2, 'Light Out'); INSERT INTO [Task] ([Id], [Name]) VALUES (3, 'Blocked Sink'); INSERT INTO [Task] ([Id], [Name]) VALUES (4, 'Toilet Inspection'); INSERT INTO [Task] ([Id], [Name]) VALUES (5, 'Leaky Tap'); INSERT INTO [Task] ([Id], [Name]) VALUES (6, 'Bush too bushy'); INSERT INTO [Task] ([Id], [Name]) VALUES (7, 'Mop Floor'); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (1, 1); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (2, 1); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (3, 1); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (5, 2); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (6, 3); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (2, 4); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (6, 5); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (7, 6); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (8, 6); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (1, 7); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (2, 7); INSERT INTO [RoleTask] ([RoleId], [TaskId]) VALUES (3, 7); ```
SQL - Populating Group Table
CC BY-SA 3.0
null
2011-05-20T17:10:27.713
2011-05-21T13:14:13.890
2011-05-21T11:55:18.760
192,999
192,999
[ "sql", "tsql", "sql-server-2008", "data-warehouse", "dimensions" ]
6,075,427
1
6,076,900
null
2
10,717
How do I manually adjust/set the height of the button-pane in the jQuery dialog without changing the CSS file? I want to adjust the height of the DIV that contains the message and the DIV that contains the button(marked in green lines) from Javascript. ![jQuery Dialog](https://i.stack.imgur.com/GKBeE.jpg) ``` function showMessageDialog(title, message, width){ // create div if it doesn't exist already if(!$("#msgDialogDiv").length) { $("<DIV></DIV>").appendTo("body").attr("id","msgDialogDiv"); } // set the message $("#msgDialogDiv").html(message).css("color","red"); // show the dialog $("#msgDialogDiv").dialog({ modal: true, resizable: false, draggable: false, title: title, width: width, buttons: {OK: function(){$(this).dialog("close");}} }); // This changes the height as I want. // $("#msgDialogDiv").css({"overflow":"hidden","height":"10px"}); // this changes the font on button //$("#msgDialogDiv").dialog("widget").find(".ui-button-text").css("font-size", "11px"); return; } showMessageDialog("Hello Stackoverflow!", "This is my first question on stackoverflow",400); ``` While posting this question I tried to adjust the DIV height and it worked. I also tried changing the font-size of the button, but that just changes the size of the button. I want to control the size of that entire DIV. Is it due to the padding around the button?
jQuery dialog: how to control the button-pane height
CC BY-SA 3.0
0
2011-05-20T17:15:41.770
2019-01-11T11:51:28.103
2017-08-30T16:57:09.777
3,239,219
319,542
[ "jquery", "css", "jquery-ui", "jquery-ui-dialog" ]
6,075,628
1
null
null
7
34,157
![enter image description here](https://i.stack.imgur.com/hE2Xj.jpg) I am using a dual core with 4GB memory installed (but only reported by the OS due to the 32bit fact). I am actively modifing an old JAVA application for at least a month by using lastest (edit, build and run) and (another way to build and run). In the run configuration and file, we have the following JVM parameters: `-Xmx1024M -Xms1024M -Xmn384M`. We have been using this configuration for years. I also have a batch file to launch Eclipse with this parameter: `-vmargs -Xmx768M`. This batch file has been with me for years. (now I changed to modify the eclipse.ini to do configuration.) The day before yesterday, I found it was much slower when I used Ant to build and run my application (I build and run it frequently during the modification process). I restarted my machine just before I went home. That night I VPN to my machine to finish some modifications (I am a very good employee.) and found more slower. Next morning, "" started to happen when I run our application with Ant. I restarted my machine. Then I couldn't start my Eclipse with the same error. I have to change the vmargs to claim only 512MB memory to launch the Eclipse. The build time with Ant increased from about 20 seconds to about 6 minutes. And I have to decrease the max memory for JVM to ``` -Xmx512M -Xms512M ``` in both Eclipse run configuration and Ant build.xml in order to avoid error. Then I uninstall my 1.6u24 jdk/jre and installed the 1.6u25. I reinstalled the Eclipse. Scanned the entire machine with Trend Micro and found nothing. Another machine which I usually connect to do some testing has similar result (slower). All other machines, include my co-worker's machine and my laptop, work fine with the same application and tools. If I use Ant to build and run it, the build process and launch process are extramely slow. I have created two batch files to compile and launch my application . They work as normal. When compile with Eclipse, it works as normal. But I cannot ask JVM to claim for my application in all cases now. All other activities on my machine seem normal. VisualStudio and C# application work as usual. My machine was rebuilt few weeks ago due to hard disk failure. So there are no many useless things to slow my machine down. Anybody can help me figure out why the JVM on my machine changed its behaviour? I hope it is not caused by virus. Do you know anything I can try before I call IT to rebuild my machine? thanks,
"Could not create the Java virtual machine" caused by virus or machine is messed up?
CC BY-SA 3.0
0
2011-05-20T17:35:28.330
2012-08-14T12:08:26.683
null
null
117,039
[ "java", "windows", "ant", "jvm" ]
6,075,739
1
6,076,320
null
0
228
Bear with me, this is going to be extremely difficult to explain, and I can't really show much code because I'm not sure I wanna dump all this development code which is going to be used on a major national web site. I have four LI tags that, upon $(window).load(), are being cloned into DIVs, and then the heights of the DIVs are fetched with an $.each() loop. The problem I'm running into is, in most browsers on various OS's, the heights are consistent, except Chrome on Linux and Mac. I'll elaborate a bit more. Each LI contains some text and some other divs, just general content basically. And I'm using $.contents().clone() to clone each LI and put it in a DIV, where it is styled differently. This is how that particular part works and it cannot change. OK, jQuery code time: ``` $(window).load(function() { $('.carousel-thumb').each(function(i) { var $story = $(this).contents().clone(); // Remove all <script> tags before appending, otherwise we're looking // for trouble $('script', $story).remove(); $story.appendTo('#featured-story') .wrapAll('<div class="carousel-story" />'); }); // Fix the sizing on the featured story container $('.carousel-story').each(function(i) { console.log('story ' + i + ' = ' + $(this).height()); if ($(this).height() > storyMaxHeight) storyMaxHeight = $(this).height(); }); /*$('.carousel-story').height(storyMaxHeight); $('#featured-story').height(storyMaxHeight);*/ }); ``` I'll answer one potential question that might arise from this. What's with the removal of the script tags? The original LI tags contain various content, including inline scripts. I noticed when I cloned this content, it wreaked havoc on the page structure. Not sure if the scripts were executing again or what, but removing the scripts (especially since they'd already been executed) solved the problem. Now, check out this interesting tidbit. This graphic contains Windows Chrome on the left, and Linux Chrome on the right. Note that Linux/Mac Chrome both misbehave. ![Left: Windows Chrome; Right: Linux Chrome](https://i.stack.imgur.com/7WI38.png) Isn't THAT odd? During the execution of the script, the heights are completely wrong in Linux. Yet, after everything is completely done and I manually request the height of the third div, it reports the height properly! Yet the behavior on the left (correct) is exhibited by Windows Chrome as well as Firefox on all platforms, even IE7. Is there some weird delay in the clone() call? Does cloning a bunch of content take some time, and the jQuery script continues to execute and hence grabs the wrong heights? Is there a way to pause, to make sure all content has been cloned properly? Thanks. I'm really pulling my hair out over this one.
Really mysterious DOM issues in Chrome
CC BY-SA 3.0
0
2011-05-20T17:46:11.290
2011-05-20T18:42:41.463
null
null
685,125
[ "jquery", "dom" ]
6,076,154
1
null
null
8
3,122
I made a ModelForm from a Model in Django, the model have an ImageField field on it. When I render the info of the form in a template for editing it, it show this: ![Screenshot that show Currently info](https://i.stack.imgur.com/jqZDL.png) How I can remove the 'Currently' tag and link??
How to remove the "Currently:" tag and a link of a FileInput widget in Django?
CC BY-SA 4.0
0
2011-05-20T18:27:07.460
2023-01-17T17:10:28.110
2023-01-16T11:50:33.917
3,247,006
24,506
[ "python", "django", "django-models", "django-forms", "django-admin" ]
6,076,730
1
6,077,118
null
7
1,565
I'm having issues with the IE7 list element bugs. The bullets (or numerals) of and are being shown outside of the margin. How do I fix this for IE? From what I've read this seems to be a problem when specifying the height/width in an IE7 li. Images can be found here: Firefox: ![Firefox](https://i.stack.imgur.com/UgA6i.png) IE7: ![IE7](https://i.stack.imgur.com/t8q0a.png) I have a stylesheet with the Meyer reset. ``` #create_request li { display: list-item; width: 313px; height: 23px; background-color: #E3E3E3; list-style: decimal; list-style-position: inside; padding-left: 25px; padding-top: 5px; } #create_request li.alternate { background-color: white; } #create_left li:hover { width: 356px; background: url('/images/list_add.png') 100% 100% no-repeat; background-color: #B0B0B0; cursor: pointer; } ```
IE7 <li> bullet or number shown outside of div
CC BY-SA 3.0
null
2011-05-20T19:28:35.123
2012-06-01T16:57:59.423
2012-06-01T16:57:59.423
387,076
320,919
[ "html", "css", "internet-explorer", "html-lists" ]
6,077,009
1
6,080,909
null
1
469
i want a rectangle with this measures left=50, top=20, rigth=50 and in XAML Something like thanks![Something like](https://i.stack.imgur.com/rtZlf.jpg) i want to create a Grid with that shape, i said grid because the control should contain other controls like an image and this control should grow or shrink with the form.
How to draw a rectangle with one different border
CC BY-SA 3.0
0
2011-05-20T19:59:11.157
2017-03-17T15:07:56.480
2017-03-17T15:07:56.480
1,033,581
724,414
[ "wpf", "xaml", "drawing", "shapes" ]
6,077,443
1
6,077,698
null
3
506
Can I use this search box control seen in Windows Explorer in my own Qt/C++ application? Or is it a custom control I'd have to implement manually? ![enter image description here](https://i.stack.imgur.com/GEXm6.png)
Can I use the search box control seen in Windows Explorer in my own application?
CC BY-SA 3.0
null
2011-05-20T20:49:11.613
2011-05-20T21:18:35.300
null
null
343,845
[ "c++", "controls" ]
6,077,445
1
6,079,212
null
9
2,331
I haven't been able to find what these Xcode icons mean. Some you can deduce (cup icon is cocoa, person icon is your code) but other's are more mysterious. ![Xcode Debugger Navigator](https://i.stack.imgur.com/6zQnV.png) ![Xcode Debugger Navigator](https://i.stack.imgur.com/1MSAf.png) ![Xcode Debugger Navigator](https://i.stack.imgur.com/bcQJf.png) UPDATE 1: I was able to find the icon files under: > .../Xcode.app/Contents/PlugIns/DebuggerFoundation.ideplugin/Contents/Resources There's a total of 13 different icons and they are all clearly labeled. In the screenshot that I posted we have: - - - - - - Update 2: A while back I wrote a blog post that's easier to read: [http://jlmendezbonini.com/2013/03/27/Xcode-4-debugger-icons.html](http://jlmendezbonini.com/2013/03/27/Xcode-4-debugger-icons.html) Update 3: Looks like Apple finally documented it in the [Process View Display](https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/debugging_with_xcode/chapters/debugging_tools.html#//apple_ref/doc/uid/TP40015022-CH8-SW19) section. Here's a link to the image: [](https://i.stack.imgur.com/UqGBe.png)
What do these Xcode 4 debugger icons mean?
CC BY-SA 3.0
0
2011-05-20T20:49:19.113
2016-01-13T06:42:53.550
2016-01-13T06:42:53.550
546,719
546,719
[ "icons", "xcode4" ]