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
5,240,799
1
null
null
5
3,490
Among the local user accounts on the server, which one is loaded when I set `Load User Profile` to `True` on the application pool identity? I need to know this because my application need to attach database file using `User Instance = True`. ![enter image description here](https://i.stack.imgur.com/MspbQ.png)
Which user is actually loaded when we set Load User Profile = True to the application pool identity?
CC BY-SA 2.5
0
2011-03-09T02:57:34.300
2021-01-18T10:49:37.527
null
null
397,524
[ "asp.net", "sql-server", "iis" ]
5,241,368
1
null
null
0
659
I'm trying to make my Silverlight app behave like any other web app for layout. I have followed [this thread](https://stackoverflow.com/questions/726964/filling-browser-window-with-silverlight-application/2874443#2874443) that shows how to expand the app to fill the available space when the app takes up less area than the client window. However, I cannot seem to find code that does the opposite. That is, when my app becomes larger than the client area of the browser, I would like the browser to display the appropriate scroll bars. Currently, the code above simply clips the application at the size of the browser. Here is an simple example app: ``` <UserControl x:Class="SilverlightWidthAndHeight.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" d:DesignHeight="300" d:DesignWidth="400"> <Grid x:Name="LayoutRoot" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Rectangle Grid.Row="0" Fill="Blue" /> <TextBlock Grid.Row="0" Foreground="White" FontSize="20" FontWeight="Bold" Margin="5" Text="Header" /> <Rectangle Grid.Row="1" Fill="Red" /> <StackPanel Grid.Row="1" Orientation="Horizontal"> <TextBlock x:Name="txtMiddleRow" Foreground="White" FontSize="28" Text="Middle Row" /> <Button x:Name="btnGrow" Content="Grow" VerticalAlignment="Center" Margin="5" /> </StackPanel> <Rectangle Grid.Row="2" Fill="Blue" /> <TextBlock Grid.Row="2" Foreground="White" FontSize="20" FontWeight="Bold" Margin="5" Text="Footer" /> </Grid> </UserControl> ``` As you can see, it fills the space appropriately: ![Silverlight App Extended](https://i.stack.imgur.com/NIMIA.png) But if I press the "Grow" button to increase the font size of the TextBlock: ![Silverlight App Clipped](https://i.stack.imgur.com/3uq9Z.png) I understand that I can wrap everything in a ScrollViewer, but it looks like such a hack to have a scrollbar immediately to the left of the browser scrollbar. Thanks, wTs
Using Browser ScrollBars for Silverlight4 App
CC BY-SA 2.5
null
2011-03-09T04:36:39.373
2011-03-09T05:56:37.617
2017-05-23T11:48:22.880
-1
285,417
[ "silverlight", "silverlight-4.0", "resize" ]
5,241,474
1
5,267,634
null
0
12,306
Having some trouble with properly representing data in a chart in excel 2007. Basic Concept (A daily process): Files arrive in batch automatically in a folder for processing. The file time in the table is the time the last file arrived. Processing is done on the files as indicated by the start and end time under processing. The processing can begin on files before the last file for the day arrives. In this case the start processing time would be less then file arrival time. There is an overlap in arrival durations and processing. Problem: How do I get excel to show the red bar (processing times) to start from (lets say for the 21st Feb) 3:46 to 3:59 (all times in 24hr format) I don't want stack chart because I can't represent gaps or overlaps between different stages effectively. ![enter image description here](https://i.stack.imgur.com/E14FN.jpg) One possible solution I been trying was to display the duration of the processing time and then offset that duration by the start time (where start time is taken from 00:00 hours). However excel insists on starting the bars from 00:00 Thanks
Excel Chart - Offset (Start from non-zero)
CC BY-SA 2.5
null
2011-03-09T04:49:53.143
2011-03-11T00:25:38.453
null
null
451,954
[ "excel", "excel-2007" ]
5,241,678
1
5,242,197
null
1
673
I'm currently building a project using . It builds and runs with no errors or warnings. It's simply the AppDelegate and a TTLauncher class. ## AppDelegate.h ``` #import <Three20/Three20.h> @interface AppDelegate : NSObject <UIApplicationDelegate> { } @end ``` ## AppDelegate.m ``` #import "AppDelegate.h" #import "LauncherController.h" @implementation AppDelegate //============================================================= // UIApplicationDelegate - (void)applicationDidFinishLaunching:(UIApplication*)application { TTNavigator* navigator = [TTNavigator navigator]; navigator.persistenceMode = TTNavigatorPersistenceModeAll; TTURLMap* map = navigator.URLMap; [map from:@"*" toViewController:[TTWebController class]]; [map from:@"tt://launcher" toViewController:[LauncherController class]]; [navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://launcher"]]; } - (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; return YES; } @end ``` ## LauncherController.h ``` #import <Three20/Three20.h> @interface LauncherController : TTViewController <TTLauncherViewDelegate> { TTLauncherView* _launcherView; } @end ``` ## LauncherController.m ``` #import "LauncherController.h" @implementation LauncherController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { self.title = @"Launcher Screen"; } return self; } - (void)dealloc { [super dealloc]; } - (void)loadView { [super loadView]; _launcherView = [[TTLauncherView alloc] initWithFrame:self.view.bounds]; _launcherView.backgroundColor = [UIColor whiteColor]; _launcherView.delegate = self; _launcherView.columnCount = 2; _launcherView.pages = [NSArray arrayWithObjects: [[[TTLauncherItem alloc] initWithTitle:@"New Position" image:@"bundle://ic_positions2.png" URL:nil] autorelease], nil]; [self.view addSubview:_launcherView]; } - (void)launcherView:(TTLauncherView*)launcher didSelectItem:(TTLauncherItem*)item { } - (void)launcherViewDidBeginEditing:(TTLauncherView*)launcher { [self.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:_launcherView action:@selector(endEditing)] autorelease] animated:YES]; } - (void)launcherViewDidEndEditing:(TTLauncherView*)launcher { [self.navigationItem setRightBarButtonItem:nil animated:YES]; } @end ``` Any thoughts on why I'd get the following screen? ![Blank screen, iPhone Simulator](https://i.stack.imgur.com/JAeEP.png)
Three20 just giving a black screen?
CC BY-SA 2.5
null
2011-03-09T05:19:27.463
2011-03-09T06:31:21.280
null
null
50,391
[ "iphone", "ios-simulator", "three20" ]
5,241,965
1
5,282,575
null
0
361
I want to display an image as an overlay to MKMapView. The image is displayed, but the problem is it does not fit the visible rect of the mkmapview, it is showing 4 images instead of one. How do I fix it. screenshot of the image ![image overlay of mkmapview](https://i.stack.imgur.com/Es7VA.png) ``` - (void)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale inContext:(CGContextRef)context { ``` UIGraphicsPushContext(context); ``` CGRect rect=[self rectForMapRect:mapRect]; NSLog(@"rect width:%f height:%f",rect.size.width,rect.size.height); [scaledImage drawInRect:[self rectForMapRect:mapRect] blendMode:kCGBlendModeNormal alpha:1.0]; //[scaledImage drawInRect:CGRectMake(0, 0, 320, 367) blendMode:kCGBlendModeOverlay alpha:.07]; UIGraphicsPopContext(); ``` } even I tried resize of image but no use..
repeating UIImage in mkmapviewoverlay
CC BY-SA 2.5
null
2011-03-09T05:59:07.887
2011-05-02T13:20:43.270
2011-03-09T06:19:40.067
485,050
485,050
[ "iphone", "uiimage", "mkmapview" ]
5,242,198
1
null
null
1
729
I have a List-View named lvList, two textboxes named txtNumber and txtName respectively. > FullRowSelect = TrueMultiSelect = False When I select a row, I want the respective Number and Item-Name to be displayed in the below text-boxes. How can I achieve this ? ![enter image description here](https://i.stack.imgur.com/BF7nL.jpg) Working in VS-2010 (Winforms)
How to retrieve data from the selected row?
CC BY-SA 2.5
null
2011-03-09T06:31:21.373
2011-03-09T14:46:28.920
null
null
590,666
[ "winforms", "listview", "textbox" ]
5,242,236
1
null
null
7
3,299
Well I know it is meant to italicize text, but I have been using firebug on Facebook and I cannot help but realize how much they use the `<i>` tags in their layout. ![i tag in Facebook photo layout](https://i.stack.imgur.com/137ca.png) For example, for the photo thumbnail gallery, Facebook uses the `<i>` tag inside a div and places a background image style for the tag in the photo gallery. Are there more tricks/tips/uses to the tag ?
What is the <i> tag use for?
CC BY-SA 2.5
0
2011-03-09T06:37:30.367
2011-03-09T07:09:23.430
2011-03-09T07:05:21.640
321,505
649,009
[ "html", "css", "tags" ]
5,242,508
1
5,251,752
null
3
1,952
The task: Make the text content of the InlineUIContainer to be inline with the outer text. The standard behaviour of the InlineUIContainer content is when the bottom edge is inline with the outer text. It is possible to shift the position of InlineUIContainer with RenderTransform, but the value of Y has to be chosen for each font type and size - not a perfect way. ``` <RichTextBox> <Paragraph> LLL <InlineUIContainer> <Border Background="LightGoldenrodYellow"> <TextBlock Text="LLL"/> </Border> </InlineUIContainer> LLL </Paragraph> <Paragraph> LLL <InlineUIContainer> <Border Background="LightGoldenrodYellow"> <Border.RenderTransform> <TranslateTransform Y="5" /> </Border.RenderTransform> <TextBlock Text="LLL"/> </Border> </InlineUIContainer> LLL </Paragraph> </RichTextBox> ``` ![Example](https://i.stack.imgur.com/Czu0P.png) How to align the text in the InlineUIContainer content with the outer text in RichTextBox regardless of font type and size? In WPF the property BaselineAlignment="Center" [works fine](https://stackoverflow.com/questions/5225268/wpf-how-to-align-text-in-inlineuicontainer-content-with-outer-text-in-richtextbo). But Silverlight seems lucking that functionality.
Silverlight. How to align text in InlineUIContainer content with outer text in RichTextBox
CC BY-SA 2.5
0
2011-03-09T07:13:57.050
2011-03-09T20:29:02.623
2017-05-23T12:30:36.930
-1
623,190
[ "silverlight", "richtextbox", "inlineuicontainer" ]
5,242,710
1
5,242,898
null
1
2,406
I have developed an windows desktop Application using C# .NET 4 framwork.Now, we are going to using MONO2.10 for cross platform.For sample, I have downloaded the mono 2.10 on windows version and able to run my .net exe.While doing so, Its Working fine and it says error the below mentioned error msg. As per my understanding, I think the DLL Reference is not included properly... i am using 2 third party dll files in application. 1. Ionic.dll for .net zip library 2. DocumentFormat.OpenXml.dll for XML file management. Please guide me to how to include these dll reference in Mono on windows? ![Mono_Error_Msg](https://i.stack.imgur.com/Mt4zB.png) Thanks & Regards, Saravanan.P
How to include third Party dll files in Mono 2.10?
CC BY-SA 2.5
null
2011-03-09T07:37:26.747
2012-03-09T19:20:09.933
null
null
452,680
[ "c#", "mono", "dllimport" ]
5,242,720
1
5,244,570
null
2
2,670
I want to reserve space for my codecave in application. I use VirtualAlloc function to reserve this space. I have X questions. 1. What parameters (sllocation type and protection) should I use to allocate memory for code-cave? 2. As return value I get address of my codecave. In other part of the program I want to JMP to that codecave. How to do it? I know (correct me if I'm wrong) that JMP takes as agument nuber that is offset from current location. But I want to JMP to ma codecave. How to calculate this offset. ![enter image description here](https://i.stack.imgur.com/rKvE0.jpg)
VirtualAlloc C++ , injected dll, asm
CC BY-SA 2.5
null
2011-03-09T07:39:05.227
2012-10-15T09:40:21.463
null
null
465,408
[ "c++", "memory", "dll", "assembly", "codecave" ]
5,242,987
1
5,243,901
null
3
965
I would like to compute the KL-distance from two gamma distribution using R. ![enter image description here](https://i.stack.imgur.com/h4jEG.png) Here is my R-code: ``` theta1 <- 0.2 theta2 <- 2 f <- function(u) { dgamma(u, shape=1/theta1, scale=theta1) * (dgamma(u, shape=1/theta1, scale=theta1, log=TRUE) - dgamma(u, shape=1/theta2, scale=theta2, log=TRUE)) } f <- Vectorize(f) integrate(f, lower=0, upper=Inf) ``` Do you have any comment on my R-code? Do you think it is the good way to compute the KL-distance? Any suggestion will be appreciated, Thx, Marco
The KL-distance in R
CC BY-SA 2.5
0
2011-03-09T08:14:27.480
2011-03-09T12:20:46.133
null
null
584,879
[ "r", "integration" ]
5,243,146
1
5,243,347
null
3
4,864
> [Is there an API for Google Maps navigation in Android?](https://stackoverflow.com/questions/5191825/is-there-an-api-for-google-maps-navigation-in-android) Recently I've taken up android development as a hobby and was looking to develop an application that can find and track a users position using Google Maps. Once the application has a GPS lock, The application can track their movements by drawing a route using an overlay class. I've seen similar applications like Mytracks that are open source but they're too complex for me right now. He is my code below without the imports. What I'm trying to do is create an array of geopoints. Every time the location changes a new geopoint is created. I then try to use a for loop to iterate through each geopoint and draw a path between them. Ideally i'd love to create an application that looks like this picture ![enter image description here](https://i.stack.imgur.com/2xcSx.jpg) ``` public class Tracking extends MapActivity implements LocationListener { LocationManager locman; LocationListener loclis; Location Location; private MapView map; List<GeoPoint> geoPointsArray = new ArrayList<GeoPoint>(); private MapController controller; String provider = LocationManager.GPS_PROVIDER; double lat; double lon; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map); initMapView(); initMyLocation(); locman = (LocationManager)getSystemService(Context.LOCATION_SERVICE); //locman.requestLocationUpdates(provider,60000, 100,loclis); //Location = locman.getLastKnownLocation(provider); } /** Find and initialize the map view. */ private void initMapView() { map = (MapView) findViewById(R.id.map); controller = map.getController(); map.setSatellite(false); map.setBuiltInZoomControls(true); } /** Find Current Position on Map. */ private void initMyLocation() { final MyLocationOverlay overlay = new MyLocationOverlay(this, map); overlay.enableMyLocation(); overlay.enableCompass(); // does not work in emulator overlay.runOnFirstFix(new Runnable() { public void run() { // Zoom in to current location controller.setZoom(24); controller.animateTo(overlay.getMyLocation()); } }); map.getOverlays().add(overlay); } @Override public void onLocationChanged(Location location) { if (Location != null){ lat = Location.getLatitude(); lon = Location.getLongitude(); GeoPoint New_geopoint = new GeoPoint((int)(lat*1e6),(int)(lon*1e6)); controller.animateTo(New_geopoint); } } class MyOverlay extends Overlay{ public MyOverlay(){ } public void draw(Canvas canvas, MapView mapv, boolean shadow){ super.draw(canvas, mapv, shadow); Projection projection = map.getProjection(); Path p = new Path(); for (int i = 0; i < geoPointsArray.size(); i++) { if (i == geoPointsArray.size() - 1) { break; } Point from = new Point(); Point to = new Point(); projection.toPixels(geoPointsArray.get(i), from); projection.toPixels(geoPointsArray.get(i + 1), to); p.moveTo(from.x, from.y); p.lineTo(to.x, to.y); } Paint mPaint = new Paint(); mPaint.setStyle(Style.STROKE); mPaint.setColor(0xFFFF0000); mPaint.setAntiAlias(true); canvas.drawPath(p, mPaint); super.draw(canvas, map, shadow); } } @Override public void onProviderDisabled(String provider) { // TODO Auto-generated method stub } @Override public void onProviderEnabled(String provider) { // TODO Auto-generated method stub } @Override public void onStatusChanged(String provider, int status, Bundle extras) { // TODO Auto-generated method stub } @Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; }} ```
i want to draw path between multiple geopoins in android
CC BY-SA 2.5
0
2011-03-09T08:37:05.370
2011-03-10T06:54:30.453
2017-05-23T12:26:39.493
-1
1,004,437
[ "android" ]
5,243,230
1
null
null
0
2,433
I want to create a "glow" effect on top of an image. On dark it's almost working, but on bright images you can see a gray rectangle on image, as seen in below image: ![image gradient effect](https://i.stack.imgur.com/zEfJn.png) Here is my code: ``` public static Bitmap drawModifiedImage(Bitmap bitmap) { Canvas bigCanvas = new Canvas(bitmap); Bitmap b = Bitmap.createBitmap(bitmap.getWidth(), 20, Bitmap.Config.ARGB_8888); Canvas c = new Canvas(b); c.drawColor(Color.TRANSPARENT); LinearGradient grad = new LinearGradient(bitmap.getWidth()/2, 0, bitmap.getWidth()/2, 20, Color.WHITE, Color.TRANSPARENT, Shader.TileMode.CLAMP); Paint p = new Paint(); p.setStyle(Paint.Style.FILL); p.setShader(grad); c.drawRect(0, 0, bitmap.getWidth(), 20, p); bigCanvas.drawBitmap(bitmap, 0, 0, null); bigCanvas.drawBitmap(b,0,0, null); return bitmap; } ``` What am I doing wrong?
android image gradient
CC BY-SA 2.5
0
2011-03-09T08:45:19.227
2011-03-09T09:13:22.173
null
null
517,558
[ "android", "gradient", "image" ]
5,243,308
1
5,243,592
null
1
478
I have problem with resized editText (I made him smaller, actually), he has 40dip height, and according to some rule, I have made text 3 times smaller, to text has 13dip (or sp). Never mind the size of the text, text inside editText is not in the middle speakoing of vercital middle. I looks weird and unprofessionaly, but I haven't found any settings how to correct that. I cannot enlarge it on it's standard size because of screen resolution... any ideas? ![as you see, "admin" is not in the middle, but little higher then it shlould be](https://i.stack.imgur.com/gxfFM.png) Thanks
Android - resized editText with text not centered?
CC BY-SA 2.5
null
2011-03-09T08:53:49.753
2011-03-09T09:19:53.933
null
null
513,956
[ "android", "android-edittext" ]
5,243,312
1
null
null
0
504
i have following UDF in SQL-Server 2005. It's joining a Table and concatenates all rows with a separator to one scalar value. Because i need it for other tables too, i wondered how to make it dynamic so that it takes the FK, delimiter, relation-table-names and the destination-column-name. For example this datamodel(the function actually doesn't need to know tabData, only for completeness added here): ![enter image description here](https://i.stack.imgur.com/qtaJz.jpg) The static scalar-valued-function i want to dynamize is: ``` CREATE FUNCTION [dbo].[getTabDataSymptomCodes] ( @idData Int, @delimiter varchar(5) ) RETURNS VARCHAR(8000) AS BEGIN DECLARE @Codes VARCHAR(8000) SELECT @Codes = COALESCE(@Codes + @delimiter, '') + tdefSymptomCode.SymptomCodeNumber FROM trelData_SymptomCode INNER JOIN tdefSymptomCode ON trelData_SymptomCode.fiSymptomCode = tdefSymptomCode.idSymptomCode WHERE (trelData_SymptomCode.fiData = @idData) ORDER BY tdefSymptomCode.SymptomCodeNumber return @Codes END ``` This function simply concatenates rows to one varchar-value separated with a delimiter, for example `'0345:0550:0700:1230'` where `:` is the separator. for clarification: I have already a UDF that splits a given varchar separated by a char into a table(f.e. '1,2,3,4' into separate rows). Now i need the opposite(like `String.Join(separator,array)` in programming). Here is the Split-UDF for the sake of completeness: ``` CREATE FUNCTION [dbo].[Split] ( @ItemList NVARCHAR(MAX), @delimiter CHAR(1) ) RETURNS @IDTable TABLE (Item VARCHAR(50)) AS BEGIN DECLARE @tempItemList NVARCHAR(MAX) SET @tempItemList = @ItemList DECLARE @i INT DECLARE @Item NVARCHAR(4000) SET @tempItemList = REPLACE (@tempItemList, ' ', '') SET @i = CHARINDEX(@delimiter, @tempItemList) WHILE (LEN(@tempItemList) > 0) BEGIN IF @i = 0 SET @Item = @tempItemList ELSE SET @Item = LEFT(@tempItemList, @i - 1) INSERT INTO @IDTable(Item) VALUES(@Item) IF @i = 0 SET @tempItemList = '' ELSE SET @tempItemList = RIGHT(@tempItemList, LEN(@tempItemList) - @i) SET @i = CHARINDEX(@delimiter, @tempItemList) END RETURN END ``` Thank you in advance :)
T-SQL: How to dynamize this Join-Function?
CC BY-SA 2.5
0
2011-03-09T08:54:10.197
2011-03-09T10:55:19.190
2011-03-09T10:11:32.237
284,240
284,240
[ "sql", "sql-server-2005", "tsql", "user-defined-functions" ]
5,243,434
1
5,243,500
null
0
601
when i try to access the ui from outside the constructor i get a SIGSEGV signal the error is cause at the bottom line in cpp file at the bottom of the prepareQuestions function i tried reducing it to the smallest possible code: header: ``` #ifndef QUESTIONSDIALOG_H #define QUESTIONSDIALOG_H #include <QDialog> #include <QHash> #include "question.h" namespace Ui { class QuestionsDialog; } class QuestionsDialog : public QDialog { Q_OBJECT public: explicit QuestionsDialog(QWidget *parent = 0); ~QuestionsDialog(); void prepareQuestions(QString category); private: Ui::QuestionsDialog *ui; QHash<QString, Question>* questions; //question id + question object }; #endif // QUESTIONSDIALOG_H ``` cpp file: ``` #include <QtDebug> #include "questionsdialog.h" #include "ui_questionsdialog.h" #include "question.h" QuestionsDialog::QuestionsDialog(QWidget *parent) : QDialog(parent), ui(new Ui::QuestionsDialog) { ui->setupUi(this); ui->lbl_question1->setText(QString("this is the constructor")); //works ui->txt_input1->setText(QString("this is the constructor")); //works } QuestionsDialog::~QuestionsDialog() { delete ui; } void QuestionsDialog::prepareQuestions(QString category){ ui->lbl_question1->setText(QString("this is prepareQuestions method")); //doesn't work // ui->txt_input1->setText(QString("test1")); //creates an exception (no error message) } ``` where i construct in the main ``` QStackedWidget *dialogStack = new QStackedWidget; dialogStack->addWidget(new LoginDialog()); //index 0 dialogStack->addWidget(new CallDialog()); //index 1 dialogStack->addWidget(new CategoryDialog()); //index 2 dialogStack->addWidget(new QuestionsDialog()); //index 3 dialogStack->setCurrentIndex(0); ``` where i call the QuestionDialog to be on top: ``` QStackedWidget* dialogStack = (QStackedWidget*)this->parentWidget(); QuestionsDialog* questionDialog = ((QuestionsDialog*)dialogStack->widget(1)); //set type of call + properties dialogStack->setCurrentIndex(3); questionDialog->prepareQuestions(((QToolButton*)obj)->statusTip()); ``` gui when error line is commented (notice that the change lbl_question1 doesn't work) ![http://i77.photobucket.com/albums/j74/bertyhell/gui.png](https://i.stack.imgur.com/MPDNL.png) error using the debugger: ![http://i77.photobucket.com/albums/j74/bertyhell/seg_fault.png](https://i.stack.imgur.com/j3C5W.png)
ui causes SIGSEGV when accessed outside the constructor
CC BY-SA 2.5
null
2011-03-09T09:05:31.063
2011-03-09T09:12:06.710
2011-03-09T09:11:21.067
318,465
373,207
[ "qt", "qwidget" ]
5,243,690
1
5,243,880
null
5
5,161
![enter image description here](https://i.stack.imgur.com/TgXYJ.png) Hello, see above for my 9 patch image. It is created using the 9 patch editor from Android tools. I have multiple issues: - - - Thanks, A.
Android What is wrong with this 9 patch?
CC BY-SA 2.5
null
2011-03-09T09:28:23.637
2013-04-03T12:09:54.433
null
null
481,493
[ "android", "nine-patch" ]
5,243,759
1
5,243,828
null
2
6,970
Can I use someone else's Apple's Developer Certificate and Provisioning Profile to build and run my application on the iPad ? Are the certificates and profiles Machine Specific ? Actually I am trying to install my friend's dev certificate and it is getting installed but when I am installing the provisioning profile its showing me an yellow warning "![Warning in XCode Organizer](https://i.stack.imgur.com/72Ezm.png) The main question is that The Developer' Certificate and Provisioning profile can be used on different machines or not ?
Apple's Developer Certificate and Provisioning Profile
CC BY-SA 2.5
0
2011-03-09T09:34:03.087
2015-11-26T10:34:45.970
2015-11-26T10:34:45.970
1,505,120
380,277
[ "iphone", "xcode", "ipad", "certificate" ]
5,243,836
1
5,252,262
null
0
935
I am using jqgrid to display the data in 10 columns. There is one column PillName, we can store PillName as 100 caharacters in Database. While displaying in jqgrid, its displaying like in the following image:![enter image description here](https://i.stack.imgur.com/0jFy4.png) How to show the value in a proper way so that jqgrid dont get distorted. Ideally, it should break after some characters. or It can show some 10 characters and then after that ........(dots)? Kindly Help? Thanks.
column width jqgrid
CC BY-SA 2.5
null
2011-03-09T09:39:57.577
2011-03-09T21:16:42.947
2011-03-09T12:30:00.713
465,576
465,576
[ "model-view-controller", "jqgrid" ]
5,243,873
1
null
null
1
2,196
(1) Does it mean the remote address can not be detected or the connection is currently inactive,in which case why it appears in the window after all? (2) And one more question, what does the "state" term such as,"ESTABLISHED","LISTENING","CLOSE WAIT" and "LAST ACK" mean? Thanks a lot! ![enter image description here](https://i.stack.imgur.com/1MWvJ.png)
What does the star mark mean in TCP View's remote address?
CC BY-SA 2.5
null
2011-03-09T09:42:48.763
2011-03-09T10:03:13.580
2011-03-09T10:03:13.580
544,557
577,363
[ "windows", "process" ]
5,243,974
1
null
null
1
952
I want to make a graph with Google Charts, but the problem is that I want to inverse the Y axis values (descending) and so that the points are put correspondingly. Current graph: ![enter image description here](https://i.stack.imgur.com/oPAqU.png) ``` http://chart.apis.google.com/chart?chxl=1:|02-21|02-22|02-23|02-25|02-26|02-27|03-01|03-02|03-03|03-05|03-06&chxp=1,0,10,20,30,40,50,60,70,80,90,100&chxr=0,3300000,3800000&chxs=0,676767,11,1,lt,676767|1,676767,11,0,l,676767&chxt=y,x&chs=580x260&cht=lc&chco=3D7930&chds=3300000,3800000&chd=t:3468012,3329144,3464622,3466918,3344139,3347158,3455670,3455670,3458259,3458259,3467341,3467341,3529001,3533528,3541234,3701639&chdlp=l&chg=10,10,2,3&chls=2,4,0 ``` Any ideas how to proceed? Thanks, Jonas
Google Chart (inverse Y axis)
CC BY-SA 2.5
null
2011-03-09T09:51:21.120
2011-03-09T09:57:35.890
null
null
163,669
[ "charts", "google-visualization" ]
5,243,944
1
5,245,142
null
1
7,601
I am trying to set up a based on [this sencha example code](http://dev.sencha.com/deploy/dev/examples/multiselect/multiselect-demo.html). However, after building it into my environment, I get this error: ![enter image description here](https://i.stack.imgur.com/PQjI2.png) # Addendum I have found that when I comment out this line: ``` //xtype: 'itemselector', ``` then it works. Strange also that I have found [this list of valid ExtJS xtypes](http://software.krimnet.com/xtype-list-extjs.htm) and is not on it. # Addendum 2 So I found that the demo accesses these two files: ``` <script type="text/javascript" src="../ux/MultiSelect.js"></script> <script type="text/javascript" src="../ux/ItemSelector.js"></script> ``` The demo is listed under , and I downloaded , yet the only file I have under a "ux" directory is: ![enter image description here](https://i.stack.imgur.com/dVG8c.png) ![enter image description here](https://i.stack.imgur.com/bBJzS.png) My plan is to download these javascript files directly from the sample but: After adding these two files I get an error: ![enter image description here](https://i.stack.imgur.com/Af6yr.png) So it seems to be a 3.3.0 / 3.3.1 issue, since these two missing .js files are labeled as 3.3.1: ![enter image description here](https://i.stack.imgur.com/JHbxH.png) Just strange they are not listed in the [Ext JS 3.3.1 Release Notes](http://dev.sencha.com/deploy/ext-3.3.1/release-notes.html). I downloaded 3.3.1 and the example works locally so I know that I have all the files. So I am trying again to fit this into my application's environment, I fixed the Ext.EventManager error by copying in the `ux-all-debug.js`: ![enter image description here](https://i.stack.imgur.com/C9uNu.png) But I'm still getting this error: ![enter image description here](https://i.stack.imgur.com/PQjI2.png) I can't update the Ext JS that my application is using since so many controls depend on the old file structure. ``` <script type="text/javascript"> clearExtjsComponent(targetRegion); var multiselectDataStore = new Ext.data.ArrayStore({ data: [[123,'One Hundred Twenty Three'], ['1', 'One'], ['2', 'Two'], ['3', 'Three'], ['4', 'Four'], ['5', 'Five'], ['6', 'Six'], ['7', 'Seven'], ['8', 'Eight'], ['9', 'Nine']], fields: ['value','text'], sortInfo: { field: 'value', direction: 'ASC' } }); var simple_form = new Ext.FormPanel({ labelWidth: 75, frame:true, style: 'margin: 10px', title: 'Simple Form', bodyStyle:'padding:5px 5px 0', width: 700, defaults: {width: 230}, defaultType: 'textfield', items: [{ fieldLabel: 'Item 1', name: 'item1', allowBlank:false, value: 'sfsfdsf' },{ fieldLabel: 'Item 2', labelStyle: 'color:red', style: 'color:red', name: 'item2' },{ fieldLabel: 'Item 3', name: 'item3', value: 'nnnnn', xtype: 'displayfield' }, { fieldLabel: 'Email', name: 'email', vtype:'email' }, { xtype: 'itemselector', name: 'itemselector', fieldLabel: 'ItemSelector', imagePath: '../ux/images/', multiselects: [{ width: 250, height: 200, store: multiselectDataStore, displayField: 'text', valueField: 'value' },{ width: 250, height: 200, store: [['10','Ten']], tbar:[{ text: 'clear', handler:function(){ simple_form.getForm().findField('itemselector').reset(); } }] }] }, new Ext.form.TimeField({ fieldLabel: 'Time', name: 'time', minValue: '8:00am', maxValue: '6:00pm' }), { width: 100, xtype: 'combo', mode: 'local', value: 'en', triggerAction: 'all', forceSelection: true, editable: false, fieldLabel: 'Produkt', name: 'language', hiddenName: 'language', displayField: 'name', valueField: 'value', store: new Ext.data.JsonStore({ fields : ['name', 'value'], data : [ {name : 'German', value: 'de'}, {name : 'Broschüre', value: 'en'}, {name : 'French', value: 'fr'} ] }) },{ xtype: 'radiogroup', fieldLabel: 'Status', columns: 1, vertical: true, items: [ {boxLabel: 'Low', name: 'rb-vert', inputValue: 1}, {boxLabel: 'Medium', name: 'rb-vert', inputValue: 2}, {boxLabel: 'High', name: 'rb-vert', inputValue: 3, checked: true}, {boxLabel: 'Item 4', name: 'rb-vert', inputValue: 4}, {boxLabel: 'Item 5', name: 'rb-vert', inputValue: 5} ] } ], buttons: [{ text: 'Save', handler: function() { if(simple_form.getForm().isValid()){ simple_form.getForm().getEl().dom.action = 'save_form.php'; simple_form.getForm().getEl().dom.method = 'POST'; simple_form.getForm().submit({ success : function(form, action) { changeMenuItemInfoArea(start_info_panel2, 'Data was saved2, check file: output.txt (this is a new component)'); simple_form.hide(); } }) } else { Ext.Msg.minWidth = 360; Ext.Msg.alert('Invlaid Form', 'Some fields are invalid, please correct.'); } } },{ text: 'Cancel', handler: function(){ Ext.Msg.alert('Notice', 'Cancel was pressed.'); } }] }); replaceComponentContent(targetRegion, simple_form); var start_info_panel2 = new Ext.Panel({ id: 'info_panel', padding: 10, margins: 10, style: "margin: 10px", width: 300, html: '<p id="test">This is some information about the form.<p>', border: false }); replaceComponentContent(targetRegion, start_info_panel2); hideComponent(regionHelp); </script> ```
Why are the Ext JS multiselect item selector files not included in the Ext JS 3.3 download and where are they?
CC BY-SA 2.5
null
2011-03-09T09:48:48.767
2011-03-09T11:38:22.257
2011-03-09T11:38:22.257
4,639
4,639
[ "javascript", "extjs", "multi-select" ]
5,244,335
1
null
null
0
296
I have followed the instruction for installing GHUnit, and when i try to build i get the errors on the attached pic.![enter image description here](https://i.stack.imgur.com/in1W6.png) Any ideas on what i have done wrong/missed?
Trying to install GHUnit
CC BY-SA 2.5
null
2011-03-09T10:21:27.627
2011-03-16T20:59:11.973
null
null
326,635
[ "objective-c", "xcode", "unit-testing" ]
5,244,410
1
5,245,348
null
2
2,565
Like shown in the following picture I've got a form in my application. There are 3 FormItems, of which two contains a ComboBox and one a HGroup with a ComboBox and an Image. In the last FormItem the label isn't centered vertically. The difference between FormItem 2-3 (in the pic red) is 18px. The difference between FormItem 1-2 (in the pic green) is 22px. I assume this is because of the HGroup but I don't know how to solve this problem. Any hints? The code is: ``` <mx:Form> <mx:FormItem id="type" label="xxx:"> <s:ComboBox /> </mx:FormItem> <mx:FormItem label="xxx:"> <s:ComboBox /> </mx:FormItem> <mx:FormItem label="xxx:"> <s:HGroup verticalAlign="middle" height="25"> <s:ComboBox /> <mx:Image source="@Embed(source='assets/icons/info_xsmall.png')" /> </s:HGroup> </mx:FormItem> </mx:Form> ``` ![problem](https://i.stack.imgur.com/RFJup.png)
Adobe Flex: vertical alignment of labels in a Form control
CC BY-SA 2.5
0
2011-03-09T10:28:40.947
2011-03-09T11:49:22.943
2011-03-09T10:34:49.350
387,454
387,454
[ "apache-flex", "actionscript-3", "forms", "label", "alignment" ]
5,244,421
1
5,244,490
null
1
117
I've been optimizing a query on my test server, which has the same indexes as the live server. And when I explain the query on both servers I get a different index being used. It not just a slight difference its an index which just doesn't fit at all. This is my query ``` SELECT count(Pads.PadID) AS CountOfPadID FROM Pads WHERE (( RemoveMeDate='2001-01-01 00:00:00') AND (catid between 0 and 11)) ORDER BY VersionAddDate DESC; ``` Test server explain ![enter image description here](https://i.stack.imgur.com/1d7uZ.png) Live server explain ![enter image description here](https://i.stack.imgur.com/NpgU1.png) Heres the indexes on the live server, you can see index Cats doesn't relate to the fields used in the query at all ![enter image description here](https://i.stack.imgur.com/uima4.png) I've tried `USE INDEX (sitempacats)` which does work, but I'm just puzzled why it would do this ?
MySQl, why would completly the wrong index be used?
CC BY-SA 2.5
null
2011-03-09T10:29:57.343
2011-03-09T10:34:50.013
2020-06-20T09:12:55.060
-1
450,456
[ "mysql", "sql", "query-optimization" ]
5,244,441
1
5,244,654
null
0
1,453
I have a view in my app that has three segmentedButtonControllers and I designed it with portrait mode. When I rotate the screen the whole UI is...just not right. ![enter image description here](https://i.stack.imgur.com/pJPlo.png) ![enter image description here](https://i.stack.imgur.com/7VHSH.png) My question is, should I design for both portrait and landscape mode separately? If so how I do that? ps. Actually I don't need rotation support for iPhone's app but I'm planning to make same app for iPad where every view has to be rotatable.thanks. --- Edit: just found good example [Easiest way to support multiple orientations? How do I load a custom NIB when the application is in Landscape?](https://stackoverflow.com/questions/2496554/easiest-way-to-support-multiple-orientations-how-do-i-load-a-custom-nib-when-the/2496719#2496719)
Keeping my app's layouts on portrait and landscape mode in iPhone
CC BY-SA 2.5
null
2011-03-09T10:31:41.537
2012-10-21T09:29:55.947
2017-05-23T12:13:39.697
-1
420,002
[ "iphone", "user-interface", "layout", "rotation", "landscape" ]
5,244,472
1
7,550,813
null
37
22,916
I want to add an image in email body. I don't want to attach an image to the email, but add an image in the email body. How to do this? I'm using this. ``` "<img src=\"data:image/png;base64,"+convertFileTOByteEncrypt()+"\">" ``` or ``` "<img src=\"http://images.anandtech.com/doci/3982/HTCSurround-0134.jpg\">" ``` Then image is displayed like this. ![image](https://i.stack.imgur.com/CMNee.png)
How to add an image in email body
CC BY-SA 3.0
0
2011-03-09T10:33:16.550
2013-07-16T04:01:42.327
2013-07-16T04:01:42.327
624,069
624,069
[ "android", "image", "email", "email-attachments" ]
5,244,876
1
5,247,579
null
5
523
I'm trying to modify the Data.Binary.PutM monad into a monad transformer. So I started by changin it's definition from ``` newtype PutM a = Put { unPut :: PairS a } ``` to ``` newtype PutM a = Put { unPut :: Identity (PairS a) } ``` Then of course I changed the implementations of and functions: From: ``` return a = Put $ PairS a mempty {-# INLINE return #-} m >>= k = Put $ let PairS a w = unPut m PairS b w1 = unPut (k a) in PairS b (w `mappend` w1) {-# INLINE (>>=) #-} m >> k = Put $ let PairS _ w = unPut m PairS b w1 = unPut k in PairS b (w `mappend` w1) {-# INLINE (>>) #-} ``` To: ``` return a = Put $! return $! PairS a mempty {-# INLINE return #-} m >>= k = Put $! do PairS a w <- unPut m PairS b w1 <- unPut (k a) return $! PairS b $! (w `mappend` w1) {-# INLINE (>>=) #-} m >> k = Put $! do PairS _ w <- unPut m PairS b w1 <- unPut k return $! PairS b $! (w `mappend` w1) {-# INLINE (>>) #-} ``` As if the PutM monad was just a Writer monad. Unfortunately this ([again](https://stackoverflow.com/questions/4828902/why-wrapping-the-data-binary-put-monad-creates-a-memory-leak)) created a space leak. It is clear to me (or is it?) that ghc is postponing evaluation somewhere but I tried to put `$!` instead of `$` everywhere as suggested by some tutorials but that did not help. Also, I'm not sure how the memory profiler is helpful if what it shows me is this: ![Memory profile](https://i.stack.imgur.com/56Vba.gif). And for completeness, this is the memory profile I get when using the original Data.Binary.Put monad: ![Original memory profile](https://i.stack.imgur.com/plHBC.gif) If interested, [here](http://hpaste.org/44642/why_changing_the_databinaryp) is the code I'm using to test it and the line I'm using to compile, run and create the memory profile is: ``` ghc -auto-all -fforce-recomp -O2 --make test5.hs && ./test5 +RTS -hT && hp2ps -c test5.hp && okular test5.ps ``` I hope I'm not annoying anyone by my saga of memory leak questions. I find there isn't many good resources on internet about this topic which leaves a newbye clueless. Thanks for looking.
Why changing the Data.Binary.Put monad into a transformer creates a memory leak?
CC BY-SA 2.5
0
2011-03-09T11:07:43.193
2011-03-09T15:36:53.193
2017-05-23T10:32:35.693
-1
273,348
[ "haskell", "memory-leaks", "monads", "monad-transformers" ]
5,244,904
1
5,245,061
null
1
171
I use to get 2 objects m1 & m2. And I don't understand why 2 different objects reference the SAME table. I suspect that the reason due to the connection between MConfigOnPage1, MConfigOnPage2 with MConfiguration. Maybe it should be splitted somehow? I attached my ERD and the code. I'll be grateful for explanation why this happens? Thank you ``` var cxt = new Entities(); //this returns MConfiguration with Id=19 var m1 = (from mop in cxt.MConfigOnPage1 where mop.SiteMapId == 15 && mop.HolderId == 13 select mop.MConfiguration).FirstOrDefault(); //this returns MConfiguration with Id=40 var m2 = (from mop in cxt.MConfigOnPage2 where mop.SiteMapId == 15 && mop.HolderId == 1 select mop.MConfiguration).FirstOrDefault(); var t1 = m1.Holder.Template; var t1.Code = 13; var t2 = m2.Holder.Template; //I expect that **t2.Code** to be 0, but it equals 13 //This behavior tells me that m1 & m2 reference the same Template object, // BUT shouldn't m1 & m2 to have their own Template objects? ``` ![SQL-ERD](https://i.stack.imgur.com/Y2Jbz.jpg) ![MConfiguration_Content](https://i.stack.imgur.com/MESZN.jpg) ____________________________________________________________________________ ![Holder_Content](https://i.stack.imgur.com/iQXks.jpg) _____________________________________ ![Template_Content](https://i.stack.imgur.com/JSU1G.jpg)
Why 2 different entities reference the same object?
CC BY-SA 2.5
null
2011-03-09T11:09:59.290
2011-05-11T00:32:35.853
2020-06-20T09:12:55.060
-1
573,082
[ "sql", "linq", "linq-to-entities", "erd" ]
5,244,944
1
5,244,990
null
1
100
I have seen apps before that have their own peoperties pane. How can I get me one of those? Searches on Google and MSDN haven't revealed any results, yet. I don't remember where I saw it, but it was based on an article and came as a sample app. Any help is appreciated! (Just like the one below) Thank you ![Properties Pane](https://i.stack.imgur.com/6rnI7.png)
Custom Properties Pane for a Winforms App
CC BY-SA 2.5
null
2011-03-09T11:12:38.590
2011-03-09T11:15:57.717
null
null
null
[ "c#", ".net", "winforms", "properties" ]
5,244,958
1
5,246,111
null
0
137
I need to select 'other' option from Eclipse view panel.But when I select Windod->show View->Other, I am not able to get 'other' option.I can see other options like 'XML', 'Terminal', 'Team' etc.But not this one: 'Other'.How to enable this option.I am using eclipse IDE Helios.Thanks![enter image description here](https://i.stack.imgur.com/uuK8G.gif)
Eclipse View otion 'show' not displaying
CC BY-SA 2.5
null
2011-03-09T11:13:29.487
2011-03-09T12:56:56.100
2011-03-09T11:34:27.770
527,617
527,617
[ "eclipse", "plugins" ]
5,244,976
1
5,328,410
null
6
12,846
Ok, I'm building a horizontal scroll website for a photographer. We have some really nice wireframes done and I'm looking to create a neat effect where it highlights the specific photo that is on the left of the screen at all times or more specifically set the transparency to 40% on all other photos. So I know I can add anchors to each photo so I can use that to have a click to next option but what if the user uses the scroll bar manually, is there any way for me to detect the position relative to the each photo. Bare in mind to make this even more awkward even though each photo is the same hight they can have different widths. I'm thinking if there was a way to get the position of each anchor tag then I could detect the current position against it and use some maths to figure out which one is in focus. So can someone tell me if this is possible and if so how? Any other ideas to make it work are welcome of course. ![Wireframe of idea](https://i.stack.imgur.com/N1KPK.png)
horizontal scroll, detecting scroll position relative to anchors
CC BY-SA 2.5
0
2011-03-09T11:14:34.957
2011-08-18T04:58:39.963
2011-03-11T20:14:28.833
111,052
111,052
[ "javascript", "html", "dom" ]
5,245,077
1
null
null
0
79
![enter image description here](https://i.stack.imgur.com/eEu3O.png) //Leaderboard Category IDs # define kEasyLeaderboardID @"net.joviant.Ballonster.easy"//@"com.appledts.EasyTapList" # define kHardLeaderboardID @"com.appledts.HardTapList" # define kAwesomeLeaderboardID @"com.appledts.AwesomeTapList" //Achievement IDs # define kAchievementGotOneTap @"123"//@"com.appletest.one_tap" # define kAchievementHidden20Taps @"net.joviant.Ballonster.2ndachievement"//@"com.appledts.twenty_taps" # define kAchievementBigOneHundred @"net.joviant.Ballonster.3rdachievement" //@"com.appledts.one_hundred_taps" How can I write kEasyLeaderBoardID ???
kEasyLeaderBoard can write
CC BY-SA 2.5
null
2011-03-09T11:23:44.923
2011-03-09T15:06:54.833
2020-06-20T09:12:55.060
-1
2,075,384
[ "iphone", "cocos2d-iphone" ]
5,245,092
1
5,245,234
null
5
16,677
Which process running on an IIS web server is responsible for the creation of w3wp.exe worker processes for each asp.net application? ![enter image description here](https://i.stack.imgur.com/eVk9Q.png)
Which process running on an IIS server spawns a w3wp.exe for each asp.net application?
CC BY-SA 2.5
0
2011-03-09T11:24:49.587
2015-02-19T15:08:36.167
2011-03-09T19:20:30.170
8,305
397,524
[ "asp.net", "iis" ]
5,245,113
1
5,245,191
null
0
4,029
Good day! I am creating a website that have several HTML pages. My main page is divided as follows using the `div` code: ![main page](https://i.stack.imgur.com/sdoGa.jpg) I've decided that the header, the left column and the footer will be same for all pages. Without using the `FRAMES` in html, Is it possible that when I click the BUTTON 1 (I used hyperlink code `<a href="Catalogue.jsp" class="widget" >Catalogue</a>`) the page called will be loaded inside the right column? I've read [this article](https://stackoverflow.com/questions/3564356/loading-html-page-inside-div) but I don't know which is the best solution to my problem (and honestly, i don't know how to insert it in my codes because I tried this code `$("#mydiv").load("myexternalfile.html");` and it didn't work.. I think i am missing something.. How can i do the code, if i click the hyperlink, show this page inside the right column...). Also, I am wondering if it is faster or more commonly used if I do this method instead of reloading the whole page everytime even though my header, leftcolumn, and footer will be the same for all of my pages. What will be the cons if i do this to all of my pages? Thank you in advance.
How to load an html page inside an existing html page
CC BY-SA 2.5
0
2011-03-09T11:26:44.750
2011-03-09T11:52:50.640
2017-05-23T11:48:22.880
-1
525,965
[ "html" ]
5,245,139
1
5,245,299
null
0
729
Where do you usually grab graphics for your iPhone apps? Are any free official repos from Apple or one have to buy everything from thirdparty artists? For example, does anyone know where I can find close button image like one one on this screenshot? Or it is private image? ![enter image description here](https://i.stack.imgur.com/m0Vhq.jpg)
iPhone app graphic elements
CC BY-SA 2.5
null
2011-03-09T11:29:06.447
2011-08-03T15:13:29.513
null
null
83,938
[ "iphone", "graphics" ]
5,245,243
1
5,517,194
null
1
1,426
I have implemented Nick's Facebook Plugin. Have Imported the Facebook Helper and Connect Component in the app_controller. Changed the Html accordingly. app_controller.php ``` <?php class AppController extends Controller { var $components = array('Session', 'Facebook.Connect' => array('createUser' => false), 'Auth'); function beforeFilter() { $this->Auth->allow('*'); $this->set('fbuser',$this->Connect->user()); } function beforeFacebookSave() { } function beforeFacebookLogin($user) { //Logic to happen before a facebook login } function afterFacebookLogin() { //Logic to happen after successful facebook login. } } ?> ``` in the home.ctp ``` <?php if($fbuser) { echo $this->Facebook->logout(); debug($fbuser); } else { echo $this->Facebook->login(); } ?> ``` Once i click login and allow the permissions. it keeps refreshing indefinitely :( My App settings online ![enter image description here](https://i.stack.imgur.com/vG4Ip.png) Am on Windows Machine and access the code with this base [http://localhost/spider/](http://localhost/spider/) i also set the canvas url as follows ![enter image description here](https://i.stack.imgur.com/0cEdP.png) I think its because of the configuration on the application settings online. Nick in the Video visits localhost.localdomain/websites/facebook_example to access the code. What is the need of the ".localdomain"
CakePHP Facebook Plugin redirection problem
CC BY-SA 2.5
0
2011-03-09T11:39:12.493
2011-04-01T18:16:01.707
2011-03-09T11:47:15.797
155,196
155,196
[ "cakephp", "facebook" ]
5,245,248
1
5,277,449
null
3
1,651
I am working on a "one page" website with a fixed navigation and about 5 different pages inside the one document. [http://www.coco-works.com/Archive/](http://www.coco-works.com/Archive/) LIVE VERSION I'm having trouble with the active class addition. When you click Keep in Touch or Home, the class is not applied. As you can see from the live version, it's not function properly. The page works something like this; ![enter image description here](https://i.stack.imgur.com/jQzn1.jpg) And here is the JavaScript; ``` $(document).ready(function() { $('body').click(function(event) { if (event.target.nodeName.toLowerCase() == 'a') { var op = $(event.target); var id = op.attr('href'); if (id.indexOf('#') == 0) { $.scrollTo(id, 1000, { offset: { top: 75 }, axis: 'y', onAfter: function() { window.location.hash = id.split('#')[1]; } }); } return false; } }); $.fn.waypoint.defaults.offset = 75; $('.section h1.page_name').waypoint(function() { var id = this.id; var op = $('#navigation a[href = "#' + id + '"]'); if (op.length) { $("#navigation a").removeClass("active"); op.addClass('active'); } }); }); ``` I'm not a strong programmer. I've tried to edit it as best as I can and I'm just stuck. Any insight to fixing this would highly be appreciated. Still looking for an answer, below couldn't fix the problem.
Scrolling and .addClass(); issues
CC BY-SA 4.0
0
2011-03-09T11:39:44.247
2022-12-12T08:41:36.283
2022-12-12T08:41:36.283
4,370,109
133,059
[ "javascript", "jquery", "jquery-events" ]
5,245,472
1
5,245,601
null
1
1,853
## Edit 1 I am confused with the statement below, taken from [What ASP.NET Programmers Should Know About Application Domains](http://odetocode.com/articles/305.aspx): > You’ve created two ASP.NET applications on the same server, and have not done any special configuration. What is happening?A single ASP.NET worker process will host both of the ASP.NET applications. On Windows XP and Windows 2000 this process is named aspnet_wp.exe, and the process runs under the security context of the local ASPNET account. On Windows 2003 the worker process has the name w3wp.exe and runs under the NETWORK SERVICE account by default. He said that there is one worker process spawns 2 application domains--one application domain for each asp.net application. But when I see the running processes as follows, ![enter image description here](https://i.stack.imgur.com/qnBL7.png) ![enter image description here](https://i.stack.imgur.com/TiMJ0.png) `w3wp.exe` is said as IIS Worker Process rather than application pool or application domain. ## Questions: 1. Is application domain equal to application pool? 2. The confusing thing is in image 1. Why does Host Process Windows Service svchost.exe spawns 2 IIS Worker Process w3wp.exe? In my understanding, a process can only contain application domains, not other processes.
Confusing terminologies pertaining to Application Pool, Worker Process and Application Domain
CC BY-SA 2.5
null
2011-03-09T12:03:05.537
2011-03-09T12:39:40.810
2011-03-09T12:31:51.660
397,524
397,524
[ "asp.net", "iis" ]
5,245,775
1
6,959,291
null
3
979
I have a gridview that is bound to an ObjectDataSource, which retrieves records from a database to display in the gridview. The procedure for returning the records takes in a search string and displays the relevant results. However when there are no results from the database, I get an empty gridview with the page numbers along the bottom, as if it returned all the records from the database, as shown in the pic below: ![enter image description here](https://i.stack.imgur.com/jP87l.jpg) I have set both the EmptyDataText and EmptyDataTemplate properties, but they do not show when there are no results. Anyone know what's going on here? Here's the asp for the ObjectDataSource and GridView: ``` <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnablePaging="True" SelectCountMethod="GetUsersCount" SelectMethod="GetUsers" SortParameterName="sortColumn" TypeName="WebsiteBuilder.Core.UUser" OnSelecting="ObjectDataSource1_Selecting"> <SelectParameters> <asp:Parameter Name="searchExpression" Type="String" DefaultValue="" /> </SelectParameters> </asp:ObjectDataSource> <asp:GridView ID="grdUsers" runat="server" CssClass="grdUsers" AutoGenerateColumns="false" OnDataBound="grdUsers_DataBound" DataSourceID="ObjectDataSource1" AllowPaging="true" AllowSorting="true" OnRowCommand="grdUsers_RowCommand" PageSize="5" EmptyDataText="No Results"> <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast" PageButtonCount="5" Position="Bottom" /> <PagerStyle CssClass="pagination" HorizontalAlign="Center" VerticalAlign="Middle" /> <EmptyDataTemplate>No Results</EmptyDataTemplate>` ``` Here is the code for the selecting event: ``` protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) { if (!String.IsNullOrEmpty(this.txtSearchBox.Text)) { e.InputParameters["searchExpression"] = "%" + this.txtSearchBox.Text + "%"; } else return; } ``` And the code for fetching the data: ``` cmd.AddParameter("searchExpression", searchExpression); cmd.AddParameter("sortExpression", sortColumn); cmd.AddParameter("startRowIndex", startRowIndex); cmd.AddParameter("maximumRows", maximumRows); DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); DataTable dt = ds.Tables[0]; int i = dt.Rows.Count; return ds.Tables[0]; ``` When I check i in debug the value is 0. My question is why the gridview is not showing the EmptyDataTemplate and why it is still showing multiple page numbers when there are no rows.
How to handle empty return from database with gridview?
CC BY-SA 3.0
null
2011-03-09T12:28:27.607
2011-08-05T16:15:26.377
2011-05-27T13:34:09.147
1,288
349,865
[ "c#", "sql", "gridview" ]
5,245,878
1
5,245,928
null
3
1,018
I have a `div` centered in the site and containing a picture. The `div` extends its `height` to fit the picture as expected. Then I add some text and I expect it to lay out on the bottom of the `div`. But in addition to that the `div` also resizes a little bit so its `height` is `higher` than the `height` of the picture. Here is the exmaple: Html: ``` <div class="siteContent"> <img class="debug" src="../../Content/themes/base/images/pageTitle.png" /> <span> aaa </span> </div> ``` CSS: ``` body { margin: 0; } .siteContent { width: 960px; margin-left: auto; margin-right: auto; border: thin solid; } .debug { border: thin solid; } ``` The result: ![enter image description here](https://i.stack.imgur.com/7NsyX.png) The unwanted effect is marked red. I was able to fix this for IE 8 and Firefox by modifiing the CSS like this: ``` body { margin: 0; } .siteContent { width: 960px; margin-left: auto; margin-right: auto; border: thin solid; position: relative; } .siteContent span{ position: absolute; bottom: 0px; } .debug { border: thin solid; } ``` After runnig this I got the right result in Mozilla: ![enter image description here](https://i.stack.imgur.com/zGu6z.png) However this does not work for Chrome and Safary.
Prevent div containing image to resize when text added
CC BY-SA 2.5
null
2011-03-09T12:37:12.120
2011-03-09T15:25:52.477
null
null
311,865
[ "html", "css" ]
5,246,040
1
5,335,333
null
1
912
I am hoping that someone can help shed some light on the underlying issue causing the bug that you see here: ![enter image description here](https://i.stack.imgur.com/M9hF4.png) As you can see, the FusionChart is incorrecly overlaying on top of the Modalbox when the it is opened. This issue only occurs in Google Chrome. All other browsers are ok. Any ideas on the underlying issue here? And what can be done?
FusionCharts + Prototype Modalbox + Google Chrome = Browser View Bug
CC BY-SA 2.5
null
2011-03-09T12:50:27.913
2011-03-18T11:26:46.640
null
null
251,257
[ "google-chrome", "prototype", "modal-dialog", "fusioncharts" ]
5,246,048
1
null
null
0
10,502
I am having my PHP installation as "without pear" . I want to install PHP PEAR mail package so that i can send email from my application. How can I enable the PHP Pear so that I can send Emails? ![ ](https://i.stack.imgur.com/RZdAO.png)
Enabling PHP Pear on Linux
CC BY-SA 3.0
null
2011-03-09T12:50:57.583
2017-08-10T17:13:45.433
2017-08-10T17:13:45.433
1,033,581
395,661
[ "php", "configuration", "pear" ]
5,246,058
1
5,247,394
null
1
579
I'd like to use an ItemsControl which behaves somewhat carousel-like: ![ItemsControl](https://i.stack.imgur.com/RVxng.jpg) I want the items which are all text to circle so that the selected item is always centered and the biggest. I should not be 3D since I like the fact that the unselected items don't overlap and are still readable. Most carousel implementations I saw made the impression to be too heavyweight for this scenario or to look good only with pictures. I have the feeling this should be doable with some storyboards alone but it seems I'm not far enough into the WPF to get it done properly. I hope you can point me in the right direction. Thanks for your help.
WPF: How to center and animate an ItemsControl?
CC BY-SA 2.5
0
2011-03-09T12:52:07.040
2011-03-09T14:44:03.870
null
null
590,254
[ "wpf", "animation", "itemscontrol", "carousel" ]
5,246,081
1
5,246,597
null
0
1,059
I have a special TextBox that should be validated on Enter. On this validation, the Form should net be however submitted if it has defined an AcceptButton. In the following code I have 2 textBoxes: one normal, and one other - myTextBox - that validates itself on Enter (DoubleClick the form time to see it): ``` public partial class Form1 : Form { private TextBox TextBox1; private MyTextBox MyTextBox1; private Button OKButton; public Form1() { InitializeComponent(); TextBox1 = new TextBox(); TextBox1.Parent = this; TextBox1.Location = new Point(0, 50); MyTextBox1 = new MyTextBox(); MyTextBox1.Parent = this; MyTextBox1.Location = new Point(0, 100); MyTextBox1.Visible = false; OKButton = new Button(); OKButton.Parent = this; OKButton.Location = new Point(0, 125); OKButton.Click += new EventHandler(OKButton_Click); this.AcceptButton = OKButton; } void OKButton_Click(object sender, EventArgs e) { if (MyTextBox1.Visible) return; Console.WriteLine("!!! OKButton_Click !!!"); } protected override void OnMouseDoubleClick(MouseEventArgs e) { MyTextBox1.Visible = true; base.OnMouseDoubleClick(e); } } public class MyTextBox : TextBox { protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Enter) { Console.WriteLine("!!! MyTextBox_Validation !!!"); this.Visible = false; } return base.ProcessCmdKey(ref msg, keyData); } } ``` The fact of "Validated" is reflected by the myTextBox visibility, however this does not help, because in the OKBUtton_Click myTextBox1 is already made invisible... ![enter image description here](https://i.stack.imgur.com/dzbAG.jpg) Ideally, after myTextBox validation I would like to stop the Enter key Message propagation on the parent Form. Is it possible? If not, how should I validate MyTextBox without validating the form?
Stop propagating keyboard event to the parent Form
CC BY-SA 2.5
null
2011-03-09T12:54:14.917
2011-03-09T13:40:09.287
2011-03-09T13:15:55.477
185,593
185,593
[ ".net", "winforms" ]
5,246,138
1
null
null
4
13,063
![enter image description here](https://i.stack.imgur.com/PuWOG.png) How to get that cross button/image (red circled) on Custom dialog box's boundary?
How to get that cross button/image on Custom dialog box's boundary?
CC BY-SA 2.5
0
2011-03-09T13:00:12.843
2014-03-26T08:18:13.290
2011-03-09T13:04:57.410
180,538
651,570
[ "android", "dialog" ]
5,246,330
1
5,246,569
null
9
2,685
I am producing flat lists with 10^6 to 10^7 Real numbers, and some of them are repeating. I need to delete the repeating instances, keeping the first occurrence only, and without modifying the list order. The key here is efficiency, as I have a lot of lists to process. Example (fake): Input: ``` {.8, .3 , .8, .5, .3, .6} ``` Desired Output ``` {.8, .3, .5, .6} ``` Deleting repeating elements with Union (without preserving order) gives in my poor man's laptop: ``` DiscretePlot[a = RandomReal[10, i]; First@Timing@Union@a, {i, 10^6 Range@10}] ``` ![enter image description here](https://i.stack.imgur.com/Vcxmz.png)
Delete repeating list elements preserving order of appearance
CC BY-SA 2.5
0
2011-03-09T13:17:55.180
2011-08-24T04:15:58.047
2011-08-24T04:15:58.047
353,410
353,410
[ "wolfram-mathematica" ]
5,246,467
1
5,248,447
null
3
5,029
I use the BraceFoldingStrategy by Daniel Grünwald: ``` public IEnumerable<NewFolding> CreateNewFoldings(ITextSource document) { List<NewFolding> newFoldings = new List<NewFolding>(); Stack<int> startOffsets = new Stack<int>(); int lastNewLineOffset = 0; char openingBrace = this.OpeningBrace; char closingBrace = this.ClosingBrace; for (int i = 0; i < document.TextLength; i++) { char c = document.GetCharAt(i); if (c == openingBrace) { startOffsets.Push(i); } else if (c == closingBrace && startOffsets.Count > 0) { int startOffset = startOffsets.Pop(); // don't fold if opening and closing brace are on the same line if (startOffset < lastNewLineOffset) { newFoldings.Add(new NewFolding(startOffset, i + 1)); } } else if (c == '\n' || c == '\r') { lastNewLineOffset = i + 1; } } newFoldings.Sort((a,b) => a.StartOffset.CompareTo(b.StartOffset)); return newFoldings; } ``` This works as expected but one issue is remaining ![enter image description here](https://i.stack.imgur.com/VRRYw.png) There is always a last - icon on the last brace. I tried to remove that,but when I look at the list newFoldings I can see that there are only 3 foldings there. So where is the fourth coming from? ## EDIT According to Daniel Grünwald the problem is that I have to be using to different folding managers. However I can't find any statement in my initialisation code where I set a second FoldingManager. Maybe any hints? ``` private void textEditor_Loaded(object sender, RoutedEventArgs e) { LoadSourceCode(); textEditor.Background = Brushes.Green; textEditor.IsReadOnly = true; textEditor.ShowLineNumbers = true; using (Stream s = this.GetType().Assembly.GetManifestResourceStream("Prototype_Concept_2.View.Layouts.CustomHighlighting.xshd")) { using (XmlTextReader reader = new XmlTextReader(s)) { textEditor.SyntaxHighlighting = HighlightingLoader.Load(reader, HighlightingManager.Instance); } } (textEditor.TextArea as IScrollInfo).ScrollOwner.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden; (textEditor.TextArea as IScrollInfo).ScrollOwner.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden; FoldingManager foldingManager = FoldingManager.Install(textEditor.TextArea); BraceFoldingStrategy foldingStrategy = new BraceFoldingStrategy(); foldingStrategy.UpdateFoldings(foldingManager, textEditor.Document); TextArea txt = textEditor.TextArea; ObservableCollection<UIElement> margins = txt.LeftMargins; foreach (UIElement margin in margins) { if ((margin as FoldingMargin) != null) { Contacts.AddPreviewContactDownHandler(margin as FoldingMargin, OnDown); } } Main.Children.Remove(textEditor); ScrollHost.Width = textEditor.Width; ScrollHost.Height = textEditor.Height; ScrollHost.Content = textEditor; textEditor.Background = Brushes.Transparent; ScrollHost.Background = Brushes.Transparent; } ``` ## EDIT 2 I checked that the currently installed FoldingManager has 3 foldings, but I still don't know where the fourth folding is defined.
BraceFolding in AvalonEdit
CC BY-SA 3.0
0
2011-03-09T13:27:17.277
2011-04-13T13:14:26.027
2011-04-13T13:14:26.027
null
null
[ "c#", "wpf", "avalonedit" ]
5,246,495
1
5,312,697
null
2
3,150
I have a strange problem regarding suggestion items for an AutocompleteView on Android 2.2. I am using a custom ArrayAdapter and Filter class implementation. When I type into the AutocompleteView the suggestion drop-down pops up after entering two characters as shown in the following screenshot: ![enter image description here](https://i.stack.imgur.com/PfePj.png) When I enter a third character the drop-down disappears: ![enter image description here](https://i.stack.imgur.com/4Xpj6.png) After entering a fourth character the suggestion drop-down is displayed again: ![enter image description here](https://i.stack.imgur.com/lWBAc.png) I don't understand why the drop-down disappears when an uneven amount of characters is entered. While debugging I noticed that getView() is called twice when an even amount of characters is entered, but ony once for an uneven amount. Might this be the reason for the faulty behavior? Here is my source code: ``` public class AutoCompleteActivity extends Activity { protected AutoCompleteTextView autoCompleteView; protected AutoCompleteAdapter suggsAdapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.autocomp); autoCompleteView = (AutoCompleteTextView) findViewById(R.id.autocomplete); autoCompleteView.setAdapter(new AutoCompleteAdapter(this, android.R.layout.simple_dropdown_item_1line, new String[1])); } private class AutoCompleteAdapter extends ArrayAdapter implements Filterable { protected LayoutInflater mInflater; protected Filter filter; public AutoCompleteAdapter(Context context, int textViewResourceId, String[] items) { super(context, textViewResourceId, items); filter = new SuggestionsFilter(); mInflater = LayoutInflater.from(context); } @Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { v = mInflater.inflate(android.R.layout.simple_dropdown_item_1line, parent, false); } TextView tt = (TextView) v.findViewById(android.R.id.text1); tt.setText("Suggestion item"); return v; } public Filter getFilter() { return filter; } private class SuggestionsFilter extends Filter { @Override protected FilterResults performFiltering(CharSequence constraint) { return null; } @Override protected void publishResults(CharSequence constraint, FilterResults results) { notifyDataSetChanged(); } } } ``` } ...and my layout file: ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <!-- Pretty hint text, and maxLines --> <AutoCompleteTextView android:id="@+id/autocomplete" android:layout_width="fill_parent" android:layout_height="wrap_content" android:inputType="text" android:maxLines="1" android:imeOptions="actionSearch" android:layout_toLeftOf="@+id/spinner" /> ```
Autocomplete items disappearing
CC BY-SA 2.5
0
2011-03-09T13:29:53.810
2011-03-15T13:47:48.567
2011-03-14T17:23:54.513
400,334
400,334
[ "android", "autocomplete", "filter", "adapter" ]
5,246,571
1
5,248,441
null
0
392
Recently I added a new entity into my Core Data model, so I created a new version for the model and a mapping model for it. However, now my NSPersistentDocument crashes with no obvious reason: ``` NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; BOOL success = [self configurePersistentStoreCoordinatorForURL:storeURL ofType:typeName modelConfiguration:nil storeOptions:options error:error]; // Line that crashes ``` The console logs: > *** -[NSCFArray insertObject:atIndex:]: attempt to insert nil Here is the stack trace if it helps: ![Stacktrace](https://i.stack.imgur.com/oW0I8.png) Removing the mapping model doesn't help, so I guess its because the document tries to load the wrong/none data model but I haven't found a way to say that it should use a given data model. When I use my own Core Data abstraction class for iOS, everything is fine. So the root of all evil seems to be `NSPersistentDocument`. Actually I don't want to switch back to NSDocument and have to implement the Core Data handling myself again, so any help is really appreciated!
NSPersistentDocument crash when creating persistent store
CC BY-SA 2.5
null
2011-03-09T13:37:22.620
2011-03-09T16:57:51.707
2011-03-09T16:32:18.363
350,272
350,272
[ "objective-c", "macos", "core-data", "nspersistentdocument" ]
5,246,719
1
5,342,700
null
3
178
I noticed that not all file types end up in Eclipse history. Is there a way to edit the preferences so that all file types get the history treatment? *.js, *.jsp, *.xhtml, *.css... EDIT: I since had many instances of history not being saved correctly. In this example, it was a java file that i made quick modifications ![enter image description here](https://i.stack.imgur.com/wbLgf.png)
Eclipse History for non java files
CC BY-SA 2.5
0
2011-03-09T13:50:30.543
2011-03-31T14:16:28.647
2020-06-20T09:12:55.060
-1
374,512
[ "eclipse" ]
5,246,685
1
5,246,977
null
3
4,885
I'm making a project with the Spring Framework and I use the Spring MVC Framework for building my views. Now everything works fine and runs smooth except for this simple GET page that takes 2 seconds and sometimes more to load on localhost. As you can see in the logs (link) there is this very slow GenericConversionService trying to find converters to bind properties. Help would really be appreciated! Thanks in advance (appologies for my spelling errors) :) Apperantly the conversion service runs for every (binded with Path attribute) form tag in the "[http://www.springframework.org/tags/form](http://www.springframework.org/tags/form)" namespace. The more form tags I Use the slower my page loads. Should I be using normal html form tags to increase performance or is there a way to stop it from looking for the "right" converter? Logs: [Link](http://paste2.org/p/1292370) (Scroll about 1/3 there you will see a massive chunk of GenericConversionService logs Spring insight profiling information: ![Profile information](https://i.stack.imgur.com/GKOmr.png) Controller (Sloppy) Code: ``` @RequestMapping(value = "/route/create", method = RequestMethod.GET) public ModelAndView getCreateRoute(){ RouteCreateUpdateViewModel result = new RouteCreateUpdateViewModel(); User u = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); u = us.get(u.getId()); ModelAndView mav = new ModelAndView("route/create", "routeCreateUpdateModel", result); mav.addObject("favLocations", u.getLocations()); mav.addObject("cars", u.getCars()); result.setDateDay(Calendar.getInstance().get(Calendar.DAY_OF_MONTH) + 1); // January = 0 result.setDateMonth(Calendar.getInstance().get(Calendar.MONTH)); result.setDateYear(Calendar.getInstance().get(Calendar.YEAR)); mav.addObject("nextYear", result.getDateYear() + 1); return mav; } ``` View Code: ``` <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> <!-- //TODO I18N --> <style type="text/css"> li:focus { background-color:green; } </style> <script> var highlightedElement = null; $(document).ready(function(){ $("input,select").click(function() { if(highlightedElement != null) { $(highlightedElement).removeClass("curFocus"); if(highlightedElement.hasClass("location")) { checkLocation(highlightedElement); } } var newHighlightedElement = $(this).parent().parent(); $(newHighlightedElement).addClass("curFocus"); highlightedElement = newHighlightedElement; }); }); function checkLocation(highlightedElement) { var parameters = { zipcode: $(highlightedElement).find(".zipcode").val(), street: $(highlightedElement).find(".street").val(), streetNr: $(highlightedElement).find(".streetNr").val() }; $.getJSON('/location/validate.php', parameters, function(data) { if(data.result != null) { $(highlightedElement).removeClass("badData"); $(highlightedElement).addClass("goodData"); } else { $(highlightedElement).removeClass("goodData") $(highlightedElement).addClass("badData"); } }); } </script> <div> <h1><fmt:message key="route.create.header"/></h1> <div class="form-container"> <c:url value="/route/create.php" var="actUrl"/> <form:form method="POST" action="${actUrl}" modelAttribute="routeCreateUpdateModel"> <ul> <li class="location"> <form:label path="fromZipcode" cssClass="title">Van<span class="required">*</span></form:label> <span> <form:input path="fromZipcode" cssClass="zipcode"/> <form:label path="fromZipcode" cssClass="desc">Gemeente</form:label> </span> <span> <form:input path="fromStreet" cssClass="street"/> <form:label path="fromStreet" cssClass="desc">Straat</form:label> </span> <span> <form:input path="fromStreetNr" cssClass="streetNr"/> <form:label path="fromStreetNr" cssClass="desc">Nr</form:label> </span> </li> <li class="location"> <form:label path="toZipcode" cssClass="title">Naar<span class="required">*</span></form:label> <span> <form:input path="toZipcode" cssClass="zipcode"/> <form:label path="toZipcode" cssClass="desc">Gemeente</form:label> </span> <span> <form:input path="toStreet" cssClass="street"/> <form:label path="toStreet" cssClass="desc">Straat</form:label> </span> <span> <form:input path="toStreetNr" cssClass="streetNr"/> <form:label path="toStreetNr" cssClass="desc">Nr</form:label> </span> </li> <li> <form:label path="dateDay" cssClass="title">Datum<span class="required">*</span></form:label> <span> <tags:showDayPicker path="dateDay" currentDay="${routeCreateUpdateModel.dateDay}"/> <form:label path="dateDay" cssClass="desc">dd</form:label> </span> <span> <tags:showMonthPicker path="dateMonth" currentMonth="${routeCreateUpdateModel.dateMonth}"/> <form:label path="dateMonth" cssClass="desc">mm</form:label> </span> <span> <tags:showYearPicker path="dateYear" startYear="${routeCreateUpdateModel.dateYear}" stopYear="${nextYear}"/> <form:label path="dateYear" cssClass="desc">yyyy</form:label> </span> </li> <li> <form:label path="days" cssClass="title">Dagen<span class="required">*</span></form:label> <span> <form:checkbox path="days" value="1"/> <form:label path="days" cssClass="desc">Ma</form:label> </span> <span> <form:checkbox path="days" value="2"/> <form:label path="days" cssClass="desc">Di</form:label> </span> <span> <form:checkbox path="days" value="3"/> <form:label path="days" cssClass="desc">Wo</form:label> </span> <span> <form:checkbox path="days" value="4"/> <form:label path="days" cssClass="desc">Do</form:label> </span> <span> <form:checkbox path="days" value="5"/> <form:label path="days" cssClass="desc">Vrij</form:label> </span> <span> <form:checkbox path="days" value="6"/> <form:label path="days" cssClass="desc">Za</form:label> </span> <span> <form:checkbox path="days" value="7"/> <form:label path="days" cssClass="desc">Zo</form:label> </span> </li> <li> <form:label path="stopDateDay" cssClass="title">Herhalen tot<span class="required">*</span></form:label> <span> <tags:showDayPicker path="stopDateDay" currentDay="${routeCreateUpdateModel.dateDay}"/> <form:label path="stopDateDay" cssClass="desc">dd</form:label> </span> <span> <tags:showMonthPicker path="stopDateMonth" currentMonth="${routeCreateUpdateModel.dateMonth}"/> <form:label path="stopDateMonth" cssClass="desc">mm</form:label> </span> <span> <tags:showYearPicker path="stopDateYear" startYear="${routeCreateUpdateModel.dateYear}" stopYear="${nextYear}"/> <form:label path="stopDateYear" cssClass="desc">yyyy</form:label> </span> </li> <li> <form:label path="departureTime" cssClass="title">Vertrek uur<span class="required">*</span></form:label> <span> <tags:showHourPicker path="departureTime"/> <form:label path="departureTime" cssClass="desc">uu</form:label> </span> <span> <tags:showMinutePicker path="departureTime"/> <form:label path="departureTime" cssClass="desc">mm</form:label> </span> </li> <li> <form:label path="arrivalTime" cssClass="title">Aankomst uur<span class="required">*</span></form:label> <span> <tags:showHourPicker path="arrivalTime"/> <form:label path="arrivalTime" cssClass="desc">uu</form:label> </span> <span> <tags:showMinutePicker path="arrivalTime"/> <form:label path="arrivalTime" cssClass="desc">mm</form:label> </span> </li> <li> <form:label path="car" cssClass="title">Auto</form:label> <span> <form:select path="car"> <form:options items="${cars}" itemLabel="carName" itemValue="Id" /> </form:select> </span> </li> </ul> <input type="submit" value="Route toevoegen"/> </form:form> </div> </div> ``` If you need any more information just ask and I will provide it right away. Thanks again :)
Spring Web MVC huge performance issues when rendering view
CC BY-SA 2.5
0
2011-03-09T13:47:53.677
2011-03-16T13:19:58.823
2011-03-09T14:52:22.933
null
null
[ "spring", "spring-mvc", "spring-security" ]
5,246,789
1
5,258,246
null
2
3,017
Ok, I've done three Ad Hoc distributions and each one has had its own problems in one way or the other, but this one has me completely perplexed. I've set everything up like I normally do, but after distributing the dreaded "Entitlements are invalid" error appears after attempting to install. I'm using iOS4.3 and Xcode 4 GM 2. I have Entitlements set up as follows: ![enter image description here](https://i.stack.imgur.com/63XXz.png) (Source view): ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>get-task-allow</key> <false/> <key>application-identifier</key> <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string> <key>keychain-access-groups</key> <array> <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string> </array> </dict> </plist> ``` Same as every Entitlement I've ever used. Confirmed that the Build has Code Signing Entitlements set to Entitlements.plist. Get no error during "Archive" and no error generating the .ipa. Only on installation. At a lose, any help would be appreciated. Additional Note: I tried setting the "application-identifier" and "keychain-access-groups" explicitly as mentioned in [http://twoappguys.com/blog/ios4-and-the-wildcard/](http://twoappguys.com/blog/ios4-and-the-wildcard/), but it did not solve the issue.
iOS4.3 Entitlements.plist for Ad Hoc Distribution
CC BY-SA 2.5
null
2011-03-09T13:56:55.697
2017-07-02T10:23:28.873
null
null
157,921
[ "iphone", "adhoc", "entitlements" ]
5,247,072
1
5,304,995
null
16
6,178
[Krumelur](https://stackoverflow.com/users/304870/krumelur) [asked this question](https://stackoverflow.com/questions/4707873/pick-recipients-like-mfmailcomposeviewcontroller-does) about how create a recipient bubble similar to the mail.app. Please see screenshots below of what I mean: ![Mail.app picker bubble picture](https://i.stack.imgur.com/rJNcU.png) ![Selected contact](https://i.stack.imgur.com/4MSE8.png) I can create the look of this element (including the look when it has been selected) but I am struggling with getting the behaviour when it's part of a `UITextField`. How do you get the bubble to act as part of the UITextField text? For example, when you press the backspace button enough, the bubble becomes highlighted and after one more press will be deleted as if it was part of the text. I've also had difficulties moving the cursor as well. Preferably the answer would be great in Monotouch but Objective-C answers are more than appreciated too. I'm not asking for the exact code (though if you are willing to part with it, then I won't say no! :D) but rather how to achieve this. I'm aware of the Three20 project which has a similar element but I can't find where abouts in the code this is actually performed. I'm sorry if this doesn't make much sense, I've kinda struggled to put this question elequantly, please feel free to ask me any questions clarifying the question!
Recreate recipient bubble behaviour in Mail.app / Three20
CC BY-SA 2.5
0
2011-03-09T14:18:37.210
2019-12-28T09:52:37.457
2017-05-23T10:29:45.490
-1
399,123
[ "iphone", "ipad", "ios", "xamarin.ios", "three20" ]
5,247,081
1
5,247,255
null
3
3,580
I've got a div with a class of 'screenshot' (in pink), and inside it is an image element and a heading element (in blue). As you can see in the image below; the h3 tag is not being contained by its fixed width parent. How can I contain the heading element inside the parent div so it's width is the same? Specifying width, margin, padding etc. doesn't work. HTML: ``` <div class="screenshot"><a href="#"> <img src="img/vert_img1.png" alt="Image description"> <h3>Heading #1</h3> </a> </div> ``` CSS: ``` #screenshots .screenshot { background: pink; width: 209px; margin: 2px; padding-bottom: 1px; } .screenshot a img { width: 200px; height: 150px; margin-right: 0px; } .screenshot a h3 { background-color: blue; margin-bottom: 10px; text-align: center; width: 209px; } ``` ![Screenshot of the problem](https://i.stack.imgur.com/Ve8bE.png)
H3 Element not inheriting parent width in CSS
CC BY-SA 2.5
null
2011-03-09T14:19:32.403
2011-03-11T01:21:52.597
2011-03-09T14:23:11.543
313,758
500,182
[ "html", "css" ]
5,247,105
1
null
null
0
486
I want to create phone dialer effect, so how can i make that effect?. Is any API are available for that? I have set the images are in the image view, the images are in the circle shape. Now i want to touch and drag the images, If i drag the single images , it would move all the images to the certain path. Please see my screen shot. ![enter image description here](https://i.stack.imgur.com/zPj4j.png) Please help me out. Thanks!
How to create phone dialer effect in iPhone?
CC BY-SA 2.5
null
2011-03-09T14:20:57.487
2011-03-10T05:34:11.910
null
null
249,916
[ "iphone", "core-animation" ]
5,247,552
1
5,248,134
null
0
912
Please check out the screenshots, Its working ok in ipad but not in iphone/iphone4. What css/viewport settings I need to the page exactly fits inside the window (no-scrolling). ipad screenshot ![enter image description here](https://i.stack.imgur.com/CcrwT.png) iphone4 screenshot ![enter image description here](https://i.stack.imgur.com/V5w6M.png) iphone screenshot ![enter image description here](https://i.stack.imgur.com/lqkN9.png) here is the html code ``` <!DOCTYPE html> <html> <head> <title>Home</title> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;user-scalability:no;"> <link rel="stylesheet" href="../Common/mobile.css" /> <script type="text/javascript" src="../Common/jquery-1.5.min.js"></script> </head> <body> <div class="texture"> <!-- Start of first page --> <div id="eco-home-page" data-role="page" class="splash"> <div data-role="content"> <a id="logo" href="#"><img width="100px" src="../Images/1.jpg" /></a> <div id="start-btns"> <a href="#"><img src="../Images/1.jpg" /></a> <a href="#"><img src="../Images/1.jpg" /></a> <a href="#"><img src="../Images/1.jpg" /></a> <a href="#"><img src="../Images/1.jpg" /></a> </div> </div> </div> </div> </body> </html> ``` here is css code ``` html {height: 100%;} body { height: 100%; margin: 0; padding: 0; font: 14px/16px Helvetica; -webkit-text-size-adjust: none; background-position: center center; background-color: #d5d5d5; background-image: -webkit-gradient(radial, center center, 2, center center, 750, from(#fafafa), to(#d5d5d5)); background-image: -moz-radial-gradient(center center 45deg, circle closest-corner, #fafafa 0%, #d5d5d5 100%); } a img {border: none; } .texture { background: url("../Images/texture.png") repeat scroll 0 0 transparent; width: 100%; min-height: 100% !important; height: 100%; } .splash { background: url(../Images/shapes1.png) no-repeat center center; width: 100%; min-height: 100% !important; height: 100%; } #eco-home-page a#logo{ width: 100px; height: 100px; left: 50%; top: 50%; margin-left: -50px; margin-top: -400px; position: absolute; } #eco-home-page #start-btns {width: 610px; height: 406px; position: absolute; left: 50%; top: 50%; margin-left: -300px; margin-top: -200px;} #eco-home-page .splash-screen a#logo {margin-top: -320px !important; } /*for ipad*/ @media all and (max-width: 600px) { body { // extra styles for mobile } } /*for iphone/ipod*/ @media all and (min-width: 600px) { body { // extra styles for desktop } } ```
web-application viewport problem
CC BY-SA 2.5
null
2011-03-09T14:53:57.173
2011-03-09T22:01:57.330
null
null
277,696
[ "javascript", "html", "webkit", "css" ]
5,247,663
1
5,247,815
null
0
470
I have a XIB in interface builder that is in Portrait mode and has 5 UILabels on it spaced evenly across the view. When the iPhone is rotated right or left I want the labels to spread evenly across the view to take full advantage of the extra screen width. I can do this with one control really easily using the Size&Position bit of Interface Builder but how do I set up the other controls to do this? Is this something you have to do programmatically? Thanks Mike ![enter image description here](https://i.stack.imgur.com/CUnxD.png)
InterfaceBuilder going landscape
CC BY-SA 2.5
null
2011-03-09T15:01:44.507
2011-03-09T16:21:45.503
2011-03-09T16:21:45.503
570,498
570,498
[ "iphone", "ios", "interface-builder", "uiinterfaceorientation" ]
5,247,738
1
5,280,156
null
0
393
HI, I'm new in game development.I have an image with design like PLAY, LEARN,etc... in the image of Home screen. I want to click over the specific PLAY to start the game OR over LEARN to get the idea of game.I'm struck in this click feature . How can i retrieve specific coordinates from static image to start different UI screens.Image attached. I want to lick over play to start new Activity.Similarly for other (learn,more games,Help). Looking for help.....Urgently.Thanks in Advance. -Rgds, praween!![enter image description here](https://i.stack.imgur.com/jI6Pz.png)
How to click at a particular coordinates over image to start different UI screens in Android
CC BY-SA 2.5
null
2011-03-09T15:07:54.973
2011-03-12T01:20:18.583
2011-03-09T15:13:27.487
292,605
292,605
[ "android" ]
5,247,803
1
30,955,098
null
10
53,974
I would like to set up a conditional formatting setting that would hide the contents (the cell should look blank) if the cell's contents is equal to another cell. Does anyone know of a function to do this? I tried just making the font the same color as the background (gray, in this case), but unfortunately when this is printed, there is some sort of residue shadow left over from the text. Here is what happens when I do gray on gray (they are supposedly the same color): ![Gray on gray still shows up](https://i.stack.imgur.com/xf7R0.jpg) I am using Excel 2008 on the Mac.
Conditional formatting to hide cell content even when printed
CC BY-SA 3.0
null
2011-03-09T15:13:36.533
2019-02-04T05:15:24.883
2014-10-01T18:33:51.933
1,505,120
580,530
[ "excel", "conditional-formatting", "excel-2008" ]
5,247,925
1
5,248,058
null
0
1,112
I am new to actionscript development and can't figure out where to start. Have mercy :) I am trying to create a picture gallery in Actionscript (Flex would also do, but no Flash). Basically, it should be a horizontal list of images with captions below the picture. It should be possible to scroll through the images on a touch enabled device -> no scrollbars I have looked into ScrollViewport put don't know how to implement a basic version in pure Actionscript.! I have included a small sketch ![enter image description here](https://i.stack.imgur.com/4WLny.png) I have seen alot of solutions with a scrollbar. But I want something like on iOS where you scroll with your finger through the images. Thanks in advance!
Horizontal Scrolling of Images in Actionscript (Touch friendly)
CC BY-SA 2.5
null
2011-03-09T15:22:00.903
2011-03-09T15:31:43.850
null
null
609,997
[ "apache-flex", "actionscript-3", "actionscript", "mobile", "touch" ]
5,248,138
1
5,248,323
null
1
2,347
I have written an ASMX service that looks like thus; ``` namespace AtomicService { [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] [ScriptService] public class Validation : WebService { [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string IsEmailValid(string email) { Dictionary<string, string> response = new Dictionary<string, string>(); response.Add("Response", AtomicCore.Validation.CheckEmail(email).ToString()); return JsonConvert.SerializeObject(response, Formatting.Indented); } } } ``` I'm using the Newtonsoft.Json library to provide the JsonConvert.SerializeObject functionality. When call in Fiddler or accessed via my Jquery, I get this response: ![as seen in google chrome in this case](https://i.stack.imgur.com/6O4af.png) The code for this alert is: ``` $(document).ready(function () { $.ajax({ type: "POST", url: "http://127.0.0.1/AtomicService/Validation.asmx/IsEmailValid", data: "{'email':'[email protected]'}", contentType: "application/json", dataType: "json", success: function (msg) { if (msg["d"].length > 0) { alert("fish"); } alert("success: " + msg.d); }, error: function (msg) { alert("error"); } }); }); ``` And although I can the data from the `msg.d`, I can't access it. I want to know what the `Response` is. How can I get at it? I'm not entirely convinced my ASMX is returning the right type of JSON for this to all work. Can anyone help? :)
Reading the JSON data returned from ASMX
CC BY-SA 2.5
0
2011-03-09T15:37:41.403
2011-03-10T16:59:19.237
null
null
102,147
[ "c#", "jquery", "json", "asmx" ]
5,248,372
1
5,248,428
null
12
14,835
I'm using JPA (Hibernate as provider), Glassfish and MySQL. Everything works great in development, but when I deploy the app to a test server and let it run (largely idle) overnight, I'm usually greeted with this in the morning: ``` [#|2011-03-09T15:06:00.229+0000|INFO|glassfish3.0.1|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=23;_ThreadName=Thread-1;|ERROR [htt\ p-thread-pool-8080-(1)] (JDBCTransaction.java:91) - JDBC begin failed com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 41,936,868 milliseconds ago. The last packet \ sent successfully to the server was 41,936,868 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expirin\ g and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connec\ tion property 'autoReconnect=true' to avoid this problem. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1118) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3321) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1940) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2562) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4956) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:87) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473) at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60) ``` I tried using the following in my `persistence.xml`, but it didn't help: ``` <property name="hibernate.c3p0.min_size" value="5"/> <property name="hibernate.c3p0.max_size" value="20"/> <property name="hibernate.c3p0.idleTestPeriod" value="30"/> <property name="hibernate.c3p0.timeout" value="0"/> <property name="hibernate.c3p0.max_statements" value="0"/> ``` So that's the C3p0 configuration; it's entirely possible I'm missing the part that actually tells hibernate "hey, use c3p0". I'm about to try the suggestion that's right there in the error message: add `autoReconnect=true` to my JDBC URL, but this is really starting to feel like cargo-cult development at this point. I would appreciate some guidance on the proper way to address this issue. It's hard to debug, because the test cycle is effectively "run it overnight, see what happens in the morning". I should probably mention how I'm actually using connections in my app. I have a custom [Servlet Filter](http://pastebin.com/e9k5Ar3t) that intercepts all requests. It creates an EntityManager, stores it in a ThreadLocal, and is closed by the filter in a catch/finally block. All my entities obtain a reference to the `EntityManager` from the `ThreadLocal`. It's entirely possible that my filter is at fault, but as it only seems to happen after idle periods, I suspect something else is wrong. I do intend to move to Seam/Weld when I have a chance to catch my breath, but for now I'm relying on this filter. - - In my case, I had to go into the Glassfish console under Resources/JDBC/Connection Pools, Advanced Tab, and then enable Connection Validation: ![enter image description here](https://i.stack.imgur.com/TOUx6.png) This was really the crucial step. You also probably want to set `Validate At Most Once` to something reasonable, say 100 seconds. If you're using C3P0 or similar, make sure you configure `idle_test_period` and `preferredTestQuery`. Whatever you end up doing, it's important to test out your changes to see if they have the desired effect. To make the timeout happen faster in MySQL, you can temporarily set the `wait_timeout` to something low like 30 seconds by editing `my.cnf`. This was a tremendous help in debugging this problem, as it allowed me to test changes in seconds, rather than hours.
help me avoid connection timeout with JPA, Hibernate & MySQL
CC BY-SA 3.0
0
2011-03-09T15:54:22.120
2013-06-12T10:09:13.170
2011-05-22T16:15:53.820
93,995
93,995
[ "java", "hibernate", "jpa", "jakarta-ee", "connection-pooling" ]
5,248,461
1
5,263,840
null
1
2,044
I am building an online shop and I have a problem. I will have products which have a direct price (for example HTC Touch 2 Smartphone: $299.00 ), but in the same time I will have products which have prices for combinations based on varieties: for example: ``` product: Nike Exclusive T-Shirt 2011 varieties: Sizes: L, XL Colors: red, blue combinations will be: L white - $10 XL white - $15 L blue - $11 XL blue - $16 ``` I need the best way (or the only one working :) ) of database structure, where I can store both types of products, and if I want to list my products from a category which contains both types of products on the webpage (single price, multiple prices) i can build a mysql query to get all the products in the same query. thanks UPDATE I will have for sure the following tables: `[products]`, `[varieties]` (color, size), `[varietyValues]` (which stores what king od colors and what kind of sizes does the product have - each one is a row in the table {productId + varietyId + value (red, S, M, green, XL, etc...)} ). After this one I would have another table `[combinations]`, with a many-to-many [n-to-m] relationship between `[combinations]` and `[varietyValues]` which will result a new table `[combPrices]`. Each row of this new n-to-m table will have a price. Now the problem is I can't figure out how to store single-price products in this data structure. --- UPDATE 2 In this image you can see the database diagram, which I think would be ok for the multiple-price products: ![database diagram](https://i.stack.imgur.com/ikwH4.png) THE MAIN PROBLEM: Since this is a webshop, people will put items in the shopping cart. I think the items inserted into the shopping cart should be from the same table (in our case it would be the `[combinations]` table, since there are the prices stored). Here are some data for these tables, just to be more clear: `[products]` ``` productid | productName 1 | Nike T-Shirt 2 | HTC Touch 2 Smartphone ``` `[specifications]` ``` specId | productId | specName 1 | 1 | Size 2 | 1 | Color ``` `[specvalues]` ``` specValueId | specId | svValue 1 | 1 | L 2 | 1 | XL 3 | 2 | white 4 | 2 | blue 5 | 2 | red ``` `[combinations]` (items into the cart) ``` combinationId | price | description 1 | 10 | White L Nike T-Shirt 2 | 15 | White XL Nike T-Shirt 3 | 11 | Blue L Nike T-Shirt 4 | 16 | Blue XL Nike T-Shirt 5 | 18 | Red XL Nike T-Shirt ``` `[combinationParts]` ``` nmid | combinationId | specValueId 1 | 1 | 1 2 | 1 | 3 3 | 2 | 2 4 | 2 | 3 5 | 3 | 1 1 | 3 | 4 2 | 4 | 2 3 | 4 | 4 4 | 5 | 2 5 | 5 | 5 ``` I hope my diagram and database population does make sense :) . So the final question is how can I store the single price products (HTC Touch 2 Smartphone) so it can be added to shopping cart just like the multiple price products.
What's the best way to store my datastructure in database?
CC BY-SA 2.5
null
2011-03-09T16:00:58.417
2011-03-10T18:07:45.063
2011-03-10T10:19:35.020
281,005
281,005
[ "mysql", "database", "database-design" ]
5,248,712
1
null
null
0
1,672
How can you (if at all) name a static column group in a SQL Server Reporting Services matrix report? With 35 columns it gets a bit tricky when trying to match the generic (static) names with actual column headings. I have not been able to determine via properties or other methods how to give these static column groups useful names. See the attached image for a reference of what I mean. ![static column groups](https://i.stack.imgur.com/rWdN2.png)
How do you name a static column group in a Reporting Services matrix report
CC BY-SA 2.5
null
2011-03-09T16:19:20.257
2011-03-20T15:45:09.757
null
null
1,989
[ "reporting-services", "ssrs-2008" ]
5,248,889
1
5,411,793
null
6
3,254
In the char I have posted below, I am comparing the results from an IFFT run in FFTW and CUFFT. What are the possible reasons this is coming out different? Is it really THAT much round off error? Here is the relevant code snippet: ``` cufftHandle plan; cufftComplex *d_data; cufftComplex *h_data; cudaMalloc((void**)&d_data, sizeof(cufftComplex)*W); complex<float> *temp = (complex<float>*)fftwf_malloc(sizeof(fftwf_complex) * W); h_data = (cufftComplex *)malloc(sizeof(cufftComplex)*W); memset(h_data, 0, W*sizeof(cufftComplex)); /* Create a 1D FFT plan. */ cufftPlan1d(&plan, W, CUFFT_C2C, 1); if (!reader->getData(rowBuff, row)) return 0; // copy from read buffer to our FFT input buffer memcpy(indata, rowBuff, fCols * sizeof(complex<float>)); for(int c = 0; c < W; c++) h_data[c] = make_cuComplex(indata[c].real(), indata[c].imag()); cutilSafeCall(cudaMemcpy(d_data, h_data, W* sizeof(cufftComplex), cudaMemcpyHostToDevice)); cufftExecC2C(plan, d_data, d_data, CUFFT_INVERSE); cutilSafeCall(cudaMemcpy(h_data, d_data,W * sizeof(cufftComplex), cudaMemcpyDeviceToHost)); for(int c = 0; c < W; c++) temp[c] =(cuCrealf(h_data[c]), cuCimagf(h_data[c])); //execute ifft plan on "indata" fftwf_execute(ifft); ... //dump out abs() values of the first 50 temp and outdata values. Had to convert h_data back to a normal complex ``` ifft was defined like so: ``` ifft = fftwf_plan_dft_1d(freqCols, reinterpret_cast<fftwf_complex*>(indata), reinterpret_cast<fftwf_complex*>(outdata), FFTW_BACKWARD, FFTW_ESTIMATE); ``` and to generate the graph I dumped out h_data and outdata after the fftw_execute W is the width of the row of the image I am processing. See anything glaringly obvious? ![enter image description here](https://i.stack.imgur.com/Yi2gU.jpg)
Differences between FFTW and CUFFT output
CC BY-SA 2.5
0
2011-03-09T16:30:43.173
2019-11-25T08:01:47.790
2011-03-09T16:43:05.773
229,072
229,072
[ "c++", "cuda", "fftw" ]
5,249,053
1
5,249,167
null
1
4,683
What am I doing wrong? This is the .h file: ``` #import <UIKit/UIKit.h> #import <sqlite3.h> @class ReaderViewController; @interface ReaderAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; ReaderViewController *viewController; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet ReaderViewController *viewController; - (void)checkForDatabase; //- (void)SQLiteConnection: (NSString *)defaultDBPath; @end ``` The error is shown here: ![screen shot of compile results](https://i.stack.imgur.com/K95Ff.png)
Method definition not found
CC BY-SA 2.5
null
2011-03-09T16:41:46.243
2011-03-09T16:48:32.843
2011-03-09T16:43:22.403
1,231,786
1,231,786
[ "objective-c" ]
5,249,215
1
5,249,259
null
0
362
Hello computing peoples of the world! I have a bunch of .mm with their respective .h files. I would like one global unsigned int variable that I could use throughout all the source files. Right now I'm trying to do this by placing this statement in one of the .h files: ``` extern unsigned int global_size_of_instrumental; ``` But I'm getting super strange errors such as:![enter image description here](https://i.stack.imgur.com/d1HST.png) Any ideas?
Declaring a global variable in C with .mm and .h files?
CC BY-SA 2.5
null
2011-03-09T16:51:59.153
2011-03-09T16:54:48.170
null
null
385,559
[ "c", "global-variables" ]
5,249,316
1
5,249,421
null
6
17,629
Please help me get to the bottom of this...the only file that this error is pointing to, is my jQuery file. See the error I am receiving here. ![enter image description here](https://i.stack.imgur.com/dlneD.png) How do I find the line in the file that is throwing this error ? Edit2: Here is a screenshot after Nathan's suggestion of replacing `.js` with `.html` or nothing at all: ![enter image description here](https://i.stack.imgur.com/mSMzx.png)
Uncaught SyntaxError: Unexpected Token - jQuery - Help!
CC BY-SA 2.5
null
2011-03-09T16:59:18.437
2013-02-27T18:51:19.017
2011-03-09T17:41:47.173
91,970
91,970
[ "jquery" ]
5,249,345
1
5,249,434
null
1
899
I would like to count how many automatic line breaks (not returns the user enters) I have in a text displayed in UITextView which is, for argument's sake, 200 pixels in width and 460 pixels in length (see attached screen shot!). I have found this when looking for a solution: ``` stringSize = [t sizeWithFont:f constrainedToSize:CGSizeMake(320, 10000) lineBreakMode:UILineBreakModeWordWrap]; ``` But this won't give me an int number for 'invisible' line brakes, will it? Also, I don't understand the 320, 10000 ... 320 is for the width I guess and would need to be changed to 200 in my case. But why 10.000 ?? Sorry, but I'm a beginner and this doesn't make much sense to me... ![enter image description here](https://i.stack.imgur.com/5sFR0.png)
How to count line breaks (not /n) in an UITextView?
CC BY-SA 2.5
null
2011-03-09T17:01:13.893
2011-03-09T17:14:57.643
null
null
648,371
[ "iphone", "cocoa-touch", "uitextview" ]
5,249,500
1
null
null
2
250
I have an ordered list which is actually a display of products on a page. Within each list item (`li`) there is some content followed by a `div` containing some more content, before closing the list item. I need for the div within each list item to expand (its width) beyond its parent list item and actually fill the width of the ordered list (`ol`). Each div also needs to sit directly below its parent list item and push any following list items down. I know the probably doesn't make sense, it's not very easy to explain. Here's the HTML I have so far: ``` <ol class="products group"> <li> <a href="#"> <img src="assets/img/ind-aerospace.jpg" align="" /> <h4>Product Title</h4> </a> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum at auctor justo. Vivamus non elit velit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum porttitor blandit lacus in sodales.</p> </li> <li> <a href="#"> <img src="assets/img/ind-automotive.jpg" align="" /> <h4>Product Title</h4> </a> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum at auctor justo. Vivamus non elit velit. Vestibulum porttitor blandit lacus in sodales.</p> <!-- Expand this --> <div> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum at auctor justo. Vivamus non elit velit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum porttitor blandit lacus in sodales.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum at auctor justo. Vivamus non elit velit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum porttitor blandit lacus in sodales.</p> </div> </li> <li> <a href="#"> <img src="assets/img/ind-power.jpg" align="" /> <h4>Product Title</h4> </a> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum at auctor justo. Vivamus non elit velit. Vestibulum porttitor blandit lacus in sodales.</p> </li> <li> <a href="#"> <img src="assets/img/ind-power.jpg" align="" /> <h4>Product Title</h4> </a> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum at auctor justo. Vivamus non elit velit. Vestibulum porttitor blandit lacus in sodales.</p> </li> <li> <a href="#"> <img src="assets/img/ind-power.jpg" align="" /> <h4>Product Title</h4> </a> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum at auctor justo. Vivamus non elit velit. Vestibulum porttitor blandit lacus in sodales.</p> </li> <li> <a href="#"> <img src="assets/img/ind-power.jpg" align="" /> <h4>Product Title</h4> </a> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum at auctor justo. Vivamus non elit velit. Vestibulum porttitor blandit lacus in sodales.</p> </li> ``` Here's my CSS: ``` ol.products { position: relative; } ol.products li { list-style: none; float: left; width: 30%; margin: 0 3% 1.5em 0; border-bottom: dotted 1px #ed2124; border-bottom: dotted 1px rgba(237,33,36,.5); } ol.products li p { margin: .5em 0; min-height: 140px; line-height: 1.2em; } ol.products li div { position: relative; width: 100%; border: solid 1px red; } ol.products li div p { min-height: 0; } ``` Here's a wireframe of the list that might help it make a little sense: ![wireframe of list](https://i.stack.imgur.com/kzfeC.png)
Expand DIV beyond parent List Item
CC BY-SA 2.5
null
2011-03-09T17:12:14.290
2011-03-09T18:45:31.817
2011-03-09T17:24:54.060
493,122
460,322
[ "html", "css" ]
5,249,615
1
null
null
1
482
I've created a UITextField programmatically with the following code: ``` self._maxPriceField = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, labelWidth, labelHeight)]; self._maxPriceField.borderStyle = UITextBorderStyleRoundedRect; self._maxPriceField.clearButtonMode = UITextFieldViewModeWhileEditing; self._maxPriceField.font = fieldFont; self._maxPriceField.delegate = self; ``` The problem I'm having is that my UITextField ends up having these strange black pixels on the edges. This happens both on the device and in the simulator. You can see in the screenshot below: When I create the same UITextField using IB, with the same specs and background, I have no problem. Unfortunately I need to create this UITextField programmatically. Has anybody seen this before? What to do? ![You can see the black pixels at the edge of the UITextField here, right in the middle of the left edge.](https://i.stack.imgur.com/A6MwM.png)
UITextField Black Pixels at Edges
CC BY-SA 2.5
0
2011-03-09T17:20:50.327
2011-03-09T17:42:44.117
2011-03-09T17:22:49.000
296,387
74,967
[ "iphone", "ios", "uitextfield" ]
5,249,842
1
5,598,537
null
101
28,674
I am an Amazon RDS customer and am experiencing daily amazon RDS write latency spikes, corresponding roughly to the backup window. I will also see spikes at the end of a snapshot (case in point: running a snapshot takes appx 1 hour, and in the final 5 minutes, write latency spikes). I am running a multi-AZ m1.large deployment. Is there anyone on Stack who can explain how Amazon RDS backup is working? I've read the Amazon RDS docs, and as far as I can tell, Amazon RDS is not behaving according to spec. Specifically, these backup/snapshot operations should be hitting my replica, and therefore not causing any downtime/performance hit, or so I thought. I can distill my problem into six questions: - - - - - - Bonus Question: where and how do you host your mysql database? I can say that I have been generally happy with RDS except for these daily write latency issues. I love the built-in database monitoring and it was fairly simple to setup and get going. Thanks! ![amazon RDS write latency](https://i.stack.imgur.com/YgyYB.png)
How does Amazon RDS backup/snapshot actually work?
CC BY-SA 2.5
0
2011-03-09T17:37:23.783
2018-03-15T16:20:51.043
null
null
61,072
[ "mysql", "amazon-web-services", "latency", "amazon-rds" ]
5,249,931
1
null
null
6
1,415
I write lots of little test apps on my devices. Is there some metadata I can add to the app so it appears more readily in Spotlight searches? For instance, I made a laundry timer app named Lavado ![Lavado app icon](https://i.stack.imgur.com/vDW0A.png) Can I make it appear in Spotlight searches when I search for "timer" or "laundry"? This is not for the Apple App Store, just on my devices.
How to make custom iOS apps easier for Spotlight to find
CC BY-SA 2.5
null
2011-03-09T17:45:15.417
2011-03-11T12:18:49.400
null
null
23,973
[ "ios", "testing", "metadata", "spotlight" ]
5,250,153
1
5,263,234
null
0
4,375
This is my table in FireFox. Note that the center column, with the user name, is wide and the edit link is right aligned. ![enter image description here](https://i.stack.imgur.com/fIVfx.png) This is IE7 and IE8: ![enter image description here](https://i.stack.imgur.com/Hvmf5.png) Here’s is the html: ``` <fieldset > <legend>Account Information</legend> <table class="display-table"> <tr> <td class="display-label"> <label for="UserName">Username</label> </td> <td class="display-field-middle"> user7 </td> <td class="display-field-right"> <a class="" href="/test1/Account/ChangeUserName">edit</a> </td> </tr> <tr> <td class="display-label"> <label for="Password">Password</label> </td> <td class="display-field-middle"> ********* </td> <td class="display-field-right"> <a class="" href="/test1/Account/ChangePassword">edit</a> </td> </tr> </table> </fieldset> ``` This is the FireBug display of the inherited styles: ![enter image description here](https://i.stack.imgur.com/izzJ3.png) Here is the style sheet: ``` .display-table { border-collapse:collapse; width: 400px; } .display-label { white-space: nowrap; vertical-align:middle; width: 120px; } .display-field-middle { width: 200px; background-color: #dfeffc; vertical-align:middle; height: 30px; padding-left: 5px; padding-right: 5px; } .display-field-right { width: 50px; background-color: #dfeffc; vertical-align:middle; height: 30px; padding-left: 5px; padding-right: 5px; text-align: right; } ``` Why isn’t the middle column expanding and why aren’t the edit links right aligned? I’ve tried everything!
CSS table td width and right align not working
CC BY-SA 2.5
null
2011-03-09T18:04:27.590
2017-05-18T15:46:39.393
2017-05-18T15:46:39.393
4,370,109
131,818
[ "css", "firefox", "html-table", "internet-explorer-7" ]
5,250,224
1
5,250,250
null
0
242
I have a custom `UIView` that acts as a layout object. If I add children to that `UIView` (layout), the layout takes care of their positioning (using the `layoutSubviews` method). Is it possible to constrain the children in such a way, so that they are not drawn outside the layout's bounds? Below is an illustration of what I want to achieve: ![Normal behavior](https://i.stack.imgur.com/ZGBAY.png) ![desired behavior](https://i.stack.imgur.com/1HmFe.png) The left picture is what would normally happen. I want to achieve the situation in the right picture. , I just want it not to be drawn outside its parent. Is this possible and how?
Can UIView's children be constrained to their parent's frame
CC BY-SA 2.5
null
2011-03-09T18:09:36.533
2011-03-09T18:12:14.310
null
null
361,230
[ "iphone", "ipad", "uiview", "ios4" ]
5,250,442
1
5,250,534
null
9
6,128
Given a rectangular area, I want to render some text using a specific font and have the rendered text . As in the image below: ![enter image description here](https://i.stack.imgur.com/Sm2hq.png) 1. This is not the same as just changing font size 2. Rendering it as a bitmap and then scale it is not an option (it looks horrible) 3. Vector graphics is the way to do it ## Solution I came up with the following which seems to work for my purposes. The code draws a single line of text scaling to fill the bounds. Subclass `UIView` and replace `drawRect` as follows. ``` - (void)drawRect:(CGRect)rect { [self drawScaledString:@"Abcde"]; } - (void)drawScaledString:(NSString *)string { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetTextMatrix(context, CGAffineTransformIdentity); NSAttributedString *attrString = [self generateAttributedString:string]; CFAttributedStringSetAttribute((CFMutableAttributedStringRef)attrString, CFRangeMake(0, string.length), kCTForegroundColorAttributeName, [UIColor redColor].CGColor); CTLineRef line = CTLineCreateWithAttributedString((CFAttributedStringRef) attrString); // CTLineGetTypographicBounds doesn't give correct values, // using GetImageBounds instead CGRect imageBounds = CTLineGetImageBounds(line, context); CGFloat width = imageBounds.size.width; CGFloat height = imageBounds.size.height; CGFloat padding = 0; width += padding; height += padding; float sx = self.bounds.size.width / width; float sy = self.bounds.size.height / height; CGContextSetTextMatrix(context, CGAffineTransformIdentity); CGContextTranslateCTM(context, 1, self.bounds.size.height); CGContextScaleCTM(context, 1, -1); CGContextScaleCTM(context, sx, sy); CGContextSetTextPosition(context, -imageBounds.origin.x + padding/2, -imageBounds.origin.y + padding/2); CTLineDraw(line, context); CFRelease(line); } - (NSAttributedString *)generateAttributedString:(NSString *)string { CTFontRef helv = CTFontCreateWithName(CFSTR("Helvetica-Bold"),20, NULL); CGColorRef color = [UIColor blackColor].CGColor; NSDictionary *attributesDict = [NSDictionary dictionaryWithObjectsAndKeys: (id)helv, (NSString *)kCTFontAttributeName, color, (NSString *)kCTForegroundColorAttributeName, nil]; NSAttributedString *attrString = [[[NSMutableAttributedString alloc] initWithString:string attributes:attributesDict] autorelease]; return attrString; } ``` Example usage: ``` CGRect rect = CGRectMake(0, 0, 50, 280); MyCTLabel *label = [[MyCTLabel alloc] initWithFrame:rect]; label.backgroundColor = [UIColor whiteColor]; [self addSubview:label]; ```
How to render stretched text in iOS?
CC BY-SA 3.0
0
2011-03-09T18:31:48.573
2013-12-19T15:38:26.793
2011-10-07T15:58:00.043
53,328
53,328
[ "iphone", "ios", "fonts", "core-graphics", "uilabel" ]
5,251,041
1
5,251,300
null
0
171
I am writing a query against an advanced many-to-many table in my database. I call it an advanced table because it is a many-to-many table with and extra field. The table maps data between the fields table and the students table. The fields table holds potential fields that a student can used, kind of like a contact system (i.e. name, school, address, etc). The studentvalues table that I need to query against holds the field id, student id, and the field answer (i.e. studentid=1; fieldid=2; response=Dave Long). So my table looks like this: ![Table Layout](https://i.stack.imgur.com/2eKIK.png) What I need to do is take a few passed in values and create a grouped accumulated report. I would like to do as much in the SQL as possible. So that data that I have will be the group by field (a field id), the cumulative field (a field id) and I need to group the students by the group by field and then in each group count the amount of students in the cumulative fields. So for example I have this data ``` ID STUDENTID FIELDID RESPONSE 1 1 2 *(city)* Wallingford 2 1 3 *(state)* CT 3 2 2 *(city)* Wallingford 4 2 3 *(state)* CT 5 3 2 *(city)* Berlin 6 3 3 *(state)* CT 7 4 2 *(city)* Costa Mesa 8 4 3 *(state)* CA ``` I am hoping to write one query that I can generate a report that looks like this: ``` CA - 1 Student Costa Mesa 1 CT - 3 Students Berlin 1 Wallingford 2 ``` Is this possible to do with a single SQL statement or do I have to get all the groups and then loop over them? Here is the code that I have gotten so far, but it doesn't give the proper stateSubtotal (the stateSubtotal is the same as the citySubtotal) ``` SELECT state, count(state) AS stateSubtotal, city, count(city) AS citySubtotal FROM( SELECT s1.response AS city, s2.response AS state FROM studentvalues s1 INNER JOIN studentvalues s2 ON s1.studentid = s2.studentid WHERE s1.fieldid = 5 AND s2.fieldid = 6 ) t GROUP BY city, state ```
Grouping and Accumulating Records at the same time
CC BY-SA 2.5
null
2011-03-09T19:22:41.773
2011-03-09T20:15:56.343
2011-03-09T19:55:12.140
526,895
526,895
[ "mysql", "sql" ]
5,251,062
1
5,251,085
null
3
2,921
I have a ListView control that has cover images, posters similar to this app: ![enter image description here](https://i.stack.imgur.com/yiRi8.jpg) I am trying to get the same blue glow mouseover effect. Any ideas on how to achieve this?
How to do this glow effect in WPF?
CC BY-SA 3.0
0
2011-03-09T19:25:24.443
2011-06-30T23:22:05.007
2011-06-30T23:22:05.007
51,816
51,816
[ "c#", ".net", "wpf", "effects" ]
5,251,114
1
5,251,195
null
4
211
I've run into this over the years and just chalked it up to VS weirdness, but I'm curious if anyone has an explanation. In my example below I'm using the mouse-over "drill down" on an exception to look at some values. I noticed that if I go into the `Data` section (it's nearly faded out in the screen shot below, sorry) I can navigate down a seemingly endless chain of `Values->NodeKeyValueCollection->Non-Public Members->List` and then it goes back to `Values`. I've gone over 30 levels deep in this drill down, with no end in sight. Is there really something in the Exception object that goes on like this or is this a strange feature of mouse-over drill down? Screen shot: ![enter image description here](https://i.stack.imgur.com/U6Ogb.png)
Infinite drill down in Visual Studio?
CC BY-SA 2.5
0
2011-03-09T19:29:48.283
2011-03-09T21:00:37.400
2011-03-09T21:00:37.400
226,897
226,897
[ ".net", "visual-studio", "visual-studio-2010" ]
5,251,276
1
5,252,703
null
4
4,200
I have a form where I have to fill 3 columns of a table with data. Each of these columns has an ArrayList from a backing bean attached. Each of the ArrayLists holds the same number of instances of the same type "LabValue". Each LabValue has a name ("Parameter") and a unit ("Einheit") but I need both columns only once for the first datatable (picture below). Since a `h:datatable` can only hold one List until now I solved the problem by putting three datatables in one row of a `h:panelgrid` as shown in the picture below: ![Form with three datatables in a one-row panelgrid](https://i.stack.imgur.com/BF8vr.png) This works fine but we have some trouble with our tests in different browsers: Sometimes we have a vertical offset between Datatable1 on the one hand and Datatable2&3 on the other hand (e.g. Chrome and Firefox work fine; Safari not). E.g. Safari renders the header of datatable 2 and 3 in four lines and datatable one in three lines (not shown in picture). This will cause an offset. So the best way would be to have them in one single datatable and finally get rid of the offset. Is there a way to do this in JSF 2.0 without introducing a new class holding all three lists?
Can I put multiple ListArrays in different colums of the same h:datatable?
CC BY-SA 3.0
0
2011-03-09T19:44:55.727
2012-03-02T19:05:04.273
2012-03-02T19:05:04.273
620,338
620,338
[ "jsf", "jsf-2" ]
5,251,366
1
null
null
1
2,353
I've come across a bug in Chrome in the following situation: - `#rail``#well`- `#rail`- `#well``hidden``auto` What I'm observing is that, in Chrome, `#well` is not as wide as it should be. From playing with the different widths, it appears that Chrome is calculating the width of the `#well` as if neither the margin, nor the available space it inhabits, exists. Here's a reduction: ``` <html> <head> <style type="text/css"> body { width: 1000px; font-size: 2em; color: white; } #container { background-color: green; } #rail { float: left; width: 100px; background-color: blue; } #well { overflow: hidden; margin-left: 500px; background-color: red; } </style> </head> <body> <div id="container"> <div id="rail">RAIL</div> <div id="well">WELL</div> </div> </body> </html> ``` Screen shots of the reduction in Chrome and Firefox attached. In Firefox, it's as expected -- 100px of `#rail`, then 400px of margin, then 500px of `#well`. So I'm wondering if anyone's seen this before and, if so, whether there's a known workaround. Here's why I have this combination of properties: 1. The #well contains floated content that I'd like for it to wrap, hence the overflow. 2. The #rail may or may not exist on the page, hence the left margin on the #well. Many thanks for any pointers! Here it is in Firefox: ![Firefox](https://i.stack.imgur.com/tAfof.png) And in Chrome: ![Chrome](https://i.stack.imgur.com/8EWJJ.png)
Chrome not calculating width correctly for block with overflow: hidden, left margin, and floated element to the left
CC BY-SA 3.0
0
2011-03-09T19:53:21.190
2012-04-18T03:42:11.907
2011-07-07T23:00:27.243
2,153,784
302,498
[ "google-chrome", "css-float" ]
5,251,650
1
null
null
2
1,103
I am a litle bit lost here. I am using a grails application deployed in tomcat with [memcached-session-store](http://code.google.com/p/memcached-session-manager/). That it uses [spymemcached](http://code.google.com/p/spymemcached/). I am also using [melody plugin](http://www.grails.org/plugin/grails-melody) to monitor the app. In the righter-upper part, there is a http-sessions graph that only grows. We need to know if this is a potential problem. For now, and without know, we daily restart the webservers. And as a last test we are going to let the http-sessions grows to see if in the future it tends to clean it self. This is the graph that I am talking about: ![too many Http sessions](https://i.stack.imgur.com/ZhUmm.png) So: is a problem? Do I have to configure memcached, tomcat, grails, memcached-session-store or spymemcached to expirate the sessions with a less expiration time? I couldn't find in Interet how to do that. Any pointer would help. thanks in advance
too many http sessions with grails and memcached-session-store
CC BY-SA 2.5
0
2011-03-09T20:18:09.177
2012-02-20T14:47:17.997
null
null
1,356,709
[ "grails", "memcached", "monitoring", "spymemcached" ]
5,251,799
1
5,252,803
null
8
4,287
I have made a slick `NSScroller` subclass, but can't figure out how to make it overlay on top of the `NSScrollView` instead of pushing the `documentView` aside. ![enter image description here](https://i.stack.imgur.com/76ThJ.png) Here you can see the background of a `NSCollectionView` that I wish to make 100% wide, and have the scroller sit along top. Currently, I have to set a white background to the scroller because drawing with a `clearColor` is not showing as transparent, but as black. Am I going about this the wrong way? Am I missing something obvious here? How can I achieve the behavior of a transparent-tracked `NSScroller` that sits atop a `NSScrollView`'s contents?
NSScrollview and transparent, overlay NSScroller subclasses
CC BY-SA 2.5
0
2011-03-09T20:32:47.133
2013-09-29T07:06:37.517
null
null
69,634
[ "cocoa", "transparency", "drawrect", "nsscrollview", "nsscroller" ]
5,251,814
1
5,251,853
null
4
9,259
What type must I make my file name to use it as an argument to `ifstream.open()`? ``` int main(int argc, char *argv[]) { string x,y,file; string file = argv[1]; ifstream in; in.open(file); in >> x; in >> y; ... ``` With this code, I get the following error: ``` main.cpp|20|error: no matching function for call to 'std::basic_ifstream<char, std::char_traits<char> >::open(std::string&)'| gcc\mingw32\4.4.1\include\c++\fstream|525|note: candidates are: void std::basic_ifstream<_CharT, _Traits>::open(const char*, std::_Ios_Openmode) [with _CharT = char, _Traits = std::char_traits<char>]| ``` UPDATE: i get this error ![enter image description here](https://i.stack.imgur.com/8b0jZ.png)
C++ type of argument to ifstream::open()
CC BY-SA 2.5
0
2011-03-09T20:34:19.533
2011-03-09T21:20:26.110
2011-03-09T21:20:26.110
625,189
625,189
[ "c++", "ifstream" ]
5,251,902
1
5,252,570
null
3
354
in one of my apps I am using alternating colors for my tableviewcells. The tableview features an indexbar to allow for fast scrolling. However now my cells are being "cut off" - the area behind the index bar is not colored, although the header is visible behind the index letters. So I figure this is not a problem of the index bar not being transparent, but more of the tableviewcells being too short or something like that. Here's what it looks like right now: ![enter image description here](https://i.stack.imgur.com/F2qPI.png) Obviosly the green tableviewcells should reach beneath the index bar and fill the gap. I've tried coloring the tableviewcells by setting the backgroundcolor of both the cells contentview and backgroundview. The textlabel and accessoryview have both clearcolor set as their background color (and are not opaque). Any help would be much appreciated! The separators are set to white, that's why they are invisible behind the index bar. If I set them to another color they are visible behind the index bar just like the header is.
How to color the area of a tableviewcell behind the index bar?
CC BY-SA 2.5
0
2011-03-09T20:43:00.067
2011-03-09T21:45:29.587
2011-03-09T20:49:22.790
416,600
416,600
[ "iphone", "objective-c", "cocoa-touch", "ios", "uitableview" ]
5,252,358
1
5,252,380
null
1
1,295
I've seen a couple of apps that have 1 button in what looks like a UITabBar protruding outside the frame. How does one go about doing something like this? Code samples/tutorial suggestions to read would be much appreciated. Here's a photo from one the apps I've seen this in. ![enter image description here](https://i.stack.imgur.com/Q6Hyu.png)
Creating protruding button from tab bar on iOS
CC BY-SA 2.5
0
2011-03-09T21:24:38.053
2011-03-09T21:26:44.607
null
null
566,281
[ "iphone" ]
5,252,504
1
5,264,823
null
9
7,952
I am attempting to setup Symfony2 on an Ubuntu virtual host. However even the simple hello world page is taking around 7-8 seconds to load. I have tried running other applications such as PhpMyAdmin and they are running fine but i cannot figure out why symfony is taking so long to load. Here are some webgrind results: ![Web Grind Results](https://i.stack.imgur.com/JZKsj.png) Im sorry i cant provide any more information at the moment but im not sure where to look. Thanks in advance. Daniel
Symfony2: Slow page loads
CC BY-SA 2.5
0
2011-03-09T21:40:11.800
2011-03-10T19:36:40.343
2020-06-20T09:12:55.060
-1
595,810
[ "php", "symfony" ]
5,252,535
1
5,611,072
null
1
720
`<display:table>` ... by which I mean something like the following: ![enter image description here](https://i.stack.imgur.com/3i1L4.png) Please let me know if this is not possible within HTML at all? -- I assume I can at least hack something resembling this structure using plain HTML/JSP tags. Thanks!
Is it possible to create nested headers using the display:table tag?
CC BY-SA 2.5
null
2011-03-09T21:42:40.513
2011-04-10T10:09:54.673
null
null
262,106
[ "jsp", "displaytag" ]
5,252,542
1
5,252,576
null
0
81
I have master file in my project and on execution it gave me error that it couldn't find my master file. It shows assemblies or refernce missing but there is no place were I can add refernces. Please help!! ![enter image description here](https://i.stack.imgur.com/gamHr.jpg) [http://i.stack.imgur.com/gamHr.jpg](https://i.stack.imgur.com/gamHr.jpg)
I have master file in project still it says master file not found
CC BY-SA 2.5
null
2011-03-09T21:43:11.023
2011-03-09T21:46:20.290
2011-03-09T21:46:19.777
1,583
598,771
[ "c#", "visual-studio" ]
5,252,709
1
5,252,807
null
1
346
Here's the deal: I am working on a site that provides information for art buyers. Pricing, where to buy and things like that. The page is done in php, mysql, and some jQuery here and there. One of the things they want to implement is a . What they want is something like this: ![example of live stream](https://i.stack.imgur.com/OFlQ4.jpg) Where on the left you'd see the stream -instead of the black block- and on the right, the image of the work that is , with the artist name, title and price. That's what I need help with. The image on the left should change as the auction progresses. What I need is to have and option in the admin area on the page, where the administrator can select the image to display. So, to implement this, I would need to: 1. Connect to the database to get the information: pictures, data, etc. 2. Loop trough the record to get a list. From that list, the user will select the image he wants shown on the webpage. 3. Have the admin area send the image to be displayed to the page, and have the page change it dynamically, without the user having to refresh the page. The first two points are no problem, what I'm not quite sure how to do is the third one. Flash? Some from of Javascript? I leaning towards flash, but anything will do. I'm sure what I'm asking for is nothing that hasn't been done before, but my has failed me on this one. I don't need copy and paste code, if you could point me to a tutorial on this, or the basics tools I'd need, that's great.
How can I dynamically change an image from an admin area?
CC BY-SA 2.5
null
2011-03-09T21:58:59.383
2018-04-15T13:29:12.983
2011-03-10T18:40:58.030
363,554
363,554
[ "php", "javascript", "mysql", "flash" ]
5,252,999
1
5,253,445
null
2
270
Continuing with my [matrix multiplication question](https://stackoverflow.com/questions/5252179/how-to-overload-times-and-plus-for-matrix-multiplication-in-mathematica), I want to show the following expression in explicit viewable form in mma: ![the form I want to show in mma](https://i.stack.imgur.com/eq8tt.png) Even if in the case I give a11, ..., b11, ... explicit numbers, I still want it to be (0&&1)||(1&&1) in unevaluated form. Can anyone please help?
Show in explicitly viewable form in Mathematica
CC BY-SA 3.0
null
2011-03-09T22:24:24.830
2012-01-03T21:52:47.770
2017-05-23T12:24:45.570
-1
534,617
[ "wolfram-mathematica" ]
5,253,008
1
5,253,648
null
1
1,566
I need to have my ASP.NET web application support both 8 and prior versions of the IE browser. However, when I click the "broken page" button on my IE8 address bar to switch to Compatibilty View, menu background images are cropped, there is a vertical gap between two menus and a gap between my asp:menu bar and a navigation user control above it. Regular IE8 view: ![enter image description here](https://i.stack.imgur.com/f9tpl.png) Compatibility View: ![enter image description here](https://i.stack.imgur.com/rfBwW.png) The general format of each menu is: ``` <asp:TableCell ID="tcFurnMenuSectls" runat="server"> <asp:Menu ID="menuFurnSectls" runat="server" StaticDisplayLevels="1" MaximumDynamicDisplayLevels="1" Orientation="Horizontal" CssClass="FurnMenuSectionals" StaticMenuItemStyle-ItemSpacing="0px" DynamicMenuItemStyle-CssClass="FurnMenuDynamicItem" StaticMenuItemStyle-CssClass="FurnMenuStaticItem" DynamicHoverStyle-CssClass="FurnMenuDynamicItemHover" DynamicVerticalOffset="0" StaticHoverStyle-CssClass="FurnMenuStaticItemHoverSectls" StaticEnableDefaultPopOutImage="false" DynamicPopOutImageUrl="~/Images/AppMenu/menu_arrow_grey.gif" DynamicMenuItemStyle-VerticalPadding="2" DisappearAfter="0" OnMenuItemClick="menuFurn_MenuItemClick"> <Items> <asp:MenuItem Text="Sectionals&nbsp;&nbsp;&nbsp;&nbsp;" ImageUrl="~/Images/AppMenu/FurnMenuGradientTransparent.png" Selectable="false"> <asp:MenuItem Text="Options&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" Value="Sectionals_Options" NavigateUrl="~/FurnMain.aspx?_page=OptsSectl&_title=SectionalOptions"> </asp:MenuItem> <asp:MenuItem Text="Latest deals&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" Value="Sectionals_Deals" NavigateUrl="~/FurnMain.aspx?_page=DealsSectl&_title=SectionalDeals"></asp:MenuItem> </asp:MenuItem> </Items> </asp:Menu> </asp:TableCell> ``` If I select View -> Source, save the generated HTML and compare the two results, the only difference is in a property of the upper ("Client Home") user control: ``` <table id="topNavCtrl_menuTopNav" class="TopNavMenu topNavCtrl_menuTopNav_2" cellpadding="0" cellspacing="0" border="0" style="margin-top:-2px;"> ``` In the "compatibility" version, margin-top is -3px, instead of -2.
IE8 Compatibility View breaks asp:menu
CC BY-SA 2.5
0
2011-03-09T22:25:05.393
2011-03-25T02:35:02.363
2011-03-09T22:30:29.930
67,875
67,875
[ "asp.net", "ie8-compatibility-mode", "aspmenu" ]
5,253,037
1
5,253,122
null
0
449
I am attempting to create a singleton, which I finally got to build without errors. I'm missing something, but not sure what. Here's my console log: ![(http://imgur.com/ERjIS);](https://i.stack.imgur.com/w45Uo.png) here's my source code: ![(http://imgur.com/SZKT3)](https://i.stack.imgur.com/0zLrW.png). Here's the main routine (![http://imgur.com/6J5GE](https://i.stack.imgur.com/IeFaw.png)), where it crashes on line 32. Any help would be greatly appreciated!
Objective-C application crashes with 'unrecognized selector sent '
CC BY-SA 2.5
null
2011-03-09T22:27:54.810
2011-03-09T22:36:15.013
2011-03-09T22:31:05.297
1,231,786
1,231,786
[ "objective-c", "crash", "singleton", "selector" ]
5,253,110
1
5,253,421
null
1
886
## Working live URL showing problem: [http://69.24.73.172/demos/newDemo/test.html](http://69.24.73.172/demos/newDemo/test.html) ![enter image description here](https://i.stack.imgur.com/R8Nwt.png) : ``` <div class="small-vote"> <a href="#" class="s plus-one bubble" bubble=":)&lt;br /&gt;Vote this comment up&lt;br /&gt;if you like it!"></a> <a href="#" class="s minus-one bubble" bubble=":(&lt;br /&gt;Vote this comment down&lt;br /&gt;if you disagree with it!"></a> </div> ``` This is a problem on all major browsers. If the mouse enters the bottom halfish of the anchor link, it's all fine. It highlights it, popup comes up, and you can click the link. If you enter the top half of the link, it lets you click it until the mouse is moved even 1 pixel, then the link deactivates and you have to exit and re-enter the area to click on it. It's enough of a problem to make the anchor links pretty unusable. ``` a.bubble:hover { background-color:Red; } .s{ background-image:url('../images/sprites.png'); background-repeat:no-repeat; } .plus-one { display:block; width:20px; height:16px; background-position: -46px -135px; float:left; margin-right:1px; margin-top:1px; } .minus-one { display:block; width:20px; height:16px; background-position: -67px -135px; float:right; margin-left:1px; margin-top:1px; } .minus-one:hover { background-position: -67px -153px; } .plus-one:hover { background-position: -46px -153px; } ``` As a reference, when the popup box is taken off the anchor link, the links behave properly. I'm using jQuery Bubble Popup v.2.3.1.
Problem with bubble tooltip
CC BY-SA 2.5
null
2011-03-09T22:34:41.193
2011-03-09T23:06:19.560
2020-06-20T09:12:55.060
-1
356,635
[ "javascript", "jquery", "html", "css", "bubble-popup" ]
5,253,289
1
17,165,817
null
2
6,220
I've built a top navigation prototype which needs to have an overlay (transparent PNG) image on top of it. It currently covers about 1/3 of the links. ![enter image description here](https://i.stack.imgur.com/7rQpk.jpg) Is there any way I can make the top 1/3 of the links respond even-though there's a `<div />` covering them partly? The overlay won't contain anything clickable it's only a design feature. I've never done this and wouldn't imagine it's possible but I look forward to being proven wrong. `Javascript/jQuery` not preferred but will use as a last resort. [test case on jsFiddle](http://jsfiddle.net/pXXpU/5/), it directly mimics the structure of my current code.
Responding to links under an overlay div
CC BY-SA 2.5
0
2011-03-09T22:52:14.930
2013-06-18T09:53:55.683
2011-03-09T23:13:17.933
333,255
333,255
[ "javascript", "jquery", "html", "css" ]
5,253,576
1
5,253,659
null
0
227
I have this code where I am attempting to create a database; I'm getting a warning (which is causing the crash) about "instance variable 'db' accessed in a class method". Being a newbie, I don't know how to fix it (crash occurs on line 57). Help is appreciated. :D ![the .m file](https://i.stack.imgur.com/z26BT.png) This is the .h file: ![the .h file](https://i.stack.imgur.com/XG5Vw.png)
Instance method called from class method causes app to crash
CC BY-SA 2.5
null
2011-03-09T23:22:59.707
2011-03-09T23:33:29.747
null
null
1,231,786
[ "objective-c" ]
5,253,634
1
6,510,976
null
7
3,918
I am formatting a web page to display a crossword puzzle. I would like to have it displayed in a format that is similar to how it appears in a newspaper so as to make it easier to print. Something like the following: ![Crossword Layout](https://i.stack.imgur.com/2AAf3.jpg) The idea being that there is one list of clues that we are working with and each column overflows into the next and the heights of the columns is optimized so that the first hits at the bottom of the crossword (the big box) and the other three are approximately the same height. Is there a way to do this with CSS and HTML? I sort of suspect that there is not. Is JavaScript the way to go? Thanks! --- EDITED TO ADD: Using the -moz-column-width and -moz-column-gap I'm able to get this improved layout: ![Improved Layout](https://i.stack.imgur.com/Ysyjg.png) Any thoughts on how I could get the crossword to move up and have the clues flow around it? Thanks! --- FURTHER EDITED TO ADD: I tried floating the grid div and it just lays itself on top of the text, it doesn't actually push the text out of the way. Not sure how to change that. Here is what it looks like: ![Floating Grid](https://i.stack.imgur.com/JMKd5.jpg) I did try floating the clues to the left, which lined them all up in a single column on the left hand side of the page. This is what happened whether I floated the individual list items or the entire ordered list. Any thoughts on something I've missed? Thanks for all your help!
HTML layout for Crossword Puzzle
CC BY-SA 2.5
0
2011-03-09T23:30:30.123
2011-06-28T17:57:58.160
2011-03-10T14:24:33.097
356,620
356,620
[ "javascript", "html", "css" ]
5,253,667
1
null
null
0
549
When first time I created my App, I created a Database using Microsoft SQL SERVER Management Studio and I connected my App with it. I created another DB with the same tables and every thing but with diferent names and I let my App to connect to the second one because I want to make some changes and when I am trying to edit my DataSet with Wizard I get this tables page : ![enter image description here](https://i.stack.imgur.com/STkzo.png) as you can see my app couldn't find the right tables and when I am trying to select LastWork table as in the pic, it will make the table name in the DataSet LastWork1. How I can fix this problem? and let it find the right tables
Element X in the DataSet references an object missing from the Database
CC BY-SA 2.5
null
2011-03-09T23:34:08.057
2012-02-03T22:39:36.537
null
null
308,745
[ "database", "visual-studio-2010" ]
5,253,738
1
5,255,113
null
2
2,864
I always struggle with UI design and this is giving me problems. I have an Activity which uses Theme.Dialog to make it appear as a popup. My problem is I want it to always have max screen width regardless of the child components' widths. In the images below, the dialog width on the left is being forced to maximum by the width of the text in the spinner (I don't mind the spinner text being clipped - I'm just happy with the dialog width and it's how I'd like it to look. If I change the spinner selection to an option with shorter text however, I get the dialog on the right. Instead of the text being clipped and the spinner forcing max width of the dialog, the text easily fits and the spinner (and dialog) shrink. My layout is using LinearLayout elements which I'm sure is the main problem but I can't workout what a suitable alternative would be or how to say 'always make the dialog max width'. Any help greatly appreciated. ![enter image description here](https://i.stack.imgur.com/6wdAf.png) ![enter image description here](https://i.stack.imgur.com/prJOs.png)
Trying to force Activity with Theme.Dialog to fixed width
CC BY-SA 2.5
null
2011-03-09T23:42:24.553
2011-03-10T03:28:45.507
null
null
488,241
[ "android" ]