Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
4,623,274
1
4,623,421
null
4
1,745
I'm using TableLayout to display data. Text of the TextViews of the right column will be set when activity calls onCreate(). Now, as you can see in the following image that my address text can be long and it should be wrapped. So I set `android:layout_width="wrap_content"`. but it still take a width of screen size to wrap data. How can I overcome from this issue? ![alt text](https://i.stack.imgur.com/TlTp6.jpg) My xml: ``` <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5px"> <TableRow> <TextView android:text="Job#" android:paddingRight="5px" /> <TextView android:id="@+id/DetailJobNo" /> </TableRow> <TableRow> <TextView android:text="Address" android:paddingRight="5px" /> <TextView android:id="@+id/DetailAddress" android:layout_width="wrap_content" android:text="Address Address Address Address Address Address Address Address "/> </TableRow> </TableLayout> ```
Android TableLayout width issue
CC BY-SA 2.5
0
2011-01-07T07:07:53.090
2012-06-01T07:22:36.380
2011-12-07T01:01:35.433
793,522
415,865
[ "android", "android-layout", "android-tablelayout" ]
4,623,302
1
null
null
0
384
I am trying to configure the Textile set of MarkitUp! and facing the following issue: I do not want h1. h2. h3. h4. h5. and h6. options in the editor. So i removed them from the default textile set options. ``` markupSet: [ {name:'Heading 1', key:'1', openWith:'h1(!(([![Class]!]))!). ', placeHolder:'Your title here...' }, {name:'Heading 2', key:'2', openWith:'h2(!(([![Class]!]))!). ', placeHolder:'Your title here...' }, {name:'Heading 3', key:'3', openWith:'h3(!(([![Class]!]))!). ', placeHolder:'Your title here...' }, {name:'Heading 4', key:'4', openWith:'h4(!(([![Class]!]))!). ', placeHolder:'Your title here...' }, {name:'Heading 5', key:'5', openWith:'h5(!(([![Class]!]))!). ', placeHolder:'Your title here...' }, {name:'Heading 6', key:'6', openWith:'h6(!(([![Class]!]))!). ', placeHolder:'Your title here...' }, {name:'Paragraph', key:'P', openWith:'p(!(([![Class]!]))!). '}, {separator:'---------------' }, {name:'Bold', key:'B', closeWith:'*', openWith:'*'}, {name:'Italic', key:'I', closeWith:'_', openWith:'_'}, {name:'Stroke through', key:'S', closeWith:'-', openWith:'-'}, {separator:'---------------' }, {name:'Bulleted list', openWith:'(!(* |!|*)!)'}, {name:'Numeric list', openWith:'(!(# |!|#)!)'}, {separator:'---------------' }, {name:'Picture', replaceWith:'![![Source:!:http://]!]([![Alternative text]!])!'}, {name:'Link', openWith:'"', closeWith:'([![Title]!])":[![Link:!:http://]!]', placeHolder:'Your text to link here...' }, {separator:'---------------' }, {name:'Quotes', openWith:'bq(!(([![Class]!]))!). '}, {name:'Code', openWith:'@', closeWith:'@'}, {separator:'---------------' }, {name:'Preview', call:'preview', className:'preview'} ] ``` ``` markupSet: [ {name:'Bold', key:'B', closeWith:'*', openWith:'*'}, {name:'Italic', key:'I', closeWith:'_', openWith:'_'}, {name:'Stroke through', key:'S', closeWith:'-', openWith:'-'}, {separator:'---------------' }, {name:'Bulleted list', openWith:'(!(* |!|*)!)'}, {name:'Numeric list', openWith:'(!(# |!|#)!)'}, {separator:'---------------' }, {name:'Picture', replaceWith:'![![Source:!:http://]!]([![Alternative text]!])!'}, {name:'Link', openWith:'"', closeWith:'([![Title]!])":[![Link:!:http://]!]', placeHolder:'Your text to link here...' }, {separator:'---------------' }, {name:'Quotes', openWith:'bq(!(([![Class]!]))!). '}, {name:'Code', openWith:'@', closeWith:'@'}, ] ```
Configure the Textile set in MarkItUp!
CC BY-SA 2.5
null
2011-01-07T07:13:40.127
2011-11-21T10:53:28.277
null
null
1,568,097
[ "javascript", "markitup" ]
4,623,415
1
4,644,575
null
1
1,194
I've gotten myself into trouble. This ms my markup: ``` <div class="header_wrap"> <div class="header_row0"><img src="header-940x60.gif"></div> <table class="header_row1"> <tbody> <tr> <td><a href="/">Home</a></td> <td><a id="menuTrigger" href="#">More</a> <ul id="menuContent" class="easymenu"> <li><a href="/link1.html">Link 1</a></li> <li><a href="/link2.html">Link 2</a></li> </ul></td> </tr> </tbody> </table> <table class="header_row2"> <tbody> <tr> <td><a href="/link3.html">Link 3</a></td> <td><a href="/link3.html">Link 4</a></td> </tr> </tbody> </table> </div> ``` To summarize, there are three items inside header_wrap: 1. header_row0 2. header_row1 3. header_row2 My objective is to position the header-940x60.gif image such that it appears as a background behind `header_row1` and `header_row2`. But here is what I CANNOT do: 1. I cannot place the header.gif in the background. The image's height may vary and I therefore must use header.gif inside an <img> tag without specifying dimensions. Besides I'll need alt tags for SEO sometime in the future. 2. I cannot use position: relative and position: absolute because the #menuContent is position: absolute. It needs to be positioned w.r.t. the page, using relative positioning on any of its container just srcews every thing up. 3. The height of the image is not known so I cannot use negative margins. Please advice best way to achieve the following result without relative positioning: ![screenshot 1](https://i.stack.imgur.com/D5adj.jpg) PS: In the screenshot you'll notice the the popup menu is not aligned with the left side of its trigger. This is the main problem. This [jsFiddle link](http://jsfiddle.net/Nbb5q/) contains a skinned down version of the markup.
How to create three overlapping layers without using "position" and "margins"
CC BY-SA 2.5
null
2011-01-07T07:29:21.710
2011-03-30T17:35:11.377
2011-01-07T12:43:34.297
87,015
87,015
[ "html", "css", "positioning", "css-position" ]
4,624,003
1
4,624,150
null
-2
2,280
I am getting the above error while i do a xslt transform to a XML using a schema ...any idea what the error could be ?![alt text](https://i.stack.imgur.com/Z2ain.jpg)
the attribute name "Name" on this element is not defined in the DTD/Schema
CC BY-SA 2.5
null
2011-01-07T09:15:13.637
2011-01-07T09:35:58.500
null
null
106,528
[ "xml", "xslt", "xsd", "xsd-validation" ]
4,624,334
1
4,624,359
null
3
994
I have `Eclipse for PHP Developers` based on `Helios`. In order to run my PHPUnit tests on a directory its: - - - - ![alt text](https://i.stack.imgur.com/SqDs3.png) `ALT-Apple-P`
How to assign a hotkey to a menu item in Eclipse?
CC BY-SA 2.5
0
2011-01-07T09:59:35.373
2011-01-07T10:06:51.697
null
null
4,639
[ "eclipse", "macos", "phpunit", "hotkeys" ]
4,624,614
1
4,625,757
null
1
1,778
I've got a problem with drawing linear gradient filled rect. The two screenshots are from chrome (left) and Firefox (right). As you can see, the gradient is only applied to the rect on the first 170px (you could see it better on the right image, because firefox fills up the rest with the colorStop you've added at last). The following code does fill the rect with 200px of gradient height, and I don't know why only 170px are filled up. Height = 200, left = 30, top = 30, Width = 300, radius = 3; ``` //Fill var lingrad = gcx.createLinearGradient(0, top, 0, Height); lingrad.addColorStop(0, 'white'); lingrad.addColorStop(0.5, '#66CC00'); lingrad.addColorStop(0.5, 'red'); lingrad.addColorStop(1, 'white'); lingrad.addColorStop(1, 'blue'); gcx.fillStyle = lingrad; gcx.beginPath(); gcx.lineWidth = 1; gcx.moveTo(left + radius, top); gcx.lineTo(left + Width - radius, top); //Top-right-corner: gcx.arc(left + Width - radius, top + radius, radius, (Math.PI / 180) * 270, (Math.PI / 180) * 0, false); gcx.lineTo(left + Width, top + Height - radius); //Bottom-right-corner: gcx.arc(left + Width - radius, top + Height - radius, radius, (Math.PI / 180) * 0, (Math.PI / 180) * 90, false); gcx.lineTo(left + radius, top + Height); //Bottom-left-corner: gcx.arc(left + radius, top + Height - radius, radius, (Math.PI / 180) * 90, (Math.PI / 180) * 180, false); gcx.lineTo(left, top + radius); //Top-left-corner: gcx.arc(left + radius, top + radius, radius, (Math.PI / 180) * 180, (Math.PI / 180) * 270, false); gcx.closePath(); gcx.fill(); ``` ![alt text](https://i.stack.imgur.com/P9Cao.png) ![alt text](https://i.stack.imgur.com/azTVs.png) Thanks for help!
Canvas drawing filled rounded rect with linear gradient
CC BY-SA 2.5
0
2011-01-07T10:35:08.323
2011-01-07T13:09:47.070
null
null
303,549
[ "javascript", "html", "canvas" ]
4,625,036
1
4,625,924
null
0
1,665
I've got a rather large table (20+ columns) on an SQL server 2008. I'm using Microsofts SQL Server Management Studio to open the tables design view and add a column. After adding the column i move it up in the column sorting. The image below shows the column i added and where i'm trying to move it to by just dragging it a few places up. ![Column circeled is being added and moved up](https://i.stack.imgur.com/9rKdV.png) After i've done this i'm getting an exception when i'm trying to open up the website. Everything works fine when i add the column without moving it up in the column sorting. Can someone help me figuring out this problem. Is this an bug in MSSQL server, the management studio or is something else going wrong? The exception ``` Operand type clash: bit is incompatible with uniqueidentifier ``` The stacktrace: ``` [SqlException (0x80131904): Operand type clash: bit is incompatible with uniqueidentifier] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363 System.Data.SqlClient.SqlDataReader.HasMoreRows() +301 System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +422 NHibernate.Driver.NHybridDataReader.Read() +28 NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +1383 NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +114 NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +195 [ADOException: could not execute query [ SELECT * from SomeFunction(@p0,@p1) ] Name:Id - Value:3429fb7e-dba3-4c74-b41b-6f2e0bbb33f8 Name:Moment - Value:7-1-2011 12:16:45 [SQL: SELECT * from SomeFunction(@p0,@p1)]] NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +637 NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) +23 NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) +438 NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) +373 NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters) +340 NHibernate.Impl.SqlQueryImpl.List() +258 CMS.ResourceAccess.DataAccessLogic.Repositories.NodeRepository.GetAncestors(Guid nodeId) in C:\Projects\Website\DataAccessLogic\Repositories\Repository.cs:228 CMS.Business.Components.Services.NodeService.GetAncestors(Guid nodeId) in C:\Projects\Website\DataAccessLogic\Repositories\Service.cs:921 CMS.Business.Components.Services.NodeService.GetSiteByNodeId(Guid nodeId) in C:\Projects\Website\DataAccessLogic\Repositories\Service.cs:1280 Plugin.Wysiwyg.Business.Components.Services.WysiwygSearchService.RebuildIndex() +1232 CMS.Business.Components.Services.SearchService.RebuildIndexForSites(IEnumerable 1 sites, ConfigurationManager configurationManager) in C:\Projects\Website\Services\Service.cs:303 CMS.Business.Components.Services.SearchService.RebuildIndex() in C:\Projects\Website\DataAccessLogic\Repositories\Service.cs:252 CMS.Backend.MvcApplication.Application_Start() in C:\Projects\Website\Global.asax.cs:49 [HttpException (0x80004005): could not execute query [ SELECT * from SomeFunction(@p0,@p1) ] Name:Id - Value:3429fb7e-dba3-4c74-b41b-6f2e0bbb33f8 Name:Moment - Value:7-1-2011 12:16:45 [SQL: SELECT * from SomeFunction(@p0,@p1)]] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +3988565 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +191 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +325 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375 [HttpException (0x80004005): could not execute query [ SELECT * from SomeFunction(@p0,@p1) ] Name:Id - Value:3429fb7e-dba3-4c74-b41b-6f2e0bbb33f8 Name:Moment - Value:7-1-2011 12:16:45 [SQL: SELECT * from SomeFunction(@p0,@p1)]] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11529072 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4784373 ``` EDIT: I'm using NHibernate as ORM
SQL error when modifying table design from sql management studio
CC BY-SA 2.5
null
2011-01-07T11:29:44.957
2011-01-07T15:12:55.503
2011-01-07T12:17:16.470
291,293
291,293
[ "sql", "sql-server", "sql-server-2008", "ssms" ]
4,625,246
1
5,890,361
null
4
1,283
I just tested my custom gallery script at JSLint.. and all errors where solved except for one. The implied global error.. Is this really an error? Can I ignore it or should I work on it to solve this error..? Thank you for your responses! ![alt text](https://i.stack.imgur.com/iDSRS.png) ``` Error: Implied global: <bunch of vars and other stuff i dont know> ``` What does this mean? BTW I use JQuery Library.. maybe thats the problem^^..
JSLint (Javascript Validator Website) - Error! Implied global:
CC BY-SA 2.5
0
2011-01-07T11:58:19.650
2012-03-20T20:53:33.710
null
null
497,060
[ "javascript", "jquery", "validation", "jslint" ]
4,625,274
1
4,625,355
null
16
8,245
Without any specific regularity my vim displays underlines on the place of tabs (see below). Sometimes it also happens to the text: I type and it's underlined. What could be a reason? ![enter image description here](https://i.stack.imgur.com/uasDD.png)
Why is vim drawing underlines on the place of tabs and how to avoid this?
CC BY-SA 3.0
0
2011-01-07T12:02:39.013
2013-01-12T12:30:41.117
2011-05-06T13:32:24.667
180,892
350,789
[ "vim", "underline" ]
4,625,366
1
null
null
1
983
You all know is this: ![alt text](https://i.stack.imgur.com/LNx6h.png) I do have a log system and the correct error is well explicit there, but I want to give a better message to the user. I keep trying several ways but I'm using Telerik components and well jQuery and I ended up using both ASP.NET Ajax methods and jQuery, so I use ``` function pageLoad() { try { var manager = Sys.WebForms.PageRequestManager.getInstance(); manager.add_endRequest(endRequest); manager.add_beginRequest(OnBeginRequest); manager } catch (err) { alert(err); } } ``` as well ``` $(document).ready(function() { ... } ``` that `alert(err)` is never fired even upon `OnClick` events what's the best approach to avoid this message errors and provide a cleaner way? in `<asp:UpdatePanel>` as I use that when I didn't know better (3 years ago!) and I really don't want to mess up and build all again from scratch :( Any help is greatly appreciated --- Updated with more error windows after solution ![alt text](https://i.stack.imgur.com/aRgtf.png) ![alt text](https://i.stack.imgur.com/cdNkQ.png)
Show friendly message on ASP.NET Ajax error
CC BY-SA 2.5
0
2011-01-07T12:18:28.220
2021-11-12T06:57:25.877
2011-01-07T13:53:14.107
28,004
28,004
[ "asp.net", "asp.net-ajax", "error-handling" ]
4,625,440
1
null
null
9
5,813
How can I find in a directed graph with multi edges? Graph example 1: ![Graph 1](https://i.stack.imgur.com/PvqNb.png) Cycles: Graph example 2 (multi-edge 4/5): ![Graph 2](https://i.stack.imgur.com/RMuLF.png) Cycles: I don't want to (boolean result), I want to . Any [Strongly connected component](http://en.wikipedia.org/wiki/Strongly_connected_components) algorithm is sufficient for my problem (it would find only one component in both examples). I'm using the QuickGraph implementation in C#, but I would be happy to see an algorithm in any language.
Cycle enumeration of a directed graph with multi edges
CC BY-SA 2.5
0
2011-01-07T12:27:02.480
2016-07-13T18:10:18.310
2011-01-07T18:35:38.307
50,890
50,890
[ "c#", "algorithm", "math", "graph" ]
4,625,493
1
4,650,039
null
1
100
Basically I want to send gps coordinates (displayed on a map in the iPhone) from the iPhone to a webserver that store the values in a database. You should then be able to retrieve these coordinates and display them on a web page. I am thinking of a set up like this: ![](https://i.stack.imgur.com/kSWbQ.png) I want the browser to request and receive the coordinates in real time (every 10 seconds or so) and
How to mirror an iPhone map in a web page
CC BY-SA 2.5
null
2011-01-07T12:35:49.677
2011-01-10T18:21:23.710
2011-01-07T16:48:33.980
273,555
273,555
[ "iphone", "objective-c", "performance" ]
4,625,820
1
4,626,427
null
12
20,452
I'd like to create keyboard shortcuts for some controls in my Windows Forms application. Example: ![Screenshot of XYZ](https://i.stack.imgur.com/tTGZk.png) Notice the underlined, F E V P B. I have a label and a textbox control. I'd like to associate that keyboard shortcut to the label and the textbox. So if someone presses + , focus is given to the associated textbox. Is there a way to create this association?
How can you create Alt shortcuts in a Windows Forms application?
CC BY-SA 3.0
0
2011-01-07T13:17:13.383
2014-09-26T15:18:08.913
2014-09-26T15:18:08.913
63,550
null
[ "c#", "winforms", "shortcut" ]
4,626,020
1
4,626,203
null
0
139
I am build a page,however I meet some layout related probelms,I can not make the div ajust its size(acutally the height) automatically. See the following markup: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="jquery-1.4.2.min.js"></script> <title>Link one</title> <style type="text/css"> div#middle{ margin-top: 5px; margin-bottom: 5px; } </style> </head> <body> <div style="background-color: gray;border: solid 1px red" id="top"> <h1>Top<h1> </div> <div style="border: solid 1px blue;min-height: 200px" id="middle"> <div id="leftmenu" style="float: left;background-color:gray;width: 190px"> <ul> <li><a href=''>Link One</a></li> <li><a href=''>Link Two</a></li> <ul> </div> <div id="content" style="background-color: black;margin-left: 200px"> I am in Link One </div> </div> <div style="background-color: gray" id="foot"> <hr/> <p>Copyright xxx</p> </div> </body> </html> ``` Note the div whose id is "middle",I have to set its height manually,if not the div below it (div with id "foot")will not displayed below it. The foot div will go to the same line with "middle" div,just remove the "min-height: 200px" of "middle" div for a test. And since the content is not sure,so I can not set its size manually,I just want to the height of the middle div to be the larger height of "leftmenu" or "content". Any ideas? -----------------------------------------![alt text](https://i.stack.imgur.com/IMnLI.jpg) It does not expand ,
a web page layout
CC BY-SA 2.5
null
2011-01-07T13:40:54.167
2011-01-07T14:23:14.520
2011-01-07T14:02:41.473
11,995
306,719
[ "html", "css" ]
4,626,431
1
4,626,582
null
26
155,712
In a page with some navigation links,I want the link of the current page are hightlighted,just like this: ![alt text](https://i.stack.imgur.com/3aBzu.jpg) The link "" is highlighted(bolded) since this link will take one to the current page. I know this can be implemented manually(just hightlighted the according link,but is there some smart way? highlight the right link dynamically and automatically?
highlight the navigation menu for the current page
CC BY-SA 2.5
0
2011-01-07T14:25:16.020
2021-07-28T03:41:16.333
2020-06-20T09:12:55.060
-1
306,719
[ "html", "highlight" ]
4,626,441
1
4,644,080
null
6
1,588
`init```` 1534| + (UA[REDACTED]PlayerController*)sharedInstance 1535| { 1536| @synchronized(self) 1537| { 1538| if (sharedInstance == nil) 1539| sharedInstance = [[UA[REDACTED]PlayerController alloc] init]; 1540| } 1541| return sharedInstance; 1542| } ``` This has never crashed before, and the code has not changed anytime recently. Here is the raised stack trace:``` Thread 5: 0 libSystem.B.dylib 0x33bd52d4 __kill + 8 1 libSystem.B.dylib 0x33bd52c4 kill + 4 2 libSystem.B.dylib 0x33bd52b6 raise + 10 3 libSystem.B.dylib 0x33be9d26 __abort + 62 4 libSystem.B.dylib 0x33be9d7e abort + 62 5 libSystem.B.dylib 0x33bd7980 __assert_rtn + 152 6 libgcc_s.1.dylib 0x32acab4e _Unwind_SjLj_Resume + 26 7 [REDACTED] 0x00060b64 +[UA[REDACTED]PlayerController sharedInstance] (UA[REDACTED]PlayerController.m:1540) 8 [REDACTED] 0x00063e6c -[UA[REDACTED]PlayerViewController setupControlViews] (UA[REDACTED]PlayerViewController.m:224) 9 [REDACTED] 0x00062ce0 -[UA[REDACTED]PlayerViewController viewDidLoad] (UA[REDACTED]PlayerViewController.m:268) 10 UIKit 0x320a0270 -[UIViewController view] + 104 … ``` Any ideas as to what this cryptic crash is and where it might be coming from? --- `PlayerController` --- Here is the call stack of the crash after I have found a way to reproduce it![alt text](https://i.stack.imgur.com/eboru.png) and the relevant code: ``` if (resultArray && [resultArray count]) { for (MixAudio *ma in resultArray) { Audio *audio = [ma valueForKey:LOCAL_MIX_AUDIO_AUDIO_KEY]; if (audio) { [returnArray addObject:audio]; } } ``` To help explain what I did to reproduce it, I have to explain the data structure a little. I have `Mix` and `Audio` items. Mixes have many Audio, Audio belongs to many Mixes. This is a simple relationship call on the MixAudio objects to get the Audio. Now, this has only been crashing here I do a database restore to the new version. Database backups in my setup means zipping up the database to save the data, then unzipping on restore. This crash only happens after the restore process. To make things more complicated, there are 3 database versions with mapping models. Because this process worked for me before the versioning, I feel that something in my versions is causing this crash. All other data is fine and can be accessed, even saved. Somehow, this single fetch is causing issues. There are no errors or warnings when setting up the persistent store or managed object model. Furthermore, new Mix objects can be created and accessed fine, only older fetches (that were in the DB before the restore) are failing. If I don't catch the error, the console prints: ``` Assertion failed: (_Unwind_SjLj_Resume() can't return), function _Unwind_SjLj_Resume, file /SourceCache/libunwind/libunwind-24.1/src/Unwind-sjlj.c, line 326. ``` Putting a `try/catch` around the crashing line allows me to inspect the root crash cause: ``` Error: NSRangeException: *** -[NSMutableArray objectAtIndex:]: index 4294967295 beyond bounds [0 .. 16] ``` but this makes no sense (to me at least) for a simple `valueForKey` call. 4294967295 = 2^32-1 which means the index var was probably set to −1 if that helps. I am lost here. --- I was right about it being in the versioning :) I reread the section on versioning in [Zarra's book](https://rads.stackoverflow.com/amzn/click/com/1934356328) and had a major moment. This is the first time I have ever had an app with 3 database versions. I am using Mapping Models in my app and I naively assumed that core data would be able to map from 1-2 using one model, then 2-3 using the next. I literally hit my head when I realized I did not have a 1-3 mapping model. to test it out, I added one quickly and everything is as smooth as butter. Now I just have to go back and use his `Progressive Data Migration` samples to make my life easier as I go on with more version of this DB. I am hoping Zarra drives by here and answers something… anything… so I can give him the points for this :)
Strange Core Data crash with _Unwind_SjLj_Resume after migrating
CC BY-SA 2.5
0
2011-01-07T14:26:07.797
2011-03-23T23:02:56.297
2011-03-23T23:02:56.297
203,220
69,634
[ "iphone", "core-data", "crash", "mapping-model", "core-data-migration" ]
4,626,567
1
4,626,586
null
9
3,057
I am wondering why with markup like [http://jsfiddle.net/rkEpx/](http://jsfiddle.net/rkEpx/) I get ![](https://imgur.com/XHmTf.jpg) As you can see, the 1st and last menu items have its link broken into 3 lines even tho theres enough space to expand. Is it possible to have the line not break unless theres really no space? If possible without setting a fixed width or using non-breaking spaces?
HTML/CSS Whitespace breaking
CC BY-SA 2.5
null
2011-01-07T14:37:57.977
2015-12-25T19:00:22.317
null
null
292,291
[ "html", "css" ]
4,626,613
1
4,627,125
null
3
292
I'm debugging my (Common) Lisp code in Slime tied to clisp. When the debugger generates the Backtrace it's my understanting that I can hit 'v' on a frame to take me to the source. However, when I do this on the any frame I get: ``` frame-source-location not implemented ``` Is this expected, am I missing anything? : In addition every single frame has "No Locals", is this to be expected too? : In fact, the whole backtrace output is pretty unintelligible. I'm new to Lisp, so I wasn't initially sure if this was expected or not - but I'm attaching a screenshot, hopefully someone can confirm for me if this looks 'normal': ![alt text](https://i.stack.imgur.com/vATUy.png) I'm guessing [this is related](https://groups.google.com/group/comp.lang.lisp/browse_thread/thread/764f658c0eb2688f?hl=de)
Slime: frame-source-location not implemented / is my sldb Backtrace output normal?
CC BY-SA 2.5
null
2011-01-07T14:41:51.283
2011-01-07T17:33:01.630
2011-01-07T15:20:52.980
60,956
60,956
[ "lisp", "common-lisp", "slime" ]
4,626,853
1
4,626,935
null
1
1,517
![alt text](https://i.stack.imgur.com/mpHEv.png) I will get this in a Raw format and i am writing this using ``` Response.write("Some.xml"); ``` I need to find out MerchantOrderNumber from this raw data how to obtain this
Display RAW XML to a string or Label and find out particular Tag from that XML
CC BY-SA 2.5
null
2011-01-07T15:04:58.373
2011-01-07T15:28:29.680
2011-01-07T15:15:44.410
388,388
388,388
[ "c#", "asp.net", "xml", "asp.net-2.0" ]
4,626,888
1
4,626,979
null
1
968
I have a with a of 1pd thickness. But somehow every second divider in the ListView is thicker then the others ...as you can see on the picture ![alt text](https://i.stack.imgur.com/yQNDu.jpg) the code of the ListView is real simple : ``` <ListView android:id="@+id/directoriesListView" android:choiceMode="singleChoice" android:clickable="true" android:layout_weight="2.5" android:cacheColorHint="@null" android:footerDividersEnabled="false" android:fadingEdge="none" style="@style/ListView_NarrowItems" /> ``` and the style : ``` <style name="ListView_NarrowItems" > <item name="android:layout_width">fill_parent</item> <item name="android:layout_height">fill_parent</item> <item name="android:textColor">#FFFFFF</item> <item name="android:background">#000000</item> <item name="android:divider">#FFFFFF</item> <item name="android:dividerHeight">1px</item> </style> ``` any idea what is wrong ?
Android ListView divider strange problem
CC BY-SA 2.5
0
2011-01-07T15:08:10.400
2011-09-05T12:34:40.477
null
null
1,205,130
[ "android", "android-layout" ]
4,627,305
1
4,628,066
null
0
714
What causes this ? Other controls are shown fine ... ``` public CustomControl() { SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.UserPaint, true); } ``` The customcontrol is placed in a TableLayoutPanel. ................... Edit: For clarification: Suppose you have a window-sized control with a small modal dialog form on top. When you move the dialog window, it's like your painting with the window on the control (the borders are painted on the control). The control doesn't repaint itself like other controls do on the same form, ie montcalendar or other custom controls. I can't seem to find the cause of this ? Small detail of drawing artifact: ![alt text](https://i.stack.imgur.com/xzY9i.png)
Custom control under modaldialog not repainting when moving dialog
CC BY-SA 2.5
null
2011-01-07T15:47:06.200
2011-01-10T13:54:01.810
2011-01-10T13:54:01.810
17,034
171,953
[ "c#", ".net", "gdi+" ]
4,627,368
1
4,627,460
null
1
1,163
I currently have a Google Map Activity which is apparently working well but doesn't show the map (this sounds stupid!) Here is a picture that will make you understand better my problem: ![alt text](https://i.stack.imgur.com/Knjrs.png) I already confirmed my apiKey, checked the tutorial over and over and even the manifest seems not be missing anything. I get only this on adb: > 276 MapActivity W Recycling dispatcher com.google.googlenav.datarequest.DataRequestDispatcher@43ea39b0276 MapActivity V Recycling map object.51 GpsLocationProvider D setMinTime 1000276 MapActivity I Handling network change notification:CONNECTED276 MapActivity E Couldn't get connection factory client Does anyone have a clue about what may be causing this? Thanks.
Android Google Maps Activity only shows small crosses
CC BY-SA 2.5
null
2011-01-07T15:53:49.087
2011-09-24T13:56:14.497
null
null
508,479
[ "android", "google-maps" ]
4,627,398
1
4,627,503
null
0
929
I have a JPEG image that I want to slice into HTML, I am little confused about positioning things into divs. Can anyone suggest me how can I do this I am sending the jpeg along with the question. ![alt text](https://i.stack.imgur.com/xpj7n.jpg) Regards Umair
How to slice a JPEG into HTML
CC BY-SA 2.5
null
2011-01-07T15:57:24.970
2011-01-07T16:09:05.193
null
null
385,145
[ "html", "css", "web", "slice" ]
4,627,472
1
4,627,567
null
1
137
I have an image that looks like this. And I want to put it on my site BUT I DON'T want it to be an image. I only want the image part of it to be an image, and all the other images/text that you see below should be 'added' onto the main background image using html/css. BUT I am having extreme difficulty understanding how to do it!! :( I've read 6 tutorials, and just don't get it. Main BG image: ![alt text](https://i.stack.imgur.com/mlgYt.png) and here's what it should look like, once I've added images and text to it using HTML/CSS. But this is what I can't figure out how to do. I just don't understand how to place everything on it where I want them to be!: ![alt text](https://i.stack.imgur.com/Dnb0g.png) Please help, any help at all is much appreciated. Thank you
Need help with HTML/CSS/jQuery
CC BY-SA 2.5
null
2011-01-07T16:05:06.070
2011-01-07T19:47:22.930
null
null
null
[ "jquery", "html", "css", "layout" ]
4,627,881
1
null
null
11
1,923
I have an application that makes extensive use of NHibernate. I've started using the NHibernate Profiler to identify possible performance issues. My question is related to the Query Durations statistic. The stat is broken down in Database Duration and Total Duration. From what I've read, the numbers should be very close. However, I'm seeing relatively large disparities and I'm trying to figure out the source of these. Here's some data ![alt text](https://i.stack.imgur.com/0IZl3.png) Any idea on where I can start to fix these issues?
NHibernate Profiler - large discrepancy between database duration and total duration?
CC BY-SA 2.5
0
2011-01-07T16:40:29.303
2011-09-15T11:28:57.597
null
null
85,940
[ "nhibernate", "fluent-nhibernate", "nhprof" ]
4,628,028
1
4,630,986
null
16
13,626
![alt text](https://i.stack.imgur.com/tJAQL.png) I have an application with a datagrid with 1 column (for now). How do I remove the second, empty column from the datagrid such that only columns with data are displayed in the datagrid.
Prevent WPF 4.0 Datagrid from Showing Empty Column
CC BY-SA 2.5
null
2011-01-07T16:52:40.883
2013-07-19T07:16:27.260
2011-06-28T01:38:46.317
546,730
504,310
[ "c#", ".net", "wpf", "xaml", "datagrid" ]
4,628,015
1
4,648,613
null
0
762
I am running several sites in several different languages off of single instance of Magento. There are two main styles: - - Each site has some customizations based on language, so each shop view has an some templates defined: - - Now the problem is that when I apply a product level design, it forgets about the language level definition and skips back to the main definition. I want it to work like this: - - - Instead it seems to work like this : - - - Where Site 2 DE is not ignored because a custom product style has been defined. How can I get the first hierarchy to work so that my product styles do not override the language styles completely? ### Images Here are some images to help you understand my configuration Site level configuration ![](https://dl.dropbox.com/u/1177948/Screen%20shot%202011-01-10%20at%208.22.17%20AM.png) Store level configuration ![](https://dl.dropbox.com/u/1177948/Screen%20shot%202011-01-10%20at%208.22.30%20AM.png) Product level configuration ![](https://dl.dropbox.com/u/1177948/Screen%20shot%202011-01-10%20at%208.24.50%20AM.png)
Override Problem for Custom Design on Product - Magento
CC BY-SA 2.5
null
2011-01-07T16:51:50.787
2011-01-10T15:51:30.277
2017-02-08T14:31:19.900
-1
300,445
[ "templates", "magento", "magento-1.4" ]
4,628,093
1
4,628,689
null
2
3,808
I am looking for an example of drag and drop where the drag item has two distinct areas that have to match up with two droppable areas. Example: ![alt text](https://i.stack.imgur.com/93qNu.jpg) I would like the blue drag item to revert unless it is dropped in a position where each of its red children land on a green area. Ideally I would like to use jquery ui (as I have experience with it), but any javascript library would be fine, thanks in advance.
Drag and drop with 2 drop target
CC BY-SA 2.5
0
2011-01-07T17:00:40.267
2011-01-07T17:59:30.463
null
null
347,180
[ "javascript", "jquery", "jquery-ui", "drag-and-drop", "jquery-ui-draggable" ]
4,628,137
1
4,628,596
null
5
2,882
I'm am attempting to send a Game Center invitation. Sending from the simulator to a device or from a device to the simulator results in an InviteFailed error. What might be the problem? Incorrect implementation? Low Internet speed? Or is it not possible to test Game Center invites with the simulator? Thanks ![Invite Failed](https://i.stack.imgur.com/RroLZ.jpg)
Game Center InviteFailed
CC BY-SA 2.5
null
2011-01-07T17:05:46.050
2011-03-22T21:35:39.637
2011-03-03T22:36:07.513
3,238
474,596
[ "iphone", "objective-c", "game-center", "multiplayer" ]
4,628,152
1
4,628,504
null
1
1,413
![alt text](https://i.stack.imgur.com/LYxUE.png) Best illustrated with an image, perhaps. 1. The tall area (b) to the left of the main content-filled element (d) needs to scale along with that content element (d), but still needs that top-left corner piece (a) at its top. 2. There also needs to be elements capping off the bottom of both columns as indicated (c, e). 3. The entire area cannot exceed 640px in width. 4. There will be more than one of these sections within the flow of the document, so they can't be absolutely positioned or whatever. 5. The left column (a,b,c) is a fixed width, and the cap pieces (a,c,e) are fixed heights. The right column can be fixed width, if that makes things simpler. How do I do this?
CSS: Need an element to scale vertically with its neighbor
CC BY-SA 2.5
null
2011-01-07T17:06:53.383
2011-01-07T17:43:21.383
2011-01-07T17:18:58.440
469,855
469,855
[ "css", "layout", "scaling", "vertical-alignment" ]
4,628,402
1
4,628,692
null
3
2,587
I am starting a new application and I am willing to use the [Dashboard pattern](http://android-developers.blogspot.com/2010/05/twitter-for-android-closer-look-at.html). For example: The [Google IO app](http://code.google.com/p/iosched/) uses it: ![alt text](https://i.stack.imgur.com/WcKUK.png) My issue is that the amount of buttons will be more than six. I'm not sure if I should use vertical or horizontal scrolling. Vertical scrolling could be done with a `ScrollView` or a `GridView` but I am not sure which would be the easier way to implement the horizontal version. I was thinking of using an `HorizontalScrollView` but it doesn't have pagination. It should feel similar to the tweetdeck app. How would you implement it?
Dashboard pattern: HorizontalScrollView with pagination or ScrollView?
CC BY-SA 2.5
0
2011-01-07T17:30:41.170
2011-01-07T18:06:53.137
null
null
119,895
[ "android", "dashboard" ]
4,628,524
1
4,628,564
null
5
40,426
In Excel, I have the following formula `=(MIN(H69,H52,H35,H18)*(1/H18))*10` that is supposed to return the `MIN` of a range, and divide it by the current cell (*(1/H18) ), then multiply by 10. I am having difficulty with adding a type of NULLIF statement. I want to be able to have (the possibility for) blank rows, and have the MIN function ignore zero/blank fields while selecting the next lowest value (all are between 1.0-0.1). Is there a modifier i can apply to the MIN function to make it not compare zeroes in the MIN set? Is there a better function than `MIN` to use? Here is the arrangement: ![alt text](https://i.stack.imgur.com/zuzF3.png) - `MIN`- `H69,H52,H35,H18`-
How can I make Excel's MIN function ignore zeroes in a set?
CC BY-SA 3.0
null
2011-01-07T17:44:51.217
2019-10-31T19:17:55.327
2014-07-03T10:01:28.927
759,866
375,270
[ "excel", "min" ]
4,628,790
1
4,628,935
null
2
214
I am trying to use TFS Integration Platform to migrate my project A on server 1 to project A on server 2. I have branched code from project B on server 1 to project A on server 1 but I am not moving project B to server 2. Is there any way that I can use a default action for all conflicts to resolve by adding instead of branching on server 2 during the migration? If not, is there anything else I can do to get the code over from initial checkin without moving project B to server 2? Thanks in advance! ![alt text](https://i.stack.imgur.com/B7P3b.png)
TFS Integration Platform Migration Issue
CC BY-SA 2.5
null
2011-01-07T18:13:03.973
2011-04-28T11:19:10.563
2011-04-28T11:19:10.563
53,236
194,261
[ "tfsintegrationplatform" ]
4,628,825
1
null
null
1
1,238
I am kinda addicted to report viewer and reporting tool, almost all my applications needs reports and I am most familiar with RDLC or RDL languages for making reports. Microsoft Report Builder v3 is great application, and I want to share that goodies with my end users, is there source of that application available for developers, or is there other open source application which can be hosted inside winforms application or edited so I can add more features as users needs which looks like ReportBuilder app. I will like to share only viewing of reports with end users without needs for design reports. I know that I can use report viewer control in my winforms application to work with RDLC files, but report builder app has a lot of better look then reportviewer control. To be clear please take look at [picture](https://i.stack.imgur.com/Bk2PB.jpg) ![picture](https://i.stack.imgur.com/Bk2PB.jpg)
SQL Server 2008 Report Builder source code or application which looks like that
CC BY-SA 2.5
null
2011-01-07T18:18:22.780
2011-01-07T19:06:47.693
2011-01-07T19:06:47.693
13,302
69,433
[ "sql-server", "reporting-services", "reporting", "reportviewer", "reportviewer2008" ]
4,628,949
1
4,629,714
null
8
20,266
one question for all advanced in jqgrid. i have to code this usecase: In jqGrid there are two editable columns. I have to use cell editing. User click to one editable cell and when he presses '' key, i select next editable cell UNDER actual one. Otherwise, when he hits '' key, i select next editable cell - - to sum up – i need exact behaviour like in excel. if i had better reputation, I could have uploaded an image to demonstrate desired situation. ![alt text](https://i.stack.imgur.com/OwrDX.jpg) thanks a lot.
Excel-like enter and tab key navigation in cell editing
CC BY-SA 2.5
0
2011-01-07T18:30:28.340
2013-11-20T13:53:42.820
2011-01-07T20:02:07.207
315,935
332,242
[ "jqgrid" ]
4,629,336
1
4,629,905
null
15
5,277
The glyphs associated with TBitBtn for even Delphi 2010 are choppy and "ugly". Is there a backwards-compatibility reason that they remain? Does Embarcadero include updated png replacements that I could use instead of these normal glyphs? Maybe it's just me, but I'd love to see Embarcadero solicit (or hire) graphic designers to improve these icons. ![alt text](https://i.stack.imgur.com/eNaKd.jpg)
Why are the glyphs included with TBitBtn so ugly and outdated?
CC BY-SA 2.5
0
2011-01-07T19:14:09.617
2011-01-10T15:30:40.727
2011-01-10T15:30:40.727
505,088
12,458
[ "delphi" ]
4,629,662
1
4,629,724
null
2
7,305
I know it may not be best practice but this is what i want to do. When my broadcast receiver is called - start a new activity which has is not fullscreen and has a transparent background - which opens on top of your current activity / desktop wallpaper. The code I have so far is as follows: I create + call a new activity with : ``` Intent testActivityIntent = new Intent(context, com.andy.tabletsms.work.SMSPopup.class); testActivityIntent.putExtra("com.andy.tabletsms.message", main.msgs.get(i)); testActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); testActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); context.startActivity(testActivityIntent); ``` And then the activity has a theme of : android:theme="@android:style/Theme.Translucent.NoTitleBar" And the code of the activity is just a bog standard activity with a simple layout. However when that broadcast receiver starts the activity - it appears on top of the previous activity which was started when the applicaiton started.....as per this image shows : ![alt text](https://i.stack.imgur.com/a0T6v.jpg)
Android launch an activity from a broadcast receiver
CC BY-SA 2.5
0
2011-01-07T19:53:42.717
2012-06-07T04:42:00.500
2011-01-07T20:02:21.503
6,391
265,683
[ "android", "broadcastreceiver", "activity-stack", "taskaffinity" ]
4,629,855
1
4,630,248
null
3
541
I tried following link to write my first Python GUI app: [Setting up IDE and creating a cross platform Qt Python GUI application](http://popdevelop.com/2010/04/setting-up-ide-and-creating-a-cross-platform-qt-python-gui-application/) I configured the settings exactly as shown in the screenshots, and just pasted that example given over there, but it is giving error. It is not able to find QtGui in PyQt4 folder. The only difference is that I am using Aptana Studio 3 Beta with PyDev plugin instead of Eclipse. The screenshot of my development environment is here: ![alt text](https://i.stack.imgur.com/8dpKP.png)
My first Python GUI program generating error
CC BY-SA 2.5
null
2011-01-07T20:16:09.837
2011-01-07T21:01:01.350
null
null
194,328
[ "python", "pyqt4" ]
4,630,045
1
4,630,233
null
3
422
How can I get this gradient effect in css? ![alt text](https://i.stack.imgur.com/OlbSl.png)
Can I make this style in pure CSS (button)
CC BY-SA 2.5
null
2011-01-07T20:34:14.257
2011-01-07T20:59:26.320
null
null
103,753
[ "css" ]
4,630,122
1
4,635,520
null
3
5,390
I did this very simple, perfectly working, implementation of [Phong Relflection Model](http://en.wikipedia.org/wiki/Phong_shading#Phong_reflection_model) (There is no ambience implemented yet, but that doesn't bother me for now). The functions should be self explaining. ``` /** * Implements the classic Phong illumination Model using a reflected light * vector. */ public class PhongIllumination implements IlluminationModel { @RGBParam(r = 0, g = 0, b = 0) public Vec3 ambient; @RGBParam(r = 1, g = 1, b = 1) public Vec3 diffuse; @RGBParam(r = 1, g = 1, b = 1) public Vec3 specular; @FloatParam(value = 20, min = 1, max = 200.0f) public float shininess; /* * Calculate the intensity of light reflected to the viewer . * * @param P = The surface position expressed in world coordinates. * * @param V = Normalized viewing vector from surface to eye in world * coordinates. * * @param N = Normalized normal vector at surface point in world * coordinates. * * @param surfaceColor = surfaceColor Color of the surface at the current * position. * * @param lights = The active light sources in the scene. * * @return Reflected light intensity I. */ public Vec3 shade(Vec3 P, Vec3 V, Vec3 N, Vec3 surfaceColor, Light lights[]) { Vec3 surfaceColordiffused = Vec3.mul(surfaceColor, diffuse); Vec3 totalintensity = new Vec3(0, 0, 0); for (int i = 0; i < lights.length; i++) { Vec3 L = lights[i].calcDirection(P); N = N.normalize(); V = V.normalize(); Vec3 R = Vec3.reflect(L, N); // reflection vector float diffuseLight = Vec3.dot(N, L); float specularLight = Vec3.dot(V, R); if (diffuseLight > 0) { totalintensity = Vec3.add(Vec3.mul(Vec3.mul( surfaceColordiffused, lights[i].calcIntensity(P)), diffuseLight), totalintensity); if (specularLight > 0) { Vec3 Il = lights[i].calcIntensity(P); Vec3 Ilincident = Vec3.mul(Il, Math.max(0.0f, Vec3 .dot(N, L))); Vec3 intensity = Vec3.mul(Vec3.mul(specular, Ilincident), (float) Math.pow(specularLight, shininess)); totalintensity = Vec3.add(totalintensity, intensity); } } } return totalintensity; } } ``` Now i need to adapt it to become a [Blinn-Phong illumination model](http://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model) I used the formulas from hearn and baker, followed pseudocodes and tried to implement it multiple times according to wikipedia articles in several languages but it never worked. I just get no specular reflections or they are so weak and/or are at the wrong place and/or have the wrong color. From the numerous wrong implementations I post some little code that already seems to be wrong. So I calculate my Half Way vector and my new specular light like so: ``` Vec3 H = Vec3.mul(Vec3.add(L.normalize(), V), Vec3.add(L.normalize(), V).length()); float specularLight = Vec3.dot(H, N); ``` With theese little changes it should already work (maby not with correct intensity but basically it should be correct). But the result is wrong. Here are two images. Left how it should render correctly and right how it renders. ![right](https://i.stack.imgur.com/QxJYb.png) ![wrong](https://i.stack.imgur.com/aL5RF.png) If i lower the shininess factor you can see a little specular light at the top right: ![lower shininess](https://i.stack.imgur.com/uqUge.png) Altough I understand the concept of Phong illumination and also the simplified more performant adaptaion of blinn phong I am trying around for days and just cant get it to work. Any help is appriciated. Edit: I was made aware of an error by [this answer](https://stackoverflow.com/questions/4630122/problem-implementing-blinnphong-shading-model/4633618#4633618), that i am mutiplying by `|L+V|` instead of dividing by it when calculating H. I changed to deviding doing so: ``` Vec3 H = Vec3.mul(Vec3.add(L.normalize(), V), 1/Vec3.add(L.normalize(), V).length()); ``` Unfortunately this doesnt change much. The results look like this: ![div](https://i.stack.imgur.com/eDiQ1.png) and if I rise the specular constant and lower the shininess You can see the effects more clearly in a smilar wrong way: ![div2](https://i.stack.imgur.com/55rve.png) However this division just the normalisation. I think I am missing one step. Because the formulas like this just dont make sense to me. If you look at this picture: [http://en.wikipedia.org/wiki/File:Blinn-Phong_vectors.svg](http://en.wikipedia.org/wiki/File:Blinn-Phong_vectors.svg) The projection of H to N is far less than V to R. And if you imagine changing the vector V in the picture the angle is the same when the viewing vector is "on the left side". and becomes more and more different when going to the right. I pesonally would multiply the whole projection by two to become something similiar (and the hole point is to avoid the calculation of R). Altough I didnt read anythinga bout that anywehre i am gonna try this out... Result: The intension of the specular light is far too much (white areas) and the position is still wrong. I think I am messing something else up because teh reflection are just at the wrong place. But what? Edit: Now I read on wikipedia in the notes that the angle of N/H is in fact approximalty half or V/R. To compensate that i should multiply my shineness exponent by 4 rather than my projection. If i do that I end up with no visible specular light.
Problem implementing Blinn–Phong shading model
CC BY-SA 2.5
0
2011-01-07T20:45:40.670
2016-10-05T22:14:02.890
2017-05-23T12:30:38.833
-1
413,910
[ "java", "graphics", "3d", "vector-graphics" ]
4,630,455
1
4,633,045
null
3
413
When I run my code through the version 252 checker binary, there are no analysis errors. However, when I change to use the latest 253 checker, it returns a slew of errors, all of which do not make any sense. For example, here is an image of an error that it shows in my Safari browser after the scan-build script is complete: ![Clang static analyzer error](https://i.stack.imgur.com/6HisW.png) This is a pretty common error that shows up in the error listing. As you can see, the method name has Copy at the end of it, but it is still reporting as incorrectly named. Here is the breakdown of errors that I am now getting with checker version 253: ``` Bug Summary Results in this analysis run are based on analyzer build checker-253. Bug Type Quantity All Bugs 83 Dead code Unreachable code 17 Memory (Core Foundation/Objective-C) Bad release 19 Leak of returned object 23 Object sent -autorelease too many times 24 ``` The autorelease errors seem to be related to the fact that the analyzer is unable to see that the Copy methods are actually correctly named, and I tried to look for an example of unreachable code, but I could not really find any patterns or explanations of those errors, as the errors were all lines of code inside simple if statements. Here is one for example: ![Yet another Clang analyzer error](https://i.stack.imgur.com/TJJB4.png) I suppose that this could be some bugs that were introduced in the latest version of checker that is causing these to show up as errors. Is there something else (some kind of build setting or issue with the scan-build script) that I could be missing here?
Clang static analyzer on iPhone app showing errors with latest version
CC BY-SA 2.5
0
2011-01-07T21:25:43.473
2011-01-08T19:09:44.157
null
null
36,984
[ "iphone", "objective-c", "clang-static-analyzer" ]
4,630,703
1
4,631,761
null
1
949
I currently have a LINQ statement that returns an IQueryable to be displayed into a Telerik RadGrid. This statement is set to pull Records that match the Period inputted, and also have the "Premium" Column set to true. It then selects the EmployeeID & ProjectID distinctly using the GroupBy property. These columns are then displayed in the RadGrid, along with a "PremiumCode" column. Currently my statement works to display ALL of the records that meet the top credentials (Employee Name, Project, Premium Code), but my end Goal is to . ``` public static IQueryable GetEmptyPremiums(string Period) { DataContext Data = new DataContext(); var PR = (from c in Data.System_Times where c.Period == Period && c.Premium == true orderby c.System_Employee.LName select c).GroupBy(s => s.EmployeeID & s.ProjectID).Select(x => x.FirstOrDefault()); return PR; } ``` Currently it is displaying properly, but every record is being displayed, not just the ones that require a PremiumCode. ![alt text](https://i.stack.imgur.com/7GQWn.png) Is there a way to re-work my LINQ statement to only include the records that a PremiumCode? Jay, I have tried to modify your solution to fit my needs, but unfortunately with no success. Records in the Premium table are not added until a Premium Code is defined, therefore there will never be a null "PremiumCode". To describe my end-goal a tad more clearly: I am looking to show the information in a grid like in the image above. The records shown will be the distinct Time records that have the bool value "Premium" checked as true but don't have a PremiumCode record in the Premium Table. If the checked record has a matching record in the Premium table (EmployeeID, and ProjectID ) then it a Premium Code set and will not need to be displayed in the Grid. If the checked record has no matching record in the Premium table (EmployeeID, and ProjectID ) then it a PremiumCode and will need to be displayed in the Grid. I believe this can be achieved with ".Any()" but I am having troubles aligning my Syntax and Logic to make this Grid display properly.
Distinct LINQ Statement - Select Group where Entity doesn't exist
CC BY-SA 2.5
null
2011-01-07T22:04:31.363
2011-01-10T22:14:38.820
2011-01-10T21:46:36.133
537,172
537,172
[ "c#", "sql", "linq", "radgrid" ]
4,630,829
1
4,632,196
null
1
663
I am creating a Cocoa application wherein one view will contain the "hex dump" of the currently loaded document. Up until this point, I have been using a bog-standard (and very unappealing) `NSTextField`, but I am now looking for something more powerful. I am a great fan of [0xED.app](http://www.suavetech.com/0xed/0xed.html) and would love to replicate its main "hex dump" view. How would I go about doing this? I'm not necessarily after the eye-candy, but the ability to select a range of bytes without also selecting the offset or text columns. I am a loss as to where I would even begin to implement this effectively. Surely this is not drawn upon a blank canvas? ![0xED screenshot](https://i.stack.imgur.com/DPTYZ.png)
Implementing custom NSView in Cocoa on OS X
CC BY-SA 2.5
null
2011-01-07T22:21:48.910
2014-03-12T00:23:47.063
2011-06-24T14:31:12.130
21,234
216,724
[ "cocoa", "custom-controls", "hexdump" ]
4,630,954
1
4,634,903
null
6
2,992
I have a simple Menu in a DockPanel. Here is the XAML: ``` <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <DockPanel> <Menu DockPanel.Dock="Top"> <MenuItem Name="file" Header="_File"> <MenuItem Name="exitMenuItem" Header="E_xit"/> </MenuItem> </Menu> <Grid> </Grid> </DockPanel> ``` Why does the Menu drop down to the left instead of the right of the window border like most applications? ![screenshot of Window](https://i.stack.imgur.com/jcxaC.png)
WPF Menu displays to the left of the window
CC BY-SA 2.5
0
2011-01-07T22:44:21.307
2019-01-21T23:05:53.077
null
null
36,693
[ "wpf", "xaml", "menu" ]
4,631,021
1
4,631,041
null
10
20,450
Hy,.. ![alt text](https://i.stack.imgur.com/J4rKt.png) Thanks..!
How to set transparent background of JDialog
CC BY-SA 2.5
0
2011-01-07T22:53:16.980
2014-12-22T17:52:04.650
2011-09-07T08:09:58.950
714,968
1,333,276
[ "java", "swing", "background", "transparency", "translucency" ]
4,631,137
1
null
null
5
42,098
Does anyone know how to set the JRE values from the below dialog via a registry key ? nothing obvious in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment (or where the heck these values are stored ?) We have to set the command line memory allocation for our users and they have difficulty typing the arguments, hitting return and the clicking OK. I was figuring just create a SetCmdArgs.rgs file and have them use regedit to set the values. from "C:\Program Files\Java\jre6\bin\javacpl.exe" on XP from "C:\Program Files (x86)\Java\jre6\bin\javacpl.exe" on Win7 ![alt text](https://i.stack.imgur.com/3Lhqc.png) Thanks, Craig
java settings via registry in windows client
CC BY-SA 2.5
0
2011-01-07T23:13:19.443
2011-01-08T00:36:03.983
null
null
138,331
[ "registry", "java" ]
4,631,425
1
4,631,450
null
13
1,676
I have this form I am building that renders perfectly in Chrome and FF, but in IE, is completely mis-aligned. What it should look like: Image: ![alt text](https://i.stack.imgur.com/vNwFQ.png) HTML: ``` <!--image upload bit--> <div class="portlet-content"> <div class="logoInfo"> <h3><strong>Large Logo</strong></h3> <p>Width: 160px, Height: 20px | image will be resized automatically</p> </div> <div class="imageUploadLogo noLogo"><img id="agencyLogo" src="images/logo_silhouette.png" width="170px" height="32px"></div> <a href="helper/uploadpic.php?lightbox[width]=360&lightbox[height]=140&lightbox[iframe]=1" class="lightbox"><div id="logo_uploada">Upload</div></a> </div> <div class="clearfix"></div> <hr></hr> <!--//image upload bit--> <!--office upload bit--> <div class="portlet-content"> <div class="logoInfo"> <h3><strong>Office Image</strong></h3> <p>Width: 160px, Height: 120px | image will be resized automatically</p> </div> <div class="imageUploadPhoto noPhoto"><img id="agencyLogo" src="images/office_silhouette.png" width="160px" height="120px"></div> <a href="helper/uploadpic.php?lightbox[width]=360&lightbox[height]=140&lightbox[iframe]=1" class="lightbox"><div id="logo_uploada">Upload</div></a> <div class="extraInfo"> <h3><strong>Photo of your office</strong></h3> <p>Image must be actual photograph of your office</p> </div> </div> <div class="clearfix"></div> <hr></hr> <!--//office upload bit--> <h3><strong>Office Description</strong> limited to 1000 characters ( no HTML tags )</h3> <div class="field2"><label for="description">Office Description</label> <textarea class="resizable" id="officeDesc" rows="7" cols="50" name="description"></textarea> </div> <div class="clearfix"></div> ``` CSS: As requested, this is what it looks like in IE: ![alt text](https://i.stack.imgur.com/mkx7w.png)
Vertical alignment of elements overlapping in IE
CC BY-SA 4.0
0
2011-01-08T00:03:15.960
2018-08-06T15:34:32.410
2018-05-07T21:09:16.817
490,720
501,173
[ "css", "internet-explorer" ]
4,631,767
1
null
null
0
43
In the chrome developer tools here, ![alt text](https://i.stack.imgur.com/qkwZH.png) You can double click and edit these properties, After editing, if I want my chrome extension to change 'padding-left' to 16px I use this line: ``` $('.tsf-p').css('padding-left', '16px'); ``` What code would I use to change the position field to inherit?
How to implement temporary edits
CC BY-SA 2.5
null
2011-01-08T01:20:25.473
2011-01-08T02:01:15.650
null
null
565,877
[ "javascript", "google-chrome-extension", "google-chrome-devtools" ]
4,631,798
1
4,631,823
null
11
5,432
I am building a multi-language site with one of the languages "farsi": Everything worked fine so far, but the right to left language "farsi/persian" is not aligned right, when beginning a next line of text. That means the next line is not aligned at the right as usual for right-to-left languages. The translation work. ``` gettext = lambda s: s #default language should be german LANGUAGE_CODE = 'de' #LANGUAGE_CODE = 'en' #LANGUAGE_CODE = 'fa' LANGUAGES = ( #('fr', gettext('French')), ('de', gettext('German')), ('en', gettext('English')), ('fa', gettext('Farsi')), #('pt-br', gettext("Brazil")), ) ``` ``` {% load localeurl_tags %} {% load i18n %} {% load tabs %} {% for lang in LANGUAGES %} {% ifequal lang.0 LANGUAGE_CODE %} <li class="active"><a>{{ lang.1 }}</a></li> {% else %} <!-- {% if LANGUAGE_BIDI %} <li>The current language is bidirectional</li> {% else %} <li>The current language is <b>not</b> bidirectional</li> {% endif %} --> <li class="{% ifactivetab "en" %}active{% else %}inactive{% endifactivetab %}"><a href="{{ request.path|chlocale:lang.0 }}" accesskey="2">{{ lang.1 }}</a></li> {% endifequal %} {% endfor %} ``` in the I also load: ``` {% load i18n %} {% get_current_language as LANGUAGE_CODE %} {% get_available_languages as LANGUAGES %} {% get_current_language_bidi as LANGUAGE_BIDI %} ``` My file for "farsi/persian" language looks like: ![alt text](https://i.stack.imgur.com/EuD18.jpg) How can I manage this? After defining a new css class "article_right_aligned_language" with the attribute "text-align:right; direction:rtl" and modifying my base template as follows, it works now !! ``` <div {% if LANGUAGE_BIDI %} class="article_right_aligned_language" {% else %} class="article" {% endif %}> {% block site_wrapper %}{% endblock %} </div> ```
django right-to-left language with LANGUAGE_BIDI does not work
CC BY-SA 4.0
0
2011-01-08T01:28:08.113
2021-10-29T10:32:03.487
2021-10-29T10:32:03.487
7,313,175
775,132
[ "django", "internationalization", "multilingual" ]
4,631,887
1
null
null
0
3,108
yes another problem with this scroll bar alright so I started the website over again that was mentioned [here](https://stackoverflow.com/questions/4590658/html-css-website-showing-a-scroll-bar-which-doesnt-go-anywhere) and I am having problems with this scroll bar again alright so all I have is a single image in a div tag ``` <div align="center" id="SuggestionBox"> <a href="?PageN=2"><img src="images/SuggestionBox.jpg"/></a> </div> ``` this code displays right but when I make the browser window small enough that the full image can not be seen it doesn't give me a scroll bar see the whole image hopefully this makes sense I am using firefox EDIT: I tried overflow:scroll and it did not work this was the outcome ![](https://i.stack.imgur.com/uRTsQ.jpg) and this happened in the middle of the page I also tried 'overflow:scroll' on the body of the page through css and all it did was show disabled scroll bars that did not change no matter the size of the browser also some people are a bit confused so this picture might help ![](https://i.stack.imgur.com/HcWSr.jpg) notice how the image is not fully shown well, I want there to be scroll bars in case the user wants to see the whole image but they're not appearing also here is all my css code: ``` body { background-image:url("images/background.jpg"); } a:hover { color:#FF0000; } table { background-color:#FFFFFF; } #SuggestionBox { position:relative; right:375px; } ``` ## thanks Good get it?
Css aligning/scroll bar problem
CC BY-SA 2.5
null
2011-01-08T01:48:11.507
2011-01-12T01:08:41.150
2017-05-23T11:48:22.880
-1
null
[ "css", "firefox", "xhtml", "scrollbar" ]
4,631,961
1
4,632,331
null
1
324
I have some `th` elements with text in them that should be centered and they also contain images: ![alt text](https://i.stack.imgur.com/8lQgb.jpg) The up/down arrow graphic is a separate image. `th` I'm open to using jQuery/JavaScript if there's a reasonably simple way to do it. One caveat: I need the up/down graphic to be a separate image, not part of the header background. ``` <th> Title <img src='/images/sort_unsorted.jpg' /> </th> ```
How can I have centered text and right-aligned image in the same element?
CC BY-SA 2.5
null
2011-01-08T02:07:11.130
2011-01-08T09:33:51.557
null
null
42,595
[ "javascript", "html", "css" ]
4,631,996
1
4,633,521
null
0
189
When I rotate the iPhone, I set the redview to this : Also, I set the rootViewController to hidden already... ``` [appDelegate.myRootViewController.tabBarController.tabBar setHidden:YES]; redView.frame = CGRectMake(0, 0, 480, 320); ``` But seems that the tabbarcontroller still cover the redView,ow can I resolve it? Thank you. (I also try to set the tabbarcontroller's view to other position, but the redview still can't show in the whole screen, thank you.![alt text](https://i.stack.imgur.com/kIQyA.png))
How to let the red UIView cover the whole screen, expect from the navigation bar & status bar
CC BY-SA 2.5
null
2011-01-08T02:16:52.197
2011-01-08T10:51:59.133
null
null
148,956
[ "iphone", "objective-c", "landscape" ]
4,632,011
1
4,632,029
null
0
1,552
I have a dashboard in which I'd like a scrolling ticker. (We'll know if the UI sucks or not once it's been running on the wall for a while.) Because this is a specific purpose dashboard, we can assume a recent WebKit in our markup and use even the latest CSS3 markup if it's implemented. This is some exemplary markup, but we're free to change it as needed, although I'd prefer to keep it relatively semantic if possible: ``` <div class="ticker"> <div class="itemDiv"> <img src="x"> <div class="itemBodyDiv"> <span>Upper Box</span> <span>Lorem ipsum dolor sit amet</span> <span>Lower Box has longer text</span> </div> </div> </div> ``` This is the layout I'd like to achieve: ![wireframe layout of ideal ticker markup](https://i.stack.imgur.com/rg8qE.jpg) The outer solid black line is a `div`. The dashed line is a `div` that represents an individual item in the ticker. Items will scroll right-to-left using `-webkit-marquee`. The main body of the ticker item is the lorem ipsum text, which needs `overflow-x` set to cause the marquee behavior. The main body should be `text-align: middle`. The problem I'm having is in finding suitable CSS markup to describe the position of the Upper Box and Lower Box. I've tried several permutations of `display: inline` and `inline-block` that didn't work. They either ruined the marquee behavior or moved the main body over. It seems that they need to be pulled out of the normal box model, but can't be `absolute` since they wouldn't have the marquee behavior. It seems like there should be some sort of relative positioning that is outside of the box model flow that doesn't preserve normal flow spacing that would handle cases like this, but I'm not finding it amid the many drafts of the many revisions of CSS and certainly not among the cargo cult of Google search results. By request, this is my current non-working CSS at the state of my last experiment: ``` .itemDiv { display: inline; vertical-align: middle; } .itemDiv > img { margin: 10px 10px 10px 30px; vertical-align: middle; height: 48px; width: 48px; /* border: 1px solid red; */ } .itemBodyDiv { display: inline; vertical-align: middle; } .itemDiv span:nth-child(1) { font-size: small; clear:left; vertical-align: top; color: green; } .itemDiv span:nth-child(2) { font-size: x-large; vertical-align: middle; color: white; } .itemDiv span:nth-child(3) { font-size: smaller; vertical-align: bottom; color: gray; } ``` Any suggestions?
CSS markup for scrolling ticker
CC BY-SA 2.5
null
2011-01-08T02:22:56.937
2011-01-08T02:35:13.037
2011-01-08T02:35:13.037
104,267
104,267
[ "webkit", "css" ]
4,632,044
1
4,659,193
null
6
12,724
I was using Xcode this afternoon and debugging an app on my device just fine. When I got home from the office and plugged in my phone to keep working, XCode would no longer let me debug on my device. The error I received was: ``` Error Starting Executable. No provisioned iOS device is connected. ``` So I hopped over to the Organizer, and here is what I saw: ![alt text](https://i.stack.imgur.com/QN1cY.png) So what gives? Anyone seen this before? Thanks!
Xcode - No provisioned iOS device is connected
CC BY-SA 2.5
0
2011-01-08T02:37:56.420
2011-10-01T02:30:17.457
2011-01-08T03:24:08.810
171,206
256,324
[ "iphone", "xcode" ]
4,632,098
1
4,632,148
null
0
234
I've had a fair search of some help, but I'm having a real load of trouble wrapping my head around this. Basically I want to collapse an EntityCollection down into a String to display it with the related record in a single row of a gridview, but I've no idea how, or if it's even the best thing to do. My entity diagram (see below); I want to grab objects from loom_Charms, however many meet the criteria, displaying with each a flattened string of loom_CharmCosts, loom_charmMinimums, pretty much all of the *-Many relationships there, and shove them all in a gridview. Having spent hours trying to fiddle around to see if there's a better way, I'm giving up and asking for help" ![http://i55.tinypic.com/nud06.png](https://i.stack.imgur.com/C922v.png)
Linq to ADO Entity query
CC BY-SA 3.0
0
2011-01-08T02:59:14.787
2011-11-28T07:02:02.510
2011-11-28T07:02:02.510
234,976
567,723
[ "c#", "asp.net", "ado.net", "linq-to-entities" ]
4,632,159
1
4,632,269
null
4
6,842
I've already achieved this on my iPhone app, but I want to know if it's possible on an HTML page, maybe using CSS effects or similar. ![alt text](https://i.stack.imgur.com/0oFUH.png) As you can see, the current view is split, the bottom part is moved down, and another view is revealed underneath. I have a page I'd like to try this on. Any ideas if this is possible, and any specifics as to how I can do it? I'm new to HTML coding, so please take it easy on me. :) Thanks in advance!
How to split page and reveal stuff underneath?
CC BY-SA 2.5
0
2011-01-08T03:24:48.373
2012-05-01T13:08:43.380
null
null
456,851
[ "javascript", "html", "css" ]
4,632,174
1
4,632,685
null
14
5,928
My usual method of 100% contrast and some brightness adjusting to tweak the cutoff point usually works reasonably well to clean up photos of small sub-circuits or equations for posting on E&R.SE, however sometimes it's not quite that great, like with this image: ![alt text](https://i.stack.imgur.com/2ebl1.png) What other methods besides contrast (or instead of) can I use to give me a more consistent output? I'm expecting a fairly general answer, but I'll probably implement it in a script (that I can just dump files into) using ImageMagick and/or PIL (Python) so if you have anything specific to them it would be welcome. Ideally a better source image would be nice, but I occasionally use this on other folk's images to add some polish.
What processing steps should I use to clean photos of line drawings?
CC BY-SA 2.5
0
2011-01-08T03:31:19.803
2019-08-23T13:49:42.687
null
null
194,586
[ "image-processing", "imagemagick", "python-imaging-library" ]
4,632,449
1
4,671,965
null
2
1,185
What would be pseudo code algorithm fo projecting a parallelogram (2d array of (RGB) points) into a triangle (2d array of (RGB) points) (in my particular case a Rectangle into a Right Triangle with same side size (isosceles) and in my case Hypotenuse is same size that has biggest side of a Rectangle) qualyty may be lost. So how to perform such thing in pseudocode? So generally we had for example 300x200 ![alt text](https://i.stack.imgur.com/8ClOT.jpg) We eant to distort it into 150 height and 200 width triangle with fireworks CS5 - not correct result for me ![alt text](https://i.stack.imgur.com/pef4d.jpg) With photoshop CS5 correct result ![alt text](https://i.stack.imgur.com/khLtO.jpg) So I wonder what would be pseudocode for transformations photoshop does?
Where to get pseudo code algorithm for projecting a RGB parallelogram into an RGB triangle
CC BY-SA 2.5
0
2011-01-08T05:03:42.917
2015-03-03T12:37:23.033
2015-03-03T12:37:23.033
1,118,321
434,051
[ "algorithm", "geometry", "pseudocode", "projection" ]
4,632,471
1
4,632,985
null
0
1,956
In a string grid I turned on goEditing so that the user doesn't have to click to get into the editor. Now when they right click then get the pop-up below, rather than my MouseDown event being called. Is there a way to turn off this behavior? ![alt text](https://i.stack.imgur.com/TtqZA.jpg)
In StringGrid, goEditing prevents the MouseDown event from firing
CC BY-SA 2.5
0
2011-01-08T05:12:06.060
2011-01-08T07:52:34.717
null
null
246,057
[ "delphi" ]
4,632,860
1
null
null
1
5,140
In my iPhone App In table view cell I want to dispaly one main title and 5 subtitlessubtitles suppose item1 as main title and item2 , item3 , item4 , item5 and item6 as subtitles, for that i have saperate two arrays for passing the values in table view cell one for cell.textLabel.text= second for cell.detailTextLabel.text ![alt text](https://i.stack.imgur.com/h8WRr.png) now I want the flexibility to make item2 as maintitle and want to add item1 to subtitle ![alt text](https://i.stack.imgur.com/pviL5.png) How can I set title and subtitle programmatically from single array? and any of them as Please Help and Suggest, Thank You.
iphone how to customize UITableViewCell cell.textlabel and cell.detailtextlabel programmatically
CC BY-SA 2.5
0
2011-01-08T07:13:52.183
2011-01-08T11:06:49.957
null
null
531,783
[ "iphone", "objective-c", "cocoa-touch", "ios4", "uitableview" ]
4,633,161
1
4,633,204
null
0
1,157
Suppose I have markup as setup [http://jsfiddle.net/ADxne/](http://jsfiddle.net/ADxne/) Currently drop downs look like ![](https://imgur.com/NBm0H.jpg) ![](https://imgur.com/m6RZT.jpg) To solve the 1st problem, I could add a `margin-top` to child ul's to compensate for padding in list items [http://jsfiddle.net/ADxne/1/](http://jsfiddle.net/ADxne/1/) ``` .horMenu > li > ul { margin-top: 10px; } ``` but for the 2nd problem without a fixed width list or list items, is there a way to position the sub menu to the right of the list item? Or is the only way to set a fixed width? [http://jsfiddle.net/ADxne/2/](http://jsfiddle.net/ADxne/2/)
CSS/Menu: How to position element right below/beside elements
CC BY-SA 2.5
null
2011-01-08T08:50:00.130
2011-01-08T09:04:09.887
null
null
292,291
[ "css" ]
4,633,167
1
4,633,254
null
0
435
![alt text](https://i.stack.imgur.com/P958X.png) I have a tab control: ``` <TabControl IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding}" ItemTemplate="{StaticResource ClosableTabItemTemplate}" > </TabControl> ``` I want to set the style of only the 1st tab item to some style. Normally, I can do it using this way, ``` <TabControl> <TabItem Style="{StaticResource SomeStyle}"> </TabItem> <TabItem> </TabItem> </TabControl> ``` But this isn't possible as the tab items are generated from an ItemsSource. If needed, here is the TabControl ItemTemplate: ``` <DataTemplate x:Key="TabItemTemplate"> <DockPanel> <ContentPresenter Content="{Binding Path=VMName}" VerticalAlignment="Center" HorizontalAlignment="Center"/> </DockPanel> </DataTemplate> ```
Style only 1 tab of a tab control binded to an itemsource
CC BY-SA 2.5
null
2011-01-08T08:52:28.753
2011-01-08T09:29:47.927
null
null
504,310
[ "c#", ".net", "wpf" ]
4,633,532
1
null
null
0
1,315
I'm trying to create a custom date widget. Users can only chose a date from the next 10 days. So, instead of making them chose year, month, day, hours and minutes I want to have a single select list for the date (next 10 days) and two select lists for the time (hours and minutes). Here is what I'm trying to achieve: ![customdate widget](https://i.stack.imgur.com/gRrKl.png) [http://i52.tinypic.com/jikrv7.png](http://i52.tinypic.com/jikrv7.png) This is not just about changing date field settings (like granularity), I'm pretty sure I'll have to write some code to have correct dates in the select list (there could be 5 days from the current month and 5 days from the next one), and then correctly handle everything after user submits data. What's the best way to achieve this? Where should I start from? I would greatly appreciate any suggestions. Thank you!
Drupal: Custom date widget?
CC BY-SA 3.0
null
2011-01-08T10:57:14.870
2011-12-02T08:29:51.390
2011-12-02T08:29:51.390
234,976
567,944
[ "drupal", "datefield" ]
4,634,024
1
4,634,191
null
5
2,179
Is it possible to to make a `GroupBox` that looks like the image below? If it is not possible with the native controls are there any free, custom controls that might support this? ![alt text](https://i.stack.imgur.com/ZkfBY.png)
How to create a custom non-rectangular GroupBox?
CC BY-SA 2.5
null
2011-01-08T13:12:25.280
2011-01-08T14:09:02.037
2011-01-08T14:09:02.037
770
null
[ "c#", "winforms", "visual-studio-2010", "user-interface", "user-controls" ]
4,634,415
1
4,634,440
null
6
419
I have the following situation, pictured is the theoretical inheritance graph of my classes: ![Inheritance Graph](https://i.stack.imgur.com/jT9rk.png) The idea is basically to 1) have two abstract base classes that can be implemented on different platforms (in my case two different operating systems) 2) allow BBase to be up-castable to ABase to be able to handle both equally at times (e.g. to hold instances of both types in one list). 3) implement certain common functionality in ABase and BBase. Now, what would be the best way to represent this in C++? Even though it does support multiple inheritance, multi-level inheritence like this is not possible to my knowledge. The problem is that B inherits from A and BBase, which both in turn inherit from ABase. Simply translating this 1:1 (following code) in C++, a C++ compiler (GNU) will complain that ABase::foo() is not implemented in B. ``` class ABase { public: virtual void foo() = 0; void someImplementedMethod() {} }; class BBase : public ABase { public: virtual void bar() = 0; void someOtherImplementedMethod() {} }; class A : public ABase { public: A() {} void foo() {} }; class B : public A, public BBase { public: B() : A() {} void bar() {} }; int main() { B b; return 0; } ``` How would you change this inheritance model to make it compatible to C++? Inverted arrows in diagram and corrected "down-castable" to "up-castable".
Interface-like inheritance in C++
CC BY-SA 2.5
0
2011-01-08T14:51:57.133
2011-01-08T16:41:00.067
2011-01-08T16:41:00.067
222,873
222,873
[ "c++", "inheritance", "gcc", "g++", "abstract-class" ]
4,634,438
1
4,650,378
null
3
2,480
My navigation controller's navigation bar won't change the height when rotated to landscape. ![alt text](https://i.stack.imgur.com/b5S2I.png) see it stays at 44 pixels instead of 34 i think. What do i do to fix this?
UINavigationController's navigation bar wont shrink when in Landscape mode
CC BY-SA 2.5
null
2011-01-08T14:56:07.837
2011-01-10T18:58:45.410
null
null
546,476
[ "iphone", "uinavigationcontroller", "uinavigationbar", "landscape" ]
4,634,435
1
4,634,516
null
2
157
![alt text](https://i.stack.imgur.com/OtXMW.png) what is wrong with ratio? (100,200) [https://chart.googleapis.com/chart?cht=p&chd=t:100,200&chs=300x120&chl=Hello|World](https://chart.googleapis.com/chart?cht=p&chd=t:100,200&chs=300x120&chl=Hello%7CWorld)
google charts wrong paint?
CC BY-SA 2.5
0
2011-01-08T14:55:46.570
2011-01-08T15:15:15.850
2011-01-08T15:01:54.687
89,806
395,034
[ "google-visualization" ]
4,634,931
1
4,941,387
null
1
1,057
I create dinamically a chart for a website. I have a key/value map, I sort the values descending, and then create the url: ``` http://chart.googleapis.com/chart? chs=400x200&cht=bhs&chbh=a&chdlp=l&chg=25,0&chma=0,0,0,5&chtt=Chart+test& chxr=0,0,8,1&chds=0,8&chxt=t,y& chd=t:8,5,3& chxl=1:|Label_8|Label_5|Label_3 ``` ![Chart](https://i.stack.imgur.com/00tzR.png) The values are set by `chd=t:8,5,3`, and the labels are set by `chxl=1:|Label_8|Label_5|Label_3`. However, in the chart image the labels are reversed. I searched the documentation, but I didn't get why it is like this. Is it because I didn't set a value correctly, or is this the desired functionality? I could reverse the label texts in `chxl` from code to be displayed how I want. Is this the right way?
Google Charts: Bar chart labels are reversed
CC BY-SA 2.5
null
2011-01-08T16:46:34.397
2011-02-09T04:45:41.930
null
null
137,483
[ "google-visualization" ]
4,635,003
1
4,639,640
null
3
2,722
I'm starting out with the Pyramid framework and trying to run this inside of Eclipse. My run configuration is: `/home/ben/env/bin/paster` `serve /home/ben/dev/python/pyramid/firstPyramid/first/development.ini` This virtualenv paster will serve `development.ini` fine from the command line. However, running this in eclipse gives: ``` [Invalid file specified for console output: ] Traceback (most recent call last): File "/home/ben/env/bin/paster", line 8, in <module> load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')() File "/home/ben/env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 84, in run invoke(command, command_name, options, args[1:]) File "/home/ben/env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 123, in invoke exit_code = runner.run(args) File "/home/ben/env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 218, in run result = self.command() File "/home/ben/env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py", line 276, in command relative_to=base, global_conf=vars) File "/home/ben/env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py", line 313, in loadapp **kw) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 203, in loadapp return loadobj(APP, uri, name=name, **kw) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 223, in loadobj global_conf=global_conf) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadcontext global_conf=global_conf) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 270, in _loadconfig return loader.get_context(object_type, name, global_conf) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 397, in get_context global_additions=global_additions) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 492, in _pipeline_app_context APP, pipeline[-1], global_conf) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 401, in get_context section) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 423, in _context_from_use object_type, name=use, global_conf=global_conf) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 353, in get_context global_conf=global_conf) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadcontext global_conf=global_conf) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 277, in _loadegg return loader.get_context(object_type, name, global_conf) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 553, in get_context object_type, name=name) File "/home/ben/env/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 573, in find_egg_entry_point pkg_resources.require(self.spec) File "/home/ben/env/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 666, in require File "/home/ben/env/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 565, in resolve pkg_resources.DistributionNotFound: MyProject ``` I also have PyDev using the python interpreter of the virtualenv setup. Any ideas what may be the issue? Here is a screenshot: ![screen capture](https://i.stack.imgur.com/vuE4t.png)
Eclipse / PyDev running a pyramid development.ini issue "pkg_resources.DistributionNotFound:"
CC BY-SA 3.0
null
2011-01-08T17:02:15.083
2013-05-11T19:04:52.607
2013-05-11T19:04:52.607
1,014,938
208,754
[ "python", "eclipse", "pylons", "pydev", "pyramid" ]
4,635,668
1
4,635,736
null
1
1,651
This is a problem I at first didn't thought was so problematic, and perhaps it aint, but I haven't found a solution yet. I've tried a few different approaches but didn't really get the correct solution. I've tried to show in this picture. ![](https://i.stack.imgur.com/9Pnor.png) 1. When the topic is short, the comment count should follow after directly. 2. When the topic is longer, it should be cut (hidden) and the comment count should only take up as much width as it has to. 3. The above should work even when the comment count is longer/shorter. Hope this is clear enough. Thanks for any inputs!
CSS: Dynamic adjust of width depending on content
CC BY-SA 2.5
0
2011-01-08T19:19:32.380
2011-01-08T19:37:09.113
2011-01-08T19:20:47.963
106,224
568,257
[ "css", "width" ]
4,635,823
1
4,637,531
null
1
272
Will it capture desctop ![alt text](https://i.stack.imgur.com/4WTln.jpg) for me on all platforms if I'll port my windows VS 2008 console app code into Qt app compatable code (I have a console app so I hope it will not be a big trobule to port it into Qt console app)?
Qt development lib and crossplatform screen capturing is it true?
CC BY-SA 2.5
null
2011-01-08T19:55:45.060
2011-01-09T03:31:52.123
null
null
434,051
[ "c++", "visual-studio", "visual-studio-2008", "qt", "console-application" ]
4,636,125
1
4,642,530
null
1
358
On the enclosed screenshot is floated list with one item with long description, which pushes first item on next line one position to the right. I don't want that. Is there some trick/css directive/layout, that will push the next line lower, so the line can be filled and all the items will be in one line? I can generate `clear: left;` on every (n/3)+1-child, but I think there is some pure CSS solution, just can't seem to find it anywhere today. I'm tired and somewhat slow today. Thank you. Edit: I also obviously don't make sense today. This is what I want: The `li` with the photo of people sitting on the bench on the bottom should be right under the first one, but isn't, because the first item has too long text. SCREENSHOT: ![Screenshot](https://i.stack.imgur.com/YbdGQ.png) HTML: ``` <ul id="photos"> <li> <a href=".."> <img src=".." alt="" height="160" width="160"/><br> Vianočný koncert - Zohor 2009 <span class="nr">61</span> </a></li> <li> <a href=".."> <img src=".." alt="" height="160" width="160"/><br> Koleda 2009 <span class="nr">1</span> </a></li> <li> <a href=".."> <img src=".." alt="Advent 2009" height="160" width="160"/><br> Čejkovice 2009 <span class="nr">15</span> </a></li> <li> <a href=".."> <img src=".." alt="" height="160" width="160"/><br> Marianka 2009 <span class="nr">6</span> </a></li> </ul> ``` CSS: ``` #photos li { display:block; float:left; position:relative; } #photos li a { text-decoration:none; display:block; padding:10px 10px 20px; cursor:pointer; width:160px; text-align:center; } #photos li a img { cursor:pointer; display:inline-block; } ```
Problem with CSS floated lists - one long item 'filling two rows'
CC BY-SA 2.5
null
2011-01-08T21:02:22.140
2011-01-09T23:26:34.043
2011-01-08T21:17:14.097
240,239
240,239
[ "css", "css-float" ]
4,636,250
1
null
null
0
87
Please see pic, this is what I want to do. I am really struggling to bloody do it lol. ![alt text](https://i.stack.imgur.com/CVqjA.png) The master div, is 600px wide ( blue bg ) and need splitting into two areas, left for the image and right for the text etc. Ignore the vertical divider line The left hand div, is approx 200px wide, and need to specify a min-height of 100px, as the placeholder image which is centered to that div 50% 50% will change size, as I will be adding another div like this with larger image placeholder. The right part contains the header tag, description, button and second description. I have already constructed this and works fine in chrome and ff, but not in ie. So could you guys have a think, and give me some code that complies in all browsers. It is officially doing my head in now. Screenpic of it working in ff and chrome below: ![alt text](https://i.stack.imgur.com/JGzGi.png)
css help , to create div
CC BY-SA 2.5
null
2011-01-08T21:28:15.177
2011-01-08T23:23:25.557
null
null
501,173
[ "css" ]
4,636,474
1
4,636,505
null
5
3,119
I'm building an Android app on which I have to represent data in a Table-like format. So I'm using TableLayout. The problem is that I have to draw a rotated string like in the following raw example: ![alt text](https://i.stack.imgur.com/l969b.jpg) How can I create my layout to be able to show the '2011' rotated?
Layout problem with Android: rotated TextView
CC BY-SA 4.0
0
2011-01-08T22:19:23.793
2020-07-10T20:27:41.060
2020-07-10T20:27:41.060
13,363,205
339,500
[ "android", "textview" ]
4,636,412
1
null
null
0
1,583
Hallo All, I have a ListView, which kontains a RadioGroup and a Button in each row. The ListView works well. Now i want to add a header to the ListView, to get the effect like the address book. I fund a Java Class from the Internet, which looks like this: ``` package com.aiquan.android.wljs_ncre3_free; import java.util.LinkedHashMap; import java.util.Map; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.Adapter; import android.widget.ArrayAdapter; import android.widget.BaseAdapter; public class SeparatedListAdapter extends BaseAdapter { public final Map<String, Adapter> sections = new LinkedHashMap<String, Adapter>(); public final ArrayAdapter<String> headers; public final static int TYPE_SECTION_HEADER = 0; public SeparatedListAdapter(Context context) { headers = new ArrayAdapter<String>(context, R.layout.list_header); } public void addSection(String sectionHeader, Adapter sectionAdapter) { this.headers.add(sectionHeader); this.sections.put(sectionHeader, sectionAdapter); } public Object getItem(int position) { for (Object section : this.sections.keySet()) { Adapter adapter = sections.get(section); int size = adapter.getCount() + 1; // check if position inside this section if (position == 0) return section; if (position < size) return adapter.getItem(position - 1); // otherwise jump into next section position -= size; } return null; } public int getCount() { // total together all sections, plus one for each section header int total = 0; for (Adapter adapter : this.sections.values()) total += adapter.getCount() + 1; return total; } public int getViewTypeCount() { // assume that headers count as one, then total all sections int total = 1; for (Adapter adapter : this.sections.values()) total += adapter.getViewTypeCount(); return total; } public int getItemViewType(int position) { int type = 1; for (Object section : this.sections.keySet()) { Adapter adapter = sections.get(section); int size = adapter.getCount() + 1; // check if position inside this section if (position == 0) return TYPE_SECTION_HEADER; if (position < size) return type + adapter.getItemViewType(position - 1); // otherwise jump into next section position -= size; type += adapter.getViewTypeCount(); } return -1; } public boolean areAllItemsSelectable() { return false; } public boolean isEnabled(int position) { return (getItemViewType(position) != TYPE_SECTION_HEADER); } // @Override public View getView(int position, View convertView, ViewGroup parent) { int sectionnum = 0; for (Object section : this.sections.keySet()) { Adapter adapter = sections.get(section); int size = adapter.getCount() + 1; // check if position inside this section if (position == 0) return headers.getView(sectionnum, convertView, parent); if (position < size) return adapter.getView(position - 1, convertView, parent); // otherwise jump into next section position -= size; sectionnum++; } return null; } // @Override public long getItemId(int position) { return position; } } ``` I try to use this class (without any change) to solve my problem. But i got a very strange effect: the part with RadioGroup and Buttons are not displayed, but the part with Strings are displayed correctly! And i got no error messages from Eclipse. Here is my code: ``` SeparatedListAdapter adapter = new SeparatedListAdapter(this); adapter.addSection("Header 1", new ArrayAdapter<String>(this, R.layout.list_item, new String[] { "First item", "Item two" })); adapter.addSection("Header 2", new ExerciseAdapter(this, R.layout.sc_for_exam, n_exercises)); adapter.addSection("Header 3", new ArrayAdapter<String>(this, R.layout.list_item, new String[] { "lala", "lolo" })); setListAdapter(adapter); ``` n_exercises ist an ArrayList, which contains the List Items(each list item contains a RadioGroup and a Button). ExerciseAdapter extends from ArrayAdapter. Now i got this effect: ![alt text](https://i.stack.imgur.com/X66hP.png) Does anybody know what is wrong and how i can solve this problem? Thank you very much!! Here is the code of ExerciseAdapter. They are in the same class like the code above. ``` private class ExerciseAdapter extends ArrayAdapter<Exercise_SC> { public ExerciseAdapter(Context context, int textViewResourceId, ArrayList<Exercise_SC> exes) { super(context, textViewResourceId, exes); } public View getView(final int position, View convertView, ViewGroup parent) { View row = convertView; SC_ViewWrapper wrapper; RadioGroup rg; if (row == null) { LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); if (ChooseMode_Act.modeInfo.equalsIgnoreCase("Training")) { row = vi.inflate(R.layout.sc_for_training, parent, false); } else { row = vi.inflate(R.layout.sc_for_exam, parent, false); } wrapper = new SC_ViewWrapper(row); row.setTag(wrapper); rg = wrapper.getRadioGroup(); RadioGroup.OnCheckedChangeListener l = new RadioGroup.OnCheckedChangeListener() { // @Override public void onCheckedChanged(RadioGroup group, int checkedId) { Integer myPosition = (Integer) group.getTag(); Exercise_SC eRow = getExerciseRow(myPosition); eRow.setCheckedRB(checkedId); switch (checkedId) { case R.id.RB_A: n_exercises.get(myPosition).setCustomerAnswer("A"); break; case R.id.RB_B: n_exercises.get(myPosition).setCustomerAnswer("B"); break; case R.id.RB_C: n_exercises.get(myPosition).setCustomerAnswer("C"); break; case R.id.RB_D: n_exercises.get(myPosition).setCustomerAnswer("D"); break; default: n_exercises.get(myPosition).setCustomerAnswer(""); } } }; rg.setOnCheckedChangeListener(l); } else { wrapper = (SC_ViewWrapper) row.getTag(); rg = wrapper.getRadioGroup(); } Exercise_SC myExe = getExerciseRow(position); int size = ChooseMode_Act.size; wrapper.getTi().setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); wrapper.getTVExer().setText(myExe.getExerciseText()); wrapper.getTVExer().setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); wrapper.getA().setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); wrapper.getTVA().setText(myExe.getAnswerA()); wrapper.getTVA().setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); wrapper.getB().setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); wrapper.getTVB().setText(myExe.getAnswerB()); wrapper.getTVB().setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); wrapper.getC().setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); wrapper.getTVC().setText(myExe.getAnswerC()); wrapper.getTVC().setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); wrapper.getD().setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); wrapper.getTVD().setText(myExe.getAnswerD()); wrapper.getTVD().setTextSize(TypedValue.COMPLEX_UNIT_DIP, size); wrapper.getImageView().setImageResource(myExe.getImageSrc()); if (ChooseMode_Act.modeInfo.equalsIgnoreCase("Training")) { wrapper.getButton().setOnClickListener(new OnClickListener() { // @Override public void onClick(View v) { Toast toast = Toast.makeText( getApplicationContext(), "题-" + (position + 1) + ": " + n_exercises.get(position) .getCorrectAnswer(), Toast.LENGTH_SHORT); toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0); toast.show(); } }); } rg.setTag(new Integer(position)); rg.check(myExe.getCheckedRB()); return row; } } ```
Android: SeperatedList (How to get address book effect?)
CC BY-SA 2.5
null
2011-01-08T22:07:01.927
2012-10-26T22:05:13.577
2011-01-08T23:13:11.087
353,857
353,857
[ "android", "listview", "addressbook" ]
4,637,121
1
4,637,130
null
1
2,930
Hey I hope you can help me. I am trying to center a number in a css3-div. I am using this: ``` border:2px solid #333333; padding:1px; -moz-border-radius:10px; -webkit-border-radius:10px; -o-border-radius:10px; -khtml-border-radius:10px; border-radius:10px; background-color: #fff; height: 25px; width: 25px; ``` and it gives me this: ![](https://i.stack.imgur.com/sW5IH.png) How do I center it also with a single-digit charachter? many thanks!
how to center a character in a css3 div with rounded borders
CC BY-SA 3.0
null
2011-01-09T01:03:41.860
2015-01-20T00:42:23.070
2015-01-20T00:42:23.070
402,884
535,779
[ "html", "css", "rounded-corners" ]
4,637,361
1
4,637,865
null
5
1,317
I'm getting a tiny rounded corner effect that I'd like to get rid of. In [this example](http://jsfiddle.net/pdLsN/), look for the effect in the red circle. Here's a zoom in of the effect: ![alt text](https://i.stack.imgur.com/HBVF1.png) I seem to recall a while back reading an article on just this problem. Anyone have a link to that article? Otherwise, any good ways to get rid of the halo? It is being caused because the `dl` has all four corners rounded. This allows the bottom of the `dl` to be rounded. The `dt` sits over the `dl` and has its `top left` and `top right` corners rounded. But there is a slight overflow of the `dl` curve behind the `dt` curve, causing the halo. [My solution](http://jsfiddle.net/pdLsN/2/) is to increase the border-radius of the `dl` so that it is hidden behind the `dt` corner. But it seems like a hack and adds a fair amount more CSS. I'm wondering if there is a better solution. Here it is without the halo: ![alt text](https://i.stack.imgur.com/ugpvN.png)
Best way to remove CSS rounded-corner halo?
CC BY-SA 2.5
null
2011-01-09T02:41:10.243
2011-01-14T14:17:18.370
2011-01-09T03:07:14.787
220,599
220,599
[ "css", "rounded-corners" ]
4,637,378
1
6,220,014
null
4
3,089
In TextMate 1.5.10 r1623, you get little arrows that allow you to fold method blocks: ![alt text](https://i.stack.imgur.com/mbcBX.png) Unfortunately, if you have a multi-lined Python comment, it doesn't recognize it, so you can't fold it: ``` def foo(): """ How do I fold these comments? """ print "bar" ``` TextMate has this on their site on how to customize folding: [http://manual.macromates.com/en/navigation_overview#customizing_foldings](http://manual.macromates.com/en/navigation_overview#customizing_foldings) ...but I'm not skilled in regex enough to do anything about it. TextMate uses the [Oniguruma](http://www.geocities.jp/kosako3/oniguruma/) regex API, and I'm using the default Python.tmbundle updated to the newest version via GetBundles. Does anyone have an idea of how to do this? Thanks in advance for your help! :) --- Adding the default `foldingStartMarker` and `foldingStopMarker` regex values for Python.tmbundle under the Python Language in Bundle Editor: ``` foldingStartMarker = '^\s*(def|class)\s+([.a-zA-Z0-9_ <]+)\s*(\((.*)\))?\s*:|\{\s*$|\(\s*$|\[\s*$|^\s*"""(?=.)(?!.*""")'; foldingStopMarker = '^\s*$|^\s*\}|^\s*\]|^\s*\)|^\s*"""\s*$'; ```
How do you enable block folding for Python comments in TextMate?
CC BY-SA 2.5
0
2011-01-09T02:45:39.800
2011-06-02T20:29:13.640
2011-01-09T14:55:45.063
153,040
153,040
[ "python", "comments", "textmate", "block", "folding" ]
4,637,599
1
4,637,658
null
1
1,528
I want to create a textbox which contents are validated every time the text in it changes. And an image is displayed beside the textbox if it is correct and another image shows up if its not correct. Pretty much like ajax. Heres the method which I called from the class. ``` Public Sub read1() cmd.CommandText = "SELECT * FROM testdb WHERE Name='" & name & "'" Try rdr = cmd.ExecuteReader Dim n As String If rdr.HasRows Then n = rdr("Name").ToString Form1.PictureBox1.Image = Image.FromFile("C:\wamp\www\Dropbox\Public\Check-icon.png") Else Form1.PictureBox1.Image = Image.FromFile("C:\wamp\www\Dropbox\Public\Delete-icon.png") End If Catch ex As Exception ``` And here the event which calls for the method: ``` Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged x.name = TextBox1.Text x.read1() End Sub End Try End Sub ``` Problem is, the method seems to be only called once. And the first image that was displayed stays the same even after inputting a data which does not exist in the database. I'm connecting this program to a mysql database using odbc. Can you help me determine whats the problem and how to fix it? Heres the screenshot: ![alt text](https://i.stack.imgur.com/uptZm.png)
vb.net data reader using text change event
CC BY-SA 2.5
null
2011-01-09T03:54:11.873
2011-01-09T21:46:20.653
null
null
225,269
[ "mysql", "vb.net" ]
4,638,287
1
4,638,791
null
1
400
While trying to use the Bing API to search, I am getting characters that are not printable and do not seem to hold any extra information. The goal is to save the XML (UTF-8) response as a text file to be parsed later. My code currently looks something like this: ``` URL url = new URL(queryURL); BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream())); BufferedWriter out = new BufferedWriter(new FileWriter(query+"-"+saveResultAs)); String str = in.readLine(); out.write(str); in.close(); out.close(); ``` When I send the contents of 'str' to console it looks something like this: ![alt text](https://i.stack.imgur.com/Ekl5B.png) and here's a what the newly created local XML file looks like: ![alt text](https://i.stack.imgur.com/87EaY.png) What should I be doing to convert the UTF-8 text so that str does not have the extra characters?
Discard unprintable characters returned in server's XML response
CC BY-SA 2.5
null
2011-01-09T08:14:40.770
2011-01-09T14:13:52.870
null
null
111,950
[ "java", "xml", "utf-8", "bing-api" ]
4,638,317
1
4,741,998
null
7
6,136
Could somebody try to implement given animation into WebGL shader example? It would be great for people learing WebGL like myself. ![alt text](https://i.stack.imgur.com/JPEPN.gif) Source: [http://dvdp.tumblr.com/post/2664387637/110109](http://dvdp.tumblr.com/post/2664387637/110109)
How to implement this rotating spiral in WebGL?
CC BY-SA 2.5
0
2011-01-09T08:24:57.640
2011-04-12T02:29:00.650
null
null
94,411
[ "javascript", "shader", "webgl" ]
4,638,362
1
4,638,659
null
7
669
If I need `#element-one` to be above `#element-two`, `#element-two` to be above `#element-three`, and `#element-three` to be above `#element-one`, is there any way to do this with CSS? Any other way? ![alt text](https://i.stack.imgur.com/fKT9B.jpg)
Is there any way to do a z-index circle?
CC BY-SA 2.5
0
2011-01-09T08:40:30.807
2011-01-09T11:47:37.703
null
null
126,329
[ "css" ]
4,638,477
1
4,638,501
null
0
175
I'm struggling to convert my select query into a update query, it has aliases.. ``` Update pads set RemoveMeDate = '1999-01-01 00:00:00' where padid in ( SELECT old_table.padid FROM `jules-fix-reasons`.`pads` AS old_table JOIN `jules`.`pads` AS new_table ON old_table.padid = new_table.`PadID` WHERE new_table.RemoveMeDate <> '2001-01-01 00:00:00' AND old_table.RemoveMeDate = '2001-01-01 00:00:00') ``` I've tried removing the aliases, but that doesn't help :( EDIT - Richard, screen shot ![alt text](https://i.stack.imgur.com/2wpWt.png)
How do I workaround this error ? You can't specify target table my table for update in FROM clause
CC BY-SA 2.5
null
2011-01-09T09:19:42.613
2011-01-09T10:02:06.093
2011-01-09T09:59:14.953
450,456
450,456
[ "mysql" ]
4,638,498
1
4,640,892
null
1
3,988
How to retrieve the particular row of detailsview into textbox on page load event if details view defaultmode is readonly ![alt text](https://i.stack.imgur.com/ygMAj.png) i want to retrieve the email id from detailsview email row in textbox1 on page load event ?
How to retrieve the particular row of detailsview into textbox on page load event if details view defaultmode is readonly
CC BY-SA 2.5
null
2011-01-09T09:26:06.797
2012-04-04T17:38:03.660
2011-01-09T09:31:17.360
522,211
522,211
[ "asp.net", "vb.net" ]
4,638,500
1
4,653,165
null
90
15,329
When I run git blame on a file (using msysgit) I always get the following sort of printout: ``` 00000000 (Not Committed Yet 2011-01-09 11:21:30 +0200 1) package co 00000000 (Not Committed Yet 2011-01-09 11:21:30 +0200 2) { 00000000 (Not Committed Yet 2011-01-09 11:21:30 +0200 3) impor 00000000 (Not Committed Yet 2011-01-09 11:21:30 +0200 4) impor 00000000 (Not Committed Yet 2011-01-09 11:21:30 +0200 5) impor 00000000 (Not Committed Yet 2011-01-09 11:21:30 +0200 6) impor 00000000 (Not Committed Yet 2011-01-09 11:21:30 +0200 7) impor ``` i.e. it shows all lines as Not Yet Committed. I tried this on many files, that have many commits - always the same results. I also tried using relative/full path, but it seems to make no difference. When I try to use TortoiseGit's blame it always shows every line as being last committed at the first commit: ![alt text](https://i.stack.imgur.com/c4p9p.png) even thought, as I've said, there are actually tens of commits in the history of these files.. Ideas? - - -
Git blame showing no history
CC BY-SA 2.5
0
2011-01-09T09:26:33.520
2022-03-15T21:07:31.567
2020-05-27T11:24:26.180
123,671
11,208
[ "git", "windows-subsystem-for-linux", "msysgit", "blame" ]
4,638,513
1
4,639,325
null
1
3,928
I have this Flex 4.5 (Burrito) Mobile project: ![alt text](https://i.stack.imgur.com/Fxb6H.png) It consists of 2 files - the TextXML.mxml: ``` <?xml version="1.0" encoding="utf-8"?> <s:MobileApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="spark.components.*" firstView="views.Home"> </s:MobileApplication> ``` and the Home.mxml with 1 Button, 1 List and 1 HTTPService: ``` <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="spark.components.*" title="Home"> <fx:Script> <![CDATA[ import mx.collections.*; import mx.events.*; import mx.rpc.events.*; import mx.utils.*; import spark.events.*; [Bindable] public var myColl:XMLListCollection = new XMLListCollection(); public function srvResult(event:ResultEvent):void { trace(ObjectUtil.toString(event.result)); myColl.source = event.result.pref.user.money; myList.dataProvider = myColl; } public static function myLabelFunc(item:Object):String { return item.yw; } public static function myMessageFunc(item:Object):String { return item.max; } ]]> </fx:Script> <fx:Declarations> <s:HTTPService id="httpSrv" url="http://preferans.de/user-xml.php?id=OK123195454365" resultFormat="e4x" result="srvResult(event)" fault="trace(event.fault.message)" /> </fx:Declarations> <s:navigationContent> <s:Button label="Load XML" click="httpSrv.send()"/> </s:navigationContent> <s:List id="myList" top="0" bottom="0" left="0" right="0" dataProvider="{myColl}"> <s:itemRenderer> <fx:Component> <s:MobileIconItemRenderer labelFunction="Home.myLabelFunc" messageFunction="Home.myMessageFunc" > </s:MobileIconItemRenderer> </fx:Component> </s:itemRenderer> </s:List> </s:View> ``` When I run my app in the debugger (so that I can see the trace output in the console) and click the "Load XML" button, then I see that XML data is loading ok from [my PHP script](http://preferans.de/user-xml.php?id=OK123195454365): ``` <pref> <user id="OK123195454365" first_name="Dmitry" city="Moscow" money="8815" medals="1"> <money yw="2011-01" max="8815" user="8815"/> <money yw="2010-52" max="6380" user="1545"/> <money yw="2010-51" max="8797" user="2094"/> <money yw="2010-50" max="8446" user="2080"/> </user> </pref> ``` But the List unfortunately stays empty. I have a feeling that a minor thing is missing here, maybe an event should be sent to the List? I've tried reassigning its dataProvider as you can see above, but it doesn't help me... Thank you! Alex
Flex Hero: Loading XML data works, but List is not updated
CC BY-SA 2.5
0
2011-01-09T09:31:00.387
2011-12-07T15:42:11.133
null
null
165,071
[ "xml", "apache-flex", "mobile", "dataprovider" ]
4,638,554
1
4,641,069
null
9
1,322
I'm trying to implement a version of the [Fuzzy C-Means algorithm](http://en.wikipedia.org/wiki/Cluster_analysis#Fuzzy_c-means_clustering) in Java and I'm trying to do some optimization by computing just once everything that can be computed just once. This is an iterative algorithm and regarding the updating of a matrix, the membership matrix `U` (the sum of the values in a row must be 1.0), this is the update rule I want to optimize: ![alt text](https://i.stack.imgur.com/wH3Gt.png) where the x are the element of a matrix `X` () and v belongs to the matrix `V` (). And `m` is a parameter that ranges from `1.1` to `infinity` and `c` is the number of clusters. The distance used is the euclidean norm. If I had to implement this formula in a banal way I'd do: ``` for(int i = 0; i < X.length; i++) { int count = 0; for(int j = 0; j < V.length; j++) { double num = D[i][j]; double sumTerms = 0; for(int k = 0; k < V.length; k++) { double thisDistance = D[i][k]; sumTerms += Math.pow(num / thisDistance, (1.0 / (m - 1.0))); } U[i][j] = (float) (1f / sumTerms); } } ``` In this way some optimization is already done, I precomputed all the possible squared distances between `X` and `V` and stored them in a matrix `D` but that is not enough, since I'm cycling througn the elements of `V` two times resulting in two nested loops. Looking at the formula the numerator of the fraction is independent of the sum so I can compute numerator and denominator independently and the denominator can be computed just once for each pixel. So I came to a solution like this: ``` int nClusters = V.length; double exp = (1.0 / (m - 1.0)); for(int i = 0; i < X.length; i++) { int count = 0; for(int j = 0; j < nClusters; j++) { double distance = D[i][j]; double denominator = D[i][nClusters]; double numerator = Math.pow(distance, exp); U[i][j] = (float) (1f / (numerator * denominator)); } } ``` Where I precomputed the denominator into an additional column of the matrix `D` while I was computing the distances: ``` for (int i = 0; i < X.length; i++) { for (int j = 0; j < V.length; j++) { double sum = 0; for (int k = 0; k < nDims; k++) { final double d = X[i][k] - V[j][k]; sum += d * d; } D[i][j] = sum; D[i][B.length] += Math.pow(1 / D[i][j], exp); } } ``` By doing so I encounter numerical differences between the 'banal' computation and the second one that leads to different numerical value in `U` (not in the first iterates but soon enough). I guess that the problem is that exponentiate very small numbers to high values (the elements of `U` can range from 0.0 to 1.0 and `exp` , for `m = 1.1`, is `10`) leads to very small values, whereas by dividing the numerator and the denominator and exponentiating the result seems to be better numerically. The problem is it involves much more operations. Some values I get at `ITERATION 0`: This is the first row of the matrix `D` not optimized: `384.6632 44482.727 17379.088 1245.4205` This is the first row of the matrix `D` the optimized way (note that the last value is the precomputed denominator): `384.6657 44482.7215 17379.0847 1245.4225 1.4098E-26` This is the first row of the `U` not optimized: `0.99999213 2.3382613E-21 2.8218658E-17 7.900302E-6` This is the first row of the `U` optimized: `0.9999921 2.338395E-21 2.822035E-17 7.900674E-6` `ITERATION 1`: This is the first row of the matrix `D` not optimized: `414.3861 44469.39 17300.092 1197.7633` This is the first row of the matrix `D` the optimized way (note that the last value is the precomputed denominator): `414.3880 44469.38 17300.090 1197.7657 2.0796E-26` This is the first row of the `U` not optimized: `0.99997544 4.9366603E-21 6.216704E-17 2.4565863E-5` This is the first row of the `U` optimized: `0.3220644 1.5900239E-21 2.0023086E-17 7.912171E-6` The last set of values shows that they are very different due to a propagated error (I still hope I'm doing some mistake) and even the constraint that the sum of those values must be 1.0 is violated. Am I doing something wrong? Is there a possible solution to get both the code optimized and numerically stable? Any suggestion or criticism will be appreciated.
Java code optimization leads to numerical inaccuracies and errors
CC BY-SA 2.5
0
2011-01-09T09:44:35.247
2011-01-09T21:58:25.703
2011-01-09T21:58:25.703
120,261
370,158
[ "java", "algorithm", "optimization", "math", "numerical-stability" ]
4,638,594
1
4,638,629
null
0
164
This is a screenshot of my db when I execute this query ``` INSERT INTO Products(CategoryID, TypeID, BarCode, ArtNumber, ProductName, Price, SelfPrice, PriceWithOutAWD, UnitsInStock, Comment) VALUES('9', '1', '23', '23', 'kut', '20.29', '18.29', '19.10', '23', '19') ``` it shows such error > Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Products_Type1". The conflict occurred in database "AcidDB", table "dbo.Type", column 'ID'. The statement has been terminated. ![alt text](https://i.stack.imgur.com/4wMjk.jpg)
SQL Server PK problem
CC BY-SA 2.5
null
2011-01-09T09:56:40.017
2011-01-09T10:11:02.087
2011-01-09T10:06:00.120
2,660
508,284
[ "sql", "sql-server", "sql-server-2008-r2" ]
4,638,998
1
null
null
2
5,474
I have QTreeWidget like this ![enter image description here](https://i.stack.imgur.com/jX9hd.jpg) What should i do to get value from selected row and filename column ? I have current selected item ``` item = self.ui.files_treewidget.currentItem() ``` but how to access to specific cell?
Python PYQT QTreeWidgetItem selected cell
CC BY-SA 3.0
0
2011-01-09T12:01:35.193
2013-07-05T10:05:19.050
2013-07-05T10:05:19.050
77,595
568,740
[ "python", "pyqt", "qtreewidget", "qtreewidgetitem", "treewidget" ]
4,639,013
1
4,639,221
null
0
421
i have written a program to search value from google every thing works fine but first time when page is loaded then i encounter error.after words if i click any link it is working fine no errors further. ![alt text](https://i.stack.imgur.com/loawC.jpg) Code is as follow ``` private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { string raw = "http://www.google.com/search?hl=en&q={0}&aq=f&oq=&aqi=n1g10"; string search = string.Format(raw, HttpUtility.UrlEncode(searchTerm)); //string search = "http://www.whatismyip.com/"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(search); using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.ASCII)) { browserA = reader.ReadToEnd(); this.Invoke(new EventHandler(IE1)); } } } ```
Getting error when compiled Http webrequest
CC BY-SA 2.5
null
2011-01-09T12:05:09.120
2011-01-09T13:01:26.027
null
null
430,167
[ "c#", "httpwebrequest" ]
4,639,207
1
5,791,319
null
10
17,348
I want to change the height of an NSWindow titlebar. Here are some examples: ![alt text](https://i.stack.imgur.com/C2SeI.png) And… ![alt text](https://i.stack.imgur.com/QpVbu.png) I could use an NSToolbar, but the problem is that I can't place views very height (For example: I can't place the segmentedControl higher than in the picture because there is still the titlebar) ![alt text](https://i.stack.imgur.com/K95qo.png) If I remove the titlebar I can't place a NSToolbar and the window isn't movable. Have you any ideas?
How to change the height of an NSWindow titlebar?
CC BY-SA 2.5
0
2011-01-09T12:56:43.853
2017-01-16T03:02:41.897
null
null
239,936
[ "cocoa", "macos", "nswindow" ]
4,639,224
1
4,639,759
null
0
730
I have a NSView with a NSTableView inside of it. If the view looks like this: ![Window before size](https://i.stack.imgur.com/SPuM9.png) And the size & position properties for the Scollview (and tableview) look like this: ![Inspector](https://i.stack.imgur.com/QzoXK.png) Then why when I resize the view, does it look like this: ![Window after size](https://i.stack.imgur.com/TOhVG.png) Are my autosizing properties not set correctly? To my understanding they should be?
NSView controls not resizing?
CC BY-SA 2.5
null
2011-01-09T13:02:44.850
2011-01-09T15:31:35.103
null
null
127,853
[ "cocoa", "nsview", "autosize" ]
4,639,319
1
4,640,085
null
0
441
The Javascript below has a default image, but I would like display text "only text url" for this link instead of this button at this link [http://developer.mixi.co.jp/wp-content/uploads/2010/09/bt_check_1.gif](http://developer.mixi.co.jp/wp-content/uploads/2010/09/bt_check_1.gif) that this script defaults to. Is this possible? ![](https://i.stack.imgur.com/SlFZt.gif) ``` <div> <a href="http://mixi.jp/share.pl" class="mixi-check-button" data-key="some-data-key" data-url="http://someurl.com">only text url </a> <script type="text/javascript" src="http://static.mixi.jp/js/share.js"></script> </div> ```
How to stop Javascript from showing default image and only text for link?
CC BY-SA 2.5
null
2011-01-09T13:24:26.557
2011-01-10T13:31:41.887
2011-01-09T15:44:26.333
313,758
567,954
[ "javascript", "html" ]
4,639,372
1
7,588,465
null
46
130,801
I am dynamically generating a div which is like : ``` <div id='PrintDiv'> <table id="mainTable"> <tr> <td> Col1 </td> <td> Col2 </td> <td> Col3 </td> </tr> <tr> <td> Val1 </td> <td> Val2 </td> <td> Val3 </td> </tr> <tr> <td> Val11 </td> <td> Val22 </td> <td> Val33 </td> </tr> <tr> <td> Val111 </td> <td> Val222 </td> <td> Val333 </td> </tr> </table> </div> ``` And there are lot more elements on the page as well. Now, how can i get a csv file like this : ``` Col1,Col2,Col3 Val1,Val2,Val3 Val11,Val22,Val33 Val111,Val222,Val333 ``` using jQuery ? need a file save dailog box too,like this : ![alt text](https://i.stack.imgur.com/Mr3Tl.png) Thanks.
Export to csv in jQuery
CC BY-SA 2.5
0
2011-01-09T13:31:41.540
2020-09-06T00:03:15.237
2014-08-07T18:16:54.367
237,838
368,472
[ "javascript", "asp.net", "jquery", "csv" ]
4,639,387
1
4,639,431
null
1
843
![alt text](https://i.stack.imgur.com/xmdLa.png)Hello all. After a good long Sunday google I am going to have to hang my head in shame and ask the question... What I have is a pivot vector2, a "Previous" vector2 and a "Current" vector2. I would like to be able to calculate the rotation in radians between them. A slight complication is the fact that the pivot may moved between previous and current but ill deal with the offsetting as a separate issue if you don't have the time to bring that into the fold. To clarify, an object which has two vectors, a pivot and a base ... the pivot sitting in the centre and the base at the bottom is rotated around an external pivot. I need to work out the rotation of the object itself around its centre using the two mentioned vectors. Very big thanks to anyone that can help. I have a game where an object is rotated around an external pivot. By using using two points (one in the centre, one at the base of the object) I am wanting to to work out the rotation that needs to be applied to the objects sprite around its centre to conform to the larger rotation that has been applied.
Calculate rotation between two Vector2s around a pivot
CC BY-SA 2.5
null
2011-01-09T13:33:34.163
2011-01-09T13:46:27.437
2011-01-09T13:46:27.437
414,284
414,284
[ "c#", "xna", "rotation", "xna-4.0" ]
4,639,476
1
4,641,118
null
1
7,337
I have this jqGrid: ``` $("#report").jqGrid( { url: '/py/db?coll=report', datatype: 'json', height: 250, colNames: ['ACN', 'Status', 'Amount'], colModel: [ {name:'acn', sortable:true}, {name:'meta.status', sortable:true}, {name:'amount'} ], caption: 'Show Report', rownumbers: true, gridview: true, rowNum: 10, rowList: [10,20,30], pager: '#report_pager', viewrecords: true, sortname: 'acn', sortorder: "desc", altRows: true, loadonce: true, mtype: "GET", rowTotal: 1000, jsonReader: { root: "rows", page: "page", total: "total", records: "records", repeatitems: false, id: "acn" } }); ``` Notice that the column 'meta.status' is in JSON dot notation and accordingly the data sent from the server is like this: ``` {"page": "1", "total": "1", "records": "5", "rows": [ {"acn":1,"meta": {"status":"Confirmed"}, "amount": 50}, {"acn":2,"meta": {"status":"Started"}, "amount": 51}, {"acn":3,"meta": {"status":"Stopped"}, "amount": 52}, {"acn":4,"meta": {"status":"Working"}, "amount": 53}, {"acn":5,"meta": {"status":"Started"}, "amount": 54} ] } ``` The problems are of two fold: - - ![alt text](https://i.stack.imgur.com/ftUiH.png)
jqGrid Sort or Search does not work with columns having json dot notation
CC BY-SA 3.0
0
2011-01-09T13:48:22.787
2017-08-16T03:22:37.553
2017-08-16T03:22:37.553
2,370,483
172,854
[ "javascript", "json", "syntax", "jqgrid" ]
4,640,076
1
4,640,217
null
4
807
I am trying to find out why when creating an UIButton in interface builder - a memory leak occurs when running the instruments application by xcode. This is how I created the memory leak. I opened a new application, opened up the myAppViewController.xib file in interface builder. I changed the background to black. Added a UIButton, renamed it to "foo" title. saved and then exit. In the myAppViewController.h file i have the following ``` #import <UIKit/UIKit.h> @interface miPlanNewViewController : UIViewController { IBOutlet UIButton *tasksProjects; } @property(nonatomic, retain) IBOutlet UIButton *tasksProjects; @end ``` in the myAppViewController.m file i have the following: ``` #import "miPlanNewViewController.h" @implementation miPlanNewViewController @synthesize tasksProjects; ... //the normal methods you get ... - (void)dealloc { [super dealloc]; } @end ``` Here is a screen shot of what I am getting at the moment in instruments. ![alt text](https://i.stack.imgur.com/RHa1g.png) ![alt text](https://i.stack.imgur.com/Ff5Ay.png) One thing i notice however.... I haven't connected the Outlet to the uibutton yet in interface builder, BUT when I delete the UIButton from interface builder, save, and then run the program with instruments again, I dont get any sort of leaks at all. Can someone please explain what is happening and how I can solve this issue. Thank you.
instruments: memory leak when creating UIButton
CC BY-SA 2.5
null
2011-01-09T15:50:08.453
2011-01-09T16:18:18.410
null
null
445,312
[ "iphone", "memory-leaks", "uibutton", "instruments", "iboutlet" ]
4,640,146
1
4,640,164
null
1
12,205
I am trying to publish my site on remote server. My hosting provider has provided my with dsn connectivity through dotnetpanel. When i publish my site i get the error as shown in screenshot. I have also included my web.config file. ![alt text](https://i.stack.imgur.com/En2G9.png) My web.config is as follows, ``` <?xml version="1.0" encoding="UTF-8"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <appSettings> <add key="myDSN" value="evodsn"/> </appSettings> <connectionStrings> <add name="evocon" connectionString="DSN=myDSN;" /> </connectionStrings> <system.net> <mailSettings> <smtp> <network host="smtp.gmail.com" /> </smtp> </mailSettings> </system.net> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <httpHandlers> <!--<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/>--> <add verb="*" path="TinyMCEHandler.aspx" type="Moxiecode.TinyMCE.Web.HttpHandler, Moxiecode.TinyMCE" validate="false" /> <add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" /> </httpHandlers> <httpRuntime requestValidationMode="2.0" /> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /></assemblies> </compilation> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <globalization uiCulture="en" culture="en-GB" /> <authentication mode="Forms"> <forms loginUrl="~/Account.mvc/index" timeout="2880" protection="All" /> </authentication> <membership defaultProvider="evocon"> <providers> <clear /> <add name="evocon" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="evocon" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" /> </providers> </membership> <profile> <providers> <clear /> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" applicationName="/" /> </providers> </profile> <roleManager enabled="false"> <providers> <clear /> <add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers> </roleManager> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace.--> <customErrors mode="Off"> <error statusCode="403" redirect="NoAccess.htm"/> <error statusCode="404" redirect="FileNotFound.htm"/> </customErrors> <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"> <namespaces> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="System.Linq" /> <add namespace="System.Collections.Generic" /> <add namespace="Telerik.Web.Mvc.UI" /> </namespaces> </pages> </system.web> <!-- The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS. --> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules runAllManagedModulesForAllRequests="true"> </modules> <handlers> <remove name="MvcHttpHandler" /> <remove name="UrlRoutingHandler" /> <add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </handlers> <directoryBrowse enabled="false" /> <defaultDocument> <files> <clear /> <add value="Default.aspx" /> <add value="Default.asp" /> <add value="Default.php" /> <add value="Default.htm" /> <add value="Default.html" /> <add value="Index.aspx" /> <add value="Index.asp" /> <add value="Index.php" /> <add value="Index.htm" /> <add value="Index.html" /> <add value="parking.htm" /> </files> </defaultDocument> </system.webServer> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> <location path="App_Data" allowOverride="false"> <system.web> <authorization> <allow users="?" /> </authorization> </system.web> </location> </configuration> ```
Keyword not supported: 'dsn'
CC BY-SA 2.5
0
2011-01-09T16:02:33.237
2011-01-09T16:09:18.493
null
null
326,010
[ "asp.net", "sql-server", "asp.net-mvc", "deployment", "dsn" ]
4,640,289
1
4,640,302
null
2
338
Once have a look at the part of my GUI ![alt text](https://i.stack.imgur.com/9jN6c.jpg) Once a user selects a particular branch from the branch JComboBox, i have to query the database and get all the years applicable to that branch and add those years to the next JComboBox year and so forth. There is quite a bit of chance for the user to swap between his selection of branch, and i would find myself querying the database the same query again each time he changes his option, and it is highly unlikely that the data in the database is going to change in between these swapping.... So i decided that i store these in some data structure, what is the best choice i have for one such datastructure? there may be 2 to 3 different branches, 4 to 6 different years and so on..... What is my best choice?
What is the choice of best data structure for this situation..?
CC BY-SA 2.5
0
2011-01-09T16:32:05.063
2011-01-09T19:42:35.970
null
null
522,058
[ "java", "data-structures", "collections" ]
4,640,336
1
4,640,866
null
5
7,944
The VBA I'm trying to write is fairly simple but Ive never written VBA and coming from the visual studio & C# world, this truly is hell!! So I'll really be grateful for any help/pointers/hints here ![alt text](https://i.stack.imgur.com/JfuJE.jpg) So I have two important sheets. The Range sheet has 2 values per date. It needs a result, The Calc sheet takes two values and gets me a result. I want to Put the Current, and OneYear values into the Calc sheet and get the result into the result column. So I tried defining a UDF but I learned later I cannot modify sheet contents in a UDF. I tried recording a macro and then hoped to go from there, but I got something like this: ``` Range("A2").Select Sheets("24Feb05-24FEB10").Select Range("K9").Select ActiveCell.FormulaR1C1 = "=Calc!R[-8]C[-10]" Range("K9").Select ``` Im assuming R1C1 is Row and Column but why on earth does it say -8 and -10!?? Can someone get me in the right direction? Note: There are about 2000+ dates. Hope my question is clear! --- I'll clear up a few more things: Im simplifying the Calc sheet, in reality, it needs 5 values (there are columns upto SixYears) And then that sheet calls about 4 other sheets and does some finance calculations that some -tech-savvy guy wrote. I tried to get the finance guy to express to me in algebra what he's doing, so I could just write up a C# function. I also tried writing a UDF, but like I said it needs to in the values and get the result, which means the UDF will . ``` Function Func1(txt As Variant) As String //Returns the nth element from a delimited text string Dim txt As String txt = text Sheet4.Cells(1, 1) = txt Func1 = Sheet4.Cells(2, 1)//get the result value' End Function ``` Basically Im having a head ache learning/understand VBA syntax and the API. of how I would take values from one sheet into another and then get the some other values back? Maybe in a loop!?
using a sheet in an excel user defined function
CC BY-SA 2.5
0
2011-01-09T16:42:32.657
2011-04-20T17:59:49.103
2020-06-20T09:12:55.060
-1
368,070
[ "excel", "vba", "excel-2003", "user-defined-functions" ]