Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
4,583,397
1
4,669,997
null
0
3,969
I started a JSF project and included primefaces. But I have problems with the style. It doesn't look that nice than in the official showcase. But I have no idea why. That's what I did so far: 1. I downloaded a style and extracted it into my project. 2. I added <link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/flick/skin.css" /> to my facelets template 3. I extended my web.xml with the following: `<context-param> <param-name>primefaces.skin</param-name> <param-value>none</param-value> </context-param>` Unfortunately it loks like that: ![alt text](https://i.stack.imgur.com/y3HJ6.jpg) fyi: That's a prime panel and a prime button :-/ can you pls help me :-) cheers --- Update: Whatsoever I change in context-param. it doesn't work! Do you need more information to help me solve that problem? Thank you for help..
Primefaces Style Doens't work correctly
CC BY-SA 2.5
null
2011-01-03T09:34:59.747
2011-01-12T14:38:45.953
2011-01-04T13:04:36.793
389,430
389,430
[ "jsf", "primefaces" ]
4,583,471
1
null
null
2
593
What does this icon mean? ![Document icon with two plus signs in the status bar](https://i.stack.imgur.com/vyyzH.jpg) After some coding, this icon appeared in the status bar and the IDE was frozen.itself. I cannot manage anymore with this icon is appeared.
What could be causing the Visual Studio 2010 IDE to freeze?
CC BY-SA 2.5
null
2011-01-03T09:49:05.813
2011-01-03T10:29:18.323
2011-01-03T10:01:13.770
366,904
449,306
[ "visual-studio", "visual-studio-2010" ]
4,583,680
1
4,583,773
null
1
1,690
Can you tell me where I can see a some opensource project (only project on C++ language), which is simple graphic editor, сontaining following primitive (for example): an ellipse, a rectangle, a line. And desirable, that to be able to group this primitive in one primitive (for example, Word Grouping -> Group). Composite pattern use is desirable in this project. I want to see how to organize classes, but more serious for me is to see how organize grouping operation. I searched for it on codeproject.com codeproject.com, codeplex.com, but not found this. I have already some source [http://pastebin.com/xe4JF5PW](http://pastebin.com/xe4JF5PW) But in my opinion, this code is dirty and ugly. Therefore, I want to see some opensource project for example. Thanks! ![alt text](https://i.stack.imgur.com/YEbgH.png)
Graphic editor opensource project example on c++ underlying composite pattern
CC BY-SA 2.5
0
2011-01-03T10:25:58.947
2011-01-03T14:06:59.217
2011-01-03T13:33:34.953
490,908
490,908
[ "c++", "oop", "open-source", "design-patterns" ]
4,583,779
1
null
null
0
1,588
I want use three images to make a background:![alt text](https://i.stack.imgur.com/7Dx2w.png) ![alt text](https://i.stack.imgur.com/Rg9cv.png) ![alt text](https://i.stack.imgur.com/Qk05P.png) As well I want use CSS3 background-clip or background-origin property,to use multiple images here is my css code: ``` .border { background:url("fancy_title_main.png"),url("fancy_title_left.png"),url("fancy_title_right.png"); background-repeat:repeat-x,no-repeat,no-repeat; background-position:center,left,right; background-clip: content,border,border; background-origin:content,border,border; -moz-background-clip: content,border,border; -moz-background-origin: content,border,border; -webkit-background-clip: content,border,border; -webkit-background-origin:content,border,border; border-width:0 15px; border-style:solid; width:80px; height:32px; } ``` however,it doesn't work,on firefox 3.6.6:![alt text](https://i.stack.imgur.com/SMPu5.png) in the firebug:![alt text](https://i.stack.imgur.com/2jL6z.png) In my css ,I set the `-moz-background-clip: content,border,border;` but it show `-moz-background-clip:border, border, border;`Why? How can I make the background like I wanted?What's wrong with my CSS code? Thank you
Why the CSS3 background-clip or background-origin doesn't work? What's wrong with my code?
CC BY-SA 3.0
null
2011-01-03T10:44:57.403
2014-01-13T09:35:55.897
2014-01-13T09:35:55.897
1,986,505
508,236
[ "css", "background-image" ]
4,583,802
1
4,583,937
null
3
5,289
I am on a mac running firefox. I have a website and the select dropdown box has a funny style: ![alt text](https://i.stack.imgur.com/98HwW.png) When I look at other websites in the same browser they look different: ![alt text](https://i.stack.imgur.com/4T4fG.png) Or even at my code here: [jsFiddle](http://jsfiddle.net/2eD9V/) What could possibly be causing my website to display how it is because as I understand it you have very little control over how select boxes are displayed? Thanks
How to style select drop down?
CC BY-SA 2.5
null
2011-01-03T10:48:47.360
2011-01-03T11:40:42.077
2011-01-03T10:53:55.253
437,806
437,806
[ "html", "macos", "firefox" ]
4,583,830
1
null
null
0
391
I have a list view with difference item layouts. First I inflated the view and store it memory. When the list view get the child view (from getChildView function)) I will return the in-memory object. Everything seems ok except when I scroll the list, the view is shrink to 2/3 original size and after that it become bigger (fullsize). I hope that is an animation of android OS but still not found the solution now. The reason why I need to load it from memory is the inflate function take a lot of time (~100 miliseconds on HTC desire) and make the scrolling does not smooth (lag) Have you meet this? I tested on android version: 2.0 and 2.2 ![alt text](https://i.stack.imgur.com/lzcJW.png)
Android - View be shrink when load from memory
CC BY-SA 2.5
null
2011-01-03T10:52:18.477
2011-01-03T11:37:44.447
null
null
364,210
[ "android" ]
4,584,124
1
null
null
0
837
I have never seen this type of `EditText`, `Toggle Button` and `Bottom Bar Button` used by Opera Mobile / Mini in other applications on Android. I want to know which GUI framework they have used to build such a great cross platform UI application?. Is there any open source framework available for this or they have used their own proprietary. Also I want to know how can we develop such a great user interface based applications?. ![alt text](https://i.stack.imgur.com/adl4W.jpg)
GUI Framework Used in Opera Mobile/Mini Android Application
CC BY-SA 2.5
null
2011-01-03T11:40:59.180
2011-01-04T05:25:15.807
2011-01-04T05:25:15.807
null
null
[ "android", "user-interface", "frameworks", "opera" ]
4,584,281
1
4,584,762
null
2
1,281
I am showing UIMenuController while a table cell is long pressed. I am using the code below. ``` - (void)onCellLongPressed:(UILongPressGestureRecognizer *)recognizer { if (recognizer.state == UIGestureRecognizerStateRecognized) { ContactTableViewCell *cell = (ContactTableViewCell *)recognizer.view; [cell becomeFirstResponder]; UIMenuItem *item1 = [[UIMenuItem alloc] initWithTitle:@"ME" action:@selector(setMe)]; UIMenuItem *item2 = [[UIMenuItem alloc] initWithTitle:@"YOU" action:@selector(setYou)]; [theMenu setMenuItems:[NSArray arrayWithObjects:item1, item2, nil]]; UIMenuController *theMenu = [UIMenuController sharedMenuController]; [theMenu setTargetRect:[cell frame] inView:[self tableView]]; [theMenu setMenuVisible:YES animated:YES]; } } ``` My problem is, When I long press a cell, menu pops up with all the default menu items. My menu items "SAVE" and "DELETE" are not showing when the menu pops up. They are showing when I select the "more" menu. I posted the screen shots below. : Menu that pops up when I long press a cell. ![alt text](https://i.stack.imgur.com/lCBsE.png) : Menu when I press the "more" menu item in SCREEN SHOT 1. ![alt text](https://i.stack.imgur.com/tJQyo.png) I want the menu in SCREEN SHOT 2 to open when I long press a cell. 1. What wrong am I doing here? 2. What am I missing here? 3. What I should do to make it work?
Why my UIMenuItems are showing in the 'more' section of UIMenuController?
CC BY-SA 3.0
null
2011-01-03T12:09:32.370
2011-12-01T04:05:12.513
2011-12-01T04:05:12.513
491,980
491,980
[ "iphone", "objective-c", "ios" ]
4,584,469
1
null
null
2
1,919
I have some buttons on popover title bar, they are in dark color, so that I want to the popover title bar color can be changed to the same as Navigation Bar color, what can I do? You will see the gray title bar in popover, how can I do it? ![alt text](https://i.stack.imgur.com/vPWK6.jpg) ![alt text](https://i.stack.imgur.com/alCXI.jpg)
How can I set popover title bar color to the same as default navigationBar?
CC BY-SA 3.0
null
2011-01-03T12:36:06.220
2011-08-31T05:20:47.430
2011-08-31T05:20:47.430
50,049
424,957
[ "ipad", "uikit", "uinavigationbar", "uipopovercontroller", "uicolor" ]
4,584,571
1
4,584,585
null
1
1,196
I am using JQuery plugin qtip for displaying tooltip in asp.net application. Here is my code: ``` $("ul li").css("width","90px"); $('ul li').each(function(){ $(this).qtip({ content: $(this).attr("title"), show: 'mouseover', hide: 'mouseout', position:{ corner:{ target:'topRight', tooltip: 'bottomLeft' } }, style:{ width:150, padding:5, background: '#A2D959', color: 'black', textAlign: 'left', border: { width: 0, radius: 7, color: '#A2D959' }, tip: 'bottomLeft', name: 'dark' } }) }); <ul> <br /> <li title="This is Item no. 1"><a>menu item111</a><br /> <li title="This is Item no. 2"><a>menu item2222</a><br /> <li title="This is Item no. 3"><a>menu item3333</a><br /> </ul> <ul> <br /> <li title="This is Item no. 4"><a>menu item4444</a><br /> <li title="This is Item no. 5"><a>menu item5555</a><br /> <li title="This is Item no. 6"><a>menu item6666</a><br /> </ul> ``` If i move cursor over any li then both qtip tooltip and inbuilt html tooltip are displaying but i only want to display qtip tooltip.How can i do that. You can also get help from given image. ![alt text](https://i.stack.imgur.com/aHoLt.png) Thanks
Jquery plugin qtip help
CC BY-SA 2.5
0
2011-01-03T12:53:28.113
2011-01-03T13:00:55.520
null
null
503,125
[ "jquery", "jquery-ui", "jquery-plugins", "qtip" ]
4,584,592
1
4,585,581
null
2
2,087
I have a dynamic link displayed inside an input tag. How can I make the input tag resize to take the width of the link? ![alt text](https://i.stack.imgur.com/BMIrQ.png) Thanks
how to dynamically resize input tag
CC BY-SA 2.5
null
2011-01-03T12:57:12.097
2011-01-03T15:08:47.460
null
null
225,814
[ "html", "input", "css" ]
4,584,672
1
4,584,823
null
0
333
In reference to the attached screenshot: ![alt text](https://i.stack.imgur.com/LLIeQ.jpg) I want the position of the wrapper with the grey background to have a fixed width so that it aligns with the width of the pagination element above it. Right now the width depends on the size of the children elements (the text or the text field). In general, how would you accomplish this?
CSS: Fixed Position of Parent Element
CC BY-SA 2.5
null
2011-01-03T13:08:07.780
2011-01-03T13:26:27.837
null
null
251,257
[ "css", "wrapper", "css-position" ]
4,584,702
1
4,584,781
null
0
882
I'm trying to create something that would have the looks of a tabbed interface in JSF 2.0. I can use myfaces and richfaces (either, neither or both) to do this. I've done something similar in jsf 1.2 with backing bean code that actually removed the panel contents and replaced it with the current selection but I think there has to be a better way to do it. The general looks should be something like this: ![alt text](https://i.stack.imgur.com/zFWrp.png) The Question - What's the best method of changing the central panel's contents according to the panel button that was pushed. Thanks!
How to create changing content in JSF 2.0 Panel
CC BY-SA 2.5
null
2011-01-03T13:12:33.340
2011-01-03T13:21:03.690
null
null
128,076
[ "jsf-2" ]
4,584,783
1
4,584,800
null
2
737
I have an issue where when the user inputs text into the textfield, the JavaScript that dynamically displays and writes how many chars he/she has left keeps pushing the wrapper that contains the button/links elements down a certain number of units. I want the button wrapper to stay fixed and not move when the JavaScript does it's thing. The screenshots below illustrate what is happening. ![alt text](https://i.stack.imgur.com/7EjL6.jpg) ![alt text](https://i.stack.imgur.com/NuqAx.jpg) Any general suggestions as to how you prevent this?
CSS: Element Being Pushed Down
CC BY-SA 2.5
null
2011-01-03T13:21:14.170
2011-01-03T13:53:52.073
null
null
251,257
[ "css", "positioning" ]
4,584,917
1
4,584,959
null
0
216
I have a website at [bgflirt.com](http://bgflirt.com) that appears differently in FireFox and Chrome. This is how it looks in firefox: ![ffdisplay](https://i.stack.imgur.com/0ewuT.jpg) and here's how it looks in chrome:![chdisplay](https://i.stack.imgur.com/JWwCN.jpg) As you can see, in chrome (and safari) the page is not stretched to fit the entire screen. I'm using this code for positioning the div containing the flash on the right: ``` <div style="width: 200px; position: absolute; right: 0px; top: 10px; overflow: hidden;"> </div> ``` The page should look the way it does in firefox, in all browsers. Any ideas on how to fix this will be greatly appreciated !
DIV appear differently in chrome only
CC BY-SA 2.5
null
2011-01-03T13:41:42.953
2011-01-03T13:55:06.673
null
null
259,989
[ "html", "css" ]
4,584,963
1
null
null
43
54,598
I have the following file: ![alt text](https://i.stack.imgur.com/TUvqH.png) I read it in by over every cell and getting the value with `getCell(...)->getValue()`: ``` $highestColumnAsLetters = $this->objPHPExcel->setActiveSheetIndex(0)->getHighestColumn(); //e.g. 'AK' $highestRowNumber = $this->objPHPExcel->setActiveSheetIndex(0)->getHighestRow(); $highestColumnAsLetters++; for ($row = 1; $row < $highestRowNumber + 1; $row++) { $dataset = array(); for ($columnAsLetters = 'A'; $columnAsLetters != $highestColumnAsLetters; $columnAsLetters++) { $dataset[] = $this->objPHPExcel->setActiveSheetIndex(0)->getCell($columnAsLetters.$row)->getValue(); if ($row == 1) { $this->column_names[] = $columnAsLetters; } } $this->datasets[] = $dataset; } ``` However, although it reads in the data fine, it reads in the calculations : ![alt text](https://i.stack.imgur.com/4F8CO.png) I understand from discussions [like this one](http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=219330) that I can use `getCalculatedValue()` for calculated cells. The problem is that in the Excel sheets I am importing, I do not know beforehand which cells are calculated and which are not. # Answer: It turns out that `getCalculatedValue()` works for all cells, makes me wonder why this isn't the default for `getValue()` since I would think one would usually want the value of the calculations instead of the equations themselves, in any case this works: ``` ...->getCell($columnAsLetters.$row)->getCalculatedValue(); ``` ![alt text](https://i.stack.imgur.com/gdSeU.png)
How to automatically read in calculated values with PHPExcel?
CC BY-SA 2.5
0
2011-01-03T13:49:50.623
2022-10-06T12:28:56.190
2015-09-04T02:20:01.950
1,505,120
4,639
[ "php", "phpexcel" ]
4,585,841
1
null
null
0
2,490
Again, IE 7 and 8 CSS challenge. I have a background image uses to apply all the button background in web page. Here is a HTML code ``` <span class="primary-action message-post"><a href="/t5/forums/postpage/board-id/About" id="link_29" rel="nofollow" class="lia-button lia-button-primary"><span>New Message</span></a></span> ``` In the following is my CSS code: ``` #lia-body .lia-content .primary-action { overflow:visible; } #lia-body .lia-content .primary-action .lia-button-primary { background-image: url("/html/assets/buttons_tcm166-1588.png"); background-position: 100% 0; background-repeat: no-repeat; color: #FFFFFF; display: block; line-height: 20px; padding: 0 22px 1px 22px; white-space: nowrap; border: none; font-weight: bold; overflow:visible; } #lia-body .lia-content .primary-action .lia-button-primary:hover { background-image: url("/html/assets/buttons_tcm166-1588.png"); background-position: 100% -30px; background-repeat: no-repeat; color: #FFFFFF; display: block; line-height: 20px; padding: 0 22px 1px 22px; white-space: nowrap; border: none; font-weight: bold; } ``` In firefox and chrome i have the perfect output. ![alt text](https://i.stack.imgur.com/hqDe9.png) If we look at the IE 7 and IE8, it cuts off left part. ![alt text](https://i.stack.imgur.com/W1m3C.png) Any tips , thanks Regards, Qing
IE 7 and 8 background image position issue
CC BY-SA 2.5
null
2011-01-03T15:42:51.360
2011-01-03T16:56:55.650
null
null
204,698
[ "css", "internet-explorer-7" ]
4,585,875
1
4,585,956
null
3
13,955
How to check if a program is running now or not by its title ? (using vb6) Example : ``` 'check if there is a program contain a "Notepad" in its title if (does "Notepad" running now ?) then end if ``` ![alt text](https://i.stack.imgur.com/sSfFf.png)
How to check if a program is running now or not by its title ? (using vb6)
CC BY-SA 2.5
null
2011-01-03T15:46:40.573
2012-04-03T23:34:42.333
2012-04-03T23:34:42.333
3,043
423,903
[ "vb6", "process" ]
4,586,583
1
4,586,592
null
1
166
![alt text](https://i.stack.imgur.com/AWqK0.jpg) Hi Every One, Happy new year. I have one question to ask this big Stack Over Flow community. Could any one please suggest be the best way to perform or " test in .Net applications. Above , I copied from gmail while creating account(thanks to google). I'm planning to perform similar validation before creating the account in my .Net web Application. So, please suggest the best approach. Thanks in advance.
May I know the best way to test "Robot or Human" in .Net (In Web with C#.Net)
CC BY-SA 2.5
null
2011-01-03T17:13:06.147
2011-01-03T17:14:49.940
null
null
363,842
[ ".net", "validation" ]
4,587,296
1
7,891,296
null
0
333
I embedded a opentype font with @font-face. Works fine, but the bbox or descent (or baseline/descent line?) is wrong on certain browsers/OSs. The problem is e.g. on a Mac the bbox is not right, that means to center the text in it's bbox I have to set a padding to the paragraph. I guess the font was created on Windows and was not tested on Linux and OS X, and the font rendering engines in these OSs work diffrently. Any idea how to solve withs problem? Screenshot of the font in Windows, Linux and Mac. Form top to bottom: Ubuntu Firefox 3, Chromium, Windows XP Firefox 3/Chrome, Mac OS X Safari 5/Firefox 4 Beta 8. ![enter image description here](https://i.stack.imgur.com/CpUnr.png)
Wrong bbox or descent with @font-face and opentype font
CC BY-SA 3.0
0
2011-01-03T18:50:55.017
2011-10-25T14:58:23.783
2011-08-08T20:54:02.153
461,992
461,992
[ "css", "font-face", "opentype" ]
4,587,518
1
4,587,722
null
14
36,036
Good day. I decided to learn Java. I installed JDK and downloaded `eclipse-java-helios-SR1-win32` for windows 7. But i can't launch eclipse because i always receive the message: ``` Error: couldn't find Java SE Runtime Environment ``` I tried to reinstall the JDK but installer gave me such message: ``` Error 1723, There is a problem with this Windows Installer package. A DLL required for this install to complete couldn't be run." ``` At least here is information that eclipse gave to me: ``` Java was started but returned exit code=2 C:\Windows\system32\javaw.exe -Dosgi.requiredJavaVersion =1.5 -Xms40m -Xmx334m -XX:MaxPermSize=256m -jar C:\eclipse\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -os Win32 -ws Win32 -arch x86 -showsplash -launcher C:\eclipse\eclipse.exe -name Eclipse --launcher.library C:\eclipse\plugins/org.eclipse.equinox.Iauncher.win32.win32.x86_1.1.1.R36x_v2010 0810\eclipse_1309.dll -startup C:\eclipse\pIugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -exitdata 1760_50 -product org.eclipse.epp.package.java.product -vm C:\Windows\system32\javaw.exe -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx384m -XX:MaxPermSize=256m -jar C:\eclipse\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507jar ``` --- Here is a picture of the error. I suppose that i could make few mistakes in the log. ![alt text](https://i.stack.imgur.com/fihTi.jpg)
Eclipse's error on startup in windows 7
CC BY-SA 3.0
0
2011-01-03T19:17:34.747
2014-10-24T20:48:57.713
2013-06-06T09:11:46.860
561,626
561,626
[ "eclipse", "jvm" ]
4,587,642
1
4,587,670
null
8
27,146
I'm an average Visual Studio programmer. I need a function or routine to add text to the button of an image not on it like I showed in the image ![alt text](https://i.stack.imgur.com/8yC9m.png) Ideas please. [Edit] - - - -
how do i add text to image in c# or vb.net
CC BY-SA 4.0
0
2011-01-03T19:35:02.957
2022-01-23T10:33:35.607
2022-01-23T10:33:35.607
465,053
362,461
[ "c#", "image", "text" ]
4,587,794
1
4,587,898
null
18
1,748
I'm trying to plot two non-intersecting touching circles, but I think I'm missing something quite basic... ``` jpeg(file="test.jpg") diam <- sqrt (2) plot (c(-1,1), c(1,-1), xlim=c(-5,5), ylim=c(-5,5)) symbols (c(-1,1), c(1,-1), circles=c(diam,diam), add=TRUE, inches=FALSE) dev.off() ``` Can anyone explain to me why these circles overlap? ![alt text](https://i.stack.imgur.com/QKRbF.jpg)
Drawing non-intersecting circles
CC BY-SA 2.5
0
2011-01-03T19:53:00.420
2011-01-04T16:22:19.000
null
null
null
[ "r" ]
4,588,151
1
4,588,209
null
8
1,211
I've got two questions about Windows 7 task preview. In Delphi I'd like to create my own buttons inside the area highlighted in the screenshot below. 1) Is it possible to create my own controls in the task preview window (in Windows 7) like e.g. Winamp can do ? Or it's just some limited multimedia extension ? 2) If it's possible to draw there own buttons where should I start ? Example or Windows API guide-post would be helpful for me. ![alt text](https://i.stack.imgur.com/XEb0v.png) Thanks a lot in advance
How to create own control in Windows 7 Aero task preview?
CC BY-SA 2.5
0
2011-01-03T20:38:03.167
2011-01-04T11:37:42.370
2011-01-04T11:37:42.370
null
null
[ "windows", "delphi", "winapi", "taskbar", "aero" ]
4,588,370
1
4,588,416
null
3
1,841
I'm trying to create a button set up exactly like this: ![alt text](https://i.stack.imgur.com/tymbA.png) How would I do this? Can someone show me the code? Is there a way to "Group" UIButtons like this?
UIButton grouped Buttons
CC BY-SA 2.5
0
2011-01-03T21:06:56.720
2017-04-30T04:19:41.640
2017-04-30T04:19:41.640
1,905,949
412,082
[ "ios", "iphone", "uibutton" ]
4,588,689
1
4,589,101
null
0
2,425
I am trying to create a table view header with rounded corners but a gap is appearing on the top of the header view and I cannot get rid of it. See picture: ![alt text](https://i.stack.imgur.com/5Ta2l.png) this is the code I have for the header ``` #define HEADER_HEIGHT 35.0f - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { return HEADER_HEIGHT; } - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { if (tableView.tableHeaderView) { // header was already created... go away return tableView.tableHeaderView; } CGFloat width = 300.0f; CGRect rectArea = CGRectMake(10.0f, 5.0f, width, HEADER_HEIGHT); tableView.tableHeaderView = [[[UIView alloc] initWithFrame:rectArea] autorelease]; UIColor *orange = [UIColor colorWithRed:(255.0f/255.0f) green:(228.0f/255.0f) blue:0.0f alpha:1.0f]; [tableView.tableHeaderView setBackgroundColor:orange]; rectArea = CGRectMake(10.0f, 5.0f, width, HEADER_HEIGHT); UILabel *lbl = [[UILabel alloc] initWithFrame:rectArea]; lbl.text = NSLocalizedString(@"TGERAL", @""); lbl.textAlignment = UITextAlignmentLeft; lbl.font = [UIFont systemFontOfSize:13.0f]; lbl.textColor = [UIColor blackColor]; lbl.backgroundColor = [UIColor clearColor]; lbl.numberOfLines = 2.0f; lbl.lineBreakMode = UILineBreakModeWordWrap; //[lbl sizeToFit]; [tableView.tableHeaderView addSubview:lbl]; [lbl release]; self.tableView.tableHeaderView.layer.cornerRadius = 6.0f; return tableView.tableHeaderView; } ``` If I change HEADER_HEIGHT or I add a certain amount of pixels to the height of the tableHeaderView or to the label height, all that happens is an increase in the gap. Do you guys know what I am missing? thanks
iphone - table view header problem
CC BY-SA 2.5
null
2011-01-03T21:51:13.410
2011-01-03T23:17:52.977
null
null
316,469
[ "iphone" ]
4,589,021
1
4,621,712
null
0
2,903
I have in Softerra LDAP Administration something like the following: > server: blah.gov OU=Domain Controllers etc... ldap://.blah.gov I can't figure out how to, in C#, get those other ldap subdomain query strings. I'm not sure how else to explain it, so ask questions and I'll try to clarify. Updated: This is what Softerra LDAP Administrator looks like. The ldap queries near the bottom are not children of the above node, but somehow, the program knows about them and linked them in the GUI. If I could figure out how, that would fix my problem. ![Image and video hosting by TinyPic](https://i.stack.imgur.com/dDRm7.png)
Get other ldap query strings associated with a domain
CC BY-SA 4.0
null
2011-01-03T22:30:46.247
2019-08-08T05:09:32.963
2020-06-20T09:12:55.060
-1
447,729
[ "c#", "active-directory" ]
4,590,045
1
4,590,067
null
0
1,765
I'm trying to create a chess game board with 8x8 buttons. I'm using nested LinearLayouts. The problem is that there's a padding between each row of ImageViews that I can't get rid of. This is what I have sofar, the board should be square, but isn't: ![alt text](https://i.stack.imgur.com/KsHFO.jpg) ``` public class BoardLayout extends LinearLayout { public BoardLayout(Context context) { super(context); LinearLayout.LayoutParams parms = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, 1.0f); setLayoutParams(parms); setOrientation(LinearLayout.VERTICAL); setPadding(0, 0, 0, 0); for (int i = 0; i < 8; i++) { LinearLayout row = new LinearLayout(context); row.setLayoutParams(parms); row.setOrientation(LinearLayout.HORIZONTAL); row.setPadding(0, 0, 0, 0); for (int j = 0; j < 8; j++) { ImageView button = new ImageView(context); button.setLayoutParams(parms); button.setImageResource(R.drawable.icon); button.setAdjustViewBounds(true); button.setPadding(0, 0, 0, 0); row.addView(button); } addView(row); } setSquare(); } public void setSquare() { int size = Math.min(getWidth(), getHeight()); // setHeight(size); // Not Function, but this is what I need // setWidth(size); // Not Function, but this is what I need // also doesn't work setLayoutParams(new LinearLayout.LayoutParams(size, size, 1.0f)); } } ``` --- As suggested TableLayout is better for what I'm trying to do. So the main class should be changed to a TableLayout and the nested LinearLayouts to TableRows. But that alone didn't fix it, I also had to call the following in TableLayout: ``` setShrinkAllColumns(true); setStretchAllColumns(true); ``` and for each item inserted, I had to also call: ``` setAdjustViewBounds(true); ```
android: remove padding from linearlayout to create square layout
CC BY-SA 2.5
null
2011-01-04T01:55:54.340
2011-01-04T02:59:18.810
2011-01-04T02:59:18.810
397,706
397,706
[ "android", "layout" ]
4,590,072
1
4,590,628
null
0
564
Take a look at this scenario, I have two characters, one shoots two bullets on the direction of the other character, the bullets are fired instantly and travel at infinity speed, how to detect a collision? Here's an image to illustrate the problem: ![](https://i.stack.imgur.com/87sM0.png) The red bullet would clearly miss, but the green bullet would hit, how to perform this kind of collision test?
AS3 Bullet hitscan
CC BY-SA 2.5
null
2011-01-04T02:04:01.357
2011-01-04T04:22:58.190
null
null
null
[ "actionscript-3" ]
4,590,257
1
4,603,261
null
0
617
I'm trying to develop a firefox toolbar ;) so my structure is ![alt text](https://i.stack.imgur.com/wIN6v.jpg) In the options.xul is an PrefWindow which i'm opening over an ``` <toolbarbutton oncommand="esbTb_OpenPreferences()"/> function esbTb_OpenPreferences() { window.openDialog("chrome://Toolbar/content/options.xul", "einstellungen", "chrome,titlebar,toolbar,centerscreen,modal", this);} ``` so in my preferences i can set some checkboxes which indicates what links are presented in my toolbar. So when the preferences window is Closed or the "Ok" button is hitted I want to raise an event or an function which updates via DOM my toolbar. So this is the function which is called when the toolbar is loaded. It sets the links visibility of the toolbar. ``` function esbTB_LoadMenue() { var MenuItemNews = document.getElementById("esbTb_rss_reader"); var MenuItemEservice = document.getElementById("esbTb_estv"); if (!(prefManager.getBoolPref("extensions.esbtoolbar.ShowNews"))) { MenuItemNews.style.display = 'none'; } if (!(prefManager.getBoolPref("extensions.esbtoolbar.ShowEservice"))) { MenuItemEservice.style.display = 'none'; } } ``` So I tried some thinks like adding an eventlistener to the dialog which doesn't work... in the way I tried... And i also tried to hand over the window object from the root window( the toolbar) as an argument of the opendialog function changed the function to this. ``` function esbTB_LoadMenue(RootWindow) { var MenuItemNews = RootWindow.getElementById("esbTb_rss_reader"); var MenuItemEservice = RootWindow.getElementById("esbTb_estv");} ``` And then tried to Access the elements over the handover object, but this also not changed my toolbar at runtime. So what i'm trying to do is to change the visibile links in my toolbar during the runtime and I don't get it how I should do that... thanks in advance -------edit------- ``` var prefManager = { prefs: null, start: function() { this.prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService) .getBranch("extensions.esbtoolbar."); this.prefs.QueryInterface(Components.interfaces.nsIPrefBranch2); this.prefs.addObserver("", this, false); }, end: function() { this.prefs.removeObserver("", this); }, observe: function(subject, topic, data) { if (topic != "nsPref:changed") { return; } //Stuff what is done when Prefs have changed esbTB_LoadMenue(); }, SetBoolPref: function(pref,value) { this.prefs.setBoolPref(pref,value); }, GetBoolPref: function(pref) { this.prefs.getBoolPref(pref); } } ``` So this is my implementation.
FireFox Toolbar Prefwindow unload/acceptdialog Event to Update the toolbar
CC BY-SA 2.5
null
2011-01-04T02:49:59.917
2011-01-05T18:13:07.057
2011-01-05T18:13:07.057
424,226
424,226
[ "javascript", "events", "firefox-addon", "xul", "preferences" ]
4,590,643
1
4,610,910
null
4
4,527
I want to simulate this kind of rich text view: (From twitter for iPad)![alt text](https://i.stack.imgur.com/LcTJu.png) Only the text with the button on the link. ;) How can I place a button on the link? or make the link look as cool as this? I would like to have this kind of view but I have to be able to select text even id the view is not in editing mode (this is not possible in Twitter app), but when editing it it does not have to be that fancy. A simple UITextView should be enough. Any ideas how can I achieve this or is there a library out there I can use? I don't want to use UIWebView since I want to have at least 9 of this views and maybe UIWebView is slow? Thanks : In early versions (iOS2.x) there was a undocumented API in UITextView: ``` [myTextView setContentToHTMLString:@"<body><strong><p>Content In HTML</p></strong><p>Other Paragraph</p></body>"]; ``` that still works in iOS4.2! (simulator test). But probably my app will be rejected;( I also have found this article that support the theory that UITextView still supports HTML but the API is not public: [http://www.lazyrobot.org.uk/2010/06/rich-text-on-iphone.html#comment-form](http://www.lazyrobot.org.uk/2010/06/rich-text-on-iphone.html#comment-form)
How to simulate a rich text view?
CC BY-SA 2.5
0
2011-01-04T04:25:19.080
2011-06-19T02:43:44.803
2011-01-04T05:41:25.533
149,008
149,008
[ "iphone", "ipad", "richtextbox", "uitextview", "richtext" ]
4,590,780
1
4,596,019
null
4
2,227
I was having trouble coming up with a way to describe the problem area that I want to understand better so I set up the following scenario to help illustrate Given the following image, how would I go about programming something that could find all of the happy faces that match the image in position 1 (call it the template image) and disregard sad face images like those in position 2 and 5. ![alt text](https://i.stack.imgur.com/jdQR8.png) ... I'm not looking for anyone to solve it for me, I just need an insightful first step to get me started as it's uncharted territory for me. What would this be called? What should I be querying google and stack overflow for in order to find helpful information? Does anyone have a library or code snippet that can help get me started? Also, I'm a .NET / C# programmer by trade so anything that happens to be in my native language is especially appreciated but not a deal-breaker. Thanks in advance... Mike
Matching like images based on a template
CC BY-SA 2.5
null
2011-01-04T05:00:44.373
2011-01-07T08:16:00.960
null
null
36,263
[ "c#", "image-processing", "ocr" ]
4,590,852
1
4,591,158
null
5
6,060
I have a dark-gray `JPanel` with a `JLabel` on it. I set `new Color(0, 0, 0, .5f)` (tranparent) as the background of the `JLabel` and I change the text several times using a button. The problem is, everytime the text is changed, the previous text still remains behind the new text. I change the text from "123456789" to "1234567", "12345" and "123". Here is the screenshot: ![alt text](https://i.stack.imgur.com/Ey4Ox.png) How do I get rid of this "shadow"?
JPanel transparency problem
CC BY-SA 2.5
0
2011-01-04T05:14:43.073
2020-08-27T19:12:14.627
2013-03-12T14:15:22.763
435,615
435,615
[ "java", "swing", "transparency", "jlabel" ]
4,590,892
1
4,599,526
null
2
888
I am trying to mimic iPhoto sharing and have gotten as far as publishing the service using the iPhoto service name "_dpap._tcp.". iPhoto sees my bogus "share", but it is grayed out. I'm watching network traffic to see if iPhoto is looking for something else to enable it (to make it non-gray), but there doesn't seem to be anything which leads me to believe it's really a bonjour setting--something I'm missing when I publish my service. ![alt text](https://i.stack.imgur.com/Rt6Hv.png) Any ideas of what iPhoto might be looking for/needing to enable that? Do you think it's a bonjour setting or just something specific to iPhoto?
NSNetService Bonjour Mimicking iPhoto
CC BY-SA 2.5
0
2011-01-04T05:24:32.030
2011-01-04T23:31:59.770
2011-01-04T21:00:03.147
71,509
71,509
[ "cocoa", "macos", "bonjour", "iphoto", "nsnetservice" ]
4,590,905
1
4,590,961
null
0
814
I'm trying to style a menu, but I keep running into this weird margin that's appearing in both FF4 and IE. This is the only affecting css: ``` #header ul { display: inline; } #header ul li { list-style-type: none; background: #000; display: inline; margin: 0; padding: 0; } #header ul li a { color: #fff; text-decoration: none; display: inline-block; width: 100px; text-align: center; } ``` And this is the HTML: ``` <div id="header"> <ul id="toplinks"> <li><a href="#">Hello</a></li> <li><a href="#">Herp</a></li> <li><a href="#">Derp</a></li> </ul> </div> ``` ![screenshot](https://i.stack.imgur.com/sPShH.png) As you can see, there's a margin appearing on both sides, and I'd like it so it would have no margin (or maybe 1px would be okay)...
Weird margin in a list
CC BY-SA 2.5
null
2011-01-04T05:26:55.153
2012-06-02T13:19:12.970
2012-06-02T13:19:12.970
480,659
null
[ "html", "css", "html-lists" ]
4,590,986
1
4,591,446
null
4
816
How to hide the below folders from the package explorer view? Image below 1. "target" and all its sub folders 2. other empty directories like "src" ![alt text](https://i.stack.imgur.com/ZAS3A.gif)
How to disable "target" and its sub-folders in eclipse?
CC BY-SA 2.5
null
2011-01-04T05:46:05.230
2011-01-04T07:29:17.113
2011-01-04T06:07:14.207
127,320
127,320
[ "eclipse" ]
4,591,024
1
8,815,728
null
1
1,651
In my project i want to display the Images in resources file in the webview i am placing that content in html page and showing in web view. in my body content having some images it is taking url like this the problem is the image is not displaying in webview only question mark image is displaying in webview? this is the code i written for this NSURL *resourcePathURL = [[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] resourcePath] isDirectory:YES]; ``` [self.webView loadHTMLString:contentString baseURL:resourcePathURL]; [resourcePathURL release]; ``` i am taking image names like this "Asparagus-with-Shallots.png" i am taking different dimenssion to each images 120*150,130*230 like this '$''$' ``` '$'<p><img src=”Tiramisu.png”/><br>a computer file consisting solely '$' ``` '$' of printable characters from a recognized character set.1 cup mascarpone cheese (8 ounces) 1 a computer file consisting solely'$' '$'of printable characters from a recognized character set! '$' I am attaching a image, I am getting the image displaying like in image getting from resource folder ![alt text](https://i.stack.imgur.com/ZzkNS.png) Thanks
Not able to display images in UIWebView from resource folder in iPhone SDK
CC BY-SA 2.5
null
2011-01-04T05:54:30.947
2012-01-11T07:36:13.640
null
null
133,611
[ "iphone-sdk-3.0", "uiwebview" ]
4,591,121
1
null
null
0
1,119
I have extended `UITextField` so that I can use my custom `myInputView`. But I am having trouble positioning the `myInputView` to a desire location. Doesn't matter what i do to set the CGRect frame of `myInputView` it will position the height be at the bottom of the screen. See Screenshot: ![http://lh3.ggpht.com/_h3ntmj5-XE8/TSK_zj6GfcI/AAAAAAAAAv8/wNWvuXS5Qk8/s640/Screen%20shot%202011-01-03%20at%2010.33.00%20PM.png](https://i.stack.imgur.com/oWdFD.png) As you can see in the picture the reversed number pad is my custom `inputView`, but I want to be able to position it towards the middle of the screen. MyTextField.h ``` @interface MyTextField : UITextField { UIView *myInputView; } @property (nonatomic, retain) IBOutlet UIView *myInputView; @end ``` MyTextField.m ``` @implementation MyTextField @synthesize myInputView; - (UIView *)inputView { NSLog(@"Return inputView"); CGRect frame = CGRectMake(0, 200, 320, 215); [myInputView setFrame:frame]; return myInputView; } - (void)dealloc { [super dealloc]; [myInputView release]; } @end ```
How to position your custom UIView control derived from UITextField
CC BY-SA 3.0
null
2011-01-04T06:15:54.603
2013-03-23T14:20:16.267
2013-03-23T14:20:16.267
881,989
515,811
[ "iphone", "objective-c", "ios", "uitextfield", "position" ]
4,591,363
1
null
null
3
538
Suppose I have a GDI+ GraphicsPath that is relatively complex, with "holes" in it. Text is a good example, like the letter "O". I want to transform this path so that I can fill it in completely, including the "holes." How can I do this? ![sample image](https://i.stack.imgur.com/H9Zqt.png)
How can I get simple "block" outline of a GDI+ path?
CC BY-SA 2.5
null
2011-01-04T07:14:20.857
2012-10-09T03:42:42.880
2011-01-04T07:39:54.540
366,904
243,471
[ "windows", "graphics", "gdi+" ]
4,591,535
1
4,591,635
null
12
13,472
I am using chartingToolKit:Chart control. I want to remove the white space appear in between the chart and plot area. Attached the WPF sample and image of area to be removed. ``` <Window x:Class="WpfApplication2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"> <Grid> <chartingToolkit:Chart x:Name="chart" Width="500" Height="300" Margin="0, 0, 0, 0" LegendStyle="{StaticResource LegendStyle}" > <chartingToolkit:AreaSeries ItemsSource="{Binding}" DependentValuePath="Value" IndependentValuePath="Key" Background="Red" > </chartingToolkit:AreaSeries> <chartingToolkit:Chart.Axes> <chartingToolkit:LinearAxis Orientation="X" ShowGridLines="False" Visibility="Hidden"> </chartingToolkit:LinearAxis> <chartingToolkit:LinearAxis Orientation="Y" ShowGridLines="False" Visibility="Hidden"/> </chartingToolkit:Chart.Axes> </chartingToolkit:Chart> </Grid> ``` ![alt text](https://i.stack.imgur.com/qtnq0.png)
How to remove space between WPF Toolkit chart area and plot area?
CC BY-SA 3.0
0
2011-01-04T07:48:24.817
2015-01-14T17:55:54.007
2012-08-14T07:59:30.723
249,933
null
[ "c#", ".net", "wpf", "charts" ]
4,591,741
1
4,591,965
null
0
137
![alt text](https://i.stack.imgur.com/ke3rX.jpg) I want it to fade animate in and out as i roll over the rows. The row should look like one with the content panel, as though the content panel and row are merged. Hope you guys understand.
How would i make a Jquery / css based table like this?
CC BY-SA 2.5
0
2011-01-04T08:26:44.873
2011-01-05T09:47:00.300
2011-01-04T08:30:00.163
21,234
544,140
[ "jquery", "css" ]
4,591,818
1
4,591,864
null
6
5,335
In my web application i want to implement the OpenId just like stackoverflow.com have to login to its web-site. In details you find while login to stackoverflow.com ![alt text](https://i.stack.imgur.com/HjPvD.jpg) So when if one choose google then it allow the uses to log in through google account. Please tell me how to implement it in java web application in details. Is there any single api for login through different website like(yahoo,google,facebook,etc) Thanks
How to implement openId java web based application?
CC BY-SA 2.5
0
2011-01-04T08:39:47.887
2016-11-30T18:27:16.490
null
null
190,604
[ "java", "openid" ]
4,591,816
1
null
null
0
633
this is how official demo looks: ![alt text](https://i.stack.imgur.com/vIqXC.png) this is mine: ![alt text](https://i.stack.imgur.com/cAQzy.png) the button at top of the grid is not verticaly centered,the paging bar at bottom of my gird also looks ugly. my code html : ``` <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <link rel="stylesheet" media="screen" href="style.css" type="text/css" /> <link rel="stylesheet" media="screen" href="omnigrid.css" type="text/css" /> <style type="text/css"> body{font-size:11px} .omnigrid div.fbutton .add { background:transparent url(images/add.png) no-repeat scroll left center; } </style> <script type="text/javascript" src="mootools-1.2.1.js"></script> <script type="text/javascript" src="mootools-1.2-more.js"></script> <script type="text/javascript" src="omnigrid.js"></script> <script type="text/javascript" src="demo.js"></script> </head> <body> <div style="border:1px solid #cde;padding:25px 25px 25px 25px"> <div id="mygrid"></div> </div> </body> ``` my code javascript : ``` function onGridSelect(evt) { var str = 'row: ' + evt.row + ' indices: ' + evt.indices; str += ' id: ' + evt.target.getDataByRow(evt.row).id; alert(str); } function gridButtonClick(button, grid) { alert(button); } var cmu = [ { header : "ID", dataIndex : 'help_category_id', dataType : 'number' }, { header : "Parent ID", dataIndex : 'parent_category_id', dataType : 'number', width : 50 }, { header : "Name", dataIndex : 'name', dataType : 'string', width : 200 } ]; window.addEvent("load", function() { datagrid = new omniGrid('mygrid', { columnModel : cmu, buttons : [ { name : 'Add', bclass : 'add', onclick : gridButtonClick }, { name : 'Delete', bclass : 'delete', onclick : gridButtonClick }, { separator : true }, { name : 'Duplicate', bclass : 'duplicate', onclick : gridButtonClick } ], url : "data.jsp?" + Math.random(), perPageOptions : [ 10, 20, 50, 100, 200 ], perPage : 10, page : 1, pagination : true, serverSort : true, showHeader : true, alternaterows : true, sortHeader : false, resizeColumns : true, multipleSelection : true, // uncomment this if you want accordion behavior for every row /* accordion:true, accordionRenderer:accordionFunction, autoSectionToggle:false, */ width : 600, height : 220 }); datagrid.addEvent('click', onGridSelect); $$(".omnigrid .pDiv").each(e,function (){ e.setStyle('font-size','11px'); }); }); ```
my omnigrid looks different from the official demo in google chrome
CC BY-SA 2.5
null
2011-01-04T08:39:27.607
2013-11-11T21:41:38.393
2013-11-11T21:41:38.393
342,534
386,208
[ "html", "css", "mootools", "omnigrid" ]
4,591,835
1
4,597,411
null
1
1,978
The thumbnail image shown in the info view of Maps app is UIImageView or MKMapView? Or it is something else? I have posted the screen shot marking the thumbnail with red circle. ![alt text](https://i.stack.imgur.com/BMQE1.png) I want to display a thumbnail image like this when a pin is selected in a map view of my app. How can I do this? 1. Considering it as an Image: I set the map view type to "Satellite" and opened the info view using the pin. But the thumbnail is still showing in the "Default" type (as in the screen shot) as always. So I guess the thumbnail is not taken from the map using renderInContext: method. So where does it come from? 2. Considering it as a map view: While the Info view is opening I noticed that the thumbnail is loading like how a map view loads. I mean, I can see the empty grids before the actual thumbnail is displayed(loaded?). So I guess this can be a small map view. What is it actually? I want to implement this in a right way. I need your guidance.
Thumbnail Image in Info View of Maps app is UIImageView or MKMapView or Something else?
CC BY-SA 2.5
0
2011-01-04T08:42:35.033
2011-10-17T04:55:02.437
2011-10-17T04:55:02.437
491,980
491,980
[ "iphone", "objective-c", "ios" ]
4,591,847
1
4,598,286
null
0
54
I am getting error with my feature.xml. It is version 1.2 not available. The screenshot is shown below. ![alt text](https://i.stack.imgur.com/4lQ47.jpg) But version 1.2 is available. ![alt text](https://i.stack.imgur.com/aOxmU.jpg)
Feature error with eclipse plugin
CC BY-SA 2.5
null
2011-01-04T08:44:25.430
2011-01-04T20:51:31.357
null
null
184,730
[ "java", "eclipse", "eclipse-plugin" ]
4,591,982
1
4,592,039
null
0
4,835
Hello I have a problem with `UIScrollView` and I hope someone can help me. I have a `UIView` with 700x580 pixel in the center of that view I add a `UIScrollview` with 350x580 pixel. In this `scrollView` I add 10 `subViews` next to each other then I set the property `clipsToBounds` on the `scrollview` to `NO` that I can see the `subViews` of the `scrollView` witch was not in the `scrollView`. Now my problem the `subviews` of the `scrollView` was also show at the outside of the `UIView`. Is there any why to disable that? Here is a sample code of my problem ``` UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 700, 580)]; CGFloat viewDisdance = 50; UIScrollView *theScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake((myView.frame.size.width-350)/2, // X 0, // Y 350+viewDisdance, // with 580)]; // height theScrollView.backgroundColor = [UIColor blueColor]; theScrollView.clipsToBounds = NO; theScrollView.pagingEnabled = YES; [myView addSubview:theScrollView]; CGFloat offset = 0.0; for (NSInteger i = 0; i<10; i++) { UIView *aSubView = [[UIView alloc] initWithFrame:CGRectMake(offset, 0, 350, 580)]; aSubView.backgroundColor = [self randomColor]; //a method that givs me a random color back offset += aSubView.frame.size.width; offset += viewDisdance; [theScrollView addSubview:aSubView]; } [window addSubview:myView]; ``` Here is a screen from the result of this code sample ![Image](https://i.stack.imgur.com/8lZsX.png) [http://img18.imageshack.us/i/bildschirmfoto20110104u.png/](http://img18.imageshack.us/i/bildschirmfoto20110104u.png/) the red area is `myView` the blue area is `theScrollView` and the other color areas are the `subViews` of `theScrollView`
UIScrollView clipsToBounds issue
CC BY-SA 3.0
null
2011-01-04T09:06:05.017
2012-11-16T10:42:50.870
2012-11-16T10:42:50.870
1,820,868
555,906
[ "iphone", "objective-c", "xcode", "ipad" ]
4,592,065
1
4,610,395
null
6
7,592
I have a set of 12 images to show in a layout. The number is chosen semi arbitrarily, but boils down to 3 horizontaly and 4 vertically for portrait mode and the other way around for landscape. First implementation was using a gridview. Problem is the height cannot be forced to fit in the screen. For a workaround I can (try to) scale the images ofcourse, but its near impossible to calculate the room available to the gridview: Total screensize is known ofcourse, but you have to 'guess' the size of the notification bar and that doesn't seem to be an elegant sollution. The measured size isn't really to be trusted: I'm not doing a complete restart on orientation change (for speed), but the way the screen is build the complete space isn't available on the spot. In the end the conclusion is that I don't want to calculate the size of the images and then scale them accordingly: I think it's better to say how the views should fit in the screen, right? So the next try is just using a TableLayout. Using "ShrinkColumns="*" the images fitted fine, so the size of the images is now how we want them. But 'extra' room we might have in the height is now evenly divided between the tablerows. This is to be expected, but ugly. The current code seems irrelevant because it doesn’t work, but looks like this in the end: I’ve removed all the padding and other stuff which doesnt seem relevant. (for portait:) ``` <TableLayout android:shrinkColumns="*"> <TableRow> <ImageView/> <ImageView/> <ImageView/> </TableRow> … (repeat 3 tablerows) </TableLayout> ``` To ‘scale’ the too-large images, the TableLayout has the “shrinkcolumns=”*”” attribute. How can we get the three ImageViews to be aligned in the center of the TableRow and not spread evenly in the width? And the same goes for the vertical columns, how can we keep everything together and not spread across the height of the screen? Basically, the "excess" space should go to the sides as padding/margin, and now it goes in between the Images. Example: The left screen-shot shows too much left/right distance, the right has too much top/bottom ![example-androblip-layout-image](https://i.stack.imgur.com/vzIQc.png)
How to layout a 'grid' of images in the center of the screen
CC BY-SA 2.5
0
2011-01-04T09:17:03.090
2019-08-08T07:07:38.757
2011-01-05T12:32:45.763
546,999
546,999
[ "android", "gridview", "android-layout", "tablelayout" ]
4,592,401
1
null
null
0
1,375
I tested this with CF 9 and MsSQL 2005 ``` CREATE TABLE HAVING_SUM ( A_VARCHAR VARCHAR(5), B_INT INT ) INSERT INTO HAVING_SUM ( A_VARCHAR, B_INT ) VALUES ( 'AB', 2 ) INSERT INTO HAVING_SUM ( A_VARCHAR, B_INT ) VALUES ( 'AB', 3 ) INSERT INTO HAVING_SUM ( A_VARCHAR, B_INT ) VALUES ( 'AB', 5 ) INSERT INTO HAVING_SUM ( A_VARCHAR, B_INT ) VALUES ( 'CD', 2 ) INSERT INTO HAVING_SUM ( A_VARCHAR, B_INT ) VALUES ( 'CD', 7 ) INSERT INTO HAVING_SUM ( A_VARCHAR, B_INT ) VALUES ( 'CD', 8 ) INSERT INTO HAVING_SUM ( A_VARCHAR, B_INT ) VALUES ( 'CD', NULL) ``` and then query in Ms SQL Server Management Studio Express ``` SELECT * FROM HAVING_SUM SELECT A_VARCHAR, SUM(B_INT) AS B_INT FROM HAVING_SUM GROUP BY A_VARCHAR SELECT A_VARCHAR, SUM(B_INT) AS B_INT FROM HAVING_SUM GROUP BY A_VARCHAR HAVING SUM(B_INT) = 10 SELECT A_VARCHAR, SUM(B_INT) AS B_INT FROM HAVING_SUM GROUP BY A_VARCHAR HAVING SUM(B_INT) = 10.5 ``` the result is ![alt text](https://i.stack.imgur.com/59jNZ.jpg) then I tried using cfquery ``` <cfquery name="qryHavingSum_1"> SELECT * FROM HAVING_SUM </cfquery> <cfdump var="#qryHavingSum_1#"> <cfquery name="qryHavingSum_2"> SELECT A_VARCHAR, SUM(B_INT) AS B_INT FROM HAVING_SUM GROUP BY A_VARCHAR </cfquery> <cfdump var="#qryHavingSum_2#"> <cfquery name="qryHavingSum_3"> SELECT A_VARCHAR, SUM(B_INT) AS B_INT FROM HAVING_SUM GROUP BY A_VARCHAR HAVING SUM(B_INT) = 10 </cfquery> <cfdump var="#qryHavingSum_3#"> <cfquery name="qryHavingSum_4"> SELECT A_VARCHAR, SUM(B_INT) AS B_INT FROM HAVING_SUM GROUP BY A_VARCHAR HAVING SUM(B_INT) = 10.5 </cfquery> <cfdump var="#qryHavingSum_4#"> ``` and the result is ![alt text](https://i.stack.imgur.com/qd22i.jpg) ![alt text](https://i.stack.imgur.com/jxQr2.jpg) (start here): scroll down to debugger I've got this ![alt text](https://i.stack.imgur.com/MkP1G.jpg) that red area , but in the section qryHavingSum_4 is undefined (the `<cfdump var="#qryHavingSum_4#">`) (end here) if I change qryHavingSum_4 to ``` <cfquery name="qryHavingSum_4"> SELECT A_VARCHAR, SUM(ISNULL(B_INT, 0)) AS B_INT FROM HAVING_SUM GROUP BY A_VARCHAR HAVING SUM(ISNULL(B_INT, 0)) = 10.5 </cfquery> ``` the result is ![alt text](https://i.stack.imgur.com/CuW2o.jpg) and then I tried to change `SUM(B_INT)` (without ISNULL) and `HAVING SUM(B_INT)` (without ISNULL) with other operator `> >= < <= <> !=` and it works. why I can't use the `=` with query above in CF? is it CFbugs? thank you
ColdFusion MsSQL HAVING SUM() with NULL value
CC BY-SA 2.5
null
2011-01-04T10:01:50.253
2011-01-06T22:28:36.247
2011-01-04T14:39:35.493
218,380
218,380
[ "sql-server", "sql-server-2005", "coldfusion", "having-clause" ]
4,593,256
1
4,593,402
null
1
1,394
I am using Visual Studio 2010 for an MVC website project. I have an big problem and dont know hot to solve it. When i am looking to the output of html in firebug indents in my aspx and ascx files are outputed as space in same places. I think its about line ending of files but i am not sure how to fix them. I am adding some pictures about problem.![alt text](https://i.stack.imgur.com/gY5Bx.png) ![alt text](https://i.stack.imgur.com/jVdPM.png) ![alt text](https://i.stack.imgur.com/XQk5D.png) When i am adding a breakpoint it also add red background to spaces (this is problem) I try to delete spaces after hit ctrl+k d same problem happen. If i delete all indents make page 1 line without spaces output is fine but it not a solution.
Visual Studio inserting indents as spaces to html output
CC BY-SA 2.5
null
2011-01-04T11:50:29.120
2011-12-21T04:03:36.753
2011-12-21T04:03:36.753
3,043
178,524
[ "asp.net", "html", "visual-studio", "line-endings" ]
4,593,420
1
6,534,243
null
2
490
I've encountered a random issue in Webkit based browsers (tested in Chrome and Safari). On a website I maintain I've been updating the artwork we use for our error messages, and it looks great in all browsers except Webkit based browsers. The problem I am having seems to disappear when I toggle any CSS rule on or off through the Web Inspector. The problem: ![Webkit CSS Bug?](https://i.stack.imgur.com/YDisC.png) The spacing above the text-size controls shouldn't be there, it should look like: ![Corrected](https://i.stack.imgur.com/rqlB1.png) The annoying thing is that the spacing disappears when I toggle css property in Web Inspector. The HTML for the popup is: ``` <div class="popup"> <div class="header"> <div class="block"></div> <a class="normalFont" href="javascript:void(0);" title="Normal Font"><span>Normal Font</span></a> <a class="largerFont" href="javascript:void(0);" title="Larger Font"><span>Larger Font</span></a> <a class="largestFont" href="javascript:void(0);" title="Largest Font"><span>Largest Font</span></a> <a class="close" href="javascript:void(0);" title="Close"><span>Close</span></a> </div> <div class="message">...</div> <div class="footer"></div> </div> ``` And the key part of the CSS is: ``` .popup { width: 310px; } .popup .header { height: 40px; margin: 0; padding: 0; background: url(...); } .popup .header .block { float: left; height: 19px; width: 210px; } ``` Where `.block` is applied to: ![CSS Block](https://i.stack.imgur.com/aQsuZ.png) Does anyone know why this occurs and if there is a workaround? : A live example (although using outdated graphics) is available [here](https://www.direct-travel.co.uk/Quotation/Select-Cover/bFV4ckF1UWdnRkNCS0NxeWVGV2dwczMydll0S0hzOEcxUktsQ3BhWHlLMEh6ODFwM2E1azFRPT01). Clicking an item such as 'Medical Expenses' in a Webkit browser displays the popup with spacing error.
Webkit spacing behaviour - corrected by Web Inspector
CC BY-SA 2.5
null
2011-01-04T12:11:05.867
2011-06-30T11:48:46.927
2011-01-04T15:19:25.317
357,693
357,693
[ "html", "css", "webkit", "spacing", "web-inspector" ]
4,593,454
1
4,630,547
null
0
786
I am using MS Charts in my project and things are going well. I am using this [article](http://blogs.msdn.com/b/alexgor/archive/2008/11/11/microsoft-chart-control-how-to-using-keywords.aspx) for complex Tooltip content, When i addd line break "\n" its working properly on IE but not on Firefox. Check the following screenshots, any help will be appreciated. ![alt text](https://i.stack.imgur.com/QeXFZ.png) ![alt text](https://i.stack.imgur.com/q59Nz.png)
Display new line in MS Charts Tooltip
CC BY-SA 2.5
null
2011-01-04T12:15:35.337
2011-01-07T21:37:43.407
2011-01-04T12:25:45.957
21,234
394,630
[ "firefox", "mschart" ]
4,593,796
1
4,594,695
null
1
1,749
I want to show a set of products as a table inside one product with these attributes. So i chosen grouped product option but it does not match the requirement. How can i design a table like format from the grouped product option with radio button to choose only one product from it. So using grouped product or configurable product or by any way how can i achieve this. Here am attaching the screen-shot which i actually wanted ![alt text](https://i.stack.imgur.com/X4yDX.png)
Magento grouped product options
CC BY-SA 2.5
null
2011-01-04T12:54:40.643
2011-05-18T10:07:36.277
null
null
172,376
[ "magento" ]
4,593,902
1
4,594,098
null
1
758
Please say name of this component and does c# have it? ![alt text](https://i.stack.imgur.com/1eIHy.jpg)
What is name of this component
CC BY-SA 2.5
null
2011-01-04T13:05:35.523
2021-11-15T03:14:53.553
null
null
508,284
[ "c#", "winforms", "components" ]
4,593,977
1
4,594,220
null
3
620
attached is an image. ![](https://i.stack.imgur.com/p89CO.jpg) I am trying to get the text format as shown at the right-most end. i.e. within the height of the thumbnail (36px) name, time, date have to be shown vertically aligned. I am having problem showing the text vertically aligned. Here's my code - ``` <div id="sresults" style="position:absolute;top:120px; left:36%;"> <div id="0" style="width:500px;padding:5px;cursor:pointer;clear:both;"> <div id="content0" style="float:left; font-size:13px;">"Hey dude how are you doing?"</div> <div id="meta0" style="float:right;"> <img src="http://www.mnducksvolunteer.org/_/rsrc/1262377955090/services/Google-Contacts-32.png" width="36px" title='Google Contacts'></img> <img src="http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs455.snc4/49881_1146922913_477096_q.jpg" width="36" title="peter"></img> <div id='name' style="float:right; font-size:11px">Peter</div> <div id='time' style="float:right;font-size:11px;">19:23</div> <div id='date' style="float:right;font-size:11px;">23 Dec'10</div> </div> </div> ``` To be accurate, I want the div ids 'name', 'time', 'date' to be aligned like in the image. how? Also note that the div with id="0" is one of the results, there'll be 10 such in a page all under `<div id="sresults">`
HTML CSS text align
CC BY-SA 2.5
null
2011-01-04T13:14:44.167
2011-01-04T13:48:25.060
2011-01-04T13:19:34.283
null
147,019
[ "html", "css", "text-align" ]
4,594,025
1
4,596,922
null
0
360
I tried to localize my app to Japanese, I got ja.lproj folder with AboutViewController.xib inside it, but when I run my app in region Japan with Japanese language, it doesn't show Japanese, still only show English, what do I have to do for anything else?![alt text](https://i.stack.imgur.com/UY0Lw.jpg)
Why doesn't my ja.lproj show Japanese?
CC BY-SA 2.5
null
2011-01-04T13:19:27.597
2011-01-04T18:15:41.160
null
null
424,957
[ "localization", "internationalization", "xib" ]
4,594,226
1
4,594,524
null
4
5,225
In my iPhone app, I have an actionsheet which has 4 buttons. Now to perform actions on click of these buttons, I have implemented ActionSheet Delegate. The action sheet delegate method does not get called on click of the buttons. The same code works when integrated to another project. I have declared all the method names properly. Below is the screenshot which shows the delegate method ![alt text](https://i.stack.imgur.com/RLjQ4.png) What could be wrong?
iPhone SDK: UIActionsheet Delegate Method not getting called
CC BY-SA 4.0
null
2011-01-04T13:40:04.607
2018-05-16T12:31:14.713
2018-05-16T12:31:14.713
472,495
463,857
[ "iphone", "objective-c", "cocoa-touch", "ios4", "uiactionsheet" ]
4,594,370
1
4,594,644
null
4
1,415
I have a scatter plot of a dataset and I am interested in calculating the upper bound of the data. I don't know if this is a standard statistical approach so what I was considering doing was splitting the X-axis data into small ranges, calculating the max for these ranges and then trying to identify a function to describe these points. Is there a function already in R to do this? If it's relevant there are 92611 points. ![alt text](https://i.stack.imgur.com/SZC0s.png)
Advice on calculating a function to describe upper bound of data
CC BY-SA 2.5
0
2011-01-04T13:54:41.433
2011-01-04T19:34:53.537
2011-01-04T16:52:51.837
258,755
258,755
[ "r", "statistics", "regression" ]
4,594,486
1
4,594,504
null
2
1,754
I have a table with out a PK on it, with 6 columns in it. I want to get distinct records based on only 5 columns and for the 6th column, any value from the non-distinct records. ![alt text](https://i.stack.imgur.com/yNg5p.jpg) For example, in the above set of data, I want to get distinct rows based on last 5 columns only and any value for the CreatedDate from the 5 rows (I dont care what the CreatedValue has, as long as it is from one of the 5 records). What are the options I have got? Thanks Vikram
SQL Server - query on getting DISTINCT records from a table
CC BY-SA 2.5
null
2011-01-04T14:07:48.140
2011-01-04T14:10:06.237
2011-01-04T14:10:06.237
341,251
548,924
[ "sql", "sql-server", "distinct" ]
4,594,725
1
4,594,812
null
0
945
Using just CSS (and JS to apply :hover styles), what's the best way to build horizontal dropdown nested menus? I'm trying to adopt the menus [here](http://meyerweb.com/eric/css/edge/menus/demo.html), but I can't achieve the positioning I want. Every time I attempt this, I wind up with so much CSS cludge that it's no longer manageable. DOM: ``` <nav> <ul> <li> <a href="#">Heading 1</a> <ul> <li><a href="#">1</a> <ul><li>a</li><li>b</li></ul> </li> <li>2</li><li>3</li> </ul> </li> <li> <a href="#">Heading 2</a> <ul><li>1</li><li>2</li><li>3</li></ul> </li> </nav> ``` Desired output: ![alt text](https://i.stack.imgur.com/cmBlR.png) That is, the top header is entirely horizontal, the first menu beneath each header lines up horizontally on the left of the header, and all further submenus line up horizontally on the right and vertically on the top. How would I go about building this basic idea?
Building a vertical, nested CSS menu that works in IE7
CC BY-SA 2.5
null
2011-01-04T14:34:30.503
2011-01-05T07:41:34.297
null
null
78,182
[ "javascript", "html", "css", "layout" ]
4,594,962
1
4,595,461
null
14
12,209
I am on a project where I have multiple users of a portal and they are connected to other users of the portal. Now we are asked to draw a to see the relationships. The constraint is that . The graph has to be something like: ![Icons connected by blue lines, components grouped together](https://i.stack.imgur.com/xWMRJ.jpg) Is there any C# library or component to draw this type of graphs? We have already checked these: - [http://flare.prefuse.org/](http://flare.prefuse.org/)- [http://www.yworks.com/en/products_yfiles_practicalinfo_gallery.html](http://www.yworks.com/en/products_yfiles_practicalinfo_gallery.html)- [.NET graph library around?](https://stackoverflow.com/questions/1578493/net-graph-library-around)- [http://quickgraph.codeplex.com/](http://quickgraph.codeplex.com/)- [https://graphsharp.codeplex.com/](https://graphsharp.codeplex.com/)- [http://research.microsoft.com/en-us/downloads/f1303e46-965f-401a-87c3-34e1331d32c5/default.aspx](http://research.microsoft.com/en-us/downloads/f1303e46-965f-401a-87c3-34e1331d32c5/default.aspx)- [http://sourceforge.net/projects/zedgraph/](http://sourceforge.net/projects/zedgraph/) But I want to check if you already used some other and your feedback.
Social network directed graph library for .NET
CC BY-SA 3.0
0
2011-01-04T14:58:16.367
2015-03-21T13:05:02.563
2017-05-23T12:09:17.433
-1
72,547
[ "c#", "asp.net", "drawing", "social-networking" ]
4,595,042
1
4,595,868
null
1
1,134
I have simple ItemsControl with custom datatemplate, template contains only textblock with border. All items should be displayed vertically one after another, but some items have extra border. How can I remove it? I want to achieve something similar to enso launcher, it looks like ![alt text](https://i.stack.imgur.com/Hn40x.png) My implementation looks like this ![wpf textblock with border](https://i.stack.imgur.com/DmWW3.png) here is my xaml code: ``` <Window x:Class="winmole.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" x:Name="hostWindow" Height="Auto" MinHeight="100" MinWidth="100" Width="Auto" Padding="10" AllowsTransparency="True" WindowStyle="None" Background="Transparent" Top="0" Left="0" SizeToContent="WidthAndHeight" Topmost="True" Loaded="Window_Loaded" KeyUp="Window_KeyUp" > <Window.Resources> <!--Simple data template for Items--> <DataTemplate x:Key="itemsTemplate"> <Border Background="Black" Opacity="0.9" HorizontalAlignment="Left" CornerRadius="0,2,2,0"> <TextBlock Text="{Binding Path=Title}" TextWrapping="Wrap" FontFamily="Georgia" FontSize="30" Height="Auto" HorizontalAlignment="Left" VerticalAlignment="Stretch" TextAlignment="Left" Padding="5" Margin="0" Foreground="Yellow"/> </Border> </DataTemplate> </Window.Resources> <DockPanel> <ItemsControl DockPanel.Dock="Bottom" Name="itcPrompt" ItemsSource="{Binding ElementName=hostWindow, Path=DataItems}" ItemTemplate="{StaticResource itemsTemplate}" > <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel Orientation="Vertical" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </DockPanel> ```
Wpf ItemsControl with datatemplate, problem with doubled border for some items
CC BY-SA 4.0
null
2011-01-04T15:06:12.610
2019-02-05T11:29:46.000
2019-02-05T11:29:46.000
6,594,576
75,037
[ "wpf", "datatemplate", "border", "itemscontrol", "textblock" ]
4,595,287
1
4,595,365
null
0
349
I have an iOS project that has some mp3 files in its Resources folder : ![alt text](https://i.stack.imgur.com/inMML.png) I would like to add them to an array. The following would appear to be the appropriate way to add the mp3's to an array, but when I list the array's contents it is empty? Not sure what I am missing: ``` NSArray *myArray = [[NSBundle mainBundle] pathsForResourcesOfType:@"mp3" inDirectory:@"Resources"]; ``` Running the following indicates the array is empty: ``` NSLog(@"Array contents: %@", myArray); ``` or ``` NSLog (@"Number of elements in array = %i", [myArray count]); ```
Array not being populated as expected in iOS project
CC BY-SA 2.5
null
2011-01-04T15:27:42.883
2011-01-04T15:37:07.117
null
null
212,339
[ "objective-c", "arrays", "ios" ]
4,595,613
1
4,595,935
null
1
1,433
I want to get a number from a listview item divide it by the number in a text box and display it in the next column. How can i do this for every item in the listview? ![alt text](https://i.stack.imgur.com/uBbM9.png) ( i need to get amount / fraction denominator and output it into percentage )
Get item from listview column convert to percent and display in the next column
CC BY-SA 2.5
null
2011-01-04T15:57:16.733
2011-01-04T16:58:39.573
2011-01-04T16:58:19.927
487,242
556,396
[ "c#", "winforms", "listview" ]
4,595,709
1
4,595,843
null
4
710
I have the following and in a PHP project in Eclipse: ![alt text](https://i.stack.imgur.com/cLH6D.png) I know my as I can run it at the command line: ![alt text](https://i.stack.imgur.com/EMMQ7.png) Now I want to run this test from Eclipse. I set up PHP Unit in Eclipse like this: ![alt text](https://i.stack.imgur.com/5EWtt.png) However, when I run the PHPUnit tests: ![alt text](https://i.stack.imgur.com/lGGw1.png) It tells me that it can't include the class file: ``` /usr/bin/php -c /var/folders/UA/UAv38snBHd0QMgEPMCmM9U+++TM/-Tmp-/zend_debug/session4910937990995915704.tmp -d asp_tags=off /Applications/eclipse/plugins/org.phpsrc.eclipse.pti.tools.phpunit_0.5.0.R20101103000000/php/tools/phpunit.php --log-junit /var/folders/UA/UAv38snBHd0QMgEPMCmM9U+++TM/-Tmp-/pti_phpunit/phpunit.xml /Volumes/data/domains/et/extjslayout/phpunittest/tests PHP Warning: include_once(../Product.php): failed to open stream: No such file or directory in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 3 PHP Warning: include_once(): Failed opening '../Product.php' for inclusion (include_path='/usr/local/PEAR') in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 3 PHP Fatal error: Class 'Product' not found in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 9 ```
Why would Eclipse not be able to include a file when running a PHPUnit test?
CC BY-SA 2.5
null
2011-01-04T16:06:50.853
2014-10-31T12:05:12.090
null
null
4,639
[ "eclipse", "phpunit" ]
4,595,791
1
4,596,884
null
0
3,532
I created a Silverlight Column chart and rotated the X-Axis, following the guidelines of [this MSDN Blog](http://blogs.msdn.com/b/delay/archive/2010/03/06/turn-your-head-and-check-out-this-post-how-to-easily-rotate-the-axis-labels-of-a-silverlight-wpf-toolkit-chart.aspx). The labels are rotated correctly, but I end up with staggered labels in my X-Axis, which does not fit well. I would like to remove the stagger from the labels. Here is the XAML: ``` <toolkit:Chart Name="theColumnChart" BorderThickness="0" Margin="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Style="{StaticResource Chart}" Template="{StaticResource ChartTemplate}" TitleStyle="{StaticResource ChartTitleStyle}"> <toolkit:Chart.Palette> <visualizationToolkit:ResourceDictionaryCollection> <ResourceDictionary> <Style x:Key="DataPointStyle" TargetType="toolkit:ColumnDataPoint" BasedOn="{StaticResource ColumnDataPointStyle}"> <Setter Property="Background" Value="Goldenrod"/> </Style> </ResourceDictionary> <ResourceDictionary> <Style x:Key="DataPointStyle" TargetType="toolkit:ColumnDataPoint" BasedOn="{StaticResource ColumnDataPointStyle}"> <Setter Property="Background" Value="SaddleBrown"/> </Style> </ResourceDictionary> </visualizationToolkit:ResourceDictionaryCollection> </toolkit:Chart.Palette> <toolkit:Chart.Axes> <toolkit:LinearAxis Minimum="0" Orientation="Y" /> </toolkit:Chart.Axes> <toolkit:Chart.Series> <toolkit:ColumnSeries DependentValueBinding="{Binding ItemValue}" IndependentValueBinding="{Binding ItemKey}" ItemsSource="{Binding Statistics1}" Title="{Binding SeriesTitle}"> <toolkit:ColumnSeries.IndependentAxis> <toolkit:CategoryAxis Orientation="X"> <toolkit:CategoryAxis.AxisLabelStyle> <Style TargetType="toolkit:AxisLabel"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="toolkit:AxisLabel"> <layout:LayoutTransformer> <layout:LayoutTransformer.LayoutTransform> <RotateTransform Angle="-45"/> </layout:LayoutTransformer.LayoutTransform> <TextBlock Text="{TemplateBinding FormattedContent}"/> </layout:LayoutTransformer> </ControlTemplate> </Setter.Value> </Setter> </Style> </toolkit:CategoryAxis.AxisLabelStyle> </toolkit:CategoryAxis> </toolkit:ColumnSeries.IndependentAxis> </toolkit:ColumnSeries> </toolkit:Chart.Series> </toolkit:Chart> ``` Here is a picture of the problem: ![Staggered and Rotated Columns](https://i.stack.imgur.com/ldqUU.png)
Remove Stagger in Silverlight Chart X-Axis Labels
CC BY-SA 2.5
null
2011-01-04T16:14:26.367
2011-10-06T17:06:01.167
null
null
168,117
[ "silverlight-4.0", "charts" ]
4,595,938
1
4,595,967
null
2
293
I have a list view with some items in it and I would like to know how to add extra information to the side of this? I have a photoshopped example below of what I mean, it's difficult to describe without an image or I would have used google to try and find the answer myself. I want it with the extra text on the right hand side, i've seen it done easily within the iPhone but i'm a bit stuck with android. Thanks. ![alt text](https://i.stack.imgur.com/QX38k.jpg)
Extra information within a ListView
CC BY-SA 2.5
null
2011-01-04T16:30:11.230
2011-01-04T16:33:54.267
null
null
400,406
[ "android", "listview" ]
4,596,012
1
4,596,176
null
0
1,070
How to I duplicate the behavior of [this plugin](http://lab.smashup.it/flip) with straight JS/CSS? Screenshot from site: ![alt text](https://i.stack.imgur.com/D03sc.png) Thanks!
HTML5 Equivalent of jQuery flip plugin?
CC BY-SA 2.5
null
2011-01-04T16:38:52.097
2011-01-04T16:53:54.950
null
null
114,696
[ "javascript", "jquery", "html", "animation", "css" ]
4,596,346
1
4,606,576
null
2
4,917
I am displaying a JPG in a C++ CWnd window using GDI+. The JPG has a pure white background, 0xffffff, but when displayed using graphics.DrawImage, the background is off-white with a mix of pixel colors such as 0xfff7f7, 0xf7fff7, 0xf7f7f7. Below is the code, I have tried various settings such as CompositingMode, SmoothingMode, etc. The image is not scaled. The weird thing is that the background color is different depending on other non-white content in the image. If I make a simple all white JPG, then it works, or even a mostly white with just some black text. Comparison of images are shown below. ``` CClientDC dc(this); Gdiplus::Graphics graphics(dc); Gdiplus::Bitmap* bmp = Gdiplus::Bitmap::FromFile( L"c:\\test.jpg" ); graphics.SetInterpolationMode(Gdiplus::InterpolationModeHighQuality); //graphics.SetCompositingQuality(Gdiplus::CompositingQualityHighQuality); graphics.SetCompositingQuality(Gdiplus::CompositingQualityDefault); graphics.SetCompositingMode(Gdiplus::CompositingModeSourceCopy); //graphics.SetSmoothingMode( Gdiplus::SmoothingMode::SmoothingModeDefault ); graphics.DrawImage(bmp, 0, 0, bmp->GetWidth(), bmp->GetHeight() ); ``` Here I have text and some blending only on the left side of the image (no alphas, this is JPG) . Everything to the right is pure white. You can see the background is all grey. ![alt text](https://i.stack.imgur.com/cmv0l.jpg) Here I started removing the internal content (only on the left side). After a certain point the entire background starts displaying white. ??? ![alt text](https://i.stack.imgur.com/b8tF2.jpg) It doesn't really matter which part of the image area I remove before it starts displaying white, as long as I remove a large portion of it. The same occurs for pngs. Here is the original test.jpg image... ![alt text](https://i.stack.imgur.com/CGwhI.jpg)
GDI+ DrawImage of a JPG with white background is not white
CC BY-SA 2.5
0
2011-01-04T17:09:13.047
2011-06-24T14:35:19.063
2011-06-24T14:35:19.063
9,453
175,938
[ "gdi+", "drawimage" ]
4,596,341
1
4,596,491
null
8
15,639
Here's a problem I run into every now and then, that I usually try and solve from a back end perspective, but would like to know if there's a magic solution others have found to solve this on the front end. Given a ul/li list, provided in the markup alphabetically, from a-z: ``` <ul> <li>Alpha</li> <li>Bravo</li> <li>Charlie</li> <li>Delta</li> <li>Echo</li> <li>Foxtrot</li> <li>Golf</li> <li>Hotel</li> <li>India</li> <li>Juliet</li> <li>Kilo</li> <li>Lima</li> <li>Mike</li> <li>November</li> <li>Oscar</li> <li>Papa</li> <li>Quebec</li> <li>Romeo</li> <li>Sierra</li> <li>Tango</li> <li>Uniform</li> <li>Victor</li> <li>Whiskey</li> <li>X-ray</li> <li>Yankee</li> <li>Zulu</li> </ul> ``` Typically, it's very easy to float the items left and sort them visually horizontal in blocks, like such: ![One UL/LI list with the li elements floated left](https://i.stack.imgur.com/qPX1M.png) However, to get columns, like this: ![Four UL/LI lists with the ul elements floated left](https://i.stack.imgur.com/0CtUW.png) I've always had to break the HTML up into separate entities, such as four separate `<ul>` elements in the above example. Is there a way to keep it all in one ul list without any additional markup, using just CSS (no JavaScript) to get a columnar look like the second image above? My guess is "no," but I've seen some magic before, and I'd like to answer this more definitively.
Sorting html ul/li list in alphabetical vertical blocks
CC BY-SA 3.0
0
2011-01-04T17:08:48.107
2015-05-24T21:54:53.993
2015-05-24T21:54:53.993
321,731
209,803
[ "css", "html-lists", "alphabetical" ]
4,596,394
1
4,607,116
null
0
1,266
Is it possible to customize Recaptcha to display text in English only words? As recently, I found that text could be displayed in other language like Hebrew. Here is example: ![alt text](https://i.stack.imgur.com/XK18j.jpg) To be honest it is not possible to type such words for ordinary users having keyboard with Roman alphabet and not many know that image can be redrawn.
Is it possible to customize Recaptcha image language?
CC BY-SA 2.5
null
2011-01-04T17:13:38.527
2011-01-05T17:25:29.073
2011-01-04T17:56:32.113
118,222
118,222
[ "zend-framework", "recaptcha" ]
4,596,420
1
4,596,473
null
0
10,593
Using two functions: - - Develop a C program for the following equation: ![alt text](https://i.stack.imgur.com/B8ZJf.png) I've done this . but no output. ``` #include <stdio.h> #include <math.h> double factorial(double x); double Power_function(double y); int main(){ double answer=0; double n; double y; printf("Enter Y :The last limit of the summation:>"); scanf("%ld",&y); for (n=1;n<=y;++n){ answer=answer +factorial(n)*Power_function(n)*y; } printf("The Answer is %0.2f\n",answer); return 0; } double factorial(double x) { double ans; if (x==0){ ans = 1; } else { ans = x*factorial(x-1); } return ans; } double Power_function(double y){ double ans; ans=pow(2,y); return ans; } ```
How to convert a math equation (summation) to a code?
CC BY-SA 3.0
0
2011-01-04T17:16:15.920
2012-10-03T11:15:15.443
2012-10-03T11:15:15.443
300,311
548,886
[ "c" ]
4,596,642
1
6,857,755
null
4
2,560
I've been having some serious issues with Visual Studio 2010 as of late. It's been crashing in a peculiar way when I encounter certain types of XAML errors during the `InitializeComponent()` of a control/window. The program breaks and visual studio gears up like it's catching an exception (because it is) and then stops midway displaying a broken highlight in my XAML file with no details as to is wrong. Example: ![alt text](https://i.stack.imgur.com/MW13N.png) There is not pop outs, or details about what is wrong, only a callstack that points to my `InitializeComponent()` call. Now normally I'd just do some trial and error to fix this problem, and find out where i messed up, but the real problem isn't my code. Visual Studio is rendered at this point. It reports my application still in "Running" mode. The Stop/Break/Restart buttons on the toolbar or in the menus don't do anything (but grey out). Closing the application does not stop this behaviour, closing visual studio gets it stuck in a massive loop where it yells at me complaining every file open is not in the debug project, then repeats this process when i have exausted every open file. I have to force-close `devenv.exe`, and after this happening 3-4 times in a row it's a lot of wasted time (as my projects are usually pretty big and studio can be quite slow @ loading). 1. Has anyone else experienced this? 2. How can I stop studio from locking up. 3. Can I at LEAST get information out of this beast another way so i can fix my XAML error sooner rather than after 3-4 trial-and-error compiles yielding the same crash? Any & All help would be appreciated. Visual Studio 2010 version: `10.0.30319.1RTM` FWIW, mostly the errors that cause this are `XamlParseExceptions` (I figured this out after i found what was wrong with my XAML). , Im not looking for the solution to my code problem, as these are usually typos / small things, The particular error in the above image that 100% for sure caused this was a `XamlParseException` caused by forgetting a `Value` attribute on a data trigger. I've fixed that part but it still doesn't tell my why my studio becomes a lump of neutered program when a perfectly normal exception is thrown in the parsing of the XAML. This is the base template WPF Application, with the following `Window.xaml` code. The problem is a missing `Value="True"` on the `<DataTrigger ...>` in the template. It generates a `XamlParseException` and Visual Studio Crashes as described above when debugging it. ``` <Window x:Class="XamlParseExplosion.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <DataTemplate x:Key="BankListItemTemplate"> <Border x:Name="ItemBorder" Width="250" Margin="1" BorderBrush="Blue" BorderThickness="5,0,0,0"> <Grid> <Label Content="{Binding Name}" /> </Grid> </Border> <DataTemplate.Triggers> <DataTrigger Binding="{Binding IsDirty}"> <Setter TargetName="ItemBorder" Property="BorderBrush" Value="Red" /> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> </Window.Resources> <Grid> <ListView ItemTemplate="{StaticResource BankListItemTemplate}" /> </Grid> </Window> ``` The following solutions help me: 1. Restarting Visual Studio 2. Rebooting 3. Reinstalling Visual Studio 4. Disabling add-ins like ReSharper & Reflector ## Update (Way Later) w/ Answer I want to add to this (as a pseudo answer) because I found out more information about this later that I want to pass along to people finding this question in google. XamlParseException was selected in Debug -> Exceptions to break when it occurs, because this happens during the WPF wireup vstudio cannot catch it correctly (normally it would fall down a couple more levels and be handled there where vstudio could handle it). Simply turn that off and life will be good again. I didn't want to put this as an answer because the answer provided by mazelo was correct too, when vstudio is run as Administrator it seems to be able to catch the exception properly and debug from there so I didn't want to take away his answered status because his solution does work.
Visual Studio soft-crashing when encountering XAML Errors in initialize
CC BY-SA 3.0
null
2011-01-04T17:43:25.513
2012-10-29T19:55:12.560
2012-10-29T19:55:12.560
317,975
317,975
[ ".net", "wpf", "visual-studio-2010", "crash" ]
4,596,742
1
4,596,770
null
6
704
I've just looked at Gmail source, and I'm surprised the way they name id / class name. ![alt text](https://i.stack.imgur.com/RR4LI.png)
Gmail CSS convention
CC BY-SA 2.5
0
2011-01-04T17:55:56.093
2011-12-02T21:45:58.213
null
null
195,727
[ "css" ]
4,597,051
1
4,610,095
null
0
1,417
I'm using a simple Google chart to picture a benchmark: ![alt text](https://i.stack.imgur.com/VNlvi.png) Since most data is located between 50 and 100 I tried to make the range a bit smaller but this results in an incorrect graph. ![alt text](https://i.stack.imgur.com/Wxpoz.png) . The HTML code looks like the following: ``` <img src="http://chart.apis.google.com/chart?chxr=0,50,100|1,0,50&chxt=y,x&chs=900x300&cht=ls&chco=DA3B15,3072F3&chd=s:stt3rp3ts7rp2ut7uz7tt5rr5rw5rs2qr2qr2tq5rr3qp3rr2q,uqq2sp0nqnzoop3qq2tt4tr2sr2rw1rq2rr2qs3pozpoo4rp2p&chdl=With+lock|Without+lock&chg=50,20&chls=2|2&chtt=FluorineFx+-+FactoryInstance+with%2Fwithout+lock&chts=676767,13" width="1000" height="300" alt="FluorineFx - FactoryInstance with/without lock" /> ``` Has anyone a solution that helps scaling the graph correctly?
Google charts - when Y range is changed, graph doesn't scale correctly
CC BY-SA 2.5
0
2011-01-04T18:31:06.113
2011-01-05T23:02:01.177
2011-01-04T19:18:35.743
296
296
[ "scaling", "google-visualization" ]
4,597,536
1
4,608,406
null
31
5,020
I've got [Auto Complete Mode](http://cx4a.org/software/auto-complete/) installed for Emacs. When I'm typing declarations I get the normal auto-complete behavior: ![Hosted by imgur.com](https://i.imgur.com/VCWdx.png) So I hit to complete — no problem. But then I hit : ![Hosted by imgur.com](https://i.imgur.com/iYuJR.png) It instantly tries to complete something! And I can't hit because that'll accept the erroneous completion! ![Hosted by imgur.com](https://i.imgur.com/9I0yw.png) So I have to hit . What a pain. Once I'm done with a declaration, I type : ![Hosted by imgur.com](https://i.imgur.com/dTug8.png) ...but it doesn't get indented properly unless I type . What gives? I'm using Emacs 23. My `css-electric-keys` are `}` and `;`. My Auto Complete configuration is as follows: ``` (ac-config-default) (setq ac-auto-start t) (setq ac-delay 0.1) (setq ac-auto-show-menu nil) (setq ac-show-menu-immediately-on-auto-complete t) (setq ac-trigger-key nil) ```
Emacs, Auto Complete Mode, CSS, pain. (illustrated!)
CC BY-SA 3.0
0
2011-01-04T19:26:41.993
2013-03-08T22:54:51.487
2011-10-12T11:38:16.317
115,866
102,704
[ "css", "emacs", "autocomplete" ]
4,597,568
1
4,597,938
null
1
58,807
I want to do this pseudo formula below: ``` IF CELL VALUE < TODAY() + 60 , THEN FORMAT CELL RED ``` to these spreadsheet cells : ![alt text](https://i.stack.imgur.com/dUVEm.jpg) I am having trouble with Conditional Formatting in EXCEL 2010
Conditional formatting cells within a date range in Excel 2010?
CC BY-SA 2.5
null
2011-01-04T19:30:43.973
2013-06-21T23:31:36.550
2011-01-04T19:37:07.197
21,234
290,150
[ "excel", "conditional-formatting", "excel-2010" ]
4,597,606
1
4,597,652
null
1
639
I have below table in SQL server 2008.Please help to get expected output ![alt text](https://i.stack.imgur.com/83zLe.png) Thanks. ``` CREATE TABLE [dbo].[Test]([Category] [varchar](10) NULL,[Value] [int] NULL, [Weightage] [int] NULL,[Rn] [smallint] NULL ) ON [PRIMARY] insert into Test values ('Cat1',310,674,1),('Cat1',783,318,2),('Cat1',310,96,3),('Cat1',109,917,4),('Cat2',441,397,1),('Cat2',637,725,2),('Cat2',460,742,3),('Cat2',542,583,4),('Cat2',601,162,5),('Cat2',45,719,6),('Cat2',46,305,7),('Cat3',477,286,1),('Cat3',702,484,2),('Cat3',797,836,3),('Cat3',541,890,4),('Cat3',750,962,5),('Cat3',254,407,6),('Cat3',136,585,7),('Cat3',198,477,8),('Cat4',375,198,1),('Cat4',528,351,2),('Cat4',845,380,3),('Cat4',716,131,4),('Cat4',781,919,5) ```
T-SQL group by partition
CC BY-SA 2.5
null
2011-01-04T19:36:05.957
2011-08-27T14:03:50.353
2011-01-04T19:39:26.220
527,185
219,628
[ "tsql", "group-by", "partitioning" ]
4,597,990
1
4,599,536
null
10
2,509
: this is a question, so apologies to anyone that read it purely as a discursive topic :) , I was doing a little research today re adding routes via javascript when i thought that a bit of google research wouldn't hurt. Basically, my aim was to do away with the following type of construct within my views: ![alt text](https://i.stack.imgur.com/ivnt6.png) and replace it with something akin to: ![alt text](https://i.stack.imgur.com/EiR30.png) well, i lucked out a little today after finding this fantastic article (which isn't mine nor do i have any affiliation other than respect for the piece of work): [http://weblogs.asp.net/zowens/archive/2010/12/20/asp-net-mvc-javascript-routing.aspx](http://weblogs.asp.net/zowens/archive/2010/12/20/asp-net-mvc-javascript-routing.aspx) this really has been a missing link (or so i thought) for me when dealing with routes via javascript. However, the 2nd code example is misleading and actually won't produce what the example leads on. Can anyone suggest a fix for this and/or an alternative solution to allow this fluent convention of js routes within mvc views?? cheers... - question edited 22:16 GMT to explore deeper options on this topic, plus changed title (removed portion).
ASP.NET MVC JavaScript Routing
CC BY-SA 2.5
0
2011-01-04T20:16:23.477
2011-01-04T23:33:38.510
2011-01-04T22:24:05.823
187,061
187,061
[ "asp.net-mvc" ]
4,598,026
1
4,598,245
null
1
1,325
I am trying to deploy a asp.net mvc site. My hosting service provider provides me dsn database connection for my sql server 2008 database. I changed my web.config to use dsn connection using this modification in web.config. ``` <appSettings> <add key="myDSN" value="evdsn"/> </appSettings> ``` In my site I have used asp.net membership provider. I have all the tables of membership provider in my own database. when I deploy the site I get the following error: \ ![alt text](https://i.stack.imgur.com/FeeAx.jpg) My web.config file is as follows ``` <?xml version="1.0" encoding="UTF-8"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <!--<configSections> <sectionGroup name="elmah"> <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/> <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah"/> <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah"/> <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah"/> </sectionGroup> </configSections>--> <appSettings> <add key="myDSN" value="evodsn"/> </appSettings> <connectionStrings> <add name="evocon" connectionString="DSN=myDSN" providerName="System.Data.Odbc" /> </connectionStrings> <system.net> <mailSettings> <smtp> <network host="smtp.gmail.com" /> </smtp> </mailSettings> </system.net> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <httpHandlers> <!--<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/>--> <add verb="*" path="TinyMCEHandler.aspx" type="Moxiecode.TinyMCE.Web.HttpHandler, Moxiecode.TinyMCE" validate="false" /> <add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" /> </httpHandlers> <httpRuntime requestValidationMode="2.0" /> <!--<httpModules> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/> </httpModules>--> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /></assemblies> </compilation> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <globalization uiCulture="en" culture="en-GB" /> <authentication mode="Forms"> <forms loginUrl="~/Account.mvc/index" timeout="2880" protection="All" /> </authentication> <membership> <providers> <clear /> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="evocon" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" /> </providers> </membership> <profile> <providers> <clear /> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" applicationName="/" /> </providers> </profile> <roleManager enabled="false"> <providers> <clear /> <add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers> </roleManager> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace.--> <customErrors mode="Off"> <error statusCode="403" redirect="NoAccess.htm"/> <error statusCode="404" redirect="FileNotFound.htm"/> </customErrors> <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"> <namespaces> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="System.Linq" /> <add namespace="System.Collections.Generic" /> <add namespace="Telerik.Web.Mvc.UI" /> </namespaces> </pages> </system.web> <!-- The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS. --> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules runAllManagedModulesForAllRequests="true"> </modules> <handlers> <remove name="MvcHttpHandler" /> <remove name="UrlRoutingHandler" /> <add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </handlers> <directoryBrowse enabled="false" /> <defaultDocument> <files> <clear /> <add value="Default.aspx" /> <add value="Default.asp" /> <add value="Default.php" /> <add value="Default.htm" /> <add value="Default.html" /> <add value="Index.aspx" /> <add value="Index.asp" /> <add value="Index.php" /> <add value="Index.htm" /> <add value="Index.html" /> <add value="parking.htm" /> </files> </defaultDocument> </system.webServer> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> <!--<elmah> <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data"/> </elmah>--> <location path="App_Data" allowOverride="false"> <system.web> <authorization> <allow users="?" /> </authorization> </system.web> </location> </configuration> ```
Membership provider deployment issue
CC BY-SA 2.5
null
2011-01-04T20:19:19.050
2011-01-05T16:44:30.293
2011-01-05T06:28:45.733
326,010
326,010
[ "asp.net", "asp.net-mvc", "deployment", "asp.net-membership", "dsn" ]
4,598,224
1
4,607,746
null
12
59,420
How do you extend the axis line in R to cover the extent of your data? For example, in ![http://i.stack.imgur.com/xUvp3.png](https://i.stack.imgur.com/6MXPd.png) my data goes to about 2100 and I would like the line for the x axis to go that far, but not make a tickmark or label at 2100. Is this even possible in R? Here is the code used to make the above plot: ``` hist(x,breaks=50,xlab="...",main="",xlim=c(0,2100)) ``` Thanks.
Extend the length of a plot axis in R?
CC BY-SA 2.5
0
2011-01-04T20:43:55.907
2015-02-27T08:57:12.083
2015-02-27T08:57:12.083
3,687,447
20,177
[ "r", "plot" ]
4,598,349
1
4,599,109
null
0
1,472
I am working on a form where the user has to choose an option in two separate forms to pick a plan that works best for him. Both forms have 3 options each. I am trying to use Javascript so that when the user chooses one of the 3 options on each form the total changes by 5. Depending of the choices on both of the forms, an image displaying the grand total will change. I know that one can do this with a simple calc function and just change the text but my customer want's it changing the image it self instead of the text. This is the JavaScript that I have done so far: ``` function priceChange() { var hostOpt = document.getElementById("host").value; var emailOpt = document.getElementById("email").value; var priceImg = new Array() priceImg[0] = new Image(); priceImg[0].src = "images/total1.png"; priceImg[1] = new Image(); priceImg[1].src = "images/total2.png"; priceImg[2] = new Image(); priceImg[2].src = "images/total3.png"; priceImg[3] = new Image(); priceImg[3].src = "images/total4.png"; priceImg[4] = new Image(); priceImg[4].src = "images/total5.png"; if (hostOpt == "opt1" && emailOpt == "opt1") { document.getElementById("priceTotal").src = priceImg[0].src; } else if (hostOpt == "opt2" && emailOpt == "opt1") { document.getElementById("priceTotal").src = priceImg[1].src; } else if (hostOpt == "opt3" && emailOpt == "opt1") { document.getElementById("priceTotal").src = priceImg[2].src; } else if (hostOpt == "opt1" && emailOpt == "opt2") { document.getElementById("priceTotal").src = priceImg[1].src; } else if (hostOpt == "opt2" && emailOpt == "opt2") { document.getElementById("priceTotal").src = priceImg[2].src; } else if (hostOpt == "opt3" && emailOpt == "opt2") { document.getElementById("priceTotal").src = priceImg[3].src; } else if (hostOpt == "opt1" && emailOpt == "opt3") { document.getElementById("priceTotal").src = priceImg[2].src; } else if (hostOpt == "opt2" && emailOpt == "opt3") { document.getElementById("priceTotal").src = priceImg[3].src; } else if (hostOpt == "opt3" && emailOpt == "opt3") { document.getElementById("priceTotal").src = priceImg[4].src; } } ``` I am also including the two HTML forms below: ``` <div id="planHost" class="planOptions"> <h5>Hosting options:</h5> <br/> <form> <p><input type="radio" name="host" value="opt1" id="host"/>Base</p> <p><input type="radio" name="host" value="opt2" id="host"/>Premium (+$5)</p> <p><input type="radio" name="host" value="opt3" id="host"/>Ultra (+$10)</p> <br/><br/> <input type="button" id="changeHost" name="changeHost" value="Submit" onclick="priceChange()"> </form> </div> <div id="planEmail" class="planOptions"> <h5>Email options:</h5> <br/> <form> <p><input type="radio" name="email" value="opt1" id="email"/>Base</p> <p><input type="radio" name="email" value="opt2" id="email"/>Premium (+$5)</p> <p><input type="radio" name="email" value="opt3" id="email"/>Ultra (+$10)</p> <br/><br/> <input type="button" id="changeHost" name="changeHost" value="Submit" onclick="priceChange()"> </form> </div> ``` When the user makes a change on the form the selected image needs to change: ![alt text](https://i.stack.imgur.com/rQLMY.png) I have been working on this code and I got it working on all of the popular browsers but one -- Firefox. When I run the javascript code I get the error I am placing the updated code and the error I get below. Thanks for the help guy's and gal's! ![alt text](https://i.stack.imgur.com/Q4t7K.png) ``` function priceChange() /*Changes the plan price and the plan details*/ { for (var i=0; i<document.emailChange.email.length; i++) { if (document.emailChange.email[i].checked) { emailOpt = document.emailChange.email[i].value; } } for (var i=0; i<document.hostingChange.host.length; i++) { if (document.hostingChange.host[i].checked) { hostOpt = document.hostingChange.host[i].value; } } <!--alert("Your new total cost per month");--> var priceImgSrc1 = "images/total1.png"; var priceImgSrc2 = "images/total2.png"; var priceImgSrc3 = "images/total3.png"; var priceImgSrc4 = "images/total4.png"; var priceImgSrc5 = "images/total5.png"; var emailImgSrc1 = "images/email1.png"; var emailImgSrc2 = "images/email2.png"; var emailImgSrc3 = "images/email3.png"; var hostImgSrc1 = "images/host1.png"; var hostImgSrc2 = "images/host2.png"; var hostImgSrc3 = "images/host3.png"; var priceTotalImg = document.getElementById("priceTotal").src; if (hostOpt == "Hopt1" && emailOpt == "Eopt1") { var priceTotal.src = priceImgSrc1; var hostImage.src = hostImgSrc1; var emailImage.src = emailImgSrc1; } else if (hostOpt == "Hopt2" && emailOpt == "Eopt1") { var priceTotal.src = priceImgSrc2; var hostImage.src = hostImgSrc2; var emailImage.src = emailImgSrc1; } else if (hostOpt == "Hopt3" && emailOpt == "Eopt1") { var priceTotal.src = priceImgSrc3; var hostImage.src = hostImgSrc3; var emailImage.src = emailImgSrc1; } else if (hostOpt == "Hopt1" && emailOpt == "Eopt2") { var priceTotal.src = priceImgSrc2; var hostImage.src = hostImgSrc1; var emailImage.src = emailImgSrc2; } else if (hostOpt == "Hopt2" && emailOpt == "Eopt2") { var priceTotal.src = priceImgSrc3; var hostImage.src = hostImgSrc2; var emailImage.src = emailImgSrc2; } else if (hostOpt == "Hopt3" && emailOpt == "Eopt2") { var priceTotal.src = priceImgSrc4; var hostImage.src = hostImgSrc3; var emailImage.src = emailImgSrc2; } else if (hostOpt == "Hopt1" && emailOpt == "Eopt3") { var priceTotal.src = priceImgSrc3; var hostImage.src = hostImgSrc1; var emailImage.src = emailImgSrc3; } else if (hostOpt == "Hopt2" && emailOpt == "Eopt3") { var priceTotal.src = priceImgSrc4; var hostImage.src = hostImgSrc2; var emailImage.src = emailImgSrc3; } else if (hostOpt == "Hopt3" && emailOpt == "Eopt3") { var priceTotal.src = priceImgSrc5; var hostImage.src = hostImgSrc3; var emailImage.src = emailImgSrc3; } } ```
How can I change an image based on a form selection?
CC BY-SA 2.5
0
2011-01-04T20:58:49.420
2011-01-27T17:46:11.943
2011-01-21T02:14:25.627
415,527
415,527
[ "javascript", "html", "forms" ]
4,598,377
1
4,632,034
null
4
4,360
## How do I make a WrapPanel with some items having a Height of *? A deceptively simple question that I have been trying to solve. I want a control (or some XAML layout magickry) that behaves similar to a Grid that has some rows with a Height of *, but supports wrapping of columns. Hell; call it a WrapGrid. :) Here's a mockup to visualize this. Imagine a grid defined as such: ``` <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="400"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Button Grid.Row="0" MinHeight="30">I'm auto-sized.</Button> <Button Grid.Row="1" MinHeight="90">I'm star-sized.</Button> <Button Grid.Row="2" MinHeight="30">I'm auto-sized.</Button> <Button Grid.Row="3" MinHeight="90">I'm star-sized, too!</Button> <Button Grid.Row="4" MinHeight="30">I'm auto-sized.</Button> <Button Grid.Row="5" MinHeight="30">I'm auto-sized.</Button> </Grid> </Window> ``` ![](https://i.stack.imgur.com/MI9MT.png) What I want this panel to do is Here is a horrible MSPaint of some mockups I made detailing this process. ![](https://i.stack.imgur.com/vBZbL.png) Recall from the XAML that the auto-sized buttons have minHeights of 30, and the star-sized buttons have minHeights of 90. This mockup is just two grids side by side and I manually moved buttons around in the designer. Conceivably, this could be done programmatically and serve as a sort of convoluted solution to this. I will accept any solution whether it's through xaml or has some code-behind (though I would prefer pure XAML if possible since xaml code behind is tougher to implement in IronPython). --- # Meleak's Solution I managed to work out how to use Meleak's solution in my IPy app: 1) I compiled `WrapGridPanel.cs` into a DLL with `csc`: ``` C:\Projects\WrapGridTest\WrapGridTest>csc /target:library "WrapGridPanel.cs" /optimize /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\PresentationFramework.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\PresentationCore.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\WindowsBase.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xaml.dll" ``` Added the `/optimize` switch, this nets a small performance increase 2) I added it to my application's xaml with the following line. ``` xmlns:local="clr-namespace:WrapGridTest;assembly=WrapGridPanel.dll" ``` This runs fine, but it breaks the designer. I can't really find a workaround for this yet, it looks to be a bug in VS2010. So as a workaround, in order to be able to use the designer, I just add the WrapGridPanel programmatically at runtime: ``` clr.AddReference("WrapGridPanel.dll") from WrapGridTest import WrapGridPanel wgp = WrapGridPanel() ``` : In my IronPython application, resizing the window containing this WrapGridPanel is slow and hitchy. Could the `RecalcMatrix()` algorithm be optimized? Could it perhaps be called less frequently? Maybe overriding `MeasureOverride` and `ArrangeOverride`, as Nicholas suggested, would perform better? : According to the VS2010 Instrumentation Profiler, 97% of the time spent in RecalcMatrix() is spent on Clear() and Add(). Modifying each element in-place would be a huge performance improvement. I'm taking a whack at it myself but it's always tough modifying someone else's code... [http://i.stack.imgur.com/tMTWU.png](https://i.stack.imgur.com/tMTWU.png) ## Update: Performance issues have been mostly ironed out. Thanks Meleak! Here is a mockup of part of my actual application's UI, in XAML, if you wish to try it out. [http://pastebin.com/2EWY8NS0](http://pastebin.com/2EWY8NS0)
WPF WrapPanel with some items having a height of *
CC BY-SA 2.5
0
2011-01-04T21:01:40.890
2011-01-11T20:09:08.630
2011-01-11T20:09:08.630
456,568
456,568
[ ".net", "wpf", "visual-studio", "wpf-controls" ]
4,598,252
1
null
null
0
1,954
I am trying to use a fileupload, to add rows to my gridview on this page. This page is basically a simple admin panel where I can add data to my database. The file upload is used to grab the path of the file and upload the path to the database not the file. The problem is whenever i run my program pick a file, it uploads fine expect the path shows up as true not as the path. I would really appreciate help this is my entire code. the gridview and details view both use the same sqladapater ![alt text](https://i.stack.imgur.com/tibrg.png) ``` <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <br /> <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem>MSD</asp:ListItem> <asp:ListItem>OPS</asp:ListItem> </asp:DropDownList> <asp:Button ID="Button3" runat="server" Text="Department" /> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="New" />&nbsp;<asp:Button ID="Button4" runat="server" Text="Cancel" />&nbsp; <br /> <br /> <div> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <center> <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" AutoGenerateRows="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" Height="128px" Width="544px" Visible="False" CellPadding="4" ForeColor="#333333" GridLines="None" OnModeChanged="Button1_Click" > <Fields> <asp:TemplateField HeaderText="Order" SortExpression="Order"> <EditItemTemplate> <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Order") %>'></asp:TextBox> </EditItemTemplate> <InsertItemTemplate> <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Order") %>'></asp:TextBox> </InsertItemTemplate> <ItemTemplate> <asp:Label ID="Label3" runat="server" Text='<%# Bind("Order") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Department" SortExpression="Department"> <EditItemTemplate> <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Department") %>'></asp:TextBox> </EditItemTemplate> <InsertItemTemplate> <asp:TextBox ID="textboxdepartment" runat="server" Text='<%# Bind("Department") %>'></asp:TextBox> </InsertItemTemplate> <ItemTemplate> <asp:Label ID="Label4" runat="server" Text='<%# Bind("Department") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="DOC_Type" SortExpression="DOC_Type"> <EditItemTemplate> <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("DOC_Type") %>'></asp:TextBox> </EditItemTemplate> <InsertItemTemplate> <asp:TextBox ID="textboxtype" runat="server" Text='<%# Bind("DOC_Type") %>'></asp:TextBox> </InsertItemTemplate> <ItemTemplate> <asp:Label ID="Label5" runat="server" Text='<%# Bind("DOC_Type") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" /> <asp:TemplateField HeaderText="Revision" SortExpression="Revision"> <EditItemTemplate> <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("Revision") %>'></asp:TextBox> </EditItemTemplate> <InsertItemTemplate> <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("Revision") %>'></asp:TextBox> </InsertItemTemplate> <ItemTemplate> <asp:Label ID="textboxrevision" runat="server" Text='<%# Bind("Revision") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="DOC"> <EditItemTemplate> <asp:TextBox ID="textboxdate" runat="server" Text='<%# Bind("DOC") %>'></asp:TextBox> </EditItemTemplate> <InsertItemTemplate> <asp:FileUpload ID="FileUploadDOC" runat="server" Width="384px" Enabled='<%# Bind("DOC") %>' /> </InsertItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Bind("DOC") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Active" SortExpression="Active"> <EditItemTemplate> <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("Active") %>'></asp:TextBox> </EditItemTemplate> <InsertItemTemplate> <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("Active") %>'></asp:TextBox> </InsertItemTemplate> <ItemTemplate> <asp:Label ID="Label7" runat="server" Text='<%# Bind("Active") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Rev_Date" SortExpression="Rev_Date"> <EditItemTemplate> <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Rev_Date") %>'></asp:TextBox> </EditItemTemplate> <InsertItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Rev_Date") %>'></asp:TextBox> </InsertItemTemplate> <ItemTemplate> <asp:Label ID="Label2" runat="server" Text='<%# Bind("Rev_Date") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" Visible="False" /> <asp:CommandField ShowInsertButton="True" ShowCancelButton="False" /> </Fields> <FooterStyle BackColor="#5D7B9D" BorderStyle="None" Font-Bold="True" ForeColor="White" /> <CommandRowStyle BackColor="#E2DED6" BorderStyle="None" Font-Bold="True" /> <RowStyle BackColor="#F7F6F3" BorderStyle="None" ForeColor="#333333" /> <FieldHeaderStyle BackColor="#E9ECF1" BorderStyle="None" Font-Bold="True" /> <EmptyDataRowStyle BorderStyle="None" /> <PagerStyle BackColor="#284775" BorderStyle="None" ForeColor="White" HorizontalAlign="Center" /> <HeaderStyle BackColor="#5D7B9D" BorderStyle="None" Font-Bold="True" ForeColor="White" /> <InsertRowStyle BorderStyle="None" /> <EditRowStyle BackColor="#999999" BorderStyle="None" /> <AlternatingRowStyle BackColor="White" BorderStyle="None" ForeColor="#284775" /> </asp:DetailsView> &nbsp; <br /> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> <asp:BoundField DataField="Order" HeaderText="Order" SortExpression="Order" /> <asp:BoundField DataField="Department" HeaderText="Department" SortExpression="Department" /> <asp:BoundField DataField="DOC_Type" HeaderText="DOC_Type" SortExpression="DOC_Type" /> <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" /> <asp:BoundField DataField="Revision" HeaderText="Revision" SortExpression="Revision" /> <asp:BoundField DataField="DOC" HeaderText="DOC" SortExpression="DOC" /> <asp:BoundField DataField="Active" HeaderText="Active" SortExpression="Active" /> <asp:BoundField DataField="Rev_Date" HeaderText="Rev_Date" SortExpression="Rev_Date" /> <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" Visible="False" /> </Columns> </asp:GridView> <br /> &nbsp;</ContentTemplate> </asp:UpdatePanel> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CABCIntranetConnectionString %>" DeleteCommand="DELETE FROM [sop] WHERE [ID] = @original_ID AND (([Order] = @original_Order) OR ([Order] IS NULL AND @original_Order IS NULL)) AND (([Department] = @original_Department) OR ([Department] IS NULL AND @original_Department IS NULL)) AND (([DOC Type] = @original_DOC_Type) OR ([DOC Type] IS NULL AND @original_DOC_Type IS NULL)) AND (([Title] = @original_Title) OR ([Title] IS NULL AND @original_Title IS NULL)) AND (([Revision] = @original_Revision) OR ([Revision] IS NULL AND @original_Revision IS NULL)) AND (([DOC] = @original_DOC) OR ([DOC] IS NULL AND @original_DOC IS NULL)) AND (([Rev Date] = @original_Rev_Date) OR ([Rev Date] IS NULL AND @original_Rev_Date IS NULL)) AND (([Active] = @original_Active) OR ([Active] IS NULL AND @original_Active IS NULL))" InsertCommand="INSERT INTO [sop] ([Order], [Department], [DOC Type], [Title], [Revision], [DOC], [Rev Date], [Active]) VALUES (@Order, @Department, @DOC_Type, @Title, @Revision, @DOC, @Rev_Date, @Active)" SelectCommand="SELECT [Order], [Department], [DOC Type] AS DOC_Type, [Title], [Revision], [DOC], [Rev Date] AS Rev_Date, [Active], [ID] FROM [sop] WHERE ([Department] = @Department) ORDER BY [Order]" UpdateCommand="UPDATE [sop] SET [Order] = @Order, [Department] = @Department, [DOC Type] = @DOC_Type, [Title] = @Title, [Revision] = @Revision, [DOC] = @DOC, [Rev Date] = @Rev_Date, [Active] = @Active WHERE [ID] = @original_ID AND (([Order] = @original_Order) OR ([Order] IS NULL AND @original_Order IS NULL)) AND (([Department] = @original_Department) OR ([Department] IS NULL AND @original_Department IS NULL)) AND (([DOC Type] = @original_DOC_Type) OR ([DOC Type] IS NULL AND @original_DOC_Type IS NULL)) AND (([Title] = @original_Title) OR ([Title] IS NULL AND @original_Title IS NULL)) AND (([Revision] = @original_Revision) OR ([Revision] IS NULL AND @original_Revision IS NULL)) AND (([DOC] = @original_DOC) OR ([DOC] IS NULL AND @original_DOC IS NULL)) AND (([Rev Date] = @original_Rev_Date) OR ([Rev Date] IS NULL AND @original_Rev_Date IS NULL)) AND (([Active] = @original_Active) OR ([Active] IS NULL AND @original_Active IS NULL))" ConflictDetection="CompareAllValues" OldValuesParameterFormatString="original_{0}"> <DeleteParameters> <asp:Parameter Name="original_ID" Type="Int32" /> <asp:Parameter Name="original_Order" Type="Int32" /> <asp:Parameter Name="original_Department" Type="String" /> <asp:Parameter Name="original_DOC_Type" Type="String" /> <asp:Parameter Name="original_Title" Type="String" /> <asp:Parameter Name="original_Revision" Type="Int32" /> <asp:Parameter Name="original_DOC" Type="String" /> <asp:Parameter Name="original_Rev_Date" Type="String" /> <asp:Parameter Name="original_Active" Type="String" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Order" Type="Int32" /> <asp:Parameter Name="Department" Type="String" /> <asp:Parameter Name="DOC_Type" Type="String" /> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="Revision" Type="Int32" /> <asp:Parameter Name="DOC" Type="String" /> <asp:Parameter Name="Rev_Date" Type="String" /> <asp:Parameter Name="Active" Type="String" /> <asp:Parameter Name="original_ID" Type="Int32" /> <asp:Parameter Name="original_Order" Type="Int32" /> <asp:Parameter Name="original_Department" Type="String" /> <asp:Parameter Name="original_DOC_Type" Type="String" /> <asp:Parameter Name="original_Title" Type="String" /> <asp:Parameter Name="original_Revision" Type="Int32" /> <asp:Parameter Name="original_DOC" Type="String" /> <asp:Parameter Name="original_Rev_Date" Type="String" /> <asp:Parameter Name="original_Active" Type="String" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="Order" Type="Int32" /> <asp:Parameter Name="Department" Type="String" /> <asp:Parameter Name="DOC_Type" Type="String" /> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="Revision" Type="Int32" /> <asp:Parameter Name="DOC" Type="String" /> <asp:Parameter Name="Rev_Date" Type="String" /> <asp:Parameter Name="Active" Type="String" /> </InsertParameters> <SelectParameters> <asp:ControlParameter ControlID="DropDownList1" DefaultValue="MSD" Name="Department" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource> </div> </form> </body> </html> Imports System.Data.Sql Imports System.Data.SqlClient Imports System.Data Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click DetailsView1.Visible = True DetailsView1.ChangeMode(DetailsViewMode.Insert) Dim tbox As TextBox = TryCast(DetailsView1.FindControl("textbox1"), TextBox) tbox.Text = DateTime.Now.ToShortDateString() Dim tbox1 As TextBox = TryCast(DetailsView1.FindControl("textboxdepartment"), TextBox) tbox1.Text = DropDownList1.SelectedItem.Text Dim tbox2 As TextBox = TryCast(DetailsView1.FindControl("textbox6"), TextBox) tbox2.Text = "True" Dim tbox3 As TextBox = TryCast(DetailsView1.FindControl("textboxtype"), TextBox) tbox3.Text = "S.O.P" Dim tbox4 As TextBox = TryCast(DetailsView1.FindControl("textbox5"), TextBox) tbox4.Text = "1" Dim tbox5 As TextBox = TryCast(DetailsView1.FindControl("textbox2"), TextBox) tbox5.Text = GridView1.Rows.Count + 1 End Sub Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click UpdatePanel1.Update() End Sub Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click DetailsView1.Visible = False End Sub End Class ```
help using file upload in details view
CC BY-SA 2.5
null
2011-01-04T20:48:21.103
2011-01-05T07:03:53.450
null
null
497,470
[ "asp.net", "vb.net", "insert", "detailsview" ]
4,598,413
1
4,599,416
null
2
3,022
I´m extending the Gridview. Right now, i have this: ![alt text](https://i.stack.imgur.com/zuVhb.png) My goal is to change it till i get this (Paint): ![alt text](https://i.stack.imgur.com/nhixf.png) I think that it can be done thru the "OnRowCreated". But dont have a clue on how. ``` protected override void OnRowCreated(GridViewRowEventArgs e) { base.OnRowCreated(e); if (e.Row.RowType == DataControlRowType.Footer) { } } ``` Can anyone help me out on this one? Regards
ASP.NET GridView | How to build a footer like exact copy of header? (Visual and Methods)
CC BY-SA 2.5
null
2011-01-04T21:05:09.997
2011-01-04T23:25:26.777
null
null
353,580
[ "asp.net", "gridview", "header", "footer" ]
4,598,416
1
4,598,435
null
1
964
I'm messing around with Fourier transformations. Now I've created a class that does an implementation of the DFT (not doing anything like FFT atm). This is the implementation I've used: ``` public static Complex[] Dft(double[] data) { int length = data.Length; Complex[] result = new Complex[length]; for (int k = 1; k <= length; k++) { Complex c = Complex.Zero; for (int n = 1; n <= length; n++) { c += Complex.FromPolarCoordinates(data[n-1], (-2 * Math.PI * n * k) / length); } result[k-1] = 1 / Math.Sqrt(length) * c; } return result; } ``` And these are the results I get from `Dft({2,3,4})` ![alt text](https://i.stack.imgur.com/3a2Vd.png) Well it seems pretty okay, since those are the values I expect. There is only one thing I find confusing. And it all has to do with the rounding of doubles. First of all, why are the first two numbers not exactly the same (0,8660..443 ) vs (0,8660..443). And why can't it calculate a zero, where you'd expect it. I know 2.8E-15 is pretty close to zero, but well it's not. Anyone know how these, marginal, errors occur and I can and want to do something about it. It might seem that there's not a real problem, because it's just small errors. However, how do you deal with these rounding errors if you're for example comparing 2 values. ``` 5,2 + 0i != 5,1961524 + i2.828107*10^-15 ``` Cheers
Fourier transform rounding error
CC BY-SA 2.5
null
2011-01-04T21:05:37.167
2011-01-04T21:24:35.990
2011-01-04T21:24:35.990
120,261
241,513
[ "c#", "floating-point", "double", "fft" ]
4,598,501
1
null
null
1
933
The Tweetie (now Twitter) app has a pop up Network Reachability warning. This also done in the Foursquare and Hashable apps (as far as I know). Is there example code of this implementation somewhere? Thanks. ![Tweetie network Connection warning](https://i.stack.imgur.com/82AOE.png)
Network Connection Warning
CC BY-SA 2.5
null
2011-01-04T21:15:16.030
2011-01-04T21:29:38.180
null
null
528,978
[ "iphone", "ios", "twitter", "reachability", "hashable" ]
4,599,009
1
4,599,028
null
3
16,107
I took the [Codility.com demo test](http://codility.com/demo/run/). My program returned the wrong value for one of the unit tests: > TEST extreme_large_numbers Sequence with extremly large numbers testing arithmetic overflow.TIME 0.056 s.RESULT WRONG ANSWER got 2, but it is not equilibrium point, sum[0..1]=4294967294, sum[3..3]=-2 Ok, since I couldn't see the problem in my code at first, I tried running it in a Visual Studio project. Then the compiler caught that `4294967294` was too big for an `int`. It needs to be an `uint`, or a `long`. So I changed everything to `long` and it worked in VS. However, the demo test does not let you change the function input/return types to `long`. - - `4294967294``int[]` ![alt text](https://i.stack.imgur.com/9cQUK.png)
Confused about Codility demo test
CC BY-SA 2.5
0
2011-01-04T22:12:42.170
2018-06-30T03:46:57.673
null
null
287,311
[ "c#", "algorithm" ]
4,599,180
1
4,599,243
null
39
76,335
I'm using Eclipse for development because of all the things IntelliJ can't do (e.g. highlight all instances of a variable) and because IntelliJ is dog slow over a remote connection. But because I still don't have Maven integrated completely into Eclipse, I have to switch back to IntelliJ to compile and run my project using Tomcat. How can I tell IntelliJ to detect all files that have changed on the file system and recompile them? (I don't want to manually open each changed file to get IntelliJ to detect the change.) In Eclipse I would just Refresh the project tree []... : 1. Eclipse has a feature (named "Refresh Using native hooks or polling") which you can enable to automatically detect changes and synchronise the perspective when any underlying changes are detected in the filesystem (see images below). This is quite handy and eliminates the need to manually refresh the project when using build tools - where files/directories get created in the project directory structure. Is there anything similar for Intellij (explicit setting or otherwise) that eliminates having to click a button to synchronize the view with filesystem changes? !['Refresh Using native hooks or polling' setting](https://i.stack.imgur.com/okLzM.png)
have IntelliJ IDEA refresh the project and detect changed files
CC BY-SA 3.0
0
2011-01-04T22:36:31.163
2019-07-18T09:27:42.580
2013-05-14T18:37:11.897
37,651
421,049
[ "eclipse", "file", "intellij-idea", "refresh" ]
4,599,419
1
4,606,778
null
0
1,398
I'm working in Gnuplot, and I have a graph looking roughly like the following: ![Say ](https://i.stack.imgur.com/8Arn0.png) If I want to have the color of the line change color depending on the curves's values, what's the most straightforward way to make that happen? Thanks!
Heat Map Histogram with gnuplot
CC BY-SA 2.5
null
2011-01-04T23:12:54.813
2011-10-07T07:46:51.893
null
null
529,717
[ "graph", "gnuplot" ]
4,599,743
1
null
null
4
1,545
I see a backdrop being added to my launch icon on the Samsung Galaxy S devices. I need this backdrop changed to a custom backdrop which we created. I know this can be changed since apps like"Daily Briefing" have their own cloud like backdrop making the launch icon look really rich. If anyone does know how to change this backdrop please let me know. > Take a look at the Icon for . You can notice the cloud backdrop for DAILY BRIEFING. I would like to control the Icon backdrop and if possible the size of the Icon Eg. See difference between the size of and ![alt text](https://i.stack.imgur.com/1w9yB.png) Thanks in advance. Appreciate your help.
Icon backdrop on Samsung Galaxy S? how to change this?
CC BY-SA 2.5
0
2011-01-05T00:11:21.813
2011-01-05T21:24:10.717
2011-01-05T21:24:10.717
324,446
324,446
[ "android", "icons", "launcher" ]
4,599,833
1
4,600,589
null
4
3,590
I have one error on my page and it is stopping some other javascript from functioning correctly: ``` $.ui.dialog.defaults is undefined $.ui.dialog.defaults.bgiframe = true; ``` ![error](https://i.stack.imgur.com/njXLJ.png) What steps can I take to fix this error? I have this in the head ``` <script language="JavaScript" type="text/javascript" src="http://www.mysite.com/demo/system/ext/jquery/jquery.js"></script> <script language="JavaScript" type="text/javascript" src="http://www.mysite.com/demo/system/ext/jquery/jquery-ui.js"></script> ``` Thanks
How do I fix the error $.ui.dialog.defaults is undefined
CC BY-SA 2.5
0
2011-01-05T00:30:40.503
2011-01-05T19:56:24.300
2011-01-05T03:31:07.110
479,863
437,806
[ "jquery", "jquery-ui" ]
4,599,975
1
4,600,178
null
10
74,058
I've seen this very simple selectbox on youtube, where the select options are visible on hover (instead of clicking), as seen in following screenshot. ![alt text](https://i.stack.imgur.com/HiMFW.png) I'm trying to create similar effect in the following simple select box. Can someone please help how this can be done? Thanks. ``` <select name="size"> <option value="small">Small</option> <option value="medium">Medium</option> <option value="large">Large</option> </select> ```
Html Select box options on Hover?
CC BY-SA 2.5
0
2011-01-05T01:03:25.353
2023-01-14T17:59:48.880
2015-06-19T14:30:03.543
401,672
561,860
[ "html", "css", "html-select" ]
4,599,985
1
4,602,508
null
8
3,709
I have problem which is killing me. Below is simple example ``` <Grid Name="_grid"> <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="36,33,0,0" Name="button" VerticalAlignment="Top" Width="75" /> <Button Content="Enlarge through animation" Height="23" Margin="172,33,24,0" Name="_animateButton" VerticalAlignment="Top" Click="_animateButton_Click" /> <Button Content="Enlarge through simple heigh changing" Height="23" Margin="172,62,24,0" Name="_resizeButton" VerticalAlignment="Top" Click="_resizeButton_Click" /> </Grid> ``` And in code behind ``` private void _resizeButton_Click(object sender, RoutedEventArgs e) { button.Height += 10; } private void _animateButton_Click(object sender, RoutedEventArgs e) { Storyboard storyboard = new Storyboard(); DoubleAnimation animation = new DoubleAnimation(button.Height + 10, new Duration(new TimeSpan(0, 0, 0, 1))); storyboard.Children.Add(animation); Storyboard.SetTargetName(animation, button.Name); Storyboard.SetTargetProperty(animation, new PropertyPath(HeightProperty)); storyboard.Begin(_grid); } ``` Application looks like this ![alt text](https://i.stack.imgur.com/jYtjv.png) After pressing _resizeButton left button enlarge immediately. Then I'm pressing _animateButton - left button is enlarging slowly. After this I'm pressing _resizeButton again and nothing is happening. Why is that? I have noticed that the same thing is when animating Top property
Why after animating height setting this property directly stops working
CC BY-SA 2.5
0
2011-01-05T01:05:41.347
2011-01-05T09:29:03.780
null
null
406,531
[ "c#", "wpf", "animation", "dependency-properties" ]
4,600,270
1
null
null
2
9,326
I have a `DataGrid` with few editable cells. Users can tab through each cells to edit the content. Now I want to implement the right arrow key working just like tab. So when a user finishes editing one cell and they press right arrow key, the focus moves to the next editable cell and starts editing. For example, I have follow screen: ![](https://i.stack.imgur.com/uxy5S.png) When user press right arrow key, I want my datagrid to be like this: ![](https://i.stack.imgur.com/5FI4M.png)
How to implement WPF Datagrid arrow key navigation like Tab navigation
CC BY-SA 3.0
0
2011-01-05T02:16:59.230
2017-10-16T02:49:04.217
2017-10-16T02:49:04.217
1,033,581
563,383
[ "wpf", "wpfdatagrid", "arrow-keys" ]
4,600,265
1
4,600,484
null
7
5,886
I'm trying to recreate the World of Warcraft action bar for learning purposes. So far I have the bar, and the individual slots are Droppable. What can I do so when the yellow div is dropped inside of the container, it is centered INSIDE the .item div? ``` @{ ViewBag.Title = "Home Page"; } <script language="JavaScript"> $(function () { $(".draggable").draggable(); $(".item").droppable({ drop: function (event, ui) { $(this) .addClass("ui-state-highlight") .find("p") .html("Dropped!"); } }); }); </script> <div class="draggable"> </div> <div class="bar"> <div class="item"> <p>a</p> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> <div class="item"> </div> </div> ``` ![alt text](https://i.stack.imgur.com/Ep4ET.jpg)
How can I use jQuery to snap a dropped item inside a div?
CC BY-SA 2.5
0
2011-01-05T02:15:41.270
2011-01-05T03:12:57.630
2011-01-05T02:25:48.663
null
null
[ "jquery", "drag" ]
4,600,772
1
4,600,983
null
6
2,512
I want to add WPF Path to `InkCanvas` and use selection to select WPF Path. So, I use this code. ``` System.Windows.Shapes.Path path = drawCanvas.Children[i] as System.Windows.Shapes.Path; drawCanvas.Children.RemoveAt(i); inkCanvas.Children.Add(path); ``` This is the output. I have to select WPF Path from 0,0 because `Actualwidth` and `ActualHeight` start from 0,0. ![alt text](https://i.stack.imgur.com/QVPxy.jpg) How do I select absolute WPF Path? Thanks Now, I can select it absolutely by using this code. ``` System.Windows.Shapes.Path path = drawCanvas.Children[i] as System.Windows.Shapes.Path; drawCanvas.Children.RemoveAt(i); path.Margin = new Thickness(-getMinX(path), -getMinY(path), 0, 0); containPath.Children.Add(path); containPath.Width = getMaxX(path) - getMinX(path); containPath.Height = getMaxY(path) - getMinY(path); containPath.Margin = new Thickness(getMinX(path), getMinY(path), 0, 0); inkCanvas.Children.Add(containPath); ```
Why ActualWidth and ActualHeight start from 0,0?
CC BY-SA 3.0
null
2011-01-05T04:18:17.707
2013-06-13T15:38:27.387
2013-06-13T15:37:16.787
305,637
556,917
[ "wpf", "selection", "inkcanvas", "actualwidth", "actualheight" ]
4,600,814
1
4,607,340
null
0
393
I've been using swfobject for a recent project, and its great. But now that I've managed to get FlashSwitcher up and running in Firefox I notice that when I'm running Flash Player 7 the info displayed when I am running a version lower than I've specified has been customised (in this case by the Moodle page the the swfobject embed code sits in). Attached is a screenshot of that output SWF, as generated by Moodle. I can confirm that some of my users also see this, so my FlashSwitcher is functioning correctly. Most of my use cases are outside of the Moodle context, they're standalone, what I'm after is exactly they customised it, how I can change their customisation, and how I can do the same when the swfobject detection is standalone. Please note that enforcing the user to upgrade their Flash Player plugin via ExpressInstall has been frowned upon by the client, they want suggestive actions and a link - but no auto installs or similar. My implementation uses the 'twice cooked' method as I have an accessibility requirement to show non-Flash content should a user have neither Flash, Javascript or both. Here's my embed method call, which executes when a YUI2 document load event fires: ``` swfobject.embedSWF("../../swf/video-loader.swf", "flash_object_a", "877", "400", "8.0"); ``` Ultimately I want to customise this "old version" output to be something I've created/written. ![Screenshot of swfobject 2.1 old version notification when in a Moodle context](https://i.stack.imgur.com/BtbsS.png) cheers, d
How to customise "old version" SWF output, with swfobject 2.1?
CC BY-SA 2.5
null
2011-01-05T04:27:15.663
2011-01-05T17:46:31.303
null
null
283,933
[ "javascript", "flash", "version", "swfobject", "moodle" ]
4,600,918
1
4,600,992
null
3
2,467
I just did some testing for Int PK join Vs Guid PK. Tables structure and number of records looking like that: ![alt text](https://i.stack.imgur.com/gkQdK.jpg) Performance of CRUD operations using EF4 are pretty similar in both cases. There is well known statement that Int PK has better performance rather than strings when used in joins. So SQL server execution plan with INNER JOINS are completely different Here is an execution plan: ![alt text](https://i.stack.imgur.com/Y9oxR.jpg) As i understand according with execution plan from above Int join has better performance because it is taking less resources for Clustered index scan and it is go in two ways, am i right? May be some one may explain this execution plan in more details? Is this example is enough to show that Int PK has better performance in joins?
Int PK inner join Vs Guid PK inner Join on SQL Server. Execution plan
CC BY-SA 2.5
null
2011-01-05T04:50:18.087
2011-01-05T10:07:34.790
2011-01-05T05:23:47.053
415,078
415,078
[ "sql-server", "database", "sql-server-2008", "database-design" ]
4,601,110
1
4,601,759
null
2
405
Hi Please find the attached image this is my html & css code ``` <h2 style="margin:0px 0px 2px 0px" class="widgettitle3">Contact Response for your request</h2> <div class="tablediv"> <div class="rowdiv"> <div class="celldiv"> <ul class="gallery"> <li> <a href='http://localhost/shadi/public/partial.html' class='boxy standardLink' title='9'><em><strong>9</strong></em><img src="http://localhost/shadi//img/images/50x50/9.jpeg" border="0"></a> </li> </ul> </div> <div class="celldiv boldText">Contact Details :</div><div class="celldiv"><input type="text" style="height:28px;" maxlength="150" size="40" id="9" name="9" class="required" ></div> <div class="celldiv">&nbsp;<input type="button" class="btn" value="Submit" onclick="javascript:processProvideContact('9');">&nbsp;<input type="button" class="btn" value="Decline" onclick="javascript:processDecline('9');"></div> </div> </div> .tablediv { display: table; height:100%; width:100%; border:1px solid red; border-spacing: 0px; /*cellspacing:poor IE support for this*/ border-collapse: separate; } .celldiv { float: left; /*fix for buggy browsers*/ display: table-cell; position:relative; margin:1px 1px 1px 0px; padding:1px 1px 1px 0px; border:1px solid black; vertical-align: middle; } .rowdiv { display: table-row; width: auto; } ``` ![alt text](https://i.stack.imgur.com/gXSDu.png) middle and third column is not vertically center position
Vertically center Align div Problem along with image
CC BY-SA 2.5
null
2011-01-05T05:29:19.520
2011-01-05T07:33:28.593
null
null
187,570
[ "html", "css" ]
4,601,267
1
4,602,457
null
3
4,777
In my iPhone app, I have ASCII art, which I am sharing via email and SMS. I have inserted the ASCII art into the Sqlite database along with the newline character and spaces. Problem is when I send them through SMS and Email, the whole ASCII art comes in left alignment and spacing between characters is lost. ASCII Art fetched in Label in my app is as below ![alt text](https://i.stack.imgur.com/yx6u8.png) Same ASCII Art when inserted to Email API (MFMailComposeViewController) is as below ![alt text](https://i.stack.imgur.com/WNz3R.png) Same ASCII Art when inserted to SMS API (MFMessageComposeViewController) is as below ![alt text](https://i.stack.imgur.com/4SWWN.png) How to maintain the spaces? How to make the ASCII art look proper in Mail as well as SMS API View?
Incorrect alignment when sending ASCII Art via SMS and Email in iPhone SDK
CC BY-SA 3.0
0
2011-01-05T06:06:21.843
2018-03-18T18:24:24.337
2018-03-18T18:23:27.963
472,495
463,857
[ "iphone", "cocoa-touch", "email", "sms", "ascii-art" ]