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
3,849,569
1
3,850,496
null
7
6,638
If I use the following ``` for(int i = 255; i > 0; i--) { Color transparentBlack = new Color(0, 0, 0, i); } ``` I have the effect of the object using this color to draw with going from black to a light grey and then invisible when the alpha value goes to zero. However if I start with a white value: ``` new Color(255, 255, 255, i); ``` The objects never becomes invisible and only stays white. I've also noticed that if I use a value that is a bit lighter than black (say 50, 50, 50) the drawing goes from Dark, to invisible, to White. I assume that I just don't understand how alpha blending mixing works but is there a way of making a white color fade to translucency? Edit: The background I am drawing on is Color.CornflowerBlue (100,149,237,255) Edit: Sample XNA program reproducing the explanation. To use; create a new XNA Game Studio 4.0 project - Windows Game (4.0), call it AlphaBlendTest - & In the content project add a new SpriteFont and call it testfont ``` using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; namespace AlphaBlendTest { /// <summary> /// This is the main type for your game /// </summary> public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; SpriteFont font; public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; } /// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); } /// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); font = Content.Load<SpriteFont>("testfont"); } /// <summary> /// UnloadContent will be called once per game and is the place to unload /// all content. /// </summary> protected override void UnloadContent() { // TODO: Unload any non ContentManager content here } /// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit(); // TODO: Add your update logic here base.Update(gameTime); } /// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(); //spriteBatch.Draw(tR, new Rectangle(100, 100, 100, 100), Color.Red); Vector2 v2 = new Vector2(0, 0); spriteBatch.DrawString(font, "Test - White", v2, Color.White); v2.Y = v2.Y + 50; spriteBatch.DrawString(font, "Test - Black", v2, Color.Black); v2.Y = v2.Y + 50; Color BlackTransparent = new Color(0, 0, 0, 0); spriteBatch.DrawString(font, "Test - Black Transparent", v2, BlackTransparent); v2.Y = v2.Y + 50; Color WhiteTransparent = new Color(255, 255, 255, 0); spriteBatch.DrawString(font, "Test - White Transparent", v2, WhiteTransparent); spriteBatch.End(); base.Draw(gameTime); } } } ``` Edit: This is the image this code draws: ![alt text](https://i.stack.imgur.com/Y64zL.png) Edit: One of the comments is concerned that this is a Text only related 'feature' of windows. I used text as an example to keep the demo program small; testing with an image gives the same result. ![alt text](https://i.stack.imgur.com/ibI7t.png) To add the square box in to the demo program; create a square white PNG image and add it to the content directory (use the default values for the content pipeline). Then add this to the class: ``` Texture2D tWhiteBox; ``` Add this in to the load method: ``` tWhiteBox = Content.Load<Texture2D>("whitebox"); ``` Then in the draw add the following below the other draw statements: ``` v2.Y = v2.Y + 50; spriteBatch.Draw(tWhiteBox, v2, WhiteTransparent); ```
Is there an alpha value that makes white go invisible?
CC BY-SA 2.5
0
2010-10-03T11:34:24.367
2010-10-03T19:32:18.767
2010-10-03T19:32:18.767
69,214
69,214
[ "c#", "xna", "windows-phone-7" ]
3,849,615
1
null
null
3
675
When i have an ImageButton and a drawable and i want to do something like the Drawer or Twitter where when i press the button and the corner of the image is highlighted over the edge, in drawer its yellow, in twitter its white. Like the one below. ![alt text](https://i.stack.imgur.com/oVZXz.png) How do i set my drawable without using a lot of images?
Highlight edge on Drawable in Android
CC BY-SA 2.5
null
2010-10-03T11:54:40.147
2010-10-03T12:33:32.927
null
null
258,648
[ "android", "android-widget" ]
3,849,698
1
3,849,806
null
1
925
I have a table in html with some tabular data. The thing is that I have designed a delete and edit visually link outside the table (on the left side of the table), that will only be visible when the user hovers the table row. How can I add these links without messing up the default table layout? The current problem is that I need to create a holding the delete and edit link, and this messes up the table structure when they are not visible. So, is there a way to add a container to a table (needs to follow the table row structure) that is not a td? Or do you know about some examples doing something similar that I could have a look at?![Edit table ](https://i.stack.imgur.com/1ODE8.jpg) Thanks
HTML: How to add a delete link inside a html table, but still visible as outside the table
CC BY-SA 2.5
null
2010-10-03T12:27:23.143
2010-10-03T14:37:17.647
null
null
197,879
[ "html", "css" ]
3,850,151
1
3,850,159
null
0
415
I am having trouble with a HelloWorld Applet. Here is my Java code: ``` package webCrawler.applet2; import javax.swing.JApplet; import java.awt.Graphics; public class HappyFace extends JApplet { public void paint (Graphics canvas) { canvas.drawOval(100,50,200,200); canvas.fillOval(155,100,10,20); canvas.fillOval(230,100,10,20); canvas.drawArc(150,160,100,50,0,180); } } ``` Here is my `index.html`: ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="000000"> <center> <applet code = "HappyFace.class" width = "500" height = "300" > </applet> </center> </body> </html> ``` In Eclipse if I go: `Run -> Run` it works, however if I do this: ``` % pwd /Users/me/Documents/workspace/WebCentric/bin/webCrawler/applet2 % ls HappyFace.class index.html % open index.html ``` It opens the html page in Firefox but the app does not work: ![app not working](https://i.stack.imgur.com/brWXc.png) As [Pablo Santa Cruz suggested](https://stackoverflow.com/questions/3850151/hello-world-java-applet-problem/3850159#3850159) I: - - `code = "webCrawler.applet2.HappyFace"` This is the exception in the console. ``` java.lang.UnsupportedClassVersionError: webCrawler/applet2/HappyFace (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:213) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:151) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:680) at sun.applet.AppletPanel.createApplet(AppletPanel.java:635) at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1991) at jep.AppletFramePanel.createApplet(Unknown Source) at sun.applet.AppletPanel.runLoader(AppletPanel.java:564) at sun.applet.AppletPanel.run(AppletPanel.java:301) at jep.AppletFramePanel.run(Unknown Source) at java.lang.Thread.run(Thread.java:552) ```
Hello World, Java Applet, Problem
CC BY-SA 2.5
null
2010-10-03T14:28:30.600
2010-10-03T14:57:51.257
2017-05-23T12:07:02.087
-1
251,589
[ "java", "applet" ]
3,850,561
1
3,850,718
null
0
811
I'm trying to make an [XYLine](http://code.google.com/apis/chart/docs/gallery/line_charts.html#chart_types) with the [Google Chart API](http://code.google.com/apis/chart/) via the not-so-well-documented [GChartWrapper](http://code.google.com/p/google-chartwrapper/) libraries. Here's a portion of the code that is supposed to generate the graph: ``` data = [] traffic_max = 0 date_minmax = [] #I have a number of timestamped readings in two series for site in sites: site_data = get_datapoints_for(site) date_values = [datetime_to_unix(item.timestamp) for item in site_data] date_minmax = minmax(date_minmax + date_values) #get min and max values for #scaling traffic_values = [item.traffic for item in site_data] traffic_max = max(traffic_max, *traffic_values) #just get maximum for readings #build graph data.append(date_values) data.append(traffic_values) #add leeway to axes date_minmax[0] -= 500 date_minmax[1] += 500 traffic_max /= 0.9 #build graph chart = LineXY(data) chart.legend(*sites) chart.color("green", "red") chart.size(600,400) chart.scale(date_minmax[0], date_minmax[1], 0, traffic_max) chart.axes.type("xy") chart.axes.range(0, *date_minmax) chart.axes.range(1, 0, traffic_max) chart_url = chart.url ``` However, this is what I get: ![link text](https://chart.apis.google.com/chart?chco=008000,FF0000&chd=t:1286116241.0,1286118544.0,1286119431.0,1286121011.0|6711.0,6716.3,6641.9,6644.9|1286116241.0,1286118545.0,1286119431.0,1286121012.0|38323.9,38326.6,38327.7,38329.6&chdl=gaming.stackexchange.com|serverfault.com&chds=1286115741.0,1286121512.0,0,42588.4555556&chs=600x400&cht=lxy&chxr=0,1286115741.0,1286121512.0|1,0,42588.4555556&chxt=x,y) Question: --- For your convenience, here is `data` after some pretty print love: ``` [[1286116241.448437, 1286118544.4077079, 1286119431.18503, 1286121011.5838161], [6710.9899999999998, 6716.2799999999997, 6641.8900000000003, 6644.9499999999998], [1286116241.979831, 1286118545.0123601, 1286119431.9650409, 1286121012.1839011], [38323.860000000001, 38326.620000000003, 38327.660000000003, 38329.610000000001]] ``` Here is the list of parameters generated by the wrapper, also after some pretty print love: ``` chco=008000,FF0000 chd=t:1286116241.0,1286118544.0,1286119431.0,1286121011.0 6711.0,6716.3,6641.9,6644.9 1286116241.0,1286118545.0,1286119431.0,1286121012.0 38323.9,38326.6,38327.7,38329.6 chdl=gaming.stackexchange.com serverfault.com chds=1286115741.0,1286121512.0,0,42588.4555556 chs=600x400 cht=lxy chxr=0,1286115741.0,1286121512.0 1,0,42588.4555556 chxt=x,y cht=lxy chxr=0,1286116241.45,1286121012.18 1,0,42588.4555556 chxt=x,y ```
Google Chart API: trouble with rendering a XYLine graph
CC BY-SA 2.5
0
2010-10-03T16:24:10.107
2010-10-03T17:11:36.363
2017-02-08T14:30:31.150
-1
13,992
[ "python", "google-visualization" ]
3,850,655
1
3,858,233
null
0
444
![View of high number](https://i.stack.imgur.com/WXCFa.png) How to make it show large numbers in QTableView like 10030232145 and not as 1.02342e+10?
Qt's QTableView and large numbers
CC BY-SA 2.5
null
2010-10-03T16:48:15.643
2010-10-04T18:56:00.783
2010-10-03T16:54:22.747
262,732
262,732
[ "qt", "qtableview" ]
3,850,748
1
3,850,757
null
2
1,366
I have a website and when I click on a link, I get this blue border around the link just during the time I am clicking it. When the new page loads, that highlighting is gone. Here is an example screenshot how it looks right when I click on the link: ![Alt text](https://i.stack.imgur.com/vSspv.png) How can I stop this from happening?
How can I avoid a blue line show up when I click on a link?
CC BY-SA 3.0
0
2010-10-03T17:17:44.993
2015-10-06T18:35:24.287
2015-10-06T18:35:24.287
63,550
4,653
[ "html", "css", "hyperlink" ]
3,850,976
1
3,867,725
null
3
2,588
I'm trying to create a border inside an image instead of outside of the image. I want to do this because I would like to put some alpha value on the border so that i can see the image through the border. I tried placing a div a few pixels smaller than the image around the image and then setting "overflow:none". The border is now inside the image, but when i apply alpha to the border nothing can be seen through the border because overflow is set to none. On the other hand. If i don't set "overflow", then the border won't show up. I want something like this: ![alt text](https://i.stack.imgur.com/E9P0f.png)
alpha border inside image
CC BY-SA 2.5
0
2010-10-03T18:19:58.983
2011-11-28T13:24:45.803
null
null
225,128
[ "css" ]
3,851,252
1
3,851,310
null
3
790
The [Independent website](http://www.independent.co.uk) has a little widget that pops up a message informing you that there is an Independent Chrome extension available when you visit it using Chrome (v7 in my case): ![ ](https://i.stack.imgur.com/wJw4z.jpg) Is this part of the Chrome extensions API - if so how is it achieved (or have they custom-rolled their own JavaScript to make it look like part of Chrome)? A quick look at the source of the page revealed nothing obvious.
Alerting website visitors that a chrome extension is available - how?
CC BY-SA 2.5
0
2010-10-03T19:25:06.983
2013-05-08T10:44:08.110
null
null
116,923
[ "google-chrome", "google-chrome-extension" ]
3,851,477
1
3,852,398
null
3
3,907
I have a couple of queries which pull data for use in a graph. ``` <cfquery name='clusterPrivateReferrals' dbtype="query"> SELECT organisationName, count(messageID)*1000/listSize as msgCount FROM clusterReferrals WHERE datecreated>#refRateStartDate# AND refTypeID=3 GROUP BY organisationName, listSize </cfquery> <cfquery name='clusterNHSReferrals' dbtype="query"> SELECT organisationName, count(messageID)*1000/listSize as msgCount FROM clusterReferrals WHERE datecreated>#refRateStartDate# AND refTypeID<>3 GROUP BY organisationName, listSize </cfquery> ``` The graph code is ``` <cfchart format="flash" title="Cluster referrals per 1000 patients from #dateformat(refRateStartDate, 'dd-mmm-yy')#" chartWidth="470" chartHeight="380" fontSize="12" style="chart.xml" seriesPlacement = "stacked" showLegend = "yes"> <cfchartseries type="bar" seriescolor="##FFD800" seriesLabel="Private" query="clusterPrivateReferrals" valueColumn="msgCount" ItemColumn="organisationName"> </cfchartseries> <cfchartseries type="bar" seriescolor="##F47D30" seriesLabel="NHS" query="clusterNHSReferrals" valueColumn="msgCount" ItemColumn="organisationName"> </cfchartseries> </cfchart> ``` this gives me the following graph ![alt text](https://i.stack.imgur.com/VPY7j.jpg) How do I get the data displayed sorted by the total of the stacked elements? @ Ben That got me on the right track, I didnt previously know QOQ could combine 2 completely different queries ``` <cfquery name='clusterPrivateReferrals' dbtype="query"> SELECT organisationName, count(messageID)*1000/listSize as privateRate FROM allReferrals WHERE datecreated>#refRateStartDate# AND refTypeID=3 GROUP BY organisationName, listSize </cfquery> <cfquery name='clusterNHSReferrals' dbtype="query"> SELECT organisationName, count(messageID)*1000/listSize as nhsRate FROM allReferrals WHERE datecreated>#refRateStartDate# AND refTypeID<>3 GROUP BY organisationName, listSize </cfquery> <cfquery name="stackOrder" dbtype="query"> select clusterPrivateReferrals.privateRate, clusterNHSReferrals.nhsRate, clusterPrivateReferrals.organisationName, (clusterPrivateReferrals.privateRate + clusterNHSReferrals.nhsRate) as totalRate from clusterPrivateReferrals, clusterNHSReferrals WHERE clusterNHSReferrals.organisationName = clusterPrivateReferrals.organisationName order by totalRate desc </cfquery> ```
Coldfusion cfchart stacked order
CC BY-SA 2.5
0
2010-10-03T20:27:52.837
2012-02-03T22:35:36.573
2010-10-04T22:51:54.920
83,147
83,147
[ "coldfusion", "stacked", "cfchart" ]
3,851,655
1
null
null
1
178
(In the application start up event, I added my main view to app's Window in the following codes: ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. MyViewController* vc = [[MyViewController alloc] initWithNibName:@"MyViewController_iPhone" bundle:nil]; [window addSubview:[vc view]]; [vc release]; [window makeKeyAndVisible]; return YES; } ``` In my MainWindow.xib, there is no view there. It is just an empty window. MyViewController contains a navigation bar and a table. In IB, both main and my view controller has status bar at the top and my view is filled to its max view. The issue I have is that half of my navigation bar is covered by status bar (in simulator): ![alt text](https://i.stack.imgur.com/ijmKF.png) I could adjust my view navigation bar lower a bit, but I don't think that's the right way to do it. Not sure if there is any way in IB or in codes to let the added view to Window is filled with the consideration of status bar? By the way, I am using XCode 3.2.4 and iPhone 3.2 for my app.
View position is too high
CC BY-SA 2.5
null
2010-10-03T21:23:21.403
2010-10-03T21:30:48.123
null
null
62,776
[ "iphone" ]
3,851,668
1
3,861,219
null
30
14,901
Given n circles with radii r1 ... rn, position them in such a way that no circles are overlapping and the bounding circle is of "small" radius. The program takes a list [r1, r2, ... rn] as input and outputs the centers of the circles. 1. I ask for "small" because "minimum" radius converts it into a much more difficult problem (minimum version has already been proved to be NP hard/complete - see footnote near end of question). We don't need the minimum. If the shape made by the circles seems to be fairly circular, that is good enough. 2. You can assume that Rmax/Rmin < 20 if it helps. 3. A low priority concern - the program should be able to handle 2000+ circles. As a start, even 100-200 circles should be fine. 4. You might have guessed that the circles need not be packed together tightly or even touching each other. The aim is to come up with a visually pleasing arrangement of the given circles which can fit inside a larger circle and not leave too much empty space. (like the circles in a [color blindness test picture](http://upload.wikimedia.org/wikipedia/commons/e/e0/Ishihara_9.png)). ![alt text](https://i.stack.imgur.com/PDKmk.jpg) You can use the Python code below as a starting point (you would need numpy and matplotlib for this code - "sudo apt-get install numpy matplotlib" on linux)... ``` import pylab from matplotlib.patches import Circle from random import gauss, randint from colorsys import hsv_to_rgb def plotCircles(circles): # input is list of circles # each circle is a tuple of the form (x, y, r) ax = pylab.figure() bx = pylab.gca() rs = [x[2] for x in circles] maxr = max(rs) minr = min(rs) hue = lambda inc: pow(float(inc - minr)/(1.02*(maxr - minr)), 3) for circle in circles: circ = Circle((circle[0], circle[1]), circle[2]) color = hsv_to_rgb(hue(circle[2]), 1, 1) circ.set_color(color) circ.set_edgecolor(color) bx.add_patch(circ) pylab.axis('scaled') pylab.show() def positionCircles(rn): # You need rewrite this function # As of now, this is a dummy function # which positions the circles randomly maxr = int(max(rn)/2) numc = len(rn) scale = int(pow(numc, 0.5)) maxr = scale*maxr circles = [(randint(-maxr, maxr), randint(-maxr, maxr), r) for r in rn] return circles if __name__ == '__main__': minrad, maxrad = (3, 5) numCircles = 400 rn = [((maxrad-minrad)*gauss(0,1) + minrad) for x in range(numCircles)] circles = positionCircles(rn) plotCircles(circles) ``` --- The problem statement of the other "Circle packing algorithm" is thus : Given a complex K ( graphs in this context are called simplicial complexes, or complex in short) and appropriate boundary conditions, compute the radii of the corresponding circle packing for K.... It basically starts off from a graph stating which circles are touching each other (vertices of the graph denote circles, and the edges denote touch/tangential relation between circles). One has to find the circle radii and positions so as to satisfy the touching relationship denoted by the graph. The other problem does have an interesting observation (independent of this problem) : - Every circle packing has a corresponding planar graph (this is the easy/obvious part), and every planar graph has a corresponding circle packing (the not so obvious part). The graphs and packings are duals of each other and are unique. We do not have a planar graph or tangential relationship to start from in our problem. This paper - - proves that the minimum version of this problem is NP-complete. However, the paper is not available online (at least not easily).
Position N circles of different radii inside a larger circle without overlapping
CC BY-SA 2.5
0
2010-10-03T21:27:34.667
2010-10-05T06:26:44.413
2010-10-05T06:15:15.753
444,748
444,748
[ "algorithm", "language-agnostic", "geometry" ]
3,851,922
1
3,851,934
null
3
2,244
I'm having some trouble figuring out the boost image library. I could not find any exact documentation on how to use the interleaved_view function included in the boost::gil library. More specifically, I don't know exactly what binary format the raw data is supposed to be stored in. The only mention of it I could find was in the gil tutorial: ``` // Calling with 8-bit RGB data into 16-bit BGR void XGradientRGB8_BGR16(const unsigned char* src_pixels, ptrdiff_t src_row_bytes, int w, int h, signed short* dst_pixels, ptrdiff_t dst_row_bytes) { rgb8c_view_t src = interleaved_view(w,h,(const rgb8_pixel_t*)src_pixels,src_row_bytes); rgb16s_view_t dst = interleaved_view(w,h,( rgb16s_pixel_t*)dst_pixels,dst_row_bytes); x_gradient(src,dst); } ``` Also, the function prototype says ``` template<typename Iterator> type_from_x_iterator< Iterator>::view_t boost::gil::interleaved_view (std::size_t width, std::size_t height, Iterator pixels, std::ptrdiff_t rowsize_in_bytes) //Constructing image views from raw interleaved pixel data. ``` My question is, what exactly is the format gil expects in the binary format, and what is rowsize_in_bytes supposed to be? The only time I've seen an interleaved image before is when working with OpenGL, which was just RGB information for each pixel stored next to each other. I thought rowsize_in_bytes would just literally the size of a row of pixels in bytes, so I tried to write a PNG with this: ``` void makeImage(const string fileName, const unsigned char * src, const int w, const int h) { rgb8c_view_t outImage = interleaved_view(w,h, (const rgb8_pixel_t*) src, w*3*sizeof(unsigned char)); boost::gil::png_write_view(fileName,outImage); } ``` and the input src was an flat array of size w*h, of format ``` (char)R, (char)G, (char)B, (char)R, (char)G, (char)B, (char)R, (char)G, (char)B ... ``` The image was of just a white box on a black background. However, the results I got were rather... strange ![Results](https://i.stack.imgur.com/cl4E9.png) If anyone has any idea why this happened, and how interleaved_view actually works, that'd be great. Thanks in advance! EDIT: Sorry guys, I just realized my dumb mistake. I got it working now... :( The problem wasn't with the format of the image, but rather that it was row major, and not column major
boost::gil Interleaved_view
CC BY-SA 2.5
0
2010-10-03T22:54:55.617
2010-10-03T23:02:45.633
2010-10-03T23:02:45.633
319,988
319,988
[ "c++", "png", "boost-gil" ]
3,852,252
1
3,852,345
null
2
1,371
I'm new to OpenGL and C++. Say I start with a 2D square (on the very left) like shown in the picture below. I want to make it interactive with the `glutKeyboardFunc()` so when I press a number a new box will draw next to the corresponding edge. ![alt text](https://i.stack.imgur.com/3eanM.png) Figure the best way to do this is to have a tree structure that hold all the boxes. But I'm not sure how I can hold basic primitives into a data structure, a tree, for instance. I'm aware that I can only call the `glutDisplayFunc(myDisplay)` once, and the rest should handle by the `glutKeyboardFunc()` Any help would be appreciated :) : thanks for pointing out `glutPostRedisplay()` but what if I want to make the box selectable and keep tracking the current selected box with `glutMouseFunc()`, and from there when I add more boxes, I need to know how many child box it has created, so I can provide the right position when new box is drawn. Seems that makes more sense now to use a tree data structure ? Just not sure how I can store the information I need into a tree.
How to store OpenGL Primitives in a tree data structure in C++?
CC BY-SA 2.5
0
2010-10-04T01:07:12.103
2010-10-04T02:13:23.253
2010-10-04T01:32:34.757
84,346
84,346
[ "c++", "opengl", "data-structures", "tree", "glut" ]
3,852,561
1
3,852,600
null
1
367
Here's the screenshot of my firebug installed in updated firefox. I've noticed that the firebug shows hidden nested tag in the html tab. I don't know what causes this to happen...![alt text](https://i.stack.imgur.com/zXbJ1.png) Anyone?..Please help....Thanks... And here's the html mark-up..![alt text](https://i.stack.imgur.com/oRTLX.jpg)
Firebug: nested <strong> tags
CC BY-SA 2.5
null
2010-10-04T02:54:04.670
2010-10-04T03:04:54.300
2010-10-04T03:02:55.007
250,471
250,471
[ "html", "firefox-addon", "firebug" ]
3,852,649
1
3,852,772
null
0
147
Because the navigationItem.rightBarButtomItem is customized, it will occupy a big place and the title view won't be on the center. ![alt text](https://i.stack.imgur.com/KMmUQ.png) For example, I want the "OMG" is located at the center between buttoms of "Home" and "Group". How to achieve this?
How to make navBar's title located at center?
CC BY-SA 2.5
null
2010-10-04T03:22:01.100
2010-10-04T04:07:48.410
null
null
419,348
[ "iphone", "cocoa-touch" ]
3,853,171
1
null
null
1
4,933
I used jQuery UI buttons in a project, and they have been working fine. But, in IE7, the icon doesn't float as it should. I realise IE doesn't have rounded corners support yet, but that is OK. ## Good browsersSome browsers render it fine ![good example](https://i.stack.imgur.com/UDLxn.png) ## IE sucks version 7 does not: ![bad example](https://i.stack.imgur.com/SazkN.png) I start with a button in the HTML ``` <button type="submit"><span class="ui-icon ui-icon-mail-closed"></span>Send</button> ``` I then loop through the buttons, using this little bit of jQuery on each ``` $('#content button').each(function() { var icon = $(this).find('span.ui-icon'); var primaryIcon = icon.attr('class').replace(/ui-icon\s?/, ''); icon.remove(); $(this).button({ icons: {primary: primaryIcon }, label: $(this).text() }); }); ``` I was just calling `button()` on them, but I decided to do this to make sure I was using the library the way it was designed. I had some CSS on the icon too ``` button span.ui-icon { display: inline; float: left; margin-right: 0.1em; } ``` The page from above is [also available](http://bit.ly/bBoHvZ). (shortened to void HTTP referrer, I hope). What am I doing wrong? Thanks very much! ## Update I tried making the icon as an inline block element, as per [Meder's answer](https://stackoverflow.com/questions/3853171/help-with-float-and-jquery-ui-button/3853528#3853528). ``` button span.ui-icon { display: inline; float: left; margin-right: 0.1em; margin-top: -1px; /* get rid of margin for inline element */ #margin: auto; /* this should revert the element to inline as per declaration above */ #float: none; /* hasLayout = true */ #zoom: 1; } ``` This, however, has the unusual affect of blanking the button elements! ![IE7 with display: inline-block on icon](https://i.stack.imgur.com/2eSOL.png) Whatever shall I do?
Float and jQuery UI button
CC BY-SA 3.0
0
2010-10-04T05:59:25.307
2013-08-17T17:00:25.653
2017-05-23T12:30:36.930
-1
31,671
[ "jquery", "css", "jquery-ui", "internet-explorer-7", "jquery-ui-button" ]
3,853,186
1
null
null
6
816
I’ve got an `UIActionSheet` with a single button that I show in a popover. In landscape mode there is a plenty of space around the popover, so that it displays with an arrow in the middle and everything is fine: ![in landscape](https://i.stack.imgur.com/g5FJk.png) In portrait the popover has to be displayed with an arrow on the right side: ![in portrait](https://i.stack.imgur.com/tsu0s.png) Now the button looks a little bit too low and little bit too far to the right (it’s not the cropping). Have you met this behaviour? Did you manage to fix it?
Wrong UIActionSheet layout in popover
CC BY-SA 2.5
0
2010-10-04T06:03:19.617
2011-02-03T20:39:36.757
null
null
17,279
[ "ios", "uipopovercontroller", "uiactionsheet" ]
3,853,287
1
3,853,753
null
1
114
How can I disable vertical scaling in GTK+? My program, which is currently only several controls in a few `hbox` objects stacked vertically in a `vbox`, stretches vertically when I increase the size of the window. I don't want this to occur. ![](https://imgur.com/Jms1Q.png) ![](https://imgur.com/N07A1.png)
Disable vertical scaling in GTK+
CC BY-SA 2.5
null
2010-10-04T07:18:43.800
2010-10-04T08:46:13.463
2010-10-04T07:32:58.150
330,644
330,644
[ "c", "gtk" ]
3,853,977
1
3,866,960
null
2
221
My present TextMate theme (Ruby Blue) is nice, except there's one annoying attribute that I haven't been able to fix. When editing CSS, it doesn't apply any color to "word values" for properties. See screenshot below -- for `width: 90%`, the 90% is highlighted. However, for `display: block`, 'block' gets no highlighting. ![alt text](https://i.stack.imgur.com/LJF5C.png) What's the TextMate selector to allow me to color this? I tried experimenting with different options in the theme editor and haven't been able to find it yet. Thanks!
What's the selector to color word values in CSS files in TextMate?
CC BY-SA 2.5
0
2010-10-04T09:23:13.697
2010-10-05T19:29:52.980
null
null
139,934
[ "css", "themes", "textmate" ]
3,854,041
1
4,022,863
null
4
1,255
I have in my project a report that calculate some event ...i want insert a chart in this report but its unshown when i complie it .... its shown like un appernce image :( ![](https://i.stack.imgur.com/vvuk4.jpg) --- ![](https://i.stack.imgur.com/IsJiG.jpg)
Insert Chart In Asp.Net using VB.NET
CC BY-SA 2.5
null
2010-10-04T09:36:32.760
2010-10-26T10:39:54.377
null
null
226,149
[ "vb.net", "crystal-reports", "charts" ]
3,854,475
1
3,864,305
null
2
188
I can't figure out what Re# is complaining about with a piece of code. Everything compiles ok and works as it should, but Re# can't seem to resolve the expression without offering any suggestions. Look at the attachment for code and error. Any offers? ![alt text](https://i.stack.imgur.com/21YPf.jpg)
Unresolved lambda expression in Re#
CC BY-SA 2.5
null
2010-10-04T10:46:18.950
2010-10-05T13:56:01.217
2010-10-04T11:18:29.900
21,692
21,692
[ "c#", "visual-studio-2010", "silverlight-4.0", "lambda", "resharper" ]
3,854,508
1
4,177,452
null
3
2,031
I have seen the WWDC-104 video showing UIScrollView for photos. I have downloaded the Sample code too. In my app the Structure is as follows, (Root Class)Class A ---> Class B -----------> PhotoViewController(Containing ScrollView) I am calling the PhotoViewController class by using presentModalViewController method in Class B. But with every swipe the new Image shifts to right on the view. A black vertical strip is visible on left of the image which widens with each swipe. So after 6 to 8 images the view becomes totally black. I have not written any other code. Just copied the classes. Why this happens when the PhotoViewController class is not the first class to be loaded? Is there any property that needs to be set for ScrollView ? Is there any mistake in this view Hierarchy? Also How to start from a particular image (Load from 10th image)? Any help/suggestion will be highly appreciated. EDIT : ![alt text](https://i.stack.imgur.com/oI52k.jpg) After First Horizontal Swipe, ![alt text](https://i.stack.imgur.com/dwJe8.jpg) After Second Horizontal Swipe, ![alt text](https://i.stack.imgur.com/R3c6X.jpg)
In photoscroller app (iPhone WWDC-104 Photos App) uiscrollview images shift to right when called using presentModalviewController
CC BY-SA 2.5
null
2010-10-04T10:49:50.410
2010-11-14T13:29:06.033
2010-10-07T05:11:07.177
162,677
162,677
[ "iphone", "uiscrollview", "paging", "presentmodalviewcontroller", "wwdc" ]
3,854,541
1
3,854,762
null
1
1,282
I have tested my pages in Firefox & IE and looking at Firebug in Firefox for some reason some images are taking a long time to load. They are not very big in comparison to the ones which are loading quicker. Attached is a screenshot of Firebug. I especially notice it in IE with the progress bar at the bottom of the page, it just sits there saying loading image...![alt text](https://i.stack.imgur.com/FhTWF.jpg) Could it be the path or something which is [http://localhost:49211/Content/_layout/images/bg-footer.png](http://localhost:49211/Content/_layout/images/bg-footer.png) for example
ASP.Net MVC - Images taking a long time to load
CC BY-SA 2.5
null
2010-10-04T10:53:18.963
2010-10-04T11:23:25.007
null
null
84,539
[ "asp.net", "asp.net-mvc", "optimization", "asp.net-mvc-2" ]
3,854,597
1
3,855,038
null
1
386
Current the google map display US as default. ![alt text](https://i.stack.imgur.com/lTMAQ.png) I want to dispaly India as default on the map. How can i do this?
How to draw default postion on the google map in android?
CC BY-SA 2.5
null
2010-10-04T11:00:17.223
2012-01-14T12:25:59.740
2010-10-04T11:56:24.827
443,075
443,075
[ "android" ]
3,855,182
1
3,855,989
null
0
441
There is a strange bug which I can't solve. The bug is reproducable by this simplified example: css: ``` table.class1 td.subclass1{ display : none } table.class2 td.subclass2{ display : none } ``` html: ``` <table class="class1"> <tr> <td class="subclass1"> Invisible </td> <td class="subclass2"> Visible </td> </tr> </table> ``` js ( jQuery) ``` $("table.class1").removeClass("class1").addClass("class2); ``` As you can see Internet Explorer 7 doesn't show the column "Visible": ![Bug Demo](https://i.stack.imgur.com/jmHYa.png) You may take a look at this bug here: [Fiddle Demo](http://fiddle.jshell.net/Ehtcm/4/) What do I have to do to switch from one column to another column? Unfortunately I can't change the HTML but only the CSS and JS.
Internet Explorer 7 css js table column display bug
CC BY-SA 2.5
null
2010-10-04T12:26:31.940
2010-10-04T14:05:05.177
2010-10-04T12:40:19.800
159,319
159,319
[ "jquery", "html", "css", "internet-explorer-7" ]
3,855,221
1
3,855,283
null
6
388
I'm fairly new to database design, but I understand the fundamentals. I'm creating a relational database and I'd like to do something similar to creating a reusable type or class. For example, let's say I have a `Customer` table and a `Item` table. Customer and Item are related by a standard 1-to-many relationship, so Item has a column called `CustomerId`. I'd also like to have multiple "notes" for each Customer each Item. In an normal OOP model, I'd just create a `Note` class and create instances of that whenever I needed. Of course, a relational database is different. I was thinking about having a `Note` table, and I'd like a 1-to-many relationship between Customer and Note, as well as Item and Note. The problem then is that the Note table will have to have a column for each other table that wishes to use this "type". (see example below) ![note_relation1](https://i.stack.imgur.com/lm9RA.jpg) I also thought that instead, I could create an intermediate table between Note and Customer/Item (or others). This would allow me to avoid having extra columns in Note for each table referencing it, so note could remain unchanged as I add more tables that require notes. I'm thinking that this is the better solution. (see example) ![note_relation2](https://i.stack.imgur.com/NlhFH.jpg) How is this sort of situation usually handled? Am I close to correct? I'd appreciate any advice on how to design my database to have the sort of functionality I've described above.
How to model a custom type in a relational database?
CC BY-SA 2.5
null
2010-10-04T12:31:41.123
2018-11-26T06:37:29.790
null
null
262,748
[ "database", "database-design", "types", "relational-database" ]
3,856,075
1
3,856,147
null
1
1,816
I have a button which I want to occupy 75% of the screen: ![Panic](https://i.stack.imgur.com/6kFJr.jpg) On a 480x800 resolution screen this would be 360 pixels wide. On a 280x320 resolution screen this would be 210 pixels wide. I understand there is a DIP unit of measurement, but does that also work to scale screen images for resolutions? What DIP measurement would I use for this, and do the images need to be saved at 160dpi.
Scaling ImageButtons for multiple resolutions
CC BY-SA 2.5
null
2010-10-04T14:15:08.943
2010-10-05T05:50:30.883
null
null
21,574
[ "android", "imagebutton" ]
3,856,158
1
3,896,330
null
14
4,770
On a localized Iphone (Language set to Hebrew) when we view a webpage using safari and tap on an input field we get the keyboard up with the "Next/Previous/Done" buttons in Hebrew. When we view the same webpage using a UIWebview embedded inside our application the "Next/Previous/Done" buttons are always in English. We were thinking that we might need to add a translation file for those fields but we do not know the keys to use. Any pointers on this? Edit: Started a bounty to hopefully get some pointers. Edit: Attaching two pictures ![alt text](https://i.stack.imgur.com/Ybfjb.jpg)
UIWebview Localization
CC BY-SA 2.5
0
2010-10-04T14:24:49.947
2010-10-09T16:06:47.977
2010-10-07T11:09:00.090
130,304
130,304
[ "iphone", "cocoa-touch", "ios4" ]
3,856,163
1
3,862,527
null
3
2,480
I am having troubles to carry over previously selected items in a ModelForm in the admin. I want to use the widget since that is the most straightforward UI in this usecase. It works as far that when saving, the values are stored. But when editing the previously saved item, the values previously saved in this field are not reflected in the widget. UI Example: ![alt text](https://i.stack.imgur.com/eL79A.png) After posting (editing that item, returns it blank): ![alt text](https://i.stack.imgur.com/bl9Bd.png) However, when not using the widget but a regular CharField when editing the item it looks like: ![alt text](https://i.stack.imgur.com/6dN1l.png) So for some reason the values are not represented by the checkbox widget? Here's my simplified setup, models.py ``` POST_TYPES = ( ('blog', 'Blog'), ('portfolio', 'Portfolio'), ('beeldbank', 'Beeldbank'), ) class Module(models.Model): title = models.CharField(max_length=100, verbose_name='title') entriesFrom = models.CharField(max_length=100) def __unicode__(self): return self.title ``` forms.py: ``` class ModuleForm(forms.ModelForm): entriesFrom = forms.MultipleChoiceField( choices=POST_TYPES, widget=CheckboxSelectMultiple, label="Pull content from", required=False, show_hidden_initial=True) class Meta: model = Module def __init__(self, *args, **kwargs): super(ModuleForm, self).__init__(*args, **kwargs) if kwargs.has_key('instance'): instance = kwargs['instance'] self.fields['entriesFrom'].initial = instance.entriesFrom logging.debug(instance.entriesFrom) ``` admin.py ``` class ModuleAdmin(admin.ModelAdmin): form = ModuleForm ``` So when editing a previously saved item with say 'blog' selected, debugging on returns me the correct values on self.fields['entriesFrom'] ([u'blog',]), but its not reflected in the checkboxes (nothing is shown as selected) in the admin. updated the ModuleForm class to pass on initial values, but nothing still gets pre-populated whilst there are a few values in the initial value ("[u'blog']").
Django: MultipleChoiceField in admin to carry over previously saved values
CC BY-SA 2.5
0
2010-10-04T14:25:46.243
2022-09-02T13:18:48.600
2010-10-05T09:19:44.177
18,671
18,671
[ "django", "admin", "modelform" ]
3,856,224
1
3,856,323
null
1
3,933
I want to "concatenate" all the "Text"-rows into one single row and get one row as a result. Is this even possible? I use MSSQL Server 2005. ![query](https://i.stack.imgur.com/BpT0x.png)
Group and concatenate many rows to one
CC BY-SA 2.5
null
2010-10-04T14:33:49.710
2011-09-20T14:46:29.947
2011-09-20T14:46:29.947
570,191
6,851
[ "sql", "sql-server", "sql-server-group-concat" ]
3,856,318
1
3,856,348
null
1
776
I have collapsable/expandable [tree](http://docs.jquery.com/Plugins/Treeview) created in jQuery. After loading the tree: ``` $("#tree").treeview({ collapsed: true, animated: "medium", control: "#sidetreecontrol", persist: "location" }); ``` I have expando data attribute on the nodes, for example: ![alt text](https://i.stack.imgur.com/36E9e.jpg) I've written some code which appends new nodes to my existing ones, basically by creating new `<ul><li>` html elements. So after appending a new node, I have additional ul container, but without attribute: ![alt text](https://i.stack.imgur.com/kpuvL.jpg) While I'm able to expand and collapse nodes initialized on page loading, I'm not able to interact with the nodes I've added later, because they're not cached... ? I don't understand that and I don't know how to fix it to be able to collapse and expand nodes I've created after the tree is initialized. Regards
Newly created elements without jquery expando attribute aren't maintained by jquery?
CC BY-SA 2.5
null
2010-10-04T14:44:35.143
2010-10-04T14:47:43.457
null
null
270,315
[ "jquery" ]
3,856,399
1
10,893,821
null
0
206
Hi this is my UITextView coordinate on InterFace builder : ![alt text](https://i.stack.imgur.com/9crqD.png) so if i want use this coordinate via frame task , my UITextView going to change the position on the screen !!! i don't know what's the problem ! i insert the exactly numbers on the interface builder size tab . ``` textPad.frame = CGRectMake(511, 219, 751, 260); ``` what is the problem ?
Problem with UITextView and frame task
CC BY-SA 2.5
null
2010-10-04T14:53:34.813
2012-06-05T10:16:36.303
null
null
319,097
[ "iphone", "ios4" ]
3,856,408
1
3,856,565
null
0
717
Is it possible to detect the touches in a scrollview which is filled with a grid of buttons as in the image below? ![alt text](https://i.stack.imgur.com/MAZRV.png) For example, in this image, i can only drag the scroll view by dragging on the red areas, but i would like to be able to scroll the scrollview no matter where it is touched (like the iPhone's home screen)? Thanks
Detecting touches on a scrollview
CC BY-SA 2.5
null
2010-10-04T14:55:38.223
2012-11-14T16:20:44.700
null
null
222,217
[ "objective-c", "uiscrollview", "ios4" ]
3,856,461
1
3,864,709
null
8
5,687
[Screenshot below] I was using ListPlot to draw a smooth line through some data points. But I want to be able to work with the 1st and 2nd derivative of the plot, so I thought I'd create an actual "function" using Interpolation. But as you can see in the picture, it's not smooth. There are some strange spikes when I do Plot[Interpolation[...]...]. I'm wondering how ListPlot get's it's interpolated function, and how I can get the same thing, using Interpolation[] or some other method. thanks, Rob Here is some text for copy/paste: ``` myPoints = {{0.,3.87},{1.21,4.05},{2.6,4.25},{4.62,4.48},{7.24,4.73},{9.66,4.93}, {12.48,5.14},{14.87,5.33},{17.34,5.55},{19.31,5.78},{20.78,6.01},{22.08,6.34}, {22.82,6.7},{23.2,7.06},{23.41,7.54},{23.52,8.78},{23.59,9.59},{23.62,9.93}, {23.72,10.24},{23.88,10.56},{24.14,10.85},{24.46,11.05},{24.81,11.2}, {25.73,11.44},{27.15,11.63}} ListPlot[myPoints, Joined -> True, Mesh -> Full] Plot[Interpolation[myPoints][x], {x, 0, 27.2}] ``` The last one has spikes. ``` Gleno pointed out that my List plot is linear. But what about when both have InterpolationOrder -> 3? ListPlot[myPoints, Joined -> True, Mesh -> Full, InterpolationOrder -> 3] Plot[Interpolation[myPoints, InterpolationOrder -> 3][x], {x, 0, 27.2}] ``` ![Mathematica ListPlot Screenshot](https://i.stack.imgur.com/Zopcc.png)
In Mathematica, what interpolation function is ListPlot using?
CC BY-SA 2.5
0
2010-10-04T15:02:19.793
2012-01-02T22:17:46.650
2010-10-04T22:20:11.067
327,572
327,572
[ "wolfram-mathematica", "interpolation" ]
3,856,598
1
null
null
10
2,538
Two month ago I started to write a new iPhone Application and for this reason I created a generic RESTFul web service, which allows me to have a lot of these necessary features like user authentication, user profiles, a friendship system, media processing, a messaging system and so on. In my mind there are several use cases to reuse this webservice for future iPhone applications. With this state of mind, I decided to write a static library for this application (and all future apps) that handles all the heavy lifting like media (image, video, sound) setup and processing, communicating with the web service, parsing and mapping of the results, handling CoreData and so on. Given my application there are scenarios when a lot of parallel tasks are running (worst case) e.g. the user currently changes his/her profile picture, while the application sends the users location to the server (in the background) and a new push notification is received. So decided to encapsule each logical operation (like SendUserLocation or GetCurrentFriendList) in a NSOperation and add them to a serviceQueue (NSOperationQueue). Each Operation is able to spawn subtasks when the operation successfully got a result from the webservice and should process it now. ![alt text](https://i.stack.imgur.com/TVvQH.png) A typical ServiceManager method looks like ``` - (void)activateFriendsSync:(id)observer onSuccess:(SEL)selector { ELOSyncFriends *opSyncFriends = [[ELOSyncFriends alloc] initWithSM:self]; [self ELServiceLogger:opSyncFriends]; [serviceQueue addOperation:opSyncFriends]; if(observer) { [self registerObserver:observer selector:selector name:opSyncFriends.notificationName]; } } ``` Each operation, request (to the server) and subTask uses a GUID as a notificationName to notify the parent object when it's done processing. If everything in an operation is done, it sends a notification back to the user interface. That said, the code for adding and removing subtasks looks like this ``` - (void)removeSubTask:(NSNotification*)notification { ELRequest *request = (ELRequest*)[notification object]; [subTasks removeObjectIdenticalTo:request.notificationName]; if([subTasks count] == 0) { // all SubTaks done, send notification to parent [serviceManager.notificationCenter postNotificationName:self.notificationName object:request]; } } - (NSString*)addSubTask { NSString* newName = [self GetUUID]; [subTasks addObject:[newName retain]]; [serviceManager.notificationCenter addObserver:self selector:@selector(removeSubTask:) name:newName object:nil]; return newName; } - (NSString *)GetUUID { CFUUIDRef theUUID = CFUUIDCreate(NULL); CFStringRef string = CFUUIDCreateString(NULL, theUUID); CFRelease(theUUID); return [(NSString *)string autorelease]; } ``` Now all I've got to do is to call the serviceManager in my gui to start a specific operation like ``` [self.core.serviceManager activateFriendsSync:nil onSuccess:nil]; ``` If I want to register an observer, I just pass an observer object and a selector like this ``` [self.core.serviceManager activateFriendsSync:self onSuccess:@selector(myMethod:)]; ``` : The "architecture" runs very well and stable, but is it worth doing? Does it create too much overhead? Does it even make sense? How you, personally, implement concurrent operations? Best Henrik P.S. Feel free to edit my question, ask questions (as a comment), call me names for this thinking. I really had a hard time explaining it, basically because I'm not a native english speaker. And don't get me wrong. I didn't write this posting to show off in any kind. All I want to do is learn (and maybe to write a more advanced iphone / objective c question)
iOS App Architecture with NSOperations
CC BY-SA 2.5
0
2010-10-04T15:20:00.967
2012-09-07T01:51:41.917
2012-09-07T01:37:15.537
191,596
107,004
[ "iphone", "objective-c", "architecture", "nsoperation", "nsoperationqueue" ]
3,856,659
1
6,444,784
null
3
2,576
I have an Application that runs tests on a customers account in order to judge if their service is working correctly. During the process of running the tests, the application reads each test and checks to see if it passes / fails / etc... It plays a green checkmark / red x on the tabPage itself as an imagekey... the imagekey is assigned as so ``` (tabPage as TabPage).ImageKey = "pass.png"; ``` tabPage is actually an object that is passed through to the function so i can refer to it from a different method. When the tabControl for the tabPage is created (dynamically), an imageList is added to the tabControl (which is where the images are pulled from). ``` (tabControl[0] as TabControl).ImageList = imageList2; ``` So when the method finally gets around to the code to assign the ImageKey it does run through the code, however it just shows up as a blank image. It's weird, because it works for some people and not others. It does not currently work on mine atm either and they do not show when I execute the source code. Does anyone have any ideas? Here's an image to help describe the issue... More code to follow if needed. ![Example Image](https://i.stack.imgur.com/xOpKm.png)
C# TabPage ImageKey not drawing
CC BY-SA 2.5
null
2010-10-04T15:26:53.467
2020-02-28T17:31:33.423
null
null
450,782
[ "c#", "image", "tabpage" ]
3,856,863
1
3,857,015
null
1
3,442
![http://i.stack.imgur.com/L1z4D.jpg](https://i.stack.imgur.com/L1z4D.jpg) Invoice ID, PO Number and dueDate are shown in duplicates. TotalPrice is an alias (It should be Unit Price, total price is a mistake, so assume it Unit Price not total price) TotalShippingPrice shows the shipping price that was associated with the InvoiceID/PONumber, for every invoiceID/PONumber there will be single shipping price. Same rule applied to tracking number. Year represents what year this invoice was sent (don't worry about it). isTaxPaid represents whether a tax was paid in Unit Price or not (don't worry about it) My request is: I need to have the remove invoiceID duplicate and have the sum of unit price for every invoice, so there should be only one record of every invoiceID/PONumber with sum of unit prices. For example: 30463 - 903315 - whatever due date - 368 (92 + 276) - ----- (trackingNumber) - 2010 - 0 (tax paid) So my question is: Since "UnitPrice" column is an alias, i can not get the sum of it! What should i do? I would like to have the psedu-code or the idea on how to do it... --- In case you want to see my query, here it is (warning it looks scary and awfully written, need to tuned later on): ``` SELECT CustomerInvoice.cuInvoiceID, CustomerQuote.PONumber, CustomerInvoice.dueDate, CASE WHEN (SELECT isTaxPaid FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 1 AND CustomerQuoteProducts.qty > 0 AND CustomerQuoteProducts.isTaxPaid > 0 THEN SUM(((CustomerQuoteProducts.unitPrice * 1.15) * 1.15) * CustomerQuoteProducts.qty) WHEN (SELECT isTaxPaid FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 1 AND CustomerQuoteProducts.qty <= 0 AND CustomerQuoteProducts.isTaxPaid > 0 THEN SUM((CustomerQuoteProducts.unitPrice * 1.15) * 1.15) WHEN (SELECT isTaxPaid FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 0 AND CustomerQuoteProducts.qty > 0 AND CustomerQuoteProducts.isTaxPaid > 0 THEN SUM((CustomerQuoteProducts.unitPrice * CustomerQuoteProducts.qty) * 1.15) WHEN (SELECT isTaxPaid FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 0 AND CustomerQuoteProducts.qty <= 0 AND CustomerQuoteProducts.isTaxPaid > 0 THEN SUM(CustomerQuoteProducts.unitPrice * 1.15) WHEN (SELECT Count(isTaxPaid) FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 0 AND CustomerQuoteProducts.qty > 0 AND CustomerQuoteProducts.isTaxPaid > 0 THEN SUM((CustomerQuoteProducts.unitPrice * 1.15) * CustomerQuoteProducts.qty) WHEN (SELECT Count(isTaxPaid) FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 0 AND CustomerQuoteProducts.qty <= 0 AND CustomerQuoteProducts.isTaxPaid > 0 THEN SUM(CustomerQuoteProducts.unitPrice * 1.15) WHEN (SELECT isTaxPaid FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 1 AND CustomerQuoteProducts.qty > 0 AND CustomerQuoteProducts.isTaxPaid <= 0 THEN SUM(((CustomerQuoteProducts.unitPrice * 1.15)) * CustomerQuoteProducts.qty) WHEN (SELECT isTaxPaid FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 1 AND CustomerQuoteProducts.qty <= 0 AND CustomerQuoteProducts.isTaxPaid <= 0 THEN SUM((CustomerQuoteProducts.unitPrice * 1.15)) WHEN (SELECT isTaxPaid FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 0 AND CustomerQuoteProducts.qty > 0 AND CustomerQuoteProducts.isTaxPaid <= 0 THEN SUM((CustomerQuoteProducts.unitPrice * CustomerQuoteProducts.qty)) WHEN (SELECT isTaxPaid FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 0 AND CustomerQuoteProducts.qty <= 0 AND CustomerQuoteProducts.isTaxPaid <= 0 THEN SUM(CustomerQuoteProducts.unitPrice) WHEN (SELECT Count(isTaxPaid) FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 0 AND CustomerQuoteProducts.qty > 0 AND CustomerQuoteProducts.isTaxPaid <= 0 THEN SUM((CustomerQuoteProducts.unitPrice * CustomerQuoteProducts.qty)) WHEN (SELECT Count(isTaxPaid) FROM SupplierQuoteProducts WHERE productID = CustomerQuoteProducts.ProductID) = 0 AND CustomerQuoteProducts.qty <= 0 AND CustomerQuoteProducts.isTaxPaid <= 0 THEN SUM(CustomerQuoteProducts.unitPrice) END AS "TotalPrice", CASE WHEN row_number() OVER (partition BY CustomerInvoice.cuInvoiceId ORDER BY newid()) = 1 THEN ( CASE WHEN CustomerShipping.isTaxPaid > 0 THEN SUM(CustomerShipping.shippingPrice * 1.15) WHEN CustomerShipping.isTaxPaid <= 0 THEN SUM(CustomerShipping.shippingPrice) END ) END AS "TotalShippingPrice", CASE WHEN row_number() OVER (partition BY CustomerInvoice.cuInvoiceId ORDER BY newid()) = 1 THEN CustomerShipping.trackingNumber END AS "trackingNumber", DATEPART(year, CustomerInvDetail.sentDate) AS Year, CustomerQuoteProducts.isTaxPaid FROM CustomerInvoice INNER JOIN CustomerInvDetail ON CustomerInvoice.cuInvoiceID = CustomerInvDetail.cuInvoiceID INNER JOIN CustomerQuote ON CustomerQuote.customerQuoteID = CustomerInvoice.customerQuoteID INNER JOIN CustomerQuoteProducts ON CustomerQuoteProducts.customerQuoteID = CustomerQuote.customerQuoteID INNER JOIN CustomerShipping ON CustomerShipping.customerQuoteID = CustomerInvoice.customerQuoteID INNER JOIN Customer ON Customer.customerID = CustomerQuote.customerID WHERE (DATEPART(year, CustomerInvDetail.sentDate) BETWEEN 1999 AND 2999) AND (Customer.customerID = 500) GROUP BY CustomerInvDetail.sentDate, CustomerInvoice.cuInvoiceID, CustomerShipping.shippingPrice, CustomerInvoice.dueDate, CustomerQuote.PONumber, CustomerQuoteProducts.qty, CustomerQuoteProducts.ProductID, CustomerQuoteProducts.unitPrice, CustomerQuoteProducts.isTaxPaid, CustomerShipping.isTaxPaid, CustomerShipping.trackingNumber ```
How can I use aggregate function SUM on an alias column?
CC BY-SA 2.5
null
2010-10-04T15:50:18.857
2010-10-04T17:13:42.727
2010-10-04T17:13:42.727
41,956
311,509
[ "sql", "sql-server", "tsql", "sql-server-2008" ]
3,857,092
1
3,857,467
null
10
2,095
As the title says, I am wondering if it is possible to implement a Drop Down Menu on the Title Bar of my Form, similar to Firefox 4's: ![Firefox Menu Image 2](https://i.stack.imgur.com/5C5tM.png) Is it possible for me to do this with C# and WinForms? If so, how? It doesn't have to be very fancy like the Office Ribbon. In fact it can look exactly the same as the Firefox button, but with my applications name instead.
Create Firefox 4 Style Button and Drop Down Menu on Form Title Bar C#
CC BY-SA 3.0
0
2010-10-04T16:18:38.207
2015-08-18T08:24:49.263
2015-08-18T08:24:49.263
4,374,739
119,919
[ "c#", "winforms" ]
3,857,365
1
3,857,571
null
1
935
![alt text](https://i.stack.imgur.com/hrddp.jpg) The way i designed my working sheet doesn't help me to calculate working hours easily. The output in snapshot has been gathered from multiple tables. Don't worry regarding setDate and timeEntered formatting. SetDate represents working day. tsTypeTitle represents type of shift, is it lunch time, etc. timeEntered represents the actual time. setDate will have to be trimmed to have only Date and timeEntered should only show time - This will be handled later, don't worry about it. I need to grab the difference between Shift Started and Shift Ended so i can calculate the wage. Here is my query in case you want to look at it: ``` SELECT TimeSheet.setDate, TimeSheetType.tsTypeTitle, TimeSheetDetail.timeEntered FROM TimeSheet INNER JOIN TimeSheetDetail ON TimeSheet.timeSheetID = TimeSheetDetail.timeSheetID INNER JOIN TimeSheetType ON TimeSheetType.timeSheetTypeID = TimeSheetDetail.timeSheetTypeID ```
Need Help in Calculating Working Hours
CC BY-SA 2.5
null
2010-10-04T16:50:46.923
2010-10-04T17:32:36.693
2010-10-04T16:54:21.353
341,251
311,509
[ "sql", "sql-server", "tsql", "sql-server-2008" ]
3,857,434
1
5,370,077
null
4
768
Given a DAG with |V| = n and has s sources we have to present subgraphs such that each subgraph has approximately k1=√|s| sources and approximately k2=√|n| nodes. If we define the height of the DAG to be the maximum path length from some source to some sink. We require that all subgraphs generated will have approximately the same height. The intersection of each pair of node Sets (of subgraphs) is empty. You can see in attached picture the example of right partition(each edge in the graph is directed upwards). ![alt text](https://i.stack.imgur.com/PSaBI.png) There are 36 nodes and 8 sinks [#10,11,12,13,20,21,22,23]in the example .So each subgraph should have 6 nodes and 2 or 3 sinks. Do you have idea for algorithm? Thank you very much
digraph partitioning to subgraphs
CC BY-SA 2.5
0
2010-10-04T17:01:52.603
2011-03-20T17:15:58.040
2011-02-05T02:18:22.013
590,042
466,056
[ "algorithm", "graph-theory", "partitioning", "directed-acyclic-graphs" ]
3,857,931
1
3,858,803
null
5
12,694
I have an issue that only seems to affect Safari and Chrome (aka WebKit). I have an overlay that fills the whole screen, and two table rows that I would like to appear on top of the overlay. Everything else on the page should be displayed below the overlay. The problem is that Safari only displays one of the table rows on top. Firefox correctly displays both on top. I can't seem to find the root cause of this issue in Safari, but I know I'm not the only one who has had a "Safari positioning issue that works in Firefox". What should I do in order to make this work in both Firefox and Safari/Chrome? ``` <body> <style> .ui-widget-overlay { display: block; position: absolute; width: 100%; height: 100%; background: #000; opacity: 0.5; } </style> <table> <tr style="position:relative; z-index:1000;"> <td>Displays on top in Firefox only</td> </tr> <tr> <td> <div style="position:relative; z-index:1000;"> Displays on top in both Safari and Firefox </div> <span class="ui-widget-overlay"></span> </td> </tr> <tr> <td>Displays below overlay</td> </tr> <tr> <td>Displays below overlay</td> </tr> <tr> <td>Displays below overlay</td> </tr> </table> </body> ``` Apparently the code sample above displays correctly. However, that is just a sample. It's not the actual code. The HTML is identical, but I am applying the styles dynamically with JavaScript. Maybe the issue lies with jQuery? I'm using this line to add the positioning to the first table row: ``` $(firstTableRow).css('position', 'relative').css('z-index', '1000'); ``` In Firefox (using Firebug) I can see that the style is being applied, however in Safari (using Web Inspector) it says that the "computed style" of that table row is statically positioned with a z-index of auto, even though the "style attribute" styles say that the position is relative and z-index is 1000. ![screenshot](https://i.stack.imgur.com/zYKG0.png)
Safari and Chrome CSS table row positioning z-index issue (works in Firefox)
CC BY-SA 3.0
0
2010-10-04T18:09:33.593
2011-08-31T20:02:30.667
2011-08-31T20:02:30.667
48,523
48,523
[ "css", "firefox", "google-chrome", "safari", "z-index" ]
3,858,180
1
null
null
1
760
is it possible to create an image like this one using php with the help of GD/ImageMagick? This image was generated by Web Button Maker Delux, which is a .NET App. So i think, may be there is an way for me to generate one using PHP. So any help on that please? Thanks, Anjan ** in case image is broken here is another url of the sample image: [http://www.ultrasoftbd.com/aqua.png](http://www.ultrasoftbd.com/aqua.png) ![alt text](https://i.stack.imgur.com/SFek8.png)
create aqua style buttons using php
CC BY-SA 2.5
0
2010-10-04T18:47:01.143
2012-11-05T03:25:36.833
2010-10-04T19:35:37.567
47,468
47,468
[ "php", "gd", "imagemagick" ]
3,858,341
1
3,858,639
null
1
490
I'm trying to do some blending of images in Java. After succcesfully doing multiply and screen blending, "normal" blending is causing me headaches. I found on Wikipedia that the formula for blending two pixels with alpha is: ![](https://upload.wikimedia.org/math/3/c/3/3c377902304f3e4c105ad360abbbc180.png) I've tried to translate this to Java, and now have: ``` float t_a = (topPixels[i] >> 24) & 0xff, t_r = (topPixels[i] >> 16) & 0xff, t_g = (topPixels[i] >> 8) & 0xff, t_b = topPixels[i] & 0xff; float b_a = (bottomPixels[i] >> 24) & 0xff, b_r = (bottomPixels[i] >> 16) & 0xff, b_g = (bottomPixels[i] >> 8) & 0xff, b_b = bottomPixels[i] & 0xff; destPixels[i] = (255 << 24 | (int)((t_r * t_a) + ((b_r * b_a) * (((255 - t_a) / 255)))) << 16 | (int)((t_g * t_a) + ((b_g * b_a) * (((255 - t_a) / 255)))) << 8 | (int)((t_b * t_a) + ((b_b * b_a) * (((255 - t_a) / 255)))) << 0 ); ``` But this seems to be wrong as the resulting image comes out wrong. Any ideas what I'm missing, or is my lack of mathematical skill getting the best of me again when translating the formula to code?
Problems with "normal" blending of two images with alpha
CC BY-SA 2.5
null
2010-10-04T19:12:07.207
2010-10-04T19:55:38.027
2017-02-08T14:18:39.680
-1
251,455
[ "java", "android", "image-processing" ]
3,858,460
1
3,859,366
null
13
16,653
I am trying to have a resizable on a div, but the resizer handle is always contained within the div can I have it where scrollbars end. ![demo](https://i.stack.imgur.com/Pgyuv.png) /////////// Edit /////////// I have achieved it with jScrollPane but after using jScroll I am unable to resize horizontally. [demo http://i53.tinypic.com/906rk9.png](http://i53.tinypic.com/906rk9.png)
jQuery ui ReSizable with scroll bars
CC BY-SA 2.5
0
2010-10-04T19:33:38.057
2019-04-23T10:18:34.020
2010-10-04T20:48:10.133
107,129
107,129
[ "javascript", "jquery", "jquery-ui" ]
3,858,902
1
null
null
1
1,774
I am trying to style the divs to fill the entire contents of the table cell. That means that the background color should fill the height of the table cell. How can I get the div to fill the height of the table cell? ``` <style> body { background-color: #ccc; } table, tr, td { border: 2px solid #00f; } td > div { background-color: #fff; color: #f00; padding: 5px;} </style> <table> <tr> <td> <div style="position: relative; z-index: 1000"> line<br />line<br />line </div> </td> <td> <div style="position: relative; z-index: 1000">fill contents</div> </td> </tr> </table> ``` The background color should fill the height of the "fill contents" table cell: ![alt text](https://i.stack.imgur.com/GAHEP.png) [Here is a jsfiddle](http://jsfiddle.net/pjd6x/) to play with. Also, the reason I am asking this is because I style the td tag due to a workaround in my JavaScript. This may help to visualize my specific problem: [http://jsfiddle.net/pjd6x/8/](http://jsfiddle.net/pjd6x/8/) There is an overlay that is appearing on top of the table (intentionally) and below the divs (also intentional), but I would like the divs to be the same height (to look as if they are filling the contents of the tds).
How to style a div to fill the entire contents of a table cell?
CC BY-SA 2.5
null
2010-10-04T20:34:25.500
2010-10-04T20:56:25.400
2010-10-04T20:56:25.400
48,523
48,523
[ "html", "css" ]
3,858,956
1
3,859,172
null
10
4,754
: I submitted an [Eclipse enhancement request for this refactoring](https://bugs.eclipse.org/bugs/show_bug.cgi?id=391281). Is there a way to move a private field from one class to its helper class? The below chicken-scratch UML shows what I'm doing manually right now. Class `C1` has private `field` and a private final reference to a `Helper` object before the refactoring. After the refactoring, all references in `C1'` to `field` are changed to `helper.getField()` and `helper.setfield()` as appropriate. ![UML Diagram](https://i.stack.imgur.com/OxIqn.png) ``` class Field {} class C1 { final private Field field; final private Helper helper; public Field getField() { return field; } public C1() { helper = new Helper(); field = new Field(); } } class Helper {} class C1Prime { final private HelperPrime helper; public Field getField() { return helper.getField(); } public C1Prime() { helper = new HelperPrime(); } } class HelperPrime { final private Field field; public HelperPrime() { field = new Field(); } public Field getField() { return field; } } ``` I've used Eclipse's refactoring capabilities quite a bit, but I can't figure out a way to automate this. For instance, ideally I would drag the private field/attribute/member from one class to another and hope that Eclipse asks me how I want to handle the unresolved references. It offers no suggestions and breaks all of the references. The operation that I've been repeating is to separate knowledge and behavior that doesn't really belong in the current class. I'm moving attributes and behavior that references certain fields out of the original class into a new "helper" class. The first step in my refactoring is to move the fields. A reference to the helper class exists as a field in the class I'm refactoring from. In order not to break `C1` during the refactoring, I think it would be nice if Eclipse offered to to generate getters and setters in `Helper'` and update the references in `C1` to use the getters/setters in the new class.
Refactoring to move a private field from one class to its helper class?
CC BY-SA 3.0
null
2010-10-04T20:42:12.117
2012-10-06T00:40:22.870
2012-10-06T00:40:22.870
403,455
403,455
[ "java", "eclipse", "refactoring", "automated-refactoring" ]
3,859,181
1
null
null
4
528
i've noticed that the default look of tabs has changed between Android versions (see screenshot). I like the first version better, but i need to set my android target to version 8 (android 2.2) so that app2sd works. but then i have the darker backgrounds. how can i switch to the old one? setting the background color manually produces ugly results ![alt text](https://i.stack.imgur.com/lGqss.jpg)
TabHost color changed between Android versions
CC BY-SA 2.5
0
2010-10-04T21:16:23.807
2010-10-05T06:40:51.593
2010-10-04T21:25:00.963
424,514
424,514
[ "android", "android-tabhost" ]
3,859,437
1
3,873,439
null
8
4,886
Per Greg's suggestion I've created one pair of image/text that shows the output from a 37k image to base64 encoded, using 100k chunks. Since the file is only 37k it's safe to say the loop only iterated once, so nothing was appended. The other pair shows the output from the same 37k image to base64 encoded, using 10k chunks. Since the file is 37k the loop iterated four times, and data was definitely appended. Doing a diff on the two files shows that on the 10kb chunk file there's a large difference that begins on line 214 and ends on line 640. - [Small Image (37k) - 100k Chunks - Image output](https://imgur.com/eAD2C)- [Small Image (37k) - 100k Chunks - Base64 Text output](http://pastebin.com/0DJj6Wbw)- [Small Image (37k) - 10k Chunks - Image output](https://imgur.com/7ssor)- [Small Image (37k) - 10k Chunks - Base64 Text output](http://pastebin.com/8srAhXxf) Here's where my code is now. Cleaned up a bit but still producing the same effect: So it looks like files that are larger than 100 KB get scrambled, but files under 100 KB are fine. It's obvious that something is off on my buffer/math/etc, but I'm lost on this one. Might be time to call it a day, but I'd love to go to sleep with this one resolved. Here's an example:![](https://imgur.com/m1a4G.jpg) After doing some testing I have found that the same code will work fine for a small image, but will not work for a large image or video of any size. Definitely looks like a buffer issue, right? --- Hey there, trying to base64 encode a large file by looping through and doing it one small chunk at a time. Everything seems to work but the files always end up corrupted. I was curious if anyone could point out where I might be going wrong here:
Base64 Encode File Using NSData Chunks
CC BY-SA 2.5
0
2010-10-04T21:55:03.767
2013-11-15T06:09:34.057
2010-10-05T19:27:44.390
465,524
465,524
[ "iphone", "objective-c", "base64", "nsdata", "nsfilehandle" ]
3,859,504
1
null
null
2
718
In the past, I installed Visual Studio 2010. With that comes SQL Server. Now I installed this:[Microsoft SQL Server Management Studio Express](https://www.microsoft.com/downloads/en/details.aspx?FamilyID=c243a5ae-4bd1-4e3d-94b8-5a0f62bf7796) Now, upon starting, I get this screen: ![alt text](https://i.stack.imgur.com/oDde2.png) And it doesn't matter what Server name I enter, nothing works. I've tried installing SQL Server 2008 Enterprise(I can get that via MSDNAA), but that fails totally, giving me this error: > ## TITLE: Microsoft SQL Server 2008 Setup The following error has occurred:Unable to open Windows Installer file 'G:\x86\setup\sql_engine_core_inst_loc_msi\1033\sql_engine_core_inst_loc.msi'.Windows Installer error message: The system cannot open the device or file specified. .Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup.For help, click: [http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.2531.0&EvtType=0xC24842DB](http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.2531.0&EvtType=0xC24842DB)------------------------------ BUTTONS: ## &Retry Cancel There is no help, I can click retry as much as I want, nothing changes. I went to the file itself, and Windows says I should check if it is a valid installer file. And that's my story. I need to get this up and running, and it's all going against me. Can anyone help?
SQL Server 2005 Management finds no database, 2008 won't install
CC BY-SA 2.5
0
2010-10-04T22:04:20.637
2010-10-12T04:25:08.377
2010-10-04T22:08:53.620
23,199
80,907
[ "sql-server" ]
3,859,521
1
3,859,541
null
12
4,383
When I type `.ToString()` on an `Enum` type in Visual Studio, the Intellisense shows a "strike-through" line through `ToString()` (although it builds and works fine). It seems to indicate that `Enum.ToString()` is deprecated in some way. Is this true? If so, why? ![alt text](https://i.stack.imgur.com/4NnAN.png)
Enum.ToString() deprecated?
CC BY-SA 2.5
null
2010-10-04T22:07:52.313
2012-07-28T07:03:17.217
2012-07-28T07:03:17.217
366,904
16,012
[ "c#", "enums", "resharper", "deprecated" ]
3,860,023
1
3,876,234
null
0
12,397
My local computer is 64 bit but the downloads for the .Net mySql connector found here: [http://dev.mysql.com/downloads/connector/net/](http://dev.mysql.com/downloads/connector/net/) are 32 bit. I installed the 32 bit file however, whenever I try to input any new connector information after the 1st keystroke the box disappears. So I'm assuming that it has more to do with my machine being 64 bit rather than 32... Is there a 64 bit version of this connector? Any other ideas? UPDATE: It is the Add a Connection box. ![alt text](https://i.stack.imgur.com/1FfZ4.jpg) After I enter anything into any of the textboxes the above box just disappears. Any ideas?
.net mySQL Connector for a 64 bit machine
CC BY-SA 2.5
null
2010-10-04T23:59:13.257
2010-10-06T19:37:17.877
2010-10-06T17:55:56.527
380,317
380,317
[ ".net", "asp.net", "mysql" ]
3,860,187
1
3,860,192
null
-2
759
I have to sort a table and looking for right plugin. Some of the columns have dates and some have currency signs($) as shown below. Are there any JQuery plugins available for sorting this kind of data. ![alt text](https://i.stack.imgur.com/qblqK.jpg)
Sorting table data with JQuery, table has columns with dates and dollar signs, which plug-in is good?
CC BY-SA 2.5
null
2010-10-05T00:49:00.440
2016-07-01T08:41:25.990
2016-07-01T08:41:25.990
2,333,214
322,492
[ "jquery", "jquery-plugins", "gridview-sorting" ]
3,860,200
1
null
null
3
709
I have seen the following in a few different apps so it seems like some kind of public api. Anyone where I can find the code for this? Specifcally the twitter login that appears in the popover: ![alt text](https://i.stack.imgur.com/t3lRh.jpg)
iphone/ipad standard twitter oauth module?
CC BY-SA 2.5
null
2010-10-05T00:53:54.817
2010-10-05T00:59:28.487
null
null
426,860
[ "iphone", "ipad", "twitter", "oauth", "popover" ]
3,860,403
1
null
null
2
613
I'm having a very frustrating issue where my SP2010 project in VS2010 where everything seems to be perfectly normal when I build/rebuild the solution, but when I go to "Package" the SP2010 project, though it builds and deploys successfully, one of the dependent assemblies loses one of its references to a different project in the solution - which also causes a run-time error. Does anyone know of any additional build steps that occur when selecting Deploy/Package on a SP2010 project, or anything else that could be causing this to stop working? Just confused as to why a build/rebuild causes no issues (in both Debug and Release configurations), but a Package/Deploy breaks... For example: ![alt text](https://i.stack.imgur.com/aswZJ.jpg) ![alt text](https://i.stack.imgur.com/nvBKP.jpg)
Why does packaging my Sharepoint 2010 project break my references?
CC BY-SA 2.5
null
2010-10-05T02:03:55.397
2012-08-21T14:44:34.830
null
null
167,018
[ "visual-studio-2010", "build-process", "sharepoint-2010", "reference" ]
3,861,018
1
null
null
0
525
Can following thing be done? ![alt text](https://i.stack.imgur.com/kqN0w.png) The red rectangled datatable should be modified as the other row. I am using c#, DataTable with MS-SQL. I want to give shown type of view of second row to the user in a windows. I'll be having at least 500-600 rows like this out of 1000 rows. Which can be shorten down to 1000-600/3 = 800. (Perhabs, I can take this chance because the operation will not be time consuming.) The user will be having ease in putting data only once in place of puttinig it thrice .. will save time for them and over all performance. Please ask question for help me solve this problem. Thanks in advance.
c# custom datatable view
CC BY-SA 2.5
null
2010-10-05T05:20:43.580
2013-08-29T17:15:27.650
null
null
110,426
[ "c#", "mysql", "datatable" ]
3,861,188
1
3,861,605
null
0
2,458
My site is incompatible with IE. How can I fix this problem? ![Firefox](https://i.stack.imgur.com/xh6gE.jpg) ![IE](https://i.stack.imgur.com/vVI07.jpg)
Cross-browser compatibility problem with IE
CC BY-SA 2.5
null
2010-10-05T06:05:55.050
2010-10-05T13:52:22.900
2010-10-05T06:12:11.593
313,758
369,161
[ "html", "css", "internet-explorer", "cross-browser" ]
3,861,296
1
3,861,396
null
49
44,880
I am new to QT, and I'm using `QTableView`, as shown below: ![enter image description here](https://i.stack.imgur.com/i5XnB.png) On the left side of the table, Qt is automatically showing a row number, as I've noted in red. How do I get rid of these numbers? My other problem is, if I click any cell, only that cell is selected. How can I make it to where, when a user clicks a cell, the entire row is selected, like I noted in pink? For example, if I click the cell then the entire third row should be selected.
How to select Row in QTableView?
CC BY-SA 3.0
0
2010-10-05T06:28:36.903
2017-11-02T22:02:36.480
2017-11-02T19:26:42.480
5,031,373
446,208
[ "qt", "qtableview" ]
3,861,570
1
3,861,846
null
0
879
I'm using `TwwDbLookupComboDlg` component. I want to change the date format in the combobox (as shown below) from `1/1/2009` to `Jan 2009`, any idea? ![TwwDbLookupComboDlg](https://i.stack.imgur.com/J6IBX.jpg)
How to change the date format in a DB aware combo box?
CC BY-SA 3.0
null
2010-10-05T07:20:03.137
2013-03-07T22:36:09.547
2013-03-07T22:36:09.547
937,125
367,856
[ "delphi", "combobox", "delphi-7", "date-format", "datefield" ]
3,861,647
1
3,861,697
null
5
24,294
i try to use generate MVVM pattern using Silverlight ListView. But if i bind data my silverlight control no data visualize. also no error return. i see empty gridview. ### Model: ``` public class MyData { public int ID { get; set; } public string Name { get; set; } public string Price { get; set; } public string Author { get; set; } public string Catalog { get; set; } } ``` ### View: ``` <UserControl x:Class="wpf.MVVM.Project.View.BookViewer" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="500" Width="700"> <Grid> <StackPanel> <ListView Margin="8" Height="400" Width="650" ItemsSource="{Binding Path=MyData}"> <ListView.View> <GridView > <GridViewColumn Header="ID" Width="Auto"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding ID}" TextAlignment="Right" Width="40"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn DisplayMemberBinding="{Binding Path=Name}" Header="Name" Width="100"/> <GridViewColumn DisplayMemberBinding="{Binding Path=Price}" Header="Price" Width="100"/> <GridViewColumn DisplayMemberBinding="{Binding Path=Author}" Header="Author" Width="100"/> <GridViewColumn DisplayMemberBinding="{Binding Path=Catalog}" Header="Catalog" Width="100"/> </GridView> </ListView.View> </ListView> </StackPanel> </Grid> </UserControl> ``` ### ViewModel: ``` public class MyDataViewModel { // public ObservableCollection<MyData> myData { get; set; } public List<MyData> GetData() { List<MyData> myDataList = new List<MyData>(); myDataList.Add(new MyData() { ID = 1, Name = "yusuf karatoprak", Author = "Mike Gold", Price = "6.7 TL", Catalog = "IT" }); myDataList.Add(new MyData() { ID = 2, Name = "yusuf karatoprak", Author = "Scott Gunitella", Price = "9.7 TL", Catalog = "IT" }); myDataList.Add(new MyData() { ID = 3, Name = "yusuf karatoprak", Author = "David Hayden", Price = "11.7 TL", Catalog = "IT" }); if (myDataList.Count > 0) { return myDataList; } else return null; } } ``` ### Window1.xaml ``` public partial class Window1 : Window { public Window1() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { MyDataViewModel myDataCtx = new MyDataViewModel(); MyDataDataView.DataContext = myDataCtx.GetData(); } } ``` ``` <Window x:Class="wpf.MVVM.Project.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="1000" Width="900" xmlns:views="clr-namespace:wpf.MVVM.Project.View" Loaded="Window_Loaded"> <Grid> <views:BookViewer x:Name="MyDataDataView" Margin="0,0,0,0"></views:BookViewer> </Grid> </Window> ``` i writed these codes but no data i can see.Look below: ![alt text](https://i.stack.imgur.com/98mL9.png) ### i added 2 pics my debug mode: ![alt text](https://i.stack.imgur.com/ALnbO.png) ![alt text](https://i.stack.imgur.com/HqdBS.png)
How to get data using ListView Binding via MVVM in wpf?
CC BY-SA 2.5
0
2010-10-05T07:31:40.263
2016-04-11T01:32:17.467
2010-10-05T07:58:12.957
52,420
52,420
[ "c#", ".net", "wpf", "mvvm" ]
3,861,996
1
null
null
0
1,620
When I'm starting rich client application with JNLP it does some requests to remote servers. Some of this requests are intended to check if the servers available or not. If they aren't available the client catches, for example, `UnknownHostException` and it's a completely valid and expected case. However, if I specify proxy settings in a Java Control Panel (Windows->Start->Settings->Control Panel->Java) I get following error dialog on start: ![alt text](https://i.stack.imgur.com/TPHS9.png) As you could see, this dialog is completely useless and it doesn't help to find out what's wrong. Also I tried to set a trace level in a Java Console to 5, but it also didn't provide me with any useful information. This dialog appears along with exception that is caught inside the starting application. I repeat immediately after it's thrown by `HttpClient` instance (commons-httpclient-3.1) and this dialog is not displayed by the application (moreover it has completely different look'n'feel). Here is a quote from code: ``` try { HttpClient client = new HttpClient(connectionManager); GetMethod getMethod = new GetMethod(); getMethod.setPath(targetUrl.getPath()); HostConfiguration hostConfiguration = getHostConfiguration(); client.executeMethod(hostConfiguration, getMethod); } catch (Exception e) { // some logging } ``` `executeMethod` throws `UnknownHostException` or `ConnectTimeoutException` here. If I turn on 'Direct connection' in "Java Control Panel->Network Settings" dialog the issue is not reproducible, but the problem is that it's not always possible to use direct connection, sometimes proxy is required. I found out that the issue is not reproducible on Java 1.6, but unfortunately I have to solve it somehow without upgrade. I understand that it's a very strange issue and looks more like a bug in JVM, but I hope that you could advice me anything to suppress these annoying dialogs somehow.
Empty error dialog on start in case of UnknownHostException
CC BY-SA 2.5
0
2010-10-05T08:29:01.363
2010-10-05T11:35:34.380
2010-10-05T09:22:22.513
136,971
136,971
[ "java", "java-web-start" ]
3,862,269
1
3,862,823
null
0
420
In the iTunes app on the iphone there is a list of songs or something. They are in a grouped tableview and the first image has a curved corner to match the top left corner of the grouped tableView. How would I go about replicating this (and the one at the bottom?) ![alt text](https://i.stack.imgur.com/Qaow0.png) Thanks Thomas
cell.imageView curved corner on first and last cell
CC BY-SA 2.5
0
2010-10-05T09:11:33.327
2010-10-05T10:34:30.120
null
null
414,972
[ "iphone", "itunes-app" ]
3,862,418
1
3,863,074
null
18
18,003
I have data that is mostly centered in a small range (1-10) but there is a significant number of points (say, 10%) which are in (10-1000). I would like to plot a histogram for this data that will focus on (1-10) but will also show the (10-1000) data. Something like a log-scale for th histogram. Yes, i know this means not all bins are of equal size A simple `hist(x)` gives ![alt text](https://i.stack.imgur.com/q4KFm.png) while `hist(x,breaks=c(0,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,3,4,5,7.5,10,15,20,50,100,200,500,1000,10000)))` gives ![alt text](https://i.stack.imgur.com/iHgkp.png) none of which is what I want. following the answers here I now produce something that is almost exactly what I want (I went with a continuous plot instead of bar-histogram): ``` breaks <- c(0,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,4,8) ggplot(t,aes(x)) + geom_histogram(colour="darkblue", size=1, fill="blue") + scale_x_log10('true size/predicted size', breaks = breaks, labels = breaks)![alt text][3] ``` ![alt text](https://i.stack.imgur.com/gnfLv.png) the only problem is that I'd like to match between the scale and the actual bars plotted. There two options for doing that : the one is simply use the actual margins of the plotted bars (how?) then get "ugly" x-axis labels like 1.1754,1.2985 etc. The other, which I prefer, is to control the actual bins margins used so they will match the breaks.
How can I plot a histogram of a long-tailed data using R?
CC BY-SA 2.5
0
2010-10-05T09:35:36.873
2019-04-15T01:17:20.513
2010-10-05T13:31:26.880
377,031
377,031
[ "r", "histogram" ]
3,862,478
1
3,865,659
null
2
2,211
I am using the following code for create a button. It is working fine. but I got the yellow rectangle at the left corner. Why? Please help me. Thanks in advance, ``` backButton = new QPushButton(tr("Back")); connect(backButton, SIGNAL(clicked()), this, SLOT(showSearchResultPage())); backButton->setStyleSheet( "background-image: url(/Users/aspire/IPhone Development/background_wood_Default.png);" "border-style: outset;" "border-width: 2px;" "border-radius: 10px;" "border-color: beige;" "font: bold 16px;" "color:black;" "min-width: 10em;" "min-height: 0.75em;" " margin: 0 1px 0 1px;" "color:rgb(255,246,143);" "padding: 6px;" ); QGridLayout *layout = new QGridLayout(); layout->addWidget(backButton, 1, 0, 1, 1); layout->addWidget(detailView, 2, 0, 1, 1); ``` ![alt text](https://i.stack.imgur.com/xZgEw.png)
QPushButton Issues
CC BY-SA 2.5
null
2010-10-05T09:45:04.103
2010-10-05T16:23:23.713
2010-10-05T15:04:34.883
9,876
430,278
[ "qt", "qt4", "stylesheet" ]
3,862,543
1
3,862,578
null
1
582
Hi I'm having some trouble with IE7 when doing a map. I've made an xml and ajaxed it to grab points based on where the user is on the map. It works well, and in FF, IE8 no problems when they click the points. On IE7 it firstly misses the cross at the top right, has some problems with the border (fixed that with some margin) and more importantly cuts out an portion of the image which I can't figure out. ![alt text](https://i.stack.imgur.com/MeZjW.jpg) I've attatched an image and what you see there is basically an a tag with a background image. I've taken the title out as I thought that might cause it. Basically I'm stumpped any ideas. Thanks Richard
Internet Explorer 7 Google Map Rendering Problem
CC BY-SA 2.5
null
2010-10-05T09:54:26.273
2010-10-05T10:03:13.033
2010-10-05T10:03:13.033
222,908
278,853
[ "javascript", "google-maps", "internet-explorer-7" ]
3,862,576
1
3,862,602
null
1
124
![alt text](https://i.stack.imgur.com/XIABK.png) I have seen the above marked (Encircled in Red) widget in quiet a few applications, what is it?
Identify this Android Widget
CC BY-SA 2.5
null
2010-10-05T09:58:53.053
2010-10-05T10:03:04.103
null
null
421,372
[ "android", "widget" ]
3,862,625
1
3,869,689
null
5
412
I had found a strange output when I write the following lines in very simple way: Code: ``` printf("LOL??!\n"); printf("LOL!!?\n"); ``` Output: ![alt text](https://i.stack.imgur.com/UbRB0.jpg) It happens even the code is compiled under both MBCS and UNICODE. The output varies on the sequence of "?" and "!"... Any idea?
Print ?? and !! in different sequence will show different output
CC BY-SA 2.5
null
2010-10-05T10:05:55.370
2016-02-29T22:24:40.917
2016-02-29T22:24:40.917
4,370,109
281,843
[ "c", "trigraphs" ]
3,863,378
1
3,864,395
null
0
90
I'm doing a blog engine using symfony as a learning exercice. How do I get the list of tags from the id of a blog post ? Here's the database shema : ![alt text](https://i.stack.imgur.com/XJois.png) I added the following in the model : ``` public static function getTags($id) { return Doctrine_Core::getTable('Tag') ->createQuery('t') ->select('t.name, t.slug') ->leftJoin('t.ContentTag ct') ->where('ct.content_id = ?', $id) ->orderBy('t.name ASC'); } ``` and here is part of the schema.yml : ``` Content: connection: doctrine tableName: ec_content actAs: Sluggable: fields: [title] unique: true canUpdate: true Timestampable: columns: id: type: integer(4) fixed: false unsigned: true primary: true autoincrement: true (...) relations: Comment: local: id foreign: content_id type: many ContentTag: local: id foreign: content_id type: many ContentTag: connection: doctrine tableName: ec_content_tag columns: content_id: type: integer(4) fixed: false unsigned: true primary: true autoincrement: false tag_id: type: integer(4) fixed: false unsigned: true primary: true autoincrement: false relations: Content: local: content_id foreign: id type: one Tag: local: tag_id foreign: id type: one ```
How do I access the list of tags linked to a blog post?
CC BY-SA 2.5
null
2010-10-05T11:57:03.587
2010-10-05T14:41:03.503
2010-10-05T14:24:50.123
113,305
113,305
[ "symfony1", "doctrine" ]
3,863,493
1
null
null
1
9,030
I am displaying a `ProgressBar` in Android, as seen below: ![alt text](https://i.stack.imgur.com/iKMla.png) but there is a around the progress bar. What if I i.e., only the progress bar circle and text should be shown in the progress bar dialog. How do I display the progress bar as shown below? ![alt text](https://i.stack.imgur.com/RMdBV.png) I failed to find a solution for this, but I think there should be some trick to display a progress bar dialog in this way. I mean to say there should be a way by extending some styles in styles.xml. Please anybody focus on this question and help me to display such dialog.
ProgressBar dialog Without Border
CC BY-SA 3.0
0
2010-10-05T12:13:02.697
2014-06-11T14:04:36.240
2014-06-11T14:03:43.967
2,598,115
379,693
[ "android", "progress-bar", "android-progressbar" ]
3,863,674
1
3,863,725
null
1
182
I have a bunch of sports team logos. What I want to do is find the color that is used for the highest percentage of pixels. So, for the patriots logo below, I would pick out the blue or #000f47 (white will not be an acceptable color), as this is used for the highest percentage of pixels. Obviously I can eyeball each image, use the color picker tool in Gimp/Photoshop, and determine the color. However, I would like to script this if possible. I can use any format for the picture input. Would it be possible to read the raw bitmap file format and determine this way? What would be an easy format to read? Do any tools support this, like ImageMagick, etc? ![alt text](https://i.stack.imgur.com/eDvhp.png) Thanks
Image Color Picking Script
CC BY-SA 2.5
null
2010-10-05T12:40:41.493
2010-10-05T12:55:22.753
2010-10-05T12:55:22.753
131,640
131,640
[ "image", "image-processing", "png", "imagemagick", "jpeg" ]
3,863,803
1
null
null
20
8,045
I'm using Eclipse Helios v3.6 and every time I start up I get the following dialog. Yet I do not use subversion. Does anyone know how to make this stop? ![Subversive Connector Discovery](https://i.stack.imgur.com/vCZ75.jpg)
How can I stop Eclipse from asking to install Subversive Connectors
CC BY-SA 2.5
0
2010-10-05T12:57:09.570
2014-04-06T06:13:22.923
null
null
269,547
[ "eclipse", "subversive" ]
3,863,849
1
3,869,698
null
0
238
Could Someone help me to find out why l.X1 is set to default value(0.0) when the binded source is having a value of 156. Following image may be self explanatory. ![alt text](https://i.stack.imgur.com/37L52.png)
Silverlight property binding
CC BY-SA 2.5
null
2010-10-05T13:01:59.197
2010-10-06T05:29:57.360
2010-10-05T13:09:16.843
448,063
448,063
[ "c#", "silverlight-3.0", "windows-phone-7" ]
3,864,416
1
3,866,242
null
3
177
I am facing a conceptual problem that I am having a hard time overcoming. I am hoping the SO folks can help me overcome it with a nudge in the right direction. I am in the process of doing some ETL work with the source data being very similar and very large. I am loading it into a table that is intended for replication and I only want the most basic of information in this target table. My source table looks something like this: ![alt text](https://imgur.com/EWC6w.png) I need my target table to reflect it as such: ![alt text](https://imgur.com/Ldd7y.png) As you can see I didn't duplicate the InTransit status where it was duplicated in the source table. The steps I am trying to figure out how to achieve are 1. Get any new distinct rows entered since the last time the query ran. (Easy) 2. For each TrackingId I need to check if each new status is already the most recent status in the target and if so disregard otherwise go ahead and insert it. Which this means I have to also start at the earliest of the new statuses and go from there. (I have no *(!#in clue how I'll do this) 3. Do this every 15 minutes so that statuses are kept very recent so step #2 must be performant. My source table could easily consist of 100k+ rows but having the need to run this every 15 minutes requires me to make sure this is very performant thus why I am really trying to avoid cursors. Right now the only way I can see to do this is using a CLR sproc but I think there may be better ways thus I am hoping you guys can nudge me in the right direction. I am sure I am probably leaving something out that you may need so please let me know what info you may need and I'll happily provide. Thank you in advance! EDIT: Ok I wasn't explicit enough in my question. My source table is going to contain multiple tracking Ids. It may be up to 100k+ rows containing mulitple TrackingId's and multiple statuses for each trackingId. I have to update the target table as above for each individual tracking Id but my source will be an amalgam of trackingId's.
Need approach for working with small subsets of a large dataset
CC BY-SA 2.5
0
2010-10-05T14:07:21.600
2010-10-05T17:43:18.423
2010-10-05T15:12:57.050
127,126
127,126
[ "sql", "sql-server", "tsql" ]
3,864,433
1
3,864,549
null
4
747
How to write a query suitable for generating an age pyramid like this: ![alt text](https://i.stack.imgur.com/FgtGU.gif) I have a table with a DATE field containing their birthday and a BOOL field containing the gender (male = 0, female = 1). Either field can be NULL. I can't seem to work out how to handle the birthdays and put them into groups of 10 years. EDIT: Ideally the X axis would be percent rather than thousands :)
MySQL to generate an Age Pyramid
CC BY-SA 2.5
0
2010-10-05T14:09:29.890
2010-10-05T14:19:40.073
2010-10-05T14:14:54.973
440,137
440,137
[ "mysql", "statistics", "charts" ]
3,864,961
1
3,864,983
null
0
1,041
I have a search form in my web application that throws an Apache 400 Bad Request error when you search using an apostrophe (smart quote, i.e. `’` not `'`). This happens when someone copy and pastes from Microsoft Word (which automatically converts tick marks to smart quotes). ![search box](https://i.stack.imgur.com/GsMLr.png) The form causes a GET request which puts the search string in the URL. Even when I encode the string, it causes this error. What should I do to get this to work? ``` <script type="text/javascript"> function zend_submit_main() { var query = $('#search_field').val(); if(query != '') { var search_field = '/query/' + escape(query); var url = '/search/results' + search_field + '/active-tab/contacts'; window.location = url; } return false; } </script> <form id="search_form" method="GET" onsubmit="zend_submit_main(); return false;"> <input type="text" value="search by contact name" onFocus="if (this.value=='search by contact name') { this.value=''; }" onBlur="if (this.value=='') { this.value='search by contact name'; }" name="search_field" id="search_field" style="width:160px;" /> <input type="submit" value="Go" /> </form> ```
Apostrophe (Smart Quote) in search throws Apache 400 Bad Request
CC BY-SA 2.5
null
2010-10-05T15:06:31.010
2010-10-05T15:09:32.783
null
null
48,523
[ "html", "apache", "url", "apostrophe" ]
3,865,396
1
3,870,216
null
1
841
I just included jQuery jScrollPane plugin in to my page and it seems to be working fine except one small issue. I want to decrease the size(height) of scrollBar tab (where we click to drag the scroll bar up and down). I have attached the current snapshot of it as you can see how long it is. On the example site, it shows up fine. Src: [http://jscrollpane.kelvinluck.com/themes/lozenge/](http://jscrollpane.kelvinluck.com/themes/lozenge/) Note: I am talking about the Dark Colored Area on the snapshot. ![alt text](https://i.stack.imgur.com/S5cSO.png)
jQuery Scroll Plugin
CC BY-SA 2.5
null
2010-10-05T15:51:04.430
2010-10-06T07:18:39.383
null
null
449,035
[ "jquery", "jscrollpane" ]
3,865,631
1
3,872,438
null
2
912
Heres the link to the page In question.... [http://team2648.com/OTIS2/DivTest.html](http://team2648.com/OTIS2/DivTest.html) So If you look at that page, If your browser is small enough, you see that below the box with the red background, there is a bit of space, Why doesn't the box below float up? ![This is what I want.](https://i.stack.imgur.com/y6ENK.png) The HTML Code: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>OTIS v1.5</title> <!-- Javascript - Fix the flash of unstyled content --> <script type="text/javascript"></script> <!-- Stylesheets --> <link href="css/reset.css" rel="stylesheet" type="text/css" media="all" /> <link href="css/default.css" rel="stylesheet" type="text/css" media="screen" /> <link href="css/styling.css" rel="stylesheet" type="text/css" media="screen" /> <!--Validation--> <script src="js/jquery.js" type="text/javascript"></script> <script src="js/jquery.validationEngine-en.js" type="text/javascript"></script> <script src="js/jquery.validationEngine.js" type="text/javascript"></script> <link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" media="screen" charset="utf-8" /> <script src="js/common.js" type="text/javascript"></script> <!-- Meta Information --> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="Techplex Engineer" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-10899272-10']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body> <div id="container"> <div id="header"> <div id="header-in"> <h2>Online Team Information System</h2> <h6>A Web Database Application for Team Profile Management</h6> </div> <!-- end #header-in --> </div> <!-- end #header --> <div id="content-wrap" class="clear lcol"> <!-- Navigation Column--> <div class="column"> <div class="column-in"> <ul> <li> My </li> <ul> <li><a href="./"> Dashboard </a></li> <li><a href="?page=manage.profile"> Profile</a></li> <li><a href="?page=manage.info"> Information</a></li> <li><a href="?page=manage.econtact"> Emergency Contact</a></li> </ul> <li> Management </li> <ul> <li><a href="?page=manage.users"> Users </a></li> <li><a href="?page=email"> Email </a></li><li><a href="?page=blog"> Blog </a></li> </ul> <li><a href="?page=bugs.php&referrer=/OTIS2/"> Report a Bug </a></li> <li><a href="logout.php"> Logout </a></li> </ul> <br /> Logged in as: <br /> <a href="?page=manage.profile">Blake </a> </div> </div> <div class="content"> <div class="content-in"> <h5>Welcome to your personal dashboard Blake </h5><hr id="hr1"/> <div id="bio" style="display: none;"> Your current Bio: <br/><textarea rows="10" cols="50"> </textarea> </div> <div id="profilestats" class="widget"> <strong>IMPORTANT</strong><br/> <ul style="padding-left: 10px;"> <li>Your Public Profile is pending moderation.</li> </ul> </div> <div id="cal" class="widget"> <!-- <iframe src="https://www.google.com/calendar/hosted/team2648.com/embed?showTitle=0&amp;showNav=0&amp;showPrint=0&amp;showTabs=0&amp;showCalendars=0&amp;mode=AGENDA&amp;height=200&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=team2648.com_a1ur39fpp2cn076ak2q06o8hhc%40group.calendar.google.com&amp;color=%235229A3&amp;ctz=America%2FNew_York" style=" border-width:0 " width="400" height="200" frameborder="0" scrolling="no"></iframe>--> <iframe src="https://www.google.com/calendar/hosted/team2648.com/embed?showNav=0&amp;showDate=0&amp;showPrint=0&amp;showTabs=0&amp;showCalendars=0&amp;showTz=0&amp;mode=AGENDA&amp;height=200&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=team2648.com_a1ur39fpp2cn076ak2q06o8hhc%40group.calendar.google.com&amp;color=%235229A3&amp;ctz=America%2FNew_York" style=" border-width:0 " width="400" height="200" frameborder="0" scrolling="no"></iframe> </div> <div id="stats" class="widget"><!-- and finally output the information formated for the widget--> <strong>You have:</strong><br/> <ul style="padding-left: 10px;"> <li> <strong>42</strong> of 30 fundraising hours<br/></li> <li>fundraised $<strong>160</strong> of $300<br/></li> <li> <strong>3</strong> of 5 community service hours<br/></li> <li> <strong>0</strong> of 40 build hours <br/></li> </ul> </div> <div id="logins" class="widget"> <form name="controlsForm"> <input id="cblogin" type="checkbox" name="loginbox" onClick=""/> Disable Login<br /> <input id="cbreg" type="checkbox" name="regbox" onClick=""/> Disable Registration<br /> </form> </div> <div class="clear"></div> </div><!-- end .content-in --> </div> <!-- end .content --> </div> <!-- end #content-wrap --> <div id="footer"> <div id="footer-in"> This system was designed, built and is maintained by Blake for Infinite Loop Robotics <br>OTIS(Online Team Information System) &copy; 2010 Techplex Labs </div> <!-- end #footer-in --> </div> <!-- end #footer --> </div> <!-- end div#container --> </body> </html> ``` You can view the css here: [http://team2648.com/OTIS2/css/styling.css](http://team2648.com/OTIS2/css/styling.css) but the relevant part is this: ``` div.widget{ width: 200px; float: left; /* text-align: center;*/ border: 1px solid black; padding: 8px; margin: 8px; /* margin-left:8px; font-weight:400;*/ -moz-border-radius:11px; -khtml-border-radius:11px; -webkit-border-radius:11px; border-radius:5px; background:#fff; border:2px solid #e5e5e5; -moz-box-shadow:rgba(200,200,200,1) 0 4px 18px; -webkit-box-shadow:rgba(200,200,200,1) 0 4px 18px; -khtml-box-shadow:rgba(200,200,200,1) 0 4px 18px; box-shadow:rgba(200,200,200,1) 0 4px 18px; /* padding:16px 16px 40px;*/ } div#disclaimer { margin-top: 10px; border: 1px dotted black; font-size:10px; background-color: #D7D7D7; } div.clear { clear: both; } div#profilestats { border:2px solid #FF9999; } div#cal { width: 400px; padding-bottom: 0px; } ```
Floating Div boxes limited by magic
CC BY-SA 2.5
0
2010-10-05T16:19:31.947
2012-05-17T17:14:48.450
2012-05-17T17:14:48.450
44,390
429,544
[ "css", "html", "css-float" ]
3,865,785
1
null
null
0
131
I want to generate this image in PHP with different colors for a skinning module in my app. How do I go about it? image(2x40 pixels): ![alt text](https://i.stack.imgur.com/b3sjD.png) magnified 4x ![alt text](https://i.stack.imgur.com/2oxfE.png) The original image was generated using the gradient tool in paint.net with base color 00137F.
Generate this image with PHP
CC BY-SA 2.5
null
2010-10-05T16:39:47.873
2010-10-05T16:45:05.483
null
null
405,861
[ "php", "image" ]
3,865,898
1
4,261,650
null
2
487
What is the view used to create the Template Chooser view in the iWork apps on iPad? ![alt text](https://i.stack.imgur.com/TXdlf.png) How can I create a view like that on iPad, and what would be a best way to implement it on iPhone considering screen size constraints.
How to get the Template Chooser/Document Browser view on iOS?
CC BY-SA 2.5
0
2010-10-05T16:54:01.393
2012-09-23T01:59:18.757
2010-10-12T13:35:40.810
249,029
249,029
[ "iphone", "ipad", "uiview", "ios4", "ios" ]
3,866,070
1
5,301,080
null
1
1,044
I'm having an issue with drawing to areas outside of the `MKMapRect` passed to `drawMapRect:mapRect:zoomScale:inContext` in my `MKOverlayView` derived class. I'm trying to draw a triangle for each coordinate in a collection and the problem occurs when the coordinate is near the edge of the `MKMapRect`. See the below image for an example of the problem. ![alt text](https://i.stack.imgur.com/mEd4W.png) In the image, the light red boxes indicate the `MKMapRect` being rendered in each call to `drawMapRect`. The problem is illustrated in the red circle where, as you can see, only part of the triangle is being rendered. I'm assuming that its being clipped to the `MKMapRect`, though the documentation for `MKOverlayView:drawMapRect` makes me think this shouldn't be happening. From the documentation: > You should also not make assumptions that the view’s frame matches the bounding rectangle of the overlay. The view’s frame is actually bigger than the bounding rectangle to allow you to draw lines for things like roads that might be located directly on the border of that rectangle. My current solution is to draw objects more than once if they are in a maprect that is slightly larger than then maprect given to drawMapRect but this causes me to draw some things more than needed. Does anyone know of a way to increase the size of the clipping area in drawMapRect so this isn't an issue? Any other suggestions are also welcome.
Clipping in MKOverlayView:drawMapRect
CC BY-SA 3.0
null
2010-10-05T17:16:14.733
2014-08-11T17:49:31.960
2014-08-11T17:49:31.960
3,126,646
313,207
[ "iphone", "objective-c", "ios", "mapkit" ]
3,866,164
1
8,235,077
null
2
475
In Windows Vista/7's windows explorer, the Icon Size selector has got a [track bar](http://msdn.microsoft.com/en-us/library/system.windows.forms.trackbar.aspx) in the [DropDownMenu](http://msdn.microsoft.com/en-us/library/system.windows.forms.toolstripdropdownmenu.aspx) (see Fig. 1) ![Vista DropDownMenu with TrackBar](https://i.stack.imgur.com/5lWXw.png) Does anyone know where I can get a similar UserControl or show me how to replicate it in .NET? If anyone's wondering where the image came from, I captured it from Windows Vista's Windows Explorer when I clicked on the Views Button. I realised that Trilian 5 beta also has something similar. I'll try to get a screenshot of it soon enough.
Vista Style DropDownMenu with TrackBar
CC BY-SA 2.5
0
2010-10-05T17:34:09.620
2011-11-22T22:54:40.297
2010-10-06T10:20:57.010
117,870
117,870
[ "c#", "vb.net", "custom-controls", "drop-down-menu" ]
3,866,182
1
3,866,235
null
7
8,444
I need to place a button immediately above a dynamically populated UIViewTable. It feels right to not populate the first cell (row 0), but rather utilize the header area, so I use the UITableViewDelegate method to programmatically create a UIView containing a UIButton: ``` - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UIView *headerView = [[[UIView alloc] initWithFrame:CGRectMake(0,0, 320, 44)] autorelease]; // x,y,width,height UIButton *reportButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; reportButton.frame = CGRectMake(80.0, 0, 160.0, 40.0); // x,y,width,height [reportButton setTitle:@"rep" forState:UIControlStateNormal]; [reportButton addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchDown]; [headerView addSubview:reportButton]; return headerView; } ``` However, as depicted below, the button is not given the necessary space (I expected the height of the header to adhere to the 44 argument). What is wrong here? I should add that the UITableView is created in a separate XIB-file. ![alt text](https://i.stack.imgur.com/kQVX5.png)
Adding a UIButton in the header of UITableView header
CC BY-SA 2.5
0
2010-10-05T17:35:57.400
2010-10-05T17:42:45.320
null
null
156,395
[ "iphone", "uitableview" ]
3,866,741
1
null
null
0
284
I Have a specific set of HTTP response headers I'm trying to recreate in ASP.NET. Here is how it looks in Fiddler (Raw): ``` HTTP/1.1 200 OK Content-Length: 570746 Content-Type: audio/wav Last-Modified: Wed, 19 May 2010 00:44:38 GMT Accept-Ranges: bytes ETag: "379d676ecf6ca1:3178" Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Date: Tue, 05 Oct 2010 18:35:18 GMT ``` Here is how it looks on the Headers tab (same data. Different view) ![Fiddler Response Header View](https://i.stack.imgur.com/X90q6.png) I am trying to recreate the same set of headers (different values of course) with code, on an ASP.NET page. The biggest problem is with the cache settings and the ETag. It usually shows some "private" or similar cache setting and no ETag value, even though I'm trying to set it explicitly with ``` Response.Cache.SetETag ```
How to emulate specific HTTP Headers with ASP.NET
CC BY-SA 2.5
0
2010-10-05T18:47:10.403
2010-10-05T19:00:29.517
null
null
1,363
[ "asp.net", "http-headers" ]
3,866,766
1
3,866,820
null
30
51,753
I'm starting to develop a simple application for iOS, and this application is a simple gallery of some photo (taken from a website). The first problem I encountered is how to create the view for the gallery. The view should be something like this (or the Photo App): ![Sample View](https://i.stack.imgur.com/cb5y1.png) however doing a view this way is problematic, first because it uses fixed dimension, and I think is a bit difficult to implement (for me). The other way is to use a custom cell within a tableview, like this: ![custom cell](https://i.stack.imgur.com/RVGxg.png) but it is still using fixed dimension. What's the best way to create a gallery, without using any third part lib (like Three20)? Thanks for any reply :) PS. I think that using fixed dimension is bad because of the new iphone 4 (with a different resolution), am I right?
How To Create A Gallery on iOS
CC BY-SA 2.5
0
2010-10-05T18:50:14.997
2014-02-24T17:42:14.127
null
null
169,274
[ "iphone", "objective-c", "ios" ]
3,866,906
1
3,867,306
null
16
26,808
I was successfully able to remove read only attribute on a file using the following code snippet: In main.cs ``` FileSystemInfo[] sqlParentFileSystemInfo = dirInfo.GetFileSystemInfos(); foreach (var childFolderOrFile in sqlParentFileSystemInfo) { RemoveReadOnlyFlag(childFolderOrFile); } private static void RemoveReadOnlyFlag(FileSystemInfo fileSystemInfo) { fileSystemInfo.Attributes = FileAttributes.Normal; var di = fileSystemInfo as DirectoryInfo; if (di != null) { foreach (var dirInfo in di.GetFileSystemInfos()) RemoveReadOnlyFlag(dirInfo); } } ``` Unfortunately, this doesn't work on the folders. After running the code, when I go to the folder, right click and do properties, here's what I see: ![alt text](https://i.stack.imgur.com/63CBg.gif) The read only flag is still checked although it removed it from files underneath it. This causes a process to fail deleting this folder. When I manually remove the flag and rerun the process (a bat file), it's able to delete the file (so I know this is not an issue with the bat file) How do I remove this flag in C#?
Removing read only attribute on a directory using C#
CC BY-SA 3.0
null
2010-10-05T19:16:21.997
2017-08-18T20:48:04.543
2017-08-18T20:48:04.543
5,099,801
62,245
[ "c#", ".net", ".net-3.5", "c#-4.0" ]
3,867,353
1
3,867,412
null
1
962
I have a process which I break into multiple processes and even when using threading it takes a very long time to complete. I'd like to give the user an indication of the status of the execution in a cute way (for each process % complete). Maybe betting on the right horse will ease the pain :) I found this project long ago: [A Guided Tour of WPF (XAML)](http://www.codeproject.com/KB/WPF/GuidedTourWPF_1.aspx) I have two questions: 1. This article was written in 2007. Is there better way to achieve this graphic effect? 2. I have not understood yet, how the application is started, so I'd like to know if I can integrate such "window" in my window application? Adam Robinson pointed out that the second question is not clear: The application generates a window as in the picture below - I like to know if it possible to insert it in my "normal" windows application. ![Alt text](https://i.stack.imgur.com/M0DF4.jpg)
Is WPF still relevant and can I use it in my C# windows application?
CC BY-SA 3.0
null
2010-10-05T20:15:08.923
2016-01-16T23:36:38.320
2016-01-16T23:36:38.320
63,550
382,588
[ "c#", ".net", "wpf", "windows" ]
3,867,700
1
4,020,161
null
3
452
![alt text](https://i.stack.imgur.com/rfKYh.png)On this page [http://cacrochester.com/](http://cacrochester.com/) the 2 rotating images are messed up in webkit browsers. It's not all the time, and it's usually not on the first image. Why is that? I'm using the NivoSlider jquery plugin to rotate the images. here's what i'm seeing.
Images are messed up in webkit
CC BY-SA 2.5
null
2010-10-05T21:02:55.327
2010-10-26T01:59:41.420
2010-10-12T18:57:56.263
176,769
222,403
[ "jquery", "html", "css", "webkit", "image-rotation" ]
3,867,767
1
3,872,372
null
4
509
I have a datagrid based selection control that duplicates the Easing Function selector in Expression Blend. This is for the [Easing Function project](http://www.easing.co) so you will also be helping yourself :) This selector is a permanent fixture on the screen, to make it easy to try out options, while still looking enough like the options you normally select from a drop-down in Blend: ![alt text](https://i.stack.imgur.com/1VwyS.png) I need to stop the current cell moving into the last "Heading" column. Is there an easy way to restrict movement into columns so that only the first 3 columns are selectable?
How do you restrict selection of cells to exclude a column in a DataGrid?
CC BY-SA 2.5
0
2010-10-05T21:11:12.930
2010-11-05T16:22:23.450
2010-11-05T16:22:23.450
201,078
201,078
[ "silverlight", "datagrid", "silverlight-4.0" ]
3,867,937
1
4,054,281
null
3
676
I have a `UITableView` within a navigation controller shown within a popover. When you press a bar button from within the popover (on a detail view), it shows a modal view. If you rotate the iPad with the popover visible and the modal view on top of that, the popover's content changes to a seemingly random orientation as shown below. Any idea what's going on here? ![alt text](https://i.stack.imgur.com/BFVx9.png) I'm trying to implement a solution, maybe there's a better way. When the modal view is dismissed, I send an `NSNotification` from `- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error` to the popover's owner. When I press cancel, the button is visibly pressed but nothing happens after that and the screen becomes unresponsive. However, rotation still occurs properly. It would seem that I'm dismissing the popover before the modal view is dismissed. I don't really know any other way of doing this, you're continued help is appreciated.
Contents of UIPopover change to random orientation when Modal View is visible and iPad rotated
CC BY-SA 3.0
0
2010-10-05T21:35:17.777
2014-08-11T17:47:07.623
2014-08-11T17:47:07.623
3,126,646
273,130
[ "ipad", "uitableview", "ios", "uinavigationcontroller", "uipopovercontroller" ]
3,868,093
1
3,878,665
null
3
3,035
I have a with a Flow Layout, the is in a , the holds a bunch of other , inner panels, in it. All the inner panels have the same dimensions. If there are more panels then the can hold in its then they are gridded downwards, and if there are more panels then the can hold in its , then the inner panels are aligned in the same grid with the exception of the last row which is centered with the row before last. While I resize the dialog the extends and the layout flow layout perform its duty, but the scroll bars do not appear although the size of the panel exceeds the bounds of the . How do I control the appearance of the scroll bars when I resize the dynamically? as for the images, they should sum it up: ![alt text](https://i.stack.imgur.com/n1t68.png) ![alt text](https://i.stack.imgur.com/NHh23.png) Adam
Resizing panel with flow layout does not invoke the scroll bars
CC BY-SA 2.5
0
2010-10-05T21:58:33.120
2010-10-07T04:26:34.480
2010-10-06T09:44:12.087
348,189
348,189
[ "swing", "jscrollpane", "java", "flowlayout" ]
3,868,350
1
3,868,468
null
2
1,524
My problem is that I don't see a icon when I look for my app in iTunes. I am not sure why? I am creating IPA files. I include an image called iTunesArtwork.png. Any help appreciated. This is what i am seeing in iTunes. Notice no image for iCreditCard. Why can't I see my icon? (See iCreditCard app with empty image) ![alt text](https://i.stack.imgur.com/cXjt8.png) This is the contents of the IPA folder. ![alt text](https://i.stack.imgur.com/EDZ1x.png)
iPhone SDK: iTunes Artwork Not Showing
CC BY-SA 2.5
0
2010-10-05T22:50:08.707
2010-10-05T23:34:30.020
2010-10-05T23:22:16.617
107,004
352,285
[ "iphone" ]
3,868,565
1
3,868,961
null
0
9,273
I am new to jQuery and am having a problem selecting an item in a select list. I have implemented cascading select boxes as show in this [post](http://jsatt.blogspot.com/2010/01/cascading-select-boxes-using-jquery.html). Everything is working fine except for setting a default. The problem is that I need to select one of the child items when the page is first loaded. Code: ``` <script type="text/javascript"> function cascadeSelect(parent, child, childVal) { var childOptions = child.find('option:not(.static)'); child.data('options', childOptions); parent.change(function () { childOptions.remove(); child .append(child.data('options').filter('.sub_' + this.value)) .change(); }) childOptions.not('.static, .sub_' + parent.val()).remove(); if (childVal != '') { child.find("option[value=" + childVal + "]").attr("selected", "selected"); } } $(function () { cascadeForm = $('.cascadeTest'); parentSelect = cascadeForm.find('.parent'); childSelect = cascadeForm.find('.child'); cascadeSelect(parentSelect, childSelect, "5"); }); </script> ``` HTML: ``` <select class='parent' name='parent' size='10'> <option value='1'>Category 1 -></option> <option value='2'>Category 2 -></option> </select> <select class='child' id='child' size='10'> <option class='sub_1' value='5'>Custom Subcategory 1.1</option> <option class='sub_1' value='3'>Subcategory 1.1</option> <option class='sub_2' value='4'>Subcategory 2.1</option> </select> ``` The second select list should show up inside the right box but it does not. ![alt text](https://i.stack.imgur.com/ehz8l.jpg) The child.find call is being hit but does not select the item. What am I doing wrong?
jQuery and selecting a select list item
CC BY-SA 2.5
null
2010-10-05T23:39:22.160
2010-10-07T17:12:09.523
2010-10-07T16:15:49.273
131,818
131,818
[ "jquery" ]
3,868,727
1
3,873,738
null
1
663
I'm starting to put together an activation dialog as part of my application. I like the way Microsoft did theirs recently with Windows 7, more specifically the way the hyphens that separate each quintet of the product key are added and removed automatically. After taking a quick look at it, it seems like it's a bit more difficult to implement smoothly than I had first though. That or I've been starring at the issue for too long. Is there any sample code or tutorial that reproduces this behavior for a TextBox? ![alt text](https://i.stack.imgur.com/012vE.png)
Reproduce Windows Product Key Input
CC BY-SA 2.5
0
2010-10-06T00:25:16.060
2010-10-06T14:46:07.263
null
null
5,473
[ ".net" ]
3,868,833
1
4,209,045
null
2
368
I'm using Sphinx to search MySQL. One of the results Sphinx returns for a search is `M*A*S*H`, as in the hit television show. ![alt text](https://i.stack.imgur.com/DGja7.jpg) The problem I'm facing is that `M*A*S*H` is returned for nearly any query made with Sphinx. If not, then what could the problem be? `M*A*S*H`
Dealing with asterisks in Sphinx results
CC BY-SA 2.5
0
2010-10-06T00:54:42.370
2011-09-05T17:27:02.267
null
null
373,496
[ "mysql", "search", "search-engine", "sphinx" ]
3,868,907
1
3,869,270
null
12
8,824
I am populating the ComboBox items with a list using the Click event. When it is already populated the MaxDropDownItems is not working. Does anyone know how to fix this one? Here's the code: ``` List<string> list = new List<string>(); ComboBox cb; private void button1_Click(object sender, EventArgs e) { cb = new ComboBox(); cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; cb.FlatStyle = System.Windows.Forms.FlatStyle.Popup; cb.FormattingEnabled = true; cb.Size = new System.Drawing.Size(94, 21); cb.MaxDropDownItems = 5; cb.Click +=new EventHandler(cb_Click); this.Controls.Add(cb); } private void cb_Click(object sender, EventArgs e) { foreach (string str in list) { cb.Items.Add(str); } } private void Form1_Load(object sender, EventArgs e) { list.Add("1");list.Add("2");list.Add("3"); list.Add("4");list.Add("5");list.Add("6"); list.Add("7"); } ``` MaxDropDownItems is set to 5 so the combobox should atleast show 5 items only: ![alt text](https://i.stack.imgur.com/igYU1.jpg)
ComboBox.MaxDopDownItems is not working when adding items using the Click event
CC BY-SA 2.5
0
2010-10-06T01:19:29.360
2010-10-06T03:37:29.517
null
null
416,801
[ "c#", "winforms", "combobox", "onclick" ]
3,868,919
1
3,868,989
null
0
193
i'm struggling with display/hide text using javascript here. Here is what i wanted to achieve like the picture below: ![alt text](https://i.stack.imgur.com/lRcwh.jpg) and the below is my javascript i've got: ``` function change_display(display) { if(display.style.display=="none") { display.style.display=""; } else { display.style.display="none"; } } ``` Html ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="Style_sheet.css" rel="stylesheet" type="text/css" /> <script src="Display text.js" type="text/javascript"></script> </head> <body onload="change_display(display)"> <div class="Body"> <div class="header"> <h1 id="head">Manage Components</h1> <h3 id="select-system">Select System</h3> </div> <div class="side-nav"> <a href="javascript:change_display(display)">192.101 English A</a> <div id="display"><a href="javascript:change_display(display)">&nbsp;&nbsp;Section 1:</a></div> <div id="display">&nbsp;&nbsp;&nbsp;&nbsp;Topic 1:</div> </div> </div> </body> </html> ``` What i've got there doesn't work. I don't know how to get it to work Although, i could display as text 1 but if i want to keep click and display downward, it won't work. Oh also, i want use css style with it as well, is there anyway i could do? cos i already use ID for javascript therefore, i can't use ID again for css. I've tried to use "name" but doesn't work at all. Please help! Thanks in advance!
side navigation bar javascript help!
CC BY-SA 2.5
null
2010-10-06T01:24:28.600
2010-10-06T01:45:53.437
null
null
324,753
[ "javascript" ]
3,868,933
1
3,868,956
null
1
1,984
I'm trying to make a data form in Silverlight 4. Perhaps I'm doing something wrong. The class: ``` public class ExpenseInfoTest { public int MyProperty { get; set; } public int Foo { get; set; } public int Bar { get; set; } } ``` XAML: ``` <local:ExpenseInfoTest x:Key="newExpense"/> <df:DataForm Height="218" HorizontalAlignment="Left" Margin="13,368,0,0" Name="expenseDataForm" VerticalAlignment="Top" Width="590" CurrentItem="{StaticResource newExpense}" /> ``` What is displayed: ![Just the fields without the save and edit buttons](https://i.stack.imgur.com/we1ad.png) I'd like the "Save" button. How can I get it to appear? Is something wrong in my XAML or data class?
Silverlight Dataform: "Save" and "Edit" buttons not showing up
CC BY-SA 2.5
null
2010-10-06T01:30:13.720
2010-10-06T01:45:01.567
null
null
147,601
[ "c#", "silverlight", "xaml", "dataform" ]
3,869,261
1
3,892,135
null
3
373
I have a database table that holds parent and child records much like a Categories table. The ParentID field of this table holds the ID of that record's parent record... My table columns are: SectionID, Title, Number, ParentID, Active I only plan to allow my parent to child relationship go two levels deep. So I have a section and a sub section and that it. I need to output this data into my MVC view page in an outline fashion like so... 1. Section 1 Sub-Section 1 of 1 Sub-Section 2 of 1 Sub-Section 3 of 1 2. Section 2 Sub-Section 1 of 2 Sub-Section 2 of 2 Sub-Section 3 of 2 3. Section 3 I am using Entity Framework 4.0 and MVC 2.0 and have never tried something like this with LINQ. I have a FK set up on the section table mapping the ParentID back to the SectionID hoping EF would create a complex "Section" type with the Sub-Sections as a property of type list of Sections but maybe I did not set things up correctly. So I am guessing I can still get the end result using a LINQ query. Can someone point me to some sample code that could provide a solution or possibly a hint in the right direction? ![alt text](https://i.stack.imgur.com/ZCrfR.jpg) Update: I was able to straighten out my EDMX so that I can get the sub-sections for each section as a property of type list, but now I realize I need to sort the related entities. ``` var sections = from section in dataContext.Sections where section.Active == true && section.ParentID == 0 orderby section.Number select new Section { SectionID = section.SectionID, Title = section.Title, Number = section.Number, ParentID = section.ParentID, Timestamp = section.Timestamp, Active = section.Active, Children = section.Children.OrderBy(c => c.Number) }; ``` produces the following error. Cannot implicitly convert type 'System.Linq.IOrderedEnumerable' to 'System.Data.Objects.DataClasses.EntityCollection'
LINQ Grouping help
CC BY-SA 2.5
0
2010-10-06T03:09:55.680
2010-10-08T18:09:35.783
2010-10-08T18:09:35.783
202,820
202,820
[ "linq" ]
3,869,436
1
null
null
1
1,168
I have this scipt, ``` <script> $(document).ready( function() { $('.add').button({ icons: 'ui-icon-plus', text: false }).next().button({ icons: 'ui-icon-minus', text: false }).next().button({ icons: 'ui-icon-arrowthick-1-w', text: false }).next().button({ icons: 'ui-icon-arrowthick-1-e', text: false }); $('.radio-container').buttonset(); }); </script> <button class="add">Add</button> <button class="delete">Delete</button> <button class="left">Left</button> <button class="right">Right</button> <span class="radio-container"> <input type="Radio" name="radio" id="radio_1"><label for="radio_1">Radio 1</label> <input type="Radio" name="radio" id="radio_2"><label for="radio_2">Radio 2</label> </span> ``` It works fine with Firefox but failed with Internet Explorer (tested with Internet Explorer 8), shifted down like this: ![alt text](https://i.stack.imgur.com/2YRuD.jpg) How do I fix it? I use jQuery 1.4.2 and jQuery UI 1.8.5.
jQuery UI buttonset shift down in Internet Explorer 8
CC BY-SA 3.0
null
2010-10-06T04:07:57.330
2011-10-18T16:45:50.350
2011-10-18T16:08:48.013
63,550
218,380
[ "jquery-ui", "radio-button" ]
3,869,959
1
3,870,193
null
2
1,089
Actually I have Multiple update panels on page, which update different values on server but the problem is that I have textbox to which I attach javascript class for datepicker on Load event. But There are other updatepanels before that date TextBox, when I update them first calender image with date control which is in updatepanel disappears. or it remove the calender which is next to the textbox. ``` txtDate.Attributes.Add("class", "show-week w16em dateformat-d-sl-m-sl-Y"); ``` Before using any updatepanel its like this ![alt text](https://i.stack.imgur.com/D3x3Q.png) After we upfdate any updatepanel control its like this. ![alt text](https://i.stack.imgur.com/IUjq1.png) But the Date controls which are not in any updatepanel are ok and working. And in these updatepanels I actually saving values in DataTables and save these DataTables in viewState .... no change in HTML.
Multiple updatepanels on page remove JavaScript Datepicker calender from textbox
CC BY-SA 2.5
null
2010-10-06T06:23:24.723
2010-12-06T21:56:01.443
2020-06-20T09:12:55.060
-1
228,755
[ "javascript", "asp.net", "ajax", "updatepanel", "datepicker" ]