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,225,775
1
5,226,761
null
2
169
I'm having trouble with a SQL query and I was wondering if any one of you could use a little of your time to help me. I have the following query ``` SELECT cfd_enc.id, cfd_enc.version, cfd_enc.prefijo, cfd_enc.fecha, cfd_enc.cfd, cfd_enc.no_aprobacion, cfd_enc.tipo_comprobante, cfd_det.id_orden, cfd_det.producto, cfd_det.total FROM cfd_parametros,cfd_enc LEFT JOIN cfd_det ON cfd_enc.id=cfd_det.id_orden ``` which gets me this: ![](https://i.stack.imgur.com/52Z7U.jpg) (I have 6 rows in cfd_det that share id_orden with cfd_enc.id) Is there any way I could combine all the repeated rows to get something like this? [](https://i.stack.imgur.com/NC7jW.jpg) Any help is really appreciated. I'm really stuck, so let me know if you need more specific information.
Combining SQL query result
CC BY-SA 3.0
null
2011-03-07T21:59:02.197
2013-02-04T04:04:08.953
2013-02-04T04:04:08.953
510,036
648,894
[ "sql", "sql-server" ]
5,225,857
1
5,237,706
null
0
726
im using jquery ui datepicker. for some reason i am experiencing strange behaviour with the icons. the word "next and "prev" are appearing over the top of the icons. ![enter image description here](https://i.stack.imgur.com/SZW4m.png) when i hover it the next and prev words show in red (my link hover color). what is wrong? it was working previously.
jquery ui date picker icons messed up
CC BY-SA 2.5
null
2011-03-07T22:07:46.613
2011-03-08T20:07:13.483
null
null
66,975
[ "jquery", "css", "jquery-ui" ]
5,225,913
1
5,254,397
null
1
2,594
I am trying to drag the circle at A around so that it produces an angle relative to the hidden center element, B. I'm using `MouseEventArgs.GetPosition(IInputElement relativeTo)`, so: ``` Point p = args.GetPosition(B) ``` I'm getting points relative to the top-left of B, not its center, despite setting a RenderTransformOrigin of 0.5, 0.5 on B. I know that I can compute the correct offset manually: [Easiest way to get the angle of mouse position in WPF relative to the center of a circle](https://stackoverflow.com/questions/4784139/easiest-way-to-get-the-angle-of-mouse-position-in-wpf-relative-to-the-center-of-a) ![enter image description here](https://i.stack.imgur.com/prevD.png)
WPF: Apply a RenderTransform such that GetPosition is relative to center, not top-left
CC BY-SA 3.0
null
2011-03-07T22:13:47.193
2012-03-20T16:08:50.863
2017-05-23T10:30:24.107
-1
3,431
[ "wpf-controls" ]
5,225,965
1
5,225,991
null
1
518
How do you make sure all the content in a numerical list is left aligned to the same spot? You see how when you go from #9 to #10, the numbering gets an extra digit and pushes the content a little bit to the right? I can live with #99-to-#100 screwing things up, but I'd like to fix this #9-to-#10 issue. Making the numbering go outside makes the content align properly, but then there's no background on the numbering. ![numerical list](https://i.stack.imgur.com/R3OrE.png) ``` #file ol { line-height: 3em; font-size: 1.2em; color: #999; } #file ol li { list-style: decimal inside none; padding: 0 0 0 1em; } #file ol li.alt { background: #eee; } ```
Consistent left-aligning of a numerical list
CC BY-SA 2.5
0
2011-03-07T22:19:26.197
2011-03-07T22:44:32.800
null
null
459,987
[ "css" ]
5,226,065
1
5,226,144
null
3
448
I need help designing the database for my online custom suit store. So far, i have created the tables for the products, orders, and my users/customers. I think I need to add some tables to manage my shopping cart for customers while they are making their selections and customizing them. At this point, i am a little confused on how to proceed. does my shopping cart need to pretty much hold all the information that my orders tables will hold ultimately? as you can see from the attached image, orders have order items, and order items have order item options. this way, i can pull up each order item that a customer wants, and all of the customizations that go with each particular order. Does this need to first done in my shopping cart, meaning that i would basically have to replicate all of the tables in the orders section of the database, or is there a better way? Also, what else is my database application lacking in order to robustly run a website like www.indochino.com? All help is appreciated... ![enter image description here](https://i.stack.imgur.com/UP1xR.png)
building a database for my site
CC BY-SA 2.5
0
2011-03-07T22:32:31.837
2011-03-14T23:20:07.107
null
null
425,911
[ "database-design", "normalization" ]
5,226,179
1
5,227,152
null
1
280
I am working on my application, I want to hide the bottom toolbar so I can draw where that is, but I can't figure out how to do this. Also, I used a tutorial to help with the drawing, but I can't figure out why it is stopping the drawing at the top of the screen. ![Picture of Proglem](https://i.stack.imgur.com/aA5RB.png) ``` - (void)viewDidLoad { [super viewDidLoad]; drawImage = [[UIImageView alloc] initWithImage:nil]; drawImage.frame = self.view.frame; [self.view addSubview:drawImage]; self.view.backgroundColor = [UIColor lightGrayColor]; mouseMoved = 0; } - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { mouseSwiped = NO; UITouch *touch = [touches anyObject]; if ([touch tapCount] == 2) { drawImage.image = nil; return; } lastPoint = [touch locationInView:self.view]; lastPoint.y -= 20; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { mouseSwiped = YES; UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch locationInView:self.view]; currentPoint.y -= 20; UIGraphicsBeginImageContext(self.view.frame.size); [drawImage.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 5.0); CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0); CGContextBeginPath(UIGraphicsGetCurrentContext()); CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y); CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y); CGContextStrokePath(UIGraphicsGetCurrentContext()); drawImage.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); lastPoint = currentPoint; mouseMoved++; if (mouseMoved == 10) { mouseMoved = 0; } } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; if ([touch tapCount] == 2) { drawImage.image = nil; return; } if(!mouseSwiped) { UIGraphicsBeginImageContext(self.view.frame.size); [drawImage.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 5.0); CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0); CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y); CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y); CGContextStrokePath(UIGraphicsGetCurrentContext()); CGContextFlush(UIGraphicsGetCurrentContext()); drawImage.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); } } ```
Drawing and hiding the toolbar
CC BY-SA 2.5
null
2011-03-07T22:44:29.300
2011-03-08T00:58:12.147
null
null
597,775
[ "iphone", "objective-c", "ios4", "iphone-sdk-3.0", "interface-builder" ]
5,226,253
1
null
null
0
1,813
I wonder if there is any possibility to render special characters (0-31 ASCII, for example) my own way in Qt/QPlainTextEdit? I want to render them as small rectangles as seen in this screenshot: ![screenshot](https://i.stack.imgur.com/NIjS7.jpg) ...or as Notepad++ is doing it. My goal is to be able see all characters. So if a character fails to render with current font (there is no such char for example), a small square should be rendered instead.
Qt, QPlainTextEdit and non-printable characters
CC BY-SA 3.0
null
2011-03-07T22:52:12.660
2015-11-30T07:12:45.517
2011-11-26T03:22:43.007
214,668
648,959
[ "c++", "qt", "qt4" ]
5,226,277
1
5,478,471
null
8
3,250
My insert statement is: ``` INSERT INTO myTable (inst_id,user_id,app_id,type,accessed_on) VALUES (3264,2580,'MyApp','Renew',Now); ``` ...where all of the values are formatted correctly. The table has the above fields and one other, a long int auto-increment key field. The foreign keys are 'inst_id', 'user_id', and 'app_id'. I am getting this error from Access: ![access error](https://i.stack.imgur.com/IhFqe.png) ...and the following error from VS 2005 when it errors out: > System.Data.OleDb.OleDbException: The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again. When making this insert query I can look into the database and see that the each of the foreign key values exist in their respective tables and have been for months (for the particular example I am using). These fields are also set so that I can have duplicates, so that is not the issue. Calls of this nature in other tables works great. I do not need to supply the auto-increment key value in the insert query, it adds it for me automatically (like it should). The weird thing is that if I do this in my code: ``` try { //Execute the query here... } catch { //Execute the same query again } ``` ...or if I just try and execute this within Access twice, it works. Has anyone encountered this before? Again, this type of insert works for other tables, all foreign keys are present in their respective tables, the primary key of this table is set as 'Auto-increment', and all fields (other than the primary key field of course) are set to allow duplicates. Any ideas? Largest key before inserting: `343085`. Largest key after inserting: `343086`. The format is: ``` id: AutoNumber (Field Size=Long Interger, New Values=Increment, Indexed=Yes - No Duplicates) inst_id: Number (Field Size=Long Interger, Required=Yes, Indexed=Yes - Duplicates OK) user_id: Number (Field Size=Long Interger, Required=Yes, Indexed=Yes - Duplicates OK) app_id: Text (Field Size=255, Required=Yes, Indexed=Yes - Duplicates OK) type: Text (Field Size=50, Required=Yes, Indexed=No) accessed_on: Date/Time (Default Value=Now(), Required=Yes, Indexed=No) ```
Why does MS Access 2007 not allow a row insert, but then allow it on the next insert attempt?
CC BY-SA 2.5
0
2011-03-07T22:54:30.010
2018-03-08T23:20:47.010
2011-03-07T23:19:31.200
273,723
273,723
[ "c#", "sql", "insert", "ms-access-2007", "key" ]
5,226,514
1
null
null
0
116
![A many-to-many toal participation relation (both ways)](https://i.stack.imgur.com/IUXCe.jpg) Hello. As shown in the ER model, I want to create a relation between "Busses" and "Chauffeurs", where every entity in "Chauffeurs" must have at least one relation in "Certified", and every entity in "Busses" must have at least one relation in "Certified". Though it was pretty easy to design the ER model, I can't seem to find a way of making this relation in PostgreSQL. Anybody got some ideas ? Thanks
How to make this relation in PostgreSQL?
CC BY-SA 2.5
0
2011-03-07T23:20:14.183
2020-02-26T19:49:51.113
2011-03-07T23:21:55.663
null
498,388
[ "sql", "model", "database", "entity-relationship" ]
5,226,837
1
5,228,693
null
2
4,435
I'm trying to use a different theme on my primefaces (2.2.1) web application but I'm experiencing a strange behavior. Where I should get this (primefaces.org showcase) : ![img]http://dl.dropbox.com/u/7117743/primefacetheme_demo.png[/img](https://i.stack.imgur.com/AjIbk.png) I'm getting this : ![enter image description here](https://i.stack.imgur.com/6Ufu3.png) I'm using the same code as the demo, minus the event handlers and theme roller. The demo can be found there : [http://www.primefaces.org/showcase/ui/layoutComplex.jsf](http://www.primefaces.org/showcase/ui/layoutComplex.jsf) the source code of the page is linked in the bottom. I've tried another theme and I have a similar result. What I did: I've added ``` <link type="text/css" rel="stylesheet" href="theme/primefaces-sunny/theme.css" /> ``` in the head section I've added ``` <context-param> <param-name>primefaces.skin</param-name> <param-value>none</param-value> </context-param> ``` to the web.xml file I have no knowledge of css, I really don't know what could have gone wrong. Any help is appreciated, thanks in advance.
primefaces themes broken
CC BY-SA 2.5
null
2011-03-08T00:01:56.400
2011-03-08T05:26:46.050
2011-03-08T00:21:11.893
157,882
648,859
[ "jsf", "primefaces" ]
5,226,930
1
5,227,445
null
1
1,422
i have this DAG (it is similar to a binary tree, but it is a graph.. has this a specified name?): ![connected binary tree](https://i.stack.imgur.com/moKbM.jpg) (each number is a node and numbers in the node are for example, the program should run with random numbers) it is represented as a list of list: ``` [[1],[2,3],[4,5,6]] ``` i have to find in the more functional way as possible the path that maximize the sum of nodes: ``` [1,3,6] ``` i've searched and this is really similar to projecteuler #18, but project euler asks the hole sum of the path, and in my homework i have to find not only the sum but all nodes. i've tried to adapt some really good solutions to my problem but i didn't managed to. some advice?
all path in a DAG (a kind of connected binary tree)
CC BY-SA 2.5
null
2011-03-08T00:17:50.873
2011-03-08T20:58:31.690
2011-03-08T00:39:13.760
433,685
433,685
[ "python", "binary-tree", "directed-acyclic-graphs" ]
5,226,987
1
5,227,442
null
2
909
Sorry for my title, I can't think of a good one. Anyway. Can someone help me give an idea how to achieve a format like this? what to use? (ex: richtextbox) how to create the cell borders? and it should also be printable. ![pay slip](https://i.stack.imgur.com/hxcIk.jpg)
How can I format text with borders and get it printed?
CC BY-SA 2.5
null
2011-03-08T00:28:36.097
2011-03-08T02:14:01.940
2011-03-08T01:54:22.407
76,337
586,811
[ "c#", "winforms" ]
5,227,060
1
5,227,910
null
0
2,674
First off I am new to android development and some seemingly easy tasks are frustrating me to no end. This is a follow on question to what was answered here: [Changing the checkbox size in Android 2.0](https://stackoverflow.com/questions/5207714/changing-the-checkbox-size-in-android-2-0) The gist of it is that for some reason there is this extra space that keeps showing up next to my checkboxes (See Below). ![Space Next to checkboxes](https://i.stack.imgur.com/bgTV6.jpg) Now I have tried to set the width to 1 and it doesn't get any shorter than what is shown. I have tried to set the width bigger and I can make the size bigger, but no shorter. Please take a look at the code below and let me know what you see. ``` TableLayout table = (TableLayout) findViewById(R.id.timeEntriesTable); for (int i = 0; i < timeEntries.getLength(); i++) { Element element = (Element) timeEntries.item(i); TableRow tr = new TableRow(this); tr.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); CheckBox box = new CheckBox(this); box.setButtonDrawable(getResources().getDrawable(R.drawable.checkbox_off_background)); box.setPadding(0,0,0,0); box.setWidth(1); box.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { CheckBox box = (CheckBox) v; if (box.isChecked()) { box.setButtonDrawable(getResources().getDrawable(R.drawable.checkbox_on_background)); } else { box.setButtonDrawable(getResources().getDrawable(R.drawable.checkbox_off_background)); } } }); TextView dateBox = new TextView(this); String dateText = element.getAttribute("date"); dateBox.setText(dateText); dateBox.setTextColor(Color.BLACK); TextView customerBox = new TextView(this); String customerName = element.getAttribute("customer"); customerBox.setText(customerName); customerBox.setTextColor(Color.BLACK); TextView hoursBox = new TextView(this); String hours = element.getAttribute("hours"); hoursBox.setText(hours); hoursBox.setTextColor(Color.BLACK); TextView test = new TextView(this); test.setTextColor(Color.RED); test.setText("Test"); tr.addView(box); tr.addView(dateBox); tr.addView(customerBox); tr.addView(hoursBox); table.addView(tr, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); } ``` Thank you in advance!
How to remove this extra space next to a checkbox?
CC BY-SA 2.5
null
2011-03-08T00:41:01.370
2011-03-08T03:13:10.183
2017-05-23T12:01:09.963
-1
405,971
[ "android", "checkbox", "android-widget", "padding", "margin" ]
5,227,607
1
5,316,090
null
41
53,908
When manually attaching a video link (from YouTube, Vimeo, etc) to a post using the Facebook web interface, Facebook automatically recognizes the link as a video, and allows the resulting status message to play the video inline. The video is displayed as an embedded player in the Wall or News feed. --- Here's an example of what an embedded video looks like after posting manually. ![Embedded Video](https://img.skitch.com/20110308-mxwqs11yj94igprkm98xewqs5d.png) --- When posting a link using the Graph API, the video is not embedded. ``` curl -F 'access_token=...' \ -F 'message=Link to YouTube' \ -F 'link=http://www.youtube.com/watch?v=3aICB2mUu2k' \ https://graph.facebook.com/me/feed ``` ![Not-Embedded Video](https://img.skitch.com/20110308-qhim3wcyfu9u9gnt4qh1bujy3q.png) --- I suspect the answer is related to the `source` argument, but I'm not sure what the URL should be there. Specifying the same URL just leads to a post with no thumbnail image whatsoever. > [source](http://developers.facebook.com/docs/reference/api/post/): A URL to a Flash movie or video file to be embedded within the post. read_stream.
Posting an embedded video link using the Facebook Graph API
CC BY-SA 2.5
0
2011-03-08T02:20:49.543
2015-07-31T08:28:43.737
null
null
8,985
[ "facebook", "youtube", "facebook-graph-api", "embed", "vimeo" ]
5,227,725
1
5,228,397
null
2
1,634
How are the two "trapezoids" that appear during text selection (in the emulator) called? Where can I find more information about how to control them programmatically? For further clarity, I am attaching a snapshot where you can see the left & right "text-selection trapezoids": ![enter image description here](https://i.stack.imgur.com/qyqw9.png)
Android Text Selection Terminology
CC BY-SA 2.5
0
2011-03-08T02:41:56.070
2015-01-08T17:40:27.243
2011-03-08T02:57:53.587
571,433
576,267
[ "android", "android-emulator", "terminology", "textselection" ]
5,227,815
1
5,228,050
null
3
1,023
I am looking to mimic the following UI using a UITextField within a UITableViewCell (within a UITableView). I am new to MonoTouch and I can't seem to figure out what the code would look like for this. ![enter image description here](https://i.stack.imgur.com/UazQ9.png)
How to achieve similar UI with UITextField inside UITableView (UITableViewCell)?
CC BY-SA 2.5
null
2011-03-08T02:57:46.423
2011-03-08T03:39:48.170
null
null
67,179
[ "iphone", "ipad", "ios", "xamarin.ios", "monodevelop" ]
5,227,840
1
5,227,891
null
0
2,159
I'm working on the css / html for this ipad page. ![enter image description here](https://i.stack.imgur.com/yDgqc.jpg) Here's my code: [http://jsfiddle.net/KaWpZ/1/](http://jsfiddle.net/KaWpZ/1/) What CSS do i need to use to get dashes? and why can't I make them align properly on so that the text on the second line (like Sport, eco, normal etc) sits padded and not underneath the dash. Thanks
How can I have dashes on my ul li, when some of my li's have two lines (ipad)
CC BY-SA 2.5
null
2011-03-08T03:01:19.173
2011-03-08T03:09:16.350
null
null
311,465
[ "css", "ipad", "list", "html-lists" ]
5,228,098
1
5,444,540
null
1
4,796
I'm trying to create a block which may or may not have a scrollbar, with a header that does not scroll. The trick is that the width of the header be affected by the presence of a scrollbar. ![](https://i.stack.imgur.com/CvVkL.png) I'm worried that this is one of those CSS use cases which should be trivial, but might, in fact, be impossible. Anyone willing to prove me wrong?
Fixed header inside scrolling block
CC BY-SA 2.5
null
2011-03-08T03:48:04.130
2011-03-26T18:58:31.020
null
null
84,745
[ "html", "css", "header", "overflow", "fixed" ]
5,228,195
1
5,228,366
null
0
1,155
I am displaying a popover when user clicks into text field. The popover view has a picker view but I am having some trouble getting rid of some white space in the view popover . This is what it looks like: ![enter image description here](https://i.stack.imgur.com/t2usy.png) I think my popover size might be fixed because I display it like this when user begins editing textfield: ``` [popoverController presentPopoverFromRect:textField.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; ``` Any ideas on how to make the popover view smaller or for everything to fit in nicely? I also played around with this line of code but no success: ``` self.contentSizeForViewInPopover=CGSizeMake(360.0,220.0); ``` thanks in advance.
having trouble making popover view the correct size
CC BY-SA 2.5
0
2011-03-08T04:02:52.627
2011-03-08T04:30:32.453
2011-03-08T04:28:50.697
623,669
623,669
[ "objective-c", "xcode", "uipopovercontroller" ]
5,228,573
1
5,234,668
null
3
618
Version 8.0.1 of Mathematica has just been released and it didn't fix the bug that has been most annoying me. This is a known bug and WRI promise to fix it "in a future release". Until they do, maybe we can find a workaround. The symbol for [\[Conjugate]](http://reference.wolfram.com/mathematica/ref/character/Conjugate.html) (which is entered using the shortcut `⋮conj⋮`) was broken in between Mathematica versions 7 and 8. In version 8 it does not display, which leads to a lot of confusion when reading my old code. Compare the two versions: ![V7](https://i.stack.imgur.com/6o5cv.png) ![V8](https://i.stack.imgur.com/00DgC.png) --- There are two options that I can think of: 1. Find the symbol that the frontend displays when it sees \[Conjugate] and tell it to display something visible. I'm not sure if this is possible to do without working at WRI and recompiling the frontend. 2. Redefine the shortcut ⋮conj⋮ (as described in this SO question) to create a different postfix operator that displays as a superscript * and is immediately interpreted as Conjugate[] -- i.e. it has the same behaviour as \[Conjugate]. The display properties can probably be taken care of using an InterpretationBox etc... The problem with option 2, is that it won't fix my old notebooks. Does anyone have any different ideas or an implementation of the above?
Workaround for \[Conjugate] font bug in Mathematica's linux frontend
CC BY-SA 2.5
0
2011-03-08T05:07:38.493
2011-03-08T15:39:28.287
2017-05-23T12:13:29.270
-1
421,225
[ "wolfram-mathematica", "mathematica-frontend" ]
5,228,783
1
5,228,853
null
4
9,278
I have the below view that I need to create. I have the following XML, but the text does not show up and the height fills the entire parent instead of wrapping the content? Any help on creating the below screenshot would be appreciated. playing.xml ``` <View android:background="@drawable/rounded_edges" android:text="Current Track" android:textColor="#FFFFFF" android:id="@+id/current_track" android:layout_width="fill_parent" android:layout_height="wrap_content" android:editable="false"> </View> ``` rounded_edges.xml ``` <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#1F1F1F"/> <corners android:radius="5px"/> <padding android:left="20dp" android:top="20dp" android:right="20dp" android:bottom="20dp" /> </shape> ``` ![view](https://i.stack.imgur.com/WFoKQ.png)
How do I insert text inside a rounded rectangle in and Android view?
CC BY-SA 2.5
0
2011-03-08T05:41:12.973
2017-02-05T04:39:42.283
null
null
135,414
[ "android", "xml", "android-layout", "shapes" ]
5,228,795
1
5,228,822
null
2
393
I'm trying to figure out why this is happening. I'll have the user be @ login.php and enter their login credentials as seen in panel (1) below. Then after successfully matching their credentials to the ones stored in the database, I'll assign a $_SESSION['username'] variable and the page is POSTed to itself (action=""), and I'll alert the user that the session variable has been set. Ideally, I'd like to not have to alert the user the session variable has been set, and just automatically start using that $_SESSION['username'] variable immediately after they click login (and are verified successfully). How can I achieve this? I've tried to mess around with headers by putting something like ``` <? if (isset($_SESSION['username'])) { header("Location: index.php"); exit(); ?> ``` But I keep getting a headers already sent error because some of the output (like my CSS, JS files) precede the form validation logic on the login.php page. ![problem](https://i.stack.imgur.com/HjrPe.gif)
Why isn't my SESSION data being updated after POSTing to the same page?
CC BY-SA 2.5
null
2011-03-08T05:42:24.360
2011-03-08T05:45:44.767
null
null
634,877
[ "php", "session", "post", "redirect", "header" ]
5,229,213
1
5,229,231
null
0
3,370
hello im trying to implant something like where we can put our image without cookie. but the problem is that im serving my image via php. like this ``` public function getIMG( $img ) { if ( ! file_exists( "www-static". DS ."assets". DS ."images". DS . $img ) ) { throw new Exception( "No such img as $img" ); } $img = "/image-static". DS ."assets". DS ."images". DS . $img; echo '<img src="' . $img . '" />'; } ``` ? maybe using php cookie_set and somehow clear all the cookie ? but im afraid its part together with the sessions if im correct. here is the request from firebug. ![enter image description here](https://i.stack.imgur.com/E5inq.png)
how to implent cookie-free domain or request?
CC BY-SA 2.5
0
2011-03-08T06:40:29.150
2011-03-08T06:48:34.373
2011-03-08T06:44:07.853
39,106
320,486
[ "php", "cookies", "image-processing", "http-request" ]
5,229,250
1
5,229,314
null
4
4,840
I am trying to create an animation effect where an image who's alpha value is 0.5 (approximately) at start changes to 1 gradually, but not like the conventional effect. Here is what I am looking for. original Image. ![enter image description here](https://i.stack.imgur.com/OwbDC.png) after some time ![enter image description here](https://i.stack.imgur.com/s0pPC.png) after some more time ![enter image description here](https://i.stack.imgur.com/ZQFBw.png) and at the end ![enter image description here](https://i.stack.imgur.com/8pLLQ.png) So basically if the alpha value of part of the image can be reduced than I can show the animation of filling up a glass or something close to it. I don't know if this can be done at all or if it's possible with core graphics or core animation. P.S. They are made in photoshop. Does anyone have any thoughts about what should be done to achieve this kind of animation?
how change the alpha value of half of UIImage or UIImageView
CC BY-SA 3.0
0
2011-03-08T06:46:35.717
2015-09-24T21:18:32.803
2015-09-24T21:18:32.803
5,236,226
567,929
[ "iphone", "objective-c", "core-animation", "uiimage", "alpha" ]
5,229,329
1
5,230,103
null
0
1,590
I am having a weird issue with .NET TreeView Control, the problem is its not displaying Down Arrow when number of nodes exceeds visibility scope of the window. Basically. I have a WinForm on top of that I placed TreeView Control. I didnt change any of the default Treeview COntrol properties. Pecularily, When I remote desktop to my machine I am able to see Down Arrow. Don't Know If anyone of you have faced this peculiar behavior. Please suggest me If you have any thoughts. Thanks. pv ![enter image description here](https://i.stack.imgur.com/AhHaK.png)
.NET TreeView Control's Vertical Scrollbar's Down Arrow not Visible
CC BY-SA 2.5
null
2011-03-08T06:56:06.617
2014-02-27T22:32:16.720
2011-03-08T07:35:20.480
587,497
587,497
[ ".net", "winforms", "treeview" ]
5,229,377
1
5,229,441
null
0
111
I have installed MONO2.10 in my Windows XP Desktop.Now, i have installed Mono Analyzer on my PC.While i am double clicking the MoMA.exe it raisig following Exception.Please Guide me to get out of this problem. ![enter image description here](https://i.stack.imgur.com/j8jbx.png)
How to run Mono migration analyzer in windows XP?
CC BY-SA 2.5
null
2011-03-08T07:02:06.730
2011-03-08T07:08:37.517
null
null
452,680
[ "mono" ]
5,229,593
1
5,230,006
null
0
266
I have a client report (RDLC) with these specifications. and I am using VS 2008 to implement this ![Client Report Specification](https://i.stack.imgur.com/5ChAy.png) I have a `DataSet` with 4 Different `DataTable` for each section. and note that all of the report located in a `List` in order to print a large group of Data with one request. 1. all of the report located in a List // to print some different data with one request 2. At top (in the list) we have a rectangle which include some Textbox to represent common Information 3. At Middle I have 2 different List which include some TextBox To represent List of Professor and Managers ( it also has to show their Picture, with Name and etc) 4. Then I have another List to represent The Organizations Information. ( it use some TextBox inside of a List to represent All of the Organizations Information) 5. As Client Report work with One Dataset. I provide four DataTable for my different Report Sections. 6. Each DataTable Has an ID for Grouping 7. The Common DataTable ID use to group the entire of the list for another Object (Here University) How Can I implement Such a report, While I can't use Different `DataTable` for grouping because If I do such a Thing I can Display only the `First Field` of the groups Any Help is Appriciated Thank you in advance
How to Use some DataTable for a Client Report?
CC BY-SA 2.5
null
2011-03-08T07:28:56.447
2011-03-08T08:24:30.613
2011-03-08T08:16:02.413
21,234
243,213
[ "c#", "asp.net", "reporting-services", "dataset", "reporting" ]
5,230,028
1
5,230,060
null
1
2,414
I want to write a spinner code at javascript/jQuery to get minute and hour from user. I want to implement this with Jquery or Javascript or HTML: ![enter image description here](https://i.stack.imgur.com/bIUxJ.jpg) I have implemented the calendar part (at left at screenshot) with JQuery datepicker. There are two spinners over there and hour range is from 00 to 23. Minute range is 00 to 59. How can I do it?
Spinner with JQuery or Javascript or HTML?
CC BY-SA 2.5
null
2011-03-08T08:26:36.247
2011-03-08T16:11:54.990
null
null
453,596
[ "javascript", "jquery", "html", "datetime", "spinner" ]
5,230,085
1
5,232,777
null
8
3,258
In an Activity I have embedded a Video widget (VideoView or MediaPlayer associated to a SurfaceView) which size should be adapted when the screen is rotated. This Activity is used as content in a TabHost. In order to handle screen rotation I have provided two layouts one for portrait and another for landscape orientation (placed in ./res/layout and ./res/layout-land folders). Problem of this approach is that a new Activity is created for each rotation so I don't use the same MediaPlayer (or VideoView) => I start the video from the beginning every time I rotate the screen. As the video is streamed from the web there is no way to store the position in the video in order to seek to this position when restarting the video in the other Activity. I need to be able to translate/scale/hide views inside the Activity when screen is rotated. Translation/scaling needs to maintain layout organisation in order to have a layout adapted to different screen sizes. ![Desired animation/layout](https://i.stack.imgur.com/IZYno.png) - - - How to scale/resize View to adjust its size to available space around it ?- Which interface, callback do I need to implement in order to be notified of screen rotation to fire these transformations ?
Recompose Activity layout to play video in fullscreen when screen is rotated
CC BY-SA 3.0
0
2011-03-08T08:33:09.253
2011-08-29T14:03:43.743
2011-08-29T14:03:43.743
119,895
11,563
[ "android", "video", "layout", "rotation", "fullscreen" ]
5,230,319
1
5,230,341
null
1
41,526
Hi I am using a jquery modal pop up. See picture below. ![enter image description here](https://i.stack.imgur.com/FQSfi.jpg) However, the problem is, I need to edit the width. So I typed in the css file, after checking and verifying with firebug, ``` element.style { width: 700px !important; } ``` But it does not work. ANy ideas as how to override the jquery css. Some say the need to edit the css using javascript, making objects and stuff. But I'm not so sure about that. Any help is appreciated.
How to edit the element.style css?
CC BY-SA 2.5
0
2011-03-08T09:00:47.150
2021-12-21T09:13:32.497
null
null
350,648
[ "jquery", "html", "css", "dom", "popup" ]
5,230,381
1
5,230,420
null
3
496
I am trying to put line numbers in Visual Studio. Usually I go for Tools -> Options -> Text Editor -> C# A new machine was assigned to me with preinstalled VS 2008. I am unable to find the C# option. Any solution ? Thanks in Advance ![enter image description here](https://i.stack.imgur.com/oJuol.png)
Unable to put line numbers in Visual Studio
CC BY-SA 2.5
0
2011-03-08T09:08:08.820
2011-03-08T09:14:16.477
null
null
277,087
[ "c#", ".net", "visual-studio", "visual-studio-2008" ]
5,230,394
1
5,234,717
null
0
2,916
I have a `Gridview` like this picture. Easyly in my last column, i keep a note for that row. (Simply, i made it edit, select, update that gridview classic properties.) ![enter image description here](https://i.stack.imgur.com/FzSYI.jpg) As you can see, my last column has a `Textbox` (`Multiline`) Here is my last column gridview code; ``` <EditItemTemplate> <asp:TextBox ID="txtTNOT" runat="server" Height="35" TextMode="MultiLine" DataSourceID="SqlDataSource8"></asp:TextBox> <asp:SqlDataSource ID="SqlDataSource8" runat="server" ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>" SelectCommand="SELECT [T_NOT] FROM [TAKIP] WHERE T_HESAP_NO = @T_HESAP_NO "> <SelectParameters> <asp:Parameter Name="T_HESAP_NO" Type="String" /> </SelectParameters> </asp:SqlDataSource> </EditItemTemplate> ``` And then i export this `Gridview` to excel with this code; ``` protected void LinkButton1_Click(object sender, EventArgs e) { Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=TahTakip.xls"); Response.Charset = ""; Response.ContentType = "application/vnd.xls"; System.IO.StringWriter stringWrite = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); GridView1.RenderControl(htmlWrite); Response.Write(stringWrite.ToString()); Response.End(); } ``` There is no problem since this step. The problem is when i open this excel file, `NOT` column is different the other columns. It has a `Textbox` like this picture; ![enter image description here](https://i.stack.imgur.com/3hiCM.jpg) I don't want to be a `Textbox` in my `Excel` file. Just want a normal cell with a NOT value like left column. How can i do that? Best Regars, Soner
Export Error to Excel Gridview Column with Textbox
CC BY-SA 2.5
null
2011-03-08T09:09:56.597
2011-03-09T08:55:41.020
null
null
447,156
[ "c#", ".net", "asp.net", "excel", "gridview" ]
5,230,513
1
5,237,413
null
0
57
My query is selecting on a date and a numeric key range, I'm not sure if I can improve on this, but I thought I'd ask. I'm hoping to improve the speed. I'm actually running two very similar queries, one to do a count and one to get the records with a limit ``` 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; SELECT PadID, CatID, IconSoureURL, OsStr, ProgramName, PageName, ProgramVersion, left(English450,650) as English450, English45, ProgHomeURL, DownloadURL, License, ReleaseStatus FROM Pads WHERE RemoveMeDate='2001-01-01 00:00:00' AND catid between 0 and 11 ORDER BY VersionAddDate DESC LIMIT 0,20; ``` Yes the range can change, it could be 100 to 111 My first query takes 0.6 seconds and oddly the second query is quite quick even with SQL_NO_CACHE. Heres the explain results from the first query. ![enter image description here](https://i.stack.imgur.com/Fve1X.png) Heres my current indexes ![enter image description here](https://i.stack.imgur.com/XhpIM.png)
MySql, I'm not sure if my indexes are correct or if I can improve the speed of my query?
CC BY-SA 2.5
null
2011-03-08T09:22:10.867
2011-03-08T19:42:34.203
null
null
450,456
[ "mysql", "sql", "query-optimization" ]
5,230,615
1
5,230,796
null
7
12,908
I got a perfect with my picture. > startActivityForResult(new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI), SELECT_IMAGE); But it doesn't work with video. When i click on a video of my list, it play the vidoe instead of send me back. > startActivityForResult(new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Video.Media.INTERNAL_CONTENT_URI), SELECT_VIDEO); ![enter image description here](https://i.stack.imgur.com/omDxd.png) An idea ?
What is the best way for pick a video in Android
CC BY-SA 2.5
0
2011-03-08T09:31:57.697
2011-03-08T09:49:47.290
null
null
198,843
[ "android", "android-intent", "mediastore" ]
5,230,649
1
5,230,843
null
0
1,283
The code works well, but I have no control of my layout. It toggles between two button states correctly once the link is pressed. Also, I've tried divs and spans to organize it, but it needs some tweeking Thanks, ![enter image description here](https://i.stack.imgur.com/wEx62.jpg) ``` <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script> </head> <style type="text/css"> #h6{font-size: 12px; padding-right: 0px;} .plus{left:0px;height:33px;width:32px; background:url('sprite.gif') 0 0px;} .minus{left:0px;height:33px;width:32px; background:url('sprite.gif') 0 -34px;} </style> <h6 id="deToggle"><a href="#" class="styles2" id="h6">Larger</a></h6> <script language="javascript"> var click = 0%2; var fontSizes = [14, 16] $('#deToggle').toggle( function(){ var sprot = $('#deToggle');// var tog = $('#deToggle'); tog.html('<a href="#">Larger</a>'); $('#OurText').css('fontSize', fontSizes[1] + 'px'); $(this).val("-"); tog.addClass('plus'); tog.removeClass('minus'); }, function(){ var tog = $('#deToggle'); tog.html('<a href="#">Smaller</a>'); $('#OurText').css('fontSize', fontSizes[0]+ 'px'); $(this).val("+"); tog.removeClass('plus'); tog.addClass('minus'); }); </script> <p id="OurText">My Text!!!</p> </html> ``` sprit.gif rollover image ![enter image description here](https://i.stack.imgur.com/pBxzZ.gif)
jQuery, call class before addClass and removeClass
CC BY-SA 2.5
null
2011-03-08T09:34:38.527
2011-03-08T11:21:52.340
null
null
643,573
[ "javascript", "jquery", "html" ]
5,230,999
1
5,236,993
null
2
476
The silverlight datepicker can zoom out to allow a user to select by year, but for some reason the first and last years always look disabled. Is there a way to prevent this? ![Silverlight Datepicker](https://i.stack.imgur.com/dWNCV.png)
Prevent Silverlight datepicker Years looking disabled
CC BY-SA 2.5
null
2011-03-08T10:10:53.247
2011-03-08T19:02:21.600
2011-03-08T19:02:21.600
17,516
48,886
[ "silverlight", "silverlight-4.0", "datepicker" ]
5,231,087
1
null
null
0
199
I use some UltraToolbars in a form, and that toolbars fills all the upper space of the form, almost all of them are "truncated" - not all toolbars buttons are visible. ![enter image description here](https://i.stack.imgur.com/gCeIe.jpg) For the most toolbars this is not a problem, but for ones I'd like to always display all items. Is it possible to say to the UltraToolbar do not "truncate"(hide) its items (when docked).
Always display full list of tools in the (Infragistic's) Toolbar
CC BY-SA 2.5
null
2011-03-08T10:18:30.410
2011-04-04T17:50:36.550
null
null
185,593
[ ".net", "winforms", "infragistics" ]
5,231,105
1
null
null
42
63,260
assuming i have few items with similar ids: ``` <input class="a" id="id_1"/> <input class="a" id="id_2"/> ``` i would like to set in my css file something like: ``` #id_*{width = 100%;} ``` is there a way i can do that? i've tried something like: ``` input[id^='id_']{width:200px;} ``` but that didnt worked out...... And its need to work on IE :( EDIT: nedd to work on IE8.... EDIT: ``` <input tabIndex="1690" class="form" id="cust_1_NUM_OBJ_5-00461" dataFld="cust_1_NUM_OBJ_5-00461" dataSrc="#FIELDVALUES" style="text-align: right; height: 20px;" onkeypress="validateNumberChar(this)" onfocus="resetGFocusField('cust_1_NUM_OBJ_5-00461');" onblur="validateChangedNumber(this);" onbeforedeactivate="onbeforedeactivateLookup(this);" type="text" size="20" maxLength="55" datatype="number" numbertype="24,6" valueFieldID="null" tabStop="true" value="1"/> ``` and CSS: ``` input[id^='cust_1_NUM_OBJ_5-0046']{width:200px;} ``` ![Without style](https://i.stack.imgur.com/5IGj5.png) ![Witj style](https://i.stack.imgur.com/k0Qog.png)
Is there a way to use wildcards in css id tag
CC BY-SA 2.5
0
2011-03-08T10:19:57.417
2020-07-17T02:18:17.893
2012-04-09T18:10:59.007
106,224
532,347
[ "css", "css-selectors" ]
5,231,072
1
8,642,801
null
1
1,625
Java I am using paypal website pro sdk SOAP calls problem is following line of code returns exception after long time ``` response = (CreateRecurringPaymentsProfileResponseType) caller.call("CreateRecurringPaymentsProfile", request); Exception is as follows. java.net.SocketException: Connection reset java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.paypal.sdk.core.soap.SOAPAPICaller.callSOAP(SOAPAPICaller.java:462) at com.paypal.sdk.core.soap.SOAPAPICaller.call(SOAPAPICaller.java:382) at com.paypal.sdk.services.CallerServices.call(CallerServices.java:125) at CreateRecurringPaymentsProfile.callCreateRecurringPaymentsProfileAPI(CreateRecurringPaymentsProfile.java:85) at CreateRecurringPaymentsProfile.run(CreateRecurringPaymentsProfile.java:50) at CreateRecurringPaymentsProfile.main(CreateRecurringPaymentsProfile.java:22) Caused by: java.net.SocketException: Connection reset ``` Do i need any certificate or some thing else currently i am using proxy in classes folder as follows ``` # This file contains the properties that needs to be set to make the API call via Proxy. # To make use of proxy, change PROXY_SET to true, uncomment # PROXY_HOST and PROXY_PORT properties and set values as illustrated below. # Note: Just remove the # symbol to uncomment. # Both PROXY_HOST and PROXY_PORT needs to be set. PROXY_PORT should be a number. # If any one of these properties are not set or invalid, proxy settings will be ignored # and this information will be logged. # PROXY_HOST : IP Address or Host Name of the proxy server # PROXY_PORT: Port number of the proxy server PROXY_SET = true PROXY_HOST=128.1.100.13 # eg: PROXY_HOST = 127.0.0.1 PROXY_PORT=8080 # eg: PROXY_PORT = 808 # The following properties are optional. # If your proxy need username and password to authenticate, # just uncomment the following two properties and set values as illustrated below. # Note: Just remove the # symbol to uncomment. # PROXY_USERNAME=<your proxy username> # eg: PROXY_USERNAME =test # PROXY_PASSWORD=<your proxy password> # eg: PROXY_PASSWORD =test ``` My Code as follows ``` public class CreateRecurringPaymentsProfile { CallerServices caller; public static void main(String[] args) { try { CreateRecurringPaymentsProfile sample = new CreateRecurringPaymentsProfile(); sample.run(); } catch (Exception e) { System.out.println("ERROR: " + e.getMessage()); } } public CreateRecurringPaymentsProfile() throws PayPalException { caller = new CallerServices(); /* WARNING: Do not embed plaintext credentials in your application code. Doing so is insecure and against best practices. Your API credentials must be handled securely. Please consider encrypting them for use in any production environment, and ensure that only authorized individuals may view or modify them. */ APIProfile profile = ProfileFactory.createSignatureAPIProfile(); profile.setAPIUsername("f_1299578055_biz_api1.gmail.com"); profile.setAPIPassword("152578076"); profile.setSignature("A.SG-Qkp9mcSwx0zh23u89eyCcWGA9MwmCgRlo2193..VNw06q1WbLTx"); profile.setEnvironment("sandbox"); caller.setAPIProfile(profile); } public void run() throws PayPalException { callCreateRecurringPaymentsProfileAPI(); System.out.println("\nDone..."); } public void callCreateRecurringPaymentsProfileAPI() throws PayPalException { System.out.println("\n########## Starting CreateRecurringPaymentsProfile ##########\n"); //Replace the token value by actual value returned vy SetCustomerBillingAgreementAPI call String token="RP-8P463231B6009345R"; String amount ="5.00"; int BF=1; BillingPeriodType BP = BillingPeriodType.Day; CreateRecurringPaymentsProfileRequestType request=new CreateRecurringPaymentsProfileRequestType(); CreateRecurringPaymentsProfileResponseType response=new CreateRecurringPaymentsProfileResponseType(); request.setVersion("51.0"); request.setCreateRecurringPaymentsProfileRequestDetails(new CreateRecurringPaymentsProfileRequestDetailsType()) ; request.getCreateRecurringPaymentsProfileRequestDetails().setToken(token); request.getCreateRecurringPaymentsProfileRequestDetails().setRecurringPaymentsProfileDetails(new RecurringPaymentsProfileDetailsType()); Calendar start_date = Calendar.getInstance(); start_date.set(2008,5,30); request.getCreateRecurringPaymentsProfileRequestDetails().getRecurringPaymentsProfileDetails().setBillingStartDate(start_date); request.getCreateRecurringPaymentsProfileRequestDetails().setScheduleDetails(new ScheduleDetailsType()); request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().setPaymentPeriod(new BillingPeriodDetailsType()); request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().setDescription("RP-Test- Java SOAP SDK"); request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().getPaymentPeriod().setAmount(new BasicAmountType()); request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().getPaymentPeriod().getAmount().set_value(amount) ; request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().getPaymentPeriod().getAmount().setCurrencyID(CurrencyCodeType.USD); request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().getPaymentPeriod().setBillingFrequency(BF); request.getCreateRecurringPaymentsProfileRequestDetails().getScheduleDetails().getPaymentPeriod().setBillingPeriod(BP); response = (CreateRecurringPaymentsProfileResponseType) caller.call("CreateRecurringPaymentsProfile", request); if (!response.getAck().equals(AckCodeType.Success) && !response.getAck().equals(AckCodeType.SuccessWithWarning)) { // do error processing System.out.println("\n########## CreateRecurringPaymentsProfile call failed ##########\n"); } else { //success System.out.println("\n########## CreateRecurringPaymentsProfile call passed ##########\n"); } } } ``` In developer.paypal.com website i have created the following account. Deleted for security reasons. ![enter image description here](https://i.stack.imgur.com/NbKyL.jpg)
Java paypal call never returns result
CC BY-SA 2.5
null
2011-03-08T10:17:15.417
2011-12-27T14:38:36.627
2011-03-08T13:19:23.700
216,431
216,431
[ "java", "paypal", "website-payment-pro" ]
5,231,260
1
5,232,055
null
3
4,417
I am trying to create a reflection shadow and found an issue. Please find the below code in my custom view: ``` @Override protected void onDraw(Canvas canvas) { //prepare canvas.drawColor(Color.GRAY); Bitmap source = BitmapFactory.decodeResource(getResources(), R.drawable.icon); //First Column canvas.drawBitmap(source, 0, 0, new Paint()); //2nd Column canvas.drawBitmap(source, source.getWidth(), 0, new Paint()); //Reflection Matrix matrix = new Matrix(); matrix.preScale(1.0f, -1.0f); matrix.postTranslate(source.getWidth(), source.getHeight()*2); canvas.drawBitmap(source, matrix, new Paint()); Paint paint2 = new Paint(); LinearGradient shader = new LinearGradient( source.getWidth()*3/2, source.getHeight(), source.getWidth()*3/2, source.getHeight()*2, 0x7FFFFFFF, 0x00FFFFFF, TileMode.CLAMP); paint2.setShader(shader); paint2.setXfermode(new PorterDuffXfermode( android.graphics.PorterDuff.Mode.DST_IN)); canvas.drawRect( source.getWidth(), source.getHeight(), source.getWidth()*2, source.getHeight()*2, paint2); //3rd Column Bitmap bitmap = Bitmap.createBitmap(source.getWidth(), source.getHeight()*2, Config.ARGB_8888); Canvas canvas2 = new Canvas(bitmap); canvas2.drawBitmap(source, 0, 0, new Paint()); matrix = new Matrix(); matrix.preScale(1.0f, -1.0f); matrix.postTranslate(0, source.getHeight()*2); canvas2.drawBitmap(source, matrix, new Paint()); paint2 = new Paint(); shader = new LinearGradient( source.getWidth()*1/2, source.getHeight(), source.getWidth()*1/2, source.getHeight()*2, 0x7FFFFFFF, 0x00FFFFFF, TileMode.CLAMP); paint2.setShader(shader); paint2.setXfermode(new PorterDuffXfermode( android.graphics.PorterDuff.Mode.DST_IN)); canvas2.drawRect( 0, source.getHeight(), source.getWidth(), source.getHeight()*2, paint2); canvas.drawBitmap(bitmap, source.getWidth()*2,0, new Paint()); } ``` I am doing same in canvas (which I got from `onDraw(canvas)`) and canvas2 (which created using `new Canvas(bitmap)`) But, both drawing different shader effect as follows: ![different shader effect](https://i.stack.imgur.com/v4kWv.png) Why are the shader effects different?
Android: Shader behave different in 'onDraw(canvas)' and 'new Canvas(bitmap)'
CC BY-SA 3.0
0
2011-03-08T10:32:48.717
2011-06-29T06:45:53.593
2011-06-29T06:45:53.593
194,309
518,504
[ "android" ]
5,231,436
1
5,232,472
null
0
268
I have a windows phone 7 project with a page that has the following structure: - - - sometimes the horizontal stackpanel contains more letters than it fits to the phone screen. From time to time I need to show a group of letters that are outside of the screen. To be able to show these letters, I need to move the stackpanel, so the letters are becoming visible on screen. When I am finished the animation, the letters that are moved in to the screen are not visible at all. What should I do to make it visible? I added a screenshot and a pseudo xaml of my page to demonstrate the structure. I hope this will help! ![enter image description here](https://i.stack.imgur.com/9T2iw.png) ``` <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <ScrollViewer VerticalScrollBarVisibility="Disabled"> <StackPanel x:Name="MainStackPanel" Margin="12,0,12,-177" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5" > <StackPanel x:Name="stackPanel" Orientation="Horizontal" Width="580" RenderTransformOrigin="0.5,0.5"> <StackPanel.RenderTransform> <CompositeTransform/> </StackPanel.RenderTransform> <TextBlock Style="{StaticResource LetterStyle1}" VerticalAlignment="Stretch"><Run Text="e"/></TextBlock> <TextBlock Style="{StaticResource LetterStyle1}" VerticalAlignment="Stretch"><Run Text="u"/></TextBlock> ... many more textblock each containing a letter </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock Style="{StaticResource LetterStyle1}" VerticalAlignment="Stretch"><Run Text="e"/></TextBlock> <TextBlock Style="{StaticResource LetterStyle1}" VerticalAlignment="Stretch"><Run Text="u"/></TextBlock> ... many more textblock each containing a letter </StackPanel> ```
Part of text is not shown after animation changes StackPanel location
CC BY-SA 2.5
null
2011-03-08T10:51:21.370
2011-03-08T12:31:02.353
2011-03-08T12:31:02.353
260
260
[ "silverlight", "windows-phone-7", "stackpanel" ]
5,231,466
1
5,231,789
null
1
252
I am experiencing problems trying to do a multitextarea on a form. I've a PHP view that has various forms, all processed different but in the same file. They all works, I've tested and they works. In forms there are a + icon that let the user add more instances of a `<textarea />`. This + icon loads via AJAX a new textarea with the same name of the previous textarea (for example, name="example[]"). If I post this, it only gets the first item that is the one that wasn't previously loaded by jQuery. The problem is that the ones loaded dynamically are totally ignored and I don't know why. My extract of my PHP view: ``` <?php echo form_open("projects/view/".$projectid); ?> <!-- This generates a valid <form /> tag --> <table> <tr> <th><?php echo lang("label_conx");?></th> <td class="textarea-edit"> <textarea class="context" name="CONX[]"><?php echo set_value("CONX[]");?></textarea> </td> <td class="add"><a id="add-conx" href="#"><?php echo img("img/icons/plus.png");?></a></td> </tr> ... ``` My jQuery code that works fine because the content is displayed and I see in firebug that is the same as the html loaded textarea: ``` $("a#add-conx").click(function(){ $("#ajax-loader").fadeIn('normal'); $("textarea.context:last").after('<textarea class="context" name="CONX[]"></textarea>'); $("#ajax-loader").fadeOut("normal"); return false; }); ``` And when I send the form, I've a in my PHP controller `print_r($_POST);` and I only get: ``` Array ( [CONX] => Array ( [0] => safdsddasfafsd ) ... ``` If I put on the PHP view various textareas, this array increases as same of the number of textareas I've created on the HTML view file. I don't understand why this is not working. When the page is load: ![enter image description here](https://i.stack.imgur.com/d7j5y.png) After adding some content dynamically: ![enter image description here](https://i.stack.imgur.com/DtQuF.png) This two images shows 4 instances of textarea with the name context[] (that has been changed to CONX[], but fails equal) that are in the view. The second image shows the loaded ones with jQuery and PHP only detected the first 4 that were on the HTML. Anyone has some idea how I can solve this? Thank you in advance!
Problem processing an array of textareas when they are loaded dynamically with jQuery and PHP
CC BY-SA 2.5
null
2011-03-08T10:54:27.250
2011-03-08T11:24:43.687
null
null
569,908
[ "php", "jquery" ]
5,231,624
1
null
null
0
234
I am having a problem where the background image that is centered aligned, and repeated vertically, is only breaking on the [Latest News page](http://www.pureprint.com/latest-news/). ![Screenshot of page](https://i.stack.imgur.com/PvzC1.png) I can't seem to find why it would be breaking, especially as it is fine on every other page within the site, and there is no section of the page that differs in sizes etc. I have used firebug to inspect all aspects of the page but still can't find what is causing the problem, any help would be much appreciated.
Background image breaking only on one page
CC BY-SA 3.0
null
2011-03-08T11:08:41.130
2013-07-18T04:01:35.637
2013-07-18T04:01:35.637
1,053,021
649,678
[ "css", "drupal", "background-image", "background-position" ]
5,231,875
1
5,231,952
null
2
2,893
I have defined a very simple database as follow : ![MySql Simple Database](https://i.stack.imgur.com/9PYe4.png) I'm using the hibernate plug-in to generate the different classes, including the one-to-many relationship between customer and order. i made this relationship as an identifying relationship as an order could not exist if not linked to a customer. I have the three following classes : => Class Customer ``` private int idCustomer; private String name; private Set<Order> orders = new HashSet<Order>(0); public Customer() { } public Customer(int idCustomer) { this.idCustomer = idCustomer; } public Customer(int idCustomer, String name, Set<Order> orders) { this.idCustomer = idCustomer; this.name = name; this.orders = orders; } @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "idCustomer", unique = true, nullable = false) public int getIdCustomer() { return this.idCustomer; } public void setIdCustomer(int idCustomer) { this.idCustomer = idCustomer; } @Column(name = "name", length = 45) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "customer") public Set<Order> getOrders() { return this.orders; } public void setOrders(Set<Order> orders) { this.orders = orders; } ``` => Class Order : ``` private OrderId id; private Customer customer; private String quantity; private Float price; public Order() { } public Order(OrderId id, Customer customer) { this.id = id; this.customer = customer; } public Order(OrderId id, Customer customer, String quantity, Float price) { this.id = id; this.customer = customer; this.quantity = quantity; this.price = price; } @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "idOrder", column = @Column(name = "idOrder", nullable = false)), @AttributeOverride(name = "customerIdCustomer", column = @Column(name = "Customer_idCustomer", nullable = false)) }) public OrderId getId() { return this.id; } public void setId(OrderId id) { this.id = id; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "Customer_idCustomer", nullable = false, insertable = false, updatable = false) public Customer getCustomer() { return this.customer; } public void setCustomer(Customer customer) { this.customer = customer; } @Column(name = "quantity", length = 45) public String getQuantity() { return this.quantity; } public void setQuantity(String quantity) { this.quantity = quantity; } @Column(name = "price", precision = 12, scale = 0) public Float getPrice() { return this.price; } public void setPrice(Float price) { this.price = price; } ``` => Class OrderId ``` private int idOrder; private int customerIdCustomer; public OrderId() { } public OrderId(int idOrder, int customerIdCustomer) { this.idOrder = idOrder; this.customerIdCustomer = customerIdCustomer; } @Column(name = "idOrder", nullable = false) public int getIdOrder() { return this.idOrder; } public void setIdOrder(int idOrder) { this.idOrder = idOrder; } @Column(name = "Customer_idCustomer", nullable = false) public int getCustomerIdCustomer() { return this.customerIdCustomer; } public void setCustomerIdCustomer(int customerIdCustomer) { this.customerIdCustomer = customerIdCustomer; } public boolean equals(Object other) { if ((this == other)) return true; if ((other == null)) return false; if (!(other instanceof OrderId)) return false; OrderId castOther = (OrderId) other; return (this.getIdOrder() == castOther.getIdOrder()) && (this.getCustomerIdCustomer() == castOther .getCustomerIdCustomer()); } public int hashCode() { int result = 17; result = 37 * result + this.getIdOrder(); result = 37 * result + this.getCustomerIdCustomer(); return result; } ``` I then have my main class : ``` public static void main(String[] args) { Customer customer = new Customer(); customer.setName("John Doe"); CustomerDAO.save(customer); Order order = new Order(); order.setQuantity(10); order.setPrice(100); order.setCustomer(customer); OrderDAO.save(order); } ``` Please note that my DAO objects are doing nothing fancy... Just the usual HibernateUtil implementation of getting the session and finally call the 'save' method. My Problem is the following. I have never dealt before with composite key... Excuse me for my stupid question in advance. I don't want to deal manually with the different ids and primary keys. For the Cutomer class, it is not a problem since I set up a strategy that will automatically create the id when saving in database. For the Order class, I don't want to deal with that as well. But since the key is composite, Hibernate generates an identifierGenerationExeption when trying to save this object in DB... What I would have liked is the following => an Order id generated automatically and since I setup the customer in the order Object, I would have expect hibernate to link the customer id to the one in the composite key... What is the correct way of doing this thing ? Thanks
Composite Primary Key Hibernate and Java Implementation
CC BY-SA 2.5
null
2011-03-08T11:33:07.107
2011-03-08T12:16:25.010
null
null
462,384
[ "java", "hibernate", "database-design", "composite-key" ]
5,232,208
1
5,232,259
null
0
107
hello today i have a problem ![enter image description here](https://i.stack.imgur.com/HNXpH.png) is it php fault ? or its an server fault ? it should be 'ausername' rather then apache. Thanks for looking in. Adam Ramadhan
files are uploaded as user apache
CC BY-SA 2.5
null
2011-03-08T12:07:20.540
2011-03-08T12:11:43.143
null
null
320,486
[ "php", "apache" ]
5,232,396
1
5,232,424
null
0
431
How can I write lambda expression to get all orders who has detail row(s) with descriptions = "PickMe" or "TakeMe" ![DB Schema](https://i.stack.imgur.com/Wv6V0.png)
Use Lambda Expressions in a Query (C#)
CC BY-SA 2.5
null
2011-03-08T12:23:40.263
2011-03-08T12:34:36.050
null
null
389,200
[ "c#", "lambda" ]
5,232,620
1
5,233,555
null
0
476
I have to use lucene.net 2.9.2.2 with NHibernate 3.0. I have started to edit this old code: ``` public void BuildSearchIndex() { FSDirectory entityDirectory = null; IndexWriter writer = null; var entityType = typeof(MappedSequence); var indexDirectory = new DirectoryInfo(GetIndexDirectory()); if (indexDirectory.Exists) { indexDirectory.Delete(true); } try { entityDirectory = FSDirectory.GetDirectory(Path.Combine(indexDirectory.FullName, entityType.Name), true); writer = new IndexWriter(entityDirectory, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_29), true, IndexWriter.MaxFieldLength.UNLIMITED); } finally { if (entityDirectory != null) { entityDirectory.Close(); } if (writer != null) { writer.Close(); } } IFullTextSession fullTextSession = Search.CreateFullTextSession(this.Session); // Iterate through Suppliers and add them to Lucene's index foreach (MappedSequence instance in Session.CreateCriteria(typeof(MappedSequence)).List<MappedSequence>()) { fullTextSession.Index(instance); } } private string GetIndexDirectory() { INHSConfigCollection nhsConfigCollection = CfgHelper.LoadConfiguration(); string property = nhsConfigCollection.DefaultConfiguration.Properties["hibernate.search.default.indexBase"]; var fi = new FileInfo(property); return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fi.Name); } ``` to build the index. The line: ``` FSDirectory.GetDirectory(Path.Combine(indexDirectory.FullName, entityType.Name), true); ``` still uses obsolete code. Could anyone be so kind and point out the necessary change. Thanks. Christian PS ![enter image description here](https://i.stack.imgur.com/l83fC.jpg)
build index using lucene.net 2.9.2.2
CC BY-SA 2.5
null
2011-03-08T12:44:35.897
2011-03-08T15:05:48.053
2011-03-08T14:19:08.930
283,538
283,538
[ "lucene.net", "nhibernate.search" ]
5,232,771
1
null
null
1
493
![taskqueue and memcache](https://i.stack.imgur.com/uwbr4.jpg) I am trying to achieve the above on the google apps engine, and was wondering if anyone knows of a project that this has already been done? or an example? So far in my implementation I can write a single object to memory. However, I am having issues in using add_multi to input multiple objects. Thanks for any help.
Using both memcached and taskqueue on the google app engine
CC BY-SA 2.5
0
2011-03-08T12:57:40.823
2011-03-08T17:25:13.040
null
null
440,219
[ "python", "google-app-engine", "memcached", "task-queue" ]
5,233,013
1
5,233,974
null
0
1,770
I have a strange bug when looking at my homepage in Chrome. The bug doesn't seem to appear when I try to edit it with CSSEdit: ![enter image description here](https://i.stack.imgur.com/uBHTu.png) I attached the pictures to show you what I mean. Those "points" next to the icons are linked as well. ![enter image description here](https://i.stack.imgur.com/ob3N9.png) What could be causing this error? Thanks for the help! EDIT sure here's the code (the page isn't online): ``` <div class="rss"> <p> <a href="http://linkto"> <img src="/images/facebook.png" alt="Find me on facebook" /> </a> <a href="http://linkto"> <img src="/images/twitter.png" alt="Follow me on twitter" /> </a> <a href="http://linkto"> <img src="/images/rss.png" alt="Subscribe to RSS Feed" /> </a> </p> </div> ``` which is wrapped in a div class called footer. And the CSS ``` .site .footer { font-size: 80%; color: #666; border-top: 4px solid #eee; margin-top: 2em; overflow: hidden; } .site .footer .rss { margin-top: 0em; margin-right: -.2em; float: right; } .site .footer .rss img { border: 0; } ``` Sorry for the strange formatting.
Float bug in Chrome?
CC BY-SA 3.0
null
2011-03-08T13:19:45.210
2012-08-10T08:03:11.267
2012-08-10T08:03:11.267
246,246
619,812
[ "css", "google-chrome", "css-float" ]
5,232,844
1
5,274,810
null
3
12,561
Before you say, yeah this question can be duplicate; [https://stackoverflow.com/questions/2912890/gridview-freeze-pane-solutions](https://stackoverflow.com/questions/2912890/gridview-freeze-pane-solutions) [How to freeze GridView header?](https://stackoverflow.com/questions/157528/how-to-freeze-gridview-header) [Freeze GridView Header in ASP.NET?](https://stackoverflow.com/questions/3683628/freeze-gridview-header-in-asp-net) [How To Freeze Columns in GridView](https://stackoverflow.com/questions/5093635/how-to-freeze-columns-in-gridview) But there is no solution both freeze pane Horizontal and Vertical. I have a `Gridview` like this. ![enter image description here](https://i.stack.imgur.com/IuBw7.jpg) Here is my `Gridview` code; (Sorry for long code) ``` <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames ="HESAP_NO,DOVIZ_KOD" Font-Names="Verdana" Font-Size="Small" AllowSorting="True" onrowdatabound="GridView1_RowDataBound" onrowupdating="GridView1_RowUpdating" onrowcommand="GridView1_RowCommand" PageSize="2" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black" GridLines="Vertical" > <Columns> <asp:ButtonField ButtonType="Image" ImageUrl="~/images/InsertButton.gif" CommandName="Insert" /> <asp:ButtonField ButtonType="Image" ImageUrl="~/images/SelectButton.gif" CommandName="Select" /> <asp:CommandField ShowEditButton="True" ButtonType="Image" EditImageUrl="~/images/EditButton.gif" cancelimageurl="~/images/CancelButton.gif" updateimageurl="~/images/UpdateButton.gif" ItemStyle-Wrap="False" > <ItemStyle Wrap="False"></ItemStyle> </asp:CommandField> <asp:TemplateField HeaderText="HESAP" SortExpression="HESAP_NO"> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Bind("HESAP_NO") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="MÜŞTERİ" SortExpression="MUS_K_ISIM"> <ItemTemplate> <asp:Label ID="Label2" runat="server" Text='<%# Bind("MUS_K_ISIM") %>'></asp:Label> <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>" InsertCommand="INSERT INTO MEMO VALUES(@M_HESAP_NO, @S_TARIH, @S_TUTAR, @DOV_KOD, @G_NOT, @G_KISI, 4, @login, GETDATE())" SelectCommand="SELECT * FROM MEMO A, P_SONUC B, P_KUR C WHERE A.S_SONUC = B.SONUC_KOD AND A.S_KUR = C.DOV_KOD AND B.LANG = 1 AND ([M_HESAP_NO] = @M_HESAP_NO)" UpdateCommand="UPDATE MEMO SET S_SONUC = @SONUC_KOD WHERE NOT_ID = @NOT_ID" > <SelectParameters> <asp:QueryStringParameter Name="M_HESAP_NO" QueryStringField="T_HESAP_NO" Type="Int32" /> </SelectParameters> <InsertParameters> <asp:ControlParameter Name="M_HESAP_NO" ControlID="Label1" PropertyName="Text" /> <asp:Parameter Name="S_TARIH" Type="DateTime"/> <asp:Parameter Name="S_TUTAR" /> <asp:Parameter Name="DOV_KOD" /> <asp:Parameter Name="G_NOT" /> <asp:Parameter Name="G_KISI" /> <asp:SessionParameter Name="login" SessionField="login" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="NOT_ID" /> <asp:Parameter Name="SONUC_KOD" /> </UpdateParameters> </asp:SqlDataSource> <asp:GridView ID="ChildGridView1" runat="server" DataKeyNames="NOT_ID" Visible="False" DataSourceID="SqlDataSource4" AutoGenerateColumns="False" > <Columns> <asp:CommandField ShowEditButton="True"/> <asp:TemplateField HeaderText="Not No"> <ItemTemplate> <asp:Label ID="LabelNotID" runat="server" Text='<%# Eval("NOT_ID") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Görüşülen"> <ItemTemplate> <asp:Label ID="LabelGorKisi" runat="server" Text='<%# Eval("G_KISI") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Görüşen"> <ItemTemplate> <asp:Label ID="LabelGrKisi" runat="server" Text='<%# Eval("OPERATOR") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Söz. Tarih"> <ItemTemplate> <asp:Label ID="LabelSozTarih" runat="server" Text='<%# Eval("S_TARIH","{0:d}") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Söz. Tutar"> <ItemTemplate> <asp:Label ID="LabelSozTutar" runat="server" Text='<%# Eval("S_TUTAR","{0:n2}") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Kur"> <ItemTemplate> <asp:Label ID="LabelKur" runat="server" Text='<%# Eval("DOV_CINS") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText = "Gör. Tarih"> <ItemTemplate> <asp:Label ID="LabelGorTarih" runat="server" Text='<%# Eval("A_TARIH","{0:dd/MM/yyyy HH:mm}") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText = "Söz Durum"> <ItemTemplate> <asp:Label ID="LabelSozDurum" runat="server" Text='<%# Eval("SONUC_ACK") %>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:SqlDataSource ID="SqlDataSource7" runat="server" ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>" SelectCommand="SELECT SONUC_KOD, SONUC_ACK FROM P_SONUC WHERE (SONUC_KOD > 3 AND LANG = 1) OR (SONUC_KOD < 0 AND LANG = 1)" > </asp:SqlDataSource> <asp:DropDownList id="lstSONUC" runat="server" AppendDataBoundItems="false" DataSourceID="SqlDataSource7" DataTextField="SONUC_ACK" DataValueField="SONUC_KOD" SelectedValue='<%# BIND("SONUC_KOD") %>'> </asp:DropDownList> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Not"> <ItemTemplate> <asp:TextBox ID="TxtNot" runat="server" Text='<%# Eval("G_NOT") %>' Height="35" TextMode="MultiLine" ReadOnly="True"> </asp:TextBox> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <asp:DetailsView id="MemoDetailView" DataSourceID="SqlDataSource4" Runat="Server" AutoGenerateRows="False" Visible="False" OnModeChanged="MemoDetailView_ModeChanged"> <Fields> <asp:TemplateField HeaderText = "Görüşülen"> <InsertItemTemplate> <asp:TextBox ID="txtG_KISI" Text='<%# Bind("G_KISI") %>' runat="server"></asp:TextBox> </InsertItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText = "Söz Tarihi"> <InsertItemTemplate> <cc1:CalendarExtender ID="txtSTR_CalendarExtender" runat="server" Enabled="True" Format="dd/MM/yyyy" TargetControlID="txtSTR" PopupButtonID="ImageButton4" PopupPosition="BottomLeft"> </cc1:CalendarExtender> <br /> <table> <tr> <td> <asp:TextBox ID="txtSTR" Text = '<%# Bind("S_TARIH") %>' runat="server" Height="16px" Width="85px"></asp:TextBox> </td> <td> <asp:Image ID="ImageButton4" runat="server" ImageUrl="~/images/SmallCalendar.gif"/> </td> </tr> </table> </InsertItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText = "Ödeme Tutarı"> <InsertItemTemplate> <asp:TextBox ID="txtTutar" Text='<%# Bind("S_TUTAR") %>' runat="server"></asp:TextBox> </InsertItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText = "Kur"> <InsertItemTemplate> <asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>" SelectCommand="SELECT [DOV_KOD],[DOV_CINS] FROM [Scania].[dbo].[P_KUR] ORDER BY [DOV_CINS]"> </asp:SqlDataSource> <asp:DropDownList id="lstKur" runat="server" DataSourceID="SqlDataSource6" DataTextField="DOV_CINS" DataValueField="DOV_KOD" SelectedValue='<%# BIND("DOV_KOD") %>'> </asp:DropDownList> </InsertItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText = "Not"> <InsertItemTemplate> <asp:TextBox ID="txtG_NOT" Text='<%# Bind("G_NOT") %>' TextMode="multiline" runat="server" Height="100"></asp:TextBox> </InsertItemTemplate> </asp:TemplateField> </Fields> </asp:DetailsView> </ItemTemplate> <ItemStyle Wrap="False" /> </asp:TemplateField> <asp:BoundField DataField="TEMSILCI_ACK" HeaderText="TEMSİLCİ" ReadOnly="True" SortExpression="TEMSILCI_ACK" ItemStyle-Wrap="False" > <ItemStyle Wrap="False"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="DOVIZ_CINS" HeaderText="KUR" SortExpression="DOVIZ_CINS" readonly="true"/> <asp:BoundField DataField="0-30" HeaderText="0-30" ReadOnly="True" SortExpression="0-30" DataFormatString="{0:n2}" /> <asp:BoundField DataField="31-60" HeaderText="31-60" ReadOnly="True" SortExpression="31-60" DataFormatString="{0:n2}"/> <asp:BoundField DataField="61-90" HeaderText="61-90" ReadOnly="True" SortExpression="61-90" DataFormatString="{0:n2}"/> <asp:BoundField DataField="90+" HeaderText="90+" ReadOnly="True" SortExpression="90+" DataFormatString="{0:n2}"/> <asp:BoundField DataField="TOPLAM" HeaderText="TOPLAM" ReadOnly="True" SortExpression="TOPLAM" DataFormatString="{0:n2}"/> <asp:BoundField DataField="TOP_GECIKME" HeaderText="GECİK. FAİZİ" ReadOnly="True" SortExpression="TOP_GECIKME" DataFormatString="{0:n2}"/> <%-- <asp:BoundField DataField="FAALIYET_ACK" HeaderText="FAALİYET" SortExpression="FAALIYET_ACK" readonly="true" ItemStyle-Wrap="False" > <ItemStyle Wrap="False"></ItemStyle> </asp:BoundField>--%> <%-- <asp:BoundField DataField="TEMSILCI_ACK" HeaderText="TEMSİLCİ" SortExpression="TEMSILCI_ACK" readonly="true" ItemStyle-Wrap="False" > <ItemStyle Wrap="False"></ItemStyle> </asp:BoundField>--%> <asp:TemplateField HeaderText="STATÜ" HeaderStyle-ForeColor="Blue"> <ItemTemplate> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>" SelectCommand="SELECT B.T_ST_ID, B.T_ST_ACK, C.T_SR_ID, C.T_SR_ACK, CONVERT(VARCHAR(10),A.NOTER_TAR,103) AS NOTER_TAR, CONVERT(VARCHAR(10),A.ICRA_TAR,103) AS ICRA_TAR, CONVERT(VARCHAR(10),A.HACIZ_TAR,103) AS HACIZ_TAR, A.YAK_EMIR, D.SONUC_ACK, A.T_NOT FROM TAKIP A, P_TAKIP_ST B, P_TAKIP_SR C, P_SONUC D WHERE A.T_STATU = B.T_ST_ID AND A.T_SRM = C.T_SR_ID AND A.YAK_EMIR = D.SONUC_KOD AND B.LANG = 1 AND D.LANG = 1 AND T_HESAP_NO = @T_HESAP_NO "> <SelectParameters> <asp:Parameter Name="T_HESAP_NO" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:Label ID="lblSTATU" runat="server"> </asp:Label> </ItemTemplate> <EditItemTemplate> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>" SelectCommand="SELECT B.T_ST_ID, B.T_ST_ACK, C.T_SR_ID, C.T_SR_ACK, CONVERT(VARCHAR(10),A.NOTER_TAR,103) AS NOTER_TAR, CONVERT(VARCHAR(10),A.ICRA_TAR,103) AS ICRA_TAR, CONVERT(VARCHAR(10),A.HACIZ_TAR,103) AS HACIZ_TAR, A.YAK_EMIR, D.SONUC_ACK, A.T_NOT FROM TAKIP A, P_TAKIP_ST B, P_TAKIP_SR C, P_SONUC D WHERE A.T_STATU = B.T_ST_ID AND A.T_SRM = C.T_SR_ID AND A.YAK_EMIR = D.SONUC_KOD AND B.LANG = 1 AND D.LANG = 1 AND T_HESAP_NO = @T_HESAP_NO "> <SelectParameters> <asp:Parameter Name="T_HESAP_NO" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:DropDownList id="lstSTATU" runat="server" AutoPostBack="true" DataSourceID="SqlDataSource3" DataTextField="T_ST_ACK" DataValueField="T_ST_ID" Enabled="True" Font-Names="Verdana" Font-Size="Small" > </asp:DropDownList> </EditItemTemplate> <HeaderStyle ForeColor="White"></HeaderStyle> </asp:TemplateField> <asp:TemplateField HeaderText="SORUMLU" HeaderStyle-ForeColor="Blue" ItemStyle-Wrap="False"> <ItemTemplate> <asp:Label ID="lblSRM" runat="server"> </asp:Label> </ItemTemplate> <EditItemTemplate> <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>" SelectCommand="SELECT [T_SR_ID], [T_SR_ACK], T_ST_ID FROM [P_TAKIP_SR]" FilterExpression="T_ST_ID = '{0}'"> <FilterParameters> <asp:ControlParameter Name="categoryParam" ControlID="lstSTATU" PropertyName="SelectedValue" /> </FilterParameters> </asp:SqlDataSource> <asp:DropDownList id="lstSORUMLU" runat="server" DataSourceID="SqlDataSource5" DataTextField="T_SR_ACK" DataValueField="T_SR_ID" Font-Names="Verdana" Font-Size="Small"> </asp:DropDownList> </EditItemTemplate> <HeaderStyle ForeColor="White"></HeaderStyle> <ItemStyle Wrap="False"></ItemStyle> </asp:TemplateField> <asp:TemplateField HeaderText="NOTER TAR." ItemStyle-Wrap="False" HeaderStyle-Wrap="False" HeaderStyle-ForeColor="Blue"> <EditItemTemplate> <cc1:CalendarExtender ID="txtNTR_CalendarExtender" runat="server" Enabled="True" Format="dd/MM/yyyy" TargetControlID="txtNTR" PopupButtonID="ImageButton1" PopupPosition="BottomLeft"> </cc1:CalendarExtender> <br /> <table> <tr> <td> <asp:TextBox ID="txtNTR" runat="server" Height="16px" Width="85px"></asp:TextBox> </td> <td> <asp:Image ID="ImageButton1" runat="server" ImageUrl="~/images/SmallCalendar.gif"/> </td> </tr> </table> </EditItemTemplate> <ItemTemplate> <asp:Label ID="lblNTR" runat="server"> </asp:Label> </ItemTemplate> <HeaderStyle Wrap="False" ForeColor="White"></HeaderStyle> <ItemStyle Wrap="False"></ItemStyle> </asp:TemplateField> <asp:TemplateField HeaderText="İCRA TAR." ItemStyle-Wrap="False" HeaderStyle-Wrap="False" HeaderStyle-ForeColor="Blue"> <EditItemTemplate> <cc1:CalendarExtender ID="txtITR_CalendarExtender" runat="server" Enabled="True" Format="dd/MM/yyyy" TargetControlID="txtITR" PopupButtonID="ImageButton2" PopupPosition="BottomLeft"> </cc1:CalendarExtender> <br /> <table> <tr> <td> <asp:TextBox ID="txtITR" runat="server" Height="16px" Width="85px"></asp:TextBox> </td> <td> <asp:Image ID="ImageButton2" runat="server" ImageUrl="~/images/SmallCalendar.gif"/> </td> </tr> </table> </EditItemTemplate> <ItemTemplate> <asp:Label ID="lblITR" runat="server"> </asp:Label> </ItemTemplate> <HeaderStyle Wrap="False" ForeColor="White"></HeaderStyle> <ItemStyle Wrap="False"></ItemStyle> </asp:TemplateField> <asp:TemplateField HeaderText="FİİLİ HACİZ TAR." ItemStyle-Wrap="False" HeaderStyle-Wrap="False" HeaderStyle-ForeColor="Blue"> <EditItemTemplate> <cc1:CalendarExtender ID="txtHTR_CalendarExtender" runat="server" Enabled="True" Format="dd/MM/yyyy" TargetControlID="txtHTR" PopupButtonID="ImageButton3" PopupPosition="BottomLeft"> </cc1:CalendarExtender> <br /> <table> <tr> <td> <asp:TextBox ID="txtHTR" runat="server" Height="16px" Width="85px"></asp:TextBox> </td> <td> <asp:Image ID="ImageButton3" runat="server" ImageUrl="~/images/SmallCalendar.gif"/> </td> </tr> </table> </EditItemTemplate> <ItemTemplate> <asp:Label ID="lblHTR" runat="server"> </asp:Label> </ItemTemplate> <HeaderStyle Wrap="False" ForeColor="White"></HeaderStyle> <ItemStyle Wrap="False"></ItemStyle> </asp:TemplateField> <asp:TemplateField HeaderText="YAK. EMRİ" ItemStyle-Wrap="False" HeaderStyle-Wrap="False" HeaderStyle-ForeColor="Blue"> <EditItemTemplate> <asp:DropDownList ID="lstYEM" runat="server" DataSourceID="SqlDataSource6" DataTextField="SONUC_ACK" DataValueField="SONUC_KOD" Font-Names="Verdana" Font-Size="Small"> </asp:DropDownList> <asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>" SelectCommand="SELECT * FROM [P_SONUC] WHERE ([SONUC_KOD] &lt; @SONUC_KOD)AND LANG = 1"> <SelectParameters> <asp:Parameter DefaultValue="4" Name="SONUC_KOD" Type="Int16" /> </SelectParameters> </asp:SqlDataSource> </EditItemTemplate> <ItemTemplate> <asp:Label ID="lblYEM" runat="server"> </asp:Label> </ItemTemplate> <HeaderStyle Wrap="False" ForeColor="White"></HeaderStyle> <ItemStyle Wrap="False"></ItemStyle> </asp:TemplateField> <asp:TemplateField HeaderText="NOT" HeaderStyle-ForeColor="Blue" ItemStyle-Wrap="False"> <ItemTemplate> <asp:TextBox ID="txlbTNOT" runat="server" ReadOnly = "true" TextMode="MultiLine"> </asp:TextBox> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtTNOT" runat="server" Height="35" TextMode="MultiLine" DataSourceID="SqlDataSource8"></asp:TextBox> <asp:SqlDataSource ID="SqlDataSource8" runat="server" ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>" SelectCommand="SELECT [T_NOT] FROM [TAKIP] WHERE T_HESAP_NO = @T_HESAP_NO "> <SelectParameters> <asp:Parameter Name="T_HESAP_NO" Type="String" /> </SelectParameters> </asp:SqlDataSource> </EditItemTemplate> <HeaderStyle ForeColor="White"></HeaderStyle> <ItemStyle Wrap="False"></ItemStyle> </asp:TemplateField> </Columns> <FooterStyle BackColor="#CCCCCC" /> <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#FFFFCC" Font-Bold="True" ForeColor="Black" /> <HeaderStyle BackColor="Blue" Font-Bold="True" ForeColor="White" /> <AlternatingRowStyle BackColor="#CCCCCC" /> </asp:GridView> ``` What i want is, classic `Header` freeze pane when i scroll down AND after `TEMSİLCİ` column freeze pane when i scroll right. (TEMSİLCİ column should stable, other columns moves when i scroll right) Is it possible with CSS or other way?
Gridview with Freeze Panes Horizontal and Vertical
CC BY-SA 3.0
0
2011-03-08T13:04:27.647
2012-04-09T18:11:56.930
2017-05-23T10:32:35.693
-1
447,156
[ "c#", "asp.net", "css", "gridview" ]
5,233,232
1
5,233,250
null
0
1,024
With the help of what can be achieved with the same quality pictures as a preview vkontakte.ru (not adv)? I use the library GD. Image quality vkontakte: ![enter image description here](https://i.stack.imgur.com/e1p2D.jpg) Quality pictures to my script: ![enter image description here](https://i.stack.imgur.com/eUkqR.jpg) Big photo: [Link](http://habrastorage.org/storage/cc25b25a/d18df0d0/cf683fbf/8ef848b5.jpg) In all of this photo vkontakte with the best quality weighs 7Kb, and my 16K ... My script: ``` <?php function _makeThumbnail($image, $dest, $ext) { $imageType = exif_imagetype($image); switch ($imageType) { case IMAGETYPE_JPEG: $img = imagecreatefromjpeg($image); break; case IMAGETYPE_PNG: $img = imagecreatefrompng($image); break; case IMAGETYPE_GIF: $img = imagecreatefromgif($image); break; default: throw new Exception('Bad extension'); } $width = imagesx($img); $height = imagesy($img); list($widthX, $heightX) = array('130', '130'); if ($width > $widthX || $height > $heightX) { if ($height > $width) { $ratio = $heightX / $height; $newHeight = $heightX; $newWidth = $width * $ratio; } else { $ratio = $widthX / $width; $newWidth = $widthX; $newHeight = $height * $ratio; } $previewImg = imagecreatetruecolor($newWidth, $newHeight); $palsize = ImageColorsTotal($img); for ($i = 0; $i < $palsize; $i++) { $colors = ImageColorsForIndex($img, $i); ImageColorAllocate($previewImg, $colors['red'], $colors['green'], $colors['blue']); } imagecopyresized($previewImg, $img, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height); $name = $dest; switch ($imageType) { case IMAGETYPE_JPEG: imagejpeg($previewImg, $name . '.' . $ext, 100); break; case IMAGETYPE_PNG: imagesavealpha($previewImg, true); imagepng($previewImg, $name . '.' . $ext, 9); case IMAGETYPE_GIF: imagegif($previewImg, $name . '.' . $ext); break; default: throw new Exception(); } } imagedestroy($previewImg); imagedestroy($img); } ``` Actually necessary to solve two problems. Make the best quality and thus reduce the size of the preview.
PHP quality preview photos
CC BY-SA 2.5
null
2011-03-08T13:37:53.207
2013-11-14T21:25:33.030
2013-11-14T21:25:33.030
null
263,957
[ "php", "gd", "preview" ]
5,233,404
1
5,233,561
null
0
545
I have problem with configuring NODE.JS. I was trying to install node.js with [this](https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-%28Windows%29) tutorial, but when i typed: > ./configure I got error: ![screen](https://i.stack.imgur.com/4N4yr.png) I will be very thankful for any help!
Can't configure node.js on windows 7
CC BY-SA 2.5
0
2011-03-08T13:54:17.683
2014-06-23T22:39:36.830
2014-06-23T22:39:36.830
null
568,975
[ "python", "windows", "node.js", "cygwin" ]
5,233,478
1
5,233,665
null
0
996
trying to register a DLL built with visual c++ 2005 and another DLL built with visual c++ 2008. the system config is windows 7 enterprise 64 bit I tried running regsvr32 from default location and from `c:\windows\syswow64` in either case I'm getting the error ![Error message when i try to register the DLL](https://i.stack.imgur.com/GrEs8.gif) I have C++ redistributable runtime library installed for 2005, 2005 SP1, 2008 for x86 and x64.
unable to register a dll in windows 7 enterprise x64
CC BY-SA 2.5
null
2011-03-08T14:01:12.950
2011-03-08T14:17:11.103
null
null
454,686
[ "c++", "dll", "regsvr32" ]
5,233,505
1
5,318,796
null
6
15,461
I have a graph defined as such: ``` digraph G { rankdir=LR node[shape=circle] q_[shape=none label=""] q3[shape=doublecircle] q4[shape=doublecircle] q_->q0 q0->q1[label="λ"] q0->q2->q4[label=a] q1->q4->q2[label=b] q1->q3[label=a] q3->q4[label="λ"] {rank=same; q4 q3} {rank=same; q1 q2} } ``` The graph outputs the following image: ![enter image description here](https://i.stack.imgur.com/LbwGp.png) You can play with the graph here: [http://graph.gafol.net/derive/effpjWfSD](http://graph.gafol.net/derive/effpjWfSD) My question is: Why is q4 pointing to q3 in the rendered graph and not the way I specified it in the markup? Is it because `{rank=same; q4 q3}` has more semantic meaning than just positioning nodes? If that is the case, how can I position the nodes so that the output is not as hideous as the output is without using `{rank=same; ...}`?
Positioning Nodes With `{rank=same ...}` Side Effects
CC BY-SA 2.5
null
2011-03-08T14:04:06.363
2019-12-13T19:47:26.597
null
null
143,739
[ "graphviz" ]
5,233,519
1
5,236,707
null
0
132
I am trying to create a new package in BIDS but i get the attached error. However you will notice that SSIS is already running. What else could be causing this error and what is the solution? Thanks Paul ![enter image description here](https://i.stack.imgur.com/puu2o.jpg)
Error when creating package in BIDS
CC BY-SA 2.5
null
2011-03-08T14:05:42.910
2011-03-08T18:29:11.387
null
null
545,490
[ "sql-server-2008", "ssis", "bids" ]
5,233,621
1
5,235,447
null
6
185
I've never seen this before, or if I have I haven't noticed how it was done. I was wondering if there was a way with HTML and CSS to stack elements up, rather then down as display:inline would do. Pretty much, I want to go against gravity when the stacked elements get to the end of the line. Ideally, I want to just use CSS and HTML. Javascript, if needed which I think it might be. ![enter image description here](https://i.stack.imgur.com/bFMbG.gif) -- up up and more --> ![enter image description here](https://i.stack.imgur.com/9qV37.gif)
Stacking buttons upwards
CC BY-SA 2.5
0
2011-03-08T14:13:12.383
2011-03-09T12:38:45.193
2011-03-08T14:56:28.337
432,309
432,309
[ "javascript", "html", "css", "creation" ]
5,233,831
1
null
null
0
2,740
Is there a way to put a gradient to a bitmap object in android 2.1? The image must look like this: ![image with gradient](https://i.stack.imgur.com/l6IHF.jpg) I need the gradient only on top of the bitmap. DrawableGradient or LinearGradient are only from android 2.2 so these objects doesn't help me at all. Thanks
android bitmap gradient in android 2.1
CC BY-SA 2.5
0
2011-03-08T14:30:03.503
2011-03-08T18:38:19.153
null
null
517,558
[ "android", "bitmap", "gradient" ]
5,234,102
1
5,234,303
null
4
2,677
i would like make an UIView, with an alpha and with a label. ![enter image description here](https://i.stack.imgur.com/yzNij.png) but i want the UILabel in front of all like this: ![enter image description here](https://i.stack.imgur.com/PC29D.png) How to do it? Here the code: ``` - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor redColor]; UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, 200, 20)]; lbl.text = @"AAAAAA"; lbl.backgroundColor = [UIColor clearColor]; UIView *v = [[UIView alloc] initWithFrame:CGRectMake(50, 210, 230, 50)]; v.backgroundColor = [UIColor greenColor]; v.alpha = 0.5; [v addSubview:lbl]; [self.view addSubview:v]; } ``` The green view is with alpha 0.5... like the text and this is wrong!!! thanks.
Create alpha UIView with an UIlabel in front of it
CC BY-SA 2.5
0
2011-03-08T14:54:57.887
2012-03-25T03:45:54.877
null
null
88,461
[ "iphone", "objective-c", "uiview" ]
5,234,197
1
null
null
4
630
I would like to configure application and user settings using the design time tools in Visual Studio (2010) For example: ![Settings designer in Visual Studio 2010](https://i.stack.imgur.com/UaHs1.png) For the application settings I would like to use the Enterprise Library Configuration tools to manage the values and apply environment specific overrides. However the Settings designer uses `<applicationSettings/>` and the entlib framework uses standard `<appSettings>` illustrated in the screenshot below: ![App config showing both settings designer and entlib configuration](https://i.stack.imgur.com/dZ2gD.png) How can I get entlib to use the same elements as the settings designer? I would like to use the auto-generated code that the settings designer generates.
How to get enterprise library configuration and project settings designer reference the same value in app.config
CC BY-SA 2.5
null
2011-03-08T15:03:15.523
2012-10-05T03:13:20.937
null
null
5,182
[ ".net", "configuration", "app-config", "enterprise-library", "settings.settings" ]
5,234,332
1
5,234,896
null
2
413
I have developed a system in R for graphing large datasets obtained from wind turbines. I am now porting the process into Java. The results I get between the two systems are inconsistent. As shown below: - - - - ![Dataset graphed using R](https://i.stack.imgur.com/7UQgY.png)![Dataset graphed using JFreeCharts](https://i.stack.imgur.com/XR5Uc.png) I can explain the discrepancies between the (red) calculated lines and that is due to the fact that I am using different calculation methods. In R the data is processed as follows, I wrote this code [with a little help](https://stackoverflow.com/questions/4843194/r-language-sorting-data-into-ranges-averaging-ignore-outliers/4844566#4844566) and have no idea what is going on here (but hey, it works). ``` df <- data.frame(pwr = pwr, spd = spd) require(mgcv) mod <- gam(pwr ~ s(spd, bs = "ad", k = 20), data = df, method = "REML") summary(mod) x_grid <- with(df, data.frame(spd = seq(min(spd) + 0.0001, maxi, length=100))) pred <- predict(mod, x_grid, se.fit = TRUE) x_grid <- within(x_grid, fit <- pred$fit) lines(fit ~ spd, data = x_grid, col = "red", lwd = thickLineWidth) ``` In Java (SQL infact) I am using the method of bins to calculate the average at every 0.5 on the x-axis. The resulting data is plotted using a `org.jfree.chart.renderer.xy.XYSplineRenderer` I do not know too much about how the line is rendered. ``` SELECT ROUND( ROUND( x_data * 2 ) / 2, 1) AS x_axis, # See https://stackoverflow.com/questions/5230647/mysql-rounding-functions AVG( y_data ) AS y_axis FROM table GROUP BY x_axis ``` My take on the variance between the two graphs: - - - These are things that I would like to eliminate. So in an effort to understand the difference between the two graphs I have a few questions: - - -
Computer graphing utilities
CC BY-SA 2.5
null
2011-03-08T15:14:03.493
2011-03-08T15:55:55.707
2017-05-23T12:02:08.557
-1
362,332
[ "math", "r", "graph", "statistics", "jfreechart" ]
5,234,369
1
5,234,763
null
1
598
Hi i would like to create a custom button. I have implement my custom_but.xml following various tutorials using selector/item declaration in my xml And this works fine. What i would like to do is have a label and a value on this button. Where the label maintains its value and the value changes based on user input... Is this possible? ![Example of button](https://i.stack.imgur.com/arMfF.jpg)
Android Custom Button
CC BY-SA 2.5
null
2011-03-08T15:17:13.927
2011-03-08T15:46:31.453
null
null
null
[ "android", "layout", "button" ]
5,234,565
1
5,234,595
null
1
356
i have this code ``` function clear(){ context2D.clearRect(0, 0, canvas.width, canvas.height); } function desenhaBonecoDir(){ clear(); context2D.setTransform(1, 0.30, 1, -0.30, 10, 380);//problem here context2D.drawImage(bonecoRight, x, y); x += -10 * xDirection; } ``` ![enter image description here](https://i.stack.imgur.com/dfN20.jpg) if i delete the line where i comment "problem here", the script works well, but if i change the perspective with the set transform i don't know why, the image is copied but undeleted,the result is a repeated image when i press the keys Any help? thanks
problem with clear html5
CC BY-SA 2.5
null
2011-03-08T15:31:24.730
2011-03-08T15:48:32.313
2011-03-08T15:39:06.753
564,979
564,979
[ "javascript", "html", "canvas" ]
5,234,550
1
5,234,589
null
0
1,076
I have been bashing this around for nearly 2 days now. I have read hundreds of blogs, SO posts and MSDN articles and I have still not got my WCF service to behave! I have two projects: - - The service - currently, I am just trying to get IsEmailValid to work: ``` namespace AtomicService { [ServiceContract] public interface IValidation { [OperationContract, WebInvoke( Method="POST", BodyStyle= WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] string IsEmailValid(string email); [OperationContract] bool DoesClientExist(string client); [OperationContract] bool IsPasswordOk(string password); [OperationContract] bool IsPostcodeValid(string postcode, string isoalpha2); [OperationContract] bool IsTelephoneValid(string telephone, string isoalpha2); } } ``` My implementation: ``` namespace AtomicService { [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class Validation : IValidation { public string IsEmailValid(string email) { return string.Format("Response:{0}", AtomicCore.Validation.CheckEmail(email).ToString()); } //others removed for brevity } } ``` When I test my webservice using the WCFTestClient, all is well: ![a check against the service using the WCFTestClient](https://i.stack.imgur.com/zL2ZC.png) Checking with Fiddler returns a 400 Bad Request: ![enter image description here](https://i.stack.imgur.com/CL4jE.png) Further, when I try to access the service with a browser, absolutely happens - just a blank page. When I use my JQuery proxy: ``` /// <reference path="~/System/jquery.js" /> ServiceProxy = function () //constructor for the proxy { this._baseURL = "http://127.0.0.1:88/Validation.svc/"; }; ServiceProxy.prototype = { // getArticles: function (success, error) { // this._doAjax("GetArticles", null, success, error); // }, isEmailValid: function (email, success, error) { var data = { email: email }; this._doAjax("IsEmailValid", data, success, error) }, _defaultErrorHandler: function (xhr, status, error) { alert(xhr.statusText + ' ' + error); }, _doAjax: function (method, data, fnSuccess, fnError) { if (!data) data = {}; if (!fnError) fnError = this._defaultErrorHandler; $.ajax({ type: "GET", url: this._baseURL + method, data: data, contentType: "application/json; charset=utf-8", dataType: "json", success: fnSuccess, error: fnError, dataFilter: function (data) { var response; if (typeof (JSON) !== "undefined" && typeof (JSON.parse) === "function") response = JSON.parse(data); else response = eval("(" + data + ")"); if (response.hasOwnProperty("d")) return response.d; else return response; } }); } }; ``` I get an error - but have no idea what the error is. I can't see the wood for the trees any longer! I'm completely baffled? WCF seems horrifically more complicated than the old .NET ASMX service method, but I wanted to try and learn - and it's been painful so far! Help as always, appreciated.
WCF Webservice with JSON output misbehaving
CC BY-SA 2.5
null
2011-03-08T15:30:18.857
2011-03-08T15:37:11.873
null
null
102,147
[ "c#", "jquery", "wcf", "json" ]
5,234,749
1
5,234,858
null
87
89,554
I have infinite number of divs of a 100px width, which can fit into a 250px width parent. Regardless of height, I need the divs to be displayed in rows, as shown in the image. I've tried resolving this, but the div height seems to be screwing it up. ![enter image description here](https://i.stack.imgur.com/J5D3J.jpg) I'd really appreciate your help. Thanks :) ``` <style> #holder{ width:250px; border:1px dotted blue; display:inline-block; } .box{ width:100px; height:150px; background-color:#CCC; float:left; text-align:center; font-size:45px; display:inline-block; } .one{ background-color:#0F0; height:200px; } .two{ background-color:#0FF; } .three{ background-color:#00F; } .four{ background-color:#FF0; } </style> <div id="holder"> <div class="box one">1</div> <div class="box two">2</div> <div class="box three">3</div> <div class="box four">4</div> </div> ``` Here is the [jsfiddle](http://jsfiddle.net/XFX55/) Here is what I did and achieved using javascript [https://jsfiddle.net/8o0nwft9/](https://jsfiddle.net/8o0nwft9/)
CSS Floating Divs At Variable Heights
CC BY-SA 3.0
0
2011-03-08T15:45:44.440
2017-09-15T16:50:07.617
2017-09-15T16:50:07.617
-1
504,617
[ "css", "html", "css-float" ]
5,234,885
1
5,236,517
null
2
5,550
In the .aspx file I have: ``` <asp:XmlDataSource runat="server" ID="XmlDS" /> ... <ext:ResourceManager ID="ResourceManager1" runat="server" /> <ext:GridPanel ID="GridPanel1" runat="server" StripeRows="true" Title="User Permissions" TrackMouseOver="true" Width="600" Height="350" AutoExpandColumn="Item"> <Store> <ext:Store ID="Store1" runat="server"> <Reader> <ext:ArrayReader> <Fields> <ext:RecordField Name="Item" /> <ext:RecordField Name="Access1" Type="Boolean" /> <ext:RecordField Name="Access2" Type="Boolean" /> <ext:RecordField Name="Access3" Type="Boolean" /> <ext:RecordField Name="Access4" Type="Boolean" /> <ext:RecordField Name="Access5" Type="Boolean" /> </Fields> </ext:ArrayReader> </Reader> </ext:Store> </Store> <ColumnModel ID="ColumnModel1" runat="server"> <Columns> <ext:Column ColumnID="Item" Header="Item" DataIndex="Item" /> <ext:Column ColumnID="Access1" Header="Access1" DataIndex="Access1" /> <ext:Column ColumnID="Access2" Header="Access2" DataIndex="Access2" /> <ext:Column ColumnID="Access3" Header="Access3" DataIndex="Access3" /> <ext:Column ColumnID="Access4" Header="Access4" DataIndex="Access4" /> <ext:Column ColumnID="Access5" Header="Access5" DataIndex="Access5" /> </Columns> </ColumnModel> <SelectionModel> <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" /> </SelectionModel> </ext:GridPanel> ``` Note that I have no experience with ExtJS/Ext.NET so the GridPanel code was used according to how the panel is used on [http://forums.ext.net/showthread.php?10205-More-Information-Required](http://forums.ext.net/showthread.php?10205-More-Information-Required) There it is using a JSON object. Before attempting the whole ExtJS method I found that it can use XML or JSON. When a drop down list's selected index changes, it loads that user's permissions and adds it to a DataTable object (rows are string, bool, bool, bool, bool, bool), which I have successfully created the XML object for. The function returns a string (tempData) which is the address for the XML document in question. so here is the code where I'm not getting any result to load in the grid: ``` if (tempData != String.Empty) { XmlDS.DataFile = tempData; Store1.DataSource = XmlDS; Store1.DataBind(); GridPanel1.Reload(); File.Delete(tempData); } ``` I'm thinking the GridPanel stuff was borrowed from where a JSON object was used, and perhaps the fact that a asp:XmlDataSource object isn't usable for it. But I really don't have a clue to how to get it to load this data I have also tried setting the datasource to the table itself, which loads data, but it loads the string values as empty strings and loads all of the boolean values as false. I appreciate any help you can give. If more info is needed, please let me know. Thanks, --- I cannot get it to load the XML for the life of me. I found an example on the ext.net site (the same one given by Geoffrey) that uses .xml and .xsl files. I generate the .xml document using c# but I don't have a .xsl file that goes with it (nor am I sure how a .xsl document should be structured to try and generate one). So I have attempted to pass a DataTable object with 15 rows. End result: ![enter image description here](https://i.stack.imgur.com/tsg8S.png) One thing that is neat to note is that while it may not have the data, it does contain all 15 rows. I'm assuming it did try to load the dataset but just failed. In the .aspx file I have: ``` <ext:ResourceManager ID="ResourceManager1" runat="server" /> <ext:GridPanel ID="GridPanel1" runat="server" StripeRows="true" Title="User Permissions" TrackMouseOver="true" Width="600" Height="350" AutoExpandColumn="Item"> <Store> <ext:Store ID="Store1" runat="server"> <Reader> <ext:JsonReader> <Fields> <ext:RecordField Name="Item" /> <ext:RecordField Name="Access1" Type="Boolean" /> <ext:RecordField Name="Access2" Type="Boolean" /> <ext:RecordField Name="Access3" Type="Boolean" /> <ext:RecordField Name="Access4" Type="Boolean" /> <ext:RecordField Name="Access5" Type="Boolean" /> </Fields> </ext:JsonReader> </Reader> </ext:Store> </Store> <ColumnModel ID="ColumnModel1" runat="server"> <Columns> <ext:Column ColumnID="Item" Header="Item" DataIndex="Item" /> <ext:CheckColumn ColumnID="Access1" Header="Access1" DataIndex="Access1" Editable="true" Width="40px" /> <ext:CheckColumn ColumnID="Access2" Header="Access2" DataIndex="Access2" Editable="true" Width="40px" /> <ext:CheckColumn ColumnID="Access3" Header="Access3" DataIndex="Access3" Editable="true" Width="40px" /> <ext:CheckColumn ColumnID="Access4" Header="Access4" DataIndex="Access4" Editable="true" Width="40px" /> <ext:CheckColumn ColumnID="Access5" Header="Access5" DataIndex="Access5" Editable="true" Width="40px" /> </Columns> </ColumnModel> <SelectionModel> <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" /> </SelectionModel> </ext:GridPanel> ``` And this is the part where I'm attempting to load the data (tempData is the string address for the XML document as the xml is generated after a drop down list selection). ``` List<List<Object>> PermissionList = BL.Person.getPermissionsList(Convert.ToInt32(ddlUserName.SelectedValue)); DataTable table = BL.Data.CreatePermissionsTable(PermissionList); string tempData = BL.Data.CreateXML(table, "Permission", Convert.ToInt32(ddlUserName.SelectedValue)); if (tempData != String.Empty) { ChangeAccess.Style.Add("display", "block"); Store1.DataSource = table; Store1.DataBind(); File.Delete(tempData); } ``` note that when using the DataSet as the object, the string tempdata/file.delete are fairly pointless. The end goal is to use XML but if it requires using DataTable in the meantime, then I'll go that route. The reason I'm not currently using the json/ method is that the data is, as mentioned, generated from the code behind (it generates 'true' values in the existence of a value in the useraccess for item/personid/accesslevel table, false otherwise. Not actual database entries). Thanks again, --- XML structure: ``` <permissions> <permission> <Item>Process 1</Item> <Access1>True</Access1> <Access2>True</Access2> <Access3>False</Access3> <Access4>False</Access4> <Access5>False</Access5> </permission> <permission> <Item>Process 2</Item> <Access1>True</Access1> <Access2>True</Access2> <Access3>True</Access3> <Access4>False</Access4> <Access5>False</Access5> </permission> </permissions> ``` I attempted to reload the .XML again and this time it seems to be pulling, sort of, the rows generated are somewhere in the neighborhood of 100 rows returned (way beyond the 15 permission elements). Note that I do not have a .xsl file for TransformFile. This won't be an issue I hope? I need to log into the desktop with the actual code, I'll try and get the render thing you requested. Thanks for the help Geoffrey. --- Last edit I swear Between Geoffrey's help and a bit of "what does the example have that mine doesn't?" I was able to get it to work after a few steps: 1) Must generate a .XSL file to give structure to the .XML file. I used the plants.xsl file as a template. 2) in the event that sets my XmlDS object, I changed it to this: ``` if (tempData != String.Empty) { ChangeAccess.Style.Add("display", "block"); XmlDS.DataFile = tempData; XmlDS.TransformFile = tempData.Remove(tempData.LastIndexOf('\\')) + "\\Permissions.xsl"; Store1.DataSource = XmlDS; Store1.DataBind(); File.Delete(tempData); } ``` 3) At this point, I knew it was loading the data as the Items were now displaying properly unfortunately the checkboxes weren't. So I made the function that generates my string/bool/bool/bool/bool/bool object list to replace the bool value with a 1 or a 0. So my xml was now 1 for a true value, for example. Works like a charm now. Now onto the next step of pulling data from the Store when a button event is clicked to a XML file with duplicate structure. Thanks again Geoffrey
Ext.NET GridPanel with XML datasource
CC BY-SA 2.5
null
2011-03-08T15:55:24.187
2011-03-09T09:29:50.000
2011-03-09T04:13:53.523
417,579
417,579
[ "c#", "asp.net", "ext.net" ]
5,235,123
1
null
null
3
4,461
I am running Instruments and it indicates that the SimpleAudioEngine is leaking memory. The screenshot is attached. The memory leak is multiple times although the screenshot only shows one instance. ![enter image description here](https://i.stack.imgur.com/iIYTm.png) Also, sometimes it points to the following implementation (my code): ``` -(void) preloadGameSounds { // pre load the background sound [[SimpleAudioEngine sharedEngine] preloadEffect:@"farm_background_sound.mp3"]; // pre load the game sounds [[SimpleAudioEngine sharedEngine] preloadEffect:@"chickenlayingegg.mp3"]; // setup ding sound [[SimpleAudioEngine sharedEngine] preloadEffect:@"ding.caf"]; // egg pop sound [[SimpleAudioEngine sharedEngine] preloadEffect:@"baloonpop.wav"]; // preload applause sound [[SimpleAudioEngine sharedEngine] preloadEffect:@"applause.mp3"]; // wrong answer sound [[SimpleAudioEngine sharedEngine] preloadEffect:@"wrong_answer_sound.wav"]; } ``` When changing the scenes I also unload the sound using the following implementation: ``` -(void) unloadSoundEffects { [[SimpleAudioEngine sharedEngine] unloadEffect:@"applause.mp3"]; //[[SimpleAudioEngine sharedEngine] unloadEffect:@"wrong_answer_sound.wav"]; [[SimpleAudioEngine sharedEngine] unloadEffect:@"ding.caf"]; [[SimpleAudioEngine sharedEngine] unloadEffect:@"chickenlayingegg.mp3"]; } ``` This memory leak is making the FPS of the game to go low and making game slower and slower!
SimpleAudioEngine Cocos2d Leaking Memory
CC BY-SA 2.5
0
2011-03-08T16:14:28.317
2013-03-18T16:54:11.123
2013-03-18T16:54:11.123
168,868
3,797
[ "cocos2d-iphone", "simpleaudioengine" ]
5,235,464
1
5,386,957
null
34
29,167
i'm issuing a request using MSXML's [XmlHttpRequest](https://msdn.microsoft.com/en-us/library/ms760305(v=vs.85).aspx) object: ``` IXMLHttpRequest http = new XmlHttpRequest(); http.open("GET", "http://www.bankofcanada.ca/stat/fx-xml.xml", False, "", ""); http.send(); ``` And the `send` succeeds, and i get my xml data. Except that `XmlHttpRequest` didn't actually hit the network (i can see there no actual http request issued). And Process Monitor shows the file is actually being served from my cache: ![enter image description here](https://i.stack.imgur.com/jfUHG.png) So i want to instruct the `XmlHttpRequest` user agent that any cached content older than 0 seconds is too old. The [standards way](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html) to do this is to add a request header: ``` Cache-Control: max-age=0 ``` to the send request: ``` http = new XmlHttpRequest(); http.open("GET", "http://www.bankofcanada.ca/stat/fx-xml.xml", False, "", ""); http.setRequestHeader("Cache-Control", "max-age=0"); http.send(); ``` And the `send` succeeds, and i get my xml data. Except that `XmlHttpRequest` didn't actually hit the network (i can see there no actual http request issued). And Process Monitor shows the file is actually being served from my cache. So what is wrong? Is `max-age` not doing what i think it does? From [RFC 2616 - Hypertext Transfer Protocol, Part 14: Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3): > Other directives allow a user agent to modify the basic expiration mechanism. These directives MAY be specified on a request:max-age Indicates that the client is willing to accept a response whose age is no greater than the specified time in seconds. Unless max- stale directive is also included, the client is not willing to accept a stale response. Which exactly what i want. Is `Cache-Control: max-age=0` not exactly what i want, or is MSXML's `XmlHttpRequest` object buggy? ## Update One This is the MSXML `XmlHttpRequest` COM object: - - ## Update Two The `max-age` directive is added by the client for all cache's to adhere to. From RFC: > The Cache-Control general-header field is used to specify directives that . The directives specify behavior intended to prevent caches from adversely interfering with the request or response. These directives typically override the default caching algorithms. Cache directives are unidirectional in that the presence of a directive in a request does not imply that the same directive is to be given in the response. Max-age is not for the server; it makes no sense for a server. It is intended for all caching systems the user and the server. ## Update Three From [W3C XmlHttpRequest](http://www.w3.org/TR/XMLHttpRequest/#the-send-method): > If the user agent implements a HTTP cache it respect `Cache-Control` request headers set by the [setRequestHeader()](http://www.w3.org/TR/XMLHttpRequest/#dom-xmlhttprequest-setrequestheader) (e.g., `Cache-Control: no-cache` bypasses the cache). It send `Cache-Control` or `Pragma` request headers automatically unless the end user explicitly requests such behavior (e.g. by reloading the page). Following their , i tried using the `no-cache` directive: ``` http = new XmlHttpRequest(); http.open("GET", "http://www.bankofcanada.ca/stat/fx-xml.xml", False, "", ""); http.setRequestHeader("Cache-Control", "no-cache"); http.send(); ``` And the `XmlHttpRequest` client still services requests completely from the cache, without querying the server at all. The W3C says that if there is a cache, it must honor `Cache-Control` if it is set through `setRequestHeader`. Microsoft's XmlHttpRequest doesn't seem to honor that requirement.
How to make Microsoft XmlHttpRequest honor cache control directive
CC BY-SA 3.0
0
2011-03-08T16:42:57.133
2018-10-29T10:03:03.833
2017-10-27T17:46:50.423
12,597
12,597
[ "xmlhttprequest", "msxml", "cache-control" ]
5,235,567
1
11,265,983
null
2
570
I'm currently trying to write an app, that would be able to show the effects of glas, as seen through the iPhone Camera. I'm not talking about simple, uniform glas but glass like this: ![Glas Image](https://i.stack.imgur.com/6btzc.jpg) Now I already broke this into two problems: 1) Apply some Image Filter to the 2D-frames presented by the iPhone Camera. This has been done and seems possible, e.g. in the app: [faceman](http://itunes.apple.com/us/app/faceman/id388888160?mt=8) 2) I need to get the individual lighting properties of a sheet of glas that my client supplies me with. Now basicly, there must be a way to read the information about how the glas distorts ands skews the image. I think It might be somehow possible to make a high-res picture of the plate of glasplate, laid on a checkerboard-image and somehow analyze this. Now, I'm mostly searching for literature, weblinks on how you guys think I could start at 2. It doesn't need to be exact, in the end I just need something that looks approximately like the sheet of glass I want to show. And I'm don't even know where to search, Physics, Image Filtering or Comupational Photography books. EDIT: I'm currently thinking, that one easy solution could be bump-mapping the texture on top of the camera-feed, I asked another question on this [here](https://stackoverflow.com/questions/5273946/bump-mapping-on-top-if-iphone-camera).
Overlay "Structured Glas" Effect on iPhone Camera Feed - General Directions
CC BY-SA 2.5
0
2011-03-08T16:49:21.817
2012-06-29T17:03:22.503
2017-05-23T12:24:21.783
-1
459,744
[ "iphone", "image-processing", "filtering", "video-processing" ]
5,235,817
1
5,236,027
null
1
493
hi guys I have attached a pic for the table structure.. ![mysql unique](https://i.stack.imgur.com/e2HiV.png) I am adding a new record to db and it says its duplicated when `title` is different is there something wrong on the way I have structured all three to be unique? I need the title,parent, eid to be unique as only if all three have the same data in it, if one of the fields is different treat it as a non duplicate The title `bla bla` does not exist on db yet ``` INSERT INTO `test_table` (`id`,`title`,`parent`,`lang`)VALUES(1,'Bla bla',0,25); ```
mysql unique (multiple keys )
CC BY-SA 2.5
null
2011-03-08T17:10:16.417
2011-04-26T03:41:55.383
2011-04-26T03:41:55.383
135,152
240,215
[ "mysql", "mysql-error-1062" ]
5,235,998
1
null
null
10
20,901
I wrote a small farad converter to learn GUI programming. It works great, looks fine-ish. The only problem is I can't seem to figure out how to control this strange highlighting that comes up on my `ttk.Combobox` selections. I did use a `ttk.Style()`, but it only changed the colors of the `ttk.Combobox` background, entries, etc. I also tried changing `openbox/gtk` themes. ![what the farad](https://i.stack.imgur.com/Vgx86.png) I'm talking about what's seen there on the text "microfarads (uF)". It'd be fine, if it highlighted the entire box; but I'd rather have it gone completely. How can I manipulate a `ttk.Combobox`'s selection highlight? ``` # what the farad? # thomas kirkpatrick (jtkiv) from tkinter import * from tkinter import ttk # ze la programma. def conversion(*args): # this is the numerical value inV = float(inValue.get()) # these two are the unit (farads, microfarads, etc.) values inU = inUnitsValue.current() outU = outUnitsValue.current() # "mltplr" is multiplied times inValue (inV) if inU == outU: mltplr = 1 else: mltplr = 10**((outU - inU)*3) outValue.set(inV*mltplr) # start of GUI code root = Tk() root.title("What the Farad?") # frame mainFrame = ttk.Frame(root, width="364", padding="4 4 8 8") mainFrame.grid(column=0, row=0) # input entry inValue = StringVar() inValueEntry = ttk.Entry(mainFrame, width="20", justify="right", textvariable=inValue) inValueEntry.grid(column=1, row=1, sticky="W") # input unit combobox inUnitsValue = ttk.Combobox(mainFrame) inUnitsValue['values'] = ('kilofarads (kF)', 'farads (F)', 'millifarads (mF)', 'microfarads (uF)', 'nanofarads (nF)', 'picofarads (pF)') inUnitsValue.grid(column=2, row=1, sticky="e") inUnitsValue.state(['readonly']) inUnitsValue.bind('<<ComboboxSelected>>', conversion) # result label outValue = StringVar() resultLabel = ttk.Label(mainFrame, textvariable=outValue) resultLabel.grid(column=1, row=2, sticky="e") # output unit combobox outUnitsValue = ttk.Combobox(mainFrame) outUnitsValue['values'] = ('kilofarads (kF)', 'farads (F)', 'millifarads (mF)', 'microfarads (uF)', 'nanofarads (nF)', 'picofarads (pF)') outUnitsValue.grid(column=2, row=2, sticky="e") outUnitsValue.state(['readonly']) outUnitsValue.bind('<<ComboboxSelected>>', conversion) # padding for widgets for child in mainFrame.winfo_children(): child.grid_configure(padx=4, pady=4) # focus inValueEntry.focus() # bind keys to convert (auto-update, no button) root.bind('<KeyRelease>', conversion) root.mainloop() ```
How to control the tkinter combobox selection highlighting
CC BY-SA 3.0
0
2011-03-08T17:23:08.957
2022-03-18T17:38:30.510
2015-01-16T18:20:34.247
3,924,118
623,985
[ "python", "combobox", "python-3.x", "tkinter", "ttk" ]
5,236,672
1
5,236,981
null
1
376
In development I am trying to gather all models within my app by including a method within `ActiveRecord::Base` classes so they can configure the models and it will give me a hook to add that model to a global array. ``` module EngineName module ActiveRecordExtensions extend ActiveSupport::Concern included do def self.inherited(klass) #:nodoc: klass.class_eval do def self.config_block(&block) abstract_model = EngineName::AbstractModel.new(self) abstract_model.instance_eval(&block) if block EngineName::Models.add(abstract_model) end end end end end end ``` My `EngineName::Models` class is just a wrapper that holds all models. ``` module EngineName class Models class << self def all @models ||= [] end alias_method :models, :all def navigation @models - excluded_navigation_models end def routed @models - excluded_route_models end # Creates an array of models if none exists. Appends new models # if the instance variable already exists. def register(klass) if @models.nil? @models = [klass] else @models << klass unless @models.include?(klass) || excluded_models.include?(klass) end end alias_method :add, :register end end end ``` On each refresh though, the `config_block` method within my model gets called and in turn appends the same model over and over within my global array of models. As you can see down below, whenever I loop through all my models, it will keep on appending itself. ![enter image description here](https://i.stack.imgur.com/VR1ew.png) Is there any way to cache certain classes within my engine? Or is there a flaw within my approach of registering models with a hook within the model itself?
Rails engine not caching
CC BY-SA 2.5
null
2011-03-08T18:26:30.373
2011-03-08T18:58:40.840
null
null
59,220
[ "ruby-on-rails", "ruby", "model", "rails-engines" ]
5,236,758
1
null
null
0
116
My website uses supersized, so my background is never 'static'; eg: when you resize the browser window, the background image will resize itself too and so the top left corner of the website will have a slightly different background. Look at the following screenshots: Current layout ![current](https://i.stack.imgur.com/z2WxT.png) [http://cl.ly/0l2p3P3I432D1C1t0P3K/content](http://cl.ly/0l2p3P3I432D1C1t0P3K/content) Current problem ![current problem](https://i.stack.imgur.com/Gtqtv.png) [http://cl.ly/2N1d032Z2G3Q2H04462V/content](http://cl.ly/2N1d032Z2G3Q2H04462V/content) Solution i have in mind will be in the next post, since i can't post more than 2 hyperlinks. So, the thing is.. When i scroll down, the content (photographs) move up, overlapping the logo and flickr badge. There's an easy solution for this: overlay another absolute or fixed div with a solid colour with a z-index lower than the logo & flickr badge and higher than the photographs. So if you would scroll down, the pictures would dissapear below that fixed div. Yet, that is impossible since i don't have a fixed background, as i explained earlier (supersized).
Logical xhtml/css design
CC BY-SA 3.0
null
2011-03-08T18:33:38.573
2015-04-19T12:05:16.243
2015-04-19T12:05:16.243
1,571,407
498,693
[ "css", "xhtml" ]
5,236,816
1
5,237,127
null
1
175
I wanted to create the following: I am using a Relative Layout & assigning a background colour "Blue" . I wanted to draw another background color(black) with space from margins. Also , I wanted to have rounded edges of the black rectangle(not on the picture) Kindly provide the sample code. ![enter image description here](https://i.stack.imgur.com/GZmmG.png)
Create background within another background
CC BY-SA 3.0
0
2011-03-08T18:39:41.947
2016-03-27T00:22:05.433
2016-03-27T00:22:05.433
6,027,959
443,141
[ "android" ]
5,236,832
1
5,237,236
null
0
319
I am developing a report that incorporates a graphical header on only the first page, and I wanted to utilize two different embedded graphics as page backgrounds. My initial (failed) attempt was to: 1. right click on the page background 2. choose the Body Properties 3. Add a Fill Background image Formula as follows: =IIF(Globals!PageNumber > 1, background, first_background) When I attempted to render the report I received the following error: ![error message for using a global variable in the body](https://i.stack.imgur.com/zREnU.png) Am I just out of luck with this? Any pointers?
How do I set the background on a SQP Server 2008 R2 SSRS report using a formula
CC BY-SA 2.5
null
2011-03-08T18:41:58.077
2011-03-08T19:23:26.337
null
null
4,911
[ "reporting-services", "sql-server-2008-r2" ]
5,236,853
1
5,266,567
null
0
430
In an iPad app I'm working on I have this view hierarchy: ![enter image description here](https://i.stack.imgur.com/VFZ0L.png) If I set `mastercontroller` not to show the `UINavigationBar` of the `UINavigationController`, the UI is fine (only the status bar is shown). ![enter image description here](https://i.stack.imgur.com/iVzRf.png) After I try to push the `detailcontroller` into the `UINavigationController` (this time I want the bar to be show), the navigation bar appears translated on y axis (it is frame shows that its origin is (0,20) and 20 is the height of the status bar, right?...) And when I return to the `mastercontroller`, the bar is still there, translated. This is what I get: ![enter image description here](https://i.stack.imgur.com/b2iSE.png) Any clue on how can I solve this?
How to correctly place a UINavigationBar in a complicate view hierarchy?
CC BY-SA 2.5
null
2011-03-08T18:44:53.130
2013-08-16T16:51:57.857
null
null
370,158
[ "iphone", "objective-c", "ipad", "uinavigationcontroller", "uinavigationbar" ]
5,237,305
1
null
null
1
961
I'm working on project in my university and i have a problem. The goal is to create algorithm that can track curves in plot images and create a lists of Point(x,y) with predefined accuracy/step that describes the curves. The number of curves on each image >=1 and width >=1 pixel. Curves may have multiple intersections and colors. They also can have the same color. The example of what i want to do: ![enter image description here](https://i.stack.imgur.com/SXoni.gif) Dots are points that i need to extract. The scanning area must be picked by user(no axis or text in scaning area). I found some interesting [here](http://twiki.mssl.ucl.ac.uk/twiki/bin/viewfile/SDO/LoopRecognition?rev=1.1;filename=MSthesis.pdf), but i don't feel that i'm strong in mathematics. I need something easier.
Curve line tracking
CC BY-SA 2.5
0
2011-03-08T19:32:24.837
2011-03-09T03:23:09.160
2011-03-09T03:23:09.160
353,410
650,398
[ "c#", "image-processing", "image-manipulation" ]
5,237,340
1
5,237,635
null
4
5,826
I'm developing an ASP.NET MVC website with Visual Studio 2010. The site is built and running from the local computer with the local built-in ASP.NET Development Server, the database is located somwhere on the net. The problem is that it is very slow to load or reload the page, take a look on this sceen : ![enter image description here](https://i.stack.imgur.com/Rrfsb.jpg) [Link to image](https://i.stack.imgur.com/Rrfsb.jpg) Any idea why this is that slow? BestRegards Edit : I have found out that this do only happen i Firefox, IE will return the page ALOT faster?
Very slow loading time with Visual Studio and ASP.NET MVC?
CC BY-SA 2.5
0
2011-03-08T19:35:57.767
2011-03-09T08:30:06.713
2011-03-09T08:30:06.713
365,624
365,624
[ "asp.net-mvc", "optimization", "webserver" ]
5,237,554
1
5,238,015
null
2
1,575
I have a Data Flow Task that does some script component tasks, sorts, then does a Merge Join. I'd like to have the Merge Join do the join as a 1-many. If I do an Inner Join, I get too few records:![Too Few Records](https://i.stack.imgur.com/eK0ii.jpg) If I do a Left Outer Join, I get WAY too many records: ![WAY too many!](https://i.stack.imgur.com/RJCwr.jpg) I'm looking for the Goldilocks version of 'Just Right' (which would be 39240 records).
SSIS 2005 Can Merge Join accommodate one-to-many joins
CC BY-SA 3.0
null
2011-03-08T19:56:31.420
2015-10-17T23:45:21.720
2015-10-17T23:45:21.720
5,208,999
1,391
[ "sql-server-2005", "ssis", "ssis-2005" ]
5,237,556
1
null
null
1
2,340
I've created a simple web service for use with the ajax autocompleteextender control. It works great, I'm almost done except there is one thing bothering me. When there is data in the database that is using html characters, the output data is un-friendly to a user. For example "Test ;amp Test". So when you start to type "Test" in the search box one of the results displayed is "Test ;amp Test". I would like for it to instead be displayed as Test & Test without changing the data in the table. I'm not sure exactly how to do this. I have tried to htmlencode the string items but always get build errors. Thanks in advance for the help! Here is the guts of my webservice: ``` [WebMethod] public string[] GetActiveProducts(string prefixText) { ddconnection = new SqlConnection("Data Source=***;Initial Catalog=***;Connect Timeout=200;Persist Security Info=True;User ID=sa;Password=***;"); ddconnection.Open(); int count = 10; string sql = "SELECT TOP 10 title FROM Product WHERE active = '1' AND title LIKE @prefixText"; SqlDataAdapter da = new SqlDataAdapter(sql, ddconnection); da.SelectCommand.Parameters.Add("@prefixText", SqlDbType.VarChar, 60).Value = "%" + prefixText + "%"; DataTable dt = new DataTable(); da.Fill(dt); string[] items = new string[dt.Rows.Count]; int i = 0; foreach (DataRow dr in dt.Rows) { items.SetValue(dr["title"].ToString(),i); i++; } return items; } ``` Example of behavior. (sorry to have to blur) ![Example Image](https://i.stack.imgur.com/Z4Hon.png)
HtmlEncode data from a webservice
CC BY-SA 2.5
null
2011-03-08T19:56:43.857
2012-09-06T22:07:25.253
2012-09-06T22:07:25.253
246,246
322,572
[ "c#", "asp.net", ".net", "web-services", "html-encode" ]
5,237,597
1
5,239,480
null
0
320
Very, very new at Obj-C... that said, I had some problems with code earlier, which seem to be resolved (I guess!). Now, when I do a build, I get this: ![Error Message](https://i.stack.imgur.com/sYBQF.png) I am not using vanilla SQLite, but rather SQLCipher, ([http://sqlcipher.net](http://sqlcipher.net)) What symbols is it talking about? and how do I fix it? Thank you (in advance) for looking at this... I'm "dead in the water" until I can get this fixed!
Objective-C: symbols not found during link
CC BY-SA 2.5
null
2011-03-08T20:00:06.470
2011-05-17T13:35:26.420
2011-05-17T13:35:26.420
210,916
1,231,786
[ "objective-c", "sqlite", "sqlcipher" ]
5,238,039
1
5,238,127
null
2
1,219
been trying to figure out Android layouts and having a bit of an issue. i got as far as figuring out how to get the objects in the places i want, using a RelativeLayout (tried LinearLayout and TableLayout combinations, only to find that gravity and attributes weren't doing things i thought they would...) but i've run into an issue with text bleeding behind other text. ![Valid XHTML](https://i335.photobucket.com/albums/m470/jmartin866/dashboard-ss.png) the second item demonstrates the problem. i'd like to have this same layout without the text bleeding. here is my code: ``` <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="?android:attr/listPreferredItemHeight" android:layout_width="wrap_content" android:padding="6dip"> <TextView android:id="@+id/item_text_product" android:layout_alignParentLeft="true" android:textSize="24sp" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/item_text_total" android:layout_alignParentRight="true" android:textSize="18sp" android:textStyle="bold" android:textColor="#00aa00" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/item_text_count" android:layout_alignParentRight="true" android:layout_below="@id/item_text_total" android:textSize="12sp" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/text_count" android:text="Count: " android:textSize="12sp" android:layout_toLeftOf="@id/item_text_count" android:layout_alignBaseline="@id/item_text_count" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </RelativeLayout> ```
RelativeLayout margin problem, text bleeding into other "fields"
CC BY-SA 2.5
0
2011-03-08T20:37:08.610
2011-03-08T20:48:30.027
2017-02-08T14:31:43.133
-1
329,993
[ "android", "xml", "android-layout" ]
5,238,274
1
5,238,917
null
1
802
I have a form that is generated via ajax (facebox). In FF, Chrome, IE > 8 it all works fine, however in IE < 9 the form has no styles. ![Image Diff](https://i.stack.imgur.com/xhGO7.png) What would be causing this*? *some effects are missing due to CSS3, but css3 is not height/width/padding. --- Using IE's "element source with style" on the input gives: ``` <html> <head><style> BODY { color: #4f5155; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-image: url("../images/pageBackground.png"); background-attachment: scroll; background-repeat: no-repeat; background-position-x: center; background-position-y: top; background-color: rgb(58, 58, 58); } #facebox { left: 0px; top: 0px; text-align: left; position: absolute; z-index: 100; } #facebox .popup { position: relative; } #facebox .content { width: 370px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; display: table; background-image: none; background-attachment: scroll; background-repeat: repeat; background-position-x: 0%; background-position-y: 0%; background-color: rgb(255, 255, 255); } </style></head> <body><div id="facebox" style="left: 477px; top: 40px;"><div class="popup"><div class="content"><div class="inputSeperator"> <input name="name" type="text" /> </div></div></div></div></body></html> ``` ``` <html> <head><style> body { color: #4f5155; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-image: url("../images/pageBackground.png"); background-attachment: scroll; background-repeat: no-repeat; background-position-x: center; background-position-y: top; background-size: auto; background-origin: padding-box; background-clip: border-box; background-color: rgb(58, 58, 58); } form#newForm { width: 500px; padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; font-weight: normal; border-top-color: #e5e5e5; border-right-color: #e5e5e5; border-bottom-color: #e5e5e5; border-left-color: #e5e5e5; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; box-shadow: 0px 4px 18px rgba(200,200,200,1); background-image: none; background-attachment: scroll; background-repeat: repeat; background-position-x: 0%; background-position-y: 0%; background-size: auto; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 255); } form#newForm input[type='text'], form#newForm input[type='password'], form#newForm textarea, form#newForm select { width: 97%; color: #555; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; font-size: 16px; margin-top: 2px; margin-right: 6px; margin-bottom: 16px; border-top-color: #e5e5e5; border-right-color: #e5e5e5; border-bottom-color: #e5e5e5; border-left-color: #e5e5e5; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; background-image: none; background-attachment: scroll; background-repeat: repeat; background-position-x: 0%; background-position-y: 0%; background-size: auto; background-origin: padding-box; background-clip: border-box; background-color: rgb(251, 251, 251); } #facebox { left: 0px; top: 0px; text-align: left; position: absolute; z-index: 100; } #facebox .popup { border-top-color: rgba(0,0,0,0); border-right-color: rgba(0,0,0,0); border-bottom-color: rgba(0,0,0,0); border-left-color: rgba(0,0,0,0); border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; position: relative; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; box-shadow: 0px 0px 18px rgba(0,0,0,0.4); } #facebox .content { width: 370px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; display: table; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-image: none; background-attachment: scroll; background-repeat: repeat; background-position-x: 0%; background-position-y: 0%; background-size: auto; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 255); } </style></head> <body><div id="facebox" style="left: 397.5px; top: 40.5px;"><div class="popup"><div class="content"><form id="newForm" action="none" method="POST"><div class="inputSeperator"> <input name="name" type="text" /> </div></form></div></div></div></body></html> ```
Form loses all styles?
CC BY-SA 2.5
null
2011-03-08T21:01:43.977
2011-03-08T22:06:01.583
2011-03-08T21:13:48.820
126,562
383,759
[ "css", "ajax", "forms", "internet-explorer-8" ]
5,238,405
1
5,239,902
null
3
2,187
Does anyone know how to query an ADG (or its rows) to figure out how many rows are currently visible (i.e. not collapsed) when displaying different levels of a hierarchical collection? In other words I'd like a function that tells me that 7 lines are visible in this view ![enter image description here](https://i.stack.imgur.com/pranQ.png) and 1 line is available in this one ![enter image description here](https://i.stack.imgur.com/2cbte.png) I assume this is simple but can't seem to find the right keyword anywhere. thank you!
AdvancedDataGrid: how to tell how many rows are currently visible?
CC BY-SA 2.5
null
2011-03-08T21:14:24.950
2011-09-26T21:49:55.147
null
null
306,584
[ "apache-flex", "actionscript-3", "flex3", "flex4", "advanceddatagrid" ]
5,238,416
1
8,799,609
null
0
1,113
I added a toolbar to the bottom which disappears while you are drawing, but I am unable to draw to the bottom of the screen. I tried bounds or frame, but neither worked. I only have one view, btw. Too much drawing around the bottom will cause the whole picture around ![Picture of Problem](https://i.stack.imgur.com/hPls3.png) ``` - (void)viewDidLoad { [super viewDidLoad]; drawImage = [[UIImageView alloc] initWithImage:nil]; drawImage.frame = self.view.frame; [self.view addSubview:drawImage]; self.view.backgroundColor = [UIColor lightGrayColor]; mouseMoved = 0; } - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { toolbar.hidden = YES; mouseSwiped = NO; UITouch *touch = [touches anyObject]; if ([touch tapCount] == 2) { drawImage.image = nil; return; } lastPoint = [touch locationInView:self.view]; lastPoint.y -= 20; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { mouseSwiped = YES; UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch locationInView:self.view]; currentPoint.y -= 20; UIGraphicsBeginImageContext(self.view.frame .size); [drawImage.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 5.0); CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0); CGContextBeginPath(UIGraphicsGetCurrentContext()); CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y); CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y); CGContextStrokePath(UIGraphicsGetCurrentContext()); drawImage.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); lastPoint = currentPoint; mouseMoved++; if (mouseMoved == 10) { mouseMoved = 0; } } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; if ([touch tapCount] == 2) { toolbar.hidden = NO; drawImage.image = nil; return; } if(!mouseSwiped) { UIGraphicsBeginImageContext(self.view.frame.size); [drawImage.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 5.0); CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0); CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y); CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y); CGContextStrokePath(UIGraphicsGetCurrentContext()); CGContextFlush(UIGraphicsGetCurrentContext()); drawImage.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); } } ```
iPhone Drawing to Screen Issue
CC BY-SA 2.5
null
2011-03-08T21:15:16.407
2012-01-10T06:56:34.810
null
null
597,775
[ "iphone", "objective-c", "ios4", "iphone-sdk-3.0" ]
5,238,475
1
5,238,606
null
0
755
So far i have this code: ``` function changeGeoLoc($a,$b,$c){ echo "<ul style='list-style-type: none; display:inline;'>"; while(list(,$geoloc) = each($a) AND list(,$Details) = each($b)) { echo "<li style='list-style-type: none; display:inline; padding-right:5px;'>$Details {$c->$geoloc} </li>"; } echo "</ul>"; } ``` which produces this: ![Product of the above code](https://i.stack.imgur.com/NnB8x.png) Does anyone know how to make the above centered so its in the middle? Any ideas appreciated. Thankyou .
How to center this <ul>?
CC BY-SA 2.5
null
2011-03-08T21:20:45.993
2011-03-08T21:47:27.217
2011-03-08T21:31:59.823
383,691
383,691
[ "php", "html", "css", "html-lists", "centering" ]
5,238,950
1
5,239,206
null
0
11,772
![enter image description here](https://i.stack.imgur.com/5ZZU7.jpg) I have 2 images I would like to look similar to this photo (sorry about the quality, the PSD for the site is scattered so I whipped an image together in a few mins to show what I meant). My first image is the logo - which is a png of the guy with glasses, the trail and the title. The second image is the blue box, which I would like to be a form for users to put their email address on. My HTML tags are this: ``` <body id="home"> <div id="main" method="post" action=""> <img id="Smarty" src="images/logo.png" /> </div> <div id="box" method="post" action=""> <img id="Form" src="images/form.png" /> </div> ``` And my css follows: ``` #home #main { margin-top: 10%; margin-right: auto; margin-left: auto; } #home #main #box { margin-right: auto; margin-left: auto; } ``` The goal is to have the image looking like the attached photo, with it all centered relative to the size of the users screen. I already have the background working to scale accordingly, but cannot for the life of me figure out how to overlap existing PNGs in CSS with % values rather than fixed pixel values. Thanks for any guidance! EDIT: This code puts my logo in the right place (center and 8% down from the top of the page): ``` #wrapper #main { margin-top: 8%; margin-right: auto; margin-left: auto; text-align:center; display:block; } #wrapper #main #box{ margin-top: 8%; margin-right: auto; margin-left: auto; position: relative; text-align:center; display:block; } ``` But the box is still below the logo, and to the far left.
Overlapping images in CSS with divs
CC BY-SA 2.5
0
2011-03-08T22:08:58.123
2011-03-17T22:54:12.110
2011-03-08T22:50:01.407
496,686
496,686
[ "html", "css", "center" ]
5,239,018
1
5,239,202
null
1
363
``` class A { public Color ColorA { get; set; } public Color ColorB { get; set; } public A(Color colorA, Color colorB) { ColorA = colorA; ColorB = colorB; } public override string ToString() { return ColorA + " " + ColorB; } } ``` This renders as: ![enter image description here](https://i.stack.imgur.com/IVcJT.png) --- And this: ``` class A { public Color ColorA { get; set; } public Color ColorB { get; set; } public A(Color colorA, Color colorB) { ColorA = colorA; ColorB = colorB; } public override string ToString() { return "Red" + " " + "Black"; } } ``` renders as: ![enter image description here](https://i.stack.imgur.com/MTDme.png) Why the difference? Edit: I know why the difference. My question is, how to achieve second result without hardcoding the text of the color.
DebuggerDisplay - type in square brackets
CC BY-SA 2.5
0
2011-03-08T22:15:18.920
2011-03-08T22:39:04.407
2011-03-08T22:20:40.053
113,858
113,858
[ "c#", ".net", "debuggerdisplay" ]
5,239,028
1
5,239,162
null
0
215
that's my flash site , I want to extend the gray box to reach the edge of the HTML page . I mean that I don't want the background color to appear . sorry for my bad English . ![enter image description here](https://i.stack.imgur.com/sn9zW.jpg)
edit resolution in flash page
CC BY-SA 2.5
null
2011-03-08T22:16:19.110
2011-03-08T22:28:32.447
null
null
437,136
[ "html", "css", "flash", "actionscript-3", "flash-cs5" ]
5,239,136
1
5,239,544
null
2
2,234
During development of my WPF application I suddenly got the seemingly much-dreaded RaceOnRCWCleanup when closing the application while debugging. When executing without debugger attached everything was normal. Image and text of the warning message: ![enter image description here](https://i.stack.imgur.com/7UD4E.png) > Managed Debugging Assistant 'RaceOnRCWCleanup' has detected a problem in 'MyEXE'. Additional Information: An attempt has been made to free an RCW that is in use. The RCW is in use on the active thread or another thread. Attempting to free an in-use RCW can cause corruption or data loss. The stack trace was not very helpful: Since the last bigger change I had made prior to the error occuring for the first time was using a COM object from my managed C# code I obviously suspected that OCX (written by me). Searching the net and stackoverflow did not yield any solution. Then I found out that . I had done that, because I wanted to debug my OCX written in unmanaged C++, too. Disabling unmanaged code debugging made the problem go away immediately. This happened on Windows 7, Visual Studio 2010 without SP1. Does anyone have an explanation what is happening here? Is this a bug? This problem was gone when I installed service pack 1 for Visual Studio 2010.
RaceOnRCWCleanup when closing WPF application with COM and "Enable unmanaged code debugging"
CC BY-SA 2.5
0
2011-03-08T22:26:27.897
2011-03-11T12:03:22.413
2011-03-11T12:03:22.413
234,152
234,152
[ ".net", "wpf", "debugging", "com", "unmanaged" ]
5,239,328
1
null
null
0
386
I'm building a tool that manipulates the DOM on existing webpages via a bookmarklet and I'm running into problems setting the max-width on certain sites. My goal is to resize any page to so that the maximum width is 980px. Giving the body a max-width of 980px, however, behaves erratically. On some pages it works perfectly and on others some of the elements get repositioned based on the new width and others don't. Take Google.com, for example. In each of the following screenshots I've given the body a max-width of 980px. I also manually added a blue line showing where 980px should be. In Chrome: ![Google in Chrome](https://jmockups.s3.amazonaws.com/google-chrome.png) Note how the toolbar at the top of the page is not resized and the search field area is still centered based on the original width, not the new 980px width. In Firefox: ![Google in Firefox](https://jmockups.s3.amazonaws.com/google-firefox.png) Note how the search area is repositioned, but the toolbar, like Chrome, remains the full width of the document. Is there anything I can do so that the pages are correctly resized to 980px across all sites and all browsers?
Inconsistent and unexpected behavior with CSS max-width property across browsers
CC BY-SA 2.5
null
2011-03-08T22:49:28.490
2015-12-10T23:05:17.823
2017-02-08T14:31:43.883
-1
156,835
[ "css" ]
5,239,426
1
5,239,779
null
0
647
I have [asked](https://stackoverflow.com/questions/5099881/image-inside-nsscrollview-drawing-on-top-of-other-views) (and answered) a very similar question before. That question was able to be solved because I knew the `dirtyRect`, and thus, knew where I should draw the image. Now, I am seeing the same behavior with an subclassed `NSButtonCell`: ![enter image description here](https://i.stack.imgur.com/qR1rJ.png) In my subclass, I am simply overriding the `drawImage:withFrame:inView` method to add a shadow. ``` - (void)drawImage:(NSImage *)image withFrame:(NSRect)frame inView:(NSView *)controlView { NSGraphicsContext *ctx = [NSGraphicsContext currentContext]; [ctx saveGraphicsState]; // Rounded Rect NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:frame cornerRadius:kDefaultCornerRadius]; NSBezierPath *shadowPath = [NSBezierPath bezierPathWithRoundedRect:NSInsetRect(frame, 0.5, 0.5) cornerRadius:kDefaultCornerRadius]; // prevents the baground showing through the image corner // Shadow NSColor *shadowColor = [UAColor colorWithCalibratedWhite:0 alpha:0.8]; [NSShadow setShadowWithColor:shadowColor blurRadius:3.0 offset:NSMakeSize(0, -1)]; [[NSColor colorWithCalibratedWhite:0.635 alpha:1.0] set]; [shadowPath fill]; [NSShadow clearShadow]; // Background Gradient in case image is nil NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:[UAColor grayColor] endingColor:[UAColor lightGrayColor]]; [gradient drawInBezierPath:shadowPath angle:90.0]; [gradient release]; // Image if (image) { [path setClip]; [image drawInRect:frame fromRect:CGRectZero operation:NSCompositeSourceAtop fraction:1.0]; } [ctx restoreGraphicsState]; ``` } It seems all pretty standard, but the image is still drawing outside of the containing scrollview bounds. How can I avoid this?
Prevent NSButtonCell image from drawing outside of its containing NSScrollView
CC BY-SA 2.5
0
2011-03-08T22:59:49.650
2011-03-08T23:48:56.080
2017-05-23T12:07:02.087
-1
69,634
[ "cocoa", "core-graphics", "nsimage", "nsscrollview", "nsbuttoncell" ]
5,239,689
1
5,239,756
null
6
31,217
I am trying to read specific data from a file into two 2D arrays. The first line of data defines the size of each array so when I fill the first Array i need to skip that line. After skipping the first line, the first array fills with data from the file until the 7th line in the file. The second array is filled with the rest of the data from the file. Here's a labeled image of my data file: ![enter image description here](https://i.stack.imgur.com/CSU6v.png) and here's my (flawed) code so far: ``` #include <fstream> #include <iostream> using namespace std; int main() { ifstream inFile; int FC_Row, FC_Col, EconRow, EconCol, seat; inFile.open("Airplane.txt"); inFile >> FC_Row >> FC_Col >> EconRow >> EconCol; int firstClass[FC_Row][FC_Col]; int economyClass[EconRow][EconCol]; // thanks junjanes for (int a = 0; a < FC_Row; a++) for (int b = 0; b < FC_Col; b++) inFile >> firstClass[a][b] ; for (int c = 0; c < EconRow; c++) for (int d = 0; d < EconCol; d++) inFile >> economyClass[c][d] ; system("PAUSE"); return EXIT_SUCCESS; } ``` Thanks for the input everyone.
Reading data from file into array
CC BY-SA 2.5
0
2011-03-08T23:37:40.110
2012-09-26T02:18:26.893
2012-09-26T02:18:26.893
119,549
538,293
[ "c++" ]
5,239,758
1
null
null
258
131,652
Meet Fred. He's a table: ![One cell has more content and is wider, the other has less content and is narrower](https://i.stack.imgur.com/twAeu.png) ``` <table border="1" style="width: 100%;"> <tr> <td>This cells has more content</td> <td>Less content here</td> </tr> </table> ``` Fred's apartment has a bizarre habit of changing size, so he's learned to hide some of his content so as not to push all the other units over and shove Mrs. Whitford's living room off into oblivion: ![The cells are now the same size, but only one has its content truncated, and it looks like if the other cell gave if some whitespace, they could both fit.](https://i.stack.imgur.com/lY0xI.png) ``` <table border="1" style="width: 100%; white-space: nowrap; table-layout: fixed;"> <tr> <td style="overflow: hidden; text-overflow: ellipsis">This cells has more content</td> <td style="overflow: hidden; text-overflow: ellipsis">Less content here</td> </tr> </table> ``` This works, but Fred has a nagging feeling that if his right cell (which he's nicknamed Celldito) gave up a little space, his left cell wouldn't be truncated quite as much of the time. Can you save his sanity? --- In summary: How can a table's cells overflow evenly, and only when they've all given up all their whitespace?
How can I truncate table cells, but fit as much as content possible?
CC BY-SA 4.0
0
2011-03-08T23:46:16.943
2022-10-01T19:24:54.937
2021-03-11T14:51:03.507
2,756,409
84,745
[ "html", "css", "html-table", "overflow" ]
5,239,798
1
5,239,861
null
17
9,019
According to this [MSDN page](http://msdn.microsoft.com/en-us/library/system.windows.forms.form.controlbox.aspx), if I were using Window, then I could disable the control box in the top left hand corner by setting it to false. Like this: `this.ControlBox = false;` ![I want to disable this box in my own application](https://i.stack.imgur.com/KFgi9.png) But since I'm using RibbonWindow instead of Window, how would I disable the control box in this situation? [This question](https://stackoverflow.com/questions/2277021/wpf-how-do-i-disable-the-systemmenu-shortcut-altspace) is very related, but I'm looking to disable the SystemMenu all the time, not just to prevent the Alt+Space. This is because (I think) the action listener for the SystemMenu in the top left hand corner blocks a clickable UI element in my XAML. I should note that this is not a problem with Windows Server 2003, but when the application is opened in Windows 7, the SystemMenu/ControlBox interferes with the UI element in the top left corner. Additionally, I've found that interfering with the system menu usually results in the buttons in the top right hand corner of the application being deactivated, but I don't want that to happen. [link](http://winsharp93.wordpress.com/2009/07/21/wpf-hide-the-window-buttons-minimize-restore-and-close-and-the-icon-of-a-window/)`<Window x:Class=``<dc:RibbonWindow x:Class=`
How to remove the System Menu in WPF?
CC BY-SA 2.5
0
2011-03-08T23:51:15.137
2016-11-13T07:14:08.050
2017-05-23T10:29:40.617
-1
1,394,808
[ "c#", ".net", "wpf", "visual-studio", "xaml" ]
5,240,016
1
null
null
2
2,922
When I open the 2 files as left & right in FileMerge, I can see the things like the following screenshot. ![Image Uploaded](https://i.stack.imgur.com/DfIOd.png) As you can see, it doesn't show contents of the right file. Before I saw this error, I did these things : Picked some difference things and chose "Choose left" and then Merged the two files. After I did the things, I could see the error. I want to know why and resolution. Thanks.
xCode FileMerge - "Line ending differ"
CC BY-SA 2.5
null
2011-03-09T00:23:39.607
2011-03-09T00:28:06.777
2011-03-09T00:28:06.777
528,724
650,707
[ "xcode", "filemerge" ]
5,240,117
1
5,240,137
null
0
38
![Why am I getting "Permission denied"?](https://i.stack.imgur.com/TQaa8.png) Why am I getting "Permission denied"?
Unable to install derivitive of sqlite
CC BY-SA 2.5
null
2011-03-09T00:40:12.597
2011-03-09T00:42:41.437
null
null
1,231,786
[ "osx-snow-leopard" ]
5,240,260
1
5,241,375
null
0
151
I'm trying to implement an interface to flip the boolean status of line items I'm stuck on the right way to update the underlying rows when working with a rowset that is an aggreate. ``` declare @item table( id int not null primary key, amount money not null, is_paid bit not null, client varchar(10) not null) insert into @item values (1, 9.50, 0, 'Client A'), (2, 11.50, 0, 'Client A'), (3, 20.00, 1, 'Client B') ``` ``` select sum(amount) as total_amount, is_paid, client from @item group by is_paid, client ``` ![enter image description here](https://i.stack.imgur.com/DjJFg.png) Now say the above results were in a grid with a "Pay" button in if is_paid=0. ![enter image description here](https://i.stack.imgur.com/EHWu1.png) A row maps to the IDs of one or more rows to be updated as a result of clicking "Pay". My first thought was to update like this: ``` update @item set is_paid=1 where client='Client A' ``` But that falls apart (correct me if i'm wrong) the minute an additional row for "Client A" is inserted in between the time the interface is displayed and the time the user presses "Pay". QUESTION: Since this seems to be a rather simple scenario, what is the typical way to handle it? The only thing I can think of so far is to move the aggregation/grouping to application logic.
How to get at the constituent rows of aggregate/group-by query?
CC BY-SA 2.5
0
2011-03-09T01:02:47.933
2011-03-09T21:29:28.193
2011-03-09T01:08:18.363
398,546
398,546
[ "c#", "sql-server", "tsql", "group-by" ]
5,240,329
1
5,240,534
null
4
800
Apple frequently uses a left arrow icon in the their navigation controller "back" button, rather than the word "back" or other text: ![enter image description here](https://i.stack.imgur.com/CiGJb.png) It doesn't seem possible to assign an image to this special button with the standard SDK. Am I missing something obvious? If not, what's the most effective way of achieving this? (Can it be done without Photoshopping the whole button in multiple states?) Thanks.
Best way to get a "back" nav button with the arrow icon in it?
CC BY-SA 2.5
0
2011-03-09T01:13:42.910
2011-03-09T02:00:23.097
null
null
73,297
[ "iphone", "uinavigationcontroller", "uibarbuttonitem" ]
5,240,426
1
5,241,340
null
2
2,039
I'm writing a Windows version of my Mac app (C# Winforms) and would like some advice on what design pattern to use. My Mac app uses an MVC pattern with Core Data for storage. This is a simplified diagram of the models and relationships: ![model diagram](https://i.stack.imgur.com/6tS7D.png) The desktop app collects logs on a background thread and periodically uploads them to my web app. The database is used to store both the user's account information and logs, and the app has a 3 views to display (and collect) the user's data. I've done some reading and it seems that MVP is the recommended design pattern for WinForms apps, but I'm not sure how to proceed from here. I think that my app is simple enough to write without using an external framework like MVC# but as I have never made a WinForms app before I am only speculating. Can someone recommend the best way to go about this?
Advice on MVC pattern for WinForms app
CC BY-SA 2.5
null
2011-03-09T01:35:26.397
2011-03-12T04:33:01.020
2011-03-09T01:50:01.987
134,360
519,559
[ "c#", "winforms", "model-view-controller", "mvp" ]
5,240,497
1
null
null
0
37
Why will this error not go away? Anybody know? It says build successful, but this line remains, even after closing. ![enter image description here](https://i.stack.imgur.com/STv13.png)
Error will not go away, but not even anything on the line
CC BY-SA 2.5
null
2011-03-09T01:50:45.850
2011-03-09T02:11:20.390
null
null
561,395
[ "objective-c", "xcode" ]