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,470,814
1
2,476,833
null
2
793
One of my clients uses Trend Micro InterScan Messaging Security to protect their internal mail services. Suddenly InterScan decided to filter out all messages coming from Google App Engine. Unfortunately they haven't been able to whitelist the sender address as each e-mail gets a different one. For example, `*3ckihSOVMMHlZHSL.JSMMHlZHSL.JS*@apphosting.bounces.google.com`, with everything before the `@` being variable. I'm including this screenshot of how Interscan sees the incoming e-mail. Notice that all senders are different: ![alt text](https://i.imgur.com/kcvEM.png) If I look into the e-mail headers, the apphosting domain appears inside the Return-Path field: ``` Return-Path: <36kSiSwYIBh0883XL3E7.5EH883XL3E7.5E@apphosting.bounces.google.com> ``` The "From" field looks ok. It says what I set it to say, but the spam filter only looks at the `Return-Path`. My client sysadmin doesn't want to whitelist the whole `apphosting` domain, as it wouldn't be only whitelisting my application. --- How could I bypass this e-mail filters if I can't get an unique sender? Thanks,
saving appengine mail from spam filters
CC BY-SA 2.5
null
2010-03-18T15:02:53.933
2011-02-07T22:55:03.360
2010-03-18T20:04:15.677
132,438
132,438
[ "google-app-engine", "email", "spam" ]
2,472,051
1
null
null
1
490
When I drag 'My iPhone App' application's file into iTunes it has proper view. Rounded corners and transparent background. Then I close iTunes and open it again. Corners are still rounded but... What has happened with the background? ![image](https://i.stack.imgur.com/hKLuy.png) [http://www.freeimagehosting.net/uploads/15fee337bc.png](http://www.freeimagehosting.net/uploads/15fee337bc.png) Icon is a project's resource file named 'iTunesArtwork' with dimension 512x512, PNG format.
Strange iPhone application icon view in the iTunes's Applications section
CC BY-SA 3.0
null
2010-03-18T17:31:30.267
2011-12-21T23:09:03.053
2011-12-21T23:09:03.053
53,195
296,773
[ "iphone", "graphics", "icons", "itunes" ]
2,473,428
1
2,473,544
null
6
4,502
We have configured iReport to generate the following graph: ![](https://i.imgur.com/HqsBl.png) The real data points are in blue, the trend line is green. The problems include: - - The source of the problem is with the incrementer class. The incrementer is provided with the data points iteratively. There does not appear to be a way to get the set of data. The code that calculates the trend line looks as follows: ``` import java.math.BigDecimal; import net.sf.jasperreports.engine.fill.*; /** * Used by an iReport variable to increment its average. */ public class MovingAverageIncrementer implements JRIncrementer { private BigDecimal average; private int incr = 0; /** * Instantiated by the MovingAverageIncrementerFactory class. */ public MovingAverageIncrementer() { } /** * Returns the newly incremented value, which is calculated by averaging * the previous value from the previous call to this method. * * @param jrFillVariable Unused. * @param object New data point to average. * @param abstractValueProvider Unused. * @return The newly incremented value. */ public Object increment( JRFillVariable jrFillVariable, Object object, AbstractValueProvider abstractValueProvider ) { BigDecimal value = new BigDecimal( ( ( Number )object ).doubleValue() ); // Average every 10 data points // if( incr % 10 == 0 ) { setAverage( ( value.add( getAverage() ).doubleValue() / 2.0 ) ); } incr++; return getAverage(); } /** * Changes the value that is the moving average. * @param average The new moving average value. */ private void setAverage( BigDecimal average ) { this.average = average; } /** * Returns the current moving average average. * @return Value used for plotting on a report. */ protected BigDecimal getAverage() { if( this.average == null ) { this.average = new BigDecimal( 0 ); } return this.average; } /** Helper method. */ private void setAverage( double d ) { setAverage( new BigDecimal( d ) ); } } ``` How would you create a smoother and more accurate representation of the trend line?
Trend analysis using iterative value increments
CC BY-SA 2.5
0
2010-03-18T21:22:07.220
2010-03-19T16:35:53.963
2010-03-18T21:32:12.860
59,087
59,087
[ "java", "algorithm", "ireport", "data-analysis" ]
2,474,804
1
2,475,243
null
39
9,313
I'd like to get a colored REPL for clojure code, similar to what you can do with IRB for Ruby. Are there any libraries or settings for user.clj that provide automatic coloring of the REPL? Example IRB: ![alt text](https://i.imgur.com/w45Iq.png)
Is there a colored REPL for Clojure?
CC BY-SA 2.5
0
2010-03-19T03:25:16.723
2015-02-05T13:09:20.360
2020-06-20T09:12:55.060
-1
137,590
[ "clojure", "colors", "syntax-highlighting", "read-eval-print-loop" ]
2,475,329
1
2,478,410
null
41
30,410
## Symptoms - !["There was an error while performing this operation.... Filename... web.config... Error: There is a duplicate..."](https://i.stack.imgur.com/z124t.png) - Browsing to the URL displays: - Running the app from VS 2008 an dialog is displayed. ## Infrastructure - - - - ## Things Tried - - - - - - - - - ## Question - -
Steps to Investigate Cause of Web.Config Duplicate Section
CC BY-SA 3.0
0
2010-03-19T06:14:57.243
2016-07-08T22:41:56.167
2016-07-08T22:41:56.167
6,083,675
2,669
[ "asp.net", "asp.net-mvc", "iis-7" ]
2,476,575
1
2,476,704
null
50
57,534
I'm using graphviz (dot) to generate the graph you can see below. The node in the lower left corner (red ellipse) causes annoyance as its edges cross several edges of the adjacent node. Is there a way to restrain node placement to a certain area? ![graph with edge crossing several other edges](https://i.stack.imgur.com/zhuaO.png)
How to control node placement in graphviz (i.e. avoid edge crossings)
CC BY-SA 4.0
0
2010-03-19T10:48:06.687
2023-02-07T09:04:32.647
2019-03-03T20:20:50.483
2,756,409
219,519
[ "graphviz", "edge-detection", "dot" ]
2,476,583
1
2,478,643
null
2
1,362
I'm having a problem with image scaling. When I use the following code to scale an image it ends up with a line either at the bottom or on the right side of the image. ``` double scale = 1; if (scaleHeight >= scaleWidth) { scale = scaleWidth; } else { scale = scaleHeight; } AffineTransform af = new AffineTransform(); af.scale(scale, scale); AffineTransformOp operation = new AffineTransformOp(af, AffineTransformOp.TYPE_NEAREST_NEIGHBOR); BufferedImage bufferedThumb = operation.filter(img, null); ``` The original image ![enter image description here](https://i.stack.imgur.com/LAEuk.gif) The scaled image ![enter image description here](https://i.stack.imgur.com/3JIie.gif) Does anyone know why the line appears? Thanks! EDIT: Added the complete method code: ``` public static final int SPINNER_MAX_WIDTH = 105; public static final int SPINNER_MAX_HEIGHT = 70; public void scaleImage(BufferedImage img, int maxWidth, int maxHeight, String fileName) { double scaleWidth = 1; double scaleHeight = 1; if (maxHeight != NOT_SET) { if (img.getHeight() > maxHeight) { scaleHeight = (double) maxHeight / (double) img.getHeight(); } } if (maxWidth != NOT_SET) { if (img.getWidth() > maxWidth) { scaleWidth = (double) maxWidth / (double) img.getWidth(); } } double scale = 1; if (scaleHeight >= scaleWidth) { scale = scaleWidth; } else { scale = scaleHeight; } AffineTransform af = new AffineTransform(); af.scale(scale, scale); AffineTransformOp operation = new AffineTransformOp(af, AffineTransformOp.TYPE_NEAREST_NEIGHBOR); BufferedImage bufferedThumb = operation.filter(img, null); if (bufferedThumb != null) { File imageFile = new File(fileName); String fileType = fileName.substring(fileName.lastIndexOf(".") + 1); try { ImageIO.write(bufferedThumb, fileType, imageFile); } catch (IOException e) { logger.error("Failed to save scaled image: " + fileName + "\n" + e.getMessage()); } } } ``` The maxWidth and maxHeight parameters in the method call is set to the SPINNER_MAX_* constants. Thanks!
Java: Line appears when using AffineTransform to scale image
CC BY-SA 3.0
null
2010-03-19T10:49:20.247
2011-07-28T09:59:31.027
2011-07-28T09:59:31.027
128,662
209,641
[ "java", "image-processing", "java-2d", "affinetransform" ]
2,476,720
1
2,476,785
null
2
229
according to this image, i try to save data in NSUserDefaults but my App not have application setting in menu Setting on iPhone? how can i make this? thanks. ![alt text](https://i708.photobucket.com/albums/ww82/RAGOpoR/IMG_0080.png)
how to make NSUserDefaults show in Setting on iPhone?
CC BY-SA 2.5
0
2010-03-19T11:13:43.100
2013-01-09T13:06:43.843
2017-02-08T14:22:44.293
-1
203,372
[ "iphone", "nsuserdefaults", "application-settings" ]
2,477,452
1
2,477,460
null
178
394,388
`’` is showing on my page instead of `'`. I have the `Content-Type` set to `UTF-8` in both my `<head>` tag and my HTTP headers: ``` <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> ``` ![enter image description here](https://i.stack.imgur.com/akojH.png) In addition, my browser is set to `Unicode (UTF-8)`: ![enter image description here](https://i.stack.imgur.com/SM5Su.jpg) So what's the problem, and how can I fix it?
"’" showing on page instead of " ' "
CC BY-SA 3.0
0
2010-03-19T13:04:43.250
2021-04-16T13:12:44.693
2013-12-28T23:43:32.943
1,350,209
84,201
[ "encoding", "utf-8", "mojibake" ]
2,477,774
1
2,487,365
null
56
62,160
> [I discovered how to map a linear lens](https://stackoverflow.com/questions/2477774/correcting-fisheye-distortion-programmatically/2502276#2502276), from `destination` coordinates to `source` coordinates. - I actually struggle to reverse it, and to map source coordinates to destination coordinates. What is the inverse, in code in the style of the converting functions I posted? ![](https://i.stack.imgur.com/SIhfE.jpg)- I also see that my undistortion is imperfect on some lenses - presumably those that are not strictly linear. What is the equivalent to-and-from source-and-destination coordinates for those lenses? Again, more code than just mathematical formulae please... ![](https://i.stack.imgur.com/ickIZ.jpg) --- > I have some points that describe positions in a picture taken with a fisheye lens. I want to convert these points to rectilinear coordinates. I want to undistort the image. I've found [this description](http://wiki.panotools.org/Fisheye_Projection) of how to generate a fisheye effect, but not how to reverse it. There's also a [blog post](http://photo.net/learn/fisheye/) that describes how to use tools to do it; these pictures are from that: : `SOURCE` [Original photo link](http://photo.net/learn/fisheye/fe01.jpg) ![](https://i.stack.imgur.com/qLNQV.jpg) Input : : `DESTINATION` [Original photo link](http://photo.net/learn/fisheye/fe04.jpg) ![](https://i.stack.imgur.com/ogb9b.jpg) Output : How do you calculate the radial distance from the centre to go from fisheye to rectilinear? My function stub looks like this: ``` Point correct_fisheye(const Point& p,const Size& img) { // to polar const Point centre = {img.width/2,img.height/2}; const Point rel = {p.x-centre.x,p.y-centre.y}; const double theta = atan2(rel.y,rel.x); double R = sqrt((rel.x*rel.x)+(rel.y*rel.y)); // fisheye undistortion in here please //... change R ... // back to rectangular const Point ret = Point(centre.x+R*cos(theta),centre.y+R*sin(theta)); fprintf(stderr,"(%d,%d) in (%d,%d) = %f,%f = (%d,%d)\n",p.x,p.y,img.width,img.height,theta,R,ret.x,ret.y); return ret; } ``` Alternatively, I could somehow convert the image from fisheye to rectilinear before finding the points, but I'm completely befuddled by the [OpenCV documentation](http://opencv.willowgarage.com/documentation/camera_calibration_and_3d_reconstruction.html#initundistortmap). Is there a straightforward way to do it in OpenCV, and does it perform well enough to do it to a live video feed?
correcting fisheye distortion programmatically
CC BY-SA 3.0
0
2010-03-19T13:50:13.980
2022-02-05T17:10:03.017
2017-05-23T12:17:15.330
-1
15,721
[ "math", "graphics", "geometry", "projection" ]
2,480,428
1
4,081,009
null
1
2,479
I've recently had to draw some architectural diagrams that feature the use of an [Enterprise Service Bus](http://en.wikipedia.org/wiki/Enterprise_service_bus). The ESB is critical, so everyone wants it to show up on the diagram. But since it's the center of what everything is connected to, it really of gets in the way. I settled on trying to use [SoaML](http://www.omg.org/spec/SoaML/). I color-coded the request points blue and service points green, to help then stand out. The text names on the ports give you a sense of what talks to what, and it's incredibly obvious that everything goes through the ESB. Can anyone comment on my approach? Any suggestions on something better? ![SoaML diagram](https://lh5.ggpht.com/_-LjhQx30Uwg/S6PcnA5dtjI/AAAAAAAABLc/ppCB3R1D6YQ/soaml.png)
How do I draw an ESB on a SoaML diagram?
CC BY-SA 2.5
null
2010-03-19T20:35:14.183
2022-08-07T08:02:39.597
2017-02-08T14:22:44.630
-1
115,478
[ "uml", "esb" ]
2,480,926
1
null
null
3
213
![alt text](https://farm1.static.flickr.com/61/217827495_485b236b1f.jpg)I do a lot of prototyping and need more Xcode templates for the different classes of apps that I prototype. My current source of information for Xcode templates is a set of [links](http://delicious.com/iggymwangi/xcode+templates) from the web. What other resources do folks use for Xcode iPhone templates design and development?
What resources do folks use for learning about Xcode templates?
CC BY-SA 2.5
0
2010-03-19T22:20:27.640
2010-03-25T19:25:56.687
2017-02-08T14:22:44.997
-1
216,354
[ "iphone", "xcode", "templates" ]
2,481,120
1
5,203,632
null
9
10,592
I have an icon image and text like the following. The code source of everything is: ``` <img src="...." align="absmiddle" /> My Title Here ``` The problem is that the icon is not aligned vertically with the title in Chrome compared to firefox. ![alt text](https://imgur.com/vY5bf.png) I think the `absmiddle` doesn't work at all! Is there any solution? I don't want to use a table with 2 columns to fix this issue.
ABSMIDDLE works differently on Firefox and Chrome?
CC BY-SA 3.0
null
2010-03-19T23:16:00.877
2016-07-07T20:30:06.130
2016-07-07T20:30:06.130
839,689
241,654
[ "html", "css", "image", "alignment", "vertical-alignment" ]
2,481,479
1
2,798,408
null
8
3,957
I want to write a program for simulating a motion of high number (N = 1000 - 10^5 and more) of bodies (circles) on 2D plane. All bodies have equal size and the only interaction between them is elastic collision. I want to get something like ![Crazy Balls](https://upload.wikimedia.org/wikipedia/commons/6/6d/Translational_motion.gif) but in larger scale, with more balls and more dense filling of the plane (not a gas model as here, but smth like boiling water model). So I want a fast method of detection that ball number `i` does have any other ball on its path within 2*radius+V*delta_t distance. I don't want to do a full search of collision with N balls for each of `i` ball. (This search will be N^2.) PS Sorry for loop-animated GIF. Just press Esc to stop it. (Will not work in Chrome).
2D colliding n-body simulation (fast Collision Detection for large number of balls)
CC BY-SA 3.0
0
2010-03-20T01:11:23.560
2019-11-25T00:35:31.923
2017-02-08T14:22:45.330
-1
196,561
[ "collision-detection", "modeling" ]
2,483,771
1
2,492,211
null
163
156,250
While debugging jQuery apps that use AJAX, I often have the need to see the json that is being returned by the service to the browser. So I'll drop the URL for the JSON data into the address bar. This is nice with ASPNET because in the event of a coding error, I can see the ASPNET diagostic in the browser: ![alt text](https://i.stack.imgur.com/QGizC.png) But when the server-side code works correctly and actually returns JSON, IE prompts me to download it, so I can't see the response. ![alt text](https://i.stack.imgur.com/nWs43.png) I know I could do this if I set the Content-Type header to be `text/plain`. But this is specifically an the context of an ASPNET MVC app, which sets the response automagically when I use JsonResult on one of my action methods. Also I kinda want to keep the appropriate content-type, and not change it just to support debugging efforts.
How can I convince IE to simply display application/json rather than offer to download it?
CC BY-SA 3.0
0
2010-03-20T16:16:49.330
2017-07-29T14:46:34.697
2017-04-03T18:03:01.790
48,082
48,082
[ "jquery", "asp.net-mvc", "ajax", "asp.net-ajax", "internet-explorer" ]
2,484,069
1
2,489,787
null
0
2,157
If your native language is not EN_US or you know any other spoken language just fine you can easily contribute!) [](https://i.stack.imgur.com/x4vZR.jpg) [narod.ru](http://superior0.narod.ru/key.jpg) ![The Bulgarian Alphabet and Its Transliteration (gif)](https://upload.wikimedia.org/wikipedia/commons/4/45/1995-Transliteration.PNG) ** ``` Bahasa Indonesia Bahasa Melayu Català Česky Dansk Deutsch Eesti Ελληνικά Español Esperanto Euskara فارسی Français Galego עברית Hrvatski Italiano 한국어 Lietuvių Magyar Nederlands 日本語 Norsk (bokmål) Norsk (nynorsk) Polski Português Română Русский Slovenčina Slovenščina Српски / Srpski Suomi Svenska ไทย Tiếng Việt Türkçe Українська 中文 ```
Search for Transliteration tables
CC BY-SA 4.0
null
2010-03-20T17:47:14.057
2019-07-04T16:06:33.380
2019-07-04T08:04:31.000
4,751,173
434,051
[ "internationalization", "transliteration" ]
2,484,169
1
2,514,391
null
1
1,030
Custom map is broken on satellite view, does not show satellite imagery. Any ideas, what's wrong? Overlays are also broken - they're not transparent. ![alt text](https://content.screencast.com/users/wooyek/folders/Jing/media/8de5457c-af92-44a8-af63-b87f61fdd643/2010-03-20_1907.png) Code: ``` <div id="map_canvas" class="grid_8 omega" style="width:460px; height: 420px"></div> <script src="http://maps.google.com/maps?file=api&amp;v=3&amp;sensor=true&amp;key=my-key-is-here" type="text/javascript"></script> <script type="text/javascript"> function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(52.229676, 21.012229), 13); map.setMapType(G_HYBRID_MAP); map.setUIToDefault(); } var geocoder = new GClientGeocoder(); function showAddress(address) { geocoder.getLatLng(address, function(point) { if (!point) { alert('Nie można znaleźć adresu: '+address); } else { map.setCenter(point, 13); var marker = new GMarker(point); map.addOverlay(marker); marker.openInfoWindowHtml(address); } } ); } showAddress('some address goes here') } $('body').ready(initialize); $('body').unload(GUnload); </script> ```
Google maps not showing satellite background - streets on white background
CC BY-SA 3.0
null
2010-03-20T18:13:58.080
2012-08-05T05:10:44.590
2017-02-08T14:22:46.697
-1
260,480
[ "google-maps", "google-maps-api-3" ]
2,484,385
1
2,484,776
null
1
288
Imagine that HTML page is a game (see picture). User can have number of (blue divs) on his page. Each board can be moved, re-sized, relabeled, created new and removed. Inside each board there are number of (purple divs). Each of these user can move inside the board or to another board, re-size, change color and label, delete, add new. The goal of the game is not important, but let's say it is to rearrange figures in a certain way so that they disappear. But of the programmer is the whole game surface in the database for every user of the site, and it later when he returns. So, how do I go about data exchange between client and the database? ![alt text](https://imgur.com/BTXAq.png) Here's how I think it can be, but maybe there is a better way. In the database I think of creating tables users, boards and figures. Then I can SELECT all that belongs to a user and create his HTML page (surface). But then, user will be able to change all of those properties of boards and figures and . Is this a situation where JSON should be used?
Looking for design/architecture suggestions for a simple HTML game
CC BY-SA 2.5
null
2010-03-20T19:23:31.513
2010-03-20T21:06:24.093
2010-03-20T20:30:13.377
28,098
28,098
[ "php", "javascript", "mysql", "architecture" ]
2,485,767
1
null
null
1
802
How to give different styling to last row only and 1st and last column of the table . See current example here [http://jsfiddle.net/jitendravyas/KxmY5/1/](http://jsfiddle.net/jitendravyas/KxmY5/1/) and this is how I want it: ![enter image description here](https://i.stack.imgur.com/Yd7yW.jpg) ``
How to give different style to <table> columns and rows?
CC BY-SA 3.0
0
2010-03-21T03:16:14.523
2017-05-27T12:34:00.520
2017-05-27T12:34:00.520
4,370,109
84,201
[ "css", "html-table" ]
2,486,758
1
null
null
154
229,212
I have made an XML Schema - all the code basically - and was wondering if there is a way that the code can generate something like this: ![enter image description here](https://i.stack.imgur.com/54TGZ.gif) If so how can I do it?
How to visualize an XML schema programatically?
CC BY-SA 4.0
0
2010-03-21T10:47:49.397
2021-03-01T11:40:04.580
2021-03-01T11:40:04.580
469,294
297,959
[ "xml", "xsd" ]
2,487,459
1
2,487,513
null
1
1,469
I run the following html snippet in IE8 and IE7 with non-English characters (we tried both Hebrew and Chinese), and the second link never works properly. The displayed text in the alert box is mangled. This occurs in IE8 and IE7, but not in firefox. It is not dependent on Windows's regional settings. Here is the html snippet (html header and footer omitted for brevity, the content-type is "text/html; charset=utf-8", and so is the response header): ``` <p> <a href="javascript:alert('abשלוםab')">link with English and Hebrew text</a> <a href="javascript:alert('ab%D7%A9%D7%9C%D7%95%D7%9Dab')">same text, url encoded</a> </p> ``` Here is the alert box that pops up when clicking the second link: ![alt text](https://farm3.static.flickr.com/2743/4450902652_853701e53c_o.png) I know that the string for "שלום" is encoded as 8 bytes in utf-8, thus there are 8 %NN items, and there are also 8 weird characters in the alert box. The problem is, how can I make IE recognize that this is utf-8 encoding text, like firefox does? The full html (of the minimal example) is available [here](http://pastie.org/pastes/879647). I tried `decodeURI`, `decodeURIComponent`, and `unescape`, but without success. Moving the link from `href` to `onclick` solves the issue. My problem is that some of the content is generated from other sources out of my control, and I ended up with javascript links inside the href attribute.
Strange javascript decoding behavior in IE
CC BY-SA 2.5
null
2010-03-21T14:45:41.880
2010-03-21T18:05:27.253
2017-02-08T14:22:48.050
-1
36,071
[ "javascript", "internet-explorer", "url-encoding" ]
2,487,753
1
null
null
1
749
![https://www.cocoatreeapplications.com/images/reboursScreenshot.png](https://www.cocoatreeapplications.com/images/reboursScreenshot.png) Ad you can see, there is a example. The UI picker's Selection indicator. How can I do the similar thing on my Apps?
How to edit Selection indicator in UIPicker?
CC BY-SA 2.5
null
2010-03-21T16:14:53.777
2010-03-22T05:00:25.123
2017-02-08T14:22:48.387
-1
148,956
[ "objective-c", "iphone", "iphone-sdk-3.0" ]
2,490,104
1
null
null
6
7,645
Like this; this a screenshot of MS word file. ![alt text](https://mandatemedia.typepad.com/photos/uncategorized/2007/10/28/kickertablelarge_2.png) - `tfoot``td``<p>dwdwdewwe</p>``</table>``<p></p>`- `tfoot``<table>`-
What is prefered method to put footnotes for html table?
CC BY-SA 3.0
0
2010-03-22T05:05:22.047
2017-01-13T18:07:47.510
2017-02-08T14:22:50.113
-1
84,201
[ "xhtml", "html-table", "accessibility", "semantic-markup" ]
2,490,167
1
null
null
1
203
Is it possible to make this box's corner round with same `html` tags. without using any other tag and `border-radius` property and javascript. but i can use css classes and background images. and box height should be depend on content of `<p>grr</p>` `<h2>` ``` <h2>Nulla Facilisi</h2> <p> Phasellus at turpis lacus. Nulla hendrerit lobortis nibh. In lectus erat, blandit non feugiat vel, accumsan ac dolor. Etiam et ligula vel tortor tempus vehicula porttitor ut ligula. Mauris felis odio, fermentum vel </p> ``` ![alt text](https://strathviewconsultants.wdfiles.com/local--files/css:rounded-corners/roundedcornersIE.png) What is the best possible way to achieve this without css border-radius property which is not supported by internet explorer?
What is the second best possible way to make this Content Box's (Fixed width) corners round (without border-radius and javascript)?
CC BY-SA 2.5
null
2010-03-22T05:33:22.730
2010-03-22T18:09:09.983
2017-02-08T14:22:50.453
-1
84,201
[ "css", "xhtml", "semantic-markup" ]
2,491,769
1
2,516,963
null
3
2,478
I've got an ItemsControl which fills from top to bottom, but I can't get it's child items to occupy the whole width of the ItemsControl: ![alt text](https://i31.photobucket.com/albums/c369/tomallen35/diagram-1.png) I basically need to stretch the green bits to fill the width of the control (as shown by the blue bits). I've tried things like setting the `HorizontalAlignment` property of the template item to `Stretch` and I've even tried binding it's `Width` property to the ItemsControl Width, but neither worked. Should be a straight forward one, but it's something I just can't quite figure out... Edit: here's the ItemTemplate (the whole thing is the ItemTemplate which itself contains an ItemsControl which is bound to a list of child objects): ``` <DataTemplate> <Border CornerRadius="5" Background="#ddd"> <StackPanel> <TextBlock Text="{Binding Name}" FontSize="18" Foreground="#bbb"/> <ItemsControl ItemsSource="{Binding PlugIns}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <toolkit:WrapPanel HorizontalAlignment="Stretch" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel Margin="10,0,10,10" Tag="{Binding}" MouseEnter="StackPanel_MouseEnter"> <Border Child="{Binding Icon}" /> <TextBlock Text="{Binding Name}" /> </StackPanel> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </StackPanel> </Border> </DataTemplate> ```
Silverlight: Set Items Widths in ItemsControl to Stretch
CC BY-SA 2.5
null
2010-03-22T11:25:58.587
2010-04-10T19:39:45.320
2017-02-08T14:22:51.130
-1
128,837
[ "silverlight", "itemscontrol", "html" ]
2,492,976
1
2,494,404
null
2
2,388
I'm stuck on a problem and, after what seems like days of searching for a solution, I'm reaching out to Stack Overflow for help. I'm trying to replace a standard `<select>` dropdown form element with a Textbox and a Div containing an unordered list. I'd prefer to have the solution be based on jQuery, but am open to alternatives. I've found a couple jQuery plugins that do what I need, but are far enough from being a real solution that I need to keep looking. Here's an image of what I'm going for: ![Magic Dropdown](https://imgur.com/G6hC7.png) I'd like the dropdown to look as pictured, and when an element is selected (with mouse or keyboard), have just the first line handed back into the textbox (and not be editable). I'd also like to populate a hidden input field with a value that will be used on Submit. I'm pulling my hair out over this one. Any help and guidance will be most appreciated! Edit: It may be noteworthy that, on the backend, the dropdown options are to be populated by PHP / MySQL.
Need Magic jQuery Replacement for Selectbox Dropdown Form Element
CC BY-SA 3.0
null
2010-03-22T14:31:10.087
2012-01-02T20:43:14.643
2020-06-20T09:12:55.060
-1
231,651
[ "javascript", "jquery", "css", "drop-down-menu" ]
2,495,782
1
2,496,047
null
2
1,632
My goal is totally fit image in toolStripButton and toolStripDropDownButton. If a image in the button set with image property, I can not totally fit the image in the button. Because of margin, border, or something of the button.(I don't know exactly). So I try to set the image in the button with BackgroudImage property. After I adjust some property(like AutoSize, Size and so on...), I can fit image in button. but in this case, I can not see background image. It is disappear, when the mouse cursor is located in the button. How can I solve this problem?? Image Property. I can not remove the gap between images. ![alt text](https://lh4.ggpht.com/_8hBWzRPdqu8/S5_3Pw0py5I/AAAAAAAAAds/WqLEyGduuZ4/temp.JPG) BackgroundImage Property. I can not see the image, when mouse cursor is on the image. ![alt text](https://lh6.ggpht.com/_8hBWzRPdqu8/S6fcE157YsI/AAAAAAAAAeg/XF66XXJTsb4/toolstrip.JPG)
Resizing ToolStripButtons to fit complete BackGround image
CC BY-SA 3.0
null
2010-03-22T21:11:21.017
2014-06-18T17:59:52.907
2017-02-08T14:22:52.147
-1
279,071
[ ".net", "image", "winforms", "toolstripbutton" ]
2,495,814
1
null
null
-1
153
I want to build a program that will (as part of what it's doing) display lines organically growing and interacting horizontally across the screen. Here's a sample image, just imagine the lines sprouting from the left and growing to the right: ![Line Example](https://ritter.vg/misc/stuff/so/lines-example.png) The lines would look like the lines used on [Google Maps Transit Overlay](http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=nyc&sll=37.0625,-95.677068&sspn=54.401733,114.169922&ie=UTF8&hq=&hnear=New+York&ll=40.734056,-73.985968&spn=0.051445,0.111494&t=p&z=14&lci=transit) or [OnNYTurf](http://www.onnyturf.com/subway/)'s transit pages. It's a personal project, so I'm open to just about any language and library combination. But I don't know where to start. What have you used in the past to create graphics that are similar to this? What would you recommend? I want it to run on Windows without any extras needed (.Net is fine), and it doesn't have to run elsewhere. I needs to run as an actual program, not javascript in the browser. There's obviously no 'right' answer to this, but the purpose isn't to start an argument about X better than Y but rather just find a list of graphics toolkits that do simple 2D graphics that people recommend because of their ease of use or community or whatever.
What would you recommend to do simple 2D Graphics?
CC BY-SA 2.5
null
2010-03-22T21:16:54.610
2010-03-22T21:24:44.497
2017-02-08T14:22:52.487
-1
8,435
[ "graphics", "animation" ]
2,497,326
1
2,497,424
null
1
1,412
I have had the following problem for a while and I am really not sure how to solve it. The problem can currently be observed here: [http://www.androidpolice.com/2009/11/16/the-not-so-good-the-bad-and-the-ugly-my-list-of-20-problems-with-htc-hero/](http://www.androidpolice.com/2009/11/16/the-not-so-good-the-bad-and-the-ugly-my-list-of-20-problems-with-htc-hero/) - feel free to use this for Firebugging. There are 2 notions here: a and . A note usually takes 100% of the post width and everything is fine. , when a note appears next to a toc, the (I set `z-index:1` on the toc because otherwise the note covered it, which was even worse). It's interesting to point out that the text of the note doesn't get covered by the toc - only the note div itself does. In IE7, it's even worse - the note div jumps down to under the toc and leaves a lot of empty space (2nd screenshot). The ideal solution would have the note div occupy 100% of the visible space - i.e. it would resize itself to fit right next to the toc when needed. Here are some screenshots for future reference: ![alt text](https://i.imgur.com/mW2wq.png) In IE7: ![alt text](https://i.imgur.com/4DzCi.png)
2 divs side-by-side, one floated - how do I make the other fit next to it without overlapping?
CC BY-SA 4.0
0
2010-03-23T03:01:03.230
2019-09-11T18:30:37.140
2019-09-11T18:30:37.140
10,607,772
47,680
[ "html", "css", "width" ]
2,497,364
1
null
null
5
1,421
: How does Google create the dropshadow next to the vertical scrollbar over the Google Map? This is a screenshot depicting exactly what I'm talking about. ![enter image description here](https://i.stack.imgur.com/PYycY.jpg) This seems to be regardless of browser (IE, Firefox, Chrome) and platform (Windows, Mac, Linux).
HTML/CSS: How does Google create this drop shadow over their maps?
CC BY-SA 3.0
0
2010-03-23T03:14:23.323
2011-08-28T14:53:25.833
2011-08-28T14:53:25.833
419
299,267
[ "javascript", "html", "css", "dropshadow" ]
2,499,032
1
3,329,126
null
13
20,932
I'm trying to use graphviz on media wiki as a documentation tool for software. First, I documented some class relationships which worked well. Everything was ranked vertically as expected. But, then, some of our modules are dlls, which I wanted to seperate into a box. When I added the nodes to a cluster, they got edged, but clusters seem to have a LR ranking rule. Or being added to a cluster broke the TB ranking of the nodes as the cluster now appears on the side of the graph. This graph represents what I am trying to do: at the moment, cluster1 and cluster2 appear to the of cluster0. I want/need them to appear below. ``` <graphviz> digraph d { subgraph cluster0 { A -> {B1 B2} B2 -> {C1 C2 C3} C1 -> D; } subgraph cluster1 { C2 -> dll1_A; dll1_A -> B1; } subgraph cluster2 { C3 -> dll2_A; } dll1_A -> dll2_A; } </graphviz> ``` ![](https://imgur.com/72Gqk.jpg)
subgraph cluster ranking in dot
CC BY-SA 2.5
0
2010-03-23T10:25:15.963
2015-03-04T13:50:07.393
2010-06-10T12:39:46.003
3,848
27,491
[ "graphviz", "dot" ]
2,499,738
1
null
null
0
618
``` SELECT h11, HA11 FROM florin.h11 WHERE (3>d1 AND 3<d2) OR (3>d1 AND 3=d2 AND id=MAX(id)) UNION (3=d1 AND 3<d2 AND id=MIN(id)); ``` Here a screenshot of my table stucture: ![alt text](https://imgur.com/QvDEE.png)
How to filter MySQL SELECT by an aggregate function?
CC BY-SA 2.5
null
2010-03-23T12:18:46.617
2017-04-19T09:24:30.700
2010-03-23T13:53:30.133
33,264
299,874
[ "sql", "mysql" ]
2,500,732
1
null
null
6
1,290
I think this is an interesting question, at least for me. --- I have a , let's say: > photo, free, search, image, css3, css, tutorials, webdesign, tutorial, google, china, censorship, politics, internet and I have a : - - - - --- I need to try and match words with the appropriate context/contexts if possible. Maybe discovering word relationships in some way. ![alt text](https://i.imgur.com/bx4tP.png) --- Any ideas? Help would be much appreciated!
Defining the context of a word - Python
CC BY-SA 2.5
0
2010-03-23T14:37:30.347
2010-03-24T18:17:26.507
2010-03-24T18:17:26.507
86,542
208,827
[ "python", "django", "dictionary", "nlp" ]
2,502,009
1
3,248,619
null
1
404
Here is the setup. No assumptions for the values I am using. ``` n=2; % dimension of vectors x and (square) matrix P r=2; % number of x vectors and P matrices x1 = [3;5] x2 = [9;6] x = cat(2,x1,x2) P1 = [6,11;15,-1] P2 = [2,21;-2,3] P(:,1)=P1(:) P(:,2)=P2(:) modePr = [-.4;16] TransPr=[5.9,0.1;20.2,-4.8] pred_modePr = TransPr'*modePr MixPr = TransPr.*(modePr*(pred_modePr.^(-1))') x0 = x*MixPr ``` Then it was time to apply the following formula to get `myP` ![alt text](https://lh3.ggpht.com/_QHi-vzRmFVU/S6jhOSSddCI/AAAAAAAACpc/WF2hRdfZ2ro/New%20Picture.png) , where μij is MixPr. I used this code to get it: ``` myP=zeros(n*n,r); Ptables(:,:,1)=P1; Ptables(:,:,2)=P2; for j=1:r for i = 1:r; temp = MixPr(i,j)*(Ptables(:,:,i) + ... (x(:,i)-x0(:,j))*(x(:,i)-x0(:,j))'); myP(:,j)= myP(:,j) + temp(:); end end ``` Some brilliant guy proposed this formula as another way to produce `myP` ``` for j=1:r xk1=x(:,j); PP=xk1*xk1'; PP0(:,j)=PP(:); xk1=x0(:,j); PP=xk1*xk1'; PP1(:,j)=PP(:); end myP = (P+PP0)*MixPr-PP1 ``` I tried to formulate the equality between the two methods and seems to be this one. To make things easier, I skipped the summation of matrix P in both methods . ![alt text](https://lh3.ggpht.com/_QHi-vzRmFVU/S6jmuJPOf3I/AAAAAAAACpo/lLPEFgefP30/s720/%CE%98%CE%AD%CE%BC%CE%B1%CF%84%CE%B1%20%CF%87%CE%B5%CE%B9%CF%81%CE%B9%CF%83%CE%BC%CE%BF%CF%8D%20%CF%80%CE%B9%CE%BD%CE%AC%CE%BA%CF%89%CE%BD%20%CF%83%CF%84%CE%BF%20MATLAB%20%28%CE%BC%CE%B5%20%CE%91%CE%A0%CE%91%CE%9D%CE%A4%CE%97%CE%A3%CE%95%CE%99%CE%A3%29%20%282%29.jpg) where the first part denotes the formula that I used, and the second comes from his code snippet. Do you think this is an obvious equality? If yes, ignore all the above and just try to explain why. I could only start from the LHS, and after some algebra I think I proved it equals to the RHS. However I can't see how did he (or she) think of it in the first place.
This is more a matlab/math brain teaser than a question
CC BY-SA 2.5
null
2010-03-23T17:10:30.357
2010-07-14T22:02:56.977
2020-06-20T09:12:55.060
-1
170,792
[ "math", "matlab", "linear-algebra" ]
2,502,990
1
2,503,049
null
75
73,316
I tried [this aproach](https://stackoverflow.com/questions/2437666/write-text-files-without-byte-order-mark-bom) without any success the code I'm using: ``` // File name String filename = String.Format("{0:ddMMyyHHmm}", dtFileCreated); String filePath = Path.Combine(Server.MapPath("App_Data"), filename + ".txt"); // Process myObject pbs = new myObject(); pbs.GenerateFile(); // pbs.GeneratedFile is a StringBuilder object // Save file Encoding utf8WithoutBom = new UTF8Encoding(true); TextWriter tw = new StreamWriter(filePath, false, utf8WithoutBom); foreach (string s in pbs.GeneratedFile.ToArray()) tw.WriteLine(s); tw.Close(); // Push Generated File into Client Response.Clear(); Response.ContentType = "application/vnd.text"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename + ".txt"); Response.TransmitFile(filePath); Response.End(); ``` the result: ![enter image description here](https://i.stack.imgur.com/4Pwhm.png) It's [writing the BOM](http://en.wikipedia.org/wiki/Byte_order_mark#Representations_of_byte_order_marks_by_encoding) no matter what, and special chars (like Æ Ø Å) are not correct :-/ My objective is create a file using as Encoding and as CharSet Is this so hard to accomplish or I'm just getting a bad day?
Create Text File Without BOM
CC BY-SA 3.0
0
2010-03-23T19:32:45.203
2023-01-23T23:46:45.743
2017-05-23T10:31:27.110
-1
28,004
[ "c#", "asp.net-3.5", "text-files", "byte-order-mark" ]
2,504,461
1
null
null
0
685
I am modifying GLPaint to use a different background, so in this case it is white. Anyway the existing stamp they are using assumes the background is black, so I made a new background with an alpha channel. When I draw on the canvas it is still black, what gives? When I actually draw, I just bind the texture and it works. Something is wrong in this initialization. Here is the photo ![alt text](https://farm5.static.flickr.com/4060/4458734312_863a5f9182.jpg) ``` - (id)initWithCoder:(NSCoder*)coder { CGImageRef brushImage; CGContextRef brushContext; GLubyte *brushData; size_t width, height; if (self = [super initWithCoder:coder]) { CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; eaglLayer.opaque = YES; // In this application, we want to retain the EAGLDrawable contents after a call to presentRenderbuffer. eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil]; context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1]; if (!context || ![EAGLContext setCurrentContext:context]) { [self release]; return nil; } // Create a texture from an image // First create a UIImage object from the data in a image file, and then extract the Core Graphics image brushImage = [UIImage imageNamed:@"test.png"].CGImage; // Get the width and height of the image width = CGImageGetWidth(brushImage); height = CGImageGetHeight(brushImage); // Texture dimensions must be a power of 2. If you write an application that allows users to supply an image, // you'll want to add code that checks the dimensions and takes appropriate action if they are not a power of 2. // Make sure the image exists if(brushImage) { brushData = (GLubyte *) calloc(width * height * 4, sizeof(GLubyte)); brushContext = CGBitmapContextCreate(brushData, width, width, 8, width * 4, CGImageGetColorSpace(brushImage), kCGImageAlphaPremultipliedLast); CGContextDrawImage(brushContext, CGRectMake(0.0, 0.0, (CGFloat)width, (CGFloat)height), brushImage); CGContextRelease(brushContext); glGenTextures(1, &brushTexture); glBindTexture(GL_TEXTURE_2D, brushTexture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, brushData); free(brushData); } //Set up OpenGL states glMatrixMode(GL_PROJECTION); CGRect frame = self.bounds; glOrthof(0, frame.size.width, 0, frame.size.height, -1, 1); glViewport(0, 0, frame.size.width, frame.size.height); glMatrixMode(GL_MODELVIEW); glDisable(GL_DITHER); glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_DST_ALPHA); glEnable(GL_POINT_SPRITE_OES); glTexEnvf(GL_POINT_SPRITE_OES, GL_COORD_REPLACE_OES, GL_TRUE); glPointSize(width / kBrushScale); } return self; } ```
Drawing a texture with an alpha channel doesn't work -- draws black
CC BY-SA 2.5
null
2010-03-23T23:48:35.293
2010-03-24T14:05:20.277
2017-02-08T14:22:54.830
-1
143,208
[ "iphone", "objective-c", "opengl-es" ]
2,507,861
1
2,507,875
null
5
1,842
I'm trying to write a method to reduce the size of any image 50% each time is called but I've found a problem. Sometimes, I end up with a bigger filesize while the image is really just half of what it was. I'm taking care of DPI and PixelFormat. What else am I missing? Thank you for your time. ``` public Bitmap ResizeBitmap(Bitmap origBitmap, int nWidth, int nHeight) { Bitmap newBitmap = new Bitmap(nWidth, nHeight, origBitmap.PixelFormat); newBitmap.SetResolution( origBitmap.HorizontalResolution, origBitmap.VerticalResolution); using (Graphics g = Graphics.FromImage((Image)newBitmap)) { g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.DrawImage(origBitmap, 0, 0, nWidth, nHeight); } return newBitmap; } ``` ![http://imgur.com/lY9BN.png](https://imgur.com/lY9BN.png) ![http://imgur.com/KSka0.png](https://imgur.com/KSka0.png) Here's the missing code: ``` int width = (int)(bitmap.Width * 0.5f); int height = (int)(bitmap.Height * 0.5f); Bitmap resizedBitmap = ResizeBitmap(bitmap, width, height); resizedBitmap.Save(newFilename); ``` Based on your comments, this is the solution I've found: ``` private void saveAsJPEG(string savingPath, Bitmap bitmap, long quality) { EncoderParameter parameter = new EncoderParameter(Encoder.Compression, quality); ImageCodecInfo encoder = getEncoder(ImageFormat.Jpeg); if (encoder != null) { EncoderParameters encoderParams = new EncoderParameters(1); encoderParams.Param[0] = parameter; bitmap.Save(savingPath, encoder, encoderParams); } } private ImageCodecInfo getEncoder(ImageFormat format) { ImageCodecInfo[] codecs = ImageCodecInfo.GetImageDecoders(); foreach (ImageCodecInfo codec in codecs) if (codec.FormatID == format.Guid) return codec; return null; } ```
Sometimes, scaling down a bitmap generates a bigger file. Why?
CC BY-SA 2.5
null
2010-03-24T13:10:35.907
2010-03-29T06:25:29.020
2010-03-24T21:24:53.420
4,386
4,386
[ "c#", ".net", "bitmap", "resize-image" ]
2,508,247
1
2,508,500
null
0
568
Well hi, guess what, I have an IE positioning issue! This is in 8, so god know what's going on in the other versions (checking later) Both the boxes call the same class, why is IE being so difficult? Here's how it's meant to look: ![right](https://i80.photobucket.com/albums/j166/spikae/meanttolook.jpg) And here's how it does look: ![wrong](https://i80.photobucket.com/albums/j166/spikae/howittolooks.jpg) CSS: (removed comments for ease of reading) ``` div .roundbigboxkunde { background-image:url(../../upload/EW_kunde_info.png); background-position:top center; padding:10px; padding-top:10px; padding-bottom:20px; width:560px; height:1%; border-width:1px; border-color:#dddddd; border-radius:10px; -moz-border-radius:10px; -webkit-border-radius:10px; z-index:1; position:relative; overflow:hidden; } div .roundbigboxkundei { margin-top:10px; padding:10px; padding-top:10px; padding-bottom:10px; width:760px; height:1%; position:relative; overflow:hidden; ``` And HTML: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <div class="roundbigboxkunde"> <div class="roundbigboxkundei"> <p id="nyk">&nbsp;</p> <div id="bg_box2"></div> <p class="required"> <label for="billing_firstName"><span class="label">Fornavn:</span></label> <fieldset class="error"><input name="billing_firstName" class="text" type="text" value="Kyle"/> <div class="errorText hidden"></div> </fieldset> </p> CONTENT CONTINUES </fieldset> ``` [Here is the page](http://euroworker.no/user/checkout)
IE8 positioning, nightmare!
CC BY-SA 2.5
0
2010-03-24T14:05:58.640
2010-03-25T13:51:07.750
2017-02-08T14:22:56.250
-1
287,047
[ "html", "css", "internet-explorer-8", "positioning" ]
2,508,630
1
null
null
44
44,044
I have a UIView which is supposed to cover the whole device (UIWindow) to support an image zoom in/out effect I'm doing using core animation where a user taps a button on a UITableViewCell and I zoom the associated image. The zooming is performing flawlessly, what I haven't been able to figure out is why the subview is still in portrait mode even though the device is in landscape. An illustration below: ![enter image description here](https://i.stack.imgur.com/5i6iP.jpg) I do have a navigation controller but this view has been added to the UIWindow directly.
Orientation in a UIView added to a UIWindow
CC BY-SA 3.0
0
2010-03-24T14:48:41.840
2017-07-02T05:51:02.680
2012-07-21T22:58:47.330
419
295,171
[ "iphone", "uiview", "orientation", "uiwindow" ]
2,510,019
1
null
null
1
1,797
I'm in the process of importing a very large tab-delimited text file using the Import Wizard in SQL Server Management Studio 2005. Some of the column values are empty, which are represented by the string value "NULL." However, when I try to import the file I get the following error message dialog: ![SSIS Error Message](https://oncourse.iu.edu/access/content/user/brilewis/Filemanager_Public_Files/pics/SequenceImportError_032410.JPG) Is there some other value I should be using instead of NULL (there are both character and numeric columns)?
Importing NULL Values in Tab-Delimited File Using SSMS 2005
CC BY-SA 2.5
null
2010-03-24T17:36:23.280
2010-03-24T18:25:15.617
null
null
1,972
[ "sql-server-2005", "import" ]
2,510,445
1
2,514,157
null
2
3,378
I'm working on an application which contains an editable `QComboBox`. I observe the following behavior when I enter some text in the edit field and press the dropdown arrow in the combobox: ![alt text](https://imgur.com/VuyVp.png) My edit line ends up hidden behind the item `"[email protected]"`. I would like to have the combobox list popup the edit field, like in the below screen: ![alt text](https://imgur.com/QgEpG.png) The first screen above is taken on Ubuntu with Qt 4.5 while the second screen is from Suse 11 with Qt 4.4. I'm not aware of any differences regarding change of behavior of `QComboBox` popups between Qt 4.4 and Qt 4.5. Regardless, I would like the list to behave the same in both distributions. This is a standard `QComboBox` with the editable property set to on - there are no stylesheets or special formatting applied to it. How can I make the list popup below the editable field, like in the second screen?
Qt QComboBox popup position
CC BY-SA 4.0
null
2010-03-24T18:37:17.263
2020-06-27T09:20:06.690
2020-06-27T09:20:06.690
2,279,422
246,844
[ "qt", "qcombobox" ]
2,511,545
1
2,511,553
null
4
1,919
Say we've got a class like ``` public class Doer { public int Timeout {get;set;} public string DoIt(string input) { string toReturn; // Do something that involves a Timeout return toReturn; } } ``` Is there a tool that would create a Form or Control for prototyping this class? The GUI might have a NumericUpDown control with a label of "Timeout" and a GroupBox with a TextBox for "input" and a button labeled "DoIt" with an eventhandler that calls `Doer.DoIt` with the Text property of the `input` TextBox and puts the response in another TextBox. ![GUI with a NumericUpDown control with a label of "Timeout" and a GroupBox with a TextBox for "input" and a button labeled "DoIt" with an eventhandler that calls Doer.DoIt with the Text property of the input TextBox and puts the response in another TextBox.](https://dl.dropbox.com/u/313647/DoItGui.PNG)
Tool to generate a GUI (WinForms or WPF) from a class
CC BY-SA 2.5
0
2010-03-24T21:28:40.573
2012-04-07T21:19:36.053
2017-02-08T14:22:57.267
-1
116,891
[ ".net", "wpf", "winforms" ]
2,512,308
1
2,516,836
null
0
1,974
I'm trying to figure out how to add a Fan button to a Facebook page right next to the company name. I've seen this done on a few pages, as shown in the following screenshot. ![enter image description here](https://i.stack.imgur.com/ZrbBO.png) I've added the FBML application though I can't find a great deal of information on the code required for the actual button and then how to place the button on the page. Can anyone point me in the right direction? Many thanks.
Facebook fbml add fan button to page
CC BY-SA 3.0
null
2010-03-24T23:54:31.100
2012-03-14T11:30:07.857
2011-08-04T22:42:41.130
709,202
301,155
[ "facebook", "facebook-fbml" ]
2,513,106
1
2,513,120
null
2
959
I want to know how I can make a Java program where an unknown amount of objects can be added to a GUI depending on user input. I can program in objects one at a time within the program, but I haven't seen a more dynamic program. Can I do that with Java? If not, what can I do it with? For more information, here's a picture. ![](https://i6.photobucket.com/albums/y223/Asj127/CapProjIdea.jpg) There can be more than one question per question block, and each question can have it's own question block.
Can I add elements to a Java GUI?
CC BY-SA 2.5
0
2010-03-25T04:41:45.947
2010-07-02T08:57:51.023
2017-02-08T14:22:57.603
-1
223,148
[ "java", "user-interface", "dynamic" ]
2,513,784
1
2,513,913
null
7
24,779
I'm using the array-grid extjs example to try and fit a gridpanel into a container window. The problem is on resizing the container window, the gridpanel doesn't automatically fit the new size. As I understand it that's how it's supposed to work. Here's the link to the example: [http://www.extjs.com/deploy/dev/examples/grid/array-grid.html](http://www.extjs.com/deploy/dev/examples/grid/array-grid.html) What I've done is changed the following.. ``` // Added to gridpanel config layout: 'fit', viewConfig: { forceFit: true } // Window container var gridWindow = new Ext.Window({ items: [ grid ] }); // Instead of grid.render, use gridWindow.show(); gridWindow.show(); ``` ![result](https://imgur.com/hNLlVl.jpg)
Gridpanel auto resize on window resize
CC BY-SA 2.5
0
2010-03-25T07:45:46.257
2018-07-19T12:35:28.860
null
null
89,571
[ "extjs" ]
2,514,297
1
2,514,360
null
1
3,083
I am trying to use `CFNetwork` in my app so I tried adding `CFNetwork.framework` from the `Edit Target` dialog in Xcode. The interesting thing is that `CFNetwork` is not visible in the dialog box at all. Am I missing anything? Do I have to add/install `CFNetwork` in some other way? Screenshot - ![Screenshot](https://imgur.com/qCwiT.png) Thanks in advance.
Unable to find CFNetwork in Xcode
CC BY-SA 2.5
0
2010-03-25T09:28:42.893
2018-08-20T19:34:51.040
2010-03-25T11:02:05.607
30,461
8,024
[ "iphone", "objective-c", "cocoa", "xcode", "macos" ]
2,515,401
1
null
null
3
1,222
I have a simple Jlabel element with text and icon ![alt text](https://2.bp.blogspot.com/_UjH7scA_Bek/S6tVLzUlKuI/AAAAAAAABg0/N6i9Kj8Fgb8/s320/Screenshot-simplelabel.png) setting the background changes the full label colour. I want to be able to only render the background colour on the text section of the label, ie - to have separate backgrounds/foregrounds for the icon and text. Selecting/deselecting the label will flip the colour behind the icon and text. Is this possible to do this by just extending JLabel, and if so which methods should i be looking to customise? ![alt text](https://2.bp.blogspot.com/_UjH7scA_Bek/S6tVMWtzYdI/AAAAAAAABg8/2Jdd_nLDDeQ/s320/Screenshot-IconTextButton.png) My alternative idea is to create a panel with two separate label elements, one with an icon the other with text. It seems a bit messy, and before i start i'm wondering is there a smarter way of achieving this with Swing.
JLabel with separate text and icon background colours
CC BY-SA 2.5
null
2010-03-25T12:30:18.147
2010-03-25T14:31:55.327
2017-02-08T14:22:58.277
-1
55,794
[ "java", "swing", "user-interface", "jlabel" ]
2,516,641
1
null
null
1
361
Im trying to add jquery grid to my site. (codeigniter php) It loads the data just fine but the grid ends up looking awful.. I dont know much about css.... heres an image of what Im getting ![alt text](https://i.imgur.com/zCsJx.jpg)
Help with css and jquery grid
CC BY-SA 2.5
null
2010-03-25T15:06:36.630
2010-10-27T19:37:49.853
2010-03-29T06:59:28.940
16,272
167,519
[ "jquery", "css", "jqgrid" ]
2,516,634
1
null
null
2
387
I've been building a site in PHP, HTML, CSS, and using a healthy dose of jQuery javascript. The site looks absolutely fine on my Mac browsers, but for some reason, when my client uses PC Safari, she's seeing strange bits of my HTML show up on the page. Here are some (small) screenshot examples: ![li](https://farm5.static.flickr.com/4015/4462683082_a7d436c556_o.jpg) Figure 1: This one is just a closing `</li>` tag that should've been on the Media li element. Not much harm done, but strange. ![submenu](https://farm3.static.flickr.com/2504/4461905377_2715a41641_o.jpg) Figure 2: Here this was part of `<div class='submenu'>` and since the div tag didn't render properly, the entire contents of that div don't get styled correctly by CSS. // picture removed for security reasons Figure 3: This last example shows what should have been `<a class='top current' href=...` but for some reason half of the HTML tag stops being rendered and just gets printed out. So the rest of that list menu is completely broken. Here's the code from the header.php file itself. The main navigation section (seen in the screenshots) is further down, marked by a line of asterisks if you want to skip there. ``` <?php // Setting up location variables if(isset($_GET['page'])) { $page = Page::find_by_slug($_GET['page']); } elseif(isset($_GET['post'])) { $page = Page::find_by_id(4); } else { $page = Page::find_by_id(1); } $post = isset($_GET['post']) ? Blogpost::find_by_slug($_GET['post']) : false; $front = $page->id == 1 ? true : false; $buildblog = $page->id == 4 ? true : false; $eventpage = $page->id == 42 ? true : false; // Setting up content edit variables $edit = isset($_GET['edit']) ? true : false; $preview = isset($_GET['preview']) ? true : false; // Finding page slug value $pageslug = $page->get_slug($loggedIn); ?> <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title> <?php if(!$post) { if($page->id != 1) { echo $page->title." | "; } echo $database->site_name(); } elseif($post) { echo "BuildBlog | ".$post->title; } ?> </title> <link href="<?php echo SITE_URL; ?>/styles/style.css" media="all" rel="stylesheet" /> <?php include(SITE_ROOT."/scripts/myJS.php"); ?> </head> <body class=" <?php if($loggedIn) { echo "logged"; } else { echo "public"; } if($front) { echo " front"; } ?>"> <?php $previewslug = str_replace("&edit", "", $pageslug); ?> <?php if($edit) { echo "<form id='editPageForm' action='?page={$previewslug}&preview' method='post'>"; } ?> <?php if($edit && !$preview) : // Edit original ?> <div id="admin_meta_nav" class="admin_meta_nav"> <ul class="center nolist"> <li class="title">Edit</li> <li class="cancel"><a class="cancel" href="?page=<?php echo $pageslug; ?>&cancel">Cancel</a></li> <li class="save"><input style='position: relative; z-index: 500' class='save' type="submit" name="newpreview" value="Preview" /></li> <li class="publish"><input style='position: relative; z-index: 500' class='publish button' type="submit" name="publishPreview" value="Publish" /></li> </ul> </div> <?php elseif($preview && !$edit) : // Preview your edits ?> <div id="admin_meta_nav" class="admin_meta_nav"> <ul class="center nolist"> <li class="title">Preview</li> <li class="cancel"><a class="cancel" href="?page=<?php echo $pageslug; ?>&cancel">Cancel</a></li> <li class="save"><a class="newpreview" href="?page=<?php echo $pageslug; ?>&preview&edit">Continue Editing</a></li> <li class="publish"><a class="publish" href="?page=<?php echo $pageslug; ?>&publishLastPreview">Publish</a></li> </ul> </div> <?php elseif($preview && $edit) : // Return to preview and continue editing ?> <div id="admin_meta_nav" class="admin_meta_nav"> <ul class="center nolist"> <li class="title">Edit Again</li> <li class="cancel"><a class="cancel" href="?page=<?php echo $pageslug; ?>&cancel">Cancel</a></li> <li class="save"><input style='position: relative; z-index: 500' class='save button' type="submit" name="newpreview" value="Preview" /></li> <li class="publish"><input style='position: relative; z-index: 500' class='publish button' type="submit" name="publishPreview" value="Publish" /></li> </ul> </div> <?php else : ?> <div id="meta_nav" class="meta_nav"> <ul class="center nolist"> <li><a href="login.php?logout">Logout</a></li> <li><a href="<?php echo SITE_URL; ?>/admin">Admin</a></li> <li><a href="<?php if($front) { echo "admin/?admin=frontpage"; } elseif($event || $eventpage) { echo "admin/?admin=events"; } elseif($buildblog) { if($post) { echo "admin/editpost.php?post={$post->id}"; } else { echo "admin/?admin=blog"; } } else { echo "?page=".$pageslug."&edit"; } ?>">Edit Mode</a></li> <li><a href="<?php echo SITE_URL; ?>/?page=donate">Donate</a></li> <li><a href="<?php echo SITE_URL; ?>/?page=calendar">Calendar</a></li> </ul> <div class="clear"></div> </div> <?php endif; ?> <div id="public_meta_nav" class="public_meta_nav"> <div class="center"> <ul class="nolist"> <li><a href="<?php echo SITE_URL; ?>/?page=donate">Donate</a></li> <li><a href="<?php echo SITE_URL; ?>/?page=calendar">Calendar</a></li> </ul> <div class="clear"></div> </div> </div> ``` ******* Main Navigation Section, as seen in screenshots above, starts here ******** ``` <div class="header"> <div class="center"> <a class="front_logo" href="<?php echo SITE_URL; ?>"><?php echo $database->site_name(); ?></a> <ul class="nolist main_nav"> <?php $tops = Page::get_top_pages(); $topcount = 1; foreach($tops as $top) { $current = $top->id == $topID ? true : false; $title = $top->title == "Front Page" ? "Home" : ucwords($top->title); $url = ($top->title == "Front Page" || !$top->get_slug($loggedIn)) ? SITE_URL : SITE_URL . "/?page=".$top->get_slug($loggedIn); if(isset($_GET['post']) && $top->id == 1) { $current = false; } if(isset($_GET['post']) && $top->id == 4) { $current = true; } echo "<li"; if($topcount > 3) { echo " class='right'"; } echo "><a class='top"; if($current) { echo " current"; } echo "' href='{$url}'>{$title}</a>"; if($children = Page::get_children($top->id)) { echo "<div class='submenu'>"; echo "<div class='corner-helper'></div>"; foreach($children as $child) { echo "<ul class='nolist level1"; if(!$subchildren = Page::get_children($child->id)) { echo " nochildren"; } echo "'>"; $title = ucwords($child->title); $url = !$child->get_slug($loggedIn) ? SITE_URL : SITE_URL . "/?page=".$child->get_slug($loggedIn); if($child->has_published() || $loggedIn) { echo "<li><a class='title' href='{$url}'>{$title}</a>"; if($subchildren = Page::get_children($child->id)) { echo "<ul class='nolist level2'>"; foreach($subchildren as $subchild) { if($subchild->has_published() || $loggedIn) { $title = ucwords($subchild->title); $url = !$subchild->get_slug($loggedIn) ? SITE_URL : SITE_URL . "/?page=".$subchild->get_slug($loggedIn); echo "<li><a href='{$url}'>{$title}</a>"; } } echo "</ul>"; } echo "</li>"; } echo "</ul>"; } echo "</div>"; } echo "</li>"; $topcount++; } ?> </ul> <div class="clear"></div> </div> </div> <div id="mediaLibraryPopup" class="mediaLibraryPopup"> <h3>Media Library</h3> <ul class="box nolist"></ul> <div class="clear"></div> <a href="#" class="cancel">Cancel</a> </div> <div class="main_content"> ``` Does anyone have any idea why the PC Safari browser would be breaking things up like this? I'm assuming it's PHP related but I cannot figure out why it would do that. Here is the View Source version of the served HTML, as requested: (the IP has been obscured FYI) ``` <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Become An Advocate | Habitat for Humanity</title> <link href="http://28.5.337.28/~habiall2/styles/style.css" media="all" rel="stylesheet" /> <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script> <script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js'></script> <script src='http://28.5.337.28/~habiall2/scripts/tiny_mce.js'></script> <script src='http://28.5.337.28/~habiall2/scripts/jquery.easing.js'></script> <script src='http://28.5.337.28/~habiall2/scripts/cufon.js'></script> <script src='http://28.5.337.28/~habiall2/scripts/helvetica_condensed.js'></script> <script> Cufon.replace('#feature_boxes .heading', { hover: true }); Cufon.replace('#feature_boxes .button', { hover: true }); </script> <script src='http://28.5.337.28/~habiall2/scripts/front_public.js'></script><script src='http://28.5.337.28/~habiall2/scripts/front_admin.js'></script><script src='http://28.5.337.28/~habiall2/scripts/jquery.cycle.js'></script> <script > $('#feature_boxes').cycle({ fx: 'fade', timeout: 8000, speed: 500, easing: 'easeInCubic', pager: '.feature_pager' }); </script> </head> <body class=" public"> <div id="meta_nav" class="meta_nav"> <ul class="center nolist"> <li><a href="login.php?logout">Logout</a></li> <li><a href="http://28.5.337.28/~habiall2/admin">Admin</a></li> <li><a href="?page=what-is-advocacy&edit">Edit Mode</a></li> <li><a href="http://28.5.337.28/~habiall2/?page=donate">Donate</a></li> <li><a href="http://28.5.337.28/~habiall2/?page=calendar">Calendar</a></li> </ul> <div class="clear"></div> </div> <div id="public_meta_nav" class="public_meta_nav"> <div class="center"> <ul class="nolist"> <li><a href="http://28.5.337.28/~habiall2/?page=donate">Donate</a></li> <li><a href="http://28.5.337.28/~habiall2/?page=calendar">Calendar</a></li> </ul> <div class="clear"></div> </div> </div> <div class="header"> <div class="center"> <a class="front_logo" href="http://28.5.337.28/~habiall2">Habitat for Humanity</a> <ul class="nolist main_nav"> <li><a class='top' href='http://28.5.337.28/~habiall2'>Home</a></li> <li><a class='top' href='http://28.5.337.28/~habiall2/?page=about'>About</a> <div class='submenu'><div class='corner-helper'></div> <ul class='nolist level1'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=about-us'>About Us</a> <ul class='nolist level2'> <li><a href='http://28.5.337.28/~habiall2/?page=mission-and-vision'>Mission And Vision</a> <li><a href='http://28.5.337.28/~habiall2/?page=history'>History</a> <li><a href='http://28.5.337.28/~habiall2/?page=staff-and-board'>Staff And Board</a> <li><a href='http://28.5.337.28/~habiall2/?page=jobs-and-internships'>Jobs And Internships</a> <li><a href='http://28.5.337.28/~habiall2/?page=directions'>Directions</a> <li><a href='http://28.5.337.28/~habiall2/?page=annual-report'>Annual Report</a> </ul> </li> </ul> <ul class='nolist level1'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=our-stories'>Our Stories</a> <ul class='nolist level2'><li><a href='http://28.5.337.28/~habiall2/?page=homeowner-profiles'>Homeowner Profiles</a> <li><a href='http://28.5.337.28/~habiall2/?page=volunteer-profiles'>Volunteer Profiles</a> <li><a href='http://28.5.337.28/~habiall2/?page=partner-profiles'>Corporate Profiles</a> <li><a href='http://28.5.337.28/~habiall2/?page=community-profiles'>Community Profiles</a> </ul> </li> </ul> <ul class='nolist level1 nochildren'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=calendar'>Calendar</a></li> </ul> </div> </li> <li><a class='top current' href='http://28.5.337.28/~habiall2/?page=get-involved'>Get Involved</a> <div class='submenu'><div class='corner-helper'></div> <ul class='nolist level1'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=construction volunteer'>Volunteer</a> <ul class='nolist level2'> <li><a href='http://28.5.337.28/~habiall2/?page=Construction'>Construction</a> <li><a href='http://28.5.337.28/~habiall2/?page=non-construction volunteer'>Non-Construction </a> <li><a href='http://28.5.337.28/~habiall2/?page=faith-programs'>Faith Programs</a> <li><a href='http://28.5.337.28/~habiall2/?page=youth-programs'>Youth Programs</a> <li><a href='http://28.5.337.28/~habiall2/?page=forms-and-info'>Forms And Info</a> <li><a href='http://28.5.337.28/~habiall2/?page=AmeriCorps'>AmeriCorps</a> </ul> </li> </ul> <ul class='nolist level1'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=advocate-1'>Advocate</a> <ul class='nolist level2'> <li><a href='http://28.5.337.28/~habiall2/?page=become-an-advocate'>What Is Advocacy?</a> <li><a href='http://28.5.337.28/~habiall2/?page=what-is-advocacy'>Become An Advocate</a> </ul> </li> </ul> <ul class='nolist level1'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=donate-1-2'>Donate</a> <ul class='nolist level2'> <li><a href='http://28.5.337.28/~habiall2/?page=one-time-donation'>One-time Donations</a> <li><a href='http://28.5.337.28/~habiall2/?page=corporate-donations'>Corporate Donations</a> <li><a href='http://28.5.337.28/~habiall2/?page=ReStore'>ReStore</a> <li><a href='http://28.5.337.28/~habiall2/?page=vehicle-donation'>Other Ways To Donate</a> <li><a href='http://28.5.337.28/~habiall2/?page=item-wishlist'>Item Wishlist</a> </ul> </li> </ul> </div> </li> <li class='right'><a class='top' href='http://28.5.337.28/~habiall2/?page=apply'>Apply</a> <div class='submenu'><div class='corner-helper'></div> <ul class='nolist level1 nochildren'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=process'>Requirements</a></li> </ul> <ul class='nolist level1 nochildren'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=requirements'>Income Guidelines</a></li> </ul> <ul class='nolist level1 nochildren'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=Local-Assistance-'>Local Assistance </a></li> </ul> </div> </li> <li class='right'><a class='top' href='http://28.5.337.28/~habiall2/?page=blog'>BuildBlog</a></li> <li class='right'><a class='top' href='http://28.5.337.28/~habiall2/?page=media'>Media</a> <div class='submenu'><div class='corner-helper'></div> <ul class='nolist level1 nochildren'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=presskit'>Presskit</a></li> </ul> <ul class='nolist level1 nochildren'> <li><a class='title' href='http://28.5.337.28/~habiall2/?page=media-gallery'>Media Gallery</a></li> </ul> </div> </li> </ul> <div class="clear"></div> </div> </div> <div id="mediaLibraryPopup" class="mediaLibraryPopup"> <h3>Media Library</h3> <ul class="box nolist"></ul> <div class="clear"></div> <a href="#" class="cancel">Cancel</a> </div> ```
Why are pieces of my HTML showing up on the page and breaking it? Is it PHP related?
CC BY-SA 2.5
null
2010-03-25T15:05:22.877
2010-03-25T16:03:13.130
2017-02-08T14:22:59.653
-1
171,021
[ "php", "jquery", "html", "css" ]
2,517,601
1
2,518,656
null
0
1,797
I am getting an Syntax Error when processing the following lines of code. Especially on the AQ_Query.Open; ``` procedure THauptfenster.Button1Click(Sender: TObject); var option: TZahlerArray; begin option := werZahlte; AQ_Query.Close; AQ_Query.SQL.Clear; AQ_Query.SQL.Add('USE wgwgwg;'); AQ_Query.SQL.Add('INSERT INTO abrechnung '); AQ_Query.SQL.Add('(`datum`, `titel`, `betrag`, `waldemar`, `jonas`, `ali`, `ben`)'); AQ_Query.SQL.Add(' VALUES '); AQ_Query.SQL.Add('(:datum, :essen, :betrag, :waldemar, :jonas, :ali, :ben);'); AQ_Query.Parameters.ParamByName('datum').Value := DateToStr(mcDatum.Date); AQ_Query.Parameters.ParamByName('essen').Value := ledTitel.Text; AQ_Query.Parameters.ParamByName('betrag').Value := ledPreis.Text; AQ_Query.Parameters.ParamByName('waldemar').Value := option[0]; AQ_Query.Parameters.ParamByName('jonas').Value := option[1]; AQ_Query.Parameters.ParamByName('ali').Value := option[2]; AQ_Query.Parameters.ParamByName('ben').Value := option[3]; AQ_Query.Open; end; ``` The error: ![SQL Error](https://www.abload.de/img/screenshot-25.03fkbm.jpg) I am using MySQL Delphi 2010.
Delphi ADO SQL Syntax Error
CC BY-SA 2.5
0
2010-03-25T16:55:36.567
2010-03-26T13:06:44.580
2017-02-08T14:23:00.367
-1
137,939
[ "sql", "delphi", "syntax" ]
2,520,002
1
2,520,017
null
14
12,938
I have a commit, I have stored in a branch, because this should go only to a specific box. I have merged it to the branch master, but not the branch dev, that I use locally. Now, by mistake I merged master to dev and that introduced this commit to dev. I know can git revert sha, to branch dev; but since this is going to introduce a commit that undoes that commit (I am guessing, I haven't exactly tried this), when I merge master, will this commit be undone too? If so, how do I undo this commit only from the branch dev. And oh, `git reset HEAD^1` --hard is not an option because there are other commits on master, after the un-needed commit. If reset back again and apply is the only option, then how do I only merge those extra commits from master other than the un-needed commit. Update: Here is the commit tree. Looks complex. I have pointed to the commit, that I don't need in the dev. (I have also removed any personally identifiable information, thanks for understanding. It is so much simpler to screenshot gitk than to ascii art.) ![alt text](https://i.imgur.com/90EBAl.png) Thanks in advance!
Git exclude a commit in a branch
CC BY-SA 2.5
0
2010-03-25T22:49:40.627
2014-10-07T13:58:29.477
2010-03-25T23:13:18.530
55,562
55,562
[ "git", "commit", "revert" ]
2,520,131
1
null
null
100
61,539
I'm working on a Civilization-like game and I'm looking for a good algorithm for generating Earth-like world maps. I've experimented with a few alternatives, but haven't hit on a real winner yet. One option is to generate a heightmap using [Perlin noise](http://en.wikipedia.org/wiki/Perlin_noise) and add water at a level so that about 30% of the world is land. While Perlin noise (or similar fractal-based techniques) is frequently used for terrain and is reasonably realistic, it doesn't offer much in the way of control over the number, size and position of the resulting continents, which I'd like to have from a gameplay perspective. ![Perlin noise](https://farm3.static.flickr.com/2792/4462870263_ff26c40365_o.jpg) A second option is to start with a randomly positioned one-tile seed (I'm working on a grid of tiles), determine the desired size for the continent and each turn add a tile that is horizontally or vertically adjacent to the existing continent until you've reached the desired size. Repeat for the other continents. This technique is part of the algorithm used in Civilization 4. The problem is that after placing the first few continents, it's possible to pick a starting location that's surrounded by other continents, and thus won't fit the new one. Also, it has a tendency to spawn continents too close together, resulting in something that looks more like a river than continents. ![Random expansion](https://farm5.static.flickr.com/4069/4462870383_46e86b155c_o.jpg) Does anyone happen to know a good algorithm for generating realistic continents on a grid-based map while keeping control over their number and relative sizes?
Looking for a good world map generation algorithm
CC BY-SA 2.5
0
2010-03-25T23:18:38.310
2017-10-27T14:25:51.627
2017-02-08T14:23:02.083
-1
188,501
[ "algorithm", "dictionary", "terrain" ]
2,520,279
1
null
null
0
344
Many time I found several facebook application on my attach list of publisher. How can I do it for my Facebook application? ![alt text](https://farm5.static.flickr.com/4066/4461575573_6445b3363e.jpg)
How to attach application with Facebook publisher?
CC BY-SA 3.0
null
2010-03-25T23:53:26.307
2012-02-04T08:44:33.800
2020-06-20T09:12:55.060
-1
144,882
[ "facebook", "fbml", "facebook-wall", "publisher" ]
2,520,682
1
2,520,731
null
1
2,854
I have been working on this problem for a while now. I am trying to add JPEG support to a program with libjpeg. For the most part, it is working fairly well, But for some JPEGs, they show up like the picture on the left. ![](https://i.stack.imgur.com/69KYw.png) (Compare with the [original image](http://drm.info/files/images/Tied-Green.preview.jpg).) It may not be obvious, but the background shows up with alternating red green and blue rows. If anyone has seen this behavior before and knows a probable cause, I would appreciate any input. I have padded the rows to be multiples of four bytes, and it only slightly helped the issue. Code: ``` rowSize = cinfo.output_width * cinfo.num_components; /* Windows needs bitmaps to be defined on Four Byte Boundaries */ winRowSize = (rowSize + 3) & -4; imgSize = (cinfo.output_height * winRowSize + 3) & -4; while(cinfo.output_scanline < cinfo.output_height){ jpeg_read_scanlines(&cinfo, &row_pointer, 1); /* stagger read to get lines Bottom->Top (As BMP Requires) */ location = (imgSize) - (cinfo.output_scanline * winRowSize); rowsRead++; for(i = 0; i < winRowSize; i++){ rawImage[location++] = row_pointer[i]; } } /* Convert BGR to RGB */ if(cinfo.num_components == 3){ for(i = 0; i < imgSize; i += 3){ tmp = rawImage[i+2]; rawImage[i+2] = rawImage[i]; rawImage[i] = tmp; } } biSize = sizeof(BITMAPINFOHEADER); if(cinfo.num_components == 1){ /* Greyscale */ biPallete = 32 * 256; biSize += biPallete; } bitInf = (BITMAPINFO *)malloc(biSize); bitInf->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bitInf->bmiHeader.biWidth = cinfo.output_width; bitInf->bmiHeader.biHeight = cinfo.output_height; bitInf->bmiHeader.biPlanes = 1; bitInf->bmiHeader.biBitCount = 8*cinfo.num_components; bitInf->bmiHeader.biCompression = BI_RGB; bitInf->bmiHeader.biSizeImage = 0; bitInf->bmiHeader.biXPelsPerMeter = 0; bitInf->bmiHeader.biYPelsPerMeter = 0; bitInf->bmiHeader.biClrUsed = 0; bitInf->bmiHeader.biClrImportant = 0; if(cinfo.num_components == 1){ for(i = 0; i < 256; i++){ bitInf->bmiColors[i].rgbBlue = i; bitInf->bmiColors[i].rgbGreen = i; bitInf->bmiColors[i].rgbRed = i; bitInf->bmiColors[i].rgbReserved = 0; } } /* Loads rawImage into an HBITMAP */ /* retval = CreateDIBitmap(inDC, &bitInf->bmiHeader, CBM_INIT, rawImage, bitInf, DIB_RGB_COLORS); */ retval = CreateCompatibleBitmap(inDC, cinfo.output_width, cinfo.output_height); errorCode = SetDIBits(inDC, retval, 0, cinfo.output_height, rawImage, bitInf, DIB_RGB_COLORS); ``` Solution: I changed the RGB/BGR converter to this: ``` if(cinfo.num_components == 3){ for(i = 0; i < cinfo.output_height; i++){ location = (i * winRowSize); for(j = 0; j < rowSize; j += 3){ tmp = rawImage[location+2]; rawImage[location+2] = rawImage[location]; rawImage[location] = tmp; location += 3; } } } ``` And it worked like a charm. Thanks to [roygbiv](https://stackoverflow.com/users/113476/roygbiv).
C: WinAPI CreateDIBitmap() from byte[] problem
CC BY-SA 4.0
null
2010-03-26T01:43:13.933
2019-04-23T20:31:01.827
2019-04-23T20:31:01.827
712,526
244,528
[ "c", "arrays", "winapi", "jpeg", "libjpeg" ]
2,522,096
1
2,522,412
null
9
5,729
I have created some simple charts (of type FastLine) with MSChart and update them with live data, like below: ![MSCharts Level Chart](https://i.stack.imgur.com/5WoRx.png) To do so, I bind an observable collection of a custom type to the chart like so: ``` // set chart data source this._Chart.DataSource = value; //is of type ObservableCollection<SpectrumLevels> //define x and y value members for each series this._Chart.Series[0].XValueMember = "Index"; this._Chart.Series[1].XValueMember = "Index"; this._Chart.Series[0].YValueMembers = "Channel0Level"; this._Chart.Series[1].YValueMembers = "Channel1Level"; // bind data to chart this._Chart.DataBind(); //lasts 1.5 seconds for 8000 points per series ``` At each refresh, the dataset completely changes, it is not a scrolling update! With a profiler I have found that the `DataBind()` call takes about 1.5 seconds. The other calls are negligible. - - - - - From the type of the application to keep it "fluent", we should have multiple refreshes per second. Thanks for any hints! ``` this._Chart.Series[0].Points.Clear(); foreach (var item in value) //iterates over the list of custom objects { this._Chart.Series[0].Points.Add(new DataPoint { XValue = item.Index, YValues = new double[] { item.Channel0Level.Value } }); } ```
How to improve WinForms MSChart performance?
CC BY-SA 3.0
0
2010-03-26T09:13:57.487
2016-03-15T07:04:02.737
2013-03-26T21:45:46.250
79,485
79,485
[ "c#", "winforms", "performance", "mschart" ]
2,522,897
1
2,522,908
null
67
39,465
In eclipse preferences ``` Windows > Preferences > Java > Junit ``` ![alt text](https://1.bp.blogspot.com/_UjH7scA_Bek/S6yamSn9pGI/AAAAAAAABhE/znqFy0yrZgc/s320/eclipse-junit-ea-jvm-args.png) What effect does the "Add '-ea' to VM args ...." checkbox option actually have on the new junit launch config?
Eclipse Junit '-ea' VM Option
CC BY-SA 2.5
0
2010-03-26T11:35:46.117
2021-02-24T15:01:21.247
2017-02-08T14:23:02.797
-1
55,794
[ "eclipse", "ide", "junit" ]
2,525,030
1
2,548,195
null
10
4,314
I have a custom tab control using Chrome-shaped tabs that binds to a ViewModel. Because of the shape, the edges overlap a bit. I have a function that sets the tabItem's ZIndex on `TabControl_SelectionChanged` which works fine for selecting tabs, and dragging/dropping tabs, however when I Add or Close a tab via a Relay Command I am getting unusual results. Does anyone have any ideas? ![](https://i193.photobucket.com/albums/z197/Lady53461/tabs_default.jpg) ![](https://i193.photobucket.com/albums/z197/Lady53461/tabs_removing.jpg) ![](https://i193.photobucket.com/albums/z197/Lady53461/tabs_adding.jpg) Adding more then 1 tab at a time will not reset the zindex of other recently-added tabs so they go behind the tab on the Right, and closing tabs does not correctly render the ZIndex of the SelectedTab that replaces it and it shows up behind the tab on its right. ``` private void PrimaryTabControl_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.Source is TabControl) { TabControl tabControl = sender as TabControl; ItemContainerGenerator icg = tabControl.ItemContainerGenerator; if (icg.Status == System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated) { foreach (object o in tabControl.Items) { UIElement tabItem = icg.ContainerFromItem(o) as UIElement; Panel.SetZIndex(tabItem, (o == tabControl.SelectedItem ? 100 : 90 - tabControl.Items.IndexOf(o))); } } } } ``` By using breakpoints I can see that it is correctly setting the ZIndex to what I want it to, however the layout is not displaying the changes. I know some of the changes are in effect because if none of them were working then the tab edges would be reversed (the right tabs would be drawn on top of the left ones). Clicking a tab will correctly set the zindex of all tabs (including the one that should be drawn on top) and dragging/dropping them to rearrange them also renders correctly (which removes and reinserts the tab item). The only difference I can think of is I am using the MVVM design pattern and the buttons that Add/Close tabs are relay commands. Does anyone have any idea why this is happening and how I can fix it?? p.s. I did try setting a ZIndex in my ViewModel and binding to it, however the same thing happens when adding/removing tabs via the relay command.
WPF - Overlapping Custom Tabs in a TabControl and ZIndex
CC BY-SA 2.5
0
2010-03-26T16:44:33.943
2011-03-14T12:35:55.450
2017-02-08T14:23:03.920
-1
302,677
[ "wpf", "tabcontrol", "z-index", "tabitem" ]
2,528,149
1
2,528,252
null
0
167
This is my first time doing this sort of project so apologies if the question is silly. I've got a question about using a C project with a project in the iPhone SDK. I've dragged and dropped the C project into the iPhone project in Xcode (so it appears in the screenshot below). sjeng.h is a file inside GameEngine.xcodeproj, but when I try to include the header file, I not only receive an error, but the file it is looking for seems to be capitalized whereas the import statement is not. ![http://imgur.com/AdrGL.png](https://i.stack.imgur.com/g1YOD.png) Does anyone know what the problem might be? Thanks!
Integrating a C project in the iPhone SDK
CC BY-SA 3.0
null
2010-03-27T04:31:12.817
2011-12-07T22:48:02.583
2011-12-07T22:48:02.583
84,042
303,028
[ "iphone", "c", "objective-c", "dependencies" ]
2,530,680
1
2,533,156
null
4
2,252
I have a simple database with multiple tables. I can't figure out how to make cakePHP display the values associated with a foreign key in an index view. Or create a view where the fields of my choice (the ones that make sense to users like location name - not location_id can be updated or viewed on a single page). I have created an example at [http://lovecats.cakeapp.com](http://lovecats.cakeapp.com) that illustrate the question. If you look at the page and click the "list cats", you will notice that it shows the location_id field from the locations table. You will also notice that when you click "add cats", you must choose a location_id from the locations table. This is the automagic way that cakePHP builds the app. I want this to be the field location_name. ![alt text](https://imgur.com/7pizH.png) The database is setup so that the table cats has a foreign key called location_id that has a relationship to a table called locations. ![](https://imgur.com/RTMqC.png) This is my problem: I want these pages to display the location_name instead of the location_id. If you want to login to the application, you can go to [http://cakeapp.com/sqldesigners/sql/lovecats](http://cakeapp.com/sqldesigners/sql/lovecats) and the password 'password' to look at the db relationships, etc. How do I have a page that shows the fields that I want? And is it possible to create a page that updates fields from all of the tables at once? This is the slice of cake that I have been trying to figure out and this would REALLY get me over a hump. You can download the app and sql from the above url.
How to make cakePHP retrieve the data represented by a foreign key?
CC BY-SA 3.0
0
2010-03-27T19:43:24.260
2016-12-26T15:15:35.520
2016-12-26T15:15:35.520
1,033,581
124,725
[ "php", "cakephp" ]
2,530,729
1
null
null
0
1,227
I must say that despite this being a newb question, I don't think I have totally mastered HTML a tags. Whenever I want to open a link in a new tab I add , works fine in chrome and firefox. Not in IE7-8. I think the behaviour might have something to do with the DOCTYPE, but I'm not entirely sure. I'm currently using . --- Right now what I am trying to understand is: - How to open links in new tabs in IE7-8- How to open links within ![alt text](https://i.imgur.com/Jpo8i.png) --- Help would be very much appreciated! :)
Anchor tags and target behaviour? - HTML
CC BY-SA 2.5
0
2010-03-27T19:59:18.997
2010-03-27T20:18:02.297
null
null
208,827
[ "html", "anchor", "target" ]
2,530,862
1
3,927,122
null
13
3,383
correct me if i'm wrong, but Adobe AIR currently only allows applications to have maximum size icon of 256x256. - - --- AIR 2 still doesn't support importing 512x512 sized icons. AIR 2.7 still doesn't support importing icon sizes larger than 128 x 128. ludicrous! ![alt text](https://i.stack.imgur.com/YKjpj.png)
Adobe AIR 512x512 Icons?
CC BY-SA 3.0
0
2010-03-27T20:44:30.743
2016-05-10T13:38:57.340
2020-06-20T09:12:55.060
-1
336,929
[ "flash", "actionscript-3", "icons", "air" ]
2,534,774
1
2,557,612
null
6
2,784
I have implemented a Phong Illumination Scheme using a camera that's centered at (0,0,0) and looking directly at the sphere primitive. The following are the relevant contents of the scene file that is used to view the scene using OpenGL as well as to render the scene using my own implementation: ``` ambient 0 1 0 dir_light 1 1 1 -3 -4 -5 # A red sphere with 0.5 green ambiance, centered at (0,0,0) with radius 1 material 0 0.5 0 1 0 0 1 0 0 0 0 0 0 0 0 10 1 0 sphere 0 0 0 0 1 ``` ![Here](https://imgur.com/IvRsy.jpg) The resulting image produced by OpenGL. ![Here](https://imgur.com/3oqwn.jpg) The image that my rendering application produces. As you can see, there are various differences between the two: 1. The specular highlight on my image is smaller than the one in OpenGL. 2. The diffuse surface seems to not diffuse in the correct way, resulting in the yellow region to be unneccessarily large in my image, whereas in OpenGL there's a nice dark green region closer to the bottom of the sphere 3. The color produced by OpenGL is much darker than the one in my image. Those are the most prominent three differences that I see. The following is my implementation of the Phong illumination: ``` R3Rgb Phong(R3Scene *scene, R3Ray *ray, R3Intersection *intersection) { R3Rgb radiance; if(intersection->hit == 0) { radiance = scene->background; return radiance; } R3Vector normal = intersection->normal; R3Rgb Kd = intersection->node->material->kd; R3Rgb Ks = intersection->node->material->ks; // obtain ambient term R3Rgb intensity_ambient = intersection->node->material->ka*scene->ambient; // obtain emissive term R3Rgb intensity_emission = intersection->node->material->emission; // for each light in the scene, obtain calculate the diffuse and specular terms R3Rgb intensity_diffuse(0,0,0,1); R3Rgb intensity_specular(0,0,0,1); for(unsigned int i = 0; i < scene->lights.size(); i++) { R3Light *light = scene->Light(i); R3Rgb light_color = LightIntensity(scene->Light(i), intersection->position); R3Vector light_vector = -LightDirection(scene->Light(i), intersection->position); // calculate diffuse reflection intensity_diffuse += Kd*normal.Dot(light_vector)*light_color; // calculate specular reflection R3Vector reflection_vector = 2.*normal.Dot(light_vector)*normal-light_vector; reflection_vector.Normalize(); R3Vector viewing_vector = ray->Start() - intersection->position; viewing_vector.Normalize(); double n = intersection->node->material->shininess; intensity_specular += Ks*pow(max(0.,viewing_vector.Dot(reflection_vector)),n)*light_color; } radiance = intensity_emission+intensity_ambient+intensity_diffuse+intensity_specular; return radiance; } ``` Here are the related LightIntensity(...) and LightDirection(...) functions: ``` R3Vector LightDirection(R3Light *light, R3Point position) { R3Vector light_direction; switch(light->type) { case R3_DIRECTIONAL_LIGHT: light_direction = light->direction; break; case R3_POINT_LIGHT: light_direction = position-light->position; break; case R3_SPOT_LIGHT: light_direction = position-light->position; break; } light_direction.Normalize(); return light_direction; } R3Rgb LightIntensity(R3Light *light, R3Point position) { R3Rgb light_intensity; double distance; double denominator; if(light->type != R3_DIRECTIONAL_LIGHT) { distance = (position-light->position).Length(); denominator = light->constant_attenuation + light->linear_attenuation*distance + light->quadratic_attenuation*distance*distance; } switch(light->type) { case R3_DIRECTIONAL_LIGHT: light_intensity = light->color; break; case R3_POINT_LIGHT: light_intensity = light->color/denominator; break; case R3_SPOT_LIGHT: R3Vector from_light_to_point = position - light->position; light_intensity = light->color*( pow(light->direction.Dot(from_light_to_point), light->angle_attenuation)); break; } return light_intensity; } ``` I would greatly appreciate any suggestions as to any implementation errors that are apparent. I am wondering if the differences could be occurring simply because of the gamma values used for display by OpenGL and the default gamma value for my display. I also know that OpenGL (or at least tha parts that I was provided) can't cast shadows on objects. Not that this is relevant for the point in question, but it just leads me to wonder if it's simply display and capability differences between OpenGL and what I am trying to do. Thank you for your help.
OpenGL render vs. own Phong Illumination Implementation
CC BY-SA 2.5
null
2010-03-28T22:08:27.970
2010-04-01T01:23:44.237
null
null
278,793
[ "c++", "reflection", "opengl", "raytracing" ]
2,535,156
1
2,535,839
null
0
9,466
Hope someone has an easy answer on this. I have a header image which is just a 75px high gradient with a fade on the bottom. I have it set as the background image on my header and I want to throw in a left-sidebar on my page. There is a transparency on the header image and when I have my sidebar I can't get it to sit behind the header. You can see in this screenshot: ![sidebar](https://i.stack.imgur.com/QZ0xq.jpg) The green sidebar won't "sit" behind the header. I have the header z-index set to 99 and the sidebar to 1. I tried the reverse to make sure I didn't mix up my numbers but that didn't work. Both are absolutely positioned. I'm attaching their CSS selectors in the hopes someone has an easy answer. Am sure I'm missing something basic: ``` div.header { z-index: 99; background: transparent; background-image: url(images/header_bg.png); position: absolute; height: 85px; width: 100%; font-family: Helvetica, Verdana, Arial, sans-serif; } div#leftsidebar { height: 400px; border-right-style: dashed; border-right-width: 1px; z-index: -1; margin-top: 75px; width: 200px; position: absolute; background-color: #66ff66; } ``` Thanks.
Sidebar overlapping header despite using background-images and Z-Index
CC BY-SA 3.0
null
2010-03-29T00:18:11.060
2012-05-07T12:21:39.083
2012-05-07T12:21:39.083
1,071,413
291,724
[ "css", "css-selectors" ]
2,537,368
1
2,537,661
null
0
280
I am writing javascript codes and i want to add todo, note, bug etc. to .js or .aspx files. But Resharper 4.5 couln't find them. Is there any way to show these comments inside todo explorer? any help would be greatly appreciated Platform: VS.NET 2008 ![TODO in CS File](https://content.screencast.com/users/uzay95/folders/Jing/media/6017981d-d866-4913-b2bb-e3c053949ef7/todoInCS.png) ![TODO in ASPX File](https://content.screencast.com/users/uzay95/folders/Jing/media/e0ae629d-d84f-4a91-af3c-35541069fe30/todoinJavascript.png)
How can i search TODO lines in javascript files with resharper?
CC BY-SA 2.5
null
2010-03-29T11:06:11.987
2011-03-09T09:07:46.583
2017-02-08T14:23:10.497
-1
104,085
[ "resharper", "bug-tracking", "todo" ]
2,537,460
1
null
null
1
84
I wonder that is there any way to see all function names in Event combo-box on Visual Studio 2008 IDE? ![like CS file method names](https://content.screencast.com/users/uzay95/folders/Jing/media/bbc99b6b-c198-469c-92d1-654fab4db067/javascriptFunctions.png)
To see javascript function names in event list on VS.NET 2008 IDE
CC BY-SA 2.5
0
2010-03-29T11:24:38.473
2011-04-04T17:08:36.770
2017-02-08T14:23:10.830
-1
104,085
[ "javascript", "visual-studio-2008" ]
2,539,136
1
2,656,187
null
0
294
Using Sun Glassfish Enterprise server v2.1.1 I am using "alternatedocroot" via sun-web.xml for my web application to abstract out static content from actual deploy-able code (EAR/WAR) What I have is a cluster of two server instances distributed across two physical hosts - HOST1 and HOST2. "alternatedocroot" points to /data/static-content/ on both HOST1 and HOST2. Would DAS (Domain application server )take care of syncing /data/static-content between HOST1 and HOST2 if I use syncinstances=true option while starting up the cluster? ![](https://farm3.static.flickr.com/2727/4473668180_53b7a97c4d_o.png) Thanks!
Glassfish v2 alternatedocroot - will DAS sync it?
CC BY-SA 2.5
0
2010-03-29T15:28:44.957
2010-04-16T21:25:03.023
2017-02-08T14:23:11.510
-1
212,211
[ "java", "glassfish", "alternate" ]
2,540,294
1
2,542,065
null
31
13,323
When plotting a graph with a discontinuity/asymptote/singularity/whatever, is there any automatic way to prevent Matplotlib from 'joining the dots' across the 'break'? (please see code/image below). I read that Sage has a [detect_poles] facility that looked good, but I really want it to work with Matplotlib. ``` import matplotlib.pyplot as plt import numpy as np from sympy import sympify, lambdify from sympy.abc import x fig = plt.figure(1) ax = fig.add_subplot(111) # set up axis ax.spines['left'].set_position('zero') ax.spines['right'].set_color('none') ax.spines['bottom'].set_position('zero') ax.spines['top'].set_color('none') ax.xaxis.set_ticks_position('bottom') ax.yaxis.set_ticks_position('left') # setup x and y ranges and precision xx = np.arange(-0.5,5.5,0.01) # draw my curve myfunction=sympify(1/(x-2)) mylambdifiedfunction=lambdify(x,myfunction,'numpy') ax.plot(xx, mylambdifiedfunction(xx),zorder=100,linewidth=3,color='red') #set bounds ax.set_xbound(-1,6) ax.set_ybound(-4,4) plt.show() ``` ![Discontinuity](https://i.stack.imgur.com/df2aZ.png)
how to handle an asymptote/discontinuity with Matplotlib
CC BY-SA 3.0
0
2010-03-29T18:27:09.280
2021-09-16T11:09:30.287
2017-08-13T08:31:35.187
4,220,785
271,386
[ "python", "numpy", "matplotlib", "equation", "sympy" ]
2,540,361
1
null
null
0
93
I have a DBML file with a very large data model. Whenever I need to add a relationship between to tables I have to select the other table from a combo box which appears to be in in almost random order. Is there a reason these dropdowns aren't in alphabetical order, or is there a way to put them in some kind of order? ![problem](https://i.imgur.com/5JZMN.png)
Why don't the classes in the DBML designer appear in alphabetical order?
CC BY-SA 2.5
null
2010-03-29T18:36:53.380
2013-08-21T19:51:05.560
2013-08-21T19:51:05.560
861,716
2,191
[ "visual-studio-2008", "linq-to-sql" ]
2,540,439
1
2,540,502
null
1
1,377
I have a View that renders something like this: ![alt text](https://i.imgur.com/OiRvq.jpg) "Item 1" and "Item 2" are `<tr>` elements from a table. After the user change "Value 1" or "Value 2" I would like to call a Controller and put the result (some HTML snippet) in the `div` marked as "". I have some vague notions of JQuery. I know how to bind to the `onchange` event of the `Select` element, and call the `$.ajax()` function, for example. But I wonder if this can be achieved in a more efficient way in ASP.NET MVC2.
Best strategy for HTML partial rendering based on multiple dropdown values
CC BY-SA 2.5
null
2010-03-29T18:50:56.580
2010-04-03T07:09:50.217
2010-04-03T07:09:50.217
164,901
18,073
[ "asp.net", "asp.net-mvc-2", "jquery" ]
2,542,114
1
null
null
8
8,123
I deployed an ASP.NET web application last night and I when I woke up this morning it was very slow and would occasionally just throw a 'Service Unavailable' error. I checked the Event Viewer and it was filled up with these errors: ![](https://imgkk.com/i/fr8_.png) > An unhandled exception occurred and the process was terminated.Exception: System.Runtime.Serialization.SerializationExceptionMessage: Unable to find assembly 'MonoTorrent, Version=0.80.0.0, Culture=neutral, PublicKeyToken=null' I'm puzzled as it was working perfectly when I deployed it (MonoTorrent is required to retrieve the number of seeders/leechers for a certain torrent off the tracker - this was working fine), but it's no longer working and whenever code that uses MonoTorrent gets involved, the worker process just crashes. MonoTorrent.dll is in the /bin/ directory. --- I compiled the MonoTorrent source code in with the rest of my web application, but it still crashes whenever it uses MonoTorrent. However, it now says that it is `Unable to find assembly 'OpenPeer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null`. Here, OpenPeer is the name of the web application's assembly.
ASP.NET web application can't find an assembly
CC BY-SA 2.5
0
2010-03-30T00:16:58.507
2014-03-26T10:14:35.770
2017-02-08T14:23:12.180
-1
null
[ "asp.net", "web-applications", "iis-6", "assemblies", "crash" ]
2,546,066
1
2,547,756
null
1
814
This "SportsType" field can hold a link to different sports tables E.g. "FootballEvent", "RubgyEvent", "CricketEvent" and "F1 Event". Each of these Sports tables have . My goal is to be able to genericly add sports types in the future as required, yet hold sport specific event data (fields) as part of my Event Entity. I have thrown together a quick C# example to express my intent at a higher level: ``` public class Event<T> where T : new() { public T Fields { get; set; } public Event() { EventType = new T(); } } public class FootballEvent { public Team CompetitorA { get; set; } public Team CompetitorB { get; set; } } public class TennisEvent { public Player CompetitorA { get; set; } public Player CompetitorB { get; set; } } public class F1RacingEvent { public List<Player> Drivers { get; set; } public List<Team> Teams { get; set; } } public class Team { public IEnumerable<Player> Squad { get; set; } } public class Player { public string Name { get; set; } public DateTime DOB { get; set;} } ``` ![football Event code completion](https://i332.photobucket.com/albums/m339/holsee/footballEvent.png) ![f1 Event code completion](https://i332.photobucket.com/albums/m339/holsee/f1Event-1.png)
Modeling a Generic Relationship (expressed in C#) in a Database
CC BY-SA 2.5
null
2010-03-30T14:40:05.203
2010-04-02T12:11:41.387
2017-02-08T14:23:13.603
-1
85,422
[ "sql-server", "database", "nhibernate", "database-design", "orm" ]
2,546,453
1
null
null
10
2,525
I want to customize a `NSMenu` with `NSMenuItems`, so does it looks like the Apple Pro Apps. But how can I customize a `NSMenu`? There is no draw method to change the appearance. If I set a `NSView` to a `NSMenuItem`, I can set the background color, but I will loose highlighting and menu handling. Furthermore the top and bottom cap of the `NSMenu` cannot be customized. I found only [this hint](http://osdir.com/ml/cocoa-dev/2009-06/msg00426.html), but unfortunately without code. ![Dark TableView with a white menu and white menu items](https://i.stack.imgur.com/PNUyv.png) I would be very happy for some help!
How to customize NSMenu like the Apple Pro Apps?
CC BY-SA 3.0
0
2010-03-30T15:26:31.633
2018-11-29T09:47:15.467
2012-02-09T18:30:07.433
356,895
305,250
[ "cocoa", "customization", "nsmenu", "nsmenuitem" ]
2,547,042
1
2,561,787
null
0
4,796
The section in the image below shows strange results for the column. The text should be when the value under the column named equals the value under the column named . ![](https://i.imgur.com/77toK.png) The expressions are evaluated using identical code: ``` new java.lang.Boolean( $V{LAST_WEEK_TALLY_0}.add( $V{LAST_WEEK_TALLY_1} ).add( $V{LAST_WEEK_TALLY_2} ).add( $V{LAST_WEEK_TALLY_3} ).longValue() == $V{THIS_WEEK_TALLY_0}.add( $V{THIS_WEEK_TALLY_1} ).add( $V{THIS_WEEK_TALLY_2} ).add( $V{THIS_WEEK_TALLY_3} ).longValue() ) ``` The for the Text Field is set to . It appears as though the code is being evaluated for the values under the and columns one row too late. The value being printed is correct for that row. This means that the evaluation time for and are not evaluating at the same time. What do I need to do to make and evaluate to the same result at the same time? This would then produce the word for the column whenever `Previous == Current`.
Synchronize Print When Expression & Text Field Expression
CC BY-SA 2.5
null
2010-03-30T16:56:16.683
2010-04-01T16:02:28.210
null
null
59,087
[ "jasper-reports", "ireport" ]
2,547,457
1
2,547,650
null
0
5,668
hopefully somebody can help The table structure is as follows: ``` tblCompany: compID compName tblOffice: offID, compID, add1, add2, add3 etc... tblEmployee: empID Name, telNo, etc... offID ``` I have a form that contains contact details for employees, all works ok using after update. A cascading combo box, cmbComp, allows me to select a company, and inturn select the appropriate office, cboOff, and updates the corresponding tblEmployee.offID field correctly. Fields are automatically updated for the address also cmbComp: RowSource ``` SELECT DISTINCT tblOffice.compID, tblCompany.compID FROM tblCompany INNER JOIN AdjusterCompanyOffice ON tblCompany.compID=tblOffice.compID ORDER BY tblCompany.compName; ``` cboOff: RowSource ``` SELECT tblCompany.offID, tblCompany.Address1, tblCompany.Address2, tblCompany.Address3, tblCompany.Address4, tblCompany.Address5 FROM tblCompany ORDER BY tblCompany.Address1; ``` The problem I am having is that when i load a new record how to retrieve the data and automatically load the cmbComp and text fields. The cboOff combo box loads correctly as the control source for this is the offID I imagine there must be a way of setting the value on opening the record? Not sure how though. I dont think I can set the controlsource cmbComp or text fields, or can I? Any help/point in the right direction appreciated, have been searching for a way to do this but cant get anywhere! -edit Ive tried adding the following for the control of a text field ``` =[Forms]![frmAdjPersonalDetails]![cboAdjOff].[Column](2) ``` This works at getting the values but causes an error with the after Update used to create the cascading combo box and update the text fields. ``` Private Sub cmbComp_AfterUpdate() Me.cboOff.RowSource = "SELECT ID, Address1, Address2, Address3, Address4, Address5 FROM" & _ " tblOffice WHERE CompID = " & Me.cmbComp & _ " ORDER BY Address1" Me.cboAdjOff = Me.cboAdjOff.ItemData(0) Me.txtAdd2 = Me.cboOff.Column(2) Me.txtAdd3 = Me.cboOff.Column(3) Me.txtAdd4 = Me.cboOff.Column(4) Me.txtAdd5 = Me.cboOff.Column(5) End Sub ``` Not sure what tod do??
Combo-box values automatically update
CC BY-SA 2.5
0
2010-03-30T18:03:11.627
2010-04-12T18:52:05.077
2010-03-30T19:18:41.760
299,088
299,088
[ "ms-access", "ms-access-2007" ]
2,548,709
1
2,548,746
null
1
827
What GDI methods can I use to draw the blue shape shown in the image below? The center must be transparent. ![alt text](https://i.imgur.com/YkwsG.jpg)
C# GDI Drawing2D help
CC BY-SA 2.5
null
2010-03-30T21:02:31.313
2010-03-30T22:27:48.843
null
null
259,712
[ "c#", "graphics", "drawing2d" ]
2,550,852
1
2,550,876
null
0
588
I wanted to create one js file which includes every js files to attach them to the head tag where it is. But i am getting this error ``` Microsoft JScript runtime error: Object expected ``` this is my code: ``` var baseUrl = document.location.protocol + "//" + document.location.host + '/yabant/'; // To find root path with virtual directory function ResolveUrl(url) { if (url.indexOf("~/") == 0) { url = baseUrl + url.substring(2); } return url; } // JS dosyalarının tek noktadan yönetilmesi function addJavascript(jsname, pos) { var th = document.getElementsByTagName(pos)[0]; var s = document.createElement('script'); s.setAttribute('type', 'text/javascript'); s.setAttribute('src', jsname); th.appendChild(s); } addJavascript(ResolveUrl('~/js/1_jquery-1.4.2.min.js'), 'head'); $(document).ready(function() { addJavascript(ResolveUrl('~/js/5_json_parse.js'), 'head'); addJavascript(ResolveUrl('~/js/3_jquery.colorbox-min.js'), 'head'); addJavascript(ResolveUrl('~/js/4_AjaxErrorHandling.js'), 'head'); addJavascript(ResolveUrl('~/js/6_jsSiniflar.js'), 'head'); addJavascript(ResolveUrl('~/js/yabanYeni.js'), 'head'); addJavascript(ResolveUrl('~/js/7_ResimBul.js'), 'head'); addJavascript(ResolveUrl('~/js/8_HaberEkle.js'), 'head'); addJavascript(ResolveUrl('~/js/9_etiketIslemleri.js'), 'head'); addJavascript(ResolveUrl('~/js/bugun.js'), 'head'); addJavascript(ResolveUrl('~/js/yaban.js'), 'head'); addJavascript(ResolveUrl('~/embed/bitgravity/functions.js'), 'head'); }); ``` Paths are right. I wanted to show you folder structure and watch panel: ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/4a9ce421-1d5d-4b9d-badc-23842512605b/jsProblem.png) Any help would be greatly appreciated.
attaching js files to one js file but with JQuery error !
CC BY-SA 2.5
null
2010-03-31T06:11:30.577
2010-03-31T12:42:21.580
2017-02-08T14:23:14.637
-1
104,085
[ "asp.net", "javascript", "jquery" ]
2,551,147
1
2,551,800
null
1
2,374
I am trying to generate a hierarchical directory listing in pyGTK. Currently, I have this following directory tree: ``` /root folderA - subdirA - subA.py - a.py folderB - b.py ``` I have written a function that -almost- seem to work: ``` def go(root, piter=None): for filename in os.listdir(root): isdir = os.path.isdir(os.path.join(root, filename)) piter = self.treestore.append(piter, [filename]) if isdir == True: go(os.path.join(root, filename), piter) ``` This is what i get when i run the app: ![alt text](https://img.photobucket.com/albums/v425/play/help/tree.png) I also think my function is inefficient and that i should be using os.walk(), since it already exists for such purpose. How can I, and what is the proper/most efficient way of generating a directory tree with pyGTK? the block of code i ended up using, that works, is: ``` parents = {} for dir, dirs, files in os.walk(root): for subdir in dirs: parents[os.path.join(dir, subdir)] = self.treestore.append(parents.get(dir, None), [subdir]) for item in files: self.treestore.append(parents.get(dir, None), [item]) ```
How to list directory hierarchy in GtkTreeView widget?
CC BY-SA 3.0
0
2010-03-31T07:30:36.010
2013-01-23T19:04:44.660
2017-02-08T14:23:14.977
-1
93,026
[ "python", "pygtk", "gtktreeview" ]
2,553,634
1
2,553,707
null
4
3,622
I am dynamically load js files with _tumIsler.js (_allStuff.js) ``` <script src="../js/_tumJsler.js" type="text/javascript"></script> ``` It contains: ``` // url=> http: + // + localhost:4399 + /yabant/ // ---- ---- -------------- -------- // protocol + "//" + host + '/virtualDirectory/' var baseUrl = document.location.protocol + "//" + document.location.host + '/yabant/'; // If there is "~/" at the begining of url, replace it with baseUrl function ResolveUrl(url) { if (url.indexOf("~/") == 0) { url = baseUrl + url.substring(2); } return url; } // Attaching scripts to any tag function addJavascript(jsname, pos) { var th = document.getElementsByTagName(pos)[0]; var s = document.createElement('script'); s.setAttribute('type', 'text/javascript'); s.setAttribute('src', jsname); th.appendChild(s); } // I want to make sure jQuery is loaded? addJavascript(ResolveUrl('~/js/1_jquery-1.4.2.min.js'), 'head'); var loaded = false; // assume it didn't first and if it is change it to true function fControl() { // alert("JQUERY is loaded?"); if (typeof jQuery == 'undefined') { loaded = false; fTry2LoadJquery(); } else { loaded = true; fGetOtherScripts(); } } // Check is jQuery loaded fControl(); function fTry2LoadJquery() { // alert("JQUERY didn't load! Trying to reload..."); if (loaded == false) { setTimeout("fControl()", 1000); } else { return; } } function getJavascript(jsname, pos) { // I want to retrieve every script one by one $.ajaxSetup({ async: false, beforeSend: function() { $.ajaxSetup({ async: false, cache: true }); }, complete: function() { $.ajaxSetup({ async: false, cache: true }); }, success: function() { // } }); $.getScript(ResolveUrl(jsname), function() { /* ok! */ }); } function fGetOtherScripts() { // alert("Other js files will be load in this function"); getJavascript(ResolveUrl('~/js/5_json_parse.js'), 'head'); getJavascript(ResolveUrl('~/js/3_jquery.colorbox-min.js'), 'head'); getJavascript(ResolveUrl('~/js/4_AjaxErrorHandling.js'), 'head'); getJavascript(ResolveUrl('~/js/6_jsSiniflar.js'), 'head'); getJavascript(ResolveUrl('~/js/yabanYeni.js'), 'head'); getJavascript(ResolveUrl('~/js/7_ResimBul.js'), 'head'); getJavascript(ResolveUrl('~/js/8_HaberEkle.js'), 'head'); getJavascript(ResolveUrl('~/js/9_etiketIslemleri.js'), 'head'); getJavascript(ResolveUrl('~/js/bugun.js'), 'head'); getJavascript(ResolveUrl('~/js/yaban.js'), 'head'); getJavascript(ResolveUrl('~/embed/bitgravity/functions.js'), 'head'); } ``` After all these js files are loaded, this line is executing to show UploadFile page inside the page when clicked to the button which id is "btnResimYukle" . ``` <script type="text/javascript"> if (jQuery().colorbox) { alert("colorbox exists"); } else { alert("colorbox doesn't exist"); $.ajaxSetup({ cache: true, async: false }); $.getScript(ResolveUrl('~/js/3_jquery.colorbox-min.js'), function() { alert("Loaded ! "); $('#btnResimYukle').live('click', function() { $.fn.colorbox({ iframe: true, width: 700, height: 600, href: ResolveUrl('~/Yonetim/DosyaYukle.aspx') }); return false; }); }); } </script> ``` First i want to ask you very good people, i am always calling js files with $.getScript function. Are they always downloading in every $.getScript requests? And if the answer "yes", how can i prevent that? Does this work: ``` $.ajaxSetup({ cache: true, async: false }); ``` ![Js files coming from cache](https://content.screencast.com/users/uzay95/folders/Jing/media/74264af5-2000-4652-82dc-70d35b1b0143/lastSit.png) Second, i am always getting this error when i press F5 or Ctrl+F5 : ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/c15b945a-cbdd-40f7-add8-2ded4d8b92dd/error1.png) ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/030fe7f4-edc0-444d-a62b-9eaefa4fb141/error2.png) But when i press enter key on url, there is no error :s
Jquery loaded? Colorbox is available? Calling some js file via $.getScript are always downloading from the web server?
CC BY-SA 2.5
null
2010-03-31T14:12:48.440
2010-03-31T15:20:07.937
2017-02-08T14:23:16.683
-1
104,085
[ "javascript", "jquery", "colorbox" ]
2,557,844
1
2,557,973
null
8
3,003
Consider a snippet of CSS code from a .css file in Visual Studio 2010 to be commented out. ![alt text](https://i.imgur.com/iVfQd.png) Normally + , + will comment your selected HTML and other source code. But highlighting CSS code & executing that shortcut combo results in a warning message: > The key combination is bound to command (Comment Selection) which is not currently available. Is there a toolbar or keyboard shortcut in Visual Studio 2010 to comment the highlighted CSS text for you?
Visual Studio 2010: highlight CSS text and comment
CC BY-SA 3.0
null
2010-04-01T02:47:29.047
2012-11-20T19:03:55.647
2011-09-13T10:15:14.833
321,366
23,199
[ "visual-studio-2010", "keyboard-shortcuts" ]
2,562,063
1
2,563,912
null
12
12,208
As referenced in my [previous question](https://stackoverflow.com/questions/2119067/in-wxpython-what-is-the-standard-process-of-making-an-application-slightly-more), I am trying to make something slightly wizard-like in function. I have settled on a single frame with a sizer added to it. I build panels for each of the screens I would like users to see, add them to the frame's sizer, then switch between panels by `.Hide()`ing one panel, then calling a custom `.ShowYourself()` on the next panel. Obviously, I would like the buttons to remain in the same place as the user progresses through the process. I have linked together two panels in an infinite loop by their "Back" and "Next" buttons so you can see what is going on. The first panel looks great; [tom10](https://stackoverflow.com/users/102302/tom10)'s code worked on that level, as it eschewed my initial, over-fancy attempt with borders flying every which way. And then the second panel seems to have shrunk down to the bare minimum. As we return to the first panel, the shrinkage has occurred here as well. Why does it look fine on the first panel, but not after I return there? Why is calling `.Fit()` necessary if I do not want a 10 pixel by 10 pixel wad of grey? And if it is necessary, why does `.Fit()` give inconsistent results? This infinite loop seems to characterize my experience with this: I fix the layout on a panel, only to find that switching ruins the layout for other panels. I fix that problem, by using `sizer_h.Add(self.panel1, 0)` instead of `sizer_h.Add(self.panel1, 1, wx.EXPAND)`, and now my layouts are off again. So far, my "solution" is to add a `mastersizer.SetMinSize((475, 592))` to each panel's master sizer (commented out in the code below). This is a cruddy solution because 1) I have had to find the numbers that work by trial and error (-5 pixels for the width, -28 pixels for the height). 2) I don't understand why the underlying issue still happens. What's the correct, non-ugly solution? Instead of adding all of the panels to the frame's sizer at once, should switching panels involve `.Detach()`ing that panel from the frame's sizer and then `.Add()`ing the next panel to the frame's sizer? Is there a `.JustMakeThisFillThePanel()` method hiding somewhere I have missed in both the wxWidgets and the wxPython documents online? I'm obviously missing something in my mental model of layout. Minimalist code pasted below. ![enter image description here](https://i.stack.imgur.com/WVrcJ.jpg) ``` import wx import sys class My_App(wx.App): def OnInit(self): self.frame = My_Frame(None) self.frame.Show() self.SetTopWindow(self.frame) return True def OnExit(self): print 'Dying ...' class My_Frame(wx.Frame): def __init__(self, image, parent=None,id=-1, title='Generic Title', pos=wx.DefaultPosition, style=wx.CAPTION | wx.STAY_ON_TOP): size = (480, 620) wx.Frame.__init__(self, parent, id, 'Program Title', pos, size, style) sizer_h = wx.BoxSizer(wx.HORIZONTAL) self.panel0 = User_Interaction0(self) sizer_h.Add(self.panel0, 1, wx.EXPAND) self.panel1 = User_Interaction1(self) sizer_h.Add(self.panel1, 1, wx.EXPAND) self.SetSizer(sizer_h) self.panel0.ShowYourself() def ShutDown(self): self.Destroy() class User_Interaction0(wx.Panel): def __init__(self, parent, id=-1): wx.Panel.__init__(self, parent, id) # master sizer for the whole panel mastersizer = wx.BoxSizer(wx.VERTICAL) #mastersizer.SetMinSize((475, 592)) mastersizer.AddSpacer(15) # build the top row txtHeader = wx.StaticText(self, -1, 'Welcome to This Boring\nProgram', (0, 0)) font = wx.Font(16, wx.DEFAULT, wx.NORMAL, wx.BOLD) txtHeader.SetFont(font) txtOutOf = wx.StaticText(self, -1, '1 out of 7', (0, 0)) rowtopsizer = wx.BoxSizer(wx.HORIZONTAL) rowtopsizer.Add(txtHeader, 3, wx.ALIGN_LEFT) rowtopsizer.Add((0,0), 1) rowtopsizer.Add(txtOutOf, 0, wx.ALIGN_RIGHT) mastersizer.Add(rowtopsizer, 0, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=15) # build the middle row text = 'PANEL 0\n\n' text = text + 'This could be a giant blob of explanatory text.\n' txtBasic = wx.StaticText(self, -1, text) font = wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.NORMAL) txtBasic.SetFont(font) mastersizer.Add(txtBasic, 1, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=15) # build the bottom row btnBack = wx.Button(self, -1, 'Back') self.Bind(wx.EVT_BUTTON, self.OnBack, id=btnBack.GetId()) btnNext = wx.Button(self, -1, 'Next') self.Bind(wx.EVT_BUTTON, self.OnNext, id=btnNext.GetId()) btnCancelExit = wx.Button(self, -1, 'Cancel and Exit') self.Bind(wx.EVT_BUTTON, self.OnCancelAndExit, id=btnCancelExit.GetId()) rowbottomsizer = wx.BoxSizer(wx.HORIZONTAL) rowbottomsizer.Add(btnBack, 0, wx.ALIGN_LEFT) rowbottomsizer.AddSpacer(5) rowbottomsizer.Add(btnNext, 0) rowbottomsizer.AddSpacer(5) rowbottomsizer.AddStretchSpacer(1) rowbottomsizer.Add(btnCancelExit, 0, wx.ALIGN_RIGHT) mastersizer.Add(rowbottomsizer, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=15) # finish master sizer mastersizer.AddSpacer(15) self.SetSizer(mastersizer) self.Raise() self.SetPosition((0,0)) self.Fit() self.Hide() def ShowYourself(self): self.Raise() self.SetPosition((0,0)) self.Fit() self.Show() def OnBack(self, event): self.Hide() self.GetParent().panel1.ShowYourself() def OnNext(self, event): self.Hide() self.GetParent().panel1.ShowYourself() def OnCancelAndExit(self, event): self.GetParent().ShutDown() class User_Interaction1(wx.Panel): def __init__(self, parent, id=-1): wx.Panel.__init__(self, parent, id) # master sizer for the whole panel mastersizer = wx.BoxSizer(wx.VERTICAL) #mastersizer.SetMinSize((475, 592)) mastersizer.AddSpacer(15) # build the top row txtHeader = wx.StaticText(self, -1, 'Read about This Boring\nProgram', (0, 0)) font = wx.Font(16, wx.DEFAULT, wx.NORMAL, wx.BOLD) txtHeader.SetFont(font) txtOutOf = wx.StaticText(self, -1, '2 out of 7', (0, 0)) rowtopsizer = wx.BoxSizer(wx.HORIZONTAL) rowtopsizer.Add(txtHeader, 3, wx.ALIGN_LEFT) rowtopsizer.Add((0,0), 1) rowtopsizer.Add(txtOutOf, 0, wx.ALIGN_RIGHT) mastersizer.Add(rowtopsizer, 0, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=15) # build the middle row text = 'PANEL 1\n\n' text = text + 'This could be a giant blob of boring text.\n' txtBasic = wx.StaticText(self, -1, text) font = wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.NORMAL) txtBasic.SetFont(font) mastersizer.Add(txtBasic, 1, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=15) # build the bottom row btnBack = wx.Button(self, -1, 'Back') self.Bind(wx.EVT_BUTTON, self.OnBack, id=btnBack.GetId()) btnNext = wx.Button(self, -1, 'Next') self.Bind(wx.EVT_BUTTON, self.OnNext, id=btnNext.GetId()) btnCancelExit = wx.Button(self, -1, 'Cancel and Exit') self.Bind(wx.EVT_BUTTON, self.OnCancelAndExit, id=btnCancelExit.GetId()) rowbottomsizer = wx.BoxSizer(wx.HORIZONTAL) rowbottomsizer.Add(btnBack, 0, wx.ALIGN_LEFT) rowbottomsizer.AddSpacer(5) rowbottomsizer.Add(btnNext, 0) rowbottomsizer.AddSpacer(5) rowbottomsizer.AddStretchSpacer(1) rowbottomsizer.Add(btnCancelExit, 0, wx.ALIGN_RIGHT) mastersizer.Add(rowbottomsizer, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=15) # finish master sizer mastersizer.AddSpacer(15) self.SetSizer(mastersizer) self.Raise() self.SetPosition((0,0)) self.Fit() self.Hide() def ShowYourself(self): self.Raise() self.SetPosition((0,0)) self.Fit() self.Show() def OnBack(self, event): self.Hide() self.GetParent().panel0.ShowYourself() def OnNext(self, event): self.Hide() self.GetParent().panel0.ShowYourself() def OnCancelAndExit(self, event): self.GetParent().ShutDown() def main(): app = My_App(redirect = False) app.MainLoop() if __name__ == '__main__': main() ```
Why Does .Hide()ing and .Show()ing Panels in wxPython Result in the Sizer Changing the Layout?
CC BY-SA 2.5
0
2010-04-01T16:46:19.867
2011-04-04T21:02:47.337
2017-05-23T12:01:08.877
-1
256,934
[ "wxpython", "wxwidgets", "sizer" ]
2,563,519
1
2,570,136
null
3
1,678
Consider the log in page on NerdDinner.com: [http://www.nerddinner.com/Account/LogOn](http://www.nerddinner.com/Account/LogOn) Some nice features: - - Is this revision of the NerdDinner AccountController and its View available for public download? How would you reinvent this implementation? Any code you can post would be fine. Calling Jon Galloway! ![alt text](https://i.imgur.com/WAcFr.png)
ASP.NET MVC: Implementing an OpenID sign-in page ala NerdDinner v2
CC BY-SA 2.5
0
2010-04-01T20:39:08.467
2010-04-03T03:26:58.717
null
null
23,199
[ "asp.net-mvc", "openid", "dotnetopenauth", "nerddinner" ]
2,563,849
1
2,564,250
null
22
12,960
I wish to determine the intersection point between a ray and a box. The box is defined by its min 3D coordinate and max 3D coordinate and the ray is defined by its origin and the direction to which it points. Currently, I am forming a plane for each face of the box and I'm intersecting the ray with the plane. If the ray intersects the plane, then I check whether or not the intersection point is actually on the surface of the box. If so, I check whether it is the closest intersection for this ray and I return the closest intersection. The way I check whether the plane-intersection point is on the box surface itself is through a function ``` bool PointOnBoxFace(R3Point point, R3Point corner1, R3Point corner2) { double min_x = min(corner1.X(), corner2.X()); double max_x = max(corner1.X(), corner2.X()); double min_y = min(corner1.Y(), corner2.Y()); double max_y = max(corner1.Y(), corner2.Y()); double min_z = min(corner1.Z(), corner2.Z()); double max_z = max(corner1.Z(), corner2.Z()); if(point.X() >= min_x && point.X() <= max_x && point.Y() >= min_y && point.Y() <= max_y && point.Z() >= min_z && point.Z() <= max_z) return true; return false; } ``` where `corner1` is one corner of the rectangle for that box face and `corner2` is the opposite corner. My implementation works most of the time but sometimes it gives me the wrong intersection. Please see image: ![alt text](https://imgur.com/vYKAi.jpg) The image shows rays coming from the camera's eye and hitting the box surface. The other rays are the normals to the box surface. It can be seen that the one ray in particular (it's actually the normal that is seen) comes out from the "back" of the box, whereas the normal should be coming up from the top of the box. This seems to be strange since there are multiple other rays that hit the top of the box correctly. I was wondering if the way I'm checking whether the intersection point is on the box is correct or if I should use some other algorithm. Thanks.
Ray-box Intersection Theory
CC BY-SA 2.5
0
2010-04-01T21:35:30.897
2012-12-29T21:23:57.230
2010-04-01T21:42:13.413
278,793
278,793
[ "algorithm", "3d", "intersection", "raytracing" ]
2,564,359
1
2,572,819
null
1
1,667
I am looking for an OCX control that will work with VB6 and is capable of producing a grid like the one below. ![alt text](https://i.imgur.com/gM9S1.png) Any ideas?
Pivot grid control for VB6. Does it exist?
CC BY-SA 2.5
0
2010-04-01T23:54:56.183
2010-04-03T22:04:37.947
null
null
9,382
[ "vb6", "grid", "pivot-table", "ocx" ]
2,564,629
1
2,579,541
null
0
847
So Here is the Problem, I am trying to get that circle to align on the number. When I do that in blend it shows me I have a Left (23), I try to do that programmaticly Canvas.SetLeft(thePanel,23) it overshoots. Better yet, if anyone knows of a control like this in silverlight let me know. What this does is when the user clicks on a number the green circle is suppose to go to that number so it looks like the user has selected it. ![alt text](https://imgur.com/H6rrT.jpg) ![Blend](https://imgur.com/lFMM1.jpg)
Settings TranslateX or Canvas.SetLeft Property programmatically in Silverlight
CC BY-SA 2.5
null
2010-04-02T01:41:42.577
2010-04-06T15:08:24.077
null
null
275,561
[ "wpf", "silverlight", "blend" ]
2,568,903
1
2,568,976
null
2
478
I am generating user control according to search result. And allowing to change text inside of textarea (picture or video description) ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/eaa43969-c638-43d7-b015-da45b77d82fa/txtArea1.png) aaaaaa is default text to change. User can change textarea and when user clicked on EKLE (ADD) button, i am cloning DIV element that contains image, span, textarea elements and their value. When clicked on EKLE(ADD) button, i am taking EKLE button's parent and appending to result div. But i can't see the textarea content . ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/0280cc35-f355-4870-b118-3894708c1a71/txtArea2.png) ``` // this function is cloning the one result div which is clicked on it and appending the result function f_ResimSecildi_Ekle(divEklenecek) { $(divEklenecek).clone().prependTo("#divEklenenResimler").hide().fadeIn("slow"); $("#divEklenenResimler input[id*=btnEkleResim_]").remove(); $("#divEklenenResimler input[id*=btnKaldirResim_]").removeAttr("style").show(); $("#btnHaberResimleriYap").removeAttr("disabled"); } ``` ![alt text](https://content.screencast.com/users/uzay95/folders/Jing/media/7ceb1dc5-3710-44d8-9f79-a3e38f6321c4/textArea3.png)
$(...parent()).html() didn't capture the textarea content
CC BY-SA 2.5
null
2010-04-02T20:05:07.193
2010-04-02T20:46:31.537
2017-02-08T14:23:21.103
-1
104,085
[ "jquery", "textarea", "clone" ]
2,569,012
1
2,569,142
null
6
5,477
I need to implement a mean filter on a data set, but I don't have access to the signal processing toolbox. Is there a way to do this without using a for loop? Here's the code I've got working: ``` x=0:.1:10*pi; noise=0.5*(rand(1,length(x))-0.5); y=sin(x)+noise; %generate noisy signal a=10; %specify moving window size my=zeros(1,length(y)-a); for n=a/2+1:length(y)-a/2 my(n-a/2)=mean(y(n-a/2:n+a/2)); %calculate mean for each window end mx=x(a/2+1:end-a/2); %truncate x array to match plot(x,y) hold on plot(mx,my,'r') ``` EDIT: After implementing merv's solution, the built-in filter method lags the original signal. Is there a way around this? ![alt text](https://i709.photobucket.com/albums/ww98/NBrower/filter.png)
Mean filter in MATLAB without loops or signal processing toolbox
CC BY-SA 2.5
0
2010-04-02T20:28:28.177
2019-07-11T10:04:28.640
2017-02-08T14:23:21.440
-1
201,800
[ "matlab", "vectorization", "mean" ]
2,570,248
1
2,570,266
null
1
383
I'm embarking on a major project, but am stuck on a tiny issue at the very start. I'll try to be as concise as possible. I have a PHP script that will be echoing into the footer of the page (the last stuff before `</body></html>` a bunch of `<div>`s containing visible buttons and `<div>`s containing hidden dialog boxes. The plan is to have the buttons float in the upper-right corner of corresponding `<div>`s in the main content area of the page. i.e. - button-1 echoed into the footer will float in the corner of content-box-1, and will be tied to the hidden `<div>` 'dialog-1'. I'll be using jQuery and jQuery UI Dialog throughout the page(s). I'm not sure if that's particularly relevant to this question, but thought it worth mentioning just in case. So my question, put simply, is how do I echo a `<div class="button">Button 1</div>` into the footer with PHP, but have it float in the upper-right corner (with maybe 5px margin) of `<div class=content>Content 1 is full of content</div>`? A picture says a thousand words: ![alt text](https://imgur.com/BPbUS.png) As shown above, I want the little blue gear button things in the corner of content pieces, locked and loaded with hidden `<div>`s containing dialog boxes. I've found plenty of info on how to float divs on top of divs, but all the examples I saw showed the `<div>`s in close proximity to each other in the page source; not with a hundred lines of source code between the two `<div>`s I'm not sure if the solution is pure CSS, pure jQuery/jQueryUI or a combination of the two. Any advice will be much appreciated. Thanks!
How to float a <div> echoed in the footer over a <div> located elsewhere (PHP/jQuery/HTML/CSS)
CC BY-SA 2.5
null
2010-04-03T04:41:42.333
2010-04-03T05:10:07.067
null
null
231,651
[ "php", "jquery", "html", "css", "jquery-ui" ]
2,570,799
1
2,570,868
null
0
319
I'm working on a sudoko solver (python). my method is using a game tree and explore possible permutations for each set of digits by DFS Algorithm. in order to analyzing problem, i want to know what is the count of possible sudoko tables? -> a 9*9 table that have 9 one, 9 two, ... , 9 nine. (this isn't exact duplicate by [this question](https://stackoverflow.com/questions/2512598/maths-question-number-of-different-permutations)) my solution is: 1- First select 9 cells for 1s: (*) ![alt text](https://www.sitmo.com/gg/latex/latex2png.2.php?z=100&eq=%5Cmathbf%7BC%7D(9%2C81)%3D%5Cfrac%7B81!%7D%7B(81-9)!%5Ctimes9!%7D) 2- and like (1) for other digits (each time, 9 cells will be deleted from remaining available cells): C(81-9,9) , C(81-9*2,9) .... = ![alt text](https://www.sitmo.com/gg/latex/latex2png.2.php?z=100&eq=%5Cprod_%7Bi%3D1%7D%5E%7B9%7D%20%7B%5Cmathbf%7BC%7D(9%2C81-9(i-1))%7D%3D%20%5Cprod_%7Bi%3D1%7D%5E%7B9%7D%7B%5Cfrac%7B(81-9(i-1))!%7D%7B(81-9%20%20i)!%5Ctimes%209!%7D%7D%3D%5Cfrac%7B81!%7D%7B9!%5E9%7D) 3- finally multiply the result by 9! (permutation of 1s-2s-3s...-9s in (*)) ![alt text](https://www.sitmo.com/gg/latex/latex2png.2.php?z=100&eq=%5Cfrac%7B81!%7D%7B9!%5E9%7D%5Ctimes%209!%3D%5Cfrac%7B81!%7D%7B9!%5E8%7D) this is not equal to accepted answer of [this question](https://stackoverflow.com/questions/2512598/maths-question-number-of-different-permutations) but problems are equivalent. what did i do wrong?
Counting problem: possible sudoko tables?
CC BY-SA 2.5
0
2010-04-03T09:39:14.793
2010-04-03T10:47:12.437
2017-05-23T12:08:51.063
-1
275,221
[ "python", "algorithm", "math", "discrete-mathematics" ]
2,572,713
1
2,573,133
null
16
38,120
I am in the process of trying to get my head properly around CSS3 Gradients (specifically radial ones) and in doing so I think I've set myself a relatively tough challenge. In Adobe Illustrator I have created the following 'button' style. ![Button style screenshot](https://i.stack.imgur.com/XEfCG.jpg) To create this image I created a rectangle with a background colour of `rgb(63,64,63)` or `#3F403F`, then 'stylized' it to have a 15px border radius. I then applied an 'inner glow' to it with a 25% opacity, 8px blur, white from the center. Finally, I applied a 3pt white stroke on it. (I'm telling you all of this in case you wished to reproduce it, if the image above isn't sufficient.) So, my question is thus: I am aware of the 'limitations' of Internet Explorer (and for the sake of this experiment, I couldn't give a monkeys). I am also aware of the small 'bug' in webkit which incorrectly renders an element with a background colour, border-radius and a border (with a different color to the background-color) - it lets the background color bleed through on the curved corners. My best attempt so far is fairly pathetic, but for reference here is the code: ``` section#featured footer p a { color: rgb(255,255,255); text-shadow: 1px 1px 1px rgba(0,0,0,0.6); text-decoration: none; padding: 5px 10px; border-radius: 15px; -moz-border-radius: 15px; -webkit-border-radius: 15px; border: 3px solid rgb(255,255,255); background: rgb(98,99,100); background: -moz-radial-gradient( 50% 50%, farthest-side, #626364, #545454 ); background: -webkit-gradient( radial, 50% 50%, 1px, 50% 50%, 5px, from(rgb(98,99,100)), to(rgb(84,84,84)) ); } ``` Basically, terrible. Any hints or tips gratefully accepted and thank you very much in advance for them!
CSS3 Gradients to reproduce an 'inner glow' effect from Illustrator with border-radius applied
CC BY-SA 3.0
0
2010-04-03T21:19:11.070
2012-07-09T14:49:29.273
2011-10-05T23:41:58.477
709,202
308,455
[ "css", "gradient", "radial-gradients" ]
2,574,093
1
2,574,282
null
0
291
I have drawn something like this: ![example map](https://i.stack.imgur.com/tLkqq.png) How to remove the paths and points?
Removing paths/points from MapView
CC BY-SA 3.0
0
2010-04-04T09:57:51.070
2015-01-17T17:38:13.923
2015-01-17T17:38:13.923
1,308,058
308,649
[ "android" ]
2,575,940
1
2,575,975
null
4
89
Someday i've downloaded a very nice jquery editor but i lost it and i only have a screenshot of it. You just type a tag and press return or space and it's will be inside a nice box, and you can delete it by only pressing the backspace key or the close icon. ![jQuery Tags Editor](https://imgur.com/2PTT9.png) Please don't suggest me [That](http://blog.crazybeavers.se/wp-content/demos/jquery.tag.editor/) because it's so poor and the tags are inserted outside the input box. Thanks
Anyone knows from where to get that jQuery tags editor?
CC BY-SA 2.5
0
2010-04-04T21:20:36.987
2010-04-04T21:37:33.597
2010-04-04T21:37:33.597
241,654
241,654
[ "javascript", "jquery", "jquery-plugins" ]
2,578,932
1
2,579,066
null
19
8,649
Anyone has a ready implementation of the Reverse Breadth First traversal algorithm in C#? By Reverse Breadth First traversal , I mean instead of searching a tree starting from a common node, I want to search the tree from the bottom and gradually converged to a common node. Let's see the below figure, this is the output of a Breadth First traversal : ![alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Breadth-first-tree.svg/300px-Breadth-first-tree.svg.png) In my reverse breadth first traversal , `9`,`10`,`11` and `12` will be the first few nodes found ( the order of them are not important as they are all first order). `5`, `6`, `7` and `8` are the second few nodes found, and so on. `1` would be the last node found. Any ideas or pointers? Edit: Change "Breadth First Search" to "Breadth First traversal" to clarify the question
Reverse Breadth First traversal in C#
CC BY-SA 2.5
0
2010-04-05T14:40:30.557
2010-05-15T20:13:30.130
2017-02-08T14:23:24.140
-1
3,834
[ "c#", "graph", "graph-algorithm" ]
2,578,961
1
null
null
9
6,221
I often have to make stacked barplots to compare variables, and because I do all my stats in R, I prefer to do all my graphics in R with ggplot2. I would like to learn how to do two things: First, I would like to be able to add proper percentage tick marks for each variable rather than tick marks by count. Counts would be confusing, which is why I take out the axis labels completely. Second, there must be a simpler way to reorganize my data to make this happen. It seems like the sort of thing I should be able to do natively in ggplot2 with plyR, but the documentation for plyR is not very clear (and I have read both the ggplot2 book and the online plyR documentation. My best graph looks like this, the code to create it follows: ![example graph](https://farm5.static.flickr.com/4016/4493625638_bb46924571_d.jpg) The R code I use to get it is the following: ``` library(epicalc) ### recode the variables to factors ### recode(c(int_newcoun, int_newneigh, int_neweur, int_newusa, int_neweco, int_newit, int_newen, int_newsp, int_newhr, int_newlit, int_newent, int_newrel, int_newhth, int_bapo, int_wopo, int_eupo, int_educ), c(1,2,3,4,5,6,7,8,9, NA), c('Very Interested','Somewhat Interested','Not Very Interested','Not At All interested',NA,NA,NA,NA,NA,NA)) ### Combine recoded variables to a common vector Interest1<-c(int_newcoun, int_newneigh, int_neweur, int_newusa, int_neweco, int_newit, int_newen, int_newsp, int_newhr, int_newlit, int_newent, int_newrel, int_newhth, int_bapo, int_wopo, int_eupo, int_educ) ### Create a second vector to label the first vector by original variable ### a1<-rep("News about Bangladesh", length(int_newcoun)) a2<-rep("Neighboring Countries", length(int_newneigh)) [...] a17<-rep("Education", length(int_educ)) Interest2<-c(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) ### Create a Weighting vector of the proper length ### Interest.weight<-rep(weight, 17) ### Make and save a new data frame from the three vectors ### Interest.df<-cbind(Interest1, Interest2, Interest.weight) Interest.df<-as.data.frame(Interest.df) write.csv(Interest.df, 'C:\\Documents and Settings\\[name]\\Desktop\\Sweave\\InterestBangladesh.csv') ### Sort the factor levels to display properly ### Interest.df$Interest1<-relevel(Interest$Interest1, ref='Not Very Interested') Interest.df$Interest1<-relevel(Interest$Interest1, ref='Somewhat Interested') Interest.df$Interest1<-relevel(Interest$Interest1, ref='Very Interested') Interest.df$Interest2<-relevel(Interest$Interest2, ref='News about Bangladesh') Interest.df$Interest2<-relevel(Interest$Interest2, ref='Education') [...] Interest.df$Interest2<-relevel(Interest$Interest2, ref='European Politics') detach(Interest) attach(Interest) ### Finally create the graph in ggplot2 ### library(ggplot2) p<-ggplot(Interest, aes(Interest2, ..count..)) p<-p+geom_bar((aes(weight=Interest.weight, fill=Interest1))) p<-p+coord_flip() p<-p+scale_y_continuous("", breaks=NA) p<-p+scale_fill_manual(value = rev(brewer.pal(5, "Purples"))) p update_labels(p, list(fill='', x='', y='')) ``` I'd very much appreciate any tips, tricks or hints.
How to better create stacked bar graphs with multiple variables from ggplot2?
CC BY-SA 3.0
0
2010-04-05T14:46:15.410
2015-12-03T18:59:06.670
2017-02-08T14:23:24.490
-1
298,308
[ "r", "graphics", "ggplot2", "plyr" ]
2,580,134
1
2,580,178
null
2
654
What is the best way to handle browser-specific CSS file loading? Assume you are running in the context of a proper MVC framework. Here are some options, you are free to discuss the pros and cons of these options as well as any other methods you know of, and prefer: - `user-agent`- `<!--[if IE]> ... <![endif]-->`- - [jQuery browser-specific css rules](http://www.tvidesign.co.uk/blog/CSS-Browser-detection-using-jQuery-instead-of-hacks.aspx)
What is the preferred way of loading browser-specific CSS files?
CC BY-SA 2.5
null
2010-04-05T18:19:48.000
2010-04-07T00:45:22.907
null
null
24,545
[ "css", "ajax", "web-applications" ]
2,581,487
1
null
null
4
4,403
I simply want to change the size () of the actual () `ImageIcon` of my `JRadioButton`. I've changed the size of the font displayed in the widget, so it really looks silly with such a large radiobutton. ``` JRadioButton button = new JRadioButton("Button"); button.setFont(new Font("Lucida Grande",Font.PLAIN, 11)); ``` gives me this giant button: ![GIANT button!!](https://i1037.photobucket.com/albums/a451/Wordenskjold/giantButton.png) Do I really have to create my own `ImageIcon`? Or can I somehow scale the default one, without too much of a hassle?
Change size of ImageIcon in a JRadioButton
CC BY-SA 2.5
0
2010-04-05T22:10:06.880
2012-10-14T10:51:35.423
2017-02-08T14:23:24.830
-1
266,541
[ "java", "user-interface", "swing", "radio-button" ]
2,584,654
1
2,585,948
null
25
1,670
I have strange a memory corruption problem. After many hours debugging and trying I think I found something. For example: I do a simple string assignment: ``` sTest := 'SET LOCK_TIMEOUT '; ``` However, the result sometimes becomes: ``` sTest = 'SET LOCK'#0'TIMEOUT ' ``` So, the _ gets replaced by an 0 byte. I have seen this happening once (reproducing is tricky, dependent on timing) in the System.Move function, when it uses the FPU stack (fild, fistp) for fast memory copy (in case of 9 till 32 bytes to move): ``` ... @@SmallMove: {9..32 Byte Move} fild qword ptr [eax+ecx] {Load Last 8} fild qword ptr [eax] {Load First 8} cmp ecx, 8 jle @@Small16 fild qword ptr [eax+8] {Load Second 8} cmp ecx, 16 jle @@Small24 fild qword ptr [eax+16] {Load Third 8} fistp qword ptr [edx+16] {Save Third 8} ... ``` Using the FPU view and 2 memory debug views (Delphi -> View -> Debug -> CPU -> Memory) I saw it going wrong... once... could not reproduce however... This morning I read something about the 8087CW mode, and yes, if this is changed into $27F I get memory corruption! Normally it is $133F: > The difference between $133F and $027F is that $027F sets up the FPU for doing less precise calculations (limiting to Double in stead of Extended) and different infiniti handling (which was used for older FPU’s, but is not used any more). Okay, now I found but not ! I changed the working of my [AsmProfiler](http://code.google.com/p/asmprofiler/) with a simple check (so all functions are checked at enter and leave): ``` if Get8087CW = $27F then //normally $1372? if MainThreadID = GetCurrentThreadId then //only check mainthread DebugBreak; ``` I "profiled" some units and dll's and bingo (see stack): ``` Windows.StretchBlt(3372289943,0,0,514,345,4211154027,0,0,514,345,13369376) pngimage.TPNGObject.DrawPartialTrans(4211154027,(0, 0, 514, 345, (0, 0), (514, 345))) pngimage.TPNGObject.Draw($7FF62450,(0, 0, 514, 345, (0, 0), (514, 345))) Graphics.TCanvas.StretchDraw((0, 0, 514, 345, (0, 0), (514, 345)),$7FECF3D0) ExtCtrls.TImage.Paint Controls.TGraphicControl.WMPaint((15, 4211154027, 0, 0)) ``` So it is happening in StretchBlt... Is it a fault of Windows, or a bug in PNG (included in D2007)? Or is the System.Move function not failsafe? simply trying to reproduce does not work: ``` Set8087CW($27F); sSQL := 'SET LOCK_TIMEOUT '; ``` It seems to be more exotic... But by debugbreak on 'Get8087CW = $27F' I could reproduce it on an other string: FPU part 1: ![FPU part 1](https://docs.google.com/File?id=dgpgk9hk_177gf26bqfm_b) FPU part 2: ![FPU part 2](https://docs.google.com/File?id=dgpgk9hk_178cmchzzf9_b) FPU part 3: ![FPU part 3](https://docs.google.com/File?id=dgpgk9hk_179cdkr33cv_b) FPU Final: corrupt!: ![FPU Final: corrupt!](https://docs.google.com/File?id=dgpgk9hk_180dx6cqdhp_b) Maybe the FPU stack must be cleared in the System.Move?
Memory corruption in System.Move due to changed 8087CW mode (png + stretchblt)
CC BY-SA 2.5
0
2010-04-06T12:11:10.387
2018-12-12T14:56:38.800
2013-04-22T12:01:41.070
77,764
197,220
[ "delphi", "png", "stretchblt", "x87" ]
2,586,984
1
4,903,681
null
347
90,500
Assume I've got some arbitrary layout of splits in vim. ``` ____________________ | one | two | | | | | |______| | | three| | | | |___________|______| ``` Is there a way to swap `one` and `two` and maintain the same layout? It's simple in this example, but I'm looking for a solution that will help for more complex layouts. ### UPDATE: I guess I should be more clear. My previous example was a simplification of the actual use-case. With an actual instance: ![alt text](https://i.imgur.com/Xvj9R.png) How could I swap any two of those splits, maintaining the same layout? ### Update! 3+ years later... I put sgriffin's solution in a Vim plugin you can install with ease! Install it with your favorite plugin manager and give it a try: [WindowSwap.vim](https://github.com/wesQ3/vim-windowswap) ![a little demo](https://i.stack.imgur.com/NGIww.gif)
How can I swap positions of two open files (in splits) in vim?
CC BY-SA 3.0
0
2010-04-06T17:39:28.183
2020-10-04T10:46:26.033
2014-03-19T00:00:49.527
77,782
77,782
[ "layout", "editor", "split", "vim" ]
2,587,906
1
null
null
4
2,047
I have a custom Drupal FAPI form that supports a fairly complex workflow and I would like to add a Nodereference field to it. Although I've found people who have included Nodereference fields on custom forms, I have been unable to find any examples of the FAPI declaration for the field (other than this question which uses a text field with the Nodereference AHAH callback: [Is it possible to customise drupal node reference and pass your search and a argument from another field](https://stackoverflow.com/questions/1763720/is-it-possible-to-customise-drupal-node-reference-and-pass-your-search-and-a-argu)). So: what is the best way to add a Nodereference field to a custom form (FAPI)? Bonus question: is there a simple way to allow for multiple values like CCK supports in a node form? ![Multivalue Nodereference Field in CCK Node](https://content.screencast.com/users/TylerColes/folders/Jing/media/0e689399-fc18-4c28-b719-94200e70c140/nodereference-multivalue.png)
Drupal Nodereference in a custom form
CC BY-SA 2.5
0
2010-04-06T20:08:54.060
2013-06-03T00:42:21.013
2017-05-23T12:24:21.783
-1
9,304
[ "drupal", "drupal-6", "cck", "drupal-fapi" ]
2,588,181
1
2,588,404
null
212
91,780
I have 2 canvases, one uses HTML attributes `width` and `height` to size it, the other uses CSS: ``` <canvas id="compteur1" width="300" height="300" onmousedown="compteurClick(this.id);"></canvas> <canvas id="compteur2" style="width: 300px; height: 300px;" onmousedown="compteurClick(this.id);"></canvas> ``` Compteur1 displays like it should, but not compteur2. The content is drawn using JavaScript on a 300x300 canvas. Why is there a display difference? ![alt text](https://i.stack.imgur.com/2jpjv.jpg)
Canvas is stretched when using CSS but normal with "width" / "height" properties
CC BY-SA 3.0
0
2010-04-06T20:45:34.007
2023-02-17T11:05:55.767
2020-06-20T09:12:55.060
-1
286,557
[ "css", "html", "canvas", "height", "width" ]
2,589,697
1
2,590,780
null
0
1,066
I have a flash movie, height = 151px width = 228, this is placed within a table cell ( cellpadding = 0 cellspacing = 0 vertical-align = top), but when it displays within the explorer windows there is a white space about 20px above the flash movie. I want the flash movie to appear directly under the grey lines. Here is a screen shot of the current issue: ![alt text](https://i657.photobucket.com/albums/uu297/mattgcon/web%20images/flashwhitespaceissue.png) Here is my code for this page: ``` <table style="width: 900px; vertical-align: top;" cellpadding="0" cellspacing="0"> <tr> <td style="width: 900px; height: 306;" colspan="6" valign="bottom"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="880" height="306"> <param name="movie" value="AFM/opening_HKA.swf" /> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <embed src="AFM/opening_HKA.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="880" height="306"></embed> </object> </td> </tr> <tr> <td style="width: 355px; height: 151px; font-family: Verdana; font-size: 10pt; padding-left: 35px; padding-top: 7px; text-align: left; vertical-align: top;"> HK America LLC is a leading portfolio investment group. HK America is an active private investment partnership that uses strategies with the goal of generating high returns again commercial dwellings. </td> <td style="width: 80px; height: 151px;"></td> <td style="width: 228px; height: 151px; padding: 0 0 0 0; margin: 0 0 0 0; vertical-align: top; text-align: left; border-top-color: Silver; border-top-width: 1px; border-top-style: solid;"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="228px"> <param name="movie" value="AFM/button_HKA_Timeline.swf" /> <param name="quality" value="high" /> <embed src="AFM/button_HKA_Timeline.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="228px""></embed> </object> </td> <td style="width: 25px; height: 151px;"></td> <td style="width: 228px; height: 151px; vertical-align: top; text-align: left; border-top-color: Silver; border-top-width: 1px; border-top-style: solid;"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="228"> <param name="movie" value="AFM/button_HKA_Opportunities.swf" /> <param name="quality" value="high" /> <embed src="AFM/button_HKA_Opportunities.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="228"></embed> </object> </td> <td style="width: 35px;"></td> </tr> </table> ```
White space on top of flash movie within table cell
CC BY-SA 2.5
null
2010-04-07T02:46:49.587
2017-05-27T21:38:52.973
2017-05-27T21:38:52.973
4,370,109
173,923
[ "html", "flash", "html-table", "whitespace" ]