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
6,487,611
1
6,499,604
null
9
1,883
As you may know, you can make your own file input control using the (hacky) approach of positioning the file input over your custom button and using `opacity: 0` on the file input itself. The image below shows the intended design with the file input absolutely positioned over the browse button. ![Example](https://i.stack.imgur.com/84XRq.png) As you can see, the faux browse button is much larger than the one the browser (Firefox 4) has drawn. If I increase the width of the input, it seems to reach a limit where it won't increase anymore. [Here is a jsFiddle to play with](http://jsfiddle.net/rH5SY/), demonstrating the problem. The browse button should be the same size as the faux one. Is there a way to pull this off, or I use Flash or make the button smaller?
Is there a way to make the native `browse` button on a file input larger cross browser?
CC BY-SA 3.0
null
2011-06-27T00:09:40.363
2011-06-27T22:19:44.600
null
null
31,671
[ "css", "file-io" ]
6,487,678
1
6,487,696
null
4
2,630
I'm having a problem with floating divs and IE7. For example, the following HTML code: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns='http://www.w3.org/1999/xhtml' lang='en' xml:lang='en'> <head> <title>IE Float Test</title> <style> .container { width: 200px; background: #ddd; overflow: hidden; } .item { float: left; padding: 5px; background: #eee; margin: 5px; } </style> </head> <body> <div class="container"> <div class="item">This is a item</div> <div class="item">This is another item</div> <div class="item">Last item</div> </div> </body> </html> ``` Give's the following in chrome (plus other major browsers): ![Chrome Result](https://i.stack.imgur.com/8cOav.png) But, the following in IE7: ![IE Result](https://i.stack.imgur.com/NfyCa.png) How do I get IE7 to move the item div to the next vertical position if it is too wide? Many thanks, John.
IE float div wrapping
CC BY-SA 3.0
null
2011-06-27T00:33:09.390
2012-06-11T13:55:18.777
2012-06-11T13:55:18.777
44,390
335,875
[ "css", "html", "internet-explorer-7", "css-float" ]
6,487,725
1
6,488,602
null
6
3,011
Expression blend enables you to import 3d models. I want to animate a 3d object with code. I just can't seem to figure out what are the property values that I have to modify in order to make an object rotate. Let me show you what I mean: ![enter image description here](https://i.stack.imgur.com/556BS.png) so if I want to rotate this object I could use the camera orbit tool ![enter image description here](https://i.stack.imgur.com/fu9nq.png) and If I use it I can end up with something like: ![enter image description here](https://i.stack.imgur.com/2XI8X.png) I know I can create a storyboard and create the animation by modifying the object. I need to rotate the object along the x axis with a slider. If I modify just one value it will rotate in a weird way I actually have to change several properties if I wish to do so. For example when I am rotating the object along the x-axis with the camera orbit tool I can see that all these ![enter image description here](https://i.stack.imgur.com/RNynU.png) properties are changing. I need to figure out what is the algorithm being used to rotate the object.
rotate cammera around center of object wpf
CC BY-SA 3.0
0
2011-06-27T00:48:42.617
2011-06-27T07:19:40.600
null
null
637,142
[ "c#", "wpf", "xaml", "vector", "3d" ]
6,488,131
1
6,488,465
null
7
5,785
I've enabled 4x MSAA on my iPad OpenGL ES 2.0 app using the example on Apple's website. On the simulator this works well and the image is nice and smooth however on the device there are colored artifacts on the edges where it should be antialiased. This exists on the iPad/iPad2 and iPhone4 but not in the simulator. I've attached a picture below of what the artifact looks like. Anyone know what this could be? ![Example](https://i.stack.imgur.com/CmuxX.png)
Artifacts when enabling 4x MSAA anti-aliasing on iPad / iOS
CC BY-SA 3.0
0
2011-06-27T02:38:37.000
2012-02-29T13:20:22.603
2011-06-27T03:13:47.687
44,729
389,108
[ "ios", "opengl-es", "antialiasing", "msaa" ]
6,488,173
1
null
null
0
239
i am currently trying to create a fish pond with fishes in it, i have parts of these fishes which i hope i can join them together to create a animation of a fish and be able to control it easily, as i will have to implement some AI on the fish, such as moving to eat a food etc. i am very new to flash and have no idea how can i go about doing this, how can i combine the images to form a fish and then be able to control the whole fish and have it move naturally like a fish without much knowledge of AS3? ![the fishes part](https://i.stack.imgur.com/QZnaH.png)
creating animation using pictures of something
CC BY-SA 3.0
null
2011-06-27T02:52:16.770
2011-06-27T18:23:36.177
null
null
267,738
[ "flash", "actionscript-3", "animation" ]
6,488,194
1
6,488,212
null
3
3,435
I'm new to Visual Studio 2010 and MySQL. I'm creating a form where I can Add the Employees. However, when I click the Add Button I got an error stating "Input string was not in a correct format." This is the Screen shots: ![enter image description here](https://i.stack.imgur.com/DVCQJ.png) ![enter image description here](https://i.stack.imgur.com/syh4r.png) Code: ``` private void button_adduser_Click(object sender, EventArgs e) { string MyConString = "SERVER=localhost;" + "DATABASE=timekeeping;" + "UID=root;" + "PASSWORD=admin;"; MySqlConnection connection = new MySqlConnection(MyConString); MySqlCommand command = connection.CreateCommand(); command.Connection = connection; using (MySqlConnection conn = new MySqlConnection(MyConString)) { connection.Open(); using (MySqlCommand com = connection.CreateCommand()) { command.CommandText = "insert into users(fname, mname, lname, position, contactnumber, emailadd, birthday, username, password) values(@fname, @mname, @lname, @position, @contactnumber, @emailadd, @birthday, @username, @password)"; command.Parameters.Add(new MySqlParameter("@fname", SqlDbType.VarChar)); command.Parameters.Add(new MySqlParameter("@mname", SqlDbType.VarChar)); command.Parameters.Add(new MySqlParameter("@lname", SqlDbType.VarChar)); command.Parameters.Add(new MySqlParameter("@position", SqlDbType.VarChar)); command.Parameters.Add(new MySqlParameter("@contactnumber", SqlDbType.VarChar)); command.Parameters.Add(new MySqlParameter("@emailadd", SqlDbType.VarChar)); command.Parameters.Add(new MySqlParameter("@birthday", SqlDbType.DateTime)); command.Parameters.Add(new MySqlParameter("@username", SqlDbType.VarChar)); command.Parameters.Add(new MySqlParameter("@password", SqlDbType.VarChar)); command.Parameters["@fname"].Value = addfname.Text; command.Parameters["@mname"].Value = addmname.Text; command.Parameters["@lname"].Value = addlname.Text; command.Parameters["@position"].Value = addposition.Text; command.Parameters["@contactnumber"].Value = addcontact.Text; command.Parameters["@emailadd"].Value = addemail.Text; command.Parameters["@birthday"].Value = addbday.Text; command.Parameters["@username"].Value = addusername.Text; command.Parameters["@password"].Value = addpassword.Text; command.ExecuteNonQuery(); } } } ```
Input string was not in a correct format
CC BY-SA 3.0
null
2011-06-27T02:59:22.053
2011-06-27T03:03:35.323
null
null
516,160
[ "c#", "mysql", "visual-studio-2010", "string" ]
6,488,468
1
null
null
1
432
![the layout](https://i.stack.imgur.com/xS8pW.jpg) Hello guys, i want to ask how to make a layout like this? how to put the 3 buttons on the bottom, and the form is scrollable? if i scroll the form, those 3 buttons still on their position (only the form will scroll) thanks
How to make layout like this on Android?
CC BY-SA 3.0
0
2011-06-27T04:00:42.613
2011-06-27T05:10:05.607
null
null
785,452
[ "android", "android-layout" ]
6,488,516
1
6,489,186
null
0
184
I tried all the jQuery slider plugins out there. But none of them has the functionality what I expect. Check this image. ![enter image description here](https://i.stack.imgur.com/3L92L.jpg) I need a slider like this. I mean the middle image have to be zoomed when slide. Please suggest a good jQuery plugin.
Please suggest a jQuery slider plugin which one has this functionality
CC BY-SA 3.0
null
2011-06-27T04:12:46.217
2012-05-10T09:58:06.377
2012-05-10T09:58:06.377
694,652
736,037
[ "javascript", "jquery", "html", "jquery-plugins", "slider" ]
6,488,507
1
6,586,374
null
8
18,073
When I installed .NET Reflector for the first time, it was as easy as unzipping it, dragging the folder to the appropriate place on my disk, and launching it. From within the UI, I was able to configure things like Windows Explorer and Visual Studio integration. This was all very nice, and I used it extensively. Now, I can't use any of it anymore because Red Gate has decided not just to begin charging for versions of its software, but to lock out all versions. My personal feelings about that have motivated me not to upgrade to the latest version, and in fact, not to use any Red Gate software at all. Fortunately, [there are lots](https://stackoverflow.com/questions/2425973/open-source-alternatives-to-reflector) of great [free and/or open source alternatives](https://stackoverflow.com/questions/2646707/something-better-than-net-reflector); I'll be picking one of those. The problem is that . I need to be able to the software so that I can ask it to remove itself from Explorer and Visual Studio before I go blindly deleting the folder from my disk. because I'm not willing to pay for it or download a new version. Instead, I get this unhelpful and now-inaccurate message:      ![This is the last free version of .NET Reflector which will expire May 30. Do you want to download a free 14 day trial of version 7?](https://i.stack.imgur.com/WhDwQ.png) Yes, I could probably delete the executable, and then go hacking around in the Registry myself to remove the shell integration and all of the associations. But I'd prefer not to do that. The software should provide me with a way to remove it, like all other software, especially now that it's no longer free. So what is that way? Downloading the trial version just so that I can remove it is not a reasonable option.
How do I completely uninstall Red Gate's .NET Reflector?
CC BY-SA 3.0
0
2011-06-27T04:10:46.013
2017-10-16T10:30:56.167
2017-05-23T12:17:23.060
-1
366,904
[ ".net", "windows", "reflector", ".net-reflector" ]
6,488,552
1
6,488,603
null
3
457
I have a JScrollPane with a JPanel that implements Scrollable as its viewport view. When I set ScrollableTracksViewportHeight and ScrollableTracksViewportWidth to false, my panel stays at its preferred size. Good. The problem is that I can't figure out who owns the space around the scrollable panel. I feel like I've tried changing the background of every component and dialog, and nothing seems to do it. How can I change the ugly grey to a fun color like neon yellow? Here's a screenshot of what I'm talking about: ![](https://i.stack.imgur.com/OX5yY.png) Here's what I want: ![enter image description here](https://i.stack.imgur.com/eAAEl.png) And here's the code to duplicate the first image: ``` package components; import java.awt.*; import javax.swing.*; @SuppressWarnings("serial") public class DialogWithScrollPane extends JFrame { ScrollablePanel scrollablePanel; public DialogWithScrollPane() { super(); setResizable(true); Container pane = getContentPane(); scrollablePanel = new ScrollablePanel(); final JScrollPane scrollPane = new JScrollPane(); scrollPane.setPreferredSize(new Dimension(300,300)); scrollPane.setViewportView(scrollablePanel); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); pane.add(scrollPane); setMinimumSize(new Dimension(300, 300)); setVisible(true); } class ScrollablePanel extends JPanel implements Scrollable { public ScrollablePanel() { super(); setBackground(Color.red); setPreferredSize(new Dimension(200, 100)); } public Dimension getPreferredScrollableViewportSize() { return getPreferredSize(); } public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { return 0; } public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { return 0; } public boolean getScrollableTracksViewportHeight() { return false; } public boolean getScrollableTracksViewportWidth() { return false; } } public static void main(String[] args) { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { new DialogWithScrollPane(); } }); } } ```
Who owns the color of the edges of a Java Swing scrollable viewport?
CC BY-SA 3.0
null
2011-06-27T04:20:47.207
2011-06-27T04:33:55.397
null
null
402,893
[ "java", "swing", "awt", "jscrollpane", "scrollable" ]
6,488,742
1
6,488,785
null
0
6,187
I'm making a simple one-form Invoice bill printing, below is the screenshot to illustrate it. ![enter image description here](https://i.stack.imgur.com/5rXrQ.jpg) I want to generate a report from the existing form after entering the data, simply static without database. Only the combo-box values are fetched from the database. How can I generate that report after clicking the print button. The resultant report should not have combo-box, it should simply have a label instead of it.
Invoice Print in vb.net or c#
CC BY-SA 3.0
0
2011-06-27T04:58:34.427
2011-06-27T06:24:51.843
2011-06-27T05:13:52.330
330,697
807,969
[ "c#", "vb.net", "printing", "invoice" ]
6,488,779
1
6,488,825
null
6
2,613
I've added custom background image to my UITableView and it shows fine. Than, i removed any background color from the cells. Now i expect to see only cells' text on top of table's background image, however i see strange behaviour. Cells take pattern color of table's background image, so that i see waves like in the picture: ![enter image description here](https://i.stack.imgur.com/1zQ7v.png) The background image shell look like this: ![enter image description here](https://i.stack.imgur.com/LxGzi.png) *pay attention to white circles that disappear under the cells! My code is as follws: in viewDidLoad i set the background image of table view: ``` self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"general_bg.png"]]; ``` For each cell i remove any background color like this: ``` UIView *bckView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease]; bckView.backgroundColor = [UIColor clearColor]; cell.backgroundView = bckView; cell.backgoundColor = [UIColor clearColor]; cell.contentView.backgroundColor = [UIColor clearColor]; UILabel *textLabel = [[UILabel alloc] initWithFrame:CGRectMake(x,y,x1,y1)]; textLabel.backgroundColor = [UIColor clearColor]; [cell.contentView addSubview:textLabel]; ``` -
UITableView cell takes pattern color of UITableView's background image
CC BY-SA 3.0
0
2011-06-27T05:05:49.877
2013-08-07T13:58:33.643
null
null
611,206
[ "iphone", "objective-c", "xcode", "uitableview" ]
6,488,836
1
6,488,893
null
1
790
![enter image description here](https://i.stack.imgur.com/E8PVv.png) I tried but the side round shape not shaped properly with [9-patch](http://developer.android.com/guide/developing/tools/draw9patch.html).
can any body set this image with 9-patch in android
CC BY-SA 3.0
null
2011-06-27T05:16:19.273
2012-06-04T08:34:41.000
2011-06-27T05:25:33.093
226,958
785,775
[ "android" ]
6,488,951
1
6,489,123
null
6
4,887
I am creating a messaging app for iPhone. I want the user to have the capability of entering a newline while pressing return. But I am having trouble putting a UITextview inside the toolbar item. I have seen the same with UITextView. When return key is pressed i want to get the new line in UITextField.Is this possible.![enter image description here](https://i.stack.imgur.com/pgxY0.png) Please help Thanks in advance.
Adding a UITextview as a toolbar item
CC BY-SA 3.0
0
2011-06-27T05:32:40.557
2011-06-27T06:08:02.487
2011-06-27T06:08:02.487
795,644
795,644
[ "iphone", "objective-c", "uitextfield", "uitextview" ]
6,488,950
1
6,488,975
null
18
15,717
I really like the look of two-tone buttons and fonts. I am thinking of when the top half of the font is one color and the bottom half is a variation on the same color. For an example see most of the buttons on an iPhone or the logo here [http://ming.ly](http://ming.ly). ![mingly](https://i.stack.imgur.com/FZ4cy.jpg) Is it possible to recreate this effect in CSS? Alternately is there a free tool I can use to generate fonts that look like this?
Two-tone font coloring in CSS?
CC BY-SA 3.0
0
2011-06-27T05:32:33.270
2013-03-03T00:41:11.333
2013-03-03T00:41:11.333
31,671
329,700
[ "css", "fonts", "colors" ]
6,488,989
1
6,489,638
null
0
364
I have an option to resize my portlet. For fire fox its working fine but for IE8 its not working. ![enter image description here](https://i.stack.imgur.com/52TYs.png) CSS Code: ``` .ui-resizable { position: relative; } .ui-resizable-handle { background: transparent url() no-repeat 50% 50%; display: none; font-size: 0.1px; position: absolute; } .ui-resizable .ui-resizable-handle { display: block; } .js .ui-resizable-disabled .ui-resizable-handle { display: none; } .js .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n, .ui-resizable-s { background-image: url(../images/application/handle_horizontal.png); height: 14px; left: 0; right: 0; } .ui-resizable-n { cursor: n-resize; top: 0; } .ui-resizable-s { bottom: 0; cursor: s-resize; } .ui-resizable-e, .ui-resizable-w { background-image: url(../images/application/handle_vertical.png); background-position: center center; bottom: 0; top: 0; width: 14px; } .ui-resizable-e { cursor: e-resize; right: 0; } .ui-resizable-w { cursor: w-resize; left: 0; } .ui-resizable-ne, .ui-resizable-nw { height: 14px; top: 0; width: 14px; } .ui-resizable-ne { background-image: url(../images/application/handle_ne.png); cursor: ne-resize; right: 0; } .ui-resizable-nw { background-image: url(../images/application/handle_nw.png); cursor: nw-resize; left: 0; } .ui-resizable-se, .ui-resizable-sw { bottom: 0; height: 14px; width: 14px; } .ui-resizable-se { background-image: url(../images/application/handle_se.png); cursor: se-resize; right: 0; } .ui-resizable-sw { background-image: url(../images/application/handle_sw.png); cursor: sw-resize; left: 0; } ``` My question is, Is there any css based solution to activate the resizable option for IE ?
Resizable option is not working in IE 8 but working fine in firefox
CC BY-SA 3.0
null
2011-06-27T05:38:16.760
2011-06-27T07:07:11.893
null
null
632,074
[ "css" ]
6,489,182
1
6,489,270
null
0
791
I am developing an IPhone cocos2d app with a scene like the the one depicted in the following image (I hope you can see that): ![image](https://i.stack.imgur.com/BPHwx.png) On the right there is a vertically scrollable menu contained in a separated layer (menulayer) which is itself contained in the main scene's layer. On the left there is a back button contained in the main scene's layer. I am trying to exploit the UIScrollView as described in [this link](http://www.xcombinator.com/2010/09/08/a-paging-uiscrollview-in-cocos2d-with-previews/comment-page-1/#comment-35850). However, despite I can see the UIScrollView working I am experimenting some problems: 1) while the menulayer actually scrolls it seems the menu does not. In fact when a press the menu item 8 the menu item 4 is selected, when I press the menu item 7 the menu item 3 is selected and so on. 2) the back button only works when the menulayer is at its first position Do you have any idea of how shall I do to fix it?
Cocos2d and UIScrollView
CC BY-SA 3.0
null
2011-06-27T06:07:46.893
2011-06-27T07:26:42.430
2011-06-27T07:26:42.430
541,106
541,106
[ "iphone", "ios", "cocos2d-iphone" ]
6,489,327
1
6,489,805
null
0
850
the following code for upload image ``` <a id="addImage" href="javascript:;">Add Image</a> ``` ``` $().ready(function () { var counter = 0; $(function () { var btnUpload = $('#addImage'); new AjaxUpload(btnUpload, { action: 'saveupload.aspx', name: 'uploadimage', dataType: 'json', onSubmit: function (file, ext) { $("#loading").show(); }, onComplete: function (file, response) { alert(response); var uploadedfile = "UserData/" + file; $("#uploadImageWrapper").append(" <div class='imageContainer offset' id='current" + counter + "'> <img height='65px' width='65px' src='" + uploadedfile + "' alt='" + uploadedfile + "'/></div>"); $('#current' + counter).fadeIn('slow', function () { $("#loading").hide(); $("#message").show(); $("#message").html("Added successfully!"); $("#message").fadeOut(3000); counter++; }); } }); }); }); ``` ``` protected void Page_Load(object sender, EventArgs e) { HttpFileCollection uploadedFiles = Request.Files; int i = 0; string width = "0"; string height = "0"; if (uploadedFiles.Count > 0) { while (!(i == uploadedFiles.Count)) { HttpPostedFile userPostedFile = uploadedFiles[i]; if (userPostedFile.ContentLength > 0) { string filename = userPostedFile.FileName.Substring(userPostedFile.FileName.LastIndexOf("\\") + 1); userPostedFile.SaveAs(Path.Combine(Server.MapPath("UserData"), filename)); Bitmap img = new Bitmap(Path.Combine(Server.MapPath("UserData"), filename)); width = img.Width.ToString(); height = img.Height.ToString(); } i += 1; } } //I would like to return Uploaded image Height and Width Response.Write(@"{Width:" + width + ", Height:" + height + "}"); } ``` and the return is i have display in Alert message. ![enter image description here](https://i.stack.imgur.com/ifsCz.png) I am not able to get response.Width and response.Height.
How to parse JsonResult with Jquery AjaxUpload
CC BY-SA 3.0
0
2011-06-27T06:31:20.507
2011-06-27T11:52:27.377
null
null
735,598
[ "asp.net", "json", "jquery" ]
6,489,632
1
null
null
1
537
I have written a java program to take screenshot using Robot class and copy it to clipboard using a Transferable object. Now, if I paste it in MS 2007 applications, it appears to be blurry. Same image if pasted to paint and recopied and pasted to MS 2007 apps is clear image .Why is this happening? That image is an instance of `BufferedImage`. How to convert the image format before transferring to clipboard. The DPI for individual pastes The image that is pasted from paint has 96dpi and image which is from clipboard (direct from my program) is 72dpi. The screen shot is somehow in 72dpi. And the resolution of the image is small: 300 X 300 px. After pasting in MS Word the image gets resized to some 110% and is blurry. If I reset it to 100%, the image is still blurry. Here is the image ![Screen short of the diff images](https://i.stack.imgur.com/sQm0F.jpg)
Java Screen capture and paste in MS 2007 apps problem
CC BY-SA 3.0
null
2011-06-27T07:06:29.407
2012-03-18T14:00:40.857
2011-07-13T12:52:20.190
820,407
816,889
[ "java", "ms-word", "screenshot" ]
6,489,941
1
6,489,967
null
4
22,493
I am totally not a VBScript developer. But as it usually happens I have to write a small script to check something. It opens Excel, writes something to it and closes it. But that's not the point. The point is that I cannot manage to write code for error handling. This script: ``` Sub Work() On Error GoTo ErrMyErrorHandler Dim objExcelApp Dim wb Dim ws Set objExcelApp = CreateObject("Excel.Application") Set wb = objExcelApp.Workbooks.Add(True) Set ws = wb.Sheets(1) ws.Cells(1,1).Value = "Hello" ws.Cells(1,2).Value = "World" wb.SaveAs("c:\test.xls") objExcelApp.Quit() Exit Sub ErrMyErrorHandler: MsgBox Err.Description, vbExclamation + vbOKCancel, "Error: " & CStr(Err.Number) End Sub Work() ``` gives this error: ![error](https://i.stack.imgur.com/EJq4Q.png) Line 2 is the line with the `On Error` statement. What am I doing wrong? Thank you.
Error in On Error statement
CC BY-SA 3.0
null
2011-06-27T07:45:12.740
2017-11-17T17:41:20.227
null
null
135,749
[ "vbscript" ]
6,489,956
1
6,490,944
null
0
1,781
I have a source filter which is pushing "h264" stream. I want to write this stream into a MPEG4 (or may be AVI ) container. ``` SourceFilter[output = H264] ---> X--->Y ....--->FileWriter[record.mpeg4] ``` How can i do this with DirectShow? (also open the alternative solutions which does not use DirectShow) Best Wishes > P.S: By the way, what is the best container format for H264 streams? Well, i just try MPEG-4 Mux (www.gdcl.co.uk/mpeg4). My rtsp source filter and MUX can not connected. Intelligent Connect try to put FFdshow decoder between source filter and muxer. It does not give error at graphEdt but the recorded stream is "O" BYTE.No record. I am missing to do something...But what is it? ![enter image description here](https://i.stack.imgur.com/GCAms.png) ![enter image description here](https://i.stack.imgur.com/PlVOP.png)
Writing h264 stream into Mpeg Container using directshow
CC BY-SA 3.0
null
2011-06-27T07:47:10.290
2011-06-27T17:00:14.307
2011-06-27T17:00:14.307
778,894
778,894
[ "video", "directshow", "video-processing" ]
6,490,037
1
6,549,502
null
1
1,392
I am trying to add geom_text labels to my mosaic plot below: ![Mosaic Plot](https://i.stack.imgur.com/Thuzm.png) that I generated using ggplot2 with the code below: ``` tsc.p1 <- tsc.p + geom_rect(colour = I("grey")) + facet_grid(helmet~.) + geom_text(aes(x = c(9.0, 22.0, 33.0, 46.0, 72.0, 98.0), y = 125, label = c("C", "DS", "S", "ST", "Std", "T")), size = 3) + scale_fill_brewer(palette = "Greys") + xlab("Percentage of Sample") + ylab("Percentage Responded") + opts(title="Mosaic Plot of Helmet Type Use", legend.position="none") + scale_x_continuous(expand = c(0, 0)) + scale_y_continuous(expand = c(0, 125)) + ylim(0, 101) ``` I have two problems: - - I only want to add the six categories to the top of the plot. Is there a way to do this?
Geom_text on facet_gridded mosaic plot
CC BY-SA 3.0
null
2011-06-27T07:56:20.507
2011-07-01T14:46:15.347
null
null
623,775
[ "r", "ggplot2", "data-visualization" ]
6,490,057
1
null
null
1
1,010
I have a problem with OpenGL ES when drawing multiple small parts of a stroke with different point size, I am trying to simulate changing pen width according writing speed, the pen width is big when writing slow and small when writing fast. This is my code (I used GLPaint of Apple source code to study): ``` static GLfloat* vertexBuffer = NULL; static NSUInteger vertexMax = 64; NSUInteger vertexCount = 0, count, i; [EAGLContext setCurrentContext:context]; glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); // Convert locations from Points to Pixels CGFloat scale = self.contentScaleFactor; start.x *= scale; start.y *= scale; end.x *= scale; end.y *= scale; // Allocate vertex array buffer if(vertexBuffer == NULL) { vertexBuffer = malloc(vertexMax * 2 * sizeof(GLfloat)); } // Add points to the buffer so there are drawing points every X pixels count = MAX(ceilf(sqrtf((end.x - start.x) * (end.x - start.x) + (end.y - start.y) * (end.y - start.y)) / kBrushPixelStep), 1); for(i = 0; i < count; ++i) { if(vertexCount == vertexMax) { vertexMax = 2 * vertexMax; vertexBuffer = realloc(vertexBuffer, vertexMax * 2 * sizeof(GLfloat)); } vertexBuffer[2 * vertexCount + 0] = start.x + (end.x - start.x) * ((GLfloat)i / (GLfloat)count); vertexBuffer[2 * vertexCount + 1] = start.y + (end.y - start.y) * ((GLfloat)i / (GLfloat)count); vertexCount += 1; } if (vertexCount > 0) { GLfloat rate = ((GLfloat)vertexCount)/MAX_BETWEEN_POINTS; if (rate > 0.75) { rate = 0.75; } GLfloat distract = penWidth * rate/vertexCount; for (int i = 0; i < vertexCount; i++) { GLfloat * smallBuf = malloc(4 * sizeof(GLfloat)); smallBuf[0] = vertexBuffer[4*i + 0]; smallBuf[1] = vertexBuffer[4*i + 1]; smallBuf[2] = vertexBuffer[4*i + 2]; smallBuf[3] = vertexBuffer[4*i + 3]; if (lastPenWidth - distract < penWidth*0.75) { lastPenWidth = penWidth*0.75; } else { lastPenWidth = lastPenWidth - distract; } glPointSize(lastPenWidth); // Render the vertex array glVertexPointer(2, GL_FLOAT, 0, smallBuf); glDrawArrays(GL_POINTS, 0, 2); free(smallBuf); } NSLog(@"Vertext count: %d --- Distract: %0.2f --- Rate: %0.2f", vertexCount, distract, rate); } else { glPointSize(penWidth); NSLog(@"Vertext count: %d", vertexCount); // Render the vertex array glVertexPointer(2, GL_FLOAT, 0, vertexBuffer); glDrawArrays(GL_POINTS, 0, vertexCount); } glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer); [context presentRenderbuffer:GL_RENDERBUFFER_OES]; ``` But I receive this result with many dots in the middle of the stroke. Do you have any ideas with this problem? ![enter image description here](https://i.stack.imgur.com/h4ekm.png) Thank you very much.
Changing pen width according writing speed
CC BY-SA 3.0
null
2011-06-27T07:58:28.617
2012-07-31T07:31:37.737
null
null
372,862
[ "iphone", "ipad", "opengl-es", "ios4" ]
6,490,246
1
6,490,271
null
3
237
here is my situation: ![enter image description here](https://i.stack.imgur.com/Wln5R.jpg) i dont know why it return automatically, this error just happened with few details page, others are good` ``` <iframe src="http://www.facebook.com/plugins/like.php?app_id=209985355712105&amp;href=http%3A%2F%2Fwww.example.com{0}&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe> ``` value {0} can be change depend on page url detail. for example when user clicked view detail and then the url will be: example.com/viewdetail/item1. then the value {0} will be change to: /viewdetail/item1
what's wrong with fb like button?
CC BY-SA 3.0
null
2011-06-27T08:21:03.353
2011-06-27T08:55:52.090
null
null
728,724
[ "c#", "jquery", "asp.net" ]
6,490,403
1
null
null
0
91
![enter image description here](https://i.stack.imgur.com/XG6dX.png) Hi all, this is a typical layout of one of apps. Now what I want on clicking of row of one of the view controllers(table view), I want to change the index of of the tab. Lets say I am in 3rd view, I want to move to the 1st view. I tried with navigation controller's `didShowViewController` delegate method. Seems its not working. Could you please suggest any other way to do this? Thanks.
app with tab bar and navigation bars
CC BY-SA 3.0
null
2011-06-27T08:41:22.783
2012-05-01T17:48:54.957
2012-05-01T17:48:54.957
453,912
719,118
[ "iphone", "tabs", "navigation" ]
6,490,424
1
6,490,534
null
4
7,868
I'm facing an irritating problem with WPF GroupBox, hope someone can help me out. Basically the problem is this: I have a listview inside a GroupBox, but no matter what I do I can't seem to be able to make it fill the GroupBox. Here is the basic code: ``` <GroupBox Grid.Row="2" Header="Field" Visibility="{Binding ElementName=radioUnbound, Path=IsChecked, Converter={StaticResource bool2vis}}" Margin="0" VerticalContentAlignment="Stretch"> <ListView ItemsSource="{Binding ElementName=nnf1, Path=UnboundFields}" x:Name="listUnbound" SelectionChanged="listSelectionChanged" VerticalAlignment="Stretch" > <ListView.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding name}" Margin="2"/> </DataTemplate> </ListView.ItemTemplate> </ListView> </GroupBox> ``` I tried encasing the list inside Grids, StackPanels, DockPanel, etc... but no matter what I try I always invariably end up with this: ![enter image description here](https://i.stack.imgur.com/dzk91.png)
WPF: get the content of a GroupBox to fill available space
CC BY-SA 3.0
null
2011-06-27T08:43:57.683
2011-06-27T08:54:39.883
null
null
300,741
[ "wpf", "layout", "groupbox" ]
6,490,432
1
null
null
0
854
![Table](https://i.stack.imgur.com/PE6In.png) above is the table and record i am using, in the below table i want to retrieve value 3 that is 11-20 column and row 11-20. could any one help me please. Thanks, Pradeep
i want to get the record where column name equals to row record
CC BY-SA 3.0
null
2011-06-27T08:45:10.100
2011-06-27T08:50:11.850
null
null
366,947
[ "sql", "sql-server-2005", "sql-server-2008" ]
6,490,687
1
6,490,739
null
0
129
I got this search "asyoutype" and the result is supose to show up with all the hits, now the problem is that it wont go over the "container" div that wrapps the search and menu. I tried different positions with no success, anybody got any ideas? let me know if i need to update with more info. this is my css for the asyoutype resultdiv ``` .searchResult { background: #fff; text-align: left; line-height: 1.5em; width: 265px; z-index: 10000; display: none; float: left; clear: both; box-shadow: 0 3px 5px #333; -moz-box-shadow: 0 3px 5px #333; -webkit-box-shadow: 0 3px 5px #333; position: absolute; right: 40px; top: 36px; } ``` this is the container header (html5) ``` header.main { -moz-border-bottom-colors: none; -moz-border-image: none; -moz-border-left-colors: none; -moz-border-right-colors: none; -moz-border-top-colors: none; background: -moz-linear-gradient(center top , #F4F4F4, #D1D1D1) repeat scroll 0 0 #E4E4E4; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-color: #C7C8C8; border-style: solid; border-width: 0 1px; margin: 0 0 22px; overflow: hidden; position: relative; } ``` ![enter image description here](https://i.stack.imgur.com/4W6uA.png)
how do i get this div to go over the other div
CC BY-SA 3.0
null
2011-06-27T09:08:12.067
2011-06-27T09:12:59.057
null
null
148,601
[ "html", "css" ]
6,491,003
1
null
null
2
3,310
How can I create a custom search within my android app layout? I am able to use the search dialog that appears at the top of the activity window but I would like something similar to the image here: ![custom searchview](https://i.stack.imgur.com/H8OV1.gif) [http://img5.imageshack.us/img5/1298/customsearch.gif](http://img5.imageshack.us/img5/1298/customsearch.gif) If sample codes are available, I will appreciate so much. Thank you. Sorry about my english.
creating a custom search in android (inserting a search widget in the layout)
CC BY-SA 3.0
null
2011-06-27T09:38:33.383
2011-12-01T01:52:55.723
2011-12-01T01:52:55.723
234,976
817,091
[ "android", "widget" ]
6,491,165
1
null
null
0
1,754
I am using `wp_list_comments` function to list the comments in comment.php in my theme. Please look at my design below. It is a little complex to style for me. I am using CSS to style the look. ![enter image description here](https://i.stack.imgur.com/HnL3s.jpg) In the comment lists, comment is the reply of the comment. How can I add lines connecting to comment as shown in the design? # My CSS /* CSS Document */ ``` #comments { clear: both; } #comments .navigation { padding: 0 0 18px 0; } h3#comments-title, h3#reply-title { color: #000; font-size: 20px; font-weight: bold; margin-bottom: 0; } h3#comments-title { padding: 24px 0; } .commentlist { list-style: none; margin: 0; } .commentlist li.comment { /*border-bottom: 1px solid #e7e7e7;*/ line-height: 24px; margin: 0 0 24px 0; /*padding: 0 0 0 56px;*/padding: 0 0 0 0px; position: relative; } .commentlist li:last-child { border-bottom: none; margin-bottom: 0; } #comments .comment-body ul, #comments .comment-body ol { margin-bottom: 18px; } #comments .comment-body p:last-child { margin-bottom: 6px; } #comments .comment-body blockquote p:last-child { margin-bottom: 24px; } .commentlist ol { list-style: decimal; } .commentlist .avatar { position: absolute; top: 4px; left: 0; } .comment-author { } .comment-author cite { color: #4F57FF; font-style: normal; font-size:16px; font-weight: bold; } .comment-author cite a{ color: #4F57FF; text-decoration:none;} .comment-author .says { font-style: italic; } .comment-meta { font-size: 12px; margin: 0 0 18px 0; margin: 0 0 5px 0; } .comment-meta a:link, .comment-meta a:visited { color: #545354; text-decoration: none; font-weight:bold; } .comment-meta a:active, .comment-meta a:hover { color: #ff4b33; } .commentlist .even { } .commentlist .bypostauthor { } .reply { font-size: 12px; padding: 0 0 0px 0; clear:both; } .reply a, a.comment-edit-link { color: #888; } .reply a:hover, a.comment-edit-link:hover { color: #ff4b33; } .commentlist .children { list-style: none; margin: 0; } .commentlist .children li { border: none; margin: 0; } .commentlist ul.children{ background: #fff url('images/cmt-thrd-L.gif') no-repeat 0px 0px; } .commentlist .depth-1 { background: #fff url('images/cmt-thrd-vline.gif') repeat-y -38px 0; float:left; } .commentlist li.depth-2, .commentlist li.depth-3, .commentlist li.depth-4, .commentlist li.depth-5 { background: #fff url('images/cmt-thrd-vline.gif') repeat-y -38px 0; } .commentlist li.depth-1{ border-left:0px solid #C1C5FE;} ``` I don't know how to apply the link arrow to comments and reply. So please suggest me. How to do this. Thanks
customize wp_list_comments design
CC BY-SA 4.0
0
2011-06-27T09:53:26.070
2020-08-05T21:00:24.400
2020-08-05T21:00:24.400
4,086,606
430,112
[ "php", "css", "wordpress" ]
6,491,266
1
6,530,415
null
25
17,813
I ran into some weird problem..I implemented a seekbar with custom thumb..and when I ran my app on HTC Desire, it all works fine..but, when I ran it on Samsung Galaxy, the thumb becomes clipped! Here are the screenshots.. Desire: ![Desire seekbar](https://i.stack.imgur.com/kyjEB.png) Samsung Galaxy: ![Galaxy seekbar](https://i.stack.imgur.com/gX6Pt.png) I would be grateful for any thoughts..tnx myprogress.xml: ``` <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"> <shape> <corners android:radius="10dp" /> <gradient android:startColor="@color/gray" android:centerColor="@color/gray" android:centerY="0.75" android:endColor="@color/gray" android:angle="270" /> </shape> </item> <item android:id="@android:id/secondaryProgress"> <clip> <shape> <corners android:radius="10dp" /> <gradient android:startColor="@color/white" android:centerColor="@color/white" android:centerY="0.75" android:endColor="@color/white" android:angle="270" /> </shape> </clip> </item> <item android:id="@android:id/progress"> <clip> <shape> <corners android:radius="10dp" /> <gradient android:startColor="#FFA500" android:centerColor="@color/yellow" android:centerY="0.75" android:endColor="@color/yellow" android:angle="270" /> </shape> </clip> </item> ``` style: ``` <style name="mySeekBar"> <item name="android:indeterminateOnly">false</item> <item name="android:progressDrawable">@drawable/myprogress</item> <item name="android:indeterminateDrawable">@android:drawable/progress_horizontal</item> <item name="android:minHeight">10dip</item> <item name="android:maxHeight">10dip</item> <item name="android:thumb">@drawable/thumb</item> <item name="android:thumbOffset">4dp</item> <item name="android:focusable">true</item> ``` seekbar xml: ``` <SeekBar android:id="@+id/player_seek_horizontal" android:layout_gravity="center_vertical" android:max="100" android:layout_marginLeft="50dp" android:layout_width="180dp" android:thumb="@drawable/thumb" android:layout_height="wrap_content" style="@style/mySeekBar" android:background="@drawable/background_transparent_rounded" android:paddingRight="4dp" android:paddingLeft="4dp"/> ```
Android seekbar clipped thumb
CC BY-SA 3.0
0
2011-06-27T10:02:23.040
2018-04-19T14:32:42.277
2016-05-07T13:41:51.320
1,880,339
395,629
[ "android", "seekbar", "clipped" ]
6,491,521
1
6,491,640
null
0
1,362
I have start and end rout latitude and longitudes. Along with this I have some other points which are in between the start and end point. So I want to create a path/route/pathway which shows all the points from start to end. I tried google but receive no such results which could help. like for two points, code is like this, ``` Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?saddr=20.344,34.34&daddr=20.5666,45.345"); startActivity(intent); ``` but I want the one for complete route which cover multiple points. like this ![enter image description here](https://i.stack.imgur.com/BgOiB.jpg)
How to add google map pathways in Android application?
CC BY-SA 3.0
0
2011-06-27T10:29:14.380
2011-06-27T12:36:40.303
2011-06-27T12:36:40.303
228,755
228,755
[ "android", "google-maps", "google-maps-api-3" ]
6,491,649
1
6,492,095
null
0
620
I use regular XmlHttlRequest, everything work fine except the unicode. How can i set that the query string will support unicode, (right now it return to c# '??????' when i pass unicode character (Hebrew)). I've tried to set the globalization setting to UTF-16 or Unicode in the web.config like this: But it still pass '????'. I attach pic of my code although its a XmlHttpRequest regular code like everyone know. Thank you! ![enter image description here](https://i.stack.imgur.com/3DjYM.png)
How can i set XMLHttpRequest to support Unicode when it pass data by QueryString?
CC BY-SA 3.0
null
2011-06-27T10:42:16.843
2011-06-27T11:23:51.663
null
null
665,783
[ "c#", "javascript", "asp.net", "ajax" ]
6,491,691
1
6,491,924
null
2
7,526
For now, i have: ``` <img style="float:right;" src="/path/to/image.png"> <p>lorem ipsum dolor</p> ``` Which nicely sets the image right and the text around it. Is it, however, possible to 'flow' text around the actual contents of an png image, ignoring the transparancy? It now looks like this: ![before](https://i.stack.imgur.com/4UZA7.png) I would like it to look like this: ## Possibilities i see: ``` 1) Manually add breaks ``` Almost impossible for dynamic content; ``` 2) Have php add breaks after a set number of characters ``` Very complex, and it would need to be determined for every image; ``` 3) Another way someone here knows about ``` Does anyone have any experience with situations like this? Thanks in advance!
flow text around a transparent png with css/jquery/anything
CC BY-SA 3.0
0
2011-06-27T10:46:23.680
2022-04-12T19:16:27.587
2022-04-12T19:16:27.587
4,294,399
775,265
[ "jquery", "css", "image", "transparency" ]
6,491,714
1
null
null
0
307
I have 2 div's of text on my website and in IE7 they aren't showing up. The div's are called #cboxlink and #cboxname In the attached image, you can see the top half of the picture is IE7 and the bottom half is Chrome to see what I mean. If you go to [http://www.directiongroup.com/#work-](http://www.directiongroup.com/#work-) (on the 'Our Work' part) and click a portfolio item - this is where it is. The portfolio is using jQuery jquery.colorbox.js Why would 2 simple bits of text not appear in IE? Where in my CSS or jQuery could this problem be? ![enter image description here](https://i.stack.imgur.com/pjHcN.gif) Would love some help as I don't really know much about jQuery, many thanks.
Text not showing in IE7
CC BY-SA 3.0
null
2011-06-27T10:48:43.557
2011-06-27T11:15:33.067
null
null
418,878
[ "jquery", "css", "colorbox" ]
6,491,857
1
6,492,948
null
2
880
As you can see in architecture diagram below android platform has been built using different layers. - `Application``Java`- `Application Framework``Java`- `Libraries``C/C++` ![enter image description here](https://i.stack.imgur.com/XjjzL.jpg) For some insane reason I have to play/deal with devices like `accelerometer`, `compass` and `camera` using `C/C++` which means directly accessing them in 3rd layer i.e. `Libraries`. According to my understanding the `Application Framework` itself would be consuming `Libraries` for accessing these devices and then providing `APIs` for `Applications`. I am looking for any documentation/tutorials/demo which can help me in this regard i.e how to access and use these devices like camera, accelerometer and compass from `C/C++` code or in other words how to play with these devices directly from `Libraries` layer. My last option would be to get the android source code and dig deep into it to find out what I am looking for but I would like some easy way in form of a documentation/demo/tutorial/anything that can make this a bit easy for me.
How to play with devices like accelerometer and camera using C/C++?
CC BY-SA 3.0
0
2011-06-27T11:03:27.870
2012-11-18T05:55:51.710
2012-08-15T13:56:25.077
1,247,080
421,611
[ "android", "architecture", "android-sensors" ]
6,491,962
1
6,492,222
null
9
8,309
Hello i am trying to create a custom checkbox for my website like the image link provided. What would be the best way to go around doing this? Many thanks. ![Custom checkboxes](https://i.stack.imgur.com/JAJm4.png)
Custom Checkbox
CC BY-SA 3.0
0
2011-06-27T11:12:29.813
2018-07-13T01:06:21.497
2011-06-27T11:46:09.557
468,793
785,769
[ "javascript", "html", "css", "forms", "checkbox" ]
6,492,027
1
6,898,097
null
203
131,197
I've been using CSS3 transform to rotate images and textboxes with borders in my website. The problem is that the border look jagged in Chrome, like a (low-resolution) game without Anti-Aliasing. In IE, Opera and FF it looks much better because AA is used (which is still clearly visible but not that bad). I can't test Safari because I don't own a Mac. The rotated photo and text itself look fine, it is only the border that looks jagged. The CSS I use is this: ``` .rotate2deg { transform: rotate(2deg); -ms-transform: rotate(2deg); /* IE 9 */ -webkit-transform: rotate(2deg); /* Safari and Chrome */ -o-transform: rotate(2deg); /* Opera */ -moz-transform: rotate(2deg); /* Firefox */ } ``` Is there any way I can fix this, e.g. by forcing Chrome to use AA? Example below: ![Jagged Edges example](https://i.stack.imgur.com/PE8Vq.png)
css transform, jagged edges in chrome
CC BY-SA 3.0
0
2011-06-27T11:17:35.117
2022-12-24T09:22:05.977
2015-01-13T12:53:55.867
572,635
572,635
[ "google-chrome", "css", "transform", "antialiasing" ]
6,492,074
1
6,492,931
null
19
15,888
I'm using a TextView in Android, what I want to show 1 line in TextView ending with ". " but this give [] type box at the end. I don't know why? I just want to remvoe this box and only to show text ending with "... " ![TextView shown box at end](https://i.stack.imgur.com/yIS2u.png) Update code for the list_row.xml ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="85dp" android:orientation="horizontal" android:gravity="center_vertical" android:cacheColorHint="#4C7B8D" android:background="#4C7B8D"> <ImageView android:id="@+id/videoListImage" android:src="@drawable/audio_thumbnail60x60" android:layout_height="75dp" android:layout_alignParentLeft="true" android:layout_centerInParent="true" android:scaleType="fitXY" android:layout_width="75dp" android:padding="4dp" android:background="@color/light_gray" /> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginRight="5dp" android:layout_toLeftOf="@+id/next_arrow" android:orientation="vertical" android:gravity="center_vertical" android:paddingLeft = "5dp"> <TextView android:id="@+id/row_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:textColor="@color/app_background_color" android:textSize="18sp" android:ellipsize="end" android:maxLines="1" /> <TextView android:id="@+id/row_dis" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:textColor="@color/color_black" android:layout_marginRight="2dp" android:textSize="15sp" android:ellipsize="end" android:maxLines="1" /> <TextView android:text="$7.50" android:id="@+id/audio_price_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="16dp" android:textColor="@color/color_white" android:textStyle = "bold" android:paddingLeft = "12dp" android:paddingRight = "12dp" android:background="@drawable/blue_round_cornor_background" /> </LinearLayout> <ImageView android:id="@+id/next_arrow" android:src="@drawable/next_arrow" android:layout_toLeftOf="@+id/saved_purchased" android:scaleType="fitXY" android:layout_height="25dp" android:layout_width="18dp" android:layout_centerVertical="true" android:visibility = "gone"/> <ImageView android:id="@+id/saved_purchased" android:layout_alignParentRight="true" android:layout_alignParentTop ="true" android:scaleType="fitXY" android:layout_height="25dp" android:layout_width="25dp" android:layout_marginRight="2dp"/> </RelativeLayout> ``` Here is the images of "next_arrow" ![enter image description here](https://i.stack.imgur.com/Qc6KR.png) Here is the code I am using the getView() in adapter. ``` String discription = listData.getDescription(); if (discription != null && discription.length() > 0) { if (textViewDis != null) { textViewDis.setTypeface(titleFont); Log.e("data", ""+discription); discription.replaceAll("\r\n", ""); textViewDis.setText(discription); } } ``` Here is the actual String of description to be display. > Andrew and Stephanie Tidwell candidly share their success story in this business. This story will help everyone listening realize that no one is perfect, even in a second generation business. This is a streaming audio file. Still have some issue? I can update question more.
Why does TextView in single line elipsized with "end" show boxes?
CC BY-SA 3.0
0
2011-06-27T11:22:06.353
2013-08-30T15:03:24.330
2012-02-21T07:09:01.013
92,837
486,139
[ "android", "android-layout", "android-widget" ]
6,492,134
1
6,492,263
null
2
1,157
The image below describes the issue. I am creating our comment forms. And want to create the pointer arrow in ffffff background color, and a border of 1px aaaaaa and border bottom fff so it sits comfortably on our container div The issue I have is I can make a solid color pointer, but not sure if I can make what I want, so thought I would ask here please. ![enter image description here](https://i.stack.imgur.com/jtE7S.png) The css for the pointer is: ``` div.comment-reply .arrow{ border-bottom: 8px solid #888; border-left: 6px solid transparent; border-right: 6px solid transparent; height: 0; left: 30px; line-height: 0; position: absolute; top: -8px; width: 0; ``` }
pure css arrow help
CC BY-SA 3.0
0
2011-06-27T11:28:14.593
2011-06-27T12:13:49.353
null
null
501,173
[ "css" ]
6,492,342
1
6,492,454
null
0
3,959
I have a div `<div id="detailTable" width="100%">` in which i append different widgets sometimes other content, so in order for the jsp page not to look cumbersome, i am removing any existing elements inside `detailTable` and adding contents on some click. Now I want to add a jQuery accordion but it does not seem to work. Please provide a solution in this context. Thanks Here is what i am doing to remove and add accordion in `detailTable` on button click ``` $('#detailTable').empty(); $('<div>') .attr('id','healthCheckSpan') .html('<div class="titleBlue">Health Check Summary</div>'+ '<table style="border:#2F5882 1px solid;width:100%;" cellspacing="1" cellpadding="1">'+ '<thead>'+ '<tr style="color :#FFFFFF;background-color: #8EA4BB">'+ '<th width="10%" align="center"><b>Recommendations</b></th>'+ '</tr>'+ '</thead>'+ '<tbody >'+ '<tr style="color :#2F5882;background-color: #EDF1F5">'+ '<td align="left" width="10%">'+ '<span id="recommendations">'+ '<div id="hcAccordion">'+ '<h3><a href="#">Error</a></h3>'+ '<div><p id="errorhc">ERROR'+ '</p></div>'+ '<h3><a href="#">Warning</a></h3>'+ '<div><p id="warninghc">WARNING'+ '</p></div>'+ '<h3><a href="#">Info</a></h3>'+ '<div><p id="infohc">INFO'+ '</p></div>'+ '</div>'+ '<script>$(document).ready(function(){'+ '$(function() { $( "#hcAccordion" ).accordion(); });'+ '});</script>'+ '</span>'+ '</td>'+ '</tr>'+ '</tbody>'+ '</table>'+ '</div>') .appendTo('#detailTable'); ``` My screenshot, here i just get a supposed to be accordion but no effects at all. ![enter image description here](https://i.stack.imgur.com/hpNDv.png)
How to add a jquery accordion dynamically to the page?
CC BY-SA 3.0
0
2011-06-27T11:45:34.867
2011-06-27T12:07:39.557
2011-06-27T11:51:24.497
707,414
707,414
[ "javascript", "jquery", "jquery-ui-accordion" ]
6,492,514
1
6,496,209
null
8
6,249
The following python code creates a heatmap of a matrix that contains normally distributed values ``` import numpy as np from matplotlib import pylab as plt np.random.seed(123) #make sure we all have same data m = np.random.randn(200).reshape(10, 20) plt.imshow(m, cmap='RdYlGn', interpolation='nearest') plt.colorbar() ``` This is the output of this code ![example 1](https://i.stack.imgur.com/CkHZS.png) I would like to enhance the contrast of this image by "fading out" the values close to zero. I can easily do this by using disigmoid scaling of the original data as follows: ``` def disigmoidScaling(values, steepnessFactor=1, ref=None): ''' Sigmoid scaling in which values around a reference point are flattened arround a reference point Scaled value y is calculated as y = sign(v - d)(1 - exp(-((x - d)/s)**2))) where v is the original value, d is the referenc point and s is the steepness factor ''' if ref is None: mn = np.min(values) mx = np.max(values) ref = mn + (mx - mn) / 2.0 sgn = np.sign(values - ref) term1 = ((values - ref)/steepnessFactor) ** 2 term2 = np.exp(- term1) term3 = 1.0 - term2 return sgn * term3 plt.imshow(disigmoidScaling(m, 4), cmap='RdYlGn', interpolation='nearest') plt.colorbar() ``` Here is the output. ![example 2](https://i.stack.imgur.com/uR5M3.png) I'm pleased with the result, except the fact that in this version the original values have been exchanged for scaled ones. Is there a way to perform a non-linear mapping of values to colormap?
Non-linear scaling of a colormap to enhance contrast
CC BY-SA 3.0
0
2011-06-27T11:59:47.003
2012-04-07T17:54:11.260
2012-04-07T17:54:11.260
17,523
17,523
[ "python", "matplotlib", "color-scheme", "color-mapping" ]
6,492,569
1
null
null
3
3,962
When I put in css file lines ``` .properties_table tr:nth-child(even) {background: #CCC;} .properties_table tr:nth-child(odd) {background: #FFF;} ``` in Mozilla, Opera and Chrome it looks fine but there it doesn't show in Explorer 8 ( I tested only on IE 8 ). Need to look like this ![enter image description here](https://i.stack.imgur.com/pZSUK.jpg) but looks like this ![enter image description here](https://i.stack.imgur.com/RD8E0.jpg) Does anyone have suggestion ?
CSS table alternate row doesn't paint in Explorer but works in Mozilla, Chrome and Opera
CC BY-SA 3.0
null
2011-06-27T12:05:02.060
2013-06-11T04:28:11.683
null
null
801,314
[ "css" ]
6,492,683
1
19,418,065
null
498
551,506
I've the following sample html, there is a DIV which has 100% width. It contains some elements. While performing windows re-sizing, the inner elements may be re-positioned, and the dimension of the div may change. I'm asking if it is possible to hook the div's dimension change event? and How to do that? I currently bind the callback function to the jQuery resize event on the target DIV, however, no console log is outputted, see below: ![Before Resize](https://i.stack.imgur.com/tswO6.png) ![enter image description here](https://i.stack.imgur.com/dYrFM.png) ``` <html> <head> <script type="text/javascript" language="javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script> <script type="text/javascript" language="javascript"> $('#test_div').bind('resize', function(){ console.log('resized'); }); </script> </head> <body> <div id="test_div" style="width: 100%; min-height: 30px; border: 1px dashed pink;"> <input type="button" value="button 1" /> <input type="button" value="button 2" /> <input type="button" value="button 3" /> </div> </body> </html> ```
How to detect DIV's dimension changed?
CC BY-SA 3.0
0
2011-06-27T12:13:50.353
2022-11-16T09:50:48.803
null
null
440,327
[ "javascript", "jquery", "html" ]
6,492,775
1
null
null
0
1,334
I created a Layout for my App with the standard UI-Elements. Now i want to create nice Buttons in Photoshop for a better look. So i checked the size for example one Button with Button.getWidth() and getHeight() because i don't want that the Button-Image had to be scaled and it looks pixel. But when i create the Button with the size i became, for example 145x45, the image will be scaled in the app and it looks not good! :-/ what is the problem. How can i make custom Buttons that fit exact for example in an ImageView without scaling? Hope you can help me. Thanks! Greets Thomas For Example: ![enter image description here](https://i.stack.imgur.com/OOtgP.png)
right size of a custom Buttom created in Photoshop
CC BY-SA 3.0
null
2011-06-27T12:21:56.137
2013-08-17T18:24:45.823
2011-06-27T12:54:28.610
683,813
683,813
[ "android", "button", "size", "photoshop" ]
6,492,839
1
6,493,908
null
0
2,241
I have given with two Diagrams, one of the diagram says there exist deadlock and other says there in no deadlock. But I could not find how one says there is no deadlock and one says there is deadlock. Where is the deadlock in the following diagram?? ![enter image description here](https://i.stack.imgur.com/UzfUI.png)
How do i find deadlock in given diagram?
CC BY-SA 3.0
null
2011-06-27T12:28:24.570
2013-03-25T20:47:27.247
2013-03-25T20:45:22.527
5,298
448,413
[ "operating-system", "deadlock" ]
6,492,933
1
6,492,988
null
3
1,062
I want to create a dialog with a pointer which points to where the user has tapped. Something like what has been done in the native music app. I searched a lot, but don't know what exactly it is called, so i am attaching the screenshot of what I want to achieve. ![enter image description here](https://i.stack.imgur.com/T4PvW.png) Creating a dialog is easy, but how do I make it "point" dynamically?
Creating dialog with pointer in Android
CC BY-SA 3.0
null
2011-06-27T12:36:37.857
2011-06-27T12:40:53.303
null
null
665,558
[ "android", "dialog", "android-alertdialog" ]
6,493,056
1
6,493,121
null
0
1,601
Forgive me if this is not the best forum to ask this question in. I'm not sure where to start, so maybe someone here can direct me. Using html and jquery/javascript, I want an animation of one item flipping over another item. Almost as if someone is taking a page out from a file and replacing it on top of another page in the file. Please see attached picture for referance. ![Custom Animation](https://i.stack.imgur.com/EmdLG.jpg)
Custom Animations with Jquery/Javascript
CC BY-SA 3.0
0
2011-06-27T12:47:34.320
2011-06-27T13:37:53.810
null
null
243,414
[ "javascript", "jquery", "animation" ]
6,493,140
1
null
null
0
77
I am trying to get a PHP script working based on the API our support system uses, but I am not proficient enough with MySQL to figure this out. What I need to do is sort through and find all entries that have an "action" value of "New Support Ticket Opened", take the "tid" and find the corresponding entry that has an action of "New Ticket Response made by XXX" where XXX is anything except for "User". The problem I am running into is that there might actually be multiple entries that match that description, but I only want to find the first one. The idea is that I want to display a graph that summarizes the average time it takes us to initially respond to a support ticket. ![enter image description here](https://i.stack.imgur.com/fyRLs.png) Here is the start of the SQL... ``` SELECT b1.tid AS Tid, MIN(DATEDIFF(b2.date,b1.date)) AS ResponseTime FROM billing b1 inner join billing b2 ON b1.tid = b2.tid WHERE b1.action='New Support Ticket Opened' AND b2.action LIKE 'New Ticket Response made by%' GROUP BY Tid ``` Any help would be fantastic! Thank you.
Compare 2 MySQL Fields
CC BY-SA 3.0
null
2011-06-27T12:55:40.010
2011-06-27T13:12:58.287
2011-06-27T13:03:34.903
251,488
null
[ "mysql", "comparison", "whmcs" ]
6,493,209
1
null
null
0
105
Is it possible to create the following without use of images, just using css3? ![enter image description here](https://i.stack.imgur.com/d9plA.jpg)
CSS3 advice, no images just css
CC BY-SA 3.0
null
2011-06-27T13:01:16.080
2011-06-27T14:29:27.997
null
null
725,444
[ "css" ]
6,493,478
1
6,493,563
null
2
1,510
I use next code. ``` [UIView transitionFromView:viewA toView:viewB duration:1.0 options: UIViewAnimationOptionTransitionFlipFromLeft completion: ^(BOOL inFinished) { viewB.hidden = NO; viewA.hidden = YES; //do any post animation actions here }]; ``` Transition works OK. I want to set a black background during transition. How can I do this? Please, see the photo: ![enter image description here](https://i.stack.imgur.com/vaCsp.png)
UIView transitionFromView: how can I do black background during transition?
CC BY-SA 3.0
null
2011-06-27T13:20:18.577
2011-10-12T09:39:24.477
2011-10-12T09:39:24.477
618,728
499,825
[ "iphone", "uiview", "uiviewanimationtransition" ]
6,493,558
1
6,496,310
null
2
142
I'm getting unhandled exceptions while debugging a Mono application in Visual Studio as part of the Mono Tools for Visual Studio. The popup looks like: ![Popup](https://i.stack.imgur.com/OzUNo.png) I really want to be able to debug this exception, but none of the details about the exception are being captured. Additionally, if I try...catch around the line that throws the exception, the popup still occurs rather than the catch block. I've seen this behavior occur with Mono Tools before. How do I work around it?
More helpful Mono exceptions in Mono Tools debugger?
CC BY-SA 3.0
null
2011-06-27T13:27:31.523
2011-06-27T17:02:06.450
2020-06-20T09:12:55.060
-1
172,029
[ "c#", "visual-studio", "debugging", "mono", "mono-tools" ]
6,493,989
1
6,494,104
null
5
9,003
I don't really understand why my `float: right;` div is below container div. I have no idea how to fix this. Can someone please explain? I had this problem long time ago on another website, but totally forgot how I managed to fix it if I did it at all. I want it to be inside the container of course. ``` <div id="menu"> <div class="categories"></div> <img class="logo" src="#" /> <div class="thumb"></div> </div> ``` - ``` #menu { width: 960px; height: 70px; margin: auto; background-color: blue; } #menu .thumb { background-color: aqua; float: right; height: 60px; width: 400px; } ``` ![image](https://i.stack.imgur.com/kp2sp.png)
float: right - Why below container?
CC BY-SA 3.0
0
2011-06-27T13:57:10.967
2019-04-11T13:45:43.733
null
null
440,611
[ "html", "css" ]
6,494,383
1
null
null
-2
1,888
Help me to create this layout using Div/span ![Sample output / what i want](https://i.stack.imgur.com/Usr9G.jpg) the code i used and failed ``` <html> <span> <span style="float:left">'.<img/> <br/> Text</span> <span style="float:right"> Long text <span>an inner span</span> </span> <br/> <div> a blank div</div> </span> </html> ``` it will be better if you avoid my faulty code and write a new one
CSS Tableless layout
CC BY-SA 3.0
null
2011-06-27T14:24:24.653
2011-06-27T14:45:57.733
2011-06-27T14:34:41.960
683,233
683,233
[ "css", "html" ]
6,494,528
1
6,494,604
null
0
6,517
When I try and pass data to my view from a controller using ViewData I get the error in the title, when referencing the ViewData property in my view I am using the Razor View engine, there are several posts around related to this, but they seem to be relevant to web forms implementations I suspect there is an issue with how Razor is referenced: my config file has a number of warnings: ![enter image description here](https://i.stack.imgur.com/nc4hc.png) Those type references are warning : Invalid Module Qualification: Unable to resolve assembly System.Web.WebPages.Razor The generic MVC stuff is working ok (using only Model references) but trying to access ViewData - no luck
How to solve "The name 'ViewData' does not exist in the current context"
CC BY-SA 3.0
null
2011-06-27T14:34:31.820
2011-06-27T14:52:54.890
2011-06-27T14:40:15.520
493,521
493,521
[ "asp.net-mvc-3", "viewdata" ]
6,495,167
1
6,508,126
null
2
1,972
Hi guys i have little weird problem. I am using a simple XML to NSDictionary converter [http://troybrant.net/blog/2010/09/simple-xml-to-nsdictionary-converter/](http://troybrant.net/blog/2010/09/simple-xml-to-nsdictionary-converter/) and but if print the NSDictionary , i can see the text value for the node but if i store it in plist, text node will not have any string value. see attach images.![i can see the text node value when i print NSdictionary](https://i.stack.imgur.com/lNrTj.png) here is the plist screenshot. ![enter image description here](https://i.stack.imgur.com/Qj1wg.png) here is the code ``` NSURL * URL = [[NSURL alloc]initWithString:@"rss feed link "]; NSData * data = [[NSData alloc] initWithContentsOfURL:URL]; NSString *testXMLString = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]; // Parse the XML into a dictionary NSError *parseError = nil; NSDictionary *xmlDictionary = [XMLReader dictionaryForXMLString:testXMLString error:&parseError]; NSString * filepath = [self dataFilePathwithFilename:[NSString stringWithFormat:@"TEST.plist"]]; [xmlDictionary writeToFile:filepath atomically:YES]; // Print the dictionary NSLog(@"%@", xmlDictionary); ```
XML to NSdictionary to plist
CC BY-SA 3.0
0
2011-06-27T15:24:26.203
2012-06-11T14:18:01.403
2011-06-28T13:18:50.117
671,247
671,247
[ "iphone", "ios", "plist", "nsdictionary", "nsxmlparser" ]
6,495,300
1
6,543,172
null
3
2,540
I have a font display problem while using gvim in Windows 7 with the Terminus font. Here's a sample: 1x ![enter image description here](https://i.stack.imgur.com/c1SZ8.png) 3x ![enter image description here](https://i.stack.imgur.com/19lEN.png) I'm pretty sure it's trying to display `casesensitive` in bold, but `Terminus.ttf` is meant to be displayed with no anti-aliasing or hinting. Even after removing every reference to "bold" from my colorscheme file, it still looks like this. Turning ClearType off makes it look worse. If it matters, my colorscheme is [zenburn](http://slinky.imukuppi.org/zenburnpage/). What could be causing this, and how can I fix it? Thanks!
How do I turn off all font hinting in gvim in Windows 7?
CC BY-SA 3.0
null
2011-06-27T15:34:33.507
2011-07-01T03:03:25.790
2011-07-01T02:50:46.740
711,534
215,148
[ "vim", "windows-7", "color-scheme", "bold" ]
6,495,523
1
null
null
44
29,052
I'm trying to render frames grabbed and converted from a video using ffmpeg to an OpenGL texture to be put on a quad. I've pretty much exhausted google and not found an answer, well I've found answers but none of them seem to have worked. Basically, I am using `avcodec_decode_video2()` to decode the frame and then `sws_scale()` to convert the frame to RGB and then `glTexSubImage2D()` to create an openGL texture from it but can't seem to get anything to work. I've made sure the "destination" AVFrame has power of 2 dimensions in the SWS Context setup. Here is my code: ``` SwsContext *img_convert_ctx = sws_getContext(pCodecCtx->width, pCodecCtx->height, pCodecCtx->pix_fmt, 512, 256, PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL); //While still frames to read while(av_read_frame(pFormatCtx, &packet)>=0) { glClear(GL_COLOR_BUFFER_BIT); //If the packet is from the video stream if(packet.stream_index == videoStream) { //Decode the video avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet); //If we got a frame then convert it and put it into RGB buffer if(frameFinished) { printf("frame finished: %i\n", number); sws_scale(img_convert_ctx, pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize); glBindTexture(GL_TEXTURE_2D, texture); //gluBuild2DMipmaps(GL_TEXTURE_2D, 3, pCodecCtx->width, pCodecCtx->height, GL_RGB, GL_UNSIGNED_INT, pFrameRGB->data); glTexSubImage2D(GL_TEXTURE_2D, 0, 0,0, 512, 256, GL_RGB, GL_UNSIGNED_BYTE, pFrameRGB->data[0]); SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height, number); number++; } } glColor3f(1,1,1); glBindTexture(GL_TEXTURE_2D, texture); glBegin(GL_QUADS); glTexCoord2f(0,1); glVertex3f(0,0,0); glTexCoord2f(1,1); glVertex3f(pCodecCtx->width,0,0); glTexCoord2f(1,0); glVertex3f(pCodecCtx->width, pCodecCtx->height,0); glTexCoord2f(0,0); glVertex3f(0,pCodecCtx->height,0); glEnd(); ``` As you can see in that code, I am also saving the frames to .ppm files just to make sure they are actually rendering, which they are. The file being used is a .wmv at 854x480, could this be the problem? The fact I'm just telling it to go 512x256? P.S. I've looked at this [Stack Overflow question](https://stackoverflow.com/questions/5548674/how-to-convert-avframe-to-texture-used-by-glteximage2d) but it didn't help. Also, I have `glEnable(GL_TEXTURE_2D)` as well and have tested it by just loading in a normal bmp. I'm getting an image on the screen now but it is a garbled mess, I'm guessing something to do with changing things to a power of 2 (in the decode, `swscontext` and `gluBuild2DMipmaps` as shown in my code). I'm usually nearly exactly the same code as shown above, only I've changed `glTexSubImage2D` to `gluBuild2DMipmaps` and changed the types to `GL_RGBA`. Here is what the frame looks like: ![Ffmpeg as OpenGL Texture garbled](https://i.stack.imgur.com/tOg7V.png) Just realised I haven't showed the code for how pFrameRGB is set up: ``` //Allocate video frame for 24bit RGB that we convert to. AVFrame *pFrameRGB; pFrameRGB = avcodec_alloc_frame(); if(pFrameRGB == NULL) { return -1; } //Allocate memory for the raw data we get when converting. uint8_t *buffer; int numBytes; numBytes = avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height); buffer = (uint8_t *) av_malloc(numBytes*sizeof(uint8_t)); //Associate frame with our buffer avpicture_fill((AVPicture *) pFrameRGB, buffer, PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height); ``` Now that I ahve changed the `PixelFormat` in `avgpicture_get_size` to `PIX_FMT_RGB24`, I've done that in `SwsContext` as well and changed `GluBuild2DMipmaps` to `GL_RGB` and I get a slightly better image but it looks like I'm still missing lines and it's still a bit stretched: ![Ffmpeg Garbled OpenGL Texture 2](https://i.stack.imgur.com/nS6Co.png) After following Macke's advice and passing the actual resolution to OpenGL I get the frames nearly proper but still a bit skewed and in black and white, also it's only getting 6fps now rather than 110fps: ![enter image description here](https://i.stack.imgur.com/SJeGO.png) P.S. I've got a function to save the frames to image after `sws_scale()` and they are coming out fine as colour and everything so something in OGL is making it B&W. Working! Okay I have it working now, basically I am not padding out the texture to a power of 2 and just using the resolution the video is. I got the texture showing up properly with a lucky guess at the correct glPixelStorei() ``` glPixelStorei(GL_UNPACK_ALIGNMENT, 2); ``` Also, if anyone else has the `subimage()` showing blank problem like me, you have to fill the texture at least once with `glTexImage2D()` and so I use it once in the loop and then use `glTexSubImage2D()` after that. Thanks Macke and datenwolf for all your help.
ffmpeg video to opengl texture
CC BY-SA 3.0
0
2011-06-27T15:53:57.190
2017-04-23T06:28:48.220
2017-05-23T11:47:29.557
-1
224,216
[ "opengl", "ffmpeg", "textures", "video-processing", "render-to-texture" ]
6,495,666
1
6,496,055
null
0
601
![enter image description here](https://i.stack.imgur.com/Y850w.jpg) I basically want to make this in my application, so our technicians have an easier time installing our software. So far, I made a form with 4 text boxes: Server name, user name, password, and a combo-box to select a database. Everything was pretty easy until the database selection code. Microsoft's wizard is very efficient, there's no wait time when the database combo box is being filled. Here's the best i could come up with: ``` Private Sub cmbDatabase_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbDatabase.DropDown Dim databaselist As New DataSet Dim connection As SqlClient.SqlConnection If txtServer.Text <> "" And txtLogin.Text <> "" And txtPassword.Text <> "" Then Try connection = New SqlClient.SqlConnection("Data Source=" + txtServer.Text + ";Initial Catalog=master;User ID=" + txtLogin.Text + ";Password=" + txtPassword.Text + ";Connect Timeout=5") connection.Open() Catch ex As Exception End Try If Not connection.State = ConnectionState.Closed Then Dim command As New SqlClient.SqlDataAdapter("EXEC sp_databases", connection) command.Fill(databaselist) cmbDatabase.DataSource = databaselist.Tables(0) cmbDatabase.DisplayMember = "DATABASE_NAME" End If End If ``` That code gets the databases just fine, but obviously if an exception happens the whole screen locks up and it might take a while to recover depending on what the database error is. My question is, can I make mine just as cool/efficient as Microsoft's?
How can I re-create the database connection wizard like the one used in Visual Studio?
CC BY-SA 3.0
null
2011-06-27T16:05:06.833
2011-06-27T16:39:07.630
null
null
203,948
[ ".net", "vb.net" ]
6,495,686
1
6,495,868
null
1
4,654
I am having a problem returning a default `DateTime` value from a complex `Linq-to-Sql` query. Hopefully the following simplified example shows the problem (although I haven't run this exact code): ``` users.Select(u => new MyDomainObject( u.Id, u.Transactions .Where(t => false) // empty results set .Select(t => t.TransactionTime) // TransactionTime is DATETIME NOT NULL .OrderByDescending(x => x) .FirstOrDefault() // I want DateTime.MinValue (or SqlDateTime.MinValue) ) ); ``` So I want the last timestamp, or some `MinValue` timestamp if there are no results. Enumerating the above query gives the error ``` The null value cannot be assigned to a member with type System.DateTime ``` --- Ok I'm not sure that my above example was sufficient to illustrate the problem. I believe the error may be something to do with how I'm trying to do a subquery on a third linked table. The following example recreates the exact error: ![enter image description here](https://i.stack.imgur.com/qG4fh.jpg) So I have a car, which I can take to the mechanic, which sometimes (but not always) is serviced by the mechanic. The requirement is to find how many mechanic visits each car has had since it was last serviced. The issue is when the car has never been serviced, so the data looks like: ``` Car ------------- Id: 1 MechanicVisit ------------- Id: 1 CarId: 1 ServiceRecordId: NULL VisitDate: 1 Jan 2011 ServiceRecord ------------- <empty> ``` So a simple example that shows the error is a query to get the list of last service times: ``` var test = _dataContext.GetTable<Car> .Select(c => c.MechanicVisits .Select(m => m.ServiceRecord) .Select(s => s.ServiceDate) .OrderByDescending(d => d) .FirstOrDefault() ).ToList(); ``` This gives the previously described error of trying to assign null to a non-nullable type, where what I need to do is return `DateTime.MinValue` or `SqlDateTime.MinValue` when the date is null (so I can do the actual query which is number of mechanic visits since the last service) --- I used a variation of what Jon Skeet suggested, using a cast to `DateTime?` and null coalescing operator: ``` var test = _dataContext.GetTable<Car> .Select(c => c.MechanicVisits .Select(m => m.ServiceRecord) .Select(s => (DateTime?)s.ServiceDate) .OrderByDescending(d => d) .FirstOrDefault() ?? new DateTime(1900, 1, 1) ).ToList(); ``` Note the use of the paramatered constructor for the "default" date - `DateTime.MinValue` can't be used here as it throws an out of range exception when converted to SQL, and `SqlDateTime.MinValue` can't be used as it is non-nullable (so the coalesce operator becomes invalid). I still don't really understand why the original error was occuring and this solution does feel a bit hacky, but I've been unable to find any neater way of fixing it.
Get default value type (DateTime) in Linq to Sql query with empty results
CC BY-SA 3.0
null
2011-06-27T16:06:43.547
2020-03-05T11:12:58.197
2011-06-28T10:36:58.057
207,752
207,752
[ "c#", "linq-to-sql", "default-value", "value-type" ]
6,495,710
1
6,495,938
null
-1
185
Considering Sjoerd Solution on [displaying multiple 2D plots in 3D](https://stackoverflow.com/questions/6486907/display-multiple-2d-plots-in-3d-using-graphics-in-mathematica) : ``` myDisk[{x_, y_, z_}, r_] := Polygon@Table[ {x, y, z} + r {Cos[\[Phi]], Sin[\[Phi]], 0} // N, {\[Phi], 0, 2 \[Pi], 2 \[Pi]/200} ] Graphics3D[ { EdgeForm[], { Red, myDisk[{1, 1, 0.5}, 0.5], myDisk[{0, 0, 0.5}, 0.5], myDisk[{-1, -1, 0.5}, 0.5] }, { Blue, myDisk[{1, -1, -0.5}, 0.5], myDisk[{0, 0, -0.5}, -0.5], myDisk[{-1, 1, -0.5}, 0.5]} } ] ``` Using ViewPoint I get : ![enter image description here](https://i.stack.imgur.com/8eZcg.png) Whereas I would like to systematically see : ![enter image description here](https://i.stack.imgur.com/R2qkL.png) Any Idea ?
See a Graphics3D Straight in Mathematica
CC BY-SA 3.0
null
2011-06-27T16:09:02.753
2011-06-27T16:27:55.517
2017-05-23T12:01:09.963
-1
769,551
[ "graphics", "wolfram-mathematica", "3d" ]
6,495,814
1
6,496,182
null
2
6,044
![enter image description here](https://i.stack.imgur.com/VxXnB.jpg) How to adjust the width and height of the tab in jsf 2 primefaces. Also please tel me how to control the text(color and font size) inside the tab? Thanks.
how to adjust width and height of the tab in jsf2 primefaces?
CC BY-SA 3.0
0
2011-06-27T16:17:56.777
2011-06-27T20:06:49.220
null
null
768,310
[ "jsf-2", "primefaces" ]
6,495,857
1
6,498,363
null
1
270
I've managed to set up a repo on my local C drive, but I want to be able to set one up on a web server. I can assess the server like this: ![enter image description here](https://i.stack.imgur.com/XHbh3.png) But what I want to do is this: ![enter image description here](https://i.stack.imgur.com/oXRTF.png) However, when I try and do that I get this: ![enter image description here](https://i.stack.imgur.com/CiPtI.png) When I should be getting this: ![enter image description here](https://i.stack.imgur.com/5pE4s.png) Which is what I get if I make a local repo on my C drive. So my question is, how can I use my web server a repository?
egit, How to set up a repository on a web server, in Eclipse
CC BY-SA 3.0
0
2011-06-27T16:22:12.450
2011-06-27T20:10:41.890
null
null
759,536
[ "java", "eclipse", "git", "repository", "egit" ]
6,496,119
1
6,496,552
null
0
607
Merging two images with transparent sections produces the following composite image: ![enter image description here](https://i.stack.imgur.com/TrDUk.png) I'm wondering why the transparent section of the image I've overlayed onto the green background shows up as such? Anyone? ``` $base = imagecreatefrompng('application/assets/images/vel1_bg.png'); imagealphablending($base, false); imagesavealpha($base, true); list($baseWidth, $baseHeight, $type, $attr) = getimagesize('application/assets/images/vel1_bg.png'); $user_board_items = $this->config->item('user_board_items'); foreach($array as $key => $value){ $item = imagecreatefrompng('application/assets/images/items/' . $user_board_items[$value[0]] . '.png'); imagealphablending($item, false); imagesavealpha($item, true); list($width, $height, $type, $attr) = getimagesize('application/assets/images/items/'. $user_board_items[$value[0]] . '.png'); imagecopyresampled($base, $item, floor(($value[1] / 100) * $baseWidth), floor(($value[2] / 100) * $baseHeight), 0, 0, $width, $height, $width, $height); imagedestroy($item); } //We have to capture the output buffer ob_start(); imagepng($base); $baseimg = ob_get_clean(); ```
Odd transparency effect when merging two .png's with transparency in PHP-GD
CC BY-SA 3.0
null
2011-06-27T16:44:37.613
2011-07-01T15:42:55.037
null
null
480,807
[ "php", "png", "gd", "alphablending" ]
6,496,226
1
6,497,950
null
2
1,673
I want to develop a SaaS chat that users will be able to embed on their website and also there will be a desktop chat client. Something similar to [Live Chat](http://www.livechatinc.com). The problem is that I've never developed server or database programs. Also I'm new to Java but have some experience in desktop C# programming (developed some gui apps). In fact, I'm a student and don't have that much experience. I'm trying to design a good scalable architecture for our server but after a few days of googling and reading wikipedia I feel overwhelmed with such amount of information. Server needs to be simple since it does not contain any presentation code but it has to be very fast because I'm expecting high traffic if service becomes popular. For now I've choosed most of technologies I'll be using. Here's my version of server architecture: ![My current architecture](https://i.stack.imgur.com/bktfU.png) Now the biggest question is how to design this big 'Jetty' piece that contains business logic. I've already learned that I need to use MVP pattern. But there's still some major problems: 1. How to properly work with database? Make static DatabaseManager class that can load and save objects to database? Or make special static SaveToDb and LoadFromDb methods on classes? I think there must be an already developed framework for such things (it must be very common task for servers) 2. How to design event system? How to correctly notify all clients in 'chat room' that they have new message? I can't trivially subscribe all clients to chat room's NewMessage event since most clients are in database, not in memory. 3. It will be great help if you post some simplified design of main classes: Message, User and Chat room. Where message is sent from user to chat room and chat room is a collection of subscribed users. This will be kind of answer to previous two questions. It will be very nice if you point me at appropriate technologies or design patterns.
Need help to design fast and scalable server architecture for SaaS chat
CC BY-SA 3.0
0
2011-06-27T16:55:05.953
2011-06-27T19:33:47.890
null
null
282,328
[ "java", "architecture", "jakarta-ee", "high-load" ]
6,496,609
1
6,502,829
null
6
6,009
I have a workbook set up where the first tab contains a list of parameters. Each column is a set of parameters for a different instance. I then have a template sheet for one instance, and the user makes many copies of this template. One of the things the template does is dynamically pull over the parameters from the first sheet. The user enters a column number (1 to n) and that column of parameters is pulled from the first sheet to be used on that instance. The instance then has runs hundreds of thousands of rows calculations using those parameters. ![enter image description here](https://i.stack.imgur.com/EMhJx.png) ![enter image description here](https://i.stack.imgur.com/AMTCd.png) My problem appears to be related to volatility. With a large number of instances, if I use offset or indirect to get the parameters, any change in any cell in the workbook causes the parameters to be re-retrieved on each instance sheet, and so each sheet recalculates in its entirety every time, freezing the workbook for about 3 seconds whenever a change is made. I thought I could lessen this by using Index. Each sheet's parameters reference the row on the first sheet containing that parameter, with the column number to pull from as the index parameter. This solved the problem of any change causing a recalculation. Now only changes in the parameter ranges cause a recalculation, but for some reason, it's much much worse. Now, changing a random cell in the workbook no longer causes the whole thing to freeze for 3 seconds while it recalculates, but changing a cell in the parameters range will cause each sheet to recalculate, and take about 10 seconds. Why is this method so much slower. It should technically be doing the same thing as before, just only when a relevant parameter is changed. Is there any way to set this up so that when a parameter on the front sheet is changed, only the sheets that are affected by recalculate? I've considered a complex solution involving VBA, whereupon copying the template instance monitors its "Instance Number" cell. When it's changed, VBA code could copy the corresponding parameters to the sheet and hard copy the values here. I would also need VBA monitoring the change event on the main parameters sheet. When anything is changed, it would have to check the column number, iterate over all templates, and re-copying the values if that instance number is referenced. I want to avoid this solution for the usual reasons of keeping VBA out of the equation, but it might be necessary if there's no way to make excel recalculation smarter about changes to parameters.
Excel Index vs Offset/Indirect - I don't understand why Offset/Indirect is faster in this case
CC BY-SA 3.0
0
2011-06-27T17:30:51.397
2018-02-04T11:40:59.123
2018-02-04T11:40:59.123
1,033,581
529,618
[ "excel", "vba", "optimization", "reference", "excel-formula" ]
6,496,659
1
6,503,747
null
-2
96
I'm currently trying to mimic a screen from a flash game for my own inscrutable purposes, and a typical screenshot of the screen in question looks something like this ![(http://i56.tinypic.com/2n9i5c8.png)](https://i.stack.imgur.com/UVsQQ.png). I've successfully found and extracted the background image ![(http://i55.tinypic.com/2vkmiqc.jpg)](https://i.stack.imgur.com/Tw79P.jpg) from the file, and now I'm trying to find out the positioning of the various text fields. The actionscript for the SWF has the various textfields being declared as such: ``` public var speedText:TextField; public var exp:TextField; public var evadeText:TextField; public var lvl:TextField; public var critText:TextField; ``` The problem I have is that I can't find any instance anywhere in the code that actually assigns x, y, width, or height attributes to any of the text fields, nor are they anywhere on the stage using Flash CS4, so I can't determine their positioning at all. I've searched all actionscript files associated with the swf for any instance of the textfield names, without any hits except for assigning text to them. If they aren't receiving their positioning attributes via actionscript, how they receiving these values, and how can I obtain them?
Intangible Flash textfields
CC BY-SA 3.0
null
2011-06-27T17:36:08.103
2011-11-26T03:25:54.347
2011-11-26T03:25:54.347
234,976
815,457
[ "actionscript-3", "flash", "flash-cs4", "textfield" ]
6,497,134
1
6,497,308
null
2
57
The following html code has been used to experiment with how different browsers handle a pdf created through the html control. Below is a very basic html page. ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <object data="http://www.dol.gov/ebsa/pdf/401kfefm.pdf" type="application/pdf" width="500" height="300"> <p>Missing PDF plugin for this browser. <a href="http://www.dol.gov/ebsa/pdf/401kfefm.pdf">Click here to download the PDF file.</a></p> </object> </body> </html> ``` The pdf file will load properly in all of the browsers I have tested; Firefox 5, IE 8, Chrome 12.x, Safari 5. However the size of the control seems to vary between IE and the other browsers. Between the other three browsers the size is consistent but I ideally would like the control to be the same size on all browsers. The picture below shows the size difference between Chrome and IE. ![enter image description here](https://i.stack.imgur.com/SFDeL.jpg) Thanks for the help.
Browser Issue/Difference for pdfs defined within <object>
CC BY-SA 3.0
null
2011-06-27T18:16:51.463
2011-06-27T18:33:46.967
2011-06-27T18:22:01.540
801,676
801,676
[ "html", "pdf", "cross-browser" ]
6,497,389
1
6,497,719
null
4
1,511
I'm working on an ASP.NET website that needs to be internationalized. I'm using .resx files (essentially key-value pairs in a file) to populate static string fields on a page in different languages depending on the chosen culture/locale. I'm implementing Japanese and getting some stubborn vertical strings. When copy and pasting them into the .resx file, they are horizontal (source of strings is Google Translate, for testing purposes). All of the strings appear normal, but one always displays vertically. The misbehaving string is a few div's deep (like all of them) and only has font-size, font-family, color, and an uppercase transform applied to it. Removing any or all of the above rules does not change the orientation of the text. I've cleaned the formatting off the offending text with Notepad and shortened it (to ensure it wasn't a length problem). I'm stumped as to why this particular string is stubbornly vertical. Here is the text in question: ログアウト (Translation: Logout) Clarification of the issue. What it should look like: ![What it should look like](https://i.stack.imgur.com/0Wp8z.png) The vertical text in question: ![The vertical text in question](https://i.stack.imgur.com/b9r5c.png)
How can I force vertical text to be horizontal?
CC BY-SA 3.0
null
2011-06-27T18:42:16.027
2011-11-21T04:02:18.113
2011-11-21T04:02:18.113
234,976
202,095
[ "asp.net", "html", "css", "internationalization" ]
6,497,427
1
null
null
4
15,885
Why video on [this page](http://videojs.com/) and [this page](http://www.bodhibikes.com/welcome-to-bodhi-bikes.php) working in all browser but not in Microsoft Internet explorer 9? Any fix for it? This video is not playing on My IE 9.0.8112.16421 My OS is Windows 7 64 bit ![enter image description here](https://i.stack.imgur.com/Fk4fU.png)
HTML 5 Video not working on IE9
CC BY-SA 3.0
null
2011-06-27T18:45:19.783
2014-11-21T12:39:35.647
2011-08-11T14:44:35.130
128,662
84,201
[ "html", "internet-explorer-9", "flash", "html5-video", "video-encoding" ]
6,497,475
1
6,500,881
null
1
1,180
I have a WPF user control that provides drag and drop functionality within that control. When the user control is hosted within a WPF app, all works fine. However when it is hosted within a `VSPackage` `ToolWindow`, drop is disabled altogether. In this particular case I'm trying to drag a selected item in a draggable list box (left side of diagram below) onto a canvas on the right side. ![enter image description here](https://i.stack.imgur.com/kacqN.jpg) The drag can be initiated with `DoDragDrop`, such as: ``` protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (e.LeftButton != MouseButtonState.Pressed) dragStartPoint = null; if (dragStartPoint.HasValue) { DragDrop.DoDragDrop(this, Content, DragDropEffects.Copy); e.Handled = true; } } ``` But then drop is not allowed anywhere in the tool window. What kind of conditions would prevent drag and drop within a tool window, and what settings changes are necessary to enable it?
How do you enable drag and drop within a VSPackage ToolWindow?
CC BY-SA 3.0
null
2011-06-27T18:49:38.913
2012-02-29T23:18:15.557
2012-02-29T23:17:24.327
305,637
305,637
[ "c#", "wpf", "drag-and-drop", "vs-extensibility", "vspackage" ]
6,497,509
1
null
null
-5
256
I am running into a problem these past following weeks. The problem is that ruby performance is absolutely horrible. Attached is a screenshot of newrelic, check out the performance of ruby. ![enter image description here](https://i.stack.imgur.com/TPlqf.png) I am running ruby 1.8.7, Rails 2.3. My main problem is that Ruby is really taking lots of time to process, more than the DB, more than Membase and more than anything else happening on the server. What can cause this issue? how can I fix it? Edit #1: Changed the screenshot Added some description.
Ruby performance issue
CC BY-SA 3.0
null
2011-06-27T18:52:58.640
2011-06-27T19:44:28.067
2011-06-27T19:44:28.067
427,447
155,720
[ "ruby-on-rails", "ruby", "performance" ]
6,497,704
1
6,498,033
null
0
644
I am familiar with CSS and HTML and also I saw some tutorials about converting PSD to HTML / CSS. like [this](http://css-tricks.com/video-screencasts/1-converting-a-photoshop-mockup-part-1-of-3/). Now I have a PSD template that I want to convert it to an HTML/CSS page. Its picture of mentioned template ![enter image description here](https://i.stack.imgur.com/kW6iG.png) Now I am confused.I don't know where to slice and convert to PNG images. - For example Top black 404 , Should I convert it to PNG Image and putting on website ?- Or I have to write it self with same font? Also about the Text error that placed under top page 404.- please share your experiences.
help about converting PSD to HTML / CSS
CC BY-SA 3.0
0
2011-06-27T19:11:13.493
2013-06-20T20:31:19.273
2011-06-27T19:31:11.407
369,161
369,161
[ "html", "css", "photoshop" ]
6,497,831
1
null
null
0
3,415
I have the following block of code: Modified to resolve my Issue ``` 'This code is in PAge_load Try fileSrc = getFileInformation(fileID) If fileSrc = "" Then Response.Write("No File Information Returned for File ID: " + fileID) ElseIf fileSrc = "NoAccess" Then Response.Write("You do not have access to this file") Else If InStr(fileSrc, "src=") > 0 Or InStr(fileSrc, "SRC=") > 0 Then fileLoc = parseString(fileSrc) fileSrc = fileLoc End If Response.Clear() contentType = getContentType(fileSrc) Response.ContentType = contentType If contentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" Or contentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document" Then Response.AddHeader("Content-Disposition", "attachment; filename=StreamFile" + "." + Label1.Text) End If Response.WriteFile(fileSrc) 'Response.End() Commented out to prevent Thread Abort Exceptions being thrown. End If Catch ex As Exception If ex.GetType.ToString.ToLower = "system.threading.threadabortexception" Then Else : Response.Write("An Error Occurred During Data Retrieval") End If End Try Else Response.Write("An Error Occurred During Data Retrieval") End If Response.End() 'added back into the code outside of the Try/Catch ``` The proper MIME type is chosen when it has the extension of .xlsx But when I try to click on the associated hyperlink to the .xlsx spreadsheet I get an error message ![enter image description here](https://i.stack.imgur.com/Xxz0x.gif) I'm not sure why this occurs or how to resolve this issue. If I am using Response.WriteFile(fileSrc) to resolve this URL could that be the issue?? I have looked at our MIME types on IIS 6.0 and this MIME type exist on IIS.
MIME type question for .XLSX
CC BY-SA 3.0
0
2011-06-27T19:22:55.990
2011-06-28T19:31:43.297
2011-06-28T19:31:43.297
630,489
630,489
[ "vb.net" ]
6,498,066
1
null
null
0
314
I have to serve captcha image (in Coldfusion) without saving permanent files per request, so I am using cfimage without a source destination and the action set to captcha. This returns a file like this: ![](/CFFileServlet/_cf_captcha/_captcha_img4653902933805519165.png) From what I've tested, these files are seem to be temporary they become unavailable after around 5min. This fits my need, but I've been trying to find documentation regarding CFFileServlet, how it works, etc... with no luck... Any thoughts? Thanks, Phill
What is the lifespan of files saved to CFFileServlet with Coldfusion
CC BY-SA 3.0
null
2011-06-27T19:43:47.910
2011-06-27T19:53:46.187
null
null
472,544
[ "file", "coldfusion", "temp", "ttl" ]
6,498,104
1
6,498,616
null
0
1,640
I have to do something like this. ![enter image description here](https://i.stack.imgur.com/xnWJ5.png) When I click on a node, it expands, and this is OK (I am using Powercharts to do it). My big problem is creating random coordinates so that when I open the subnode, it doesn't overlap with another node/subnode. In the Powercharts I have to pass the coordinates, so the big problem is in passing it. I have to do the random coordinates in C#. //------------------------------------------------------- This is what i did so far: This is what i do, is not overlaping, but i have a problem. how can i start do the circles from a starting point? for example, starts in the middle (300,300) and then do circles around it. Is possible? ``` private void button2_Click(object sender, EventArgs e) { g = pictureBox1.CreateGraphics(); g.Clear(pictureBox1.BackColor); double angle; Circle item0 = new Circle(); item0.x=200; item0.y=150; item0.r=50; listaCirculos.Add(item0); Random randomMember = new Random(); g.DrawEllipse(pen1, 200, 150, 50, 50); while(listaCirculos.Count!=11) { int[] it = GenerateNewCircle(600); Circle item = new Circle(); item.x = it[0]; item.y = it[1]; item.r = 50; if (circleIsAllowed(listaCirculos, item)) { listaCirculos.Add(item); g.DrawEllipse(pen1, Convert.ToInt32(item.x), Convert.ToInt32(item.y), 50, 50); } } } bool circleIsAllowed(List<Circle> circles, Circle newCircle) { foreach(Circle it in circles) { //double sumR = it.x + newCircle.r; //double dx = it.x - newCircle.x; //double dy = it.y - newCircle.y; //double squaredDist = dx * dx + dy * dy; double aX = Math.Pow(it.x - newCircle.x, 2); double aY = Math.Pow(it.y - newCircle.y, 2); double Dif = Math.Abs(aX - aY); double ra1 = it.r / 2; double ra2 = it.r / 2; double raDif = Math.Pow(ra1 + ra2, 2); if ((raDif + 1) > Dif) return false; //if (squaredDist < sumR*sumR) return false; } return true; // no existing circle overlaps } public int[] GenerateNewCircle(int maxSize) { int x, y; Random randomMember = new Random(); x = randomMember.Next(0,maxSize); if (x - 50 < 0) y = randomMember.Next(x + 50, maxSize); else if (x + 50 > 600) y = randomMember.Next(0, x - 50); else // in this case, x splits the range 0..n into 2 subranges. // get a random number and skip the "gap" if necessary y = randomMember.Next(0, maxSize - 50); if (y > x - 50) { y += 20; } int[] abc = new int[2]; abc[0] = x; abc[1] = y; return abc; } ```
Random elements (coordinates)
CC BY-SA 3.0
null
2011-06-27T19:47:30.477
2013-01-29T12:07:27.337
2011-06-27T23:34:56.473
254,232
254,232
[ "c#", "random" ]
6,498,245
1
6,506,754
null
6
31,568
There is no advanced properties settings available for the files in my ASP NET 4.0 project in VS2010. I have looked through the options settings and I dont see how to turn them on. I am looking for the Build Action setting so I can set to Embedded Resource. Is this only available if the project is compiled to an assembly DLL? ![enter image description here](https://i.stack.imgur.com/f8qYY.jpg) Here's a screen shot from 4guysfromrolla sample. Note that their sample is a user control.
How to set Build Action on a file - Advanced Properties Not Displayed in properties window
CC BY-SA 3.0
0
2011-06-27T20:00:42.737
2016-05-22T12:06:10.230
2020-06-20T09:12:55.060
-1
387,805
[ "visual-studio-2010" ]
6,498,311
1
6,498,372
null
2
1,942
I want to use the Close button as it shown in WPF windows application into my application. Is it possible to get the design/image from the existing resources? Anyone points to me to get Pressed, Normal and Hover icons for close?. I could not get them all in one place to match each other.. I have attached close button image here.. ![enter image description here](https://i.stack.imgur.com/Y9IP1.png)
How to get WPF window close button design?
CC BY-SA 3.0
null
2011-06-27T20:05:57.953
2011-06-27T20:52:20.623
2011-06-27T20:52:20.623
null
null
[ "c#", ".net", "wpf", "image" ]
6,498,353
1
6,499,919
null
1
761
I am using the sandbag method to have 2 lines of text appear above an image. Here is an image showing the effect working in FF but not in Chrome (same problem in Safari): ![Firefox/Chrome side-by-side](https://i.stack.imgur.com/Q13xK.png) Does anyone know what causes this? Edit: My apology for not posting the link: [http://antigua-guide.info/](http://antigua-guide.info/) The issue can be seen halfway down the right-center column. Here is the html and the css. ![html of section](https://i.stack.imgur.com/zotQq.png) ![css of section](https://i.stack.imgur.com/8go8o.png)
Text goes over image in Chrome/Safari, not FF or IE, using Sandbags
CC BY-SA 3.0
null
2011-06-27T20:10:12.143
2011-06-27T23:01:34.503
2011-06-27T22:27:56.660
201,945
201,945
[ "html", "css", "firefox", "layout", "google-chrome" ]
6,498,388
1
6,498,414
null
18
72,802
I've been working on this MVC 3 application on my home computer for a while now. I'm out of town on a different computer, so I got the project from my source control. This new computer didn't have MVC 3 yet, so I installed it after I copied the project to the new computer. A lot of my dlls (like MvcContrib.dll) were missing since I didn't set Copy Local to true when I first created the project on my home computer. So I've been going in and downloading all the missing dlls and adding them to my project. The only one I can't find is EntityFramework.dll. I can't find a download for it, and I don't see it as a .NET dll when I try to add a reference. ![enter image description here](https://i.stack.imgur.com/Noc7A.png) I'm getting this warning when I try to build:
Could not locate assembly "EntityFramework"
CC BY-SA 3.0
0
2011-06-27T20:12:30.317
2016-07-27T11:18:33.247
null
null
295,302
[ "c#", "asp.net", "asp.net-mvc", "visual-studio", "entity-framework" ]
6,498,434
1
null
null
0
727
I am looking for a jQuery script/plugin that can do something like the 2 pictures attached where i tried to illustrate what i want. I have a horisontal line with x amount of boxes: ![enter image description here](https://i.stack.imgur.com/C0sFP.png) When a user hovers or clicks a box, the selected box will expand across the prev and next box and show some alternative text - and when another boxes is choosen, the previous box is collapsed and the active box is shown with the alternative text etc: ![enter image description here](https://i.stack.imgur.com/RHvi0.png) Anybody have any ideas?
jQuery box layout and animation
CC BY-SA 3.0
null
2011-06-27T20:16:46.920
2011-06-27T20:22:17.687
2011-06-27T20:20:13.907
7,595
671,809
[ "jquery" ]
6,498,566
1
6,498,712
null
0
163
I am trying to create a login view with user id and password. I want to have them enclosed in a box. I tried group table view but it looked different. I am trying to have view like below. Can any one please guide me. Thanks ![enter image description here](https://i.stack.imgur.com/vOeTO.png)
Grouped login view
CC BY-SA 3.0
null
2011-06-27T20:28:53.720
2011-06-27T20:41:40.753
null
null
389,786
[ "iphone" ]
6,498,772
1
null
null
1
2,463
If you look at the following screenshot: ![](https://i.stack.imgur.com/xLrIx.png) You will see a popup box with some content that says 'Security Check' which is basically some helpful information that the user can invoke by clicking a link. I know how to create similar things using jQuery and simple HTML/CSS but looking at the Facebook example I have noticed that the help box in the source... Therefore it is being loaded in from somewhere else and then displayed to the user in the DOM... how would I create something similar? Thanks
Facebook-like JavaScript popup help
CC BY-SA 3.0
0
2011-06-27T20:47:31.403
2011-06-27T21:14:31.430
null
null
302,533
[ "javascript", "jquery" ]
6,498,954
1
6,499,069
null
0
343
I am working on a VirtualPathProvider application. It works fine in Visual Studio but I get a 404 error when testing in IIS7. I have created a simple website in .Net4 classic mode on [http://localhost:101/](http://localhost:101/) and the URL i am accessing to test VirtualPathProvider is [http://localhost:101/article](http://localhost:101/article) You can download the code from [http://88.208.236.165/HS/HSTest.zip](http://88.208.236.165/HS/HSTest.zip) Here are screenshots from the error and running app. ![Error in IIS7](https://i.stack.imgur.com/HO3Dt.png) ![Works in VS](https://i.stack.imgur.com/SVBRc.png)
VirtualPathProvider not working in IIS7
CC BY-SA 3.0
0
2011-06-27T21:05:58.713
2011-07-28T04:43:24.793
null
null
193,098
[ ".net", "c#-4.0" ]
6,499,134
1
6,499,151
null
2
258
this is my style: ``` <Style x:Key="someStyle" TargetType="{x:Type Border}"> <Setter Property="Control.Background" Value="#BB252525"/> </Style> ``` That code works fine but I actually need to bind the background color to this resource: ``` <Color x:Key="MenuBackground">#BB252525</Color> ``` And when I do this: ``` <Style x:Key="someStyle" TargetType="{x:Type Border}"> <Setter Property="Control.Background" Value="{DynamicResource MenuBackground}"/> </Style> ``` I get the following error: ![enter image description here](https://i.stack.imgur.com/llnXv.png) How could I set the background property equal to the resource MenuBackground. What am I doing wrong?
Cannot bind to resource in my style wpf
CC BY-SA 3.0
null
2011-06-27T21:26:05.610
2011-06-27T21:35:54.570
null
null
637,142
[ "wpf", "xaml", "binding", "resources" ]
6,499,156
1
6,499,430
null
4
2,247
I have a WPF ListBox which shows a list of employees names. I want to group and sort them alphabetically. Is this possible? if so, how? Also, i will be required to style the headers (like the attached image) Could some1 guide me as to how i can achieve this. Thanx! ![This is the kind of listbox style i would liek to achieve](https://i.stack.imgur.com/HttJj.png)
Group Items in a listbox alphabetically
CC BY-SA 3.0
null
2011-06-27T21:28:58.347
2015-10-01T22:04:18.917
null
null
552,050
[ "wpf", "sorting", "listbox", "grouping" ]
6,499,181
1
6,499,225
null
0
47
Can you please tell me which tools do I need for creating this kind of round edged menu bars. ![enter image description here](https://i.stack.imgur.com/b7HBF.png)
tools for creating this menubar
CC BY-SA 3.0
null
2011-06-27T21:31:45.140
2012-07-20T17:04:06.897
2012-07-20T17:04:06.897
1,400,768
798,104
[ "css", "menu", "rounded-corners" ]
6,499,403
1
6,499,686
null
1
129
My one and only coworker left a couple weeks ago, and I now have to Merge everything together creating a baseline work environment for my new developer and I. My previous coworker had done most of the management related to our Team Foundation Server. My current structure consists of 4 Branches and a Bugs Branch. Branch A, and Branch B were our separate Development Branches, which were branched off of a Central Dev Branch (Branch C). The Central Dev Branch (Branch C) was derived from the Main Branch (Branch D). The Bugs branch shouldn't affect my problem so it shall remain unnamed. I made some mistakes a while ago when trying to Merge everything together so therefore I've reverted to working versions of Branch A, Branch B, and Branch C. Now that I've gotten working versions of Branch A, B and C I want to begin merging Branch A/B into C. I figure since I'm technically not working with the newest code, and since I've reverted back to older versions that I may have to change the "Version Type" to something other than "Latest Version". ![Version Type](https://i.stack.imgur.com/PWK4S.png) Should I be changing the Version type, or should I leave it as Latest Version and be on my way with Merging?
Which Version Type to choose when Reverting Back/Forth in Code Versions? +TFS VS2010
CC BY-SA 3.0
null
2011-06-27T21:56:07.867
2011-06-28T15:42:34.090
null
null
537,172
[ "tfs", "merge", "branching-and-merging", "source-control-explorer" ]
6,499,493
1
6,499,516
null
4
2,578
Running Visual Studio 2008 MVC 2 (bug fixes on older web application). In between each page this list of files named "eval code" shrinks and then expands again. I have not figured out a way to get it to stop or a reason that it's occurring. Any help would be greatly appreciated. Thanks ![enter image description here](https://i.stack.imgur.com/o5F90.png)
Visual Studio 2008 script documents full of "eval code"
CC BY-SA 3.0
null
2011-06-27T22:06:35.870
2014-01-22T14:30:01.393
null
null
86,452
[ "visual-studio-2008", "model-view-controller", "debugging", "asp.net-mvc-2", "web-applications" ]
6,499,552
1
6,499,792
null
2
1,549
![enter image description here](https://i.stack.imgur.com/SjCxF.png) I've been playing around with a gallery similar to that of the [iPad's photos app](http://www.apple.com/ipad/built-in-apps/photos.html), where you have thumbnails neatly stacked and upon clicking(touching) they fly out in a grid layout. If one gallery/stack is already open when you click another stack, the photos should pile up at their original position before the next set animates out. I though something like [Isotope](http://isotope.metafizzy.co) would be helpful here, but I'm having a real hard time making it stop overwriting itself. Also, I can't quite figure out how to make it seem as if the thumbnails fly out from the "cover image". I put a simplified version of [what I've got so far on JSFiddle](http://jsfiddle.net/Ahrengot/5dMrx/). . I feel like I'm in a little over my head here :) My question is:
Help me create an iPad photos-like gallery with JavaScript
CC BY-SA 3.0
null
2011-06-27T22:12:33.980
2011-06-28T10:37:12.093
2011-06-28T10:37:12.093
641,755
641,755
[ "javascript", "ipad", "photo-gallery", "jquery-isotope" ]
6,499,624
1
6,499,683
null
3
31,960
I am looking for a css way to hav [this](http://reggi.com/clients/dof/) layout sport a 100% height div, meaning that the white will trail down to the bottom of the document not the window. I would like to do this without images and without javascript. I've tried `html,body{height:100%}` which only applied to the window not the doc. I've also tried to put a 900px body background image and it was not centered with the container div. ![enter image description here](https://i.stack.imgur.com/jBAoE.png)
Div height 100% with scroll bar
CC BY-SA 3.0
0
2011-06-27T22:22:18.650
2014-07-02T12:24:44.083
null
null
340,688
[ "html", "css" ]
6,499,966
1
null
null
0
1,438
![enter image description here](https://i.stack.imgur.com/nZhmv.png)I have asp.net project with Javascript code, i worked with Internet explorer 8, after i did finish the project i tried to run this project on All other browser (Chrom, Firefox, Opera, Safari) and suddenly each of these browser are not run javascript. I was supprised that after 1 minutes i went back to the Internet Explorer and is also not running javascript. I don't know what the problem, I've tried to comment partial of my javascript and it is not work, and comment all the left javascript and it's still doesn't work. I have very long JavaScript code vith collaboration with AJAX, i have tried to remove paragraph by paragraph and it still doesnt work, i have tried to remove All the java script and run only "Hello word" simple java script code that fire from click event and it does not work. Although with other pages it work fine (alse the same "Hello word" simple code, the problem causes suddenlt til this moment every thing work fine. I attached sample code from the javascript code, it doesent metter because my there is a lot of java script code. Thank you every one that response i willi appreciation your response ! By the way there is none error, except when i click the button the java script write "
Javascript suddenly stop working
CC BY-SA 3.0
null
2011-06-27T23:05:56.943
2011-06-28T19:13:21.780
2011-06-27T23:24:07.063
665,783
665,783
[ "javascript", "asp.net", "ajax" ]
6,499,991
1
null
null
3
1,493
I am using [System.Web.Helpers.Chart](http://msdn.microsoft.com/en-us/library/system.web.helpers.chart%28v=vs.99%29.aspx) ``` Namespace: System.Web.Helpers Assembly: System.Web.Helpers (in System.Web.Helpers.dll) ``` Is there a way to set a series color? This light yellow is hard to spot... ![temperature over time](https://i.stack.imgur.com/Np3qk.jpg) Chart code: ``` new Chart(width: w, height: h, theme: ChartTheme.Blue) .AddLegend("Legenda") .SetYAxis(min: 0, max: 30) .AddSeries( name: "Temperatura", chartType: DataVisualization.SeriesChartType.FastLine.ToString(), xValue: dataRange.Select(d => d.RecordDate.ToString("dd/MM")).ToList(), yValues: dataRange.Select(d => d.TemperatureAvg).ToList()) .AddSeries( name: "Ponto de orvalho", chartType: DataVisualization.SeriesChartType.FastLine.ToString(), xValue: dataRange.Select(d => d.RecordDate.ToString("dd/MM")).ToList(), yValues: dataRange.Select(d => d.DewAvg).ToList()) .Write(); ```
How can I set the series color on a chart?
CC BY-SA 3.0
0
2011-06-27T23:09:21.417
2018-05-08T06:16:14.510
null
null
340,760
[ "c#", "asp.net-mvc-3", "charts" ]
6,500,136
1
6,500,172
null
3
957
I am trying to submit my addon to the mozilla site but I am getting this damn warning: ![enter image description here](https://i.stack.imgur.com/rVjtN.jpg) The code (in mf_options.js) is pretty simple (and i think the problem is only between the "start storage" and "end storage": ``` // start Storage var url = "http://mafiaafire.com"; var ios = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var ssm = Components.classes["@mozilla.org/scriptsecuritymanager;1"] .getService(Components.interfaces.nsIScriptSecurityManager); var dsm = Components.classes["@mozilla.org/dom/storagemanager;1"] .getService(Components.interfaces.nsIDOMStorageManager); var uri = ios.newURI(url, "", null); var principal = ssm.getCodebasePrincipal(uri); var storage = dsm.getLocalStorageForPrincipal(principal, ""); // end Storage function display_blocked_list1() { var list = storage.getItem('domain_list_original'); if (list !== undefined) { var strSingleLineText = list.replace(new RegExp( " ", "g" ), "<br>" ); var status = document.getElementById("div1"); status.innerHTML = strSingleLineText; } var list2 = storage.getItem('domain_list_redirect'); if (list2 !== undefined) { // Strip out all line breaks. var strSingleLineText2 = list2.replace(new RegExp( " ", "g" ), "<br>" ); var status2 = document.getElementById("div2"); status2.innerHTML = strSingleLineText2; } var list3 = storage.getItem('list_expiry_date'); if (list3 !== undefined) { var dateArray = list3.split(","); var future_date = new Date(dateArray[0],dateArray[1],dateArray[2]); future_date.setDate(future_date.getDate()+2); var status2 = document.getElementById("div3"); status2.innerHTML = future_date; } // ################################################## } ```
javascript: namespace pollution
CC BY-SA 3.0
null
2011-06-27T23:36:01.017
2011-06-27T23:50:07.530
2011-06-27T23:41:03.280
604,843
604,843
[ "javascript", "firefox", "firefox-addon", "global-variables" ]
6,500,173
1
6,500,190
null
5
20,812
I have this menu here![enter image description here](https://i.stack.imgur.com/VPa8P.png) I want the highlighting(hover) to extend to the edge of the outside box(service menu). Just like how the popout menu is. The menu itself is contained in another div - ![enter image description here](https://i.stack.imgur.com/ZJgwE.png) I don't think it is possible to have negative borders the same way you can have negative padding. Anyone have a good idea on how to get the highlight of the menu to extend to the edge of the outside box on hover? This is Drupal w/ Nice Menu by the way.
Is there a way to have CSS borders outside the box(div)? Or alternative solution
CC BY-SA 3.0
null
2011-06-27T23:44:58.513
2018-07-04T18:01:51.400
null
null
716,105
[ "css", "border" ]
6,500,215
1
6,503,725
null
0
796
![enter image description here](https://i.stack.imgur.com/KsmOW.png)Am having some trouble hooking up instance variables in the visual object editor using Xcode4. Have been able to connect the Whereami App Delegate to the mapView and activityIndicator, but for some reason, can't find the locationTitleField. Am also having trouble connecting the delegates back to the App Delegate. What am I doing wrong? Here is the code for Whereami App Delegate.h: ``` #import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h> #import <MapKit/MapKit.h> @interface WhereamiAppDelegate : NSObject <UIApplicationDelegate,CLLocationManagerDelegate> { UIWindow *window; CLLocationManager *locationManager; IBOutlet MKMapView *mapView; IBOutlet UIActivityIndicatorView *activityIndicator; IBOutlet UITextView *locationTitleField; } @property (nonatomic, retain) IBOutlet UIWindow *window; @end ``` Whereami App Delegate.m ``` #import "WhereamiAppDelegate.h" @implementation WhereamiAppDelegate @synthesize window=_window; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. //-- Create location manager object -- locationManager = [[CLLocationManager alloc] init]; //-- Make this instance of WhereamiAppDelegate the delegate //-- It will sends its messages to our Whereami delegate. [locationManager setDelegate:self]; //-- We want all results from the location manager-- [locationManager setDistanceFilter:kCLDistanceFilterNone]; //-- And we want it to be as accurate as possible-- //-- Regardless of how much time/power it takes -- [locationManager setDesiredAccuracy:kCLLocationAccuracyBest]; //-- Tell our location manager to start looking for its location //-- immediately [locationManager startUpdatingLocation]; [self.window makeKeyAndVisible]; return YES; } - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { NSLog(@"Could not find location: %@", error); } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { NSLog(@"%@", newLocation); } ```
Having trouble hooking up instance variables to AppDelegate
CC BY-SA 3.0
null
2011-06-27T23:51:18.777
2011-06-28T11:23:38.590
2011-06-28T03:00:28.510
183,014
183,014
[ "iphone", "objective-c", "interface-builder", "xcode4" ]
6,500,676
1
6,674,257
null
0
857
I am trying to find a solution similar to this one but for an Android platform: [http://itunes.apple.com/us/app/hipmunk-flight-search/id419950680?mt=8](http://itunes.apple.com/us/app/hipmunk-flight-search/id419950680?mt=8) Have a look at that website. Basically the idea is to scroll laterally and vertically on the green content area (see the image below) and the two menus (red and blu) should scroll accordingly. If you scroll over the content area (green) left-right, the blu top menu should scroll as well. If you scroll up-down the red menu should scroll up-down as well. The areas of the menu, is always there in the page. ![enter image description here](https://i.stack.imgur.com/tXNR4.png) does anyone have any suggestion?
Android UI: scrolling horizontal and vertical in coordination with top and lateral menu
CC BY-SA 3.0
null
2011-06-28T01:30:38.133
2011-07-13T04:53:45.880
null
null
589,438
[ "android", "android-layout" ]
6,500,697
1
6,500,785
null
7
22,023
I am trying to create a matrix of plots, but I want the upper left corner to be blank. So I'm using: ``` frame() ``` To which R responds: > Error in `frame()`: figure margins too large I'm using the following two lines to create my layout: ``` plotIDs <- matrix(c(1:16), 4, 4, byrow = T); layout(plotIDs, widths = c(0.5,1,1,1,1), heights = c(0.5,1,1,1,1)); ``` and this gives me the following layout: ![4 by 4 layout with first row and col at half height](https://i.stack.imgur.com/RAWXg.png) If I then issue `frame()` I get the above error. What am I doing wrong? I don't see any way to specify a height or a width for the `frame()` command (just an alias for `plot.new()`)?
Error in frame() : figure margins too large
CC BY-SA 3.0
null
2011-06-28T01:35:37.347
2012-04-22T01:17:14.183
2012-04-22T01:17:14.183
211,563
317,773
[ "r", "plot" ]
6,501,118
1
6,501,642
null
1
72
I have a situation here where the user has about 100 controls mostly multi select listboxes but some other stuff peppered in (drop downs checkboxes) and they narrow down complex search criteria for screenings. When they go back later they want the act of pulling up a record to reset the controls to the values that they had used to match the criteria. So I made a table that has a column for each control and iterativley stores the values - comma deliminated for listboxes - when the user locks in the search criteria to move to the next step. Other then using a switch to say if value is x: set control x to value(s) so and so is there a good way to iterate through this, seeing as the name of the column is the name of the control ? I'm stumped at the moment ... ![enter image description here](https://i.stack.imgur.com/MRt2i.png) ``` var CParam = QueryFnc.RstrCntrls(Jnum, Qnum); foreach(var a in CParam) { //Map Values to Matching Named Control } ```
C# Restoring Values to Controls Iterativley
CC BY-SA 3.0
null
2011-06-28T03:05:17.553
2011-06-28T04:42:20.460
2011-06-28T03:35:52.460
574,663
574,663
[ "c#", "asp.net" ]
6,501,136
1
6,510,223
null
1
170
Have a core data question that I am trying to solve for the past couple of hours (5hrs). I have two entities: Student and Class. Student attributes: name, grade Class attributes: name Relationships: 1. Student <<------>>Class, both have to-many relationship. 2. I create student 1. 3. Then create Class 1, Class 2. 4. I then add Student 1 to Class 1 5. I then add Student 1 to Class 2. Now when I change the grade of student 1 via the Class 1 its also change the grade for Class 2. So how do I solve this problem. Thanks a bunch. According to answers, I have modeled the following: ![enter image description here](https://i.stack.imgur.com/F8Ri5.png) I want to add the same student to different classes:
Adding the same object to multiple to-many relationships
CC BY-SA 3.0
0
2011-06-28T03:09:08.183
2011-06-29T06:16:39.750
2011-06-28T16:04:54.710
399,406
399,406
[ "iphone", "ios", "core-data" ]