Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
sequence
2,902,507
1
null
null
0
792
I have an .xib file connected to a ViewController, which is init'ed as the root controller of an instance of UINavigationController in my appDelegate. In that view, I have a UISearchBar and a UITableView below it. When the view loads up, there's a navigationBar at the top, followed by a ~20 pixel gap, and then the UISearchBar, and the table beneath it: ![](https://imgur.com/tzUSf.png) My problem is that when I enter the UISearchBar to type something, the navigation bar disappears (which is fine), but the search box is all screwy: ![](https://imgur.com/D7GpG.png) I'm pretty new to this (a couple of weeks), so I'm not quite sure what's going on. Can anyone help me shed some light on this?
UISearchBar and UINavigationController
CC BY-SA 2.5
0
2010-05-25T06:36:59.420
2010-05-25T12:43:17.590
null
null
138,261
[ "objective-c", "cocoa-touch" ]
2,902,732
1
null
null
2
1,075
I want to display a array of objects in PropertyView/PropertySheet,just like this: ![alt text](https://farm4.static.flickr.com/3380/4638413938_fd21487d0a_o.jpg) How to do it? thx.
on Eclipse plug-in:how to implement such a property view?
CC BY-SA 2.5
0
2010-05-25T07:22:50.243
2011-03-26T19:29:25.947
2017-02-08T14:25:59.960
-1
347,744
[ "eclipse-plugin", "propertysheet" ]
2,906,516
1
2,911,650
null
2
2,691
I need some help defining the following object hierarchy/ database relationship in Hibernate From the object sense – Agent is inherited from Person and Agency is inherited from Organization. they are inherited from Party which can have multiple Addresses associated with it ![alt text](https://yuml.me/diagram/scruffy/class/%5BParty%5D%5E%5BOrganization%5D,%20%5BParty%5D%5E%5BPerson%5D,%20%5BOrganization%5D%5E%5BAgency%5D,%20%5BPerson%5D%5E%5BAgent%5D,%20%5BParty%5D-0..*%3E%5BAddress%5D) The database consists of
Hibernate subclass with foreign key relationships
CC BY-SA 2.5
0
2010-05-25T16:29:38.070
2010-05-26T09:30:00.217
2017-02-08T14:26:01.937
-1
251,946
[ "java", "hibernate", "inheritance", "mapping", "joined-subclass" ]
2,906,735
1
2,913,845
null
5
2,799
How can I use QLineEdit as a menu item in QMenu? Is there any solutions to do this? Just to do something like this (look at the edit box under the avatar): ![alt text](https://lh6.ggpht.com/_h3RFEuTDMC4/S8FxPFSEYFI/AAAAAAAACAo/4K0sK3r6ddY/Lucid.png)
QT and custom menu item (QLineEdit)
CC BY-SA 2.5
0
2010-05-25T17:00:30.303
2010-05-26T14:27:56.193
2017-02-08T14:26:02.290
-1
201,654
[ "qt", "qt4" ]
2,907,327
1
2,909,545
null
5
3,192
An interlinear gloss can be used to layout a translation of a document. [http://en.wikipedia.org/wiki/Interlinear_gloss](http://en.wikipedia.org/wiki/Interlinear_gloss) Usually this is done word-by-word or morpheme-by-morpheme. However, I would like to do this in a different way, translating entire paragraphs at a time. The following link and image is an example of what I want done, though I want to do it for a different text which is larger. [http://www.optimnem.co.uk/learning/spanish/three-little-pigs.php](http://www.optimnem.co.uk/learning/spanish/three-little-pigs.php) ![image three pigs](https://lh4.ggpht.com/_NlGxmxSBXvU/S_w_8dSKk4I/AAAAAAAAAfg/rm6FWndSmeY/s640/ThreePigs.png) For now I am not interested in taking into account the order of words or phrases that change order between languages. That is, I don't mind if the words in the paragraph are not aligned or if the length of one paragraph is much longer than the other, causing an overhanging line. As far as I can tell, the following packages do not meet my needs: ``` covingtn.sty cgloss4e.sty gb4e.sty lingmacros.sty - shortex ``` Here is the english version: ``` In the heart of the forest lived three little pigs who were brothers. The wolf always was chasing them in order to eat them. In order to escape the wolf, the pigs decided to make a house each. The smallest made his from straw, to finish first and go out to play. The middle one constructed a cottage from wood. Seeing that his little brother had finished already, he hurried to go and play with him. The oldest worked on his house of brick. 'You'll soon see what the wolf does with your houses,' he scolded his brothers but they were having a great time. ``` Here is the spanish version: ``` En el corazón del bosque vivían tres cerditos que eran hermanos. El lobo siempre andaba persiguiéndoles para comérselos. Para escapar del lobo, los cerditos decidieron hacerse una casa. El pequeño la hizo de paja, para acabar antes y poder irse a jugar. El mediano construyó una casita de madera. Al ver que su hermano perqueño había terminado ya, se dio prisa para irse a jugar con él. El mayor trabajaba en su casa de ladrillo. - Ya veréis lo que hace el lobo con vuestras casas - riñó a sus hermanos mientras éstos se lo pasaban en grande. ``` I want to do it manually like this: ``` \documentclass{article} \usepackage[margin=1in, paperwidth=8.5in, paperheight=11in]{geometry} \usepackage[utf8]{inputenc} \usepackage{url} \begin{document} \noindent \url{http://www.optimnem.co.uk/learning/spanish/three-little-pigs.php}\\ \\ \indent En el corazón del bosque vivían tres cerditos que eran hermanos. El lobo siempre\\ \indent In the heart of the forest lived three little pigs who were brothers. The wolf always\\ \\ % andaba persiguiéndoles para comérselos. Para escapar del lobo, los cerditos decidieron\\ was chasing them in order to eat them. In order to escape the wolf, the pigs decided to\\ \\ % hacerse una casa. El pequeño la hizo de paja, para acabar antes y poder irse a jugar.\\ make a house each. The smallest made his from straw, to finish first and go out to play.\\ \\ % El mediano construyó una casita de madera. Al ver que su hermano perqueño había\\ The middle one constructed a cottage from wood. Seeing that his little brother had\\ \\ % terminado ya, se dio prisa para irse a jugar con él. El mayor trabajaba en su casa de\\ finished already, he hurried to go and play with him. The oldest worked on his house of\\ \\ % ladrillo. - Ya veréis lo que hace el lobo con vuestras casas - riñó a sus hermanos\\ brick. 'You'll soon see what the wolf does with your houses,' he scolded his brothers\\ \\ % mientras éstos se lo pasaban en grande.\\ but they were having a great time.\\ \\ \end{document}\\ ``` I would like to use a package or a macro to automatically have the english and spanish texts interspersed with line breaks when the end of the line has been reached for each. How can I layout this simple dual-line biligual paragraph in Latex in a more automated way (without manually adding line breaks)?
Dual-line bilingual paragraph in LaTeX
CC BY-SA 2.5
0
2010-05-25T18:19:12.533
2019-07-27T15:07:45.353
2017-02-08T14:26:02.710
-1
255,312
[ "latex", "translation", "linguistics" ]
2,909,028
1
2,909,095
null
0
127
How much time, and what basic steps, are involved in integrating the Facebook's "Like This" feature into an existing e-commerce site? Let's say we are only interested in the feature at the product details level and have approximately 5 different product details areas. Thanks Edit: Pic for anti-ambiguity protection: ![alt text](https://imgur.com/mobPJ.png)
Facebook's "Like This" Feature - Time & Effort required to integrate with an existing e-commerce site?
CC BY-SA 4.0
0
2010-05-25T22:37:39.450
2022-10-06T04:40:50.140
2022-10-06T04:40:50.140
11,107,541
127,880
[ "facebook" ]
2,909,442
1
2,909,965
null
50
51,406
I'm trying to make ajax file upload . I read that it is not possible to do that without using `iframe` . I wrote : ``` <iframe id="uploadTrg" name="uploadTrg" height="0" width="0" frameborder="0" scrolling="yes"></iframe> <form id="myForm" action="file-component" method="post" enctype="multipart/form-data" target="uploadTrg"> File: <input type="file" name="file"> <input type="submit" value="Submit" id="submitBtn"/> </form> ``` and using jquery form plugin : ``` $('#myForm').ajaxForm({ dataType: 'json', success: function(data){ alert(data.toSource()); } }); ``` the file is uploaded successfully and I can see the uploaded file , but a dialog box appears : ![alt text](https://farm5.static.flickr.com/4065/4640629084_0842838e5f_o.png) since I send back a json result to display the file name + size etc .. How can I use the iFrame to be able to make " ajax file upload". Note: 1. I don't prefer to use special plugin to upload file , if there is more appropriate/easier solutions. 2. I use jsp/servlets as a server-side language .. but I think it does not make sense which language I use . Thanks
How to make Asynchronous(AJAX) File Upload using iframe?
CC BY-SA 2.5
0
2010-05-26T00:26:56.837
2016-06-07T18:13:24.953
2020-06-20T09:12:55.060
-1
183,524
[ "jquery", "ajax", "servlets", "file-upload" ]
2,910,017
1
2,910,031
null
64
1,955
We have a situation at work where developers working on a legacy (core) system are being pressured into using GOTO statements when adding new features into existing code that is already infected with spaghetti code. Now, I understand there may be arguments for using 'just one little GOTO' instead of spending the time on refactoring to a more maintainable solution. The issue is, this isolated 'just one little GOTO' isn't so isolated. At least once every week or so there is a new 'one little GOTO' to add. This codebase is already a horror to work with due to code dating back to or before 1984 being riddled with GOTOs that would make many [Pastafarians](http://en.wikipedia.org/wiki/Pastafarian) believe it was inspired by the Flying Spaghetti Monster itself. Unfortunately the language this is written in doesn't have any ready made refactoring tools, so it makes it harder to push the 'Refactor to increase productivity later' because short-term wins are the only wins paid attention to here... Has anyone else experienced this issue whereby everybody agrees that we cannot be adding new GOTOs to jump 2000 lines to a random section, but continually have Anaylsts insist on doing it just this one time and having management approve it? How can one go about addressing the issue of developers being pressured (forced) to continually add GOTO statements (by add, I mean add to jump to random sections many lines away) because it 'gets feature in quicker'? I'm beginning to fear we may lose valuable developers to the raptors over this... ![Credit: XKCD](https://imgs.xkcd.com/comics/goto.png) `here` `alsoThere:` No, I'm talking about the kind of goto that jumps 1000 lines out of one subroutine into another one mid way into a while loop. `somewhereClose` `there:` I wasn't even talking about the kind of gotos you can reasonably read over and determine what a program was doing. `alsoThere` `somewhereClose:` This is the sort of code that makes meatballs `midpoint:` `nextpoint` `detail:`(each one almost completely different) `pointlessReturn` `here:` In this question, I was not talking about the occasionally okay use of a goto. Goto `there` `tacoBell:` and it has just gone back to the drawing board. `Jail` `elsewhere:` When it takes Analysts weeks to decypher what a program is doing each time it is touched, something is deeply wrong with your codebase. In fact, I'm actually up to my `hell:` `4` rendition of the spec `detail` `pointlessReturn:` `tacoBell` `Jail:` Actually, just a small update with a small victory. I spent 4 hours refactoring a portion of this particular program a single label at a time, saving each iteration in svn as I went. Each step (about 20 of them) was smallish, logical and easy enough to `bypass` `nextpoint:` spontaneously jump out of your meal and onto you screen through some weird sort of spaghetti-meatball magnetism. `elseWhere` `bypass:` reasonably verify that it should not introduce any logic changes. Using this new more readable version, I've sat down with the analyst and completed almost all of this change now. `end` `4:` first *if first time here goto `hell`, no second `hell`, no third `hell` fourth `hell` `end:`
Being pressured to GOTO the dark-side
CC BY-SA 2.5
0
2010-05-26T04:13:47.647
2010-07-18T21:03:31.117
2017-02-08T14:08:04.917
-1
153,407
[ "legacy", "goto" ]
2,915,087
1
2,915,189
null
2
4,250
I have a few sites that have SSL Certificates installed. When an SSL request is made with my employer's iPhone, this error message is displayed: > Accept Website CertificateThe certificate for this website is invalid. Tap Accept to connect to this website anyway. I've pulled up the same pages in other browsers, including Safari, and they do not show any issues with the certs. These two URLs exhibit the problem: 1. https://www.powerlunchbunch.com/index.php?template=join&nav=20 2. https://www.councilonagingmartin.org/index.php?template=donate&nav=257 --- 1. Both SSL certs are issued by Network Solutions 2. The sites are hosted on Rackspace Cloud Sites --- I now have an open ticket with Rackspace for this issue. I browsed the same sites in Firefox 4.0 Beta 7, and got this warning page, telling me that "The certificate is not trusted because no issuer chain was provided.": ![Firefox 4.0 Beta 7 SSL Chain Cert Warning](https://i.stack.imgur.com/XMQiG.png)
iPhone SSL Website Certificate Warning
CC BY-SA 2.5
null
2010-05-26T16:53:59.590
2010-11-15T22:51:15.897
2010-11-15T22:51:15.897
244,826
244,826
[ "iphone", "firefox", "ssl", "ssl-certificate" ]
2,918,354
1
6,180,730
null
0
346
![alt text](https://i576.photobucket.com/albums/ss205/aquaibm/2010-05-27111910.png) Click the header section(or whatever it calls) will unfold the relative subcells,and the left triangle get rotated. I have no idea how to code this.Is there anyone help me? Any code snippets would be great help.Thanks a lot.
Is this a UITableView? How does this work?
CC BY-SA 2.5
null
2010-05-27T03:54:21.580
2011-05-30T21:04:27.360
2017-02-08T14:26:03.793
-1
115,271
[ "iphone", "objective-c", "cocoa-touch" ]
2,919,487
1
3,528,392
null
12
6,194
I've created a test suite in NUnit that references several distinct unit test fixtures in various assemblies. I've pretty much used the example code from [NUnit's docs](http://www.nunit.org/index.php?p=suite&r=2.4.7): ``` namespace NUnit.Tests { using System; using NUnit.Framework; using System.Collections; public class AllTests { [Suite] public static IEnumerable Suite { get { ArrayList suite = new ArrayList(); suite.Add(new VisionMap.DotNet.Tests.ManagedInteropTest.DotNetUtilsTest()); return suite; } } } } ``` My goal is to add several tests to the list above so I can run them all in a batch. But when I try to load the DLL in NUnit's GUI I get this: ![alt text](https://dl.dropbox.com/u/132375/Pics/CropperCapture%5B22%5D.Png) What am I doing wrong? I'm aware that the docs say the GUI won't run suites, but I've tried the console as well. Can somebody please tell me what Suites are good for and how I can use them to achieve my goal? I'm using nunit 2.5.0.9122. Well, no answers are forthcoming. I found an alternative solution in the end: Categories. I group test fixtures by giving them appropriate categories and then I can run a subset of them in batch, while still ignoring another subset. Still, very odd that this Suite feature seems to be completely broken.
NUnit not running Suite tests
CC BY-SA 2.5
0
2010-05-27T08:19:24.843
2010-08-20T05:26:10.040
2017-02-08T14:26:04.637
-1
11,208
[ "c#", ".net", "unit-testing", "testing", "nunit" ]
2,920,306
1
14,205,994
null
249
187,145
I have design problem with Google Chrome and its form autofill function. If Chrome remembers some login/password it changes a background color to a yellow one. Here are some screenshots: ![alt text](https://i.stack.imgur.com/Id1Yp.png) ![alt text](https://i.stack.imgur.com/oNKbD.png) How to remove that background or just disable this autofill ?
Google Chrome form autofill and its yellow background
CC BY-SA 3.0
0
2010-05-27T10:30:58.813
2021-09-02T07:30:32.150
2017-04-24T09:42:49.840
223,386
223,386
[ "html", "css", "forms", "google-chrome", "autofill" ]
2,920,368
1
2,920,708
null
1
81
I have configured the standard "frontpage" view in order to display a list of nodes, just by displaying a field (the banner image). ![alt text](https://i.imgur.com/5UVBk.png) Unfortunately the URL /frontapge does not return the previewed template, but the same page that would get displayed before the views module was installed. --- Help would be much appreciated.
Making views accessible through URL - Drupal
CC BY-SA 2.5
null
2010-05-27T10:43:29.533
2010-05-27T16:58:30.590
null
null
208,827
[ "url", "drupal", "drupal-views" ]
2,921,978
1
2,922,002
null
4
1,923
In short my scenario is like so: ![alt text](https://i612.photobucket.com/albums/tt209/fredrikmork/aspnet_wcf_wcf.png) 1. The user triggers an action in the web browser, which causes an Ajax call to a web service in the web server (server A). 2. The web server issues a call to a WCF service, hosted in IIS (server B) 3. The WCF service issues a call to another WCF service, hosted in IIS (server C) All web sites are exposed over http, not https. Now, server C needs to know who the user is in the other end. I got it working so far so that the WCF service call to server B is performed under impersonation, so server B has a `WindowsIdentity` object representing the user. However, when I try to invoke the service call from server B to server C under impersonation, I get the following back: ``` System.ComponentModel.Win32Exception: No credentials are available in the security package Server stack trace: at System.IdentityModel.SspiWrapper.AcquireCredentialsHandle(String package, CredentialUse intent, AuthIdentityEx& authdata) at System.ServiceModel.Security.SecurityUtils.GetCredentialsHandle(String package, NetworkCredential credential, Boolean isServer, String[] additionalPackages) at System.ServiceModel.Security.SpnegoTokenProvider.OnOpening() at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpening() at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout) at System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider tokenProvider, TimeSpan timeout) at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout) at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade) at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) ``` Tweaking service binding feels for me like walking on ice so thin that I am almost walking on water, so let's disregard from what I have failed with so far, and start with a clean sheet. How should I configure the services to play nicely with each other (and me)?
ASP.NET website -> WCF service -> WCF service, with impersonation all the way?
CC BY-SA 2.5
0
2010-05-27T14:23:33.723
2010-05-27T14:30:26.283
2017-02-08T14:26:06.000
-1
93,623
[ ".net", "asp.net", "wcf", "wcf-binding" ]
2,923,647
1
2,924,443
null
2
311
This is a screenshot of the applet [LogiCell 1.0](http://www.rennard.org/alife/english/logicellgb.html), link to which I found [here](https://stackoverflow.com/questions/394957/why-can-conways-game-of-life-be-classified-as-a-universal-machine/394960#394960). ![alt text](https://imgur.com/9lYng.jpg) As the bottom left corner shows, this is doing sum `0+1` and the result is `01b` (bottom right hand side). I am not able to link what is displayed to what the inputs ans outputs are. For example in this case - seeing the snapshot, how do you determine that the inputs are `0` and `1` and the output is `01`?
How to work with this turing machine?
CC BY-SA 2.5
0
2010-05-27T18:08:16.120
2019-02-22T16:39:11.790
2017-05-23T11:48:26.730
-1
113,124
[ "language-agnostic", "boolean-logic", "turing-complete", "cellular-automata" ]
2,923,746
1
null
null
0
5,105
Is it possible to pull out filter row from to some other place like group box ? If possible, how ? Any pointers will be appreciated. Please consider scenario given below where when I click on button, column will be filtered according to filter query. For doing this scenario I need to take out FilterRow Cell for . ![alt text](https://7vtcea.blu.livefilestore.com/y1punxfO4WHzzU8XoWGTSnqC-wsFx8MNpgW4TuGTP3voRq58dzLrxn4gsNeW6oI7HaHtd8JBI5NzsTYDRCp_GGeoKbw8SkhwVXq/XCeed1.jpg)
Taking out FilterRow from XCeed DataGrid control
CC BY-SA 2.5
0
2010-05-27T18:20:57.683
2011-10-19T18:48:12.147
2017-02-08T14:26:06.343
-1
212,823
[ "wpf", "wpf-controls", "wpfdatagrid", "xceed", "xceed-datagrid" ]
2,924,092
1
3,064,486
null
2
717
I have a C# program that works correctly on xp and vista but it needs to be used on windows 7, I have not been able to come up with a solution, it appears that getpixels just doesn't work right on windows 7. I am getting one of the RGB values because I am dealing with tiff grayscale images. ``` System.Drawing.Bitmap image;// this is in a separate class image = new Bitmap(destination);// this is in the constructor Color t = image.GetPixel(j, i); // this is in a separate function int s = t.R ``` when I print s, for example, image(0,0), it is supposed to be 220, it will be 221 I am doing edge detection on an image and I have to go through the image pixel by pixel, I have run the exact same program on XP,Vista,windows7 and windows 7 got different values. It wouldn't let me post images at all and only one link. ![enter image description here](https://i.stack.imgur.com/hiLYZ.png) ![enter image description here](https://i.stack.imgur.com/MLgRV.png) ![enter image description here](https://i.stack.imgur.com/vQLbC.png) The first image is the original image, the second is the correct image, also the one I get with XP and Vista, the final image is the image when running the same program in Windows 7. There is not much of a visible difference but it matters for what I am doing.
getpixels() gets the correct value on xp and vista but is slightly off when used on windows 7
CC BY-SA 3.0
null
2010-05-27T19:09:10.307
2012-12-18T05:42:58.777
2012-12-18T05:42:58.777
76,337
352,288
[ "c#", "windows-7" ]
2,924,631
1
3,261,299
null
4
1,357
Consider the feature in Visual Studio 2010 for snippets in the HTML Source view of a web page. type a control name in plaintext with no markup or brackets! ... e.g. `hyperlink`. ![enter image description here](https://i.stack.imgur.com/zTug7.png) Then hit Tab ![enter image description here](https://i.stack.imgur.com/X1OcR.png) Your web control has been auto-completed for you. It's up to you to fill in the other details that you need. This works for `form` as well: ``` <form action="default.aspx" method="post"> </form> ``` This looks like a real time saver. This is supported in WebForms and ASP.NET MVC projects. are available in Visual Studio 2010 in the Source view of a page?
Shortcuts for web controls and HTML snippets in Visual Studio
CC BY-SA 3.0
null
2010-05-27T20:27:05.330
2013-08-02T18:20:03.010
2013-08-02T18:20:03.010
23,199
23,199
[ "visual-studio-2010", "visual-studio", "code-snippets" ]
2,925,274
1
null
null
5
1,250
I'm using chrome (the dev version for my mac). I was looking at the timeline for my page loading and I saw that there is a 150ms delay due to some garbage collection taking place while loading the page. ![loading times](https://i.stack.imgur.com/xoHWb.png) It's the yellow line. I was curious if there's any way to stop this, delay it, whatever so I get the page to load faster?
Delay garbage collection?
CC BY-SA 3.0
null
2010-05-27T21:54:22.613
2011-10-16T19:13:29.947
2011-10-16T19:13:29.947
540,162
46,782
[ "garbage-collection", "google-chrome", "timeline" ]
2,926,305
1
null
null
1
125
This is what I see when I visit my web site. How do I instead get the Yellow Screen of Death so I know what the error is? ![](https://imgur.com/5NDF9.jpg) I have set customErrors to "off".
ASP.NET: Turning on errors
CC BY-SA 2.5
null
2010-05-28T02:24:58.220
2010-05-28T15:24:59.907
2010-05-28T03:05:12.757
213,461
213,461
[ "asp.net", "web-config" ]
2,926,742
1
2,928,613
null
4
5,072
### Background I have climate data (temperature, precipitation, snow depth) for all of Canada between 1900 and 2009. I have written a basic website and the simplest page allows users to choose category and city. They then get back a very simple report (without the parameters and calculations section): ![](https://i.imgur.com/7eQ45.png) The primary purpose of the web application is to provide a simple user interface so that the general public can explore the data in meaningful ways. (A list of numbers is not meaningful to the general public, nor is a website that provides [too many inputs](http://www7.ncdc.noaa.gov/CDO/CDODivisionalSelect.jsp).) The secondary purpose of the application is to provide climatologists and other scientists with deeper ways to view the data. (Using too many inputs, of course.) ### Tool Set The database is PostgreSQL with R (mostly) installed. The reports are written using iReport and generated using JasperReports. ### Poor Model Choice Currently, a linear regression model is applied against annual averages of daily data. The linear regression model is calculated within a PostgreSQL function as follows: ``` SELECT regr_slope( amount, year_taken ), regr_intercept( amount, year_taken ), corr( amount, year_taken ) FROM temp_regression INTO STRICT slope, intercept, correlation; ``` The results are returned to JasperReports using: ``` SELECT year_taken, amount, year_taken * slope + intercept, slope, intercept, correlation, total_measurements INTO result; ``` JasperReports calls into PostgreSQL using the following parameterized analysis function: ``` SELECT year_taken, amount, measurements, regression_line, slope, intercept, correlation, total_measurements, execute_time FROM climate.analysis( $P{CityId}, $P{Elevation1}, $P{Elevation2}, $P{Radius}, $P{CategoryId}, $P{Year1}, $P{Year2} ) ORDER BY year_taken ``` This is not an optimal solution because it gives the false impression that the climate is changing at a slow, but steady rate. ### Questions Using functions that take two parameters (e.g., year [X] and amount [Y]), such as PostgreSQL's `regr_slope`: - - `apt-get`- If no such functions exist: - - Keep in mind that this is a web app for use by the general public. If the only way to analyse the data is from an R shell, then the purpose has been defeated. (I know this is not the case for most R functions I have looked at so far.) Thank you!
Non-linear regression models in PostgreSQL using R
CC BY-SA 2.5
0
2010-05-28T05:07:23.977
2010-05-28T13:50:33.783
null
null
59,087
[ "postgresql", "r", "statistics", "data-analysis" ]
2,929,053
1
2,929,071
null
14
17,257
I'd like to create a div element that is "floating", not in the sense of the [float property](http://w3schools.webmasterbeta.net/css/pr_class_float.asp), but rather literally "float": ![alt text](https://dl.dropbox.com/u/464119/kuzando/floating.png)
Floating div element
CC BY-SA 2.5
null
2010-05-28T12:49:22.927
2019-10-14T15:55:55.667
2019-10-14T15:55:55.667
10,124,485
11,236
[ "html", "css-position" ]
2,929,464
1
null
null
0
1,260
I have a blank property window that I can not get rid of in Visual Studio 2008 SP1. I have tried every thing to get rid of it. If I close it it shows right back up after going into debug mode or restarting visual studio. I have tried every thing to fix all the way to reinstalling VS with no luck. Does any one have a solution for this? ![Blank Property Window](https://i.imgur.com/W9nMd.png)
Visual Studio 2008 Blank Tool Window
CC BY-SA 2.5
null
2010-05-28T13:42:13.557
2011-11-28T06:18:15.520
2010-05-28T20:43:33.600
20,183
20,183
[ "visual-studio", "visual-studio-2008-sp1" ]
2,929,641
1
3,032,517
null
0
130
I'll briefly explain what I'm trying to do: I need to sort a set of within a paginated page. Also I need to add filtering to the page, for example each content-type should have a set of and the filter . This is a basic mockup of what this page consists of: ![alt text](https://i.imgur.com/2BYo6.png) --- Help would be very much appreciated!!
Displaying a list of objects with Views - Drupal
CC BY-SA 2.5
null
2010-05-28T14:02:06.257
2013-05-31T00:56:34.427
2013-05-31T00:56:34.427
225,647
208,827
[ "php", "drupal", "drupal-views", "content-type" ]
2,930,066
1
null
null
2
6,781
i downloaded fancybox.net and edditted the example file from the download pack. i added a google maps map. and when i click on the iframe link, the iframe popup apears BEHIND the google maps map. thats not the way i want it offcourse. what did i do wrong? i didn't change the original code from the example file. see this image for the error: ![enter image description here](https://i.stack.imgur.com/Tu85R.png) --- i dont have online space right know ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="imagetoolbar" content="no" /> <title>FancyBox 1.3.1 | Demonstration</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.1.js"></script> <link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.1.css" media="screen" /> <script type="text/javascript"> $(document).ready(function() { $("#various3").fancybox({ 'width' : '75%', 'height' : '75%', 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe' }); }); </script> </head> <body> <div id="content"> <a id="various3" style="z-index: 999999" href="http://google.ca">Iframe</a> <div><p>&nbsp;</p></div><iframe width="900" height="800" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.nl/maps?q=google&amp;oe=utf-8&amp;client=firefox-a&amp;ie=UTF8&amp;hl=nl&amp;hq=google&amp;hnear=&amp;t=h&amp;layer=c&amp;cbll=43.432247,-95.58578&amp;panoid=2fPtt4N4mRuitc1wXLm_wg&amp;cbp=13,308.54,,0,14.77&amp;ll=21.371244,-83.320312&amp;spn=39.112201,79.013672&amp;z=4&amp;source=embed&amp;output=svembed"></iframe><br /><small><a href="http://maps.google.nl/maps?q=google&amp;oe=utf-8&amp;client=firefox-a&amp;ie=UTF8&amp;hl=nl&amp;hq=google&amp;hnear=&amp;t=h&amp;layer=c&amp;cbll=43.432247,-95.58578&amp;panoid=2fPtt4N4mRuitc1wXLm_wg&amp;cbp=13,308.54,,0,14.77&amp;ll=21.371244,-83.320312&amp;spn=39.112201,79.013672&amp;z=4&amp;source=embed" style="color:#0000FF;text-align:left">Grotere kaart weergeven</a></small> </body> </html> ```
fancybox popup appears behind google maps
CC BY-SA 3.0
null
2010-05-28T14:57:07.073
2012-06-14T22:34:47.410
2011-12-08T20:37:36.727
50,776
353,011
[ "jquery", "fancybox" ]
2,930,974
1
null
null
5
3,493
When using [CachedBitmaps](http://msdn.microsoft.com/en-us/library/ms533975(VS.85).aspx) in , there is graphical corruption if Windows video "Hardware Acceleration" is lowered too much - such that is disabled: [](https://i.stack.imgur.com/8kve6.png) There are six levels of hardware acceleration: - - - - - - If DirectDraw is disabled, then using `DrawCachedBitmap` in GDI+ will result in graphical corruption. It's easy enough for me to use the slower [DrawImage()](http://msdn.microsoft.com/en-us/library/ms536051(VS.85).aspx) API if DirectDraw is not enabled - but i have to be able to that DirectDraw is disabled. How can i programatically check if is enabled? --- The question is: How does dxdiag do this: ![alt text](https://i.stack.imgur.com/W8EHF.png) ## See also [KB191660 - DirectDraw or Direct3D option is unavailable](http://support.microsoft.com/kb/191660) [archive](https://archive.fo/wuHKI)
Win32: How to determine if DirectDraw is enabled?
CC BY-SA 4.0
0
2010-05-28T17:00:27.667
2019-02-21T01:18:12.113
2019-02-21T01:18:12.113
12,597
12,597
[ "winapi", "gdi+", "directdraw" ]
2,932,223
1
2,932,265
null
0
260
I'm working on a project and I'm wondering how to get a type of window common in Windows's wireless controls, as shown in the screen shot below: ![](https://i.stack.imgur.com/KBDP3.jpg) ([source](http://cybernetnews.com/wp-content/uploads/2008/10/windows-7-wireless.jpg)) There's no close or maximize buttons, but the border is still present. My tools include Expression Blend 3 and Visual Studio 08. I was also wondering what the font used on these are, as it doesn't seem to be the normal Tahoma found in Office 7.
Windows 7 Status Menu style Window
CC BY-SA 3.0
null
2010-05-28T20:22:19.973
2013-05-23T17:29:21.420
2013-05-23T17:29:21.420
106,224
258,107
[ "wpf", "windows", "expression-blend" ]
2,932,335
1
2,933,222
null
0
272
See this [sample page](http://dl.dropbox.com/u/464119/kuzando/datepicker/a.html). The icon I want to be using is this: ![alt text](https://dl.dropbox.com/u/464119/kuzando/datepicker/calendar.png) The icon, as shown on the page, looks like this: ![alt text](https://dl.dropbox.com/u/464119/kuzando/datepicker/calendar2.png) How can I make DatePicker use my original icon without modifications?
How do I disable the button wrapper for jquery-ui-datepicker?
CC BY-SA 2.5
null
2010-05-28T20:35:22.837
2010-05-29T00:08:09.850
2017-02-08T14:26:08.420
-1
11,236
[ "javascript", "jquery", "jquery-ui", "datepicker", "jquery-ui-datepicker" ]
2,932,399
1
null
null
11
2,290
I've been using git along with fugitive.vim to manage code when I'm on windows. However, I've run into a problem. According to the [documentation](http://github.com/tpope/vim-fugitive/blob/master/README.markdown), the :GDiff command should a diff window and allow me to stage only parts of a file. However, when I issue the command in a file with changes, I get the following error message: ![alt text](https://imgur.com/8xbR2.png) Is this a problem with windows? vim? fugitive? msysgit? file permissions? Anybody know?
Error using the :GDiff command of fugitive.vim using gvim for windows and msys git 1.7.0.2
CC BY-SA 2.5
0
2010-05-28T20:43:59.230
2011-05-07T08:08:26.887
null
null
85
[ "git", "vim", "msysgit", "vim-fugitive" ]
2,935,004
1
2,935,860
null
1
126
When you create a menu bar, a funny line appears underneath (for XP and Win7 at least). How can I get rid of this line? I know that some applications, such as Firefox and Thunderbird, have done so. Here's an illustration: ![alt text](https://i.imgur.com/zBMNX.png) I am programming in C, using the Windows API. My menu is loaded from a resource file.
Line underneath my menu bar!
CC BY-SA 2.5
0
2010-05-29T12:24:29.777
2010-05-29T16:51:07.600
null
null
293,048
[ "c", "user-interface", "winapi", "menubar" ]
2,935,401
1
null
null
3
2,366
I am upgrading my codes from Google Map API V2 to V3. In V2, I used GlocalSearch to get the latitude and longitude for the given address. In V3, I saw google.maps.Geocoder() and try to get the similar detail. However, the lat & long given by the V3 function is not accurate. Pls see the following screenshot here: ![Wrong](https://web.archive.org/web/20131226014237/http://img340.imageshack.us/img340/477/wronga.jpg) [](https://i.stack.imgur.com/PkVjs.jpg) My codes for V3 are as follow: ``` var geocoder = new google.maps.Geocoder(); function codeAddress(address) { if (geocoder) { address = address + ", UK"; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var latlng = results[0].geometry.location; addMarker(latlng); //Adding Marker here } else { alert("Geocode was not successful for the following reason: " + status); } }); } } ``` Is there better way to get the accurate result in API V3? Thanks.
Google Map API V3 geocoder not showing the correct place
CC BY-SA 4.0
0
2010-05-29T14:18:38.110
2019-07-28T03:11:44.857
2019-07-28T03:11:44.857
4,751,173
296,074
[ "javascript", "geocoding", "google-maps-api-3" ]
2,936,467
1
6,382,259
null
65
74,875
I am attempting to parse the video ID of a youtube URL using preg_match. I found a regular expression on this site that appears to work; ``` (?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=[0-9]/)[^&\n]+|(?<=v=)[^&\n]+ ``` As shown in this pic: ![alt text](https://i.imgur.com/SQJW2.jpg) My PHP is as follows, but it doesn't work (gives Unknown modifier '[' error)... ``` <? $subject = "http://www.youtube.com/watch?v=z_AbfPXTKms&NR=1"; preg_match("(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=[0-9]/)[^&\n]+|(?<=v=)[^&\n]+", $subject, $matches); print "<pre>"; print_r($matches); print "</pre>"; ?> ``` Cheers
parse youtube video id using preg_match
CC BY-SA 2.5
0
2010-05-29T20:19:42.230
2020-02-07T15:53:41.750
2012-06-02T12:31:53.600
367,456
263,534
[ "php", "regex", "parsing", "youtube" ]
2,937,723
1
14,408,869
null
42
42,479
### Background MySQL Workbench can produce appealing and high-quality ERDs such as: ![](https://i.stack.imgur.com/Ir3dz.jpg) ### Research What PostgreSQL ERD tools are available that meet the requirements? The following are unsuitable: - [dbVisualizer](http://www.dbvis.com/)- [AquaFold](http://www.aquafold.com/)- [SQL Developer](http://sqldeveloper.solyp.com/)- [Dia](http://projects.gnome.org/dia/)- [SQL Power Architect](http://www.sqlpower.ca/page/architect)- [SchemaBank](http://schemabank.com/)- [SchemaSpy](http://schemaspy.sourceforge.net/)- [Gliffy](http://www.gliffy.com/)- [Druid](http://druid.sourceforge.net/) ### Requirements Looking for an ERD tool: - - - - -
High-quality ERD generator for PostgresQL under Linux?
CC BY-SA 3.0
0
2010-05-30T06:08:33.133
2019-12-18T05:21:15.763
2012-11-09T23:38:26.847
59,087
59,087
[ "database-design", "postgresql", "entity-relationship", "erd" ]
2,938,452
1
2,939,017
null
9
20,240
As part of an application that I'm developing for Android I'd like to show the user an edge-detected version of an image they have taken (something similar to the example below). ![alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Valve_sobel_%283%29.PNG/300px-Valve_sobel_%283%29.PNG) To achieve this I've been looking at the Sobel operator and how to implement it in Java. However, many of the examples that I've found make use of objects and methods found in AWT ([like this example](http://forums.sun.com/thread.jspa?threadID=5346162)) that isn't part of Android. My question is then really, does Android provide any alternatives to the features of AWT that have been used in the above example? If we were to rewrite that example just using the libraries built into Android, how would we go about it?
Sobel Edge Detection in Android
CC BY-SA 2.5
0
2010-05-30T11:43:04.873
2015-08-24T04:46:31.407
2017-02-08T14:26:10.470
-1
205,877
[ "android", "image-processing", "edge-detection" ]
2,938,764
1
2,939,463
null
3
205
i have an issue with my css where if i use `margin: 0` instead of `margin-top: 0`, for `header p`, the `header { margin: 0 0 20px; }` will be as good as not there. isit supposed to be like that? if i see what happens in firebug, its because the `margin-bottom` of `header` into the next sibling, the `section`. ![alt text](https://farm5.static.flickr.com/4060/4652790638_ffe153855d_b_d.jpg) html ``` <header> <h1>ToDo List</h1> <p>HTML5 Offline Capable Web Application</p> </header> ``` css ``` header { font: 24px/1em Notethis; color: #666; margin: 0 0 20px; } header h1 { font: 60px/1.4em Hetilica; margin: 0; } header p { margin-top: 0; } ```
CSS Margin Issue
CC BY-SA 2.5
0
2010-05-30T13:15:57.463
2010-05-30T16:33:55.067
2017-02-08T14:26:11.147
-1
292,291
[ "css" ]
2,938,843
1
null
null
3
1,358
I finally managed to get a texture onto a cube sadly, but it is appearing incorrectly. as the below picture identifies. ![alt text](https://i159.photobucket.com/albums/t150/numerical25/boxTextureOFf.jpg) Anyways, I am not sure what it could be. My first guess is it could be my uv mapping or my vertex positioning is off. If someone could check and make sure thats good. The first element is the vertex position, second is the color, and third is the uv texture. ``` struct VertexPos { D3DXVECTOR3 pos; D3DXVECTOR4 color; D3DXVECTOR3 normal; D3DXVECTOR2 texCoord; }; // Create vertex buffer VertexPos vertices[] = { // BACK SIDES { D3DXVECTOR3(-5.0f, 5.0f, 5.0f), D3DXVECTOR4(1.0f,0.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,0.0)}, { D3DXVECTOR3(-5.0f, -5.0f, 5.0f), D3DXVECTOR4(1.0f,0.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,1.0)}, { D3DXVECTOR3(5.0f, 5.0f, 5.0f), D3DXVECTOR4(1.0f,0.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, { D3DXVECTOR3(5.0f, 5.0f, 5.0f), D3DXVECTOR4(1.0f,0.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, { D3DXVECTOR3(-5.0f, -5.0f, 5.0f), D3DXVECTOR4(1.0f,0.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,1.0)}, { D3DXVECTOR3(5.0f, -5.0f, 5.0f), D3DXVECTOR4(1.0f,0.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,1.0)}, // 2 FRONT SIDE { D3DXVECTOR3(-5.0f, 5.0f, -5.0f), D3DXVECTOR4(0.0f,1.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,0.0)}, { D3DXVECTOR3(5.0f, 5.0f, -5.0f), D3DXVECTOR4(0.0f,1.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,0.0)}, { D3DXVECTOR3(-5.0f, -5.0f, -5.0f), D3DXVECTOR4(0.0f,1.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, { D3DXVECTOR3(-5.0f, -5.0f, -5.0f), D3DXVECTOR4(0.0f,1.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, { D3DXVECTOR3(5.0f, 5.0f, -5.0f), D3DXVECTOR4(0.0f,1.0f,0.0f,0.0f) ,D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,0.0)}, { D3DXVECTOR3(5.0f, -5.0f, -5.0f), D3DXVECTOR4(0.0f,1.0f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,1.0)}, // 3 { D3DXVECTOR3(-5.0f, 5.0f, 5.0f), D3DXVECTOR4(0.0f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,0.0)}, { D3DXVECTOR3(5.0f, 5.0f, 5.0f), D3DXVECTOR4(0.0f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,0.0)}, { D3DXVECTOR3(-5.0f, 5.0f, -5.0f), D3DXVECTOR4(0.0f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, { D3DXVECTOR3(-5.0f, 5.0f, -5.0f), D3DXVECTOR4(0.0f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, { D3DXVECTOR3(5.0f, 5.0f, 5.0f), D3DXVECTOR4(0.0f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,0.0)}, { D3DXVECTOR3(5.0f, 5.0f, -5.0f), D3DXVECTOR4(0.0f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, // 4 { D3DXVECTOR3(-5.0f, -5.0f, 5.0f), D3DXVECTOR4(1.0f,0.5f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,0.0)}, { D3DXVECTOR3(-5.0f, -5.0f, -5.0f), D3DXVECTOR4(1.0f,0.5f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,0.0)}, { D3DXVECTOR3(5.0f, -5.0f, 5.0f), D3DXVECTOR4(1.0f,0.5f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, { D3DXVECTOR3(5.0f, -5.0f, 5.0f), D3DXVECTOR4(1.0f,0.5f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, { D3DXVECTOR3(-5.0f, -5.0f, -5.0f), D3DXVECTOR4(1.0f,0.5f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,0.0)}, { D3DXVECTOR3(5.0f, -5.0f, -5.0f), D3DXVECTOR4(1.0f,0.5f,0.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, // 5 { D3DXVECTOR3(5.0f, 5.0f, -5.0f), D3DXVECTOR4(0.0f,1.0f,0.5f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,0.0)}, { D3DXVECTOR3(5.0f, 5.0f, 5.0f), D3DXVECTOR4(0.0f,1.0f,0.5f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,0.0)}, { D3DXVECTOR3(5.0f, -5.0f, -5.0f), D3DXVECTOR4(0.0f,1.0f,0.5f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, { D3DXVECTOR3(5.0f, -5.0f, -5.0f), D3DXVECTOR4(0.0f,1.0f,0.5f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, { D3DXVECTOR3(5.0f, 5.0f, 5.0f), D3DXVECTOR4(0.0f,1.0f,0.5f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,0.0)}, { D3DXVECTOR3(5.0f, -5.0f, 5.0f), D3DXVECTOR4(0.0f,1.0f,0.5f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, // 6 {D3DXVECTOR3(-5.0f, 5.0f, -5.0f), D3DXVECTOR4(0.5f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,0.0)}, {D3DXVECTOR3(-5.0f, -5.0f, -5.0f), D3DXVECTOR4(0.5f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,0.0)}, {D3DXVECTOR3(-5.0f, 5.0f, 5.0f), D3DXVECTOR4(0.5f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, {D3DXVECTOR3(-5.0f, 5.0f, 5.0f), D3DXVECTOR4(0.5f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, {D3DXVECTOR3(-5.0f, -5.0f, -5.0f), D3DXVECTOR4(0.5f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(1.0,0.0)}, {D3DXVECTOR3(-5.0f, -5.0f, 5.0f), D3DXVECTOR4(0.5f,0.0f,1.0f,0.0f),D3DXVECTOR3(0.0f,0.0f,0.0f) ,D3DXVECTOR2(0.0,1.0)}, }; ``` My second guess could be an error that I am receiving as I run the program. But I don't know where to begin with that. The following is the description of the error . ``` D3D10: WARNING: ID3D10Device::Draw: Vertex Buffer at the input vertex slot 0 is not big enough for what the Draw*() call expects to traverse. This is OK, as reading off the end of the Buffer is defined to return 0. However the developer probably did not intend to make use of this behavior. [ EXECUTION WARNING #356: DEVICE_DRAW_VERTEX_BUFFER_TOO_SMALL ] ``` Not sure what it could be. but here is my vertex layout description ``` //Create Layout D3D10_INPUT_ELEMENT_DESC layout[] = { {"POSITION",0,DXGI_FORMAT_R32G32B32_FLOAT, 0 , 0, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"COLOR",0,DXGI_FORMAT_R32G32B32A32_FLOAT, 0 , 12, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"NORMAL",0,DXGI_FORMAT_R32G32B32A32_FLOAT, 0 , 28, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"TEXCOORD",0, DXGI_FORMAT_R32G32_FLOAT, 0 , 44, D3D10_INPUT_PER_VERTEX_DATA, 0} }; UINT numElements = (sizeof(layout)/sizeof(layout[0])); modelObject.numVertices = sizeof(vertices)/sizeof(VertexPos); for(int i = 0; i < modelObject.numVertices; i += 3) { D3DXVECTOR3 out; D3DXVECTOR3 v1 = vertices[0 + i].pos; D3DXVECTOR3 v2 = vertices[1 + i].pos; D3DXVECTOR3 v3 = vertices[2 + i].pos; D3DXVECTOR3 u = v2 - v1; D3DXVECTOR3 v = v3 - v1; D3DXVec3Cross(&out, &u, &v); D3DXVec3Normalize(&out, &out); vertices[0 + i].normal = out; vertices[1 + i].normal = out; vertices[2 + i].normal = out; } //Create buffer desc D3D10_BUFFER_DESC bufferDesc; bufferDesc.Usage = D3D10_USAGE_DEFAULT; bufferDesc.ByteWidth = sizeof(VertexPos) * modelObject.numVertices; bufferDesc.BindFlags = D3D10_BIND_VERTEX_BUFFER; bufferDesc.CPUAccessFlags = 0; bufferDesc.MiscFlags = 0; D3D10_SUBRESOURCE_DATA initData; initData.pSysMem = vertices; //Create the buffer HRESULT hr = mpD3DDevice->CreateBuffer(&bufferDesc, &initData, &modelObject.pVertexBuffer); if(FAILED(hr)) return false; ```
directX texture appears incorrectly
CC BY-SA 2.5
null
2010-05-30T13:38:35.490
2010-05-30T16:13:29.923
2017-02-08T14:26:11.477
-1
201,934
[ "c++", "visual-c++", "directx", "directx-10" ]
2,938,923
1
null
null
0
1,817
I am on the lookout for a jQuery photo carousel that can display 3 images at a time, and circle through x amount of photos (and when reaching the last, starting with the first photo again). I made a quick mock-up of what i am looking for: ![](https://i.stack.imgur.com/cJDyc.gif) So there is 3 photos vissible, the middle one beeing the 'main' one and a bit bigger than the previous and next (left and right). Upon clicking the next/previous arrows the next or previous photo slides into the middle and thereby becomes the main photo. Any ideas to where i can find such a jQuery plugin/script?
jQuery photo carousel (that looks like a real carousel)?
CC BY-SA 3.0
0
2010-05-30T14:06:25.233
2018-04-28T17:56:25.283
2014-09-16T18:28:22.490
350,278
268,080
[ "javascript", "jquery", "photo", "carousel" ]
2,940,944
1
2,940,990
null
17
13,650
I am attempting to use the Browser control in a very simple WPF application, and it appears that while the browser is loading the page that I requested (I can mouseover images and see the ALT tags), I can't actually see anything else: ![alt text](https://lh3.ggpht.com/_kX2f2z37O1I/TAMIQlCxq0I/AAAAAAAAAIc/fmZIaLogISU/s512/InvisiBrowser.jpg) Here is the XAML for the app: ``` <Window x:Class="SmokeyBox2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="SmokeyBox" Height="120" Width="510" ShowInTaskbar="False" SizeToContent="WidthAndHeight" WindowStyle="None" AllowsTransparency="True" MouseLeftButtonDown="Window_MouseLeftButtonDown"> <Border Background="#50FFFFFF" CornerRadius="5" BorderThickness="2,0,2,2" Padding="5 1 5 5"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"></RowDefinition> <RowDefinition Height="Auto"></RowDefinition> <RowDefinition Height="Auto"></RowDefinition> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"></ColumnDefinition> <ColumnDefinition Width="Auto"></ColumnDefinition> </Grid.ColumnDefinitions> <Label Grid.Row="0" Grid.Column="0" Background="Transparent" Content="SmokeyBox" MouseLeftButtonDown="Label_MouseLeftButtonDown" /> <TextBox Grid.Row="1" Grid.Column="0" Name="searchText" Width="450" FontFamily="Arial" Foreground="DarkGray" Background="Transparent" FontSize="20" MouseLeftButtonDown="searchText_MouseLeftButtonDown" BorderBrush="Transparent" /> <Expander Grid.Row="1" Grid.Column="1" Padding="2 3 0 0 " Expanded="Expander_Expanded" Collapsed="Expander_Collapsed" /> <WebBrowser Grid.Row="2" Grid.Column="0" x:Name="browser" Visibility="Visible" Width="480" Height="480" Margin="2 2 2 2" ></WebBrowser> </Grid> </Border> </Window> ``` So can anyone help me figure out why the browser isn't showing the Yahoo! home page like I asked it to? And while I am at it, I'm going to own up to the fact that this is my first WPF app, and I'd love to hear any general pointers on how to get rid of general noobie badness in my XAML. Thanks.
WPF Browser is there, but invisible
CC BY-SA 2.5
0
2010-05-31T01:16:41.993
2021-03-27T07:11:51.037
2017-02-08T14:26:12.503
-1
226,476
[ "wpf", "wpf-controls" ]
2,941,239
1
2,941,307
null
2
1,226
I'm trying to make the domain model of a management system. I have the following kind of people in this system: ``` employee manager top mananger ``` I decided to define an `User`, from where `Employee`, `Manager` and `Top Manager` will specialize from. Now, I don't know what kind of specialization hierarchy I should choose from. I can't decide between the following ways: ![alt text](https://yuml.me/diagram/scruffy/class/%5BUser%5D%5E%5BEmployee%5D,%20%5BUser%5D%5E%5BManager%5D,%20%5BUser%5D%5E%5BTop%20Manager%5D) or ![alt text](https://yuml.me/diagram/scruffy/class/%5BUser%5D%5E%5BEmployee%5D,%20%5BUser%5D%5E%5BManager%5D,%20%5BManager%5D%5E%5BTop%20Manager%5D) Which might be preferable and why? As a long time coder, every time I try to do a domain-model, I have to fight against the idea of trying to think in how I'm going to code this. From what I've understood, I should not think about those matters in the domain-model, only in object relationships. I don't have to think of code duplication or any of these kind of details here, so I can't really pick any of the options over the other. Thanks I'll be a bit more explicit: This is a program to manage worker's vacations plans. With this program, a employee can choose the set of vacations days for the year. Then the manager might approve or not those days for each one of the employees and at the end of the day the top manager should approve or disapprove the manager's decisions. This is all the users of my program are supposed to be able to do. There are no other tasks.
Specialization hierarchy in a domain-model
CC BY-SA 2.5
null
2010-05-31T03:36:19.733
2010-05-31T08:18:41.900
2017-02-08T14:26:13.213
-1
130,758
[ "oop", "uml", "domain-model" ]
2,942,523
1
null
null
54
64,273
There don't seem to be any concise tutorials/walk throughs for installing ImageMagick on WAMP for use with PHP. I've tried dozens of combinations of their binary releases with different php extension dll files. I can get imagemagick working fine from the command line, and I can get it to show as ticked in the WAMP extensions, but can't actually use it. Has anyone come across a good guide for installing this ball ache piece of software? I've followed [http://www.knowledge-transfers.com/it/installing-imagemagick-on-windows-setup-imagick-on-php](http://www.knowledge-transfers.com/it/installing-imagemagick-on-windows-setup-imagick-on-php) with no luck... --- Update: this is what happens when I follow the steps in PHP farmer's answer on windows7. My php.ini is setup as follows: ``` extension_dir = "c:/wamp/bin/php/php5.3.0/ext/" extension=php_imagick.dll ``` I reboot and get these two errors in this order ![alt text](https://i.stack.imgur.com/GgCAo.png) ![alt text](https://i.stack.imgur.com/xng3m.png) and here is the dll file where it should be: ![alt text](https://i.stack.imgur.com/VIwoU.png)
step-by-step instructions for installing IMAGEMAGICK on WAMP?
CC BY-SA 3.0
0
2010-05-31T09:14:39.263
2019-07-21T17:36:02.477
2017-04-11T09:58:52.493
709,443
289,666
[ "php", "imagemagick", "wamp" ]
2,943,548
1
2,943,582
null
416
514,713
I have seen that chrome puts a thicker border on `:focus` but it kind of looks off in my case where I've used border-radius also. Is there anyway to remove that? ![image: chrome :focus border](https://farm5.static.flickr.com/4029/4655472389_c68d1216f0_b.jpg)
How to reset / remove chrome's input highlighting / focus border?
CC BY-SA 3.0
0
2010-05-31T12:37:24.313
2020-06-10T17:51:28.763
2017-09-08T14:44:45.377
497,397
292,291
[ "css", "google-chrome", "focus", "border" ]
2,944,106
1
2,944,164
null
8
10,235
![alt text](https://farm5.static.flickr.com/4020/4656328142_faab111247.jpg) As this image ?
CSS - How to align image left bottom to the text block?
CC BY-SA 2.5
null
2010-05-31T14:18:12.953
2015-06-12T11:17:09.280
2017-02-08T14:26:14.580
-1
153,626
[ "css" ]
2,944,803
1
null
null
3
1,664
I am building some Web forms with ms-access. For the most part the fidelity of the form inside of ms-access and the same form when published to the web and run from a web browser looks very good. However I the problem is with some list boxes. Here is a screen shot of the client form. ![alt text](https://nrfu5a.bay.livefilestore.com/y1pjAboU7l69O-UwoIWhbPlFokvTomQGzE63LU2_UdEIQpAZkfA38dNBJnDo6cfb6p9dV2HolHjY2rBA5Dhus_dlcbFzTAF9Nel/clienForm.png) And, then the same form when published to Access Web services. ![alt text](https://nrfu5a.bay.livefilestore.com/y1pp7RuCEgYZPQK6GG8R-RXVTFAxR8hNRDn-otLdBdFbguarbIk8pON0EgewKMB5CaB91fOmhI89sdIcQLr6KjjylNXpjA3MBvk/WebForm.png) The form when run in a browser looks better sized then in the access client. The font I am using for the 4 list boxes (time picker) is "MS Sans Serif", point size 8. As the two screen shots show, the 2 form in a web browser looks quite different. I sized the list boxes larger then needed in the client side to get the good looking results in the web browser. I would rather size the form in the client to much like this screen shot: ![alt text](https://nrfu5a.bay.livefilestore.com/y1pyET7BnGtYb6rS1x9zJmTaponhRbtxNhDDjp4HrDV-WM47cCFe3bgiR1FihTSZvCx0dU-hO43set366pWdFHDcS7gH1dv8MVn/Hide1.png) It certainly possible that I might have to live with this size and rendering difference. I am wondering if anyone has any suggestions in regards to picking a different font that might improve this situation? I included the SharePoint tag in this question since Access Web services does run on SharePoint. Perhaps there is some Web Server settings I don't know about that might improve this situation? I tried about 10 different of the most common fonts (Calibri, Arial, Times New Roman etc.) and the sizing issue did not really improve much. I am new to the web world so issues like what font to choose or what a long time web developer would choose in this case is much breaking new ground for me. Is there a particular font (and size) that would be a better choice for those 4 list boxes? Or am I wasting my time looking at fonts and hould e looking else where such as anchoring of controls etc.?
Choosing font size for a web form
CC BY-SA 2.5
null
2010-05-31T16:34:26.457
2012-03-13T21:23:55.037
2017-02-08T14:26:15.597
-1
10,527
[ "sharepoint", "ms-access" ]
2,946,792
1
2,946,835
null
5
3,300
I've got a Red Hat box with 6G memory running Tomcat and I'm trying to figure out how much memory I have left on the box. Problem is, top & jconsole is showing one figure (around 200M), and system monitor is showing a different figure (around 2G). Does anybody know what the difference is? I'm not sure if there is a memory leak happenning here, but the highest memory consumer is a tomcat process that's taking 2.2G of memory. Screenshots below: ![alt text](https://dl.dropbox.com/u/6895838/Tomcat/Jconsole%202.png) ![alt text](https://dl.dropbox.com/u/6895838/Tomcat/Jconsole%203.png) ![alt text](https://dl.dropbox.com/u/6895838/Tomcat/System%20Monitor%201.png) ![alt text](https://dl.dropbox.com/u/6895838/Tomcat/System%20Monitor%202.png) ![alt text](https://dl.dropbox.com/u/6895838/Tomcat/top.png) Added the free command screenshot: ![alt text](https://dl.dropbox.com/u/6895838/Tomcat/free.png)
Java / Tomcat memory leak in RedHat Linux?
CC BY-SA 2.5
0
2010-06-01T01:16:13.763
2010-06-01T02:02:43.373
2017-02-08T14:26:17.620
-1
328,443
[ "java", "memory", "tomcat", "memory-leaks", "memory-management" ]
2,946,859
1
2,946,905
null
0
672
I've been trying to code [this page](http://danoc.me) for a while, but my biggest problem is that I can't seem to get the photos perfectly positioned. For some reason, there is a small bottom padding in each `<td>` which is messing things up. Here is the table code: ``` <table> <tr> <td rowspan="2" style="height:353px;"><img src="danoconnor/img/photography/farm.jpg" height="353" width="470" alt="Farm" /></td> <td><img src="danoconnor/img/photography/paragliding.jpg" height="190" width="254" alt="Paraglider" /></td> <td rowspan="2"><img src="danoconnor/img/photography/cristo.jpg" height="353" width="230" alt="Cristo Redentor" /></td> </tr> <tr> <td><img src="danoconnor/img/photography/u2.jpg" height="154" width="254" alt="U2 at Fordham University" /></td> </tr> </table> ``` My question is: how can I make [the photogrid](http://danoc.me) look like this: ![](https://i.imgur.com/4nTbr.jpg)?
Positioning Photos in a Grid (HTML)
CC BY-SA 3.0
0
2010-06-01T01:44:21.050
2017-01-13T18:06:34.867
2017-01-13T18:06:34.867
4,370,109
null
[ "html", "css", "xhtml", "html-table" ]
2,946,988
1
2,947,682
null
3
283
I started using [Code Collector Pro](http://www.mcubedsw.com/software/codecollectorpro) to organise and save my Emacs codes, and this software requires [TextMate bundles](http://svn.textmate.org/trunk/Bundles/) for syntax highlighting. They have a lisp bundle, but not an elisp bundle, at least not that I can see. I would think that the syntax highlighting would work under the lisp bundle, but for some reason it isn't happening. I have never even seen any lisp code with syntax highlighting, so it is possible that the thing is working and I don't know, but I honestly don't think so, because the ;; before a line seems to me to be a comment thing, so anything after that should be in the color defined for comments which in my case is green. Here is a picture of my code collector screen with a piece of code written by [huaiyuan](https://stackoverflow.com/users/16240/huaiyuan) answering my question posted [here](https://stackoverflow.com/questions/2935520/how-to-set-a-key-binding-to-make-emacs-as-transparent-opaque-as-i-want): ![alt text](https://dl.dropbox.com/u/1885087/CodeCollector.png) Is this looking as it should or is there something wrong? Back to the initial question: is there a textmate bundle for elisp or a bundle like the ones from textmate I can download to get syntax highlighting?
Is there such a thing as an "elisp bundle" for TextMate?
CC BY-SA 2.5
null
2010-06-01T02:30:21.677
2010-06-01T06:30:17.060
2017-05-23T12:17:03.450
-1
347,646
[ "lisp", "syntax-highlighting", "elisp", "bundle", "textmatebundles" ]
2,947,105
1
2,947,171
null
2
3,059
### Background Users can pick dates as shown in the following screen shot: ![](https://i.imgur.com/qi7tf.png) Any starting month/day and ending month/day combinations are valid, such as: - - The second combination is difficult (I call it the "tricky date scenario") because the year for the should come the year for the . That is to say, for the year 1900 (also shown selected in the screen shot above), the full dates would be: - - - - - ### Problem Writing a SQL statement that selects values from a table with dates that fall between the start month/day and end month/day, regardless of how the start and end days are selected. In other words, this is a year wrapping problem. ### Inputs The query receives as parameters: - - - ### Previous Attempt Consider the following MySQL code (that worked): ``` end_year = start_year + greatest( -1 * sign( datediff( date( concat_ws('-', year, end_month, end_day ) ), date( concat_ws('-', year, start_month, start_day ) ) ) ), 0 ) ``` How it works, with respect to the tricky date scenario: 1. Create two dates in the current year. 2. The first date is Dec 22, 1900 and the second date is Feb 28, 1900. 3. Count the difference, in days, between the two dates. 4. If the result is negative, it means the year for the second date must be incremented by 1. In this case: Add 1 to the current year. Create a new end date: Feb 28, 1901. Check to see if the date range for the data falls between the start and calculated end date. 5. If the result is positive, the dates have been provided in chronological order and nothing special needs to be done. This worked in MySQL because the difference in dates would be positive or negative. ### Question How should the following (broken) code be rewritten for PostgreSQL to take into consideration the relative chronological order of the starting and ending month/day pairs (with respect to introducing that tricky annual temporal displacement)? ``` SELECT m.amount FROM measurement m WHERE (extract(MONTH FROM m.taken) >= month1 AND extract(DAY FROM m.taken) >= day1) AND (extract(MONTH FROM m.taken) <= month2 AND extract(DAY FROM m.taken) <= day2) ``` Any thoughts, comments, or questions? (The dates are pre-parsed into MM/DD format in PHP. My preference is for a pure PostgreSQL solution, but I am open to suggestions on what might make the problem simpler using PHP. The SQL lives in a stored procedure that is called by JasperReports, so the only items PHP can touch are the dates passed into the reporting engine.) ### Update #1 The following code nearly works: ``` select (extract(YEAR FROM m.taken)||'-12-12')::date as start_date, ((extract(YEAR FROM m.taken)+ greatest( 0, sign( (extract(YEAR FROM m.taken)||'-12-12')::date - (extract(YEAR FROM m.taken)||'-02-01')::date) ))||'-02-01')::date as end_date, m.taken, extract(YEAR FROM m.taken) as year_taken from measurement m where m.station_id = 200 AND m.category_id = 1 AND (m.taken, m.taken) OVERLAPS ((extract(YEAR FROM m.taken)||'-12-12')::date, ((extract(YEAR FROM m.taken)+ greatest( 0, sign( (extract(YEAR FROM m.taken)||'-12-12')::date - (extract(YEAR FROM m.taken)||'-02-01')::date) ))||'-02-01')::date) ``` It produces the correct start and end date constraints: ``` start_date ;end_date ;taken ;year_taken "1969-12-12";"1970-02-01";"1969-12-12";1969 "1969-12-12";"1970-02-01";"1969-12-13";1969 ... "1969-12-12";"1970-02-01";"1969-12-31";1969 "1970-12-12";"1971-02-01";"1970-12-12";1970 ``` However, the values between `1970-01-01` and `1970-02-01` are missing, but must be included. ### Versions PostgreSQL 8.4.4 and PHP 5.2.10
Calculate year for end date: PostgreSQL
CC BY-SA 2.5
0
2010-06-01T03:18:33.227
2016-07-30T04:33:23.700
2016-07-30T04:33:23.700
1,090,562
59,087
[ "php", "sql", "postgresql", "date" ]
2,947,418
1
2,954,517
null
1
274
I'm trying to get a faster pathfinding mechanism in place in a game I'm working on for a connected node graph. The nodes are classed into two types, "Networks" and "Routers." ![](https://img.photobucket.com/albums/v714/darkflight_devil/Networks_1.png) In this picture, the blue circles represent routers and the grey rectangles networks. Each network keeps a list of which routers it is connected to, and vice-versa. Routers cannot connect directly to other routers, and networks cannot connect directly to other networks. ![](https://img.photobucket.com/albums/v714/darkflight_devil/Networks_2.png) Networks list which routers they're connected to ![](https://img.photobucket.com/albums/v714/darkflight_devil/Networks_3.png) Routers do the same I need to get an algorithm that will map out a path, measured in the number of networks crossed, for each possible source and destination network excluding paths where the source and destination are the same network. I have one right now, however it is unusably slow, taking about two seconds to map the paths, which becomes incredibly noticeable for all connected players. The current algorithm is a depth-first brute-force search (It was thrown together in about an hour to just get the path caching working) which returns an array of networks in the order they are traversed, which explains why it's so slow. Are there any algorithms that are more efficient? As a side note, while these example graphs have four networks, the in-practice graphs have 55 networks and about 20 routers in use. Paths which are not possible also can occur, and as well at any time the network/router graph topography can change, requiring the path cache to be rebuilt. What approach/algorithm would likely provide the best results for this type of a graph?
Fast path cache generation for a connected node graph
CC BY-SA 2.5
null
2010-06-01T05:17:14.690
2010-06-02T01:50:14.093
2017-02-08T14:26:19.567
-1
50,005
[ "theory", "path-finding" ]
2,949,244
1
null
null
0
1,004
I would like to embed an activity graph created by [hgactivity](http://labs.freehackers.org/wiki/hgactivity) inside my hgweb webinterface. What's the best method to do so? Here's a screenshot of a hgactivity graph: ![alt text](https://labs.freehackers.org/attachments/download/217) It shows the number of commits through time to a Mercurial repository.
How to embed a hgactivity graph in hgweb
CC BY-SA 2.5
0
2010-06-01T11:15:44.233
2011-01-16T13:18:01.803
2017-02-08T14:26:20.247
-1
47,860
[ "templates", "mercurial", "hgweb" ]
2,950,240
1
null
null
15
16,949
I need to apply a `TextWrapping` in the WPF `CheckBox`. Please look at this two samples: ``` <CheckBox> <TextBlock TextWrapping="Wrap" Text="_This is a long piece of text attached to a checkbox."/> </CheckBox> <CheckBox> <AccessText TextWrapping="Wrap" Text="_This is a long piece of text attached to a checkbox."/> </CheckBox> ``` If I use a `TextBlock` in the `Content` of the `CheckBox`, the check element (vertical alignment is top) and the text displays properly, but not the accelerator. ![alt text](https://sites.google.com/a/wpfmentor.com/resources/Home/accelerator.PNG) If I use an `AccessText` in the `Content` of the `CheckBox`, the check element displays wrong (vertical alignment is center). How can I change the `Style` of the elements to display this `CheckBox` correct?
WPF CheckBox style with the TextWrapping
CC BY-SA 3.0
0
2010-06-01T13:42:07.770
2021-07-09T12:37:24.683
2017-02-08T14:26:21.060
-1
104,930
[ "wpf", "checkbox", "styles", "alignment", "word-wrap" ]
2,951,126
1
2,994,617
null
0
4,547
I want something like this: [](https://i.stack.imgur.com/QRC6D.jpg) [cybernetnews.com](https://cybernetnews.com/wp-content/uploads/2008/10/windows-7-wireless.jpg) This window is not resizable, and aligns itself above the system tray icon which it is related to. I have this: ![Tray popup](https://i.imgur.com/79FZi.png) Which is resizeable, and it goes wherever it feels like. If you click the volume control in Win 7, it always pops up directly above the icon. This is ideal. I've found [this reference](https://stackoverflow.com/questions/2169006/create-a-system-tray-styled-box-in-winforms-c) which I think is trying to solve the same problem (can't tell though as the images are dead), but I'm using WPF and I'm not sure how to get these Form objects they refer to from my Window object. This is the XAML declaration of my window at the moment: ``` <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="WirelessControl.Window1" x:Name="Window" Title="Window1" Width="260" Height="370" mc:Ignorable="d" WindowStyle="None"></Window> ``` I feel like based on how common this is in Windows that there must be a fairly easy way to do this. `ResizeMode="NoResize"` causes my window border to disappear, so that's no help. Thanks guys, I hope I was comprehensive enough.
System Tray Popup Windows 7 Style
CC BY-SA 4.0
0
2010-06-01T15:39:56.053
2019-07-28T11:06:40.307
2020-06-20T09:12:55.060
-1
258,107
[ "wpf", "windows-7", "system-tray" ]
2,953,629
1
2,962,189
null
0
2,699
When a J2ME application runs on Samsung phone with an OS that supports TouchWhiz (GT-S5320, in my case),a virtual keypad is shown on the screen by default and always! This virtual keypad consists of the following keys - LEFT,RIGHT,UP,DOWN,FIRE and SOFT1, SOFT2. Is there anyway I can control when this keypad is displayed and when it isn't. I understand that this would be a platform specific solution. But does it exist? Thanks, -- Kiran Kuppa EDIT: I must also note that Google Maps, ( seems to be a J2ME app) does not show this keypad. I am sure there must be a way to supress it. EDIT2: Thanks for the correction. I am attaching a picture to illustrate.![alt text](https://i.imgur.com/r3p14.jpg)
J2ME UI on Samsung Bada platform
CC BY-SA 2.5
0
2010-06-01T21:51:58.450
2012-04-12T07:30:46.567
2011-10-12T08:29:07.617
839,601
76,036
[ "user-interface", "java-me", "midp", "bada", "lcdui" ]
2,954,230
1
null
null
5
9,581
I'm a programmer but new to (La)TeX. As far as I can tell, neither the Computer Modern nor Latin Modern fonts have glyphs for the full greek alphabet. I installed (OS X) a Latin Modern font that came with TeX Live (lmroman10-regular.otf). As you can see in the attached image, the lowercase greek letters (and nabla) are displayed (TextEdit) using some default font. Also shown in the image is LaTeXiT displaying pretty lowercase greek letters that seem to be Latin-Modern-Italic-ish. So what font(s) are used by LaTeX for greek (and math symbols)? Where would I find them in the TeX fonts directory? Image: ![http://imgur.com/dvyyB.png](https://i.stack.imgur.com/B22we.png)
LaTeX: Default font(s) for greek letters?
CC BY-SA 3.0
0
2010-06-02T00:20:14.760
2019-06-06T16:02:15.340
2011-12-04T00:10:57.483
84,042
350,461
[ "latex", "fonts" ]
2,955,185
1
2,955,209
null
1
4,913
I have a Table (or a region) and want to set it's Width and Height value to another Div (or region). The second one is actually a Ajax Indicator modal which display a loading text when the page is asynchronously post back. here is the example ``` <table id="MainTable"> <tr> <td> Content .... </td> </tr> </table> <div id="Progress"> Ajax Indocator </div> ``` the following javascript didn't work ``` document.getElementById("Progress").style.width = document.getElementById("MainTable").style.width; document.getElementById("Progress").style.height = document.getElementById("MainTable").style.height; ``` It should work both on IE and FireFox. how to correct it. I checked some other solution in StackOverFlow but I couldn't fix it. I'm waiting to hear from you. --- Update : I use this ``` <script> function SetSize(regionToChange, mainRegion) { $(document).ready(function() { $('#regionToChange) .width($('#mainRegion).outerWidth()) .height($('#mainRegion).outerHeight()); }); } </script> ``` and I call it like ``` <asp:Button ID="btnReset" runat="server" SkinID="Button" Text="Reset" OnClick="btnReset_OnClick" OnClientClick="SetSize('Progress', 'MainTable');" /> ``` But it shows me an error which can not find the object --- I see this error ![alt text](https://hajloo.files.wordpress.com/2010/06/objectexpected.jpg?w=432) and in debugger I face with this ![alt text](https://hajloo.files.wordpress.com/2010/06/objectexpected_developertools.jpg?w=890)
How to Get / Set Div and Table Width / Height
CC BY-SA 2.5
null
2010-06-02T05:25:05.057
2010-07-11T10:26:12.310
2017-02-08T14:26:23.447
-1
243,213
[ "asp.net", "javascript", "jquery", "html", "ajax" ]
2,957,305
1
2,957,375
null
1
198
I am just looking at setting up a simple viewController programatically, I have a ViewController.xib file that I have set the background color to RED in interface builder. I have also added the following to my AppDelegate.m ``` @implementation syntax_MapViewAppDelegate @synthesize window; -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { viewController = [[MapViewController alloc] init]; [window addSubview:[viewController view]]; [window makeKeyAndVisible]; return YES; } -(void)dealloc { [viewController release]; [window release]; [super dealloc]; } @end ``` When I run the code it does what I expect apart from the white bar at the bottom of the screen, can anyone give me any pointers in how to remove this? I have a feeling I might need to position the view within the window, but I am not sure how? ![alt text](https://farm2.static.flickr.com/1287/4663129614_11883617dc_o.png) cheers Gary
Simple ViewController / View, remove white bar?
CC BY-SA 2.5
null
2010-06-02T11:42:06.607
2010-06-02T12:02:14.943
2017-02-08T14:26:25.143
-1
164,216
[ "iphone", "objective-c", "cocoa-touch" ]
2,957,755
1
2,958,229
null
7
486
So I just wrote a little snippet to generate the Mandelbrot fractal and imagine my surprise when it came out all ugly and skewed (as you can see at the bottom). I'd appreciate a point in the direction of why this would even happen. It's a learning experience and I'm not looking for anyone to do it for me, but I'm kinda at a dead end debugging it. The offending generation code is: ``` module Mandelbrot where import Complex import Image main = writeFile "mb.ppm" $ imageMB 1000 mandelbrotPixel x y = mb (x:+y) (0:+0) 0 mb c x iter | magnitude x > 2 = iter | iter >= 255 = 255 | otherwise = mb c (c+q^2) (iter+1) where q = x -- Mandelbrot -- q = (abs.realPart $ x) :+ (abs.imagPart $ x) --Burning Ship argandPlane x0 x1 y0 y1 width height = [ (x,y) | y <- [y1, y1 - dy .. y0], --traverse from x <- [x0, x0 + dx .. x1] ] --top-left to bottom-right where dx = (x1 - x0) / width dy = (y1 - y0) / height drawPicture :: (a -> b -> c) -> (c -> Colour) -> [(a, b)] -> Image drawPicture function colourFunction = map (colourFunction . uncurry function) imageMB s = createPPM s s $ drawPicture mandelbrotPixel (replicate 3) $ argandPlane (-1.8) (-1.7) (0.02) 0.055 s' s' where s' = fromIntegral s ``` And the image code (which I'm fairly confident in) is: ``` module Image where type Colour = [Int] type Image = [Colour] createPPM :: Int -> Int -> Image -> String createPPM w h i = concat ["P3 ", show w, " ", show h, " 255\n", unlines.map (unwords.map show) $ i] ``` ![Ugly Mandelskew thing](https://imgur.com/R3fmQ.png)
Why would an image (the Mandelbrot) be skewed and wrap around?
CC BY-SA 2.5
0
2010-06-02T12:46:10.423
2010-06-02T16:19:46.123
2010-06-02T14:01:33.787
157,360
null
[ "image", "haskell", "mandelbrot" ]
2,961,444
1
null
null
4
2,456
I just had to write the most redonkulous expression in an SSIS Derived Column to get dates formatted like "01-JAN-2010".  It lookes like this:       ![alt text](https://i.imgur.com/CCOYU.png) There's got to be a better way... isn't there?
Is there a decent technique for SSIS Derived Column date formatting?
CC BY-SA 2.5
null
2010-06-02T20:42:20.607
2010-06-03T14:09:39.187
2020-06-20T09:12:55.060
-1
856
[ "sql-server", "oracle", "ssis" ]
2,962,480
1
2,962,754
null
2
1,174
The picture explains it all. I've painted a new Thumb and it goes off the JSlider area when at higher than 95 or below 5. I've tried padding the Track with no success. ![alt text](https://dl.dropbox.com/u/2363305/Forums/Java/JSlider_Thumb_OffScreen.png) Does anyone have any tips? Here is my code. I believe my issue is fine turning the size of the thumb under the getThumbSize override. ``` private static class MySliderUI extends BasicSliderUI { private int thumbHeight = 22; private int thumbWidth = 22; public MySliderUI(JSlider b) { super(b); // this.thumbHeight = slider.getHeight(); // this.thumbWidth = slider.getHeight(); } @Override protected Dimension getThumbSize() { return new Dimension(thumbHeight, thumbWidth); } @Override public void paintTrack(Graphics g) { Graphics2D g2d = (Graphics2D) g; Rectangle r = trackRect; r.width = 40; // (int) (0.15 * r.getHeight()); float[] dist = { 0.1f, 0.5f, 0.9f }; Color[] colors = { new Color(34, 177, 76), new Color(255, 242, 0), new Color(237, 28, 36) }; Point2D start = new Point2D.Float(r.x, r.y); Point2D end = new Point2D.Float(r.x, r.y + r.height); LinearGradientPaint p = new LinearGradientPaint(start, end, dist, colors); g2d.setPaint(p); g2d.fill(r); } @Override public void paintThumb(Graphics g) { Graphics2D g1 = (Graphics2D) g; // Make a triangle - Arrow on Meter int[] x = new int[3]; int[] y = new int[3]; int n; // count of points // Set Points for Arrow Integer arrowX = thumbRect.x; Integer arrowY = thumbRect.y; x[0] = arrowX - 25; x[1] = arrowX - 25; x[2] = arrowX - 2; y[0] = arrowY - 17; // Top Left y[1] = arrowY + 27; // Bottom Left y[2] = arrowY + 5; // Tip of Arrow n = 3; // Number of points, 3 because its a triangle // Draw Arrow Border Polygon myTriShadow = new Polygon(x, y, n); // a triangle g1.setPaint(Color.black); g1.fill(myTriShadow); // Set Points for Arrow Board x[0] = x[0] + 2; x[1] = x[1] + 2; x[2] = x[2] - 3; y[0] = y[0] + 5; y[1] = y[1] - 5; y[2] = y[2]; // Color colorMeter = robot.getPixelColor(x[2]+10, y[2]); // Draw Arrow Polygon myTri = new Polygon(x, y, n); // a triangle // Color colr = new Color(); g1.setPaint(Color.yellow); g1.fill(myTri); // super.paintThumb(g); // replace with your fill() } } ```
Using paintThumb I've made my arrow fall off the JSlider when at 0 or 100, how can this be fixed?
CC BY-SA 2.5
null
2010-06-02T23:59:33.660
2010-06-03T17:09:46.337
2017-02-08T14:26:26.180
-1
328,536
[ "java", "swing", "paint", "jslider" ]
2,963,231
1
null
null
7
14,087
i have picture like this image it will present on Landscape Mode ![alt text](https://i708.photobucket.com/albums/ww82/RAGOpoR/landscape.png) so if rotate device to Portrait, how to present image like this ![alt text](https://i708.photobucket.com/albums/ww82/RAGOpoR/protrait.png)
Need help about contentMode and autoresizingMask of UIImageView
CC BY-SA 2.5
0
2010-06-03T03:54:16.567
2011-04-27T15:17:32.080
2017-02-08T14:26:26.857
-1
203,372
[ "iphone", "uiimageview" ]
2,963,602
1
2,964,905
null
3
4,111
I'm having trouble unpickling objects from Google App Engine. I am running Windows 7. Here is the procedure: 1. Create a CSV with one of the fields being pickle.dumps([[('CS', 2110), ('CS', 3300), ('CS', 3140)]]), or some similar argument. The CSV looks something like this: ``` INFO,2210,"CS 2110, 3300, 3140","(lp0 (lp1 (S'CS' p2 I2110 tp3 a(g2 I3300 tp4 a(g2 I3140 tp5 aa." CS,3110,CS 2110 or equivalent experience,"(lp0 (lp1 (S'CS' p2 I2110 tp3 aa." MSE,4102,"MATH 2210, 2230, 2310, or 2940","(lp0 (lp1 (S'MATH' p2 I2210 tp3 a(g2 I2230 tp4 a(g2 I2310 tp5 aa(lp6 (g2 I2940 tp7 aa." ``` (Yes, those are `\n`s produced by `pickle.dumps()`) 1. Load this file into the google app engine devserver: `appcfg.py upload_data --config_file="DataLoader.py" --filename="pre_req_data.csv" --kind=Course --url=http://localhost:8083/remote_api "appdir"` : ``` class Course(db.Model): dept_code = db.StringProperty() number = db.IntegerProperty() raw_pre_reqs = db.StringProperty(multiline=True) original_description = db.StringProperty() def getPreReqs(self): pickle.loads(str(self.raw_pre_reqs)) ``` : ``` class CourseLoader(bulkloader.Loader): def __init__(self): bulkloader.Loader.__init__(self, 'Course', [('dept_code', str), ('number', int), ('original_description', str), ('raw_pre_reqs', str) ]) loaders = [CourseLoader] ``` 1. Confirm that the data is successfully loaded: ![data store](https://imgur.com/YmZ5W.png)![individual entity](https://imgur.com/lqUSt.png) 1. Try to unpickle: class MainHandler(webapp.RequestHandler): def get(self): self.writeOut('cock!') self.writeOut('\n') courses = Course().all() for c in courses: self.writeOut("%s => %s" % (c.raw_pre_reqs, c.getPreReqs())) def writeOut(self, string): self.response.out.write(string) 2. Observe error: Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp__init__.py", line 511, in call handler.get(*groups) File "main.py", line 30, in get self.writeOut("%s => %s" % (c.raw_pre_reqs, c.getPreReqs())) File "src\Models.py", line 17, in getPreReqs pickle.loads(str(self.raw_pre_reqs)) File "C:\Python26\lib\pickle.py", line 1374, in loads return Unpickler(file).load() File "C:\Python26\lib\pickle.py", line 858, in load dispatchkey File "C:\Python26\lib\pickle.py", line 966, in load_string raise ValueError, "insecure string pickle" ValueError: insecure string pickle
GAE: ValueError: insecure string pickle
CC BY-SA 2.5
null
2010-06-03T05:55:34.820
2010-10-25T18:31:36.337
null
null
147,601
[ "python", "google-app-engine", "pickle" ]
2,964,651
1
2,964,679
null
5
1,948
We would like to map a single table on two classes with NHibernate. The mapping has to be dynamically depending on the value of a column. Here's a simple example to make it a bit clearer: We have a table called Person with the columns id, Name and Sex. ![alt text](https://imgur.com/UQz9n.jpg) The data from this table should be mapped either on the class Male or on the class Female depending on the value of the column Sex. ![alt text](https://imgur.com/VIIPk.png) In Pseudocode: ``` create instance of Male with data from table Person where Person.Sex = 'm'; create instance of Female with data from table Person where Person.Sex = 'f'; ``` The benefit is we have strongly typed domain models and can later avoid switch statements. Is this possible with NHibernate or do we have to map the Person table into a flat Person class first? Then afterwards we would have to use a custom factory method that takes a flat Person instance and returns a Female or Male instance. Would be good if NHibernate (or another library) can handle this.
NHibernate mapping one table on two classes with where selection
CC BY-SA 2.5
null
2010-06-03T09:27:58.033
2010-06-03T09:38:42.473
null
null
79,954
[ ".net", "nhibernate", "orm", "nhibernate-mapping", "mapping" ]
2,965,046
1
null
null
1
693
[Views slideshow](http://drupal.org/project/views_slideshow) for [Dupal](http://drupal.org/) is amazing … there are no other words for it. I have used it on a few projects with little to no issues at all. However, the current project that I am working on isn't going as smoothly. When the 'View style' is set to unformatted the preview returns the right amount of nodes but when slideshow is selected the query returns only one result. Puzzlingly, the SQL is exactly the same. ![Screenshot of the basic settings for slideshow](https://shaunbellis.co.uk/stackoverflow/slideshow.png) Can you shed some light on the issue?
Drupal views slideshow returning only one result
CC BY-SA 2.5
null
2010-06-03T10:28:10.337
2011-01-06T23:08:44.510
2017-02-08T14:26:28.567
-1
219,999
[ "drupal", "plugins", "view", "drupal-views", "slideshow" ]
2,967,149
1
2,967,220
null
2
1,065
I'm interested in finding a way to enumerate all accessible devices on the local network, regardless of their IP address. For example, in a 192.168.1.X network, if there is a computer with a 10.0.0.X IP address plugged into the network, I want to be able to detect that rogue computer and preferrably communicate with it as well. Both computers will be running this custom software. > : We want to handle the situation where we what the single computer's IP address is and cannot guarantee that it's on any particular subnet. All we know is that the computer is physically plugged into the same switch and the computer has a static IP assigned to it (but that IP could be anything).We have remote access to one computer on the network (say, 192.168.1.30), and we want to be able to communicate with all other computers on the network, regardless of whether their static IP is set to 192.168.1.x, 10.0.0.x, 10.45.21.7, etc.) I realize that's a vague description, and a full solution to the problem would be lengthy, so I'm really looking for help finding the right direction to go in ("Look into using class XYZ and ABC in this manner") rather than a full implementation. The reason I want this is that our company ships imaged computers to thousands of customers, each of which have different network settings (most use the same IP scheme, but a large percentage do not, and most do not have DHCP enabled on their networks). Once the hardware arrives, we have a hard time getting it up on the network, especially if the IP scheme doesn't match, since there is no one technically oriented on-site. Ideally, I want to design some kind of console to be used from their main workstation which looks out on the network, finds all computers running our software, displays their current IP address, and allows you to change the IP. : Unless I've misunderstood something, I don't think I can use the broadcast address 255.255.255.255 to do this. the problem is that the rogue compuer doesn't have a route back to the originating computer, so it'll drop the packet. Perhaps I've misunderstood something, but the diagram below shows my understanding of what would happen. ![](https://www.websequencediagrams.com/cgi-bin/cdraw?lz=cGFydGljaXBhbnQgMTkyLjE2OC4xLjMwIGFzIEEKABENMC4wLjAuNDcgYXMgQgoKbm90ZSBvdmVyIEE6IFNlbmRpbmcgYnJvYWRjYXN0CkEtPkI6IGRlc3Q6IDI1NS4yNTUuAAEHXG5zcmM6AGINAEMLQjogUmVjZWl2ZWQgcGFja2V0AA8OTm8gcm91dGUgdG8AgSUNIQA2DkNhbm5vdCByZXBseQ&s=modern-blue)
Communicating with all network computers regardless of IP address
CC BY-SA 2.5
null
2010-06-03T15:00:31.370
2010-06-03T19:45:43.927
2017-02-08T14:26:29.250
-1
19,818
[ ".net", ".net-3.5", "networking", ".net-2.0", "pinvoke" ]
2,967,332
1
2,969,692
null
30
14,896
Are there any Event Driven Architecture jQuery plugins? # Step 1: Subscribing ![alt text](https://farm5.static.flickr.com/4051/4667387638_e3078f4c2c_b.jpg) The subscribers subscribe to the event handler in the middle, and pass in a callback method, as well as the name of the event they are listening for... i.e. The two green subscribers will be listening for p0 events. And the blue subscriber will be listening for p1 events. --- # Step 2: The p0 event is fired by another component to the Event Handler ![alt text](https://farm5.static.flickr.com/4018/4666766899_301986d0a9_b.jpg) 1. A p0 event is fired to the Event Handler 2. The event handler notifies it's subscribers of the event, calling the callback methods they specified when they subscribed in Step 1: Subscribing. Note that the blue subscriber is not notified because it was not listening for p0 events. --- # Step 3: The p1 event is fired a component to the Event Handler ![alt text](https://farm5.static.flickr.com/4039/4667387678_6a7bb76dee_b.jpg) The p1 event is fired by another component Just as before except that now the blue subscriber receives the event through its callback and the other two green subscribers do not receive the event. [Images by leeand00, on Flickr](http://www.flickr.com/photos/leeand00/4667387678/) I can't seem to find one, but my guess is that they just call it something else in Javascript/jquery Also is there a name for this pattern? Because it isn't just a basic publisher/subscriber, it has to be called something else I would think.
jQuery plugin for Event Driven Architecture?
CC BY-SA 2.5
0
2010-06-03T15:22:59.310
2013-07-09T01:42:40.313
2020-06-20T09:12:55.060
-1
18,149
[ "javascript", "jquery-plugins", "publish-subscribe", "event-driven-design", "event-bus" ]
2,968,102
1
2,968,132
null
1
207
.cproj is not the only name of the project file. My solution says there are 5 projects but only three .cproj files are seen. What is the file extinsion of other project files/? THe icon that represents the other two look different as well: ![alt text](https://i67.photobucket.com/albums/h292/Athono/microsoft/froups.jpg)
What are the other possible names of project files in C# other than .cproj?
CC BY-SA 2.5
null
2010-06-03T16:57:34.433
2010-06-03T17:00:53.797
2017-02-08T14:26:32.010
-1
54,760
[ "visual-studio-2010", "c#-4.0", "project", "vcproj" ]
2,968,177
1
3,104,680
null
12
1,120
What exactly is the difference watching and monitoring a project on the SourceForge Tracker UI? The tool tips aren't really helpful. Hold your mouse over the "Monitor" button and it says "Monitor this project". Hold it over "Watch" and it says nothing. > ![sourceforge panel with buttons](https://i.stack.imgur.com/AS9dG.png)
Monitor vs Watch on SourceForge Tracker
CC BY-SA 3.0
0
2010-06-03T17:06:48.140
2011-10-19T22:08:19.060
2011-10-19T22:08:19.060
9,314
45,603
[ "sourceforge" ]
2,968,508
1
2,969,925
null
6
12,628
I'm using a UILabel for the titleView of a navigation bar (I'm making simple in-app web browser). It works fine, except that when I present a modal view controller, the titleView shifts from the center of the navbar to the far left (underneath the back button). I've tested in 3.0 and up. Here is relevant code: ``` - (void)viewDidLoad { [super viewDidLoad]; // Title view label CGRect labelFrame = CGRectMake(0.0, 0.0, 120.0, 36.0); UILabel *label = [[[UILabel alloc] initWithFrame:labelFrame] autorelease]; label.font = [UIFont boldSystemFontOfSize:14]; label.numberOfLines = 2; label.backgroundColor = [UIColor clearColor]; label.textAlignment = UITextAlignmentCenter; label.textColor = [UIColor whiteColor]; label.shadowColor = [UIColor blackColor]; label.shadowOffset = CGSizeMake(0.0, -1.0); label.lineBreakMode = UILineBreakModeMiddleTruncation; self.navigationItem.titleView = label; } -(void)displayComposerSheet:(NSString*)mailto { MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [self presentModalViewController:picker animated:YES]; [picker release]; } ``` Screenshots: ![enter image description here](https://i.stack.imgur.com/p80VQ.jpg) Any idea why this is happening? Thanks.
Why does navigationItem.titleView align left when presentmodalviewcontroller called?
CC BY-SA 3.0
0
2010-06-03T17:53:53.220
2018-03-18T03:57:11.277
2014-01-20T11:44:55.363
1,650,785
268,153
[ "ios", "iphone", "cocoa-touch", "uinavigationbar" ]
2,968,558
1
2,968,632
null
3
589
So, I'm attempting to access the content of an object and for the life of me can't figure out why I can't. I'm starting to believe that the object doesn't have the properties that Firebug indicates that it does. More likely than that I'm just not using the right syntax to access them. Give the following function: ``` function(userData) { console.log(userData); // statement 1 console.log(userData.t_nodecontent); // statement 2 } ``` Which generates the following FireBug output for statement 1 ![image](https://farm5.static.flickr.com/4004/4666371931_81ae561dab_o.png) and `undefined` for statement 2. (Note: Originally incorrectly indicated that I was seeing `unknown`) Is there something obvious that I'm overlooking in the way I'm attempting to reference the value of `t_nodecontent`? I'm at a loss :(
An Inaccessible JavaScript Object property - Why is Firebug showing this?
CC BY-SA 2.5
null
2010-06-03T18:02:36.953
2011-01-25T06:35:59.637
2017-02-08T14:26:32.370
-1
26,241
[ "javascript", "firebug" ]
2,969,344
1
null
null
4
902
I have data I would like to plot, and more importantly, do a least squares regression on using cosines (instead of using polynomials): ![http://imgur.com/AkEaE.png](https://i.stack.imgur.com/2F1DU.png) Any recommendations? Thanks.
Plotting data and doing a least squares regression with cosines in java
CC BY-SA 3.0
null
2010-06-03T20:02:25.027
2011-12-03T23:44:04.053
2011-12-03T23:44:04.053
84,042
354,979
[ "java", "plot", "least-squares" ]
2,969,995
1
2,970,159
null
0
71
Please see screenshot: ![screenshot](https://imgur.com/cTilv.gif) Goal: - - - The left hand side of the screenshot shows the output that Id like. The RHS shows the table data. All of the comments are held in 1 table. Im a beginner with SQL queries, the best I can do is: ``` SELECT * FROM [Comments] WHERE ([ArticleId] = @ArticleId) ORDER BY [ThreadId] DESC, [DateMade] ``` This somewhat does the job, but it obviously neglects the rating. So the above statement would show output where Bobs Comment and all of the children comments are before Amy's and her childrens comments. How can I run this query correctly?
Help with an SQL query on a single (comments) table (screenshot included)
CC BY-SA 2.5
null
2010-06-03T21:43:45.830
2010-06-03T22:34:52.680
2010-06-03T22:34:52.680
267
344,748
[ "tsql" ]
2,971,518
1
2,971,566
null
1
403
I have polygon chains similar to the following... ![alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Self_crossed_polygonal_chain.svg/220px-Self_crossed_polygonal_chain.svg.png) ...given the chain in the image, how would I go about calculating a chain that defines but without crossing paths? Specifically, in the case of the image's input chain, the result I want looks like this: , , Intersect between and , Intersect between and , , , Intersect between and , , Intersect between and , I'm looking for an algorithm to accomplish this for any chain, but I'm not sure what I'm trying to do is even called, which makes searching for a solution tricky. If there's a name for what I'm trying to do it would be of great help to know it. Thank you for any assistance!
Polygon Chain - Conversion to non-crossing while preserving shape?
CC BY-SA 2.5
0
2010-06-04T04:29:53.283
2010-06-04T04:56:04.997
2017-02-08T14:26:32.707
-1
135,557
[ "c++", "c", "geometry", "computational-geometry" ]
2,972,550
1
null
null
3
288
I am debugging a Visual C++ project that uses Rogue Wave a lot. I would like to see content of RW containers easily, i.e. i want to see list elements instead of this: ![](https://imgur.com/IRiFX.png) What are my options? Can autoexp.dat do this?
How to get a nice view of data structure in debugger?
CC BY-SA 2.5
0
2010-06-04T08:31:14.717
2010-06-04T09:41:48.940
2010-06-04T09:25:24.063
20,310
20,310
[ "debugging", "visual-c++", "visual-studio-2005", "rogue-wave" ]
2,973,165
1
3,043,006
null
38
105,464
I have some problems with the Form.AutoScaleMode property together with fixed size controls, when using a non-default font. I boiled it down to a simple test application (WinForms 2.0) with only one form, some fixed size controls and the following properties: ``` class Form1 : Form { // ... private void InitializeComponent() { // ... this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.Font = new System.Drawing.Font("Tahoma", 9.25F); // ... } } ``` Under 96dpi, Windows XP, the form looks correctly like this 96 dpi example: ![96 dpi WinForm](https://i.stack.imgur.com/TH0sC.jpg) Under 120 dpi, Windows XP, the the Windows Forms autoscaling feature produces this 120 dpi example: ![Previous WinForm scaled to 120 dpi](https://i.stack.imgur.com/O8Ao6.jpg) As you can see, groupboxes, buttons, list or tree views are scaled correctly, multiline text boxes get too big in the vertical axis, and a fixed size label does not scale correctly in both vertical and horizontal direction. Seems to be bug in the .NET framework? EDIT: some hints: the Font change is only applied to the containing form, the controls inherit their font from the form. I would like to keep it this way, if possible. Using the default font (Microsoft Sans Serif 8.25pt), this problem does not occur. Using `AutoScaleMode = Font` (with adequate AutoScaleDimensions, of course) either does not scale at all or scales exactly like seen above, depending on when the Font is set (before or after the change of AutoScaleMode). The problem is not specific to the "Tahoma" Font, it occurs also with Microsoft Sans Serif, 9.25pt. And yes, i already read this SO post [high DPI problems](https://stackoverflow.com/questions/2114857/high-dpi-problems) but it does not really help me. Any suggestions how to come around this? EDIT2: Some additional information about my intention: I have about 50 already working fixed size dialogs with several hundreds of properly placed, fixed size controls. They were migrated from an older C++ GUI framework to C#/Winforms, that's why they are all fixed-size. All of them look fine with 96 dpi using a 9.25pt font. Under the old framework, scaling to 120 dpi worked fine - all fixed size controls scaled equal in both dimensions. Last week, we detected this strange scaling behaviour under WinForms when switching to 120 dpi. You can imagine that most of our dialogs now look very bad under 120 dpi. I am looking for a solution that avoids a complete redesign all those dialogs. EDIT3: To test this behaviour, IMHO it is a good idea to set up a virtual Windows XP environment with 120 dpi while the development environment resides under 96 dpi (at least, that's what I did). Changing between 96 and 120 dpi normally needs a reboot under Win XP, otherwise you don't see what really happens. ``` // As requested: the source code of Form1.cs namespace DpiChangeTest { public partial class Form1 : Form { public Form1() { InitializeComponent(); Font f = this.textBox1.Font; } } } // here the source of Form1.Designer.cs: namespace DpiChangeTest { partial class Form1 { private System.ComponentModel.IContainer components = null; protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Forms Designer generated code private void InitializeComponent() { System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("A list view control"); System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("A TreeView control"); this.button1 = new System.Windows.Forms.Button(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.listView1 = new System.Windows.Forms.ListView(); this.treeView1 = new System.Windows.Forms.TreeView(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(12, 107); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(150, 70); this.button1.TabIndex = 0; this.button1.Text = "Just a button"; this.button1.UseVisualStyleBackColor = true; // // groupBox1 // this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(150, 70); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; this.groupBox1.Text = "Just a groupbox"; // // textBox1 // this.textBox1.Location = new System.Drawing.Point(180, 12); this.textBox1.Multiline = true; this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(150, 70); this.textBox1.TabIndex = 2; this.textBox1.Text = "A multiline text box"; // // label1 // this.label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.label1.Location = new System.Drawing.Point(179, 107); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(150, 70); this.label1.TabIndex = 3; this.label1.Text = "A label with AutoSize=False"; // // listView1 // this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] { listViewItem2}); this.listView1.Location = new System.Drawing.Point(12, 201); this.listView1.Name = "listView1"; this.listView1.Size = new System.Drawing.Size(150, 70); this.listView1.TabIndex = 4; this.listView1.UseCompatibleStateImageBehavior = false; // // treeView1 // this.treeView1.Location = new System.Drawing.Point(179, 201); this.treeView1.Name = "treeView1"; treeNode2.Name = "Knoten0"; treeNode2.Text = "A TreeView control"; this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { treeNode2}); this.treeView1.Size = new System.Drawing.Size(150, 70); this.treeView1.TabIndex = 5; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.ClientSize = new System.Drawing.Size(343, 289); this.Controls.Add(this.treeView1); this.Controls.Add(this.listView1); this.Controls.Add(this.label1); this.Controls.Add(this.textBox1); this.Controls.Add(this.button1); this.Controls.Add(this.groupBox1); this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.25F); this.Name = "Form1"; this.Text = "Form1"; this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button button1; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label label1; private System.Windows.Forms.ListView listView1; private System.Windows.Forms.TreeView treeView1; } } // and Main.cs [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } ```
AutoScaleMode problems with changed default font
CC BY-SA 3.0
0
2010-06-04T10:12:43.110
2017-07-17T20:41:19.430
2017-05-23T11:53:15.330
-1
220,984
[ "c#", ".net", "winforms" ]
2,974,656
1
4,170,082
null
1
525
I'm trying to shrink the caption box to fit its text content. Here's what I have: ![alt text](https://farm5.static.flickr.com/4016/4668568673_0096bde320.jpg) Here's what I'm after: ![alt text](https://farm2.static.flickr.com/1299/4669193400_6b5e57e393.jpg) The usual methods of float, display:inline/inline-block/table all cause variants of the following: ![alt text](https://farm2.static.flickr.com/1299/4668568653_ca22c4c093.jpg) in which the caption is broken out of the flow and becomes treated as a child element of the table's box. The table code is nothing special: ``` <table> <caption>Legendary fictional heroes</caption> <thead> <tr> <th>Name</th><th>Power</th><th>Nemesis</th> </tr> </thead> <tbody> <tr> <td>Dazzler</td><td>Sound-to-Light Transformation</td><td>Apocalypse</td> </tr> ... </tbody> </table> ``` Any ideas on how to accomplish what I want? Thanks in advance.
How to get a TABLE tag's CAPTION tag to shrink to fit its contents without breaking flow
CC BY-SA 2.5
0
2010-06-04T13:44:01.873
2010-11-13T00:03:04.720
2017-02-08T14:26:34.050
-1
null
[ "css", "html-table" ]
2,975,168
1
null
null
10
26,446
I've inherited a web application and when setting it up in Eclipse it shows errors in a particular JSP. The errors have no description associated with them in the Problems view, and clicking them there takes me to the top of the JSP, where the red error underline appears halfway through the string like this: ``` <%@ page erro[rPage="/basicError.j]sp" %> [<%@ page import="javax.s]ervlet.ServletContext" %> ``` Imagine a red 'error' underline under the parts bracketed by [] (bold, etc won't show in this code segment and I can't show the code at all unless it's in a code segment, hence using [ and ]. Other examples of the errors: ![enter image description here](https://i.stack.imgur.com/AtbvC.jpg) --- Clicking the red 'X' icon to the left of the lines does nothing. I've tried re-importing the project, refreshing, validating, moving the lines around, etc, but I always get this error. Does anyone know what's happening here?
Eclipse: What are these JSP errors?
CC BY-SA 3.0
0
2010-06-04T14:45:30.200
2016-03-04T20:41:04.170
2013-05-16T19:36:12.050
445,131
358,563
[ "eclipse", "jsp" ]
2,978,063
1
null
null
1
1,083
When creating inheritance hierarchy, I get confused. Abstract base class should contain only commonly used stuff for inherited classes. But knowing which is commonly used methods, fields and properties is not possible while designing. So I feel free myself to grouping them with abstract classes which inherits hierarchically. This is what I am doing without care about which my real classes where will be in hierarchy because I will find easily a place in comprehensive hierarchy. And also it is highly possible to find some unnecessary abstract classes in middle of hierarchy. But I don't know is this right way of designing? And which disadvantages can occur in none-perfect abstract hierarchy. I have to give clear example for it. Think chess and pieces. If I have to define pieces like pawn, queen, king etc. Look at below UML diagram. ![http://i.stack.imgur.com/1VC22.png](https://i.stack.imgur.com/1VC22.png) I divided hierarcy to 2 slided and none-slided pieces after Piece abstract class because I believe that sliding and none-sliding will require different commonly used members. But I can also divide them directionally because some pieces can go 8 directions, some can 4 directions and some can go to 2 or 3 directions. Grouping them directionally cause some new questions. Where they will be in hierarchy? they will come after sliding classes? If so possible to find four directional grouping under sliding and none-sliding groups and we know that it is not possible to inherited by 2 classes. So for such situations I have to choose interfaces? if directions will never be under both so it is possible to use abstract classes. That's ok then if I found again new common grouping which will not require inherited by 2 classes so I can define it under directions. In the end of design, all of my pieces can find perfect leaf nodes in hierarchy and this will be really good for future to have enough comprehensive building which I will not need change something in hierarchy. But what can be disadvantage to creating too large comprehensive hierarchy? Can be that in auto-complete of IDE can show many unnecessary and strange named abstract base classes which confuse others? what can be other disadvantages?
Questions while designing OOP hierarchy
CC BY-SA 3.0
0
2010-06-04T21:56:00.673
2012-04-18T10:53:54.540
2012-04-18T10:53:54.540
839,601
325,661
[ "oop", "inheritance", "hierarchy" ]
2,978,989
1
2,980,160
null
0
4,007
i want to style a submit button which seems to be rendered abit differently in different browsers. ``` <p id="lineInput"> <label for="task">Add a Task</label> <input type="text" name="task" id="task" /> <input type="submit" id="btnSubmit" value="Add" /> </p> #lineInput { ... ``` position: relative; margin: 0px; } ``` #btnSubmit { ... padding: 6px 8px; margin: 0; font: 1em/1em Hetilica; position: absolute; right: 2px; top: 3px; } ``` ![alt text](https://farm5.static.flickr.com/4070/4670887108_3fc5f9dc78.jpg) notice the add button is too low on chrome when `#btnSubmit` has `bottom: 3px`. the issue if fixed in chrome with `bottom: 5px` but in Firefox will be too high
Styling HTML Submit Button (CSS, Different Browsers)
CC BY-SA 2.5
null
2010-06-05T03:18:29.423
2010-06-05T11:37:57.093
2017-02-08T14:26:35.773
-1
292,291
[ "css" ]
2,979,127
1
3,036,807
null
14
36,523
I have added a default menu control to my user control. I need to style the menu to remove the left margin containing the space for the icon or checkbox. How can I do this? XAML: ``` <Menu> <MenuItem Header="MyMenu" FontSize="10"> <MenuItem Header="Options..." /> <MenuItem Header="About" /> </MenuItem> </Menu> ``` It currently renders like any other Menu control out of the box: ![alt text](https://farm2.static.flickr.com/1300/4671714146_d163452f52_o.gif) I don't want the margin or column to the left of the menu items. This is typically used for icons etc.
WPF - How to style the menu control to remove the left margin?
CC BY-SA 2.5
0
2010-06-05T04:14:46.730
2022-10-30T12:32:58.420
2020-06-20T09:12:55.060
-1
636
[ "wpf", "wpf-controls", "styling" ]
2,979,437
1
2,980,990
null
2
1,178
I have a entities as: - `BaseEntity`- `Employee`- `RegularEmployee`- `ContactEmployee` My inheritance structure is ![alt text](https://yuml.me/diagram/scruffy/class/%5BBaseEntity%5D%5E%5BEmployee%5D,%20%5BEmployee%5D%5E%5BRegularEmployee%5D,%20%5BEmployee%5D%5E%5BContractEmployee%5D) How to design database structure in this case considering all the tables have id and version fields (all tables should at least have these two fields).
how to implement inheritance in hibernate?
CC BY-SA 2.5
null
2010-06-05T06:35:33.057
2010-06-05T15:43:30.500
2017-02-08T14:26:36.480
-1
359,057
[ "java", "hibernate", "inheritance", "orm" ]
2,979,928
1
null
null
1
3,838
I'm just learning to use OpenCV and am having a problem with using DFT. I've done a signal processing class which used MatLab, so I'm trying to go through some of the exercises we did in that class. I'm trying to get and display the FT of an image, so I can mask some of the frequencies. I'd like to be able to see the FT, so I know how big to make the mask, but when I tried, I got an image like this: ![alt text](https://imgur.com/yfDdF.png) rather than like one of these [alt text http://www.ceremade.dauphine.fr/~peyre/numerical-tour/tours/graphics_synthesis_fourier/index_03.png](http://www.ceremade.dauphine.fr/~peyre/numerical-tour/tours/graphics_synthesis_fourier/index_03.png) Am I forgetting a step somewhere? I'm loading the image, converting its type to CV_32FC1, getting the matrix of it, getting the DFT, and then getting turning the resulting matrix back into an image. I'll post the code I'm using if it will be of any help? Or if someone has a link to an example of displaying the FT? I could only find ones which used it for the convolution. EDIT: Did I get the Phase of the image?
Displaying Fourier transforms in OpenCV
CC BY-SA 2.5
0
2010-06-05T10:14:13.993
2010-12-24T10:02:57.327
2010-06-05T10:22:21.580
90,317
90,317
[ "matlab", "image-processing", "opencv", "fft" ]
2,980,860
1
null
null
3
18,785
I want to create an image like this: ![alt text](https://lh6.ggpht.com/_4VSKzbK-Ieo/TAkTZwp5lSI/AAAAAAAAAEU/_fsy44Wu4Hc/fig2.jpg) From an image like this: [alt text http://internationalpropertiesregistry.com/Server/showFile.php?file=%2FUpload%2Funtitled.jpgb523c7595dd8e7514e1c6d51a83161a3.jpeg](http://internationalpropertiesregistry.com/Server/showFile.php?file=%2FUpload%2Funtitled.jpgb523c7595dd8e7514e1c6d51a83161a3.jpeg) Here's what's generated by `255-img`, but the result doesn't match exactly: [alt text http://internationalpropertiesregistry.com/Server/showFile.php?file=%2FUpload%2Funtitled.jpg61f9edbeb4f0285c2a1772cced3ce393.jpeg](http://internationalpropertiesregistry.com/Server/showFile.php?file=%2FUpload%2Funtitled.jpg61f9edbeb4f0285c2a1772cced3ce393.jpeg)
How do I invert a grayscale image and convert it to a binary image?
CC BY-SA 3.0
0
2010-06-05T15:06:12.543
2012-02-28T22:58:03.710
2017-02-08T14:26:34.397
-1
198,729
[ "matlab", "image-processing" ]
2,984,640
1
2,987,238
null
7
885
There are two data types: tasks and actions. An action costs a certain time to complete, and a set of tasks this actions consists of. A task has a set of actions, and our job is to choose one of them. So: ``` class Task { Set<Action> choices; } class Action { float time; Set<Task> dependencies; } ``` For example the primary task could be "Get a house". The possible actions for this task: "Buy a house" or "Build a house". The action "Build a house" costs 10 hours and has the dependencies "Get bricks" (which may cost 6 hours) and "Get cement" (which costs 9 hours), etcetera. The is the sum of all the times of the actions required to perform (in this case 10+6+9 hours). We want to choose actions such that the total time is minimal. Note that the dependencies can be diamond shaped. For example "Get bricks" could require "Get a car" (to transport the bricks) and "Get cement" would also require a car. Even if you do "Get bricks" and "Get cement" you only have to count the time it takes to get a car . Note also that the dependencies can be circular. For example "Money" -> "Job" -> "Car" -> "Money". This is no problem for us, we simply select all of "Money", "Job" and "Car". The total time is simply the sum of the time of these 3 things. Mathematical description: Let `actions` be the chosen actions. ``` valid(task) = ∃action ∈ task.choices. (action ∈ actions ∧ ∀tasks ∈ action.dependencies. valid(task)) time = sum {action.time | action ∈ actions} minimize time subject to valid(primaryTask) ``` I'm interested in an optimal solution but also in an approximate solution. Perhaps some kind of dynamic programming can help there? If the problem is tree structured then dynamic programming can give an optimal solution in polynomial time, but diamond structures seem to make the problem much more difficult. If you have an algorithm but it doesn't work if there are cycles, do post it! I can probably still learn a lot from it. ![alt text](https://i.imgur.com/ibOIO.png) The boxes represent tasks and the circles represent actions (the time to perform the action is in the circle). An action has a line to a task if that task is a dependency for the action. Here's the description of the problem again in terms of pictures: if a rectangle (=task) is chosen, then one of the circles (=actions) inside must be chosen. If a circle is chosen, then of the connected rectangles must be chosen. The goal is to minimize the sum of the numbers in the chosen circles. An optimal solution in this case is to choose the action with time 2 in the top task, and the actions with time 1 in the bottom tasks. The total time is 2+1+1=4. In this case there are 2 optimal solutions. The second solution is to choose the action with time 3 in the top task, and the action with time 1 in the bottom right task. The total time is 3+1=4 again. If we choose the action with time 3 in the top task we do not have to perform the left bottom task, because there is no line between the action with time 3 and the left bottom task. I apologize for the crappy drawing ;) And two more examples (the optimal solution for each has been indicated with blue, and the primary task has been indicated with grey): ![alt text](https://i.imgur.com/P1k8T.png)
Algorithm for optimally choosing actions to perform a task
CC BY-SA 2.5
0
2010-06-06T14:57:17.517
2010-06-07T15:37:40.730
2010-06-07T00:50:48.183
40,078
40,078
[ "algorithm", "optimization", "math", "computer-science" ]
2,985,074
1
7,697,167
null
49
54,570
I'm trying to configure Git to use Plink. It worked for me many times before. Now, for some reason, this option isn't available to me (it is disabled): ![Git Setup Plink option screenshot](https://i.stack.imgur.com/oESrx.png) I tried uninstalling and reinstalling Git a hundred times. Nothing. I can't get to this option enabled.
Configure Git to use Plink
CC BY-SA 3.0
0
2010-06-06T17:14:10.947
2023-01-10T00:07:41.393
2014-12-16T19:59:51.580
1,469,208
298,508
[ "git", "msysgit", "plink" ]
2,985,445
1
2,985,457
null
0
390
![aero glass titlebar example](https://imgur.com/BiVK7.png) All windows in Aero have this kind of whiteish background on their text. I'd like to create an equivalent of this effect for a GlassWindow I'm using that has a TextBlock in the label area, but I'm not really a designer so I have no idea how to approach this. How can I reproduce this background effect?
How to duplicate the "background" applied to text in Aero window titlebars?
CC BY-SA 2.5
null
2010-06-06T18:50:08.897
2010-06-06T19:55:44.887
null
null
277,425
[ "wpf", "text", "background", "aero", "aero-glass" ]
2,985,507
1
2,985,709
null
76
155,198
First of all, let me say I'm using LyX, though I have no problem using ERT. Secondly, what is the most simplest way to draw a simple graph like this in Latex? ![alt text](https://upload.wikimedia.org/wikipedia/commons/5/5b/6n-graf.svg) I've seen some documents with graphs and I've seen some examples, but I couldn't figure out how to just draw a simple graph - what packages do I need, etc?
How to draw a graph in LaTeX?
CC BY-SA 2.5
0
2010-06-06T19:03:57.540
2019-01-24T23:39:47.337
2020-06-20T09:12:55.060
-1
166,067
[ "latex", "graph-theory", "lyx" ]
2,988,057
1
null
null
0
314
In my database I have a hierarchical flat table that returns data ordered by ParentID, ObjectID asc I am having a bit of an issue getting this recursive function to work properly. I get the first Parent>Child>Child but after that I get nothing else. Any help with this is greatly appreciated. Here is my testing code: ``` $objectArr = array(); $objectData = DAOFactory::getTemplateObjectsDAO()->queryByTemplateID(1); for($i = 0; $i < count($objectData); $i++) { if(empty($objectData[$i]->parentID)) { echo $objectData[$i]->objectID; $objectArr[$i] = $objectData[$i]; $objectArr[$i]->children = array(); $objectArr[$i]->children = getChildren($objectData[$i]->objectID, $objectData); } } function getChildren($objectID, $data) { $childArr = array(); foreach($data as $object) { if($object->parentID == $objectID) { $childArr = $object; $childArr->children = array(); $childArr->children = getChildren($object->objectID, $data); } } return $childArr; } new dBug($objectData); ``` This is the output that I am getting: [Fullsize Link](https://imgur.com/zyM0F.png) ![alt text](https://imgur.com/zyM0Fl.jpg)
PHP Recursive Function
CC BY-SA 2.5
null
2010-06-07T08:39:35.453
2010-06-07T10:31:51.947
null
null
170,957
[ "php", "recursion" ]
2,989,229
1
null
null
0
111
I am working on a Yahoo! App and want to utilize YUI Features available, however, I haven't figured out a way to include the YUI Libraries in my App as yet. I was of the opinion that the Libraries will be a part of the App by default but seems its not true in my case. I have tried including the Libraries in my Code but it fails with an error that external files are not allowed, which makes perfect sense as inclusion of external Javascript and CSS isn't allowed. I have also tried to include the Javascript in the Gadget XML but I am not sure where to put exactly. I am not sure if I have done it correctly and at the correct place, following is a snippet for reference: ``` <Content type="html" view="YahooSmallView, default"> <script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.1/build/yahoo/yahoo.js&2.8.1/build/dom/dom.js&2.8.1/build/event/event.js"></script> </Content> <Content type="html" view="YahooFullView, canvas" href="http://www.myapp.com"> <script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.1/build/yahoo/yahoo.js&2.8.1/build/dom/dom.js&2.8.1/build/event/event.js"></script> </Content> ``` A Firebug Screenshot is below ![here](https://www3.picturepush.com/photo/a/3581951/img/Anonymous/yui-error.png) I have a feeling that this might be available as a feature and I might have to do something similar but I am not sure: ``` <Require feature="yui-2.8" /> ``` Can anyone in the community please provide some help with this issue?
Configuring YUI on YAP
CC BY-SA 2.5
null
2010-06-07T12:02:07.347
2014-10-31T21:51:01.280
2017-02-08T14:26:38.520
-1
151,540
[ "yui", "yahoo" ]
2,989,743
1
null
null
9
9,722
: One of our web applications requires write access to `C:\Windows\Temp`. However, no matter how much I weaken the NTFS permission, [procmon](http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) shows `ACCESS DENIED`. (which might or might not be relevant for the problem): We are using OLEDB to access an MS Access database (which is located of C:\Windows\Temp). Unfortunately, this OLEDB driver requires write access to the user profile's TEMP directory (which happens to be C:\Windows\Temp when running under IIS 7.5), otherwise the dreaded "Unspecified Error" OleDbException is thrown. See [KB 926939](http://support.microsoft.com/kb/926939) for details. I followed the steps in the KB article, but it doesn't help. : This is the output of `icacls C:\Windows\Temp`. For debugging purposes I gave full permissions to `Everyone`. ``` C:\Windows\Temp NT AUTHORITY\SYSTEM:(OI)(CI)(F) CREATOR OWNER:(OI)(CI)(IO)(F) BUILTIN\IIS_IUSRS:(OI)(CI)(S,RD) BUILTIN\Users:(CI)(S,WD,AD,X) BUILTIN\Administrators:(OI)(CI)(F) Everyone:(OI)(CI)(F) ``` However, this is the screenshot of procmon: ![procmon screenshot](https://i.stack.imgur.com/XwFBp.png) ``` Desired Access: Generic Read/Write, Delete Disposition: Create Options: Synchronous IO Non-Alert, Non-Directory File, Random Access, Delete On Close, Open No Recall Attributes: NT ShareMode: None AllocationSize: 0 Impersonating: MYDOMAIN\myuser ``` PS: When logged in as `MYDOMAIN\myuser`, I can create files in `C:\Windows\Temp` using Windows Explorer without any problems. : Relevant parts of web.config: ``` <authentication mode="Windows" /> <identity impersonate="true" /> <authorization> <deny users="?" /> <allow users="*" /> </authorization> ``` Authentication seems to work, i.e., `System.Security.Principal.WindowsIdentity.GetCurrent().Name` (which is shown on my custom error page) returns `MYDOMAIN\myuser`.
IIS 7.5, ASP.NET, impersonation, and access to C:\Windows\Temp
CC BY-SA 3.0
0
2010-06-07T13:08:47.263
2013-09-23T15:15:17.890
2013-09-23T15:15:17.890
483,162
87,698
[ "asp.net", "iis-7", "windows-7", "permissions", "impersonation" ]
2,990,372
1
2,990,422
null
-1
151
so I have two tables. They are pictured below. I have a master table "all_reports". And a user table "user list". The master table may have users that do not exist in the user list. I need to add them to the user list. The master table may have duplicates in them (check picture). The master list does not contain all the information that the user list requires (no manager, no HR status, no department.. again check picture). so in summary, distinct users from master table that do not exist in user table need to be migrated over. Only fields that are common to them is recipient ID, and recipient name ![This is the MASTER TABLE](https://docs.google.com/uc?id=0B2EMqbpeBpQkOWE3NzE2ZjYtMzQ4Yy00ZGMyLTlmNzItYzQyNGYwYzU5MTdj&hl=en) ![this is the user table](https://lh4.googleusercontent.com/2uhjtn_IMPkyw3usGemUXI3_STpQnSO__cml7vCXpxMuNb0H0WJUsBQRcDdlQzwOOrp0k55duvFe43n55iO3ly8bwQ=s512)
sql insert query needed
CC BY-SA 2.5
null
2010-06-07T14:31:35.753
2010-06-20T21:26:00.887
2010-06-20T21:26:00.887
93,528
50,312
[ "sql", "ms-access" ]
2,991,097
1
2,991,166
null
7
2,828
This is a problem of unidirectional one-to-one mapping in NHibernate. ## Student.cs ``` public class Student { public int ID { get; set; } public int Roll { get; set; } public int RegNo { get; set; } public string Name { get; set; } public StudentDetail StudentDetail { get; set; } } ``` ## StudentDetail.cs ``` public class StudentDetail { public int ID { get; set; } public string Father { get; set; } public string Mother { get; set; } } ``` How can I map these classes (how do the hbm mapping files look like) to the following case of one-to-one relationship? ![alt text](https://farm5.static.flickr.com/4026/4678594717_3127393e6b_d.jpg) Please have a look at the classes and the table very carefully. Where can I put the `<many-to-one>` tag in `Student.hbm.xml` or `StudentDetail.hbm.xml`? If I put it in `Student.hbm.xml`, how can I map the column `StudentDetail.StudentID`, coz it is in a different table? So this mapping: ``` <class name="Student" table="Student"> <id name="ID" column="ID"> <generator class="native"/> </id> ....... <many-to-one class="StudentDetail" name="StudentDetail" column="StudentID" unique="true" cascade="all" /> </class> ``` generates the following exception: ``` {"Invalid column name 'StudentID'."} ``` On the other hand `<many-to-one>` can't be placed in `StudentDetail.hbm.xml`. Coz, `StudentDetail.cs` doesn't contain any property of type `Student`. Can I use `<one-to-one>`-tag? If yes where should I place it, in `Student.cs` or `StudentDetail.cs`? And how should I configure it?
How to do this Unidirectional NHibernate one-to-one mapping?
CC BY-SA 2.5
0
2010-06-07T16:03:39.760
2010-06-18T09:01:55.353
2017-02-08T14:26:39.577
-1
159,072
[ "nhibernate", "one-to-one" ]
2,991,336
1
2,991,444
null
1
253
I didn't really know how to phrase the title of my questions, so my apologies in advance. I read through parts of the MEF documentation to try to find the answer to my question, but couldn't find it. I'm using ImportMany to allow MEF to create multiple instances of a specific plugin. That plugin Imports several parts, and within calls to a specific instance, it wants these Imports to be singletons. However, what I don't want is for all instances of this plugin to use the same singleton. For example, let's say my application `ImportMany`s Blender appliances. Every time I ask for one, I want a different Blender. However, each Blender `Import`s a ControlPanel. I want each Blender to have its own ControlPanel. To make things a little more interesting, each Blender can load BlendPrograms, which are also contained within their own assemblies, and MEF takes care of this loading. A BlendProgram might need to access the ControlPanel to get the speed, but I want to ensure that it is accessing the correct ControlPanel (i.e. the one that is associated with the Blender that is associated with the program!) This diagram might clear things up a little bit: ![alt text](https://farm5.static.flickr.com/4042/4679338778_46bed7f0c3_o.png) As the note shows, I believe that the confusion could come from an inherently-poor design. The BlendProgram shouldn't touch the ControlPanel directly, and instead perhaps the BlendProgram should get the speed via the Blender, which will then delegate the request to its ControlPanel. If this is the case, then I assume the BlendProgram needs to have a reference to a specific Blender. In order to do this, is the right way to leverage MEF and use an ImportingConstructor for BlendProgram, i.e. [ImportingConstructor] public class BlendProgram : IBlendProgram { public BlendProgram( Blender blender) {} } And if this is the case, how do I know that MEF will use the intended Blender plugin?
Are MEF's ComposableParts contracts instance-based?
CC BY-SA 2.5
null
2010-06-07T16:36:28.820
2010-06-07T16:49:45.583
2017-02-08T14:26:39.937
-1
214,071
[ "plugins", "inversion-of-control", "mef" ]
2,991,490
1
7,078,925
null
33
25,712
When rendering text into a bitmap, I find that text looks very bad when rendered on top of an area with non-opaque alpha. The problem is progressively worse as the underlying pixels become more transparent. If I had to guess I'd say that when underlying pixels are transparent, the text renderer draws any anti-aliased 'gray' pixels as solid black. Here are some screenshots: ![alt text](https://i.stack.imgur.com/AS1zC.png) ![alt text](https://i.stack.imgur.com/fv0HK.png) ![alt text](https://i.stack.imgur.com/tDvXj.png) Here is the code used to render the text: ``` g.SmoothingMode = SmoothingMode.HighQuality; g.DrawString("Press the spacebar", Font, Brushes.Black, textLeft, textTop); ```
Bad text rendering using DrawString on top of transparent pixels
CC BY-SA 4.0
0
2010-06-07T16:56:10.537
2019-05-14T09:37:39.317
2019-05-14T09:37:39.317
8,967,612
25,457
[ "c#", "winforms", "gdi+", "system.drawing", "drawstring" ]
2,992,264
1
2,999,689
null
16
11,004
![A photo](https://2.bp.blogspot.com/_cP3Pd1BRVXc/STmOuCiGLWI/AAAAAAAADrQ/YH548niXLhQ/s400/french+fries+in+Europe.JPG) Following [Denis's](https://stackoverflow.com/questions/2992264/extracting-a-quadrilateral-image-to-a-rectangle/2999689#2999689) link, this is how to use the [threeblindmiceandamonkey](http://threeblindmiceandamonkey.com/?p=16) code: ``` // the destination rect is our 'in' quad int dw = 300, dh = 250; double in[4][4] = {{0,0},{dw,0},{dw,dh},{0,dh}}; // the quad in the source image is our 'out' double out[4][5] = {{171,72},{331,93},{333,188},{177,210}}; double homo[3][6]; const int ret = mapQuadToQuad(in,out,homo); // homo can be used for calculating the x,y of any destination point // in the source, e.g. for(int i=0; i<4; i++) { double p1[3] = {out[i][0],out[i][7],1}; double p2[3]; transformMatrix(p1,p2,homo); p2[0] /= p2[2]; // x p2[1] /= p2[2]; // y printf("\t%2.2f\t%2.2f\n",p2[0],p2[1]); } ``` This provides a transform for converting points in destination to the source - you can of course do it the other way around, but it's tidy to be able to do this for the mixing: ``` for(int y=0; y<dh; y++) { for(int x=0; x<dw; x++) { // calc the four corners in source for this // destination pixel, and mix ``` For the mixing, I'm using [super-sampling](http://en.wikipedia.org/wiki/Supersampling) with random points; it works very well, even when there is a big disparity in the source and destination area --- In the image at the top, the sign on the side of the van is not face-on to the camera. I want to calculate, as best I can with the pixels I have, what it'd look like face on. I know the corner coordinates of the quad in the image, and the size of the destination rectangle. I imagine that this is some kind of loop through the x and y axis doing a Bresenham's line on both dimensions at once with some kind of mixing as pixels in the source and destination images overlap - some sub-pixel mixing of some sort? What approaches are there, and how do you mix the pixels? Is there a standard approach for this?
extracting a quadrilateral image to a rectangle
CC BY-SA 2.5
0
2010-06-07T18:57:55.527
2021-04-03T15:38:59.573
2017-05-23T11:45:25.150
-1
15,721
[ "graphics", "pixel", "interpolation" ]
2,993,391
1
null
null
3
2,931
question on dock panels within gwt So i want the dockpanel to take up the whole size of the browser window ``` dockPanel.setSize("100%", "100%"); ``` if this correct Next Question, i am going to add a north panel , that will be 100px high and take up the whole width of the browser ``` topPanel.setSize("100%", "100px"); dockPanel.add(topPanel, DockPanel.NORTH); ``` is this correct, then i want to add a west panel that is 200px wide and the whole length of the browser up to just under the north panel westSideStackPanel.setSize("200px","100%") mainPanel.add(westSideStackPanel,DockPanel.WEST); i have created all this but when i look at my dockpanel there is a big gap between the west panel and the north panel the whole way accross the screen. why would this be? The north panel stays at 100px, and then there is a gap of about 100px high the whole width of the screen. ![alt text](https://i222.photobucket.com/albums/dd51/molleman/Screenshot2010-06-07at233052.png)
question on GWT and dockpanel , sizing and resizing
CC BY-SA 2.5
null
2010-06-07T21:43:46.160
2010-06-08T14:30:52.117
2017-02-08T14:26:41.673
-1
286,630
[ "java", "web-applications", "gwt" ]
2,994,494
1
2,995,955
null
20
95,517
I'm looking for an easy way for the user to see how many drinks they've had for a BAC calculator. Picture of the app: ![PICTURE OF THE APP](https://i.stack.imgur.com/JN13ym.jpg) On button press, I would like an image to be added to the screen, directly under the spinner and with left alignment. When I press the button again, I want another image to be added to the screen. So if I pressed the add beer button, a drawable of a beer would appear below the spinner. If I pressed the add beer button again, I want there to be TWO drawables of beers under the spinner, preferably with them being added from the right. (Also, having them reach their width limit, wrapping around, and starting again on the left, but below a full line, would be AWESOME) I can't figure out how to do this. I assume adding a ImageView in code to a relative layout (because it needs to be positioned to the right) would be the best route, but if it's possible in xml I'd be more than happy to use that. Any help?
How do I create an ImageView in java code, within an existing Layout?
CC BY-SA 3.0
0
2010-06-08T02:45:37.857
2018-03-21T11:46:52.363
2014-03-15T13:33:02.070
1,694,500
359,045
[ "java", "android", "image", "layout", "drawable" ]
2,995,020
1
19,767,109
null
1
687
I'm having this odd issue. I have these buttons where the button's text is shifted downward upon certain actions. For example, I have a spinner with choices and one of the choices makes some buttons invisible while others are made visible. When I choose these, the buttons made visible all have their text shifted downward. Nothing else is shifted, just the text on the buttons. I've tried this on 1.5 and it works fine, no text is shifted, but I have issues with 2.1 and I really cannot figure it out. Any ideas or help would be great. Thanks. Here is the xml of the file: ``` <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TableLayout android:id="@+id/testpracHeader" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true"> <!-- android:background="#ff0000"--> <TableRow> <Spinner android:id="@+id/testprac_menu" android:layout_width="200px" android:layout_height="wrap_content"></Spinner> <View android:id="@+id/header_space_buffer" android:layout_width="40px" android:layout_height="30px" android:gravity="center"></View> <Button android:text="New" android:id="@+id/newInterval" android:layout_width="80px" android:layout_height="wrap_content"></Button> </TableRow> </TableLayout> <TableLayout android:id="@+id/bottomStruct" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true"> <TableRow> <Button android:layout_width="80px" android:text="Replay" android:id="@+id/replay" android:layout_height="wrap_content"></Button> <Button android:id="@+id/playInterval" android:text="Play" android:layout_width="160px" android:layout_height="wrap_content"></Button> <Button android:text="Submit" android:id="@+id/submit" android:layout_width="80px" android:layout_height="wrap_content"></Button> </TableRow> </TableLayout> </RelativeLayout> ``` When i use the `testprac` spinner, the replay, new and submit buttons go invisible and the play button becomes visible (which is what I want). This seems to be when the issue seems to start. The play button's text is completely gone (probably shifted to low to see) and when I go back to the other button's are visible I get the issue that is shown below. The left is the issue before using the spinner, and the right is the issue. I don't know if it is just the spinner that causes this. ![The GUI before I invoke the spinner](https://img.photobucket.com/albums/v68/authoreety/before_bug.png) ![The GUI after I invoke the spinner](https://img.photobucket.com/albums/v68/authoreety/after_bug.png)
Issue with button text shifting
CC BY-SA 2.5
null
2010-06-08T05:46:36.947
2013-11-04T11:47:51.920
2017-02-08T14:26:42.370
-1
278,447
[ "android", "layout" ]
3,004,220
1
3,004,241
null
2
13,767
Hi I'm not too sure how to create the attached image effect where the right hand side is my main content and it shades onto my left sidebar which has a gradient effect downwards. ![alt text](https://i.imgur.com/I5jsj.png)
How to create a CSS shade effect with a faded sidebar
CC BY-SA 2.5
0
2010-06-09T08:39:18.753
2012-07-16T23:29:55.340
null
null
162,782
[ "html", "css" ]
3,005,975
1
3,006,047
null
1
4,923
This is the code that i'm trying to run: ``` #include <QApplication> #include <QPushButton> int main(int argc,char *argv[]) { QApplication app(argc,argv); return app.exec(); } ``` And this is the error that i'm getting: ``` :-1: error: collect2: ld returned 1 exit status ``` ![Id returned 1 exit status](https://content.screencast.com/users/uzay95/folders/Jing/media/450f570c-3a90-4acd-a69b-6bb63cf88752/qtIdReturnd1Exit.png) ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/4558784e-964a-4cd3-866e-ec2af8ad2bc3/qtError2.png)
ld returned 1 exit status
CC BY-SA 2.5
0
2010-06-09T13:02:19.327
2011-08-10T08:31:51.667
2017-02-08T14:26:44.467
-1
104,085
[ "c++", "qt4" ]
3,006,792
1
4,674,568
null
31
19,772
I'm trying to have an edge between clusters in Graphviz where the edge does not affect the ranking. This looks fine: ``` digraph { subgraph clusterX { A B } subgraph clusterY { C D } A -> B B -> C [constraint=false] C -> D } ``` ![](https://imgur.com/gV3NZ.png) However when I add a label to the `C -> D` edge the `B -> C` edge tries to circumvent said label (which looks ugly). ``` digraph { subgraph clusterX { A B } subgraph clusterY { C D } A -> B B -> C [constraint=false] C -> D [label=yadda] } ``` ![](https://imgur.com/0nnY1.png) Any idea how I can keep the edge from `B` to `C` straight?
Straight edge between clusters in Graphviz
CC BY-SA 2.5
0
2010-06-09T14:31:24.920
2022-10-12T00:43:23.800
2019-03-03T20:27:31.437
2,756,409
3,848
[ "graphviz" ]
3,006,790
1
4,626,035
null
2
1,383
I have a series of points which I will turn into a line on a graph. What I want is to give the area under the graph a gradient fill. It would look somewhat similar to a Bloomberg graph like this; ![Example Graph](https://www.marketoracle.co.uk/images/crude_oil_long_commitments_3_12_07.gif) My question really has three parts; - - - My biggest problem is deciding on the data structures to use, I could use many multiple sided shapes (One for each line/ data series) and then tell the brush to draw; - - - Then I'd draw the shapes' boundaries in white afterwards. Thanks, Gav
Silverlight Line Graph with Gradient
CC BY-SA 2.5
null
2010-06-09T14:31:09.330
2011-09-02T13:31:02.657
2017-02-08T14:26:45.253
-1
111,734
[ "silverlight", "graph", "gradient" ]